/* ============ Tokens ============ */
:root {
  --navy-950: #050c1c;
  --navy-900: #0a1630;
  --navy-800: #10214a;
  --navy-700: #1b3166;
  --blue: #2f5bff;
  --cream: #eee8dc;
  --sand: #d6b47e;

  --bg: var(--navy-900);
  --fg: var(--cream);
  --fg-muted: rgba(238, 232, 220, 0.6);
  --line: rgba(238, 232, 220, 0.14);
  --accent: var(--sand);

  /* Dégradés des titres : discrets, dans la palette du site */
  --grad-title: linear-gradient(95deg, #f7f2e8 0%, #e6e8f1 45%, #aec2f2 100%);
  --grad-accent: linear-gradient(95deg, #f1dbb0 0%, #d6b47e 55%, #b98e57 100%);

  /* Police principale : SF Pro Display (Inter Tight en secours si elle n'est pas installée) */
  --serif: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter Tight", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter Tight", system-ui, sans-serif;
  --display-weight: 600;

  /* Échelle typographique (ratio ~1.33)
     1. Titre principal   --fs-display
     2. Titres de section --fs-h2
     3. Texte d'accroche  --fs-lead
     4. Sous-titres       --fs-h3
     Corps 16px, petits textes 13-15px, étiquettes 12px */
  --fs-display: clamp(2.5rem, 5.2vw, 5rem);
  --fs-h2: clamp(2rem, 3.4vw, 3.25rem);
  --fs-lead: clamp(1.375rem, 2.2vw, 2.125rem);
  --fs-h3: clamp(1.25rem, 1.7vw, 1.625rem);

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-light {
  --bg: var(--cream);
  --fg: var(--navy-900);
  --fg-muted: rgba(10, 22, 48, 0.62);
  --line: rgba(10, 22, 48, 0.16);
  --accent: var(--navy-700);
  --grad-title: linear-gradient(95deg, #0a1630 0%, #1b3166 55%, #2f5bff 100%);
  --grad-accent: linear-gradient(95deg, #1b3166 0%, #2f5bff 100%);
}

/* ============ Base ============ */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.9s var(--ease), color 0.9s var(--ease);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: normal; color: var(--accent); transition: color 0.9s var(--ease); }
img { display: block; max-width: 100%; }
::selection { background: var(--sand); color: var(--navy-900); }

.section-title, .hero-title, .loader-inner, .nav-logo, .reel-bigtype, .reel-side-title,
.manifesto-text, .service-name, .step-card h3, .marquee-track, .contact-mail, .project-title {
  font-family: var(--serif);
  font-weight: var(--display-weight);
}

.label {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.muted { color: var(--fg-muted); }

.section-title {
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

/* Texte en dégradé */
.grad, .grad-accent {
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.grad { background-image: var(--grad-title); }
.grad-accent { background-image: var(--grad-accent); }

/* ============ Boutons ============ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: translate 0.4s var(--ease), background-color 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.btn:hover { translate: 0 -2px; }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-solid {
  background: var(--cream);
  color: var(--navy-900);
  box-shadow: 0 10px 30px -12px rgba(214, 180, 126, 0.55), inset 0 -2px 0 rgba(10, 22, 48, 0.08);
}
.btn-solid:hover { background: #fff; }
body.is-light .btn-solid { background: var(--navy-900); color: var(--cream); }
.btn-glass { color: var(--cream); --glass-radius: 999px; }

/* ============ Grain ============ */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -2%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ============ Loader ============ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--navy-950);
  color: var(--cream);
  display: flex;
  align-items: flex-end;
  padding: var(--gutter);
}
.loader-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: var(--fs-h3);
  line-height: 1;
  letter-spacing: -0.015em;
}
.loader-count { font-variant-numeric: tabular-nums; color: var(--sand); }
.reduced .loader { display: none; }

/* ============ Curseur ============ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 95;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--cream);
  pointer-events: none;
  mix-blend-mode: difference;
  display: grid;
  place-items: center;
  transition: width 0.4s var(--ease), height 0.4s var(--ease), margin 0.4s var(--ease);
  opacity: 0;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-big { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.cursor-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000;
  opacity: 0;
  transition: opacity 0.3s;
}
.cursor.is-big .cursor-label { opacity: 1; }
@media (pointer: coarse) { .cursor { display: none; } }

/* ============ Header : capsule flottante ============ */
.nav {
  position: fixed;
  top: 14px; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.nav-bar {
  position: relative;
  pointer-events: auto;
  width: min(1000px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 7px 7px 7px 22px;
  --glass-radius: 999px;
  transition: translate 0.6s var(--ease);
}
.nav.is-hidden .nav-bar { translate: 0 -140%; }
.nav-logo { font-size: 18px; line-height: 1; letter-spacing: -0.02em; }
.nav-logo-dot { color: var(--sand); }
.nav-links { display: flex; gap: 28px; font-size: 14px; }
.nav-links a, .footer-links a, .back-top {
  position: relative;
  color: var(--fg-muted);
  transition: color 0.3s;
}
.nav-links a::after, .footer-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav-links a:hover, .footer-links a:hover, .back-top:hover { color: var(--fg); }
.nav-links a:hover::after, .footer-links a:hover::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: max(100svh, 640px);
  display: grid;
  place-items: center;
  padding: 120px var(--gutter) 96px;
  overflow: hidden;
}

/* Mur de réels */
.hero-wall {
  position: absolute;
  inset: -12% -20%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  will-change: transform, opacity;
}
.wall-tilt {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.4vw, 20px);
  transform: rotateX(16deg) rotateZ(-7deg);
  translate: 0 var(--wall-y, 0px);
  scale: var(--wall-s, 1);
  transform-style: preserve-3d;
}
.wall-row { overflow: visible; }
.wall-track {
  display: flex;
  gap: clamp(12px, 1.4vw, 20px);
  width: max-content;
  animation: wall-left 70s linear infinite;
}
.wall-row[data-dir="right"] .wall-track { animation-name: wall-right; animation-duration: 80s; }
.wall-row:nth-child(3) .wall-track { animation-duration: 90s; }
@keyframes wall-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes wall-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.wall-card {
  position: relative;
  flex: 0 0 auto;
  width: clamp(110px, 10.5vw, 170px);
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card-bg, linear-gradient(160deg, #1b3166, #0c1a3a));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}
.wall-card:nth-child(6n + 1) { --card-bg: linear-gradient(165deg, #2a4fa8 0%, #10214a 70%); }
.wall-card:nth-child(6n + 2) { --card-bg: linear-gradient(165deg, #142a5c 0%, #0a1630 80%); }
.wall-card:nth-child(6n + 3) { --card-bg: linear-gradient(165deg, #7a6545 0%, #1b2442 75%); }
.wall-card:nth-child(6n + 4) { --card-bg: linear-gradient(165deg, #2f5bff 0%, #13265a 70%); }
.wall-card:nth-child(6n + 5) { --card-bg: linear-gradient(165deg, #1e3a7a 0%, #0b1530 80%); }
.wall-card:nth-child(6n + 6) { --card-bg: linear-gradient(165deg, #3d5f9e 0%, #121f42 75%); }
.wall-card img, .wall-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wall-card .wc-play {
  position: absolute;
  left: 50%; top: 50%;
  width: 34px; height: 34px;
  translate: -50% -50%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.wall-card .wc-play::after {
  content: "";
  position: absolute;
  left: 13px; top: 10px;
  border-left: 11px solid rgba(255, 255, 255, 0.75);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
.wall-card .wc-label {
  position: absolute;
  left: 10px; bottom: 10px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.wall-card.has-img .wc-play, .wall-card.has-img .wc-label { display: none; }

/* Voile de lisibilité au-dessus du mur */
.hero-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 70% at 32% 52%, rgba(10, 22, 48, 0.93) 0%, rgba(10, 22, 48, 0.74) 50%, rgba(10, 22, 48, 0.3) 100%),
    linear-gradient(to bottom, var(--navy-900) 0%, rgba(10, 22, 48, 0) 22%, rgba(10, 22, 48, 0) 70%, var(--navy-900) 100%);
}

/* Deux colonnes : le texte à gauche, ton portrait à droite */
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}
.hero-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #5fd39a;
  box-shadow: 0 0 0 0 rgba(95, 211, 154, 0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(95, 211, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(95, 211, 154, 0); }
}
.hero-title {
  font-size: var(--fs-display);
  line-height: 1.04;
  letter-spacing: -0.035em;
  filter: drop-shadow(0 8px 40px rgba(5, 12, 28, 0.6));
}
.hero-title .line { display: block; overflow: hidden; padding: 0 0.04em 0.08em; }
.hero-title .line > span { display: inline-block; will-change: transform; }
.hero-sub {
  max-width: 560px;
  margin-top: 24px;
  color: rgba(238, 232, 220, 0.75);
  font-size: clamp(15px, 1.2vw, 17px);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }

/* Portrait : la tête dépasse du cadre, le nom est posé sur une étiquette en verre */
.hero-portrait {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 5;
  justify-self: end;
}
.portrait-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0; top: 36%;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 15%, rgba(120, 160, 255, 0.55), transparent 55%),
    radial-gradient(circle at 85% 90%, rgba(214, 180, 126, 0.35), transparent 50%),
    linear-gradient(165deg, #23479a 0%, #10214a 75%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 90px -40px rgba(0, 0, 0, 0.7);
}
.hero-portrait img {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: auto;
  clip-path: inset(-60% 0 0 0 round 0 0 28px 28px);
}
.portrait-tag {
  position: absolute;
  z-index: 2;
  left: 14px; right: 14px; bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  color: var(--cream);
  --glass-radius: 18px;
}
.portrait-name {
  font-family: var(--serif);
  font-weight: var(--display-weight);
  font-size: clamp(18px, 1.6vw, 22px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.portrait-role { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(238, 232, 220, 0.78); }

@media (max-width: 860px) {
  .hero { padding-top: 104px; }
  .hero-content { grid-template-columns: 1fr; justify-items: center; gap: 28px; }
  .hero-portrait { order: -1; max-width: 230px; justify-self: center; }
  .hero-text { align-items: center; text-align: center; }
  .hero-actions { justify-content: center; }
  .portrait-tag { left: 10px; right: 10px; bottom: 10px; padding: 10px 12px; }
  .portrait-name { font-size: 16px; }
  .portrait-role { font-size: 11px; gap: 6px; }
}

.scroll-cue {
  position: absolute;
  left: 50%; bottom: 28px;
  translate: -50% 0;
  z-index: 2;
}
.scroll-cue-line {
  position: relative;
  display: block;
  width: 1px; height: 48px;
  background: var(--line);
  overflow: hidden;
}
.scroll-cue-line::after {
  content: "";
  position: absolute;
  left: 0; top: -40%;
  width: 100%; height: 40%;
  background: var(--sand);
  animation: drip 2s var(--ease) infinite;
}
@keyframes drip { to { top: 110%; } }

/* ============ Portfolio (carrousel) ============ */
.reel { position: relative; }
.reel-stage {
  position: relative;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(16px, 4vw, 64px);
  column-gap: clamp(16px, 7.5vw, 120px);
  padding: 90px var(--gutter) 40px;
  overflow: hidden;
}
.reel-bigtype {
  position: absolute;
  top: 50%; left: 0;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: clamp(6rem, 16vw, 16rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(238, 232, 220, 0.1);
  pointer-events: none;
  user-select: none;
}
/* Carrousel : la vidéo active au centre, les autres en retrait de chaque côté */
.reel-carousel {
  position: relative;
  z-index: 1;
  height: min(68vh, 800px);
  aspect-ratio: 9 / 16;
  max-width: 100%;
  touch-action: pan-y;
  perspective: 1400px;
}
.reel-frame {
  position: absolute;
  inset: 0;
  z-index: var(--z, 1);
  border-radius: 18px;
  overflow: hidden;
  background: var(--navy-950);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(238, 232, 220, 0.08);
  cursor: pointer;
  transform: translateX(calc(var(--d, 0) * 66%)) scale(var(--s, 1)) rotateY(calc(var(--d, 0) * -8deg));
  filter: brightness(var(--b, 1));
  transition: transform 0.9s var(--ease), filter 0.9s var(--ease), opacity 0.6s var(--ease);
}
.reel-frame:not(.is-active) .reel-sound,
.reel-frame:not(.is-active) .reel-progress { opacity: 0; pointer-events: none; }
.reel-sound, .reel-progress { transition: opacity 0.5s var(--ease); }

/* Bloc carrousel : flèches de part et d’autre de la vidéo + indication de swipe */
.reel-carousel-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  will-change: transform;
}
.reel-arrow {
  position: absolute;
  z-index: 20;
  top: calc(min(68vh, 800px) / 2);
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  color: var(--cream);
  --glass-radius: 999px;
  transition: scale 0.4s var(--ease), opacity 0.4s var(--ease);
}
.reel-arrow-prev { right: calc(100% + 18px); }
.reel-arrow-next { left: calc(100% + 18px); }
.reel-arrow:hover { scale: 1.1; }
.reel-arrow:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }
.reel-arrow.is-nudging svg { animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { translate: 0 0; } 45% { translate: 5px 0; } }

.reel-hint {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--cream);
  white-space: nowrap;
  --glass-radius: 999px;
}
.hint-swipe { display: inline-flex; align-items: center; gap: 2px; color: var(--sand); }
.hint-swipe i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: swipe 1.8s var(--ease) infinite;
}
@keyframes swipe { 0%, 100% { translate: 5px 0; } 50% { translate: -5px 0; } }
.reel-dots { display: flex; gap: 6px; }
.reel-dots span {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: rgba(238, 232, 220, 0.3);
  transition: width 0.5s var(--ease), background-color 0.5s var(--ease);
}
.reel-dots span.is-on { width: 22px; background: var(--sand); }
.reel-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-sound {
  position: absolute;
  left: 14px; bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--cream);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  --glass-radius: 999px;
  transition: scale 0.4s var(--ease);
}
.reel-sound:hover { scale: 1.04; }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.bars i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; }
.reel-sound[aria-pressed="true"] .bars i { animation: bar 0.9s ease-in-out infinite alternate; }
.reel-sound[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -0.3s; }
.reel-sound[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -0.6s; }
.reel-sound[aria-pressed="true"] .bars i:nth-child(4) { animation-delay: -0.15s; }
@keyframes bar { from { height: 3px; } to { height: 12px; } }
.reel-progress, .project-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(238, 232, 220, 0.15);
}
.reel-progress span, .project-progress span {
  display: block;
  height: 100%;
  background: var(--sand);
  transform-origin: left;
  transform: scaleX(0);
}
.reel-side {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px;
  min-width: 210px;
  font-size: 14px;
  --glass-radius: 20px;
}
.reel-left { justify-self: end; max-width: 340px; }
.reel-side-title {
  font-size: var(--fs-h3);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.reel-side-text { font-size: 14px; line-height: 1.55; }
.reel-now {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.reel-now-title { font-weight: 500; font-variant-numeric: tabular-nums; }
.reel-spacer { min-width: 0; }
@media (max-width: 760px) {
  .reel-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    align-content: center;
    padding-top: 84px;
  }
  .reel-carousel-wrap { grid-column: 1 / -1; grid-row: 1; justify-self: center; gap: 14px; }
  .reel-carousel { height: min(50vh, 520px); }
  .reel-frame { transform: translateX(calc(var(--d, 0) * 78%)) scale(var(--s, 1)); }
  .reel-arrow { top: calc(min(50vh, 520px) / 2); width: 46px; height: 46px; }
  .reel-arrow-prev { right: auto; left: -14px; }
  .reel-arrow-next { left: auto; right: -14px; }
  .reel-left { grid-row: 2; grid-column: 1 / -1; justify-self: stretch; max-width: none; }
  .reel-now, .reel-spacer { display: none; }
  .reel-side { min-width: 0; padding: 16px; gap: 6px; }
}

/* ============ Projet : aftermovie ============ */
.project-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 0 var(--gutter) clamp(32px, 4vw, 56px);
}
.project-intro { max-width: 460px; }
.project-intro strong { color: var(--fg); font-weight: 500; }
.project-head { flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 16px; }
.project-meta { margin-top: 4px; }
.project-caption-text { max-width: 640px; font-size: 14px; line-height: 1.5; color: rgba(238, 232, 220, 0.78); }
.project-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.project-meta li {
  position: relative;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cream);
  --glass-radius: 999px;
}
.project-stage { position: relative; height: 100vh; overflow: hidden; }
.project-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--navy-950);
  cursor: pointer;
  will-change: clip-path;
}
.project-video { width: 100%; height: 100%; object-fit: cover; display: block; will-change: transform; }
.project-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(5, 12, 28, 0.85), transparent 35%),
    linear-gradient(to bottom, rgba(5, 12, 28, 0.55), transparent 25%);
  pointer-events: none;
}
.project-title {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3em;
  font-size: var(--fs-h2);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--cream);
  pointer-events: none;
  text-shadow: 0 10px 60px rgba(5, 12, 28, 0.5);
}
.pt { display: inline-block; will-change: transform; }
.project-caption {
  position: absolute;
  left: var(--gutter); right: var(--gutter); bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px 18px 24px;
  color: var(--cream);
  --glass-radius: 22px;
}
.project-caption .label { color: rgba(238, 232, 220, 0.65); }
.project-caption-col { display: flex; flex-direction: column; gap: 6px; }
.project-caption-col.right { flex-direction: row; align-items: center; gap: 16px; }
.project-caption-title { font-size: clamp(16px, 1.6vw, 20px); font-weight: 500; }
.project-time { font-variant-numeric: tabular-nums; font-size: 14px; color: rgba(238, 232, 220, 0.75); }
.project-sound { position: relative; left: auto; bottom: auto; }
@media (max-width: 760px) {
  .project-head { flex-direction: column; align-items: flex-start; }
  .project-stage { height: 80vh; }
  .project-title { flex-direction: column; gap: 0; }
  .project-caption { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 18px; }
}

/* ============ Services ============ */
.services { padding: clamp(100px, 14vw, 180px) var(--gutter); }
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: clamp(48px, 7vw, 96px);
}
.service-list { list-style: none; }
.service {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: 80px 1.2fr 1.4fr 1fr;
  align-items: baseline;
  gap: 24px;
  padding: clamp(28px, 3.5vw, 44px) 0;
  border-top: 1px solid var(--line);
  transition: color 0.4s var(--ease);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--gutter) * -1);
  background: var(--navy-900);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.6s var(--ease);
  z-index: -1;
}
.service:hover { color: var(--cream); }
.service:hover::before { transform: scaleY(1); transform-origin: top; }
.service:hover .service-desc, .service:hover .service-tags, .service:hover .service-num { color: rgba(238, 232, 220, 0.7); }
.service-num { font-size: 13px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.service-name {
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -0.015em;
  transition: translate 0.6s var(--ease);
}
.service:hover .service-name { translate: 6px 0; }
.service-desc { color: var(--fg-muted); max-width: 440px; }
.service-tags { justify-self: end; font-size: 13px; color: var(--fg-muted); white-space: nowrap; }
@media (max-width: 900px) {
  .service { grid-template-columns: 48px 1fr; gap: 10px 16px; align-items: start; }
  .service-num { grid-area: 1 / 1; padding-top: 0.35em; }
  .service-name { grid-area: 1 / 2; }
  .service-desc { grid-area: 2 / 2; }
  .service-tags { grid-area: 3 / 2; justify-self: start; }
}

/* ============ Méthode : frise reliée par une flèche ============ */
.process { position: relative; }
.process-inner {
  position: relative;
  overflow: hidden;
  padding: clamp(90px, 10vw, 140px) var(--gutter);
}
.process-head, .timeline { position: relative; z-index: 1; max-width: 1300px; margin: 0 auto; }
.process-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.process-head .label { margin-bottom: 16px; }
.process-lead { max-width: 320px; }

.timeline { --gap: 20px; --node: 46px; }
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.node {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: var(--node);
  height: var(--node);
  border-radius: 50%;
  background: var(--navy-900);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--fg-muted);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), box-shadow 0.5s var(--ease), scale 0.5s var(--ease);
}
.step.is-active .node {
  background: var(--sand);
  color: var(--navy-900);
  box-shadow: 0 0 0 7px rgba(214, 180, 126, 0.14), 0 0 30px rgba(214, 180, 126, 0.45);
  scale: 1.06;
}
.step-card {
  position: relative;
  width: 100%;
  padding: 24px 22px;
  color: var(--cream);
  --glass-radius: 22px;
}
.step-card h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.015em; margin-bottom: 10px; }
.step-card p { font-size: 15px; color: rgba(238, 232, 220, 0.66); }

/* La flèche : passe par le centre des pastilles, de la 1re à la 4e */
.rail {
  position: absolute;
  z-index: 1;
  top: calc(var(--node) / 2 - 1px);
  left: calc((100% - 3 * var(--gap)) / 8);
  right: calc((100% - 3 * var(--gap)) / 8);
  height: 2px;
  background: var(--line);
  border-radius: 2px;
}
.rail-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sand), #8fb0ff);
  transform-origin: left center;
  transform: scaleX(0);
  box-shadow: 0 0 14px rgba(143, 176, 255, 0.5);
}
.rail-tip {
  position: absolute;
  top: 50%; left: 0;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  color: #cfe0ff;
  filter: drop-shadow(0 0 8px rgba(143, 176, 255, 0.8));
}
@media (max-width: 899px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step { flex-direction: row; align-items: flex-start; text-align: left; gap: 18px; }
  .node { flex: 0 0 auto; }
  .rail {
    top: calc(var(--node) / 2);
    left: calc(var(--node) / 2 - 1px);
    right: auto;
    width: 2px;
    height: var(--rail-h, 0px);
  }
  .rail-fill { transform-origin: center top; transform: scaleY(0); }
  .rail-tip { left: 50%; top: 0; rotate: 90deg; }
}

/* ============ Contact ============ */
.contact { padding-top: clamp(80px, 12vw, 160px); overflow: hidden; }
.marquee { border-block: 1px solid var(--line); padding: clamp(16px, 2vw, 28px) 0; overflow: hidden; }
.marquee-track {
  display: flex;
  width: max-content;
  gap: 0.6em;
  font-size: var(--fs-h2);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  animation: marquee 22s linear infinite;
}
.marquee-track span:nth-child(even) { color: var(--sand); font-size: 0.5em; align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

.contact-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: clamp(80px, 12vw, 160px) var(--gutter);
}
.contact-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(28px, 4vw, 56px);
  max-width: 1000px;
  --glass-radius: 32px;
}
.contact-mail {
  position: relative;
  align-self: flex-start;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.025em;
  word-break: break-word;
}
.contact-mail::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--sand);
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 0.8s var(--ease);
}
.contact-mail:hover::after { transform: scaleX(1); }
.contact-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--fg-muted);
}
.footer-links { display: flex; gap: 28px; }

/* ============ Verre liquide ============
   Couches : teinte + flou de l'arrière-plan, liseré lumineux (::before),
   reflet qui suit la souris (::after). La réfraction (#liquid-glass)
   s'ajoute sur les navigateurs Chromium via la classe .has-refraction.
   Chaque élément .glass doit avoir une position (relative ou absolute). */
.glass-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.glass {
  --glass-tint-a: rgba(255, 255, 255, 0.13);
  --glass-tint-b: rgba(255, 255, 255, 0.03);
  --glass-rim: rgba(255, 255, 255, 0.6);
  --glass-shine: rgba(255, 255, 255, 0.22);
  --glass-blur: blur(16px) saturate(180%) brightness(1.06);
  background: linear-gradient(135deg, var(--glass-tint-a), var(--glass-tint-b) 50%, rgba(255, 255, 255, 0.07));
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 0;
  border-radius: var(--glass-radius, 24px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset 0 -10px 24px -12px rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 24px 60px -24px rgba(2, 6, 20, 0.65);
  isolation: isolate;
}
.has-refraction .glass { backdrop-filter: url(#liquid-glass) var(--glass-blur); }
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--glass-rim), rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.32));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 25%) var(--my, -10%), var(--glass-shine), transparent 65%);
  pointer-events: none;
  z-index: -1;
}
body.is-light .glass {
  --glass-tint-a: rgba(255, 255, 255, 0.55);
  --glass-tint-b: rgba(255, 255, 255, 0.25);
  --glass-rim: rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(10, 22, 48, 0.06),
    0 18px 40px -22px rgba(10, 22, 48, 0.35);
}

/* Halos colorés derrière le verre */
.orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.7;
  will-change: transform;
  animation: drift 18s ease-in-out infinite alternate;
}
.orb.o1 { width: 36vw; height: 36vw; left: 30%; top: 10%; background: radial-gradient(circle, #2f5bff, transparent 70%); }
.orb.o2 { width: 26vw; height: 26vw; left: 62%; top: 45%; background: radial-gradient(circle, #d6b47e, transparent 70%); opacity: 0.4; animation-duration: 22s; animation-delay: -6s; }
.orb.o3 { width: 30vw; height: 30vw; left: 8%; top: 50%; background: radial-gradient(circle, #3fb6ff, transparent 70%); opacity: 0.4; animation-duration: 26s; animation-delay: -12s; }
@keyframes drift {
  0% { translate: 0 0; scale: 1; }
  50% { translate: 6vw -4vw; scale: 1.12; }
  100% { translate: -5vw 3vw; scale: 0.94; }
}
.contact-body .orb.o1 { left: 45%; top: 5%; }
.contact-body .orb.o3 { left: 0%; top: 35%; }
@media (max-width: 760px) {
  .orb { filter: blur(36px); }
  .orb.o1 { width: 70vw; height: 70vw; }
  .orb.o2, .orb.o3 { width: 55vw; height: 55vw; }
}

/* ============ Mouvement réduit ============ */
@media (prefers-reduced-motion: reduce) {
  .grain, .marquee-track, .scroll-cue-line::after, .dot, .orb, .wall-track, .about-chip { animation: none; }
  .manifesto-text .w { opacity: 1; }
  .rail-fill { transform: none; }
}

@media (max-width: 860px) {
  .process-head { flex-direction: column; align-items: flex-start; }
}

/* ============ Haut de page clair, fondu vers le marine du portfolio ============ */
.hero {
  --fg: var(--navy-900);
  --fg-muted: rgba(10, 22, 48, 0.62);
  --line: rgba(10, 22, 48, 0.16);
  --accent: var(--navy-700);
  --grad-title: linear-gradient(95deg, #0a1630 0%, #1b3166 55%, #2f5bff 100%);
  --grad-accent: linear-gradient(95deg, #c19a5f 0%, #a87a3e 60%, #8d6330 100%);
  background: var(--cream);
  color: var(--fg);
  /* place en bas pour le fondu, sous les boutons */
  min-height: max(calc(100svh + 160px), 820px);
  padding-bottom: 260px;
}
.hero-veil {
  background:
    radial-gradient(ellipse 62% 70% at 32% 48%, rgba(238, 232, 220, 0.96) 0%, rgba(238, 232, 220, 0.82) 50%, rgba(238, 232, 220, 0.45) 100%),
    linear-gradient(to bottom, var(--cream) 0%, rgba(238, 232, 220, 0) 22%);
}
.hero-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 300px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(10, 22, 48, 0) 0%, rgba(10, 22, 48, 0.55) 45%, var(--navy-900) 100%);
}
.hero-title { filter: drop-shadow(0 6px 30px rgba(238, 232, 220, 0.9)); }
.hero-sub { color: var(--fg-muted); }
.hero .btn-glass { color: var(--fg); }
.hero .scroll-cue-line { background: rgba(238, 232, 220, 0.25); }

/* Mur de réels en tons clairs */
.hero .wall-card { box-shadow: inset 0 0 0 1px rgba(10, 22, 48, 0.06), 0 18px 36px -20px rgba(10, 22, 48, 0.35); }
.hero .wall-card:nth-child(6n + 1) { --card-bg: linear-gradient(165deg, #dfe7f7 0%, #c3d1ee 100%); }
.hero .wall-card:nth-child(6n + 2) { --card-bg: linear-gradient(165deg, #e9e2d3 0%, #d9cdb5 100%); }
.hero .wall-card:nth-child(6n + 3) { --card-bg: linear-gradient(165deg, #d4def3 0%, #b5c6ea 100%); }
.hero .wall-card:nth-child(6n + 4) { --card-bg: linear-gradient(165deg, #f2ede3 0%, #e2d8c6 100%); }
.hero .wall-card:nth-child(6n + 5) { --card-bg: linear-gradient(165deg, #cfdcf5 0%, #a9bde6 100%); }
.hero .wall-card:nth-child(6n + 6) { --card-bg: linear-gradient(165deg, #e4e9f2 0%, #cdd6e6 100%); }
.hero .wall-card .wc-play { background: rgba(10, 22, 48, 0.07); box-shadow: inset 0 0 0 1px rgba(10, 22, 48, 0.14); }
.hero .wall-card .wc-play::after { border-left-color: rgba(10, 22, 48, 0.45); }
.hero .wall-card .wc-label { color: rgba(10, 22, 48, 0.45); }

/* Verre clair dans le haut de page, sauf l'étiquette posée sur la photo bleue */
.hero .glass {
  --glass-tint-a: rgba(255, 255, 255, 0.55);
  --glass-tint-b: rgba(255, 255, 255, 0.25);
  --glass-rim: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(10, 22, 48, 0.08), 0 18px 40px -22px rgba(10, 22, 48, 0.35);
}
.hero .portrait-tag.glass {
  --glass-tint-a: rgba(255, 255, 255, 0.13);
  --glass-tint-b: rgba(255, 255, 255, 0.03);
  --glass-rim: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 24px 60px -24px rgba(2, 6, 20, 0.65);
}

/* Le portfolio garde son fond marine, quel que soit le fond de la page */
.reel { background: var(--navy-900); }
@media (max-width: 860px) {
  .hero { padding-bottom: 220px; min-height: auto; }
  .hero-fade { height: 190px; }
}

/* ============ Section 02 : vidéo témoignages (Village Saint Joseph) ============ */
.project { padding-bottom: clamp(40px, 6vw, 96px); }
.project-card {
  position: relative;
  margin: clamp(48px, 6vw, 96px) var(--gutter) 0;
}
.project-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 86vh;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: var(--navy-950);
  cursor: pointer;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.6);
  will-change: clip-path;
}
.project-card-video { width: 100%; height: 100%; object-fit: cover; display: block; will-change: transform; }
.project-card-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(5, 12, 28, 0.8), transparent 40%);
}
.project-card-caption { left: 20px; right: 20px; bottom: 20px; }
@media (max-width: 760px) {
  /* sur téléphone, l'encadré passe sous la vidéo pour ne pas la cacher */
  .project-card-media { border-radius: 18px; }
  .project-card-caption { position: relative; left: auto; right: auto; bottom: auto; margin-top: 12px; }
  .project-card-shade { display: none; }
}

/* ============ Retouches de mise en page ============ */
/* Photo du haut : le cadre ne garde que la partie visible (tête + panneau),
   pour qu'il soit centré verticalement sur le bloc de texte */
.hero-portrait { aspect-ratio: 1 / 1; }
.hero-portrait .portrait-panel { top: 45%; }

/* Section 02 : titre et pastilles centrés, plus près de la vidéo */
.project-head {
  align-items: center;
  text-align: center;
  padding-bottom: 12px;
}
.project-meta { justify-content: center; }

/* Contact : contenu centré dans l'encadré, bouton au milieu */
.contact-card { align-items: center; text-align: center; margin-inline: auto; width: 100%; }
.contact-mail { align-self: center; }
.contact-row { flex-direction: column; justify-content: center; gap: 18px; }
/* l'image a ~11 % de vide au-dessus des cheveux : on remonte d'autant la moitié
   pour centrer la partie visible sur le texte (ordinateur uniquement) */
@media (min-width: 861px) {
  .hero-portrait { translate: 0 -5.5%; }
}

/* Bouton son : verre teinté marine pour rester lisible sur les vidéos claires */
.reel-sound.glass {
  --glass-tint-a: rgba(10, 22, 48, 0.62);
  --glass-tint-b: rgba(10, 22, 48, 0.42);
  --glass-shine: rgba(255, 255, 255, 0.12);
}
