/* =========================================================
   Francesco Guido — Photographie & Création web
   Feuille de style principale
   • Palette claire, un seul accent de couleur
   • Typographie : Cormorant (titres) + Montserrat (texte)
   • Contrastes ≥ 4.5:1, cibles tactiles ≥ 44 px, reduced-motion
   ========================================================= */

:root {
  /* Couleurs sémantiques */
  --bg: #f7f5f1;
  --surface: #ffffff;
  --surface-2: #eeeae3;
  --fg: #111111;
  --fg-muted: #5a544c;            /* 6.9:1 sur --bg */
  --accent: #8a4f2a;              /* 6.0:1 sur --bg — texte & actions */
  --accent-deco: #c9976c;         /* décoratif uniquement (jamais du texte) */
  --border: rgba(17, 17, 17, .14);
  --dark: #111111;
  --on-dark: #f7f5f1;
  --on-dark-muted: #b8b1a6;       /* 8.9:1 sur --dark */
  --on-dark-accent: #e0b48c;      /* 9.5:1 sur --dark */
  --line-dark: rgba(247, 245, 241, .16);
  --danger: #a3261b;              /* 6.4:1 */
  --success: #2e6b35;             /* 6.1:1 */

  /* Typographie */
  --serif: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", system-ui, -apple-system, sans-serif;
  --fs-body: 1rem;                /* 16 px minimum */
  --fs-lead: clamp(1.05rem, 1rem + .3vw, 1.2rem);
  --fs-h3: clamp(1.6rem, 1.3rem + 1vw, 2.1rem);
  --fs-display: clamp(2.6rem, 1.8rem + 3.6vw, 5.2rem);
  --fs-giant: clamp(3.2rem, 1.6rem + 8vw, 10.5rem);

  /* Espacements (échelle 8 pt) */
  --s1: .5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2rem; --s6: 3rem; --s8: 4rem; --s12: 6rem; --s16: 8rem;
  --pad: clamp(1rem, 5vw, 5rem);
  --maxw: 1440px;

  /* Mouvement */
  --dur-fast: 180ms;
  --dur: 320ms;
  --dur-slow: 700ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1);   /* arrivée : décélération */
  --ease-in: cubic-bezier(.7, 0, .84, 0);    /* sortie : accélération */

  /* Calques */
  --z-nav: 40; --z-rail: 30; --z-modal: 100; --z-skip: 1000;

  --radius: 4px;

  /* Surfaces spécifiques (redéfinies en thème sombre) */
  --nav-bg: rgba(247, 245, 241, .9);
  --ctrl-bg: rgba(255, 255, 255, .85);
  --ctrl-bg-hover: #fff;
  --sig-card: linear-gradient(160deg, #fffdf9, #f1ece4);
  --lightbox-bg: rgba(247, 245, 241, .97);
  --track: rgba(17, 17, 17, .14);
  --on-accent: #fff;
  --shadow-rgb: 40, 30, 20;
  --logo-filter: none;
  color-scheme: light dark;
}

/* ---------- Thème sombre : suit automatiquement le réglage de l'iPhone / de l'ordinateur ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110;
    --surface: #1b1a18;
    --surface-2: #25221f;
    --fg: #f2efe9;
    --fg-muted: #b3aca2;            /* 8.4:1 sur --bg */
    --accent: #e0b48c;              /* 9.6:1 sur --bg */
    --accent-deco: #c9976c;
    --border: rgba(242, 239, 233, .14);
    --dark: #1d1b18;                /* sections « foncées » légèrement plus claires que la page */
    --on-dark: #f2efe9;
    --on-dark-muted: #b8b1a6;
    --on-dark-accent: #e0b48c;
    --line-dark: rgba(242, 239, 233, .14);
    --danger: #ff8f80;
    --success: #86d08f;

    --nav-bg: rgba(18, 17, 16, .88);
    --ctrl-bg: rgba(37, 34, 31, .88);
    --ctrl-bg-hover: #34302b;
    --sig-card: linear-gradient(160deg, #24211d, #171513);
    --lightbox-bg: rgba(12, 11, 10, .97);
    --track: rgba(242, 239, 233, .2);
    --on-accent: #121110;
    --shadow-rgb: 0, 0, 0;
    --logo-filter: invert(1) brightness(.95);   /* signature noire → blanche */
    color-scheme: dark;
  }
}
/* Choix manuel (bouton lune / soleil) : prioritaire sur le réglage du téléphone */
:root[data-theme="dark"] {
    --bg: #121110;
    --surface: #1b1a18;
    --surface-2: #25221f;
    --fg: #f2efe9;
    --fg-muted: #b3aca2;            /* 8.4:1 sur --bg */
    --accent: #e0b48c;              /* 9.6:1 sur --bg */
    --accent-deco: #c9976c;
    --border: rgba(242, 239, 233, .14);
    --dark: #1d1b18;                /* sections « foncées » légèrement plus claires que la page */
    --on-dark: #f2efe9;
    --on-dark-muted: #b8b1a6;
    --on-dark-accent: #e0b48c;
    --line-dark: rgba(242, 239, 233, .14);
    --danger: #ff8f80;
    --success: #86d08f;

    --nav-bg: rgba(18, 17, 16, .88);
    --ctrl-bg: rgba(37, 34, 31, .88);
    --ctrl-bg-hover: #34302b;
    --sig-card: linear-gradient(160deg, #24211d, #171513);
    --lightbox-bg: rgba(12, 11, 10, .97);
    --track: rgba(242, 239, 233, .2);
    --on-accent: #121110;
    --shadow-rgb: 0, 0, 0;
    --logo-filter: invert(1) brightness(.95);   /* signature noire → blanche */
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
/* Signature noire (logo-name.png) : passe en blanc sur fond sombre */
img[src$="logo-name.png"] { filter: var(--logo-filter); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: var(--fs-body); line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
em, .italic { font-family: var(--serif); font-style: italic; font-weight: 500; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.15; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.ph { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: fixed; left: var(--s2); top: -4rem; z-index: var(--z-skip);
  background: var(--fg); color: var(--bg); padding: .8rem 1.2rem; border-radius: var(--radius);
  text-decoration: none; font-weight: 600; transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--s2); }
main:focus { outline: none; }

.eyebrow {
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600;
  color: var(--accent); margin-bottom: var(--s3);
}
.h-display { font-family: var(--serif); font-size: var(--fs-display); line-height: 1; letter-spacing: -.015em; margin-bottom: var(--s4); }
.h-display--xl { font-size: clamp(3rem, 2rem + 5vw, 7rem); }
.h-display em, .chapter__title em, .chapter__title .italic, .hero__title em { color: var(--accent); }
.h-sub { font-family: var(--serif); font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem); margin-bottom: var(--s4); }

/* ---------- Boutons (≥ 44 px) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .8rem 1.6rem; border-radius: 100px;
  font-size: .9rem; font-weight: 600; letter-spacing: .02em; text-decoration: none;
  border: 1.5px solid currentColor; background: transparent;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn .ph { width: 18px; height: 18px; transition: transform var(--dur) var(--ease-out); }
.btn:hover .ph { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--ghost { color: var(--fg); }
.btn--ghost:hover { background: var(--fg); color: var(--bg); }
.btn--light { background: var(--on-dark); color: var(--dark); border-color: var(--on-dark); }
.btn--light:hover { background: var(--on-dark-accent); border-color: var(--on-dark-accent); }
.btn--sm { min-height: 44px; padding: .55rem 1.2rem; font-size: .85rem; }
.btn--lg { min-height: 56px; padding: 1rem 2rem; font-size: 1rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: var(--z-nav);
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s2) var(--pad);
  transition: background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), padding var(--dur) var(--ease-out);
}
/* Le flou est posé sur un calque (::before) et non sur .nav :
   sur Safari/iOS, un backdrop-filter sur .nav enfermerait le menu plein écran
   (position: fixed) dans la barre du haut. */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
  opacity: 0; transition: opacity var(--dur) var(--ease-out);
}
.nav.is-scrolled::before { opacity: 1; }
.nav.is-scrolled { padding-block: .6rem; }
body.menu-open .nav::before { opacity: 0; }
.nav__logo { margin-right: auto; display: flex; align-items: center; min-height: 44px; }
.nav__sig { height: 44px; width: auto; transition: height var(--dur) var(--ease-out); }
.nav.is-scrolled .nav__sig { height: 36px; }
.nav__links { display: flex; align-items: center; gap: var(--s3); }
.nav__links a:not(.btn) {
  position: relative; text-decoration: none; font-size: .9rem; font-weight: 500; color: var(--fg-muted);
  padding: .7rem 0; transition: color var(--dur-fast);
}
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .45rem; height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease-out);
}
.nav__links a:not(.btn):hover, .nav__links a[aria-current="true"] { color: var(--fg); }
.nav__links a:not(.btn):hover::after, .nav__links a[aria-current="true"]::after { transform: scaleX(1); }

.lang { display: flex; gap: 2px; border: 1px solid var(--border); border-radius: 100px; padding: 3px; }
.lang button {
  min-width: 40px; min-height: 36px; border: 0; border-radius: 100px; background: none;
  font-size: .75rem; font-weight: 600; letter-spacing: .06em; color: var(--fg-muted);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.lang button:hover { color: var(--fg); }
.lang button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

.nav__burger { display: none; flex: none; width: 44px; height: 44px; border: 0; background: none; position: relative; }
.nav__burger span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--fg); transition: transform var(--dur) var(--ease-out), top var(--dur) var(--ease-out); }
.nav__burger span:first-child { top: 17px; }
.nav__burger span:last-child { top: 26px; }
.nav__burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Repère de chapitres ---------- */
.rail {
  position: fixed; right: var(--s3); top: 50%; transform: translateY(-50%); z-index: var(--z-rail);
  display: flex; flex-direction: column; gap: .2rem;
}
.rail a {
  position: relative; display: flex; align-items: center; justify-content: flex-end; min-height: 32px;
  text-decoration: none; font-size: .7rem; font-weight: 600; letter-spacing: .12em; color: var(--fg-muted);
}
.rail em {
  font-family: var(--sans); font-style: normal; font-weight: 500; font-size: .75rem; letter-spacing: .04em;
  position: absolute; right: calc(100% + .6rem); white-space: nowrap;
  opacity: 0; transform: translateX(6px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  background: var(--bg); padding: .1rem .4rem; border-radius: 3px;
}
.rail span::after { content: ""; display: inline-block; width: 14px; height: 1.5px; background: currentColor; margin-left: .5rem; vertical-align: middle; transition: width var(--dur) var(--ease-out); }
.rail a:hover em, .rail a:focus-visible em, .rail a[aria-current="true"] em { opacity: 1; transform: none; }
.rail a[aria-current="true"] { color: var(--accent); }
.rail a[aria-current="true"] span::after { width: 28px; }
.rail.on-dark a { color: var(--on-dark-muted); }
.rail.on-dark a[aria-current="true"] { color: var(--on-dark-accent); }
.rail.on-dark em { background: var(--dark); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: var(--s4);
  padding: 7rem var(--pad) var(--s8); max-width: var(--maxw); margin-inline: auto;
}
.hero__text { position: relative; z-index: 2; }
.hero__title { font-family: var(--serif); font-size: var(--fs-giant); line-height: .88; letter-spacing: -.03em; font-weight: 500; }
.hero__title span, .hero__title em { display: inline-block; margin-right: .18em; }
.hero__lead { max-width: 34rem; margin-top: var(--s4); font-size: var(--fs-lead); color: var(--fg-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }

.hero__3d { position: relative; height: min(84vh, 800px); }
/* Paquet de tirages en 3D — images originales, sans filtre */
.hero__3d { perspective: 1800px; perspective-origin: 50% 40%; }
.deck {
  --rx: 0deg; --ry: 0deg; --mx: 0; --my: 0;
  --cw: min(62%, calc((min(84vh, 800px) - 120px) * 2 / 3), 440px);
  position: absolute; left: 50%; top: 46%; width: var(--cw); aspect-ratio: 2 / 3;
  transform: translate(-50%, -50%) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d; cursor: pointer; outline-offset: 12px; border-radius: 6px;
}
.card {
  --k: 0;
  position: absolute; inset: 0; border-radius: 6px; overflow: hidden; background: var(--surface);
  transform-style: preserve-3d; backface-visibility: hidden;
  transform:
    translate3d(calc(var(--k) * 34px), calc(var(--k) * -22px), calc(var(--k) * -110px))
    rotateZ(calc(var(--k) * 2.2deg));
  box-shadow: 0 2px 4px rgba(var(--shadow-rgb), .08), 0 30px 60px -20px rgba(var(--shadow-rgb), .45);
  transition: transform .9s var(--ease-out), opacity .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
.card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.card.is-front {
  transform: translate3d(calc(var(--mx) * -10px), calc(var(--my) * -8px), 40px);
  box-shadow: 0 2px 6px rgba(var(--shadow-rgb), .1), calc(var(--mx) * -30px) calc(50px + var(--my) * -20px) 90px -25px rgba(var(--shadow-rgb), .55);
}
.card.is-hidden { opacity: 0; }
.card.is-out {
  transform: translate3d(-125%, 6%, 120px) rotateY(-28deg) rotateZ(-8deg);
  opacity: 0; transition: transform .52s var(--ease-in), opacity .45s var(--ease-in);
}
.card.no-anim { transition: none !important; }
.card--sig { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4rem; padding: 12%;
  background: var(--sig-card); }
.card--sig img { width: 100%; height: auto; object-fit: contain; }
.card--sig span { font-size: .72rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }

@media (max-width: 640px) {
  .deck { left: 46%; --cw: min(56vw, 260px); }
  .card { transform: translate3d(calc(var(--k) * 16px), calc(var(--k) * -12px), calc(var(--k) * -70px)) rotateZ(calc(var(--k) * 1.6deg)); }
  .card--sig span { font-size: .6rem; letter-spacing: .2em; }
}
@media (pointer: coarse) {
  .lang button { min-height: 44px; min-width: 44px; }
}
.hero__fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.hero__fallback img {
  grid-area: 1 / 1; width: 46%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius);
  box-shadow: 0 30px 60px -25px rgba(var(--shadow-rgb), .4);
}
.hero__fallback img:nth-child(1) { transform: translateX(-40%) rotate(-6deg) scale(.88); }
.hero__fallback img:nth-child(3) { transform: translateX(40%) rotate(6deg) scale(.88); }
.hero__3d.is-3d .hero__fallback { display: none; }
.hero__controls { position: absolute; left: var(--s2); bottom: var(--s2); z-index: 2; display: none; gap: var(--s1); }
.hero__3d.is-3d .hero__controls { display: flex; }
.hero__ctrl {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--ctrl-bg);
  display: grid; place-items: center; transition: background var(--dur-fast), transform var(--dur-fast);
}
.hero__ctrl:hover { background: var(--ctrl-bg-hover); }
.hero__ctrl:active { transform: scale(.95); }
.hero__ctrl .ph { width: 20px; height: 20px; color: var(--fg); }

#heroPause .i-play { display: none; }
#heroPause[aria-pressed="true"] .i-play { display: block; }
#heroPause[aria-pressed="true"] .i-pause { display: none; }
.hero__hint {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); white-space: nowrap;
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-muted);
  opacity: 0; transition: opacity 1s 1.5s;
}
.hero__3d.is-3d .hero__hint { opacity: 1; }
.hero__dots { position: absolute; left: 50%; bottom: 2.2rem; transform: translateX(-50%); display: flex; gap: .45rem; align-items: center; }
.hero__dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-muted); opacity: .3; transition: all var(--dur) var(--ease-out); }
.hero__dots span.is-sig { width: 14px; border-radius: 3px; }
.hero__dots span.is-active { background: var(--accent); opacity: 1; transform: scale(1.3); }
.hero__label { position: absolute; left: 50%; top: .5rem; transform: translateX(-50%); font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--accent); min-height: 1.4em; }

.scroll-cue {
  position: absolute; left: var(--pad); bottom: var(--s3); width: 44px; height: 44px;
  display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%;
}
.scroll-cue span { width: 1.5px; height: 16px; background: var(--fg); position: relative; animation: cue 1.8s var(--ease-out) 3; }
@keyframes cue { 0% { transform: translateY(-6px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(6px); opacity: 0; } }

/* ---------- Chapitres ---------- */
.chapter { padding: var(--s16) var(--pad); max-width: var(--maxw); margin-inline: auto; }
.chapter--dark { max-width: none; background: var(--dark); color: var(--on-dark); }
.chapter--dark > * { max-width: calc(var(--maxw) - 2 * var(--pad)); margin-inline: auto; }
.chapter--dark .chapter__intro { color: var(--on-dark-muted); }
.chapter--dark .chapter__num { color: var(--on-dark-accent); }
.chapter--dark .chapter__title em, .chapter--dark .chapter__title .italic { color: var(--on-dark-accent); }
.chapter__head { display: grid; grid-template-columns: auto 1fr; gap: 0 var(--s4); align-items: end; margin-bottom: var(--s8); }
.chapter__num { grid-row: span 2; align-self: start; padding-top: 1.2rem; font-size: .8rem; font-weight: 600; letter-spacing: .2em; color: var(--accent); }
.chapter__title { font-family: var(--serif); font-size: var(--fs-giant); line-height: .88; letter-spacing: -.03em; }
.chapter__intro { max-width: 40rem; margin-top: var(--s3); font-size: var(--fs-lead); color: var(--fg-muted); }
.chapter__intro a { color: var(--accent); font-weight: 500; }
.chapter__cta { margin-top: var(--s8); text-align: center; }

/* Logo de section : signature + mot-clé (même police partout) */
.sigmark { display: flex; flex-direction: column; width: min(480px, 88%); margin-bottom: var(--s3); }
.sigmark img { width: 100%; height: auto; }
.sigmark span {
  align-self: flex-end; margin: -.35rem 3% 0 0;
  font-family: var(--sans); font-size: clamp(.72rem, .6rem + .4vw, .95rem); font-weight: 600;
  letter-spacing: .32em; text-transform: uppercase; color: var(--fg);
}
.sigmark--light span { color: var(--on-dark); }
#photographie .chapter__title, #web .chapter__title { font-size: var(--fs-display); }

/* ---------- Filtres (chips ≥ 44 px) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s4); }
.chip {
  min-height: 44px; padding: .5rem 1.2rem; border-radius: 100px; border: 1px solid var(--border); background: transparent;
  font-size: .85rem; font-weight: 500; color: var(--fg-muted);
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.chip:hover { border-color: var(--fg); color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }

/* ---------- Galerie (grille régulière 2:3, aucun trou) ---------- */
.gallery { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
.gallery li[hidden] { display: none; }
.gallery__item {
  position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; overflow: hidden; border: 0; padding: 0;
  border-radius: var(--radius); background: var(--surface-2); cursor: zoom-in;
  opacity: 0; transform: translateY(20px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.gallery__item.is-visible { opacity: 1; transform: none; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.gallery__item:hover img, .gallery__item:focus-visible img { transform: scale(1.04); }
.gallery__cap {
  position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; align-items: center;
  padding: 2.5rem .9rem .8rem; background: linear-gradient(transparent, rgba(10, 8, 6, .7));
  color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  opacity: 0; transform: translateY(6px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.gallery__cap .ph { width: 18px; height: 18px; color: #fff; }
.gallery__item:hover .gallery__cap, .gallery__item:focus-visible .gallery__cap { opacity: 1; transform: none; }
.gallery__more { text-align: center; margin-top: var(--s4); }
.gallery__more[hidden] { display: none; }

/* ---------- Direction de pose ---------- */
.ticks { list-style: none; margin-top: var(--s3); display: grid; gap: .6rem; }
.ticks li { display: flex; gap: .7rem; align-items: baseline; }
.ticks li::before { content: ""; flex: none; width: 14px; height: 1.5px; background: var(--accent); transform: translateY(-4px); }
.poses { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--s12); align-items: center; margin-top: var(--s16); }
.poses__text p:not(.eyebrow) { color: var(--fg-muted); font-size: var(--fs-lead); max-width: 30rem; }
.poses__grid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s2); padding-bottom: var(--s6); }
.poses__grid li { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); aspect-ratio: 2 / 3; }
.poses__grid li:nth-child(even), .has-gsap .poses__grid li:nth-child(even) { transform: translateY(var(--s6)); }
.poses__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.poses__grid li:hover img { transform: scale(1.04); }
.poses__grid span { position: absolute; left: var(--s2); bottom: var(--s2); padding: .2rem .6rem; border-radius: 100px; background: rgba(17, 17, 17, .72); color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .14em; }
@media (max-width: 960px) {
  .poses { grid-template-columns: 1fr; gap: var(--s6); }
  .poses__grid { padding-bottom: var(--s3); }
  .poses__grid li:nth-child(even), .has-gsap .poses__grid li:nth-child(even) { transform: translateY(var(--s3)); }
}
.services3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); margin-top: var(--s16); padding-top: var(--s6); border-top: 1px solid var(--border); }
.services3 h3 { font-family: var(--serif); font-size: var(--fs-h3); margin-bottom: var(--s1); }
.services3 p { color: var(--fg-muted); }

/* ---------- Bandeau plein cadre ---------- */
.band { position: relative; height: clamp(360px, 70vh, 720px); overflow: hidden; background: var(--dark); }
.band img { position: absolute; inset: -12% 0; width: 100%; height: 124%; object-fit: cover; object-position: 50% 30%; will-change: transform; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 8, 6, .1), rgba(10, 8, 6, .55)); }
.band figcaption {
  position: absolute; inset: auto var(--pad) var(--s8); z-index: 1; max-width: 22ch;
  font-family: var(--serif); font-style: italic; font-size: clamp(2rem, 1.4rem + 3vw, 4.4rem); line-height: 1.05; color: #fff;
}

/* ---------- Texte défilant ---------- */
.marquee { overflow: hidden; background: var(--dark); color: var(--on-dark); border-bottom: 1px solid var(--line-dark); padding-block: var(--s3); }
.marquee__track { display: flex; align-items: center; gap: var(--s4); width: max-content; animation: marquee 38s linear infinite; }
.marquee__track span { font-family: var(--serif); font-size: clamp(1.8rem, 1.3rem + 2vw, 3.2rem); line-height: 1; white-space: nowrap; }
.marquee__track span:nth-of-type(odd) { font-style: italic; color: var(--on-dark-accent); }
.marquee__track i { width: 8px; height: 8px; border-radius: 50%; background: var(--on-dark-muted); flex: none; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none !important; } }

/* ---------- Web ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s6); }
.project { display: block; text-decoration: none; }
.browser { border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8); transition: transform var(--dur-slow) var(--ease-out); }
.project:hover .browser, .project:focus-visible .browser { transform: translateY(-6px); }
.browser__bar { display: flex; align-items: center; gap: .35rem; padding: .6rem .8rem; background: #ece8e1; font-size: .75rem; color: #4a453e; }
.browser__bar i { width: .6rem; height: .6rem; border-radius: 50%; background: #d4ccc0; }
.browser__bar span { margin-left: .8rem; background: #fff; border-radius: 4px; padding: .12rem .7rem; flex: 1; }
.browser img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; }
.project__meta { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s2); padding-top: var(--s3); }
.project__meta h4 { font-family: var(--serif); font-size: 2rem; line-height: 1.1; }
.project__meta p { font-size: .9rem; color: var(--on-dark-muted); }
.link-arrow { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-size: .9rem; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.chapter--dark .link-arrow { color: var(--on-dark-accent); }
.link-arrow .ph { width: 20px; height: 20px; transition: transform var(--dur) var(--ease-out); }
.project:hover .link-arrow .ph, a.link-arrow:hover .ph { transform: translate(2px, -2px); }

.features { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: var(--s12); border-top: 1px solid var(--line-dark); }
.features li { padding: var(--s4) var(--s4) var(--s4) 0; border-bottom: 1px solid var(--line-dark); }
.features li:not(:nth-child(3n)) { border-right: 1px solid var(--line-dark); }
.features li:not(:nth-child(3n + 1)) { padding-left: var(--s4); }
.icon { width: 32px; height: 32px; color: var(--on-dark-accent); margin-bottom: var(--s3); }
.features h3 { font-family: var(--serif); font-size: var(--fs-h3); margin-bottom: var(--s1); }
.features p { color: var(--on-dark-muted); font-size: .95rem; }

/* ---------- Studio ---------- */
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); align-items: stretch; }
.offer { display: flex; flex-direction: column; padding: var(--s6) var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.offer:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -40px rgba(var(--shadow-rgb), .45); }
.offer--featured { background: var(--dark); color: var(--on-dark); border-color: var(--dark); }
.offer__tag { font-size: .75rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.offer--featured .offer__tag { color: var(--on-dark-accent); }
.offer h3 { font-family: var(--serif); font-size: 2.4rem; margin: var(--s1) 0 var(--s3); }
.offer ul { list-style: none; flex: 1; }
.offer li { display: flex; gap: .6rem; padding: .7rem 0; border-bottom: 1px solid var(--border); font-size: .93rem; color: var(--fg-muted); }
.offer li::before { content: "—"; color: var(--accent); }
.offer--featured li { color: var(--on-dark-muted); border-color: var(--line-dark); }
.offer--featured li::before { color: var(--on-dark-accent); }
.offer__price { font-family: var(--serif); font-size: 1.6rem; margin: var(--s4) 0 var(--s2); }

.process { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); }
.process li { border-top: 1.5px solid var(--fg); padding-top: var(--s2); }
.process span { font-size: .78rem; font-weight: 600; letter-spacing: .2em; color: var(--accent); }
.process h4 { font-family: var(--serif); font-size: 1.9rem; margin: .3rem 0 .4rem; }
.process p { color: var(--fg-muted); font-size: .95rem; }
.h-sub + .process, .offers + .h-sub { margin-top: var(--s12); }

/* ---------- À propos ---------- */
.about { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s12); align-items: center; padding: var(--s16) var(--pad); background: var(--surface-2); }
.about__img { overflow: hidden; border-radius: var(--radius); box-shadow: 0 40px 80px -50px rgba(var(--shadow-rgb), .55); }
.about__img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 40% 60%; }
.about__text p:not(.eyebrow):not(.about__tags) { color: var(--fg-muted); font-size: var(--fs-lead); margin-bottom: var(--s2); max-width: 36rem; }
.about__quote {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.25;
  color: var(--fg); margin: var(--s4) 0 var(--s3); padding-left: var(--s3); border-left: 1.5px solid var(--accent); max-width: 30rem;
}
.about__tags { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--accent); margin: calc(var(--s2) * -1) 0 var(--s3); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--s12); padding: var(--s16) var(--pad); max-width: var(--maxw); margin-inline: auto; }
.contact__intro > p:not(.eyebrow) { color: var(--fg-muted); font-size: var(--fs-lead); max-width: 28rem; }
.contact__list { list-style: none; margin-top: var(--s6); }
.contact__list li { display: grid; gap: .1rem; padding: var(--s2) 0; border-top: 1px solid var(--border); }
.contact__list li:last-child { border-bottom: 1px solid var(--border); }
.contact__list span { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-muted); }
.contact__list a { font-family: var(--serif); font-size: 1.5rem; text-decoration: none; overflow-wrap: anywhere; transition: color var(--dur-fast); }
.contact__list a:hover { color: var(--accent); }

.form { display: flex; flex-direction: column; gap: var(--s3); }
.form__req { font-size: .85rem; color: var(--fg-muted); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fg); }
.field abbr { color: var(--danger); text-decoration: none; }
.field input, .field select, .field textarea {
  min-height: 48px; padding: .75rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  font-size: 1rem; transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px rgba(138, 79, 42, .25); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field__error { font-size: .85rem; color: var(--danger); min-height: 0; }
.field__error:empty { display: none; }
.form .btn { align-self: flex-start; }
.form__status { font-size: .95rem; }
.form__status.ok { color: var(--success); }
.form__status.err { color: var(--danger); }
.hp { position: absolute !important; left: -9999px !important; }

/* ---------- Footer ---------- */
.footer { padding: var(--s12) var(--pad) var(--s4); background: var(--dark); color: var(--on-dark-muted); }
.footer__sig { width: min(560px, 90%); opacity: .95; }
.footer__row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s8); padding-top: var(--s3); border-top: 1px solid var(--line-dark); font-size: .85rem; }
.footer__row nav { display: flex; gap: var(--s3); flex-wrap: wrap; }
.footer__row a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; transition: color var(--dur-fast); }
.footer__row a:hover { color: var(--on-dark); }

/* ---------- Visionneuse ---------- */
.lightbox { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--lightbox-bg); display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: var(--s3); animation: lbFade var(--dur) var(--ease-out); }
.lightbox[hidden] { display: none; }
@keyframes lbFade { from { opacity: 0; } }
.lightbox figure { display: flex; flex-direction: column; align-items: center; gap: var(--s2); max-height: 100%; }
.lightbox img { max-height: 84vh; max-width: 100%; object-fit: contain; box-shadow: 0 30px 80px -40px rgba(var(--shadow-rgb), .5); animation: lbIn var(--dur-slow) var(--ease-out); }
@keyframes lbIn { from { opacity: 0; transform: scale(.97); } }
.lightbox figcaption { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-muted); }
.lightbox button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; transition: background var(--dur-fast); }
.lightbox button:hover { background: var(--surface-2); }
.lightbox button .ph { width: 22px; height: 22px; color: var(--fg); }
.lightbox__close { position: absolute; top: var(--s2); right: var(--s2); }

/* ---------- Apparitions (échelonnées) ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }
/* GSAP (js/motion.js) prend le relais : les apparitions CSS de secours sont neutralisées */
.has-gsap .reveal, .has-gsap .gallery__item { opacity: 1; transform: none; transition: none; }

/* ---------- Responsive (375 / 768 / 1024 / 1440) ---------- */
@media (max-width: 1540px) { .rail { display: none; } }

@media (max-width: 1180px) {
  .offers { grid-template-columns: 1fr; max-width: 38rem; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .features li:not(:nth-child(3n)) { border-right: 0; }
  .features li:not(:nth-child(3n + 1)) { padding-left: 0; }
  .features li:nth-child(odd) { border-right: 1px solid var(--line-dark); padding-right: var(--s4); }
  .features li:nth-child(even) { padding-left: var(--s4); }
  .process { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .nav__burger { display: block; z-index: 2; }
  .nav__links {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 1;
    flex-direction: column; justify-content: center; gap: var(--s2);
    padding: env(safe-area-inset-top, 0px) var(--pad) env(safe-area-inset-bottom, 0px);
    overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg); opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease-out), visibility var(--dur);
  }
  .nav__links.is-open { opacity: 1; visibility: visible; }
  .nav__links a:not(.btn) { font-family: var(--serif); font-size: 2rem; color: var(--fg); }
  .lang { z-index: 2; }
  .nav__logo { position: relative; z-index: 2; }

  .hero { grid-template-columns: 1fr; padding-top: 5rem; gap: 0; }
  .hero__3d { order: -1; height: 52vh; min-height: 340px; margin-inline: calc(var(--pad) * -1); }
  .hero__hint { font-size: .72rem; white-space: normal; width: 90%; text-align: center; }
  /* mobile : contrôles centrés, les points de progression laissent la place */
  .hero__dots { display: none; }
  .hero__controls { left: 50%; transform: translateX(-50%); bottom: 2.2rem; }
  .scroll-cue { display: none; }
  .chapter__head { grid-template-columns: 1fr; }
  .chapter__num { grid-row: auto; padding: 0 0 var(--s1); }
  .about, .contact { grid-template-columns: 1fr; gap: var(--s6); }
  .services3 { grid-template-columns: 1fr; gap: var(--s4); }
  .projects { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .lightbox { padding: var(--s2); grid-template-columns: 1fr; }
  .lightbox__nav { position: absolute; bottom: var(--s2); }
  .lightbox__prev { left: var(--s2); }
  .lightbox__next { right: var(--s2); }
}

@media (max-width: 640px) {
  .nav { gap: var(--s1); }
  .nav__sig { height: 34px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: var(--s1); }
  .features { grid-template-columns: 1fr; }
  .features li:nth-child(odd) { border-right: 0; padding-right: 0; }
  .features li:nth-child(even) { padding-left: 0; }
  .process { grid-template-columns: 1fr; }
  .project__meta { flex-direction: column; align-items: flex-start; }
  .chapter, .about, .contact { padding-block: var(--s12); }
  .hero__actions .btn { flex: 1 1 100%; }
  .contact__list a { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .reveal, .gallery__item { opacity: 1; transform: none; }
  .band img { transform: none !important; }
}

/* =========================================================
   Effets mobiles
   ========================================================= */
.deck { touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.card.is-dragging { transition: none !important; will-change: transform; cursor: grabbing; }
.card.is-front { will-change: transform; }
.hero__stories { display: none; }

@media (max-width: 960px) {
  /* Barres « story » au-dessus du paquet */
  .hero__stories {
    position: absolute; left: 50%; top: .6rem; transform: translateX(-50%); z-index: 3;
    display: flex; gap: 4px; width: min(78vw, 340px);
  }
  .hero__stories span { flex: 1; height: 3px; border-radius: 3px; background: var(--track); overflow: hidden; }
  .hero__stories i { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
  .hero__stories .is-done i { transform: scaleX(1); }
  .hero__stories .is-active i { animation: story var(--hold, 5000ms) linear forwards; }
  .hero__3d.is-paused .hero__stories .is-active i { animation-play-state: paused; }
  .hero__label { top: 1.25rem; font-size: 1.15rem; line-height: 1.4; white-space: nowrap; }
  @keyframes story { to { transform: scaleX(1); } }

  /* Zoom lent sur la photo affichée */
  .card.is-front:not(.card--sig) img { animation: kenburns 7s ease-out both; }
  @keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }

  /* Carte plus présente */
  .hero__3d { height: auto; min-height: 0; aspect-ratio: auto; }
  /* Le titre (Portrait, Mode…) a sa propre ligne au-dessus de la carte */
  .hero__3d { height: calc(min(64vw, 300px) * 1.5 + 13.2rem); }
  .deck { --cw: min(64vw, 300px); top: calc(6.4rem + min(64vw, 300px) * .75); left: 50%; }
  .hero__controls { bottom: 3rem; }
  .hero__hint { bottom: .2rem; }
}

/* Retour tactile : les éléments cliquables s'enfoncent au toucher */
@media (hover: none) {
  .gallery__item, .project .browser, .offer, .chip, .btn { transition-property: transform, opacity, background, color, border-color; }
  .gallery__item:active { transform: scale(.97) !important; }
  .project:active .browser { transform: scale(.98); }
  .offer:active { transform: scale(.985); }
}

/* Direction de pose : défilement horizontal au doigt sur téléphone */
@media (max-width: 640px) {
  .poses__grid {
    display: flex; gap: var(--s2); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--pad) * -1); padding: 0 var(--pad) var(--s2); scrollbar-width: none;
  }
  .poses__grid::-webkit-scrollbar { display: none; }
  .poses__grid li { flex: 0 0 72%; scroll-snap-align: center; }
  .poses__grid li:nth-child(even), .has-gsap .poses__grid li:nth-child(even) { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .card.is-front img, .hero__stories i { animation: none !important; }
  .hero__stories .is-active i { transform: scaleX(1); }
}

/* ---------- Bouton thème (lune / soleil) ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--border); border-radius: 100px;
  background: none; color: var(--fg); transition: background var(--dur-fast), transform var(--dur) var(--ease-out);
}
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.theme-toggle .i-sun { display: none; }
.theme-toggle[data-current="dark"] .i-sun { display: block; }
.theme-toggle[data-current="dark"] .i-moon { display: none; }
.theme-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 960px) {
  /* Dans le menu mobile : bouton avec son texte */
  .nav__links .theme-toggle { padding: 0 1.2rem; margin-top: var(--s2); font-size: .9rem; font-weight: 500; }
  .nav__links .theme-toggle__label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}