/* =============================================================
   Eloic Foucart — Portfolio
   Self-hosted fonts · Retina/P3 · Responsive · RGPD-ready
   ============================================================= */

/* ---- Self-hosted fonts ---- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/sg-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/sg-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jbm-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jbm-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Design tokens ---- */
:root {
  color-scheme: light;

  --paper-0:   #fbfdfb;
  --paper-1:   #eef2ee;
  --paper-ink: #0d1113;
  --muted:     #6b7280;
  --muted-2:   #9aa1a6;
  --line:      rgba(0,0,0,.09);

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body:    'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --text-xs:   12px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-md:   20px;

  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-6:  24px;
  --space-8:  32px;
  --space-12: 48px;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-pill: 999px;

  --ease-out:      cubic-bezier(.2,.8,.2,1);
  --ease-in-out:   cubic-bezier(.76,0,.24,1);
  --dur-ui:        320ms;
  --dur-micro:     180ms;
  --dur-enter:     560ms;

  --sat: env(safe-area-inset-top,    0px);
  --sar: env(safe-area-inset-right,  0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left,   0px);
}

/* ---- Wide-gamut (DCI-P3) ---- */
@supports (color: color(display-p3 0 0 0)) {
  @media (color-gamut: p3) {
    :root {
      --paper-0:   color(display-p3 0.984 0.992 0.984);
      --paper-ink: color(display-p3 0.051 0.067 0.075);
    }
    ::selection {
      background: color(display-p3 0.051 0.067 0.075);
      color:      color(display-p3 0.984 0.992 0.984);
    }
  }
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; height: 100%;
  background: var(--paper-0);
  color: var(--paper-ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}
img  { display: block; max-width: 100%; }
a    { color: inherit; }
button { font-family: inherit; }

::selection { background: var(--paper-ink); color: var(--paper-0); }

/* Accessible focus */
:focus         { outline: none; }
:focus-visible {
  outline: 2px solid var(--paper-ink);
  outline-offset: 3px;
  border-radius: 3px;
}
/* Cibles focalisées par programmation (titres de panneau, pour les lecteurs
   d'écran) : jamais atteignables au clavier → aucun anneau visible. */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible { outline: none; }

/* Visually hidden but readable by screen readers & crawlers */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

#app {
  height: 100vh;   /* fallback navigateurs sans svh */
  height: 100svh;  /* hauteur stable : ignore l'apparition/disparition de la barre d'URL mobile */
}

.wrap {
  max-width: 1480px;
  margin: 0 auto;
  padding-left:  max(clamp(20px, 3.4vw, 48px), var(--sal));
  padding-right: max(clamp(20px, 3.4vw, 48px), var(--sar));
}

/* =============================================================
   KEYFRAMES
   ============================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes hintFloat {
  0%, 100% { transform: translateX(-50%) translateY(0);   }
  50%       { transform: translateX(-50%) translateY(6px); }
}
@keyframes ringPulse {
  0%   { transform: scale(1);   opacity: .5; }
  70%  { transform: scale(1.4); opacity: 0;  }
  100% { transform: scale(1.4); opacity: 0;  }
}

/* =============================================================
   FLOATING HEADER
   ============================================================= */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding-top:    max(clamp(18px, 2.4vw, 30px), var(--sat));
  padding-bottom: clamp(18px, 2.4vw, 30px);
  padding-left:   max(clamp(20px, 3.4vw, 48px), var(--sal));
  padding-right:  max(clamp(20px, 3.4vw, 48px), var(--sar));
  pointer-events: none;
  transition: color 400ms var(--ease-out),
              border-color 400ms var(--ease-out);
  border-bottom: 1px solid transparent;
  animation: fadeIn 600ms 200ms var(--ease-out) both;
}
.topbar > * { pointer-events: auto; }

.topbar .brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
  text-decoration: none;
  display: flex; align-items: baseline; gap: 12px;
}
.topbar .brand .role {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  font-weight: 400;
  opacity: 0.7;
  white-space: nowrap;
}
.topbar.on-image {
  color: #fff;
  text-shadow: 0 1px 14px rgba(0,0,0,.35);
}
.topbar.on-image .brand .role { opacity: 0.85; }
.topbar.on-paper {
  color: var(--paper-ink);
  text-shadow: none;
  border-bottom-color: var(--line);
}

@media (max-width: 560px) { .topbar .brand .role { display: none; } }

/* Menu button */
.menu-btn {
  display: flex; align-items: center; gap: 12px;
  background: none; border: none; cursor: pointer; color: inherit;
  font-family: var(--font-display);
  font-weight: 500; font-size: var(--text-sm);
  letter-spacing: -0.005em;
  padding: 8px 0;
  min-height: 44px;
  min-width:  44px;
}
.menu-btn .mb-text { min-width: 52px; text-align: right; }
.menu-btn .mb-icon {
  position: relative; width: 22px; height: 12px; display: inline-block;
}
.menu-btn .mb-icon i {
  position: absolute; left: 0; right: 0; height: 1.5px;
  background: currentColor; border-radius: 2px;
  transition: transform var(--dur-ui) var(--ease-out),
              top     var(--dur-ui) var(--ease-out);
}
.menu-btn .mb-icon i:nth-child(1) { top: 2px; }
.menu-btn .mb-icon i:nth-child(2) { top: 8px; }
.menu-btn.is-x .mb-icon i:nth-child(1) { top: 5px; transform: rotate(45deg);  }
.menu-btn.is-x .mb-icon i:nth-child(2) { top: 5px; transform: rotate(-45deg); }

/* Topbar right group */
.topbar-right {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
}

/* Lang toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  padding: 4px 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  opacity: 0.35;
  transition: opacity 200ms var(--ease-out);
}
.lang-btn.active { opacity: 1; }
@media (hover: hover) {
  .lang-btn:not(.active):hover { opacity: 0.7; }
}
.lang-sep { opacity: 0.2; }

/* =============================================================
   FULLSCREEN SCROLLER + SLIDES
   ============================================================= */
.scroller {
  height: 100vh; height: 100svh; overflow-y: scroll; overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: none;
}
.scroller::-webkit-scrollbar { display: none; }
.snap { scroll-snap-align: start; contain: layout paint; }

.slide {
  position: relative;
  height: 100svh;
  width: 100%;
  overflow: hidden;
  contain: layout paint;
  display: flex; align-items: flex-end;
}
@supports not (height: 100svh) {
  .slide { height: 100vh; }
}

/* ---- Media background ---- */
.slide-media {
  position: absolute; inset: 0; overflow: hidden;
}
.slide-media .bg {
  position: absolute; inset: -2px;
  background: #d6dbd6;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  translate: 0 var(--parallax-y, 0px);
  transition: transform 8000ms linear;
  will-change: transform, translate;
}
.slide.is-active .slide-media .bg { transform: scale(1.12); }

.slide-media img {
  position: absolute; inset: -2px;
  width: calc(100% + 4px); height: calc(100% + 4px);
  object-fit: cover; object-position: center;
  transform: scale(1.04);
  transition: transform 8000ms linear;
  will-change: transform;
}
.slide.is-active .slide-media img { transform: scale(1.12); }

@media (prefers-reduced-motion: reduce) {
  .slide-media .bg,
  .slide.is-active .slide-media .bg,
  .slide-media img,
  .slide.is-active .slide-media img { transform: none; transition: none; }
}

/* ---- Gradient scrims ---- */
.slide-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to top,    rgba(8,11,12,.68) 0%, rgba(8,11,12,.14) 36%, transparent 58%),
    linear-gradient(to bottom, rgba(8,11,12,.38) 0%, transparent 28%);
}

/* ---- Center play CTA ---- */
.slide-cta {
  position: absolute; inset: 0; z-index: 3; margin: auto;
  width: max-content; height: max-content;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  background: none; border: none; cursor: pointer; color: #fff;
  opacity: 0; transform: translateY(12px) scale(.96);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  min-width: 44px; min-height: 44px;
}
.slide.is-active .slide-cta {
  opacity: 1; transform: none;
  transition-delay: 300ms;
}

.slide-cta .ring {
  position: relative;
  width: clamp(72px, 7vw, 96px); height: clamp(72px, 7vw, 96px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(4px) saturate(140%);
  -webkit-backdrop-filter: blur(4px) saturate(140%);
  transition: transform var(--dur-ui) var(--ease-out),
              background var(--dur-ui) var(--ease-out),
              border-color var(--dur-ui) var(--ease-out);
}
/* Pulse ring */
.slide.is-active .slide-cta .ring::after {
  content: '';
  position: absolute; inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28);
  animation: ringPulse 2.8s var(--ease-out) infinite 1.2s;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .slide.is-active .slide-cta .ring::after { animation: none; }
}

.slide-cta .ring svg { margin-left: 3px; }
@media (hover: hover) {
  .slide-cta:hover .ring {
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.9);
    transform: scale(1.07);
  }
}
.slide-cta .cta-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* ---- Slide info — entrance animation ---- */
.slide-info {
  position: relative; z-index: 2; color: #fff;
  padding-bottom: max(clamp(80px, 12vh, 130px), calc(var(--sab) + 60px));
  width: 100%;
}
.slide-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  margin-bottom: var(--space-4);
}
.slide-meta .slide-cat { color: #fff; }
.slide-meta .slide-dot { opacity: 0.45; }

.slide-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 7.5vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 16ch;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}

/* Trigger entrance when slide is active */
.slide.is-active .slide-meta  { opacity: 0.92; transform: none; transition-delay: 80ms; }
.slide.is-active .slide-title { opacity: 1;    transform: none; transition-delay: 180ms; }

/* On first load: show immediately, animate on subsequent activations */
.slide.is-active.no-anim .slide-meta,
.slide.is-active.no-anim .slide-title {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .slide-meta  { opacity: 0.92; transform: none; transition: none; }
  .slide-title { opacity: 1;    transform: none; transition: none; }
  .slide.is-active .slide-meta,
  .slide.is-active .slide-title { transition-delay: 0ms; }
}

/* ---- Counter ---- */
.slide-counter {
  position: absolute; z-index: 2; top: 0; left: 0; right: 0;
  display: flex; align-items: baseline; gap: 6px; justify-content: flex-end;
  color: rgba(255,255,255,.85);
  padding-top: max(clamp(80px, 11vh, 120px), calc(var(--sat) + 60px));
  font-family: var(--font-mono);
}
.slide-counter .cur { font-size: var(--text-md); }
.slide-counter .tot { font-size: var(--text-xs); opacity: 0.6; }

/* =============================================================
   DOT NAVIGATION
   ============================================================= */
.dots {
  position: fixed;
  right: max(clamp(16px, 2vw, 30px), var(--sar));
  top: 50%; transform: translateY(-50%);
  z-index: 70;
  display: flex; flex-direction: column; gap: 14px; align-items: flex-end;
  transition: opacity var(--dur-ui) var(--ease-out);
  animation: fadeIn 600ms 500ms var(--ease-out) both;
}
.dot {
  position: relative;
  width: 44px; height: 44px;
  padding: 0; border: none; cursor: pointer;
  background: transparent;
  display: flex; align-items: center; justify-content: flex-end;
}
.dot::after {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: 1.5px solid rgba(255,255,255,.65);
  transition: all var(--dur-ui) var(--ease-out);
  flex-shrink: 0;
}
.dot.on::after {
  width: 9px; height: 9px;
  background: #fff; border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.18);
}
.dot-label {
  position: absolute; right: 50px; top: 50%;
  transform: translateY(-50%) translateX(8px);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: #fff;
  background: rgba(8,11,12,.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  opacity: 0; pointer-events: none;
  transition: all var(--dur-ui) var(--ease-out);
}
@media (hover: hover) {
  .dot:hover .dot-label { opacity: 1; transform: translateY(-50%) translateX(0); }
}
.menu-open .dots { opacity: 0; pointer-events: none; }
@media (max-width: 680px) { .dots { display: none; } }

/* =============================================================
   SCROLL HINT
   ============================================================= */
.scroll-hint {
  position: fixed;
  left: 50%; bottom: max(clamp(20px, 4vh, 40px), var(--sab));
  transform: translateX(-50%);
  z-index: 65;
  color: rgba(255,255,255,.8);
  opacity: 0.9;
  transition: opacity 600ms var(--ease-out);
  animation: hintFloat 2.6s var(--ease-out) infinite;
  pointer-events: none;
}
.scroll-hint.hidden { opacity: 0; }
.menu-open .scroll-hint { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; }
}


/* =============================================================
   NAV OVERLAY — menu principal
   ============================================================= */
.nav-overlay {
  position: fixed; inset: 0; z-index: 75;
  background: rgba(8, 11, 12, .90);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: max(clamp(80px,12vh,120px), var(--sat)) clamp(24px,5vw,80px)
           max(clamp(80px,12vh,120px), var(--sab));
  opacity: 0; visibility: hidden;
  transition: opacity 500ms var(--ease-out), visibility 0s 500ms;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-overlay.is-open {
  opacity: 1; visibility: visible;
  transition: opacity 500ms var(--ease-out);
}

@keyframes nav-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---- Liens principaux ---- */
.nav-links { list-style: none; margin: 0; padding: 0; text-align: center; }
.nav-links li { opacity: 0; }
.nav-overlay.is-open .nav-links li {
  animation: nav-in 520ms calc(40ms + var(--i, 0) * 65ms) var(--ease-out) both;
}
.nav-links a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(52px, 8.5vw, 108px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: rgba(255,255,255,.9);
  padding: .1em 0;
  text-decoration: none;
  transition: opacity 280ms var(--ease-out),
              letter-spacing 280ms var(--ease-out);
}
@media (hover: hover) {
  .nav-links:has(a:hover) a { opacity: .2; }
  .nav-links a:hover { opacity: 1 !important; letter-spacing: -0.02em; }
}

/* ---- Réseaux sociaux ---- */
.nav-socials {
  margin-top: clamp(28px, 4.5vh, 52px);
  display: flex; align-items: center; justify-content: center;
  gap: clamp(24px, 4vw, 48px);
  opacity: 0;
}
.nav-overlay.is-open .nav-socials {
  animation: nav-in 520ms calc(40ms + 2 * 65ms) var(--ease-out) both;
}
.nav-social-link {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,.38);
  text-decoration: none;
  transition: color 220ms var(--ease-out);
}
@media (hover: hover) {
  .nav-social-link:hover { color: rgba(255,255,255,.82); }
}

/* ---- Email ---- */
.nav-footer {
  position: absolute;
  bottom: max(clamp(32px, 5.5vh, 52px), var(--sab));
  left: 0; right: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
}
.nav-overlay.is-open .nav-footer {
  animation: nav-in 520ms calc(40ms + 3 * 65ms) var(--ease-out) both;
}
.nav-clink {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,.38);
  text-decoration: none;
  transition: color 220ms var(--ease-out);
}
@media (hover: hover) {
  .nav-clink:hover { color: rgba(255,255,255,.82); }
}

/* ---- Mentions légales ---- */
.nav-legal {
  position: absolute;
  bottom: max(clamp(10px, 2vh, 18px), var(--sab));
  left: 0; right: 0;
  text-align: center;
}
.nav-legal > summary {
  list-style: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,.18);
  user-select: none;
  transition: color 220ms var(--ease-out);
}
.nav-legal > summary::-webkit-details-marker { display: none; }
@media (hover: hover) {
  .nav-legal > summary:hover { color: rgba(255,255,255,.45); }
}
.nav-legal-body {
  margin-top: var(--space-4);
  font-family: var(--font-body); font-size: 11px;
  line-height: 1.65; color: rgba(255,255,255,.35);
  max-width: 520px; margin-left: auto; margin-right: auto;
  padding: 0 var(--space-6);
  text-align: left;
}
.nav-legal-body p { margin: 0 0 var(--space-3); }
.nav-legal-body p:last-child { margin-bottom: 0; }
.nav-legal-body strong { color: rgba(255,255,255,.65); font-weight: 500; }
.nav-legal-body a { color: rgba(255,255,255,.45); text-decoration: underline; text-underline-offset: 2px; }

.menu-open .dots        { opacity: 0; pointer-events: none; }
.menu-open .scroll-hint { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .nav-overlay, .nav-overlay.is-open,
  .nav-links li, .nav-socials, .nav-footer,
  .nav-overlay.is-open .nav-links li,
  .nav-overlay.is-open .nav-socials,
  .nav-overlay.is-open .nav-footer {
    animation: none; opacity: 1; transform: none; transition: none;
  }
  .topbar { animation: none; }
  .dots   { animation: none; }
}

/* =============================================================
   PANELS — About & Services sur fond portfolio
   ============================================================= */
.page-panel {
  position: fixed;
  inset: 0;
  z-index: 72;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(8, 11, 12, .72);
  backdrop-filter: blur(4px) saturate(120%);
  -webkit-backdrop-filter: blur(4px) saturate(120%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms var(--ease-out);
  color: #fff;
}
.page-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Geler le scroller + masquer dots/hint quand panel ouvert */
#app.panel-open #scroller          { overflow: hidden; }
#app.panel-open .dots,
#app.panel-open .scroll-hint       { opacity: 0; pointer-events: none; }

.panel-body {
  padding-top:    max(clamp(100px, 16vh, 160px), calc(var(--sat) + 90px));
  padding-bottom: clamp(80px, 14vh, 140px);
}

/* ---- Kicker ---- */
.panel-kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.48);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 var(--space-6);
}
.panel-kicker-dot { opacity: 0.35; }

/* ---- Heading (about + services) ---- */
.panel-heading {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(56px, 9vw, 130px);
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin: 0 0 clamp(52px, 9vh, 110px);
  color: rgba(255,255,255,.92);
}

/* ---- About content ---- */
.panel-content { max-width: 660px; }
.panel-lead {
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.52;
  color: rgba(255,255,255,.88);
  margin: 0 0 clamp(18px, 3vh, 28px);
}
.panel-text p {
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.85;
  color: rgba(255,255,255,.48);
  margin: 0 0 1.5em;
}
.panel-text p:last-of-type { margin-bottom: 0; }
.panel-text em { color: rgba(255,255,255,.26); font-style: italic; }

/* ---- Services list ---- */
.panel-svc-list {
  list-style: none;
  margin: 0; padding: 0;
}
.panel-svc-item {
  border-top: 1px solid rgba(255,255,255,.10);
  transition: background 200ms var(--ease-out);
}
.panel-svc-item:last-child { border-bottom: 1px solid rgba(255,255,255,.10); }
@media (hover: hover) {
  .panel-svc-item:hover { background: rgba(255,255,255,.04); }
  .panel-svc-item:hover .panel-svc-name { letter-spacing: -0.01em; }
}
.panel-svc-inner {
  display: grid;
  grid-template-columns: 2ch 1fr;
  gap: clamp(28px, 5vw, 80px);
  padding: clamp(28px, 4.5vh, 52px) 0;
  align-items: start;
}
.panel-svc-num {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.08em;
  color: rgba(255,255,255,.24);
  padding-top: .75em;
}
.panel-svc-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(32px, 5vw, 68px);
  letter-spacing: -0.025em;
  line-height: 1.0;
  color: rgba(255,255,255,.88);
  margin: 0 0 .4em;
  transition: letter-spacing 280ms var(--ease-out);
}
.panel-svc-desc {
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.72;
  color: rgba(255,255,255,.38);
  margin: 0;
  max-width: 58ch;
}

/* ---- CTA panel ---- */
.panel-cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: clamp(44px, 7vh, 72px);
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,.88); text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.35);
  padding-bottom: 3px;
  transition: opacity 220ms var(--ease-out);
}
@media (hover: hover) {
  .panel-cta:hover { opacity: 0.45; }
}

/* ---- Entrées animées (stagger) ---- */
@keyframes panel-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.panel-kicker,
.panel-heading,
.panel-content,
.panel-svc-item,
.panel-cta-wrap { opacity: 0; }

.page-panel.is-open .panel-kicker      { animation: panel-in 540ms  80ms var(--ease-out) both; }
.page-panel.is-open .panel-heading     { animation: panel-in 580ms 160ms var(--ease-out) both; }
.page-panel.is-open .panel-content     { animation: panel-in 520ms 260ms var(--ease-out) both; }
.page-panel.is-open .panel-svc-item    { animation: panel-in 500ms calc(220ms + var(--i, 0) * 55ms) var(--ease-out) both; }
.page-panel.is-open .panel-cta-wrap    { animation: panel-in 500ms 460ms var(--ease-out) both; }

/* La zone visuelle/lecteur reste visible d'emblée (le panneau fait déjà
   un fondu) — évite un rectangle sombre tant que l'animation n'a pas joué. */
.panel-proj-visual { opacity: 1; }

/* ---- Panel projet ---- */
.panel-proj-visual {
  position: relative;
  height: clamp(180px, 36vh, 440px);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0 0 clamp(32px, 5vh, 56px);
}
.panel-proj-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top,    rgba(8,11,12,.55) 0%, transparent 55%),
    linear-gradient(to bottom, rgba(8,11,12,.30) 0%, transparent 30%);
}

/* ---- Slides cliquables ---- */
.slide { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .page-panel { transition: none; }
  .panel-svc-item, .panel-svc-name { transition: none; }
  .panel-kicker, .panel-heading, .panel-content,
  .panel-svc-item, .panel-cta-wrap, .panel-proj-visual {
    opacity: 1; animation: none;
  }
}

/* =============================================================
   PROGRESS BAR
   ============================================================= */
.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: rgba(255, 255, 255, .55);
  z-index: 90;
  pointer-events: none;
  transition: width 420ms var(--ease-out);
}

/* =============================================================
   GRAIN OVERLAY
   ============================================================= */
#app::after {
  content: '';
  position: fixed; inset: 0; z-index: 998;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 220px 220px;
}

/* =============================================================
   INTRO — premier chargement
   ============================================================= */
#intro {
  position: fixed; inset: 0; z-index: 300;
  background: var(--paper-ink);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
#intro.fade-out {
  animation: intro-out 600ms var(--ease-out) forwards;
}
@keyframes intro-out { to { opacity: 0; } }

.intro-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 5.5vw, 72px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: #fff;
  text-align: center;
  animation: fadeUp 700ms 200ms var(--ease-out) both;
}
@media (prefers-reduced-motion: reduce) {
  #intro, .intro-name { animation: none; }
}

/* =============================================================
   CUSTOM CURSOR — hover + pointer:fine seulement
   ============================================================= */
@media (hover: hover) and (pointer: fine) {
  * { cursor: none !important; }

  .cursor-ring {
    position: fixed; top: 0; left: 0;
    width: 36px; height: 36px; border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .5);
    pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 280ms var(--ease-out), height 280ms var(--ease-out),
                border-color 280ms var(--ease-out), background 280ms var(--ease-out);
    will-change: transform;
  }
  .cursor-dot {
    position: fixed; top: 0; left: 0;
    width: 5px; height: 5px; border-radius: 50%;
    background: #fff;
    pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 280ms var(--ease-out);
    will-change: transform;
  }

  body.cursor-play .cursor-ring {
    width: 64px; height: 64px;
    background: rgba(255, 255, 255, .10);
    border-color: rgba(255, 255, 255, .8);
  }
  body.cursor-play .cursor-dot { opacity: 0; }

  body.cursor-hover .cursor-ring {
    width: 18px; height: 18px;
    background: rgba(255, 255, 255, .15);
    border-color: rgba(255, 255, 255, .7);
  }
}

/* =============================================================
   FILTRE CATÉGORIE — dots secondaires
   ============================================================= */
.dot.same-cat::after {
  background: rgba(255, 255, 255, .7);
  border-color: rgba(255, 255, 255, .8);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .10);
}

/* =============================================================
   GALERIE PROJET
   ============================================================= */
.panel-proj-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(100px, 16vw, 190px), 1fr));
  gap: clamp(6px, 1vw, 10px);
  margin-top: clamp(24px, 4vh, 40px);
}
.panel-proj-thumb {
  aspect-ratio: 3/2;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .06);
  transition: opacity 200ms var(--ease-out);
}
@media (hover: hover) {
  .panel-proj-thumb:hover { opacity: 0.75; }
}
.panel-proj-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.panel-proj-thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255, 255, 255, .15);
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0, 0, 0, .92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 300ms var(--ease-out);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox-img {
  max-width: 92vw; max-height: 92vh;
  object-fit: contain; border-radius: var(--radius-sm);
  touch-action: none;            /* on gère pinch/pan en JS */
  transform-origin: center center;
  will-change: transform;
  user-select: none; -webkit-user-drag: none;
}
.lightbox.zoomed { cursor: zoom-out; }
.lightbox.zoomed .lightbox-prev,
.lightbox.zoomed .lightbox-next { opacity: 0; pointer-events: none; }
.lightbox-close {
  position: absolute;
  top: clamp(16px, 3vh, 32px); right: clamp(16px, 3vw, 32px);
  background: none; border: none; cursor: pointer;
  color: rgba(255, 255, 255, .55);
  font-size: 32px; line-height: 1; padding: 8px;
  transition: color 200ms var(--ease-out);
}
@media (hover: hover) {
  .lightbox-close:hover { color: #fff; }
}

/* =============================================================
   EMBED VIDÉO — panel projet
   ============================================================= */
.panel-proj-embed {
  position: relative; aspect-ratio: 16/9;
  width: 100%; border-radius: var(--radius-sm);
  overflow: hidden; background: #000;
  margin-bottom: clamp(24px, 4vh, 40px);
}
/* =============================================================
   LECTEUR VIDÉO INTERNE
   ============================================================= */
.vp {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background: #000; overflow: hidden;
  outline: none;
}
.vp-video {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  background: #000; cursor: pointer;
}
.vp:fullscreen .vp-video { object-fit: contain; }

/* Gros bouton lecture central (état initial / pause) */
.vp-bigplay {
  position: absolute; inset: 0; margin: auto;
  width: max-content; height: max-content;
  background: none; border: none; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}
.vp-bigplay .ring {
  width: clamp(64px, 7vw, 88px); height: clamp(64px, 7vw, 88px);
}
.vp-bigplay svg { margin-left: 4px; }
.vp.vp-playing .vp-bigplay { opacity: 0; transform: scale(.8); pointer-events: none; }
@media (hover: hover) {
  .vp-bigplay:hover .ring { background: rgba(255,255,255,.2); border-color: #fff; transform: scale(1.07); }
}

/* Spinner de chargement */
.vp-spinner {
  position: absolute; inset: 0; margin: auto;
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: vpSpin .8s linear infinite; pointer-events: none;
}
@keyframes vpSpin { to { transform: rotate(360deg); } }

/* Barre de contrôles */
.vp-controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 26px 16px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
  opacity: 0; transform: translateY(8px);
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
  font-family: var(--font-mono);
}
.vp.vp-show .vp-controls,
.vp:not(.vp-playing) .vp-controls { opacity: 1; transform: none; }
.vp-controls .vp-btn {
  flex-shrink: 0; width: 34px; height: 34px; padding: 6px;
  background: none; border: none; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.vp-controls .vp-btn svg { width: 100%; height: 100%; }
@media (hover: hover) { .vp-controls .vp-btn:hover { opacity: .75; } }
.vp-time { font-size: 11px; color: rgba(255,255,255,.85); flex-shrink: 0; min-width: 38px; }
.vp-time.vp-dur { text-align: right; }

/* Barre de progression */
.vp-bar {
  position: relative; flex: 1; height: 24px; cursor: pointer;
  display: flex; align-items: center; touch-action: none;
}
.vp-bar::before {
  content: ''; position: absolute; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,.25); border-radius: 2px;
}
.vp-buffered, .vp-played {
  position: absolute; left: 0; height: 3px; border-radius: 2px;
}
.vp-buffered { background: rgba(255,255,255,.4); width: 0; }
.vp-played   { background: #fff; width: 0; }
.vp-knob {
  position: absolute; left: 0; top: 50%;
  width: 11px; height: 11px; border-radius: 50%; background: #fff;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 160ms var(--ease-out);
}
.vp-bar:hover .vp-knob, .vp-bar:focus-visible .vp-knob { transform: translate(-50%, -50%) scale(1); }

@media (prefers-reduced-motion: reduce) {
  .vp-spinner { animation: none; }
  .vp-bigplay, .vp-controls { transition: none; }
}

/* =============================================================
   DARK MODE
   ============================================================= */
@media (prefers-color-scheme: dark) {
  :root {
    --paper-0:   #0d1113;
    --paper-1:   #151b1e;
    --paper-ink: #eef0ee;
    --muted:     #8a9099;
    --muted-2:   #5a6166;
    --line:      rgba(255,255,255,.07);
  }
}

/* =============================================================
   SKIP TO CONTENT (accessibilité)
   ============================================================= */
.skip-link {
  position: fixed; top: -120%; left: 50%;
  transform: translateX(-50%);
  background: var(--paper-ink); color: var(--paper-0);
  padding: 10px 22px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 9999; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  transition: top 200ms var(--ease-out);
}
.skip-link:focus { top: 0; outline: none; }

/* =============================================================
   CROSSFADE FLASH entre slides
   ============================================================= */
#slide-flash {
  position: fixed; inset: 0; z-index: 71;
  background: rgba(8, 11, 12, .22);
  opacity: 0; pointer-events: none;
  transition: opacity 150ms var(--ease-out);
}
#slide-flash.active { opacity: 1; }

/* =============================================================
   TOAST NOTIFICATION
   ============================================================= */
.toast {
  position: fixed;
  bottom: 88px; left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: rgba(8, 11, 12, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  opacity: 0; pointer-events: none;
  transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out);
  z-index: 500; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =============================================================
   PWA INSTALL BANNER
   ============================================================= */
.install-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(8, 11, 12, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 18px clamp(20px, 5vw, 48px);
  z-index: 200; color: #fff;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  animation: fadeUp 400ms var(--ease-out) both;
}
.install-banner button {
  background: none; border: 1px solid rgba(255,255,255,.35);
  color: inherit; padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: inherit; font-size: inherit; letter-spacing: inherit;
  cursor: pointer; transition: background 200ms var(--ease-out);
  min-height: 40px;
}
@media (hover: hover) {
  .install-banner button:hover { background: rgba(255,255,255,.10); }
}
.install-dismiss { border: none !important; opacity: .45; padding: 8px !important; }

/* =============================================================
   CTA SECONDAIRE (booking, PDF)
   ============================================================= */
.panel-cta-secondary {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,.4); text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.16);
  padding-bottom: 2px;
  transition: color 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
@media (hover: hover) {
  .panel-cta-secondary:hover {
    color: rgba(255,255,255,.75);
    border-color: rgba(255,255,255,.45);
  }
}

/* =============================================================
   BOUTON PARTAGER
   ============================================================= */
.panel-share-btn {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 24px;
  background: none; border: 1px solid rgba(255,255,255,.18);
  padding: 9px 20px; border-radius: var(--radius-pill);
  color: rgba(255,255,255,.45);
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer;
  transition: border-color 220ms var(--ease-out), color 220ms var(--ease-out);
}
@media (hover: hover) {
  .panel-share-btn:hover { border-color: rgba(255,255,255,.5); color: rgba(255,255,255,.9); }
}

/* =============================================================
   LOGOS CLIENTS
   ============================================================= */
.panel-clients { margin-top: clamp(52px, 8vh, 88px); }
.panel-clients-kicker { margin-bottom: clamp(20px, 3vh, 32px) !important; }
.panel-clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(80px, 14vw, 140px), 1fr));
  gap: clamp(10px, 1.5vw, 18px);
}
.panel-client-logo {
  aspect-ratio: 2/1;
  background: rgba(255,255,255,.05);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: background 200ms var(--ease-out);
}
@media (hover: hover) {
  .panel-client-logo:hover { background: rgba(255,255,255,.09); }
}
.panel-client-logo img {
  max-width: 68%; max-height: 58%;
  object-fit: contain; display: block;
  filter: brightness(0) invert(1); opacity: .45;
  transition: opacity 200ms var(--ease-out);
}
.panel-client-logo:hover img { opacity: .8; }
.panel-client-placeholder {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,.15);
}

/* =============================================================
   GRILLE TOUS LES PROJETS
   ============================================================= */
.panel-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 32vw, 360px), 1fr));
  gap: clamp(14px, 2.2vw, 26px);
  margin-top: clamp(32px, 5vh, 52px);
}
.proj-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-sm);
  aspect-ratio: 16/10;
  cursor: pointer;
  background: rgba(255,255,255,.06);
}
.proj-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.05);
  transition: transform 500ms var(--ease-out);
}
@media (hover: hover) {
  .proj-card:hover .proj-card-bg { transform: scale(1); }
  .proj-card:hover .proj-card-info { opacity: 1; }
}
.proj-card-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,11,12,.7) 0%, transparent 55%);
}
.proj-card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: clamp(14px, 2.2vw, 22px);
  transition: opacity 200ms var(--ease-out);
}
.proj-card-cat {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,.5); margin-bottom: 5px;
}
.proj-card-title {
  font-family: var(--font-display);
  font-size: clamp(17px, 2.4vw, 26px);
  font-weight: 400; letter-spacing: -0.02em;
  color: rgba(255,255,255,.92); margin: 0;
}

/* =============================================================
   LIGHTBOX — nav prev / next
   ============================================================= */
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.45);
  font-size: 44px; line-height: 1;
  padding: 16px; min-height: 80px;
  display: flex; align-items: center;
  transition: color 200ms var(--ease-out);
  user-select: none;
}
.lightbox-prev { left: clamp(6px, 1.5vw, 20px); }
.lightbox-next { right: clamp(6px, 1.5vw, 20px); }
@media (hover: hover) {
  .lightbox-prev:hover, .lightbox-next:hover { color: #fff; }
}
.lightbox-prev[hidden], .lightbox-next[hidden] { display: none; }

/* =============================================================
   AMBIENT COLOR — cursor + progress bar
   ============================================================= */
@media (hover: hover) and (pointer: fine) {
  .cursor-ring { border-color: var(--cursor-ambient, rgba(255,255,255,.5)); }
}
.progress-bar { background: var(--progress-ambient, rgba(255,255,255,.55)); }

/* =============================================================
   DRAG DESKTOP — curseur grab
   ============================================================= */
body.is-dragging .scroller { cursor: grabbing !important; }

/* =============================================================
   LQIP / BLUR-UP
   ============================================================= */
.bg[data-src] {
  filter: blur(12px);
  transform: scale(1.08);
  transition: filter 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.bg[data-src].loaded {
  filter: none;
  transform: scale(1.04);
}
.slide.is-active .bg[data-src].loaded { transform: scale(1.12); }

/* =============================================================
   PRINT
   ============================================================= */
@media print {
  #slide-flash, #intro, .cursor-ring, .cursor-dot,
  .nav-overlay, .progress-bar, #app::after,
  .dots, .scroll-hint, .topbar-right { display: none !important; }
  .scroller { overflow: visible; height: auto; scroll-snap-type: none; }
  .snap { height: auto; page-break-inside: avoid; }
  .slide { min-height: 60vh; }
  body { background: #fff; color: #000; }
}

/* =============================================================
   PANEL CLIENTS — animation (join existing panel-in rule)
   ============================================================= */
.page-panel.is-open .panel-clients { animation: panel-in 520ms 540ms var(--ease-out) both; }
.page-panel.is-open .panel-projects-grid { animation: panel-in 520ms 280ms var(--ease-out) both; }

/* =============================================================
   FORMULAIRE DE CONTACT
   ============================================================= */
.contact-form { margin-top: clamp(28px, 4vh, 44px); max-width: 640px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 20px); }
@media (max-width: 560px) { .cf-row { grid-template-columns: 1fr; } }
.cf-field { display: block; margin-bottom: clamp(14px, 2vh, 20px); }
.cf-field > span {
  display: block; margin-bottom: 7px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.contact-form input,
.contact-form textarea {
  width: 100%; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius-sm);
  padding: 12px 14px; color: #fff;
  font-family: var(--font-body); font-size: 15px;
  transition: border-color 200ms var(--ease-out), background 200ms var(--ease-out);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.08);
}
.cf-foot { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 6px; }
.cf-submit {
  background: #fff; color: #11140f; border: none;
  border-radius: var(--radius-pill); padding: 13px 30px;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  cursor: pointer; min-height: 48px;
  transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out);
}
@media (hover: hover) { .cf-submit:hover { transform: translateY(-1px); } }
.cf-submit[disabled] { opacity: .5; cursor: default; transform: none; }
.cf-alt {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  color: rgba(255,255,255,.45); text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.18); padding-bottom: 2px;
}
@media (hover: hover) { .cf-alt:hover { color: rgba(255,255,255,.8); } }
.cf-status { margin-top: 16px; font-size: 14px; min-height: 20px; }
.cf-status.ok  { color: #9fd3b0; }
.cf-status.bad { color: #e3a79a; }

/* =============================================================
   OVERLAY RACCOURCIS CLAVIER (#12)
   ============================================================= */
.shortcuts-overlay {
  position: fixed; inset: 0; z-index: 450;
  background: rgba(8,11,12,.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 200ms var(--ease-out) both;
}
.sc-card {
  position: relative; background: var(--paper-0); color: var(--paper-ink);
  border-radius: var(--radius-md); padding: clamp(24px,4vw,38px);
  width: min(440px, 90vw); box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.sc-card h3 { margin: 0 0 18px; font-size: 18px; font-weight: 600; }
.sc-card dl { margin: 0; display: flex; flex-direction: column; gap: 11px; }
.sc-card dl > div { display: flex; align-items: baseline; gap: 16px; }
.sc-card dt {
  font-family: var(--font-mono); font-size: 12px; min-width: 92px;
  color: var(--paper-ink); background: var(--paper-1);
  padding: 4px 9px; border-radius: 6px; white-space: nowrap;
}
.sc-card dd { margin: 0; font-size: 14px; color: var(--muted); }
.sc-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 26px; line-height: 1;
  cursor: pointer; color: var(--muted-2);
}
@media (hover: hover) { .sc-close:hover { color: var(--paper-ink); } }

/* =============================================================
   VIDÉO DE FOND EN BOUCLE SUR LES SLIDES (#7)
   ============================================================= */
.slide-media .bg-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity 800ms var(--ease-out);
}
.slide.is-active .slide-media .bg-video.ready { opacity: 1; }

/* =============================================================
   CONTRÔLES VIDÉO SUPPLÉMENTAIRES (#8 — vitesse, PiP)
   ============================================================= */
.vp-speed {
  font-family: var(--font-mono); font-size: 11px; min-width: 38px;
  letter-spacing: .04em;
}
@media (max-width: 480px) { .vp-pip { display: none; } }

/* =============================================================
   DIAPORAMA — bouton lecture auto dans la lightbox (#9)
   ============================================================= */
.lightbox-play {
  position: absolute; bottom: clamp(16px,3vh,30px); left: 50%;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  color: #fff; border-radius: var(--radius-pill); cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; padding: 9px 18px; min-height: 40px;
  transition: background 200ms var(--ease-out);
}
@media (hover: hover) { .lightbox-play:hover { background: rgba(255,255,255,.2); } }
.lightbox.playing .lightbox-play { background: rgba(255,255,255,.22); }

/* =============================================================
   #1 — EXIF dans la lightbox
   ============================================================= */
.lightbox-exif {
  position: absolute; left: clamp(16px, 3vw, 30px);
  bottom: max(clamp(16px, 3vh, 30px), var(--sab));
  margin: 0; max-width: min(70vw, 520px);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  color: rgba(255,255,255,.62);
  background: rgba(8,11,12,.42); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 7px 13px; border-radius: var(--radius-pill);
  pointer-events: none;
}
.lightbox-exif[hidden] { display: none; }

/* =============================================================
   #5 — View Transitions (fondu entre photos)
   ============================================================= */
.lightbox-img { view-transition-name: ef-photo; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(ef-photo),
  ::view-transition-new(ef-photo) { animation-duration: 280ms; }
}

/* =============================================================
   #4 — Badge « lecture auto » (mode showreel)
   ============================================================= */
.showreel-badge {
  position: fixed; z-index: 66;
  left: 50%; top: max(clamp(70px, 11vh, 110px), calc(var(--sat) + 54px));
  transform: translateX(-50%) translateY(-6px);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(255,255,255,.7);
  background: rgba(8,11,12,.4); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px; border-radius: var(--radius-pill);
  opacity: 0; pointer-events: none;
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.showreel-badge.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =============================================================
   #11 — Mode économie de données : on allège le rendu
   ============================================================= */
html.save-data #app::after { display: none; }          /* pas de grain */
html.save-data .slide-media .bg-video { display: none; }
