/* ══════════════════════════════════════════════════════════════
   QUATRE EXPERTISE PAGE — EXPERTISE.HTML SPECIFIC STYLES
   ═════════════════════════════════════════════════════════════ */

html,
body {
  /* Gris de base — transition vers #fff pilotée par JS au scroll de la section parallaxe */
  background: var(--bg);
  color: #0f0f0f;
}

/* ─── HERO SCROLL-PINNED ─── */
.exp-hero {
  position: relative;
  height: 250vh;
  background: transparent;
}

.exp-hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  /* nécessaire pour que les .exp-float-group absolute se positionnent ici */
  isolation: isolate;
}

/* Le contenu texte passe devant les images */
.exp-hero-inner {
  position: relative;
  z-index: 2;
}

.exp-hero-inner {
  max-width: none;
  width: 100%;
  margin-inline: auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: center;
}

.exp-hero-left {
  grid-column: 1 / 4;
  font-family: "Inter", sans-serif;
  font-size: 20px;
  line-height: 28px;
  color: #0f0f0f;
}

/* Wave / fade-in sur chaque mot du texte gauche */
@keyframes hwIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hw {
  display: inline-block;
  opacity: 0;
  animation: hwIn 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: calc(0.2s + var(--i) * 0.09s);
}

.exp-hero-right {
  grid-column: 6 / -1;
  display: flex;
  flex-direction: column;
  gap: 160px;
  will-change: transform;
}

.exp-name {
  font-family: "Spectral", Georgia, serif;
  font-size: var(--headline-xl-size);
  line-height: var(--headline-xl-lh);
  font-weight: 400;
  color: #0f0f0f;
  opacity: 0;
}

/* ─── FLOATING IMAGE GROUPS (dans exp-hero-sticky) ─── */

/* Chaque groupe occupe tout le sticky viewport.
   La visibilité est gérée par les translate des images enfants (--sv),
   pas par l'opacité du groupe. */
.exp-float-group {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Image individuelle.
   Deux propriétés de transform INDÉPENDANTES :
   • translate : slide directionnel au changement de groupe
     → JS gère la CSS transition per-image (durée / easing uniques)
     → pas de transition sur transform = le parallaxe est toujours instantané
   • transform  : parallaxe scroll (--py) + souris (--mx / --my)
     → JS met à jour chaque frame SANS transition              */
.exp-float-img {
  position: absolute;
  border-radius: 10px;
  overflow: hidden;
  background: #d8d8d8;
  translate: 0px var(--sv, 0px);           /* slide viewport          */
  transform: translate(
    calc(var(--mx, 0px) + var(--dx, 0px)),
    calc(var(--py, 0px) + var(--my, 0px) + var(--dy, 0px))
  );
  will-change: transform, translate;
}

/* Couches de profondeur — z-index + depth-of-field par data-depth */
.exp-float-img[data-depth="-1"] {
  z-index: 1;
  filter: blur(4.5px) saturate(0.75) brightness(0.96);
}
.exp-float-img[data-depth="1"]  {
  z-index: 2;
  /* plan médian : net, neutre */
}
.exp-float-img[data-depth="2"]  {
  z-index: 3;
}

/* Image intérieure : couvre le wrapper, pas d'animation propre
   (le flottement organique est géré par RAF JS sur le wrapper via --dx/--dy) */
.exp-float-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.06);   /* léger sur-zoom pour masquer les bords lors du drift */
}

/* Ratios d'image */
.r-16-9 { aspect-ratio: 16 / 9; }
.r-9-16 { aspect-ratio: 9 / 16; }
.r-4-3  { aspect-ratio: 4 / 3;  }
.r-4-5  { aspect-ratio: 4 / 5;  }
.r-1-1  { aspect-ratio: 1 / 1;  }

/* Plan arrière : conservé pour rétrocompatibilité éventuelle */
.flt-blur { /* géré par data-depth="-1" */ }

/* ─── JUMP NAV ─── */
.exp-jump {
  position: sticky;
  top: 76px;
  z-index: 50;
  mix-blend-mode: difference;
  color: #ffffff;
}

.exp-jump-inner {
  max-width: none;
  width: 100%;
  margin-inline: auto;
  padding: 16px var(--pad-x);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: center;
}

/* Col 1 : vide — correspond à exp-col-img (cols 1–3) */
.exp-jump-col1 {
  grid-column: 1 / 4;
}

/* Label + liens groupés dans cols 4–12, flush à droite */
.exp-jump-right {
  grid-column: 4 / 13;
  display: flex;
  align-items: center;
  gap: 32px;
  justify-self: end;
}

.exp-jump-label {
  font-family: "Inter", monospace;
  font-size: 12px;
  line-height: 16px;
  color: #ffffff;
  white-space: nowrap;
}

.exp-jump-links {
  display: flex;
  gap: 24px;
}

.exp-jump-links a {
  font-family: "GTFlexaMono", monospace;
  font-size: 12px;
  line-height: 16px;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.75;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.exp-jump-links a:hover {
  opacity: 1;
}

/* ─── IMAGE STICKY BAS-GAUCHE (contenue dans #expSectionsArea) ─── */

/* Colonne fantôme : couvre toute la hauteur de #expSectionsArea */
#expSectionsArea {
  position: relative;
  padding-bottom: 24px;
  background: transparent;
}

.exp-img-sticky-col {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pad-x);
  /* Largeur = 3/12 de la grille : (100% - 2×pad-x - 2×24px gap) / 4 */
  width: calc((100% - var(--pad-x) * 2 - 48px) / 4);
  pointer-events: none;
  z-index: 40;
}

/* L'image colle en bas du viewport, se fait pousser par le bord bas de la colonne */
.exp-fixed-img {
  position: sticky;
  top: calc(100vh - 192px - 32px); /* valeur initiale, JS la pilote ensuite */
  width: 192px;
  height: 192px;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  margin-bottom: 32px; /* espace entre l'image et le début de la CTA */
  /* Masqué par défaut — visible quand la zone entre dans le viewport */
  opacity: 0;
  transition: opacity 0.4s ease;
}

.exp-fixed-img.is-area-visible {
  opacity: 1;
}

.exp-fixed-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.exp-fixed-img img.is-active {
  opacity: 1;
}

/* ─── EXPERTISE SECTIONS ─── */
.exp-section-wrap {
  min-height: 100vh;
}

/* Grille 12 colonnes identique à la hero — même gap, même fr unit */
.exp-section {
  padding: clamp(48px, 3.7vw, 80px) var(--pad-x);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: start;
  /* Les colonnes doivent s'étirer pour que le sticky du titre ait de l'espace */
}


/* Colonne image : cols 1–3, spacer invisible */
.exp-col-img {
  grid-column: 1 / 4;
  visibility: hidden;
}

/* Titre : cols 4–5 (2 cols) — s'étire sur la hauteur totale de la section */
.exp-col-title {
  grid-column: 4 / 6;
  align-self: stretch;
}

/* Titre sticky au centre vertical du viewport */
.exp-col-title h2 {
  font-size: var(--headline-lg-size);
  line-height: var(--headline-lg-lh);
  font-weight: 400;
  position: sticky;
  top: 50vh;
  transform: translateY(-50%);
  /* opacity gérée par les .exp-char — pas de transition sur le h2 lui-même */
}

/* ── Caractères individuels pour l'effet vague ── */

/* Wrapper par mot : empêche toute coupure en milieu de mot */
.exp-word {
  display: inline-block;
  white-space: nowrap;
}

.exp-char {
  display: inline-block;
  opacity: 0;                /* invisible par défaut, Web Animations gère l'état */
  will-change: opacity, transform;
}

/* Espace inter-mots : inline, toujours visible */
.exp-space {
  display: inline;
}

/* Contenu : cols 6–12 (7 cols) */
.exp-col-content {
  grid-column: 6 / 13;
}

.exp-description {
  font-family: "Spectral", Georgia, serif;
  font-size: var(--headline-lg-size);
  line-height: var(--headline-lg-lh);
  font-weight: 400;
  margin-bottom: 40px;
}

.exp-services {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.exp-services li {
  padding: 12px 0;
  border-top: 1px solid #b5b5b5;
  font-size: 16px;
  line-height: 24px;
  color: #0f0f0f;
}

.exp-services li:first-child {
  border-top: none;
}

.exp-services li:last-child {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 1100px) {
  .exp-section {
    grid-template-columns: 3fr 9fr; /* image spacer | titre+contenu empilés */
  }

  .exp-col-title {
    grid-column: 2;
    grid-row: 1;
  }

  .exp-col-content {
    grid-column: 2;
    grid-row: 2;
  }

  .exp-jump-inner {
    grid-template-columns: 3fr 2fr 7fr;
  }
}

@media (max-width: 820px) {
  .exp-hero-inner {
    gap: 48px;
  }

  .exp-hero-left {
    width: auto;
    font-size: 17px;
  }

  .exp-name {
    font-size: 36px;
    line-height: 44px;
  }

  .exp-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .exp-col-img {
    display: none;
  }

  .exp-col-title,
  .exp-col-content {
    grid-column: auto;
    grid-row: auto;
  }

  .exp-col-title h2 {
    position: static;
    transform: none;
  }

  .exp-description {
    font-size: 24px;
    line-height: 32px;
  }

  .exp-jump-inner {
    grid-template-columns: 1fr;
  }

  .exp-jump-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(14px);
    padding: 16px 24px 24px;
    color: #ffffff;
  }

  .nav-links a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-links.is-open {
    display: flex;
  }
}
