/* ==========================================================================
   Section Notre Histoire — Édito intro + Frise centrale + médias en quinconce
   ========================================================================== */

.section-histoire {
  position: relative;
  padding: 8vh 4vw 4vh;
  overflow: visible;
  z-index: 40;
  isolation: isolate;
  background: #033a47;
}

/* Fond — bleu-vert #009892 en transparence */
.section-histoire__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(0, 152, 146, 0.45) 0%, rgba(3, 58, 71, 0.98) 100%),
    url('../img/unsplah.png') center / cover no-repeat;
  z-index: 0;
}

/* ── SVG décoratifs — bien visibles, répartis sur toute la hauteur ── */

.section-histoire__deco {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

/* Visage2 — grand, fixe à gauche, suit le scroll via GSAP */
.section-histoire__deco--visage2-scroll {
  position: fixed;
  top: 30vh;
  left: -3%;
  width: clamp(400px, 40vw, 600px);
  opacity: 0;
  transition: none;
}

/* Visage (contour blanc) — grand, fixe à droite, suit le scroll via GSAP */
.section-histoire__deco--visage-scroll {
  position: fixed;
  top: 45vh;
  right: -2%;
  width: clamp(350px, 35vw, 550px);
  opacity: 0;
  filter: brightness(0) invert(1);
  transition: none;
}

/* ══════════════════════════════════════════
   ÉDITO — "Notre histoire" positionné seul
   ══════════════════════════════════════════ */

/* Édito intro — centré seul, avant la frise */
.section-histoire__edito-intro {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto 8vh;
  text-align: center;
}

.section-histoire__edito-intro .section-histoire__title-wrap {
  margin-bottom: 1.2em;
}

.section-histoire__edito-intro .section-histoire__accroche,
.section-histoire__edito-intro .section-histoire__body,
.section-histoire__edito-intro .section-histoire__punchline {
  text-align: center;
}

.section-histoire__edito-intro .section-histoire__cta {
  margin: 0 auto;
}

/* Wrapper titre — permet la superposition */
.section-histoire__title-wrap {
  position: relative;
  z-index: 3;
  margin: 0 0 0.8em;
  display: inline-block;
}

/* Titre */
.section-histoire__title {
  font-family: var(--font-titre);
  font-size: clamp(2rem, 5vw, 80px);
  color: #fff;
  line-height: 1;
  font-weight: 400;
  margin: 0;
  white-space: nowrap;
}

/* Sous-titre rose cursif — "Commune", grand et lisible */
.section-histoire__subtitle {
  font-family: 'Autumn Chant', cursive;
  font-size: clamp(3rem, 7vw, 100px);
  color: #E6105D;
  font-weight: 400;
  line-height: 0.85;
  margin: 0;
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

/* Textes édito */
.section-histoire__accroche {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1rem, 1.2vw, 22px);
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
  margin: 0 0 0.8em;
}

.section-histoire__body {
  font-family: var(--font-corps);
  font-size: clamp(0.9rem, 1vw, 20px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 0.8em;
}

.section-histoire__punchline {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1rem, 1.1vw, 21px);
  font-weight: 700;
  color: var(--color-blanc);
  margin: 0 0 1.5em;
}

/* CTA */
.section-histoire__cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  border: 1px solid #E6105D;
  background: transparent;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.64px;
  transition: background-color 0.3s, color 0.3s;
}

.section-histoire__cta:hover {
  background-color: var(--color-rose);
}

.section-histoire__cta svg {
  transition: transform 0.3s;
}

.section-histoire__cta:hover svg {
  transform: translateX(4px);
}

/* Vidéo 10 ans, 10 sec — avant la frise */
.section-histoire__edito-media {
  position: relative;
  z-index: 2;
  width: clamp(280px, 30vw, 480px);
  margin: 0 auto 6vh;
}

.section-histoire__edito-media .section-videos__player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #0a1a25;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.section-histoire__video-label {
  font-family: var(--font-corps);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  margin-top: 0.5em;
  text-align: center;
}

/* ══════════════════════════════════════════
   FRISE CENTRALE — zigzag vertical
   ══════════════════════════════════════════ */

.frise {
  position: relative;
  z-index: 2;
  max-width: none;
  margin: 0;
}

/* Chaque rangée = 3 colonnes : media | centre | year-block
   Centre (frise) réduit à 40px, gap large pour détacher les médias */
.frise__row {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  column-gap: 0.5vw;
  align-items: start;
  min-height: 120px;
  margin-bottom: 1.5em;
}

/* Rangées inversées : utiliser order au lieu de direction:rtl */
.frise__row--reverse .frise__media {
  order: 3;
}

.frise__row--reverse .frise__center {
  order: 2;
}

.frise__row--reverse .frise__year-block {
  order: 1;
}

.frise__row--last {
  margin-bottom: 0;
}

/* ── Colonne centrale : ligne + dot ── */

.frise__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  height: 100%;
}

.frise__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #E6105D;
  box-shadow: 0 0 8px rgba(230, 16, 93, 0.5);
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  margin-top: 0.6em;
}

.frise__dot--big {
  width: 18px;
  height: 18px;
  box-shadow: 0 0 12px rgba(230, 16, 93, 0.6), 0 0 30px rgba(230, 16, 93, 0.3);
}

.frise__line {
  width: 0;
  flex: 1;
  border-left: 1.5px dashed rgba(255, 255, 255, 0.3);
  min-height: 40px;
}

/* ── Bloc année ── */

.frise__year-block {
  padding: 0;
  position: relative;
}

.frise__year-block--right {
  text-align: left;
}

.frise__year-block--left {
  text-align: right;
}

.frise__year {
  display: block;
  font-family: var(--font-titre);
  font-size: clamp(2rem, 4vw, 64px);
  color: #fff;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 0.15em;
}

/* Tooltip au clic sur "Découvrir" */
.frise__tooltip {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.97);
  color: #222221;
  font-family: var(--font-corps);
  font-size: 0.9rem;
  line-height: 1.55;
  padding: 1.2em 1.4em;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  min-width: 260px;
  max-width: 360px;
  margin-top: 0.6em;
}

.frise__year-block--left .frise__tooltip {
  left: auto;
  right: 0;
}

.frise__tooltip strong {
  color: #E6105D;
  font-weight: 700;
}

/* Image dans la tooltip */
.frise__tooltip-img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 0.8em;
  display: block;
}

.frise__tooltip-text {
  margin: 0;
}

/* Visible quand la classe .is-open est ajoutée par JS */
.frise__tooltip.is-open {
  display: block;
}

/* Assurer le z-index quand tooltip ouverte */
.frise__year-block.has-tooltip-open {
  z-index: 20;
}

.frise__desc {
  font-family: var(--font-corps);
  font-size: clamp(0.85rem, 1vw, 16px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 0.8em;
  max-width: 340px;
}

.frise__year-block--left .frise__desc {
  margin-left: auto;
}

.frise__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.64px;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  border-bottom: 3px solid var(--color-bleu-moyen);
  padding-bottom: 2px;
  transition: border-color 0.3s;
}

.frise__link:hover {
  border-color: #E6105D;
}

.frise__link svg {
  transition: transform 0.3s;
}

.frise__link:hover svg {
  transform: translateX(3px);
}

.frise__year-block--left .frise__link {
  float: right;
}


/* ── Bloc média (côté opposé à l'année) — plaqué aux bords, angles, ombres ── */

.frise__media {
  padding: 0;
  position: relative;
}

/* ── Décorations SVG arrière-plan des médias ── */

.frise__media-deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  height: auto;
}

.frise__media--left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.frise__media--right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Contenu média au-dessus des décos */
.frise__media .section-videos__player,
.frise__media .frise__communaute-card,
.frise__media .frise__temoignages-slider,
.frise__media .frise__video-placeholder {
  position: relative;
  z-index: 1;
}

/* Vidéo dans la frise — plaquée au bord, rotation, ombre portée */
.frise__media .section-videos__player {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #0a1a25;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.frise__media--left .section-videos__player {
  transform: rotate(-1.5deg);
}

.frise__media--right .section-videos__player {
  transform: rotate(1.5deg);
}

.frise__media-label,
.frise__communaute-label {
  font-family: var(--font-corps);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin: 0.6em 0 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Carte communauté — plaquée au bord, ombre */
.frise__communaute-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 2em;
  max-width: 520px;
  text-align: left;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Variante blanche */
.frise__communaute-card--white {
  background: #fff;
  border: none;
  color: #222221;
}

.frise__communaute-card--white .frise__communaute-number {
  color: #222221;
}

.frise__communaute-card--white .frise__communaute-text {
  color: #444;
}

.frise__link--dark {
  color: #222221;
  border-bottom-color: #222221;
}

.frise__link--dark:hover {
  border-color: #E6105D;
  color: #E6105D;
}

.frise__communaute-number {
  font-family: var(--font-titre);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: #fff;
  line-height: 1;
  margin: 0 0 0.4em;
}

.frise__communaute-number span {
  color: var(--color-rose);
}

.frise__communaute-text {
  font-family: var(--font-corps);
  font-size: clamp(0.85rem, 1vw, 1rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 1em;
}

/* Citation — plaquée au bord, rotation, ombre */
.frise__citation {
  background: rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--color-rose);
  border-radius: 0 10px 10px 0;
  padding: 1.5em 2em;
  max-width: 520px;
  text-align: left;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15);
}

.frise__media--left .frise__citation {
  border-left: none;
  border-right: 3px solid var(--color-rose);
  border-radius: 10px 0 0 10px;
  transform: rotate(-1.5deg);
}

.frise__media--right .frise__citation {
  transform: rotate(1.5deg);
}

.frise__citation-quote {
  font-family: var(--font-corps);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.65;
  color: #fff;
  font-style: italic;
  font-weight: 500;
  margin: 0 0 1.2em;
}

.frise__citation-quote::before {
  content: '\201C';
  font-family: var(--font-titre);
  font-size: 3em;
  line-height: 0;
  vertical-align: -0.35em;
  margin-right: 0.08em;
  color: var(--color-rose);
  opacity: 0.6;
}

.frise__citation-author {
  font-family: var(--font-corps);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
}

.frise__citation-author strong {
  display: block;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.15em;
}

/* Placeholder vidéo */
.frise__video-placeholder {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-corps);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.frise__media--left .frise__video-placeholder {
  transform: rotate(-1.5deg);
}

.frise__media--right .frise__video-placeholder {
  transform: rotate(1.5deg);
}

/* "On parle de l'ADN" */
.frise__parole {
  text-align: center;
  padding: 2em;
}

.frise__parole-label {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1.8rem, 2.5vw, 34px);
  color: #fff;
  line-height: 1.3;
  margin: 0;
}

.frise__parole-label em {
  font-style: italic;
  font-weight: 100;
}

.frise__parole-label strong {
  font-weight: 700;
}

/* ── Slider témoignages ── */

.frise__temoignages-slider {
  background: rgba(255, 255, 255, 0.12);
  border-left: 4px solid var(--color-rose);
  border-radius: 0 12px 12px 0;
  padding: 2em 2.5em;
  max-width: 520px;
  text-align: left;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  backdrop-filter: blur(6px);
}

.frise__media--left .frise__temoignages-slider {
  border-left: none;
  border-right: 4px solid var(--color-rose);
  border-radius: 12px 0 0 12px;
  transform: rotate(-1.5deg);
}

.frise__media--right .frise__temoignages-slider {
  transform: rotate(1.5deg);
}

.frise__temoignage-slide {
  display: none;
}

.frise__temoignage-slide--active {
  display: block;
}

.frise__temoignages-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 1em;
  padding-top: 0.8em;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.frise__temoignages-prev,
.frise__temoignages-next {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}

.frise__temoignages-prev:hover,
.frise__temoignages-next:hover {
  border-color: #E6105D;
  background: rgba(230, 16, 93, 0.15);
}

.frise__temoignages-count {
  font-family: var(--font-corps);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
}

/* ── 10 ans en bas ── */

.section-histoire__10ans-wrap {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 6vh;
}

.section-histoire__10ans {
  display: block;
  margin: 0 auto;
  width: clamp(200px, 25vw, 360px);
  height: auto;
}

/* ── Titre "La Famille" dans la carte communauté ── */

.frise__communaute-titre {
  font-family: 'Autumn Chant', cursive;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: #E6105D;
  font-weight: 400;
  line-height: 1;
  margin: 0 0 0.3em;
}

/* ── Citation sans auteur — plus sobre ── */

.frise__citation {
  background: rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(230, 16, 93, 0.6);
  border-radius: 0 10px 10px 0;
  padding: 1.5em 2em;
  max-width: 480px;
  text-align: left;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  margin: 0;
}

.frise__media--left .frise__citation {
  border-left: none;
  border-right: 3px solid rgba(230, 16, 93, 0.6);
  border-radius: 10px 0 0 10px;
  transform: rotate(-1deg);
}

.frise__media--right .frise__citation {
  transform: rotate(1deg);
}

.frise__citation .frise__citation-quote {
  font-style: italic;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.frise__citation .frise__citation-quote::before {
  content: '\201C';
  font-family: var(--font-titre);
  font-size: 2.5em;
  line-height: 0;
  vertical-align: -0.3em;
  margin-right: 0.06em;
  color: #E6105D;
  opacity: 0.5;
}

/* ══════════════════════════════════════════
   FRISE ZIGZAG — frise-z__*
   Items positionnés gauche / centre / droite
   Ligne diagonale pointillée entre chaque dot
   ══════════════════════════════════════════ */

/* Conteneur global */
.frise-z {
  position: relative;
  z-index: 2;
  padding: 4vh 0 6vh;
}

/* Chaque item = un bloc année positionné */
.frise-z__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 260px;
  margin-bottom: 16vh;
  text-align: center;
}

.frise-z__item--left   { margin-left: 8vw; }
.frise-z__item--center { margin-left: calc(50% - 130px); }
.frise-z__item--right  { margin-left: calc(100% - 8vw - 260px); }
.frise-z__item--last   { margin-bottom: 0; }

/* Ligne diagonale pointillée entre items via SVG inline généré en JS */
.frise-z__connector {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

/* Blob SVG derrière chaque date */
.frise-z__blob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(200px, 22vw, 340px);
  height: auto;
  pointer-events: none;
  z-index: 1;
  opacity: 0.9;
}

/* Bloc texte : année + desc */
.frise-z__bloc {
  position: relative;
  z-index: 2;
  text-align: center;
}

.frise-z__bloc:has(.frise-z__tooltip.is-open) {
  z-index: 400;
}

.frise-z__year {
  font-family: var(--font-titre);
  font-size: clamp(3.5rem, 6vw, 80px);
  color: #fff;
  font-weight: 400;
  line-height: 1;
  margin: 0 0 0.1em;
}

.frise-z__year--accent {
  color: #F29093;
}

.frise-z__desc {
  font-family: var(--font-corps);
  font-size: clamp(0.95rem, 1.2vw, 18px);
  line-height: 1.35;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 0.5em;
  max-width: 240px;
}

/* Dot rose */
.frise-z__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #E6105D;
  box-shadow: 0 0 10px rgba(230, 16, 93, 0.6);
  position: relative;
  z-index: 3;
  margin: 0.4em auto 0;
  flex-shrink: 0;
}

.frise-z__dot--big {
  width: 20px;
  height: 20px;
  box-shadow: 0 0 16px rgba(230, 16, 93, 0.8), 0 0 40px rgba(230, 16, 93, 0.3);
}

/* Lien Découvrir sous la desc */
.frise-z__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-corps);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.64px;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  border: none;
  padding: 8px 14px;
  margin-top: 0.8em;
  cursor: pointer;
  background: #E6105D;
  border-radius: 2px;
  transition: background 0.2s, opacity 0.2s;
}

.frise-z__link:hover {
  background: #c40d4f;
  opacity: 1;
}

/* Tooltip au clic du bloc */
.frise-z__tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: #fff;
  color: #222221;
  font-family: var(--font-corps);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  min-width: 260px;
  max-width: 320px;
  text-align: left;
  white-space: normal;
  overflow: hidden;
  pointer-events: none;
}

.frise-z__tooltip.is-open {
  display: block;
  pointer-events: auto;
}

.frise-z__tooltip__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.frise-z__tooltip__img--placeholder {
  background: linear-gradient(135deg, #033a47 0%, #009892 100%);
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frise-z__tooltip__img--placeholder span {
  font-family: var(--font-titre);
  font-size: 2rem;
  color: rgba(255,255,255,0.3);
  font-weight: 400;
}

.frise-z__tooltip__body {
  padding: 0.9em 1.1em 1em;
}

.frise-z__tooltip__title {
  font-family: var(--font-titre);
  font-size: 1rem;
  font-weight: 400;
  color: #033a47;
  margin: 0 0 0.4em;
  line-height: 1.2;
}

.frise-z__tooltip__text {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #555;
  margin: 0;
}

.frise-z__tooltip strong {
  color: #E6105D;
  font-weight: 700;
}

/* Médias flottants (vidéos, citations) */
.frise-z__media {
  position: absolute;
  top: 0;
  width: clamp(240px, 24vw, 380px);
  z-index: 2;
}

/* La carte communauté : remontée, décalée à droite */
.frise-z__media--communaute {
  top: auto;
  bottom: 10em;
  left: calc(100% + 8vw);
}

.frise-z__media--right { left: calc(100% + 14vw); }
.frise-z__media--left  { right: calc(100% + 14vw); }

.frise-z__media .section-videos__player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #0a1a25;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.frise-z__media--right .section-videos__player {
  transform: rotate(1.5deg);
}

.frise-z__media--left .section-videos__player {
  transform: rotate(-1.5deg);
}

.frise-z__media-label {
  font-family: var(--font-corps);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0.5em 0 0;
  text-align: left;
}

/* Placeholder making of 2026 */
.frise-z__media--makingof {
  width: clamp(200px, 22vw, 360px);
}
.frise-z__makingof-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1.5px dashed rgba(255,255,255,0.25);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transform: rotate(-1.5deg);
}
.frise-z__makingof-placeholder svg {
  width: 48px;
  height: 48px;
}
.frise-z__makingof-placeholder p {
  font-family: var(--font-corps);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
}

/* Carte communauté — fond blanc */
.frise-z__communaute-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.5em;
  text-align: left;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  position: relative;
}

.frise-z__communaute-number {
  font-family: var(--font-titre);
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  color: #222221;
  line-height: 1;
  margin: 0 0 0.4em;
}

.frise-z__communaute-number span { color: #E6105D; }

.frise-z__communaute-text {
  font-family: var(--font-corps);
  font-size: clamp(0.8rem, 0.9vw, 14px);
  line-height: 1.6;
  color: #555;
  margin: 0 0 1em;
}

.frise-z__communaute-link {
  font-family: var(--font-corps);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #E6105D;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1em;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.frise-z__communaute-link:hover { opacity: 0.7; }

.frise-z__communaute-label {
  font-family: var(--font-corps);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #aaa;
  margin: 0;
}

/* Citations */
.frise-z__slider {
  position: relative;
}

.frise-z__slide {
  display: none;
}

.frise-z__slide--active {
  display: block;
  height: 100%;
}

.frise-z__citation {
  background: rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(230, 16, 93, 0.5);
  border-radius: 0 8px 8px 0;
  padding: 1.2em 1.5em;
  text-align: left;
  margin: 0;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.frise-z__citation p {
  font-family: var(--font-corps);
  font-size: clamp(0.95rem, 1.2vw, 17px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  font-style: italic;
  margin: 0;
}

.frise-z__citation p::before {
  content: '\201C';
  font-family: var(--font-titre);
  font-size: 2em;
  line-height: 0;
  vertical-align: -0.25em;
  margin-right: 0.05em;
  color: #E6105D;
  opacity: 0.5;
}

/* Slider citations */
.frise-z__slider { position: relative; }
.frise-z__slide { display: none; }
.frise-z__slide--active { display: block; }

.frise-z__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0.8em;
  padding-left: 1.5em;
}

.frise-z__prev, .frise-z__next {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}

.frise-z__prev:hover, .frise-z__next:hover {
  border-color: #E6105D;
  background: rgba(230, 16, 93, 0.15);
}

.frise-z__count {
  font-family: var(--font-corps);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 1px;
}

/* SVG ligne diagonale entre dots — injecté par JS */
.frise-z__lines-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

/* ══ Ancienne frise-s (conservée pour compatibilité) ══ */
.frise-s {
  position: relative;
  z-index: 2;
  padding: 0 2vw;
}

/* Chaque rangée : 3 colonnes égales */
.frise-s__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
  margin-bottom: 4em;
  align-items: stretch;
}

.frise-s__row--last {
  margin-bottom: 0;
}

/* Ligne horizontale pointillée traversant les dots */
.frise-s__row::before {
  content: '';
  position: absolute;
  top: calc(var(--dot-line-top, 50%) - 0px);
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px dashed rgba(255, 255, 255, 0.25);
  z-index: 0;
  pointer-events: none;
}

/* Connecteur U entre deux rangées (vers le bas à droite pour row normale,
   vers le bas à gauche pour row--reverse) */
.frise-s__row:not(.frise-s__row--last)::after {
  content: '';
  position: absolute;
  bottom: -4em;
  right: -2vw;
  width: 4vw;
  height: calc(4em);
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-left: none;
  border-radius: 0 24px 24px 0;
  z-index: 0;
  pointer-events: none;
}

.frise-s__row--reverse:not(.frise-s__row--last)::after {
  right: auto;
  left: -2vw;
  border-left: 2px dashed rgba(255, 255, 255, 0.25);
  border-right: none;
  border-radius: 24px 0 0 24px;
}

/* Item individuel */
.frise-s__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0 1vw;
}

.frise-s__item--empty {
  pointer-events: none;
}

/* Dot rose sur la ligne */
.frise-s__dot-wrap {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  margin: 0.5em 0;
}

.frise-s__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #E6105D;
  box-shadow: 0 0 8px rgba(230, 16, 93, 0.55);
}

.frise-s__dot--big {
  width: 18px;
  height: 18px;
  box-shadow: 0 0 14px rgba(230, 16, 93, 0.7), 0 0 30px rgba(230, 16, 93, 0.3);
}

/* Contenu au-dessus et en dessous du dot */
.frise-s__content {
  width: 100%;
  text-align: center;
}

.frise-s__content--above {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 0.5em;
}

.frise-s__content--below {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0.5em;
}

/* Bloc année + tooltip */
.frise-s__year-wrap {
  width: 100%;
  text-align: center;
  position: relative;
}

.frise-s__year-wrap--above {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 0.4em;
}

.frise-s__year-wrap--below {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0.4em;
}

.frise-s__year {
  display: block;
  font-family: var(--font-titre);
  font-size: clamp(2rem, 3.5vw, 56px);
  color: #fff;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 0.1em;
}

.frise-s__year--accent {
  color: #F29093;
}

.frise-s__desc {
  font-family: var(--font-corps);
  font-size: clamp(0.8rem, 0.9vw, 14px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  margin: 0.2em 0 0;
}

.frise-s__media-label {
  font-family: var(--font-corps);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0.5em 0 0;
}

/* Tooltip hover */
.frise-s__tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: rgba(255, 255, 255, 0.97);
  color: #222221;
  font-family: var(--font-corps);
  font-size: 0.85rem;
  line-height: 1.55;
  padding: 1em 1.2em;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  min-width: 220px;
  max-width: 300px;
  text-align: left;
  white-space: normal;
  pointer-events: none;
}

.frise-s__year-wrap:hover .frise-s__tooltip {
  display: block;
}

.frise-s__tooltip strong {
  color: #E6105D;
  font-weight: 700;
}

/* Vidéo dans la frise serpentin */
.frise-s__content .section-videos__player {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #0a1a25;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  margin: 0 auto;
}

/* Carte communauté */
.frise-s__communaute-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 1.5em;
  max-width: 280px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  margin: 0 auto;
}

.frise-s__communaute-titre {
  font-family: 'Autumn Chant', cursive;
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  color: #E6105D;
  font-weight: 400;
  line-height: 1;
  margin: 0 0 0.2em;
}

.frise-s__communaute-number {
  font-family: var(--font-titre);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  color: #fff;
  line-height: 1;
  margin: 0 0 0.4em;
}

.frise-s__communaute-number span {
  color: #F29093;
}

.frise-s__communaute-text {
  font-family: var(--font-corps);
  font-size: clamp(0.8rem, 0.9vw, 14px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

/* Citation */
.frise-s__citation {
  background: rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(230, 16, 93, 0.5);
  border-radius: 0 8px 8px 0;
  padding: 1.2em 1.5em;
  max-width: 300px;
  text-align: left;
  margin: 0 auto;
}

.frise-s__citation p {
  font-family: var(--font-corps);
  font-size: clamp(0.85rem, 1vw, 15px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  font-style: italic;
  margin: 0;
}

.frise-s__citation p::before {
  content: '\201C';
  font-family: var(--font-titre);
  font-size: 2em;
  line-height: 0;
  vertical-align: -0.25em;
  margin-right: 0.05em;
  color: #E6105D;
  opacity: 0.5;
}

.frise-s__citation--highlight {
  border-left-color: #F29093;
  border-left-width: 4px;
  background: rgba(242, 144, 147, 0.1);
}

/* Slider citations */
.frise-s__slider {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.frise-s__slide {
  display: none;
}

.frise-s__slide--active {
  display: block;
}

.frise-s__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 0.8em;
}

.frise-s__prev,
.frise-s__next {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  flex-shrink: 0;
}

.frise-s__prev:hover,
.frise-s__next:hover {
  border-color: #E6105D;
  background: rgba(230, 16, 93, 0.15);
}

.frise-s__count {
  font-family: var(--font-corps);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 1px;
}

/* ══════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════ */

@media (max-width: 900px) {
  .section-histoire__edito {
    grid-template-columns: 1fr;
    gap: 4vh;
  }

  .section-histoire__edito-text {
    max-width: 100%;
  }

  .section-histoire__edito-media .section-videos__player {
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .section-histoire {
    padding: 5vh 4vw 4vh;
  }

  .frise__row {
    grid-template-columns: 30px 1fr;
    min-height: auto;
    margin-bottom: 3em;
  }

  /* Reset order for mobile — everything stacks */
  .frise__row--reverse .frise__media,
  .frise__row--reverse .frise__center,
  .frise__row--reverse .frise__year-block {
    order: unset;
  }

  /* Mobile : tout empilé, la colonne centre à gauche */
  .frise__media {
    display: none;
  }

  .frise__media--left,
  .frise__media--right {
    grid-column: 2;
    display: block;
    padding: 0 0 1em;
    align-items: unset;
  }

  .frise__media--left .section-videos__player,
  .frise__media--right .section-videos__player,
  .frise__media--left .frise__communaute-card,
  .frise__media--right .frise__communaute-card,
  .frise__media--left .frise__citation,
  .frise__media--right .frise__citation,
  .frise__media--left .frise__video-placeholder,
  .frise__media--right .frise__video-placeholder {
    transform: none;
  }

  .frise__year-block {
    grid-column: 2;
    text-align: left !important;
    padding: 0;
  }

  .frise__year-block--left .frise__desc,
  .frise__year-block--left .frise__link {
    margin-left: 0;
    float: none;
  }

  .frise__center {
    grid-column: 1;
    grid-row: 1 / -1;
  }

  .section-histoire__deco {
    display: none;
  }
}


/* ==========================================================================
   MOBILE frise-z — max-width: 768px
   ========================================================================== */
@media (max-width: 768px) {

  .section-histoire__deco--visage2-scroll,
  .section-histoire__deco--visage-scroll {
    display: none !important;
  }

  /* Frise : colonne centrée + trait continu */
  .frise-z {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
  }

  .frise-z::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    border-left: 2px dashed rgba(255, 255, 255, 0.5);
    z-index: 0;
  }

  /* Items : largeur 80vw, centrés */
  .frise-z__item,
  .frise-z__item--left,
  .frise-z__item--center,
  .frise-z__item--right {
    width: 80vw;
    margin-left: 0;
    margin-bottom: 0;
    align-items: center;
  }

  /* Blob SVG : centré derrière le texte de l'année via le bloc */
  .frise-z__blob {
    display: none !important;
  }

  /* Blob derrière l'année via pseudo-element sur le bloc */
  .frise-z__bloc::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 160px;
    background: rgba(0, 152, 146, 0.2);
    clip-path: polygon(55% 0%, 90% 10%, 100% 50%, 85% 90%, 50% 100%, 10% 88%, 0% 50%, 15% 12%);
    z-index: 0;
    pointer-events: none;
  }

  /* Bloc texte centré */
  .frise-z__bloc {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
  }

  .frise-z__year,
  .frise-z__desc {
    position: relative;
    z-index: 1;
  }

  /* Dot : au-dessus de l'année, espacé du média précédent */
  .frise-z__dot {
    position: relative !important;
    left: auto !important;
    transform: none !important;
    order: -1;
    margin: 3vh auto 0.4em !important;
    background: #E6105D !important;
    box-shadow: 0 0 10px rgba(230,16,93,0.6) !important;
    z-index: 2;
  }

  /* Boutons masqués */
  .frise-z__link {
    display: none;
  }

  /* Connecteurs masqués — SVG inline et canvas */
  .frise-z__connector,
  .frise-z__connector * {
    display: none !important;
  }

  /* Masquer aussi les SVG de connexion générés en JS */
  .frise-z > svg {
    display: none !important;
  }

  /* Tooltips : statiques, pleine largeur du bloc */
  .frise-z__tooltip {
    display: block !important;
    position: static !important;
    width: 100% !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    margin-top: 0.8em;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  }

  /* Médias : aplat rose pleine largeur, après le dot */
  .frise-z__media,
  .frise-z__media--left,
  .frise-z__media--right,
  .frise-z__media--communaute,
  .frise-z__media--makingof {
    order: 1;
    position: relative !important;
    top: auto !important; left: auto !important;
    right: auto !important; bottom: auto !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    margin-top: 1.5em;
    margin-bottom: 0;
    background: #E6105D;
    padding: 1.5em 5vw;
    box-sizing: border-box;
  }

  .frise-z__media .section-videos__player,
  .frise-z__media--right .section-videos__player,
  .frise-z__media--left .section-videos__player {
    transform: none !important;
    width: 100%;
  }

  .frise-z__media-label {
    color: rgba(255,255,255,0.8);
  }

  /* Espace avant les années qui suivent un média */
  .frise-z__item + .frise-z__item {
    margin-top: 2vh;
  }
}
