/* ══════════════════════════════════════════════════════════════
   QUATRE V2 — EXPERTISE (maquette 22:2056)
   Cover orbe pleine hauteur + intro + déclaration + logos + cases
   + réflexions + autres expertises + grille photos
   ═════════════════════════════════════════════════════════════ */

/* ── Cover : la scène de l'orbe (le concept illustre l'expertise) ── */
.hero--exp {
  background-color: #0c0b0b;
  align-items: flex-end;
  justify-content: center;
}

.exp-orb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* shader WebGL : douceur + grain gérés dans le fragment, pas de blur CSS
     (il écraserait le grain argentique et le contraste) */
  filter: saturate(1.04);
}

.exp-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0) 55%, var(--night) 100%);
}

.exp-hero-claim {
  position: relative;
  z-index: 2;
  width: min(var(--content-w), calc(100% - 2 * var(--pad-x)));
  padding-bottom: clamp(40px, 12vh, 164px);
  text-align: center;
  color: var(--white);
}

.exp-title {
  font-size: clamp(40px, 4.45vw, 77px);
  line-height: 1;
}

/* ── Corps ── */
.exp-body {
  background: linear-gradient(180deg, rgba(26, 26, 26, 0) 0%, var(--night) 12%);
  color: var(--white);
  padding-bottom: var(--section-gap);
}

.exp-intro {
  padding: calc(var(--section-gap) * 1.1) 0 0;
}

.exp-lead {
  width: min(var(--content-w), calc(100% - 2 * var(--pad-x)));
  margin-inline: auto;
  text-align: center;
  font-size: clamp(16px, 1.3vw, 22px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.exp-statement {
  padding: calc(var(--section-gap) * 1.2) 0;
}

.exp-statement p {
  width: min(var(--content-w), calc(100% - 2 * var(--pad-x)));
  margin-inline: auto;
  text-align: center;
  font-size: clamp(28px, 2.8vw, 48px);
  line-height: 1.35;
}

/* ── Marquee logos clients ── */
.exp-logos {
  overflow: hidden;
  padding: 64px 0;
  /* fondu sur les extrémités : les logos apparaissent/disparaissent en douceur */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 clamp(48px, 8vw, 160px), #000 calc(100% - clamp(48px, 8vw, 160px)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 clamp(48px, 8vw, 160px), #000 calc(100% - clamp(48px, 8vw, 160px)), transparent 100%);
}

.exp-logos-track {
  display: flex;
  align-items: center;
  gap: clamp(56px, 5.8vw, 100px);
  width: max-content;
  animation: exp-marquee 46s linear infinite;
}

@keyframes exp-marquee {
  to { transform: translateX(-50%); }
}

/* Les fichiers logos sont des cellules 200×100 (maquette) : on les
   affiche à leur échelle — 100px de haut à 1728, fluide ailleurs */
.exp-logo {
  flex: 0 0 auto;
  height: clamp(44px, 4.6vw, 80px);
  display: flex;
  align-items: center;
}

.exp-logo img {
  height: 100%;
  width: auto;
  max-width: clamp(100px, 9.3vw, 160px);
  object-fit: contain;
}

.exp-logo span {
  font-family: var(--font-mono);
  font-size: clamp(15px, 1.2vw, 20px);
  letter-spacing: 0.12em;
  color: var(--white);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .exp-logos-track { animation: none; }
}

/* ── Sections à cartes (cases / réflexions / autres) ── */
.exp-section {
  width: min(var(--wide-w), calc(100% - 2 * var(--pad-x)));
  margin-inline: auto;
  padding-block: calc(var(--section-gap) * 0.7);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 2.8vw, 40px);
}

.exp-section-title {
  font-size: var(--title-size);
  line-height: var(--title-lh);
}

.exp-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}

/* Tiles cases (maquette 22:2066) : format portrait, info en bas */
.exp-case {
  position: relative;
  display: block;
  aspect-ratio: 455 / 680;
  border-radius: var(--radius-tile);
  overflow: hidden;
  transform: translateZ(0);
  isolation: isolate;
}

.exp-case-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s var(--ease-out);
}

.exp-case:hover .exp-case-media {
  transform: scale(1.05);
}

.exp-case-info {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 14px;
  padding: clamp(20px, 3.3vw, 64px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.55) 100%);
  color: var(--white);
}

.exp-case-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.3vw, 40px);
  line-height: 1.15;
}

.exp-case .pill-btn {
  pointer-events: none;
  padding: 12px 20px;
  font-size: 14px;
}

/* ── Réflexions / insights (maquette 22:2354) ──
   Titre + bouton « voir tous » sur une même ligne, puis une vedette
   (image haut + texte bas) et une colonne de lignes d'articles
   (image carrée à gauche, texte à droite). ── */
.exp-insights-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  margin-bottom: clamp(24px, 3vw, 48px);
}

.exp-insights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
  /* proportions Figma (1398×833) → la hauteur découle de la largeur, MAIS
     on plafonne à la hauteur d'écran pour que le bloc tienne dans un
     viewport (sinon les covers paraissent énormes, façon Rockstar). */
  aspect-ratio: 1398 / 833;
  max-height: 62vh;
}

.exp-feat,
.exp-arts {
  min-width: 0;
  min-height: 0;
}

.exp-feat {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-tile);
  overflow: hidden;
  background-color: #0c0b0b;
  color: var(--white);
}

.exp-feat-img {
  /* remplit la hauteur restante de la tuile (le bloc est plafonné en vh) —
     pas d'aspect-ratio figé qui déborderait */
  flex: 1;
  min-height: 0;
  background-color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cover générée (DA « UX law ») : le motif SVG centré sur le fond accent */
.cov-svg {
  display: block;
  width: 46%;
  height: auto;
}

.exp-art-img .cov-svg {
  width: 62%;
}

.cov-ln {
  fill: none;
  stroke: #141414;
  stroke-width: 5.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exp-feat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 2.3vw, 32px);
}

.exp-feat-title {
  font-size: clamp(24px, 2.1vw, 36px);
  line-height: 1.2;
  max-width: 22ch;
}

.exp-arts {
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
}

.exp-art {
  flex: 1;
  min-height: 0;
  display: flex;
  border-radius: var(--radius-tile);
  overflow: hidden;
  background-color: #0c0b0b;
  color: var(--white);
  transition: transform 0.6s var(--ease-out);
}

.exp-art:hover {
  transform: translateY(-4px);
}

.exp-art-img {
  flex: none;
  height: 100%;
  aspect-ratio: 1;
  background-color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}

.exp-art-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 1.8vw, 32px);
}

.exp-art-title {
  font-size: clamp(17px, 1.45vw, 24px);
  line-height: 1.25;
}

/* Date : poussée en bas du bloc (maquette 22:2354) */
.exp-art-date {
  margin-top: auto;
  padding-top: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

/* Bouton ghost « voir tous les articles » */
.exp-all-btn {
  flex: none;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--white);
}

.exp-all-btn:hover,
.exp-all-btn:focus-visible {
  background-color: var(--white);
  border-color: var(--white);
  color: var(--black);
}

/* ── Bande horizontale 16/9 (photo-wall.js, sens opposés) ──
   Occupe la fenêtre (.exp-photos-window) : rangées empilées qui remplissent
   la hauteur, images height:100% → largeur pilotée par le ratio 16/9. */
.exp-photos-window .exp-hstrip {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
}

.hstrip-row {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: var(--gutter);
  width: max-content;
  will-change: transform;
}

.hstrip-img {
  flex: none;
  height: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-tile);
  background-size: cover;
  background-position: center;
}

/* ── Grille photos (maquette 22:2137 : 4 colonnes en quinconce) ── */
.exp-photos {
  width: calc(100% - 48px);
  margin-inline: auto;
  padding-block: calc(var(--section-gap) * 0.7);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
  align-items: start;
}

.exp-photo-col {
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
}

/* ── Bloc mur photos : fenêtre marquee + surcouche texte/CTA/play-pause ── */
.exp-photos-block {
  position: relative;
  width: calc(100% - 48px);
  margin-inline: auto;
  padding-block: calc(var(--section-gap) * 0.7);
}

.exp-photos-window {
  position: relative;
  height: clamp(560px, 64vw, 840px);
  overflow: hidden;
  border-radius: var(--radius-tile);
}

/* Le mur occupe toute la fenêtre */
.exp-photos-window .exp-photos {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding-block: 0;
  align-items: stretch;
}

/* Marquee : chaque colonne clippe une piste dupliquée qui défile (sens
   alternés). Bords nets (clip sur la fenêtre arrondie), pas de fondu. */
.exp-photos.is-marquee .exp-photo-col {
  height: 100%;
  overflow: hidden;
}

.exp-photos.is-marquee .exp-photo-track {
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
  will-change: transform;
}

/* Scrim en VAGUE : une courbe en S organique couvre le bas-gauche (où se
   pose le texte) et laisse un maximum d'image nette ailleurs. L'overlay
   FLOUTE + assombrit doucement le fond ; le bord de la vague est feutré
   (feGaussianBlur dans le masque) → transition douce, pas de ligne dure. */
.exp-photos-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* dégradé sombre en fondu (soft, façon Rockstar) — assombrit sans
     flouter l'image ; découpé par la vague feutrée pour ne couvrir que
     le bas-gauche (max d'image visible ailleurs) */
  background: linear-gradient(0deg,
    rgba(26, 26, 26, 0.98) 0%,
    rgba(26, 26, 26, 0.72) 22%,
    rgba(26, 26, 26, 0.34) 44%,
    rgba(26, 26, 26, 0) 66%);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 400' preserveAspectRatio='none'%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='30'/%3E%3C/filter%3E%3Cpath filter='url(%23b)' fill='%23fff' d='M-80 480 L-80 220 C170 220 320 340 600 340 L1080 340 L1080 480 Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 400' preserveAspectRatio='none'%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='30'/%3E%3C/filter%3E%3Cpath filter='url(%23b)' fill='%23fff' d='M-80 480 L-80 220 C170 220 320 340 600 340 L1080 340 L1080 480 Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Texte + CTA en bas à gauche */
.exp-photos-text {
  position: absolute;
  left: clamp(20px, 3vw, 52px);
  bottom: clamp(20px, 3vw, 52px);
  z-index: 2;
  max-width: min(460px, 78%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(14px, 1.4vw, 20px);
  color: var(--white);
}

.exp-photos-title {
  font-size: var(--title-size);
  line-height: 1.08;
  /* lignes équilibrées → plus de mot orphelin en bas (« projets » seul) */
  text-wrap: balance;
}

.exp-photos-cap {
  max-width: 38ch;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.5;
  /* évite la dernière ligne à un seul mot (« secteur. ») */
  text-wrap: pretty;
}

.exp-photos-cta {
  margin-top: 4px;
}

/* Bouton play / pause en haut à droite : composant DS .q-glass/.q-toggle
   (css/components.css) — ici position + taille contextuelle (plus grand
   que le badge des slots projet) + le scale au hover propre au module */
.exp-photos-toggle {
  position: absolute;
  top: clamp(16px, 1.9vw, 28px);
  right: clamp(16px, 1.9vw, 28px);
  z-index: 2;
  width: clamp(42px, 3vw, 54px);
}

.exp-photos-toggle:hover,
.exp-photos-toggle:focus-visible {
  transform: scale(1.06);
}

.exp-photo {
  border-radius: var(--radius-tile);
  background-size: cover;
  background-position: center;
  aspect-ratio: 408 / 416;
}

.exp-photo--tall {
  aspect-ratio: 408 / 632;
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .exp-row {
    grid-template-columns: 1fr;
  }

  .exp-insights-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .exp-insights {
    grid-template-columns: 1fr;
    aspect-ratio: auto;
    max-height: none;
  }

  .exp-feat,
  .exp-arts {
    width: 100%;
  }

  .exp-art-img {
    height: auto;
    align-self: stretch;
    width: 38%;
    aspect-ratio: auto;
  }

  .exp-photos-block {
    width: calc(100% - 2 * var(--pad-x));
  }

  .exp-photos {
    grid-template-columns: repeat(2, 1fr);
  }

  .exp-photos-window {
    height: clamp(440px, 96vw, 620px);
  }

  .exp-photo-col:nth-child(n + 3) {
    display: none;
  }

  .exp-photos-text {
    max-width: none;
    right: clamp(20px, 3vw, 52px);
  }

  .exp-title {
    font-size: clamp(34px, 10vw, 48px);
  }
}
