/* =========================================================
   bootstrap_barrio_giguellerie — 40-content.css
   Pages "cheval", et articles,... : sticky title/nav, sections, pedigree, medias
   ========================================================= */

/* Nav secondaire des chevaux */
#block-bootstrap-barrio-giguellerie-navigationpagecheval .nav{
  --bs-nav-link-padding-y: 0rem;
}

/* --- TITLE sticky --- */
body.node--type-cheval #block-bootstrap-barrio-giguellerie-page-title{
  position: sticky;
  top: 0;
  z-index: 20;
  background: transparent;
  padding: .5rem 0;
  isolation: isolate;
}

body.node--type-cheval #block-bootstrap-barrio-giguellerie-page-title::before{
  content: "";
  position: absolute;
  inset: 0;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: #fff;
  z-index: -1;
}

body.node--type-cheval #block-bootstrap-barrio-giguellerie-page-title .title{
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- NAV sticky sous le titre --- */
body.node--type-cheval #block-bootstrap-barrio-giguellerie-navigationpagecheval{
  position: sticky;
  top: 3rem;
  z-index: 21;
  background: transparent;
  padding: .25rem 0;
  isolation: isolate;
}

body.node--type-cheval #block-bootstrap-barrio-giguellerie-navigationpagecheval::before{
  content: "";
  position: absolute;
  inset: 0;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.08);
  z-index: -1;
}

body.node--type-cheval #block-bootstrap-barrio-giguellerie-navigationpagecheval .nav{
  --bs-nav-link-padding-y: 0rem;
}

body.node--type-cheval [id]{
  scroll-margin-top: calc(3.25rem + 3rem);
}

.node--type-cheval .field__label{
  font-weight: 600;
  font-family: var(--font-headings);
}
.node--type-cheval #details-techniques .field__items{
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.node--type-cheval #details-techniques{
  margin-top: 2rem;
  font-size: 1.1rem;
}
.node--type-cheval #details-techniques .field--type-entity-reference {
  margin-bottom: 0;
}
.node--type-cheval #details-techniques .field--name-field-promo{
  font-size: 1rem;
  font-weight:inherit !important;
}
.node--type-cheval #details-techniques .field__item{
  font-weight: 200;
}

.node--type-cheval #hero-image img{
  float: none;
  margin: 0;
}

/* Pedigree table cleanup */
.node--type-cheval #pedigree.content-section .table > thead {
  visibility: collapse;
}
.node--type-cheval #pedigree.content-section .table > caption {
  visibility: hidden;
  line-height: 0;
  padding: 0;
}

.node--type-cheval #pedigree.content-section .table,
.node--type-cheval #pedigree.content-section .table thead,
.node--type-cheval #pedigree.content-section .table tbody,
.node--type-cheval #pedigree.content-section .table tfoot,
.node--type-cheval #pedigree.content-section .table tr,
.node--type-cheval #pedigree.content-section .table th,
.node--type-cheval #pedigree.content-section .table td{
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.node--type-cheval #pedigree.content-section .table{
  border-collapse: collapse;
}

.node--type-cheval #pedigree.content-section .table td{
  vertical-align: middle;
  font-size: 1.1rem;
  border: 1px solid rgba(0,0,0,.10) !important;
  padding: .35rem .5rem;
}

/* ODD */
.node--type-cheval #pedigree.content-section .table td.row_1.col_0,
.node--type-cheval #pedigree.content-section .table td.row_1.col_1,
.node--type-cheval #pedigree.content-section .table td.row_1.col_2,
.node--type-cheval #pedigree.content-section .table td.row_3.col_2,
.node--type-cheval #pedigree.content-section .table td.row_5.col_1,
.node--type-cheval #pedigree.content-section .table td.row_5.col_2,
.node--type-cheval #pedigree.content-section .table td.row_7.col_2{
  background-color: rgba(0,0,0,.05) !important;
}

/* EVEN */
.node--type-cheval #pedigree.content-section .table td.row_2.col_2,
.node--type-cheval #pedigree.content-section .table td.row_3.col_1,
.node--type-cheval #pedigree.content-section .table td.row_4.col_2,
.node--type-cheval #pedigree.content-section .table td.row_5.col_0,
.node--type-cheval #pedigree.content-section .table td.row_6.col_2,
.node--type-cheval #pedigree.content-section .table td.row_7.col_1,
.node--type-cheval #pedigree.content-section .table td.row_8.col_2{
  background-color: rgba(0,0,0,.02) !important;
}

.node--type-cheval .group-name .field--name-field-societe::before{
  content: "—";
  opacity: .6;
  margin: 0 .5rem;
}

/* Photos "cheval" et Médias des articles */
.node--type-article #medias .field--name-field-medias > .field__items,
.node--type-cheval #pictures .field--name-field-photos .field__items {
  display:flex;
  flex-wrap:wrap;
  gap:2px;
}
.node--type-article #medias .field--name-field-medias > .field__items > .field__item,
.node--type-cheval #pictures .field--name-field-photos .field__item{
  flex: 1 1 140px;
  max-width: 200px;
}
.node--type-article #medias .media-tile-wrap{
  width:100%;
}
.node--type-article #medias a.media-tile,
.node--type-cheval #pictures .field--name-field-photos a.photoswipe{
  display:block;
  width:100%;
  aspect-ratio:1/1;
  overflow:hidden;
  position:relative;
  background:#f2f2f2;
}
.node--type-article #medias a.media-tile > .field,
.node--type-article #medias a.media-tile > .field > .field__item{
  width:100%;
  height:100%;
  margin:0 !important;
}
.node--type-article #medias a.media-tile img,
.node--type-cheval #pictures .field--name-field-photos a.photoswipe img{
  width:100%;
  height:100% !important;
  object-fit:cover;
  display:block;
}
.node--type-article #medias a.media-tile--video{
  display:grid;
  place-items:center;
}
.node--type-article #medias a.media-tile--video::after{
  content:"▶";
  position:absolute;
  left:.5rem;
  bottom:.5rem;
  width:2.1rem;
  height:2.1rem;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(0,0,0,.55);
  color:#fff;
  font-size:1.1rem;
}

/* Videos (cheval) */
.node--type-cheval #videos .field--name-field-videos .field__items{
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.node--type-cheval #videos .field--name-field-videos .field__items > .field__item{
  flex: 1 1 240px;
  max-width: 360px;
}

.node--type-cheval #videos .video-card-wrap{
  width: 100%;
}

.node--type-cheval #videos .video-card{
  display: block;
  position: relative;
  border-radius: .5rem;
  overflow: hidden;
  background: #111;
}

.node--type-cheval #videos .video-card::before{
  content: "";
  display: block;
  padding-top: 56.25%;
}

.node--type-cheval #videos .video-card img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.node--type-cheval #videos .video-card::after{
  content: "▶";
  position: absolute;
  left: .5rem;
  bottom: .5rem;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 1.1rem;
}

.node--type-cheval #videos .video-card-caption{
  margin-top: .35rem;
  font-size: .95rem;
  line-height: 1.2;
}
.node--type-cheval #videos .video-card-caption__text{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.node--type-cheval #videos .video-card-caption__credits{
  font-size: .85em;
  opacity: .75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 575.98px){
  .node--type-cheval #videos .field--name-field-videos .field__items{
    gap: .5rem;
  }
  .node--type-cheval #videos .field--name-field-videos .field__items > .field__item{
    flex-basis: 150px;
    max-width: none;
  }
}

/* Petites exceptions page cheval */
#conditions .content-section .block{
  margin-bottom: 1rem;
}