/* ============================================================
   Dalloul Distribution — feuille de style 2026
   Noir profond, or dégradé, géométrie art-déco, scroll-driven.
   ============================================================ */

/* ---------- Polices auto-hébergées (variables, sous-ensemble latin) ---------- */
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-var-latin.woff2') format('woff2');
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-italic-var-latin.woff2') format('woff2');
  font-weight: 300 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-var-latin.woff2') format('woff2');
  font-weight: 200 600; font-style: normal; font-display: swap;
}
/* Replis métriques CALCULÉS (annulent le CLS de swap) — Fraunces↔Georgia, Montserrat↔Arial */
@font-face {
  font-family: 'Fraunces Fallback';
  src: local('Georgia'); size-adjust: 100.2%; ascent-override: 97.6%; descent-override: 25.4%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Montserrat Fallback';
  src: local('Arial'); size-adjust: 99.6%; ascent-override: 97.2%; descent-override: 25.2%; line-gap-override: 0%;
}

@property --angle   { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --sweep   { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --rot     { syntax: '<angle>'; inherits: true;  initial-value: 0deg; }
@property --fan     { syntax: '<angle>'; inherits: false; initial-value: 180deg; }
@property --wght    { syntax: '<number>'; inherits: false; initial-value: 600; }

:root {
  /* ===== GAZETTE — base PAPIER chaud par défaut (tokens repurposés) ===== */
  --black:      #ece1c9;   /* « fond » = papier */
  --black-2:    #e4d7b8;   /* papier plus profond */
  --panel:      #f4ecd6;   /* carte sur papier */
  --panel-2:    #efe4c7;
  --line:       rgba(52,36,18,.24);
  --line-str:   rgba(52,36,18,.42);
  --gold:       #957524;   /* or profond lisible sur papier (accent) */
  --gold-light: #8a6a1f;   /* accent « vif » sur papier = or profond */
  --gold-deep:  #7c601f;
  --gold-grad:  linear-gradient(135deg, #b78f36 0%, #957524 55%, #6f561a 100%);
  --oxblood:    #8f3a2e;
  --oxblood-deep: #6f2a20;
  --white:      #1f1811;   /* « texte principal » = encre */
  --muted:      #6f5f49;   /* texte discret */
  --ink:        #463a2a;   /* texte courant */
  --cream:      #ece1c9;  --cream-2: #e4d7b8;  --cream-ink: #1f1811;  --cream-mut: #6f5f49;  --cream-line: rgba(52,36,18,.24);
  /* ===== schéma SOMBRE (valeurs réutilisées par .on-dark) ===== */
  --dk-bg: #15100a; --dk-bg2: #1d160d; --dk-panel: #1b140c; --dk-panel2: #231a10;
  --dk-fg: #f3ead9; --dk-ink: #ddd3c2; --dk-muted: #a99d89;
  --dk-line: rgba(201,162,75,.18); --dk-line-str: rgba(201,162,75,.4);
  --dk-gold: #c9a24b; --dk-gold-light: #e8ce8e;
  --maxw:       1180px;
  --serif:      'Fraunces', 'Fraunces Fallback', Georgia, serif;
  --sans:       'Montserrat', 'Montserrat Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease:       cubic-bezier(.2,.7,.2,1);
  /* Ressort (micro-rebond) — easing linear() 2026 */
  --spring:     linear(0, .006, .025 2.8%, .101 6.1%, .539 18.9%, .721 25.3%, .849, .937 35.8%, .968, .991 44.1%, 1.006 51.3%, 1.015 60.2%, 1.009 73.2%, 1);
  /* Jeux OpenType (recomposés par élément : font-feature-settings ne cascade pas) */
  --feat-base:    "kern" 1, "liga" 1, "calt" 1, "onum" 1;   /* texte : chiffres bas-de-casse */
  --feat-display: "kern" 1, "liga" 1, "dlig" 1, "calt" 1;   /* titres : ligatures discrétionnaires */
}

/* ===== Sections SOMBRES (hero, bandeau, Invest, footer) : tokens réinversés ===== */
.on-dark {
  --black: var(--dk-bg); --black-2: var(--dk-bg2);
  --panel: var(--dk-panel); --panel-2: var(--dk-panel2);
  --line: var(--dk-line); --line-str: var(--dk-line-str);
  --gold: var(--dk-gold); --gold-light: var(--dk-gold-light); --gold-deep: #a97b22;
  --gold-grad: linear-gradient(135deg, #f1dca0 0%, #c9a24b 45%, #a97b22 100%);
  --white: var(--dk-fg); --muted: var(--dk-muted); --ink: var(--dk-ink);
  --cream: var(--dk-bg); --cream-2: var(--dk-bg2); --cream-ink: var(--dk-fg); --cream-mut: var(--dk-muted); --cream-line: var(--dk-line);
  color: var(--white); background: var(--black);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
/* Lenis 1.3.26 (auto-hébergé) */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent], .lenis [data-lenis-prevent-wheel], .lenis [data-lenis-prevent-touch] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
.lenis.lenis-autoToggle { transition-property: overflow; transition-duration: 1ms; transition-behavior: allow-discrete; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* PIÈGE : jamais hidden (crée un scroller → sticky/view() cassés) */
  font-optical-sizing: auto;
  font-feature-settings: var(--feat-base);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(143,58,46,.28); color: inherit; }

/* Lien d'évitement (accessibilité clavier) */
.skip { position: fixed; top: -120px; left: 1rem; z-index: 200; background: var(--gold); color: #1a1407;
  padding: .7rem 1.1rem; border-radius: 4px; font: 600 .82rem/1 var(--sans); letter-spacing: .05em;
  transition: top .2s var(--ease); }
.skip:focus-visible { top: 1rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0; text-wrap: balance; font-feature-settings: var(--feat-display); }
/* Rognage optique du HAUT uniquement (ne pas couper les descendantes j/p/g) */
@supports (text-box: trim-start cap) { h1, h2, h3 { text-box: trim-start cap; } }
p { text-wrap: pretty; }

.kicker {
  font-family: var(--sans); font-size: .72rem; letter-spacing: .34em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 .9rem;
}
.rule { display: block; width: 0; height: 2px; margin: 1.4rem auto 0; background: var(--gold-grad); }
.reveal.in .rule, .story__head.in .rule { width: 72px; transition: width .9s .2s var(--ease); }

/* Reflet doré mobile sur certains titres */
.shine {
  background: linear-gradient(100deg, var(--gold) 20%, #fff7e2 48%, var(--gold) 72%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: -220% 0; } }

/* ---------- Boutons ---------- */
.btn {
  position: relative; display: inline-block; padding: .9rem 2rem;
  font-size: .76rem; letter-spacing: .2em; text-transform: uppercase;
  border: 1px solid var(--gold); overflow: hidden;
  transition: color .3s var(--ease), transform .5s var(--spring), box-shadow .3s var(--ease);
}
.btn--gold { background: var(--gold-grad); color: #1a1407; font-weight: 500; border-color: transparent; }
.btn--gold:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(201,162,75,.3); }
.btn--ghost { color: var(--gold-light); }
.btn--ghost::after { content: ""; position: absolute; inset: 0; background: var(--gold-grad); transform: translateY(101%); transition: transform .35s var(--ease); z-index: -1; }
.btn--ghost:hover { color: #1a1407; transform: translateY(-3px); }
.btn--ghost:hover::after { transform: translateY(0); }

/* ============================================================
   OVERLAYS GLOBAUX
   ============================================================ */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 100;
  background: var(--gold-grad); transform: scaleX(0); transform-origin: 0 50%;
  box-shadow: 0 0 12px rgba(201,162,75,.5);
}
@supports (animation-timeline: scroll()) {
  #scroll-progress { animation: progress linear both; animation-timeline: scroll(root block); }
}
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.cursor-glow {
  position: fixed; top: 0; left: 0; width: 420px; height: 420px; margin: -210px 0 0 -210px;
  border-radius: 50%; pointer-events: none; z-index: 1; opacity: 0;
  background: radial-gradient(circle, rgba(201,162,75,.10), transparent 62%);
  transition: opacity .4s ease;
  transform: translate3d(var(--mx,-9999px), var(--my,-9999px), 0);
}
.has-glow .cursor-glow { opacity: 1; }

.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .05;
  background-image: url('/assets/img/grain.webp'); background-size: 128px 128px; background-repeat: repeat;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1rem, 4vw, 3rem);
  transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav--solid { background: rgba(8,8,7,.82); backdrop-filter: blur(14px); border-bottom-color: var(--line); padding-top: .7rem; padding-bottom: .7rem; }
.nav__brand { display: flex; align-items: center; gap: .6rem; font-size: .9rem; letter-spacing: .22em; }
.nav__brand img { width: 36px; height: 36px; }
.nav__brand em { color: var(--gold); font-style: normal; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); font-size: .78rem; letter-spacing: .12em; }
.nav__links a:not(.nav__cta) { position: relative; opacity: .82; transition: opacity .25s, color .25s; }
.nav__links a:not(.nav__cta)::after { content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 1px; background: var(--gold); transition: width .3s var(--ease); }
.nav__links a:not(.nav__cta):hover { opacity: 1; color: var(--gold-light); }
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__links a[aria-current="true"] { opacity: 1; color: var(--gold-light); }
.nav__links a[aria-current="true"]::after { width: 100%; }
.nav__cta { border: 1px solid var(--gold); padding: .5rem 1.1rem; color: var(--gold-light); transition: background .3s, color .3s; }
.nav__cta:hover { background: var(--gold-grad); color: #1a1407; }

/* Burger + menu plein écran (popover natif) */
.nav__burger { display: none; width: 42px; height: 42px; padding: 0; background: none; border: 0; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.nav__burger span { display: block; width: 22px; height: 1.5px; background: var(--gold-light); transition: transform .3s var(--ease); }
.menu { inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--black); color: var(--white); place-content: center;
  opacity: 0; translate: 0 -1.5rem; transition: opacity .4s var(--ease), translate .4s var(--ease), display .4s allow-discrete, overlay .4s allow-discrete; }
/* display:grid UNIQUEMENT à l'ouverture — sinon le popover fermé reste plein écran et bloque la souris */
.menu:popover-open { display: grid; opacity: 1; translate: 0 0; }
@starting-style { .menu:popover-open { opacity: 0; translate: 0 -1.5rem; } }
.menu::backdrop { background: rgba(8,8,7,.6); }
.menu nav { display: grid; gap: 1.3rem; text-align: center; }
.menu a { font-family: var(--serif); font-size: clamp(2rem, 9vw, 3.2rem); letter-spacing: .02em; color: var(--white); transition: color .25s; }
.menu a:hover, .menu a:focus-visible { color: var(--gold-light); }

/* ============================================================
   HERO — éditorial asymétrique / « manifeste de maison »
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; display: grid; align-items: center;
  padding: 7rem clamp(1.25rem, 6vw, 5rem) 4rem; overflow: hidden; isolation: isolate; background: var(--black);
}
/* Grille de construction fine (décalée en haut à droite) */
.hero__grid {
  position: absolute; inset: 0; z-index: -3; opacity: .45;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask: radial-gradient(130% 100% at 78% 28%, #000 8%, transparent 72%);
          mask: radial-gradient(130% 100% at 78% 28%, #000 8%, transparent 72%);
}
/* Route maritime Guadeloupe → Monde */
.hero__route { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: .55; }
.route-arc { fill: none; stroke: var(--line-str); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: route-draw 2.6s var(--ease) .4s forwards; }
.route-node { fill: var(--gold); }
.route-dot { fill: var(--gold-light); offset-path: path("M110 700 Q 520 90 1090 190"); offset-distance: 0%; }
@keyframes route-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .route-dot { animation: route-travel 7s linear infinite 1s; }
  @keyframes route-travel { from { offset-distance: 0%; } to { offset-distance: 100%; } }
  /* Optimisation : pause du point quand le hero quitte l'écran */
  .hero__route.paused .route-dot { animation-play-state: paused; }
}

.hero__inner { position: relative; z-index: 1; width: 100%; max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.45fr .85fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.mono__p { fill: url(#dd-gold-mono); } /* état de repos : monogramme plein */

.hero__lead { text-align: left; }
.hero__eyebrow { letter-spacing: .42em; text-transform: uppercase; font-size: .72rem; color: var(--gold); margin: 0 0 1.4rem; animation: rise .9s .4s var(--ease) both; }
.hero__title { text-align: left; font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.04; letter-spacing: .005em; max-width: 15ch; margin: 0; text-wrap: balance; }
.hero__title .split .w { display: inline-block; overflow: clip; padding-block-end: .08em; vertical-align: top; }
.hero__title .split .w > span { display: inline-block; }
.hero__sub { max-width: 46ch; margin: 1.6rem 0 2.4rem; color: var(--muted); font-size: 1.04rem; animation: rise .9s .74s var(--ease) both; }
.hero__actions { display: flex; gap: 1rem; justify-content: flex-start; flex-wrap: wrap; animation: rise .9s .86s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* Colonne « manifeste » (codes du registre de négoce) */
.manifest { align-self: center; border-left: 1px solid var(--line); padding-left: clamp(1.4rem, 3vw, 2.6rem); animation: rise .9s .6s var(--ease) both; }
.manifest__seal { width: clamp(56px, 7vw, 82px); margin-bottom: 1.6rem; }
.manifest__seal .mono { width: 100%; height: auto; overflow: visible; }
.manifest__rows { margin: 0; display: grid; }
.manifest__rows > div { display: grid; gap: .25rem; padding: .95rem 0; border-top: 1px solid var(--line); }
.manifest__rows > div:last-child { border-bottom: 1px solid var(--line); }
.manifest dt { font-size: .64rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.manifest dd { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.25; color: var(--white); }

/* ============================================================
   BANDEAU MÉTIERS — plaque gravée statique (losanges séparateurs)
   ============================================================ */
.specimen { display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  column-gap: clamp(1.1rem, 3vw, 2.6rem); row-gap: .3rem; max-width: var(--maxw); margin: 0 auto;
  padding-block: clamp(1rem, 2.4vw, 1.6rem); padding-inline: clamp(1rem, 5vw, 3rem);
  border-block: 1px solid var(--line); background: var(--black-2); }
.specimen span { display: inline-flex; align-items: center; gap: clamp(1.1rem, 3vw, 2.6rem);
  font-family: var(--serif); font-size: clamp(1.1rem, 1.7vw, 1.55rem); font-weight: 500;
  letter-spacing: .3em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.specimen span::after { content: "◆"; color: var(--gold); font-size: .4em; opacity: .85; }
.specimen span:last-child::after { content: none; }

/* ============================================================
   SECTIONS GÉNÉRIQUES
   ============================================================ */
section { padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 5vw, 3rem); position: relative; }
.story__head { max-width: 780px; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.story__head h2 { font-size: clamp(1.95rem, 4.4vw, 3.1rem); }
.story__head .lead { margin: 1.6rem auto 0; max-width: 62ch; color: var(--muted); }

/* ---------- Histoire : portrait épinglé « caméra » + chapitres ---------- */
.story { background: linear-gradient(180deg, var(--black) 0%, var(--black-2) 100%); }
.story__grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); }
.portrait { position: sticky; top: 13svh; min-height: 74svh; margin: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; container-type: inline-size; }
.portrait__media { position: relative; width: min(100%, 23rem); }
.portrait__frame { position: relative; overflow: hidden; border: 1px solid var(--line-str); box-shadow: 0 30px 70px rgba(0,0,0,.6); }
.portrait__frame img { width: 100%; height: auto; display: block; filter: sepia(.3) contrast(1.06) brightness(1.03); }
.portrait__corner { position: absolute; width: 34px; height: 34px; border: 2px solid var(--oxblood); z-index: 3; }
.portrait__corner.tl { top: -9px; left: -9px; border-right: 0; border-bottom: 0; }
.portrait__corner.br { bottom: -9px; right: -9px; border-left: 0; border-top: 0; }
.portrait figcaption { width: min(100%, 23rem); text-align: center; margin-top: 1.1rem; }
.portrait figcaption strong { display: block; letter-spacing: .14em; font-size: .95rem; }
.portrait figcaption span { color: var(--gold); font-size: .78rem; letter-spacing: .1em; }

/* Orbite d'étiquettes (décor, placement trigonométrique) */
.orbit { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; z-index: 1; pointer-events: none; rotate: var(--rot, 0deg); }
.orbit li { --r: 40cqi; --a: calc(360deg / 7 * var(--k)); position: absolute; left: 50%; top: 50%;
  translate: calc(-50% + cos(var(--a)) * var(--r)) calc(-50% + sin(var(--a)) * var(--r));
  rotate: calc(-1 * var(--rot, 0deg)); font: 500 .64rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-light); white-space: nowrap; }
.orbit li:nth-child(1){--k:0} .orbit li:nth-child(2){--k:1} .orbit li:nth-child(3){--k:2} .orbit li:nth-child(4){--k:3} .orbit li:nth-child(5){--k:4} .orbit li:nth-child(6){--k:5} .orbit li:nth-child(7){--k:6}

.chapters { display: flex; flex-direction: column; }
.chapter { min-height: 82svh; display: grid; align-content: center; padding-block: 3vh; }
.chapter__num { font-family: var(--serif); font-weight: 300; font-size: clamp(4rem, 12vw, 8rem); line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--gold-deep); }
.chapter h3 { color: var(--gold-light); font-size: clamp(1.6rem, 3.2vw, 2.1rem); margin: .2rem 0 1rem; }
.chapter p { color: var(--ink); margin: .55rem 0; max-width: 54ch; }
.chapter em { color: var(--gold-light); font-style: italic; }
/* Lettrine « gazette » sur l'intro de l'histoire */
#ch1 p:first-of-type::first-letter { float: left; font-family: var(--serif); font-weight: 600; font-size: 3.6em; line-height: .72; padding: .06em .12em 0 0; color: var(--oxblood); }

.thread { position: absolute; top: 0; left: 50%; width: 8vw; height: 100%; transform: translateX(-50%); pointer-events: none; z-index: 0; }
.thread path { fill: none; stroke: var(--gold); stroke-width: 1.4; vector-effect: non-scaling-stroke; opacity: .45; }

.story__end { position: relative; z-index: 1; max-width: 820px; margin: clamp(3rem, 6vw, 5rem) auto 0; text-align: center; padding-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.story__end h3 { color: var(--gold-light); font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin-bottom: 1rem; }
.story__end p { color: var(--ink); max-width: 64ch; margin: 0 auto; }

/* ---------- Stats : compteurs ---------- */
.stats { background: var(--black); border-block: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 340px; }
.stats__grid { max-width: var(--maxw); margin: 0 auto; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; }
.stat { position: relative; flex: 1 1 200px; padding: clamp(2.2rem, 4vw, 3.4rem) 1.2rem; text-align: center; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 24%; bottom: 24%; width: 1px; background: var(--line); }
.stat::after { content: "◆"; position: absolute; top: 1.1rem; left: 50%; transform: translateX(-50%); color: var(--gold); font-size: .5rem; opacity: .7; }
.stat__n { display: inline-flex; align-items: flex-end; justify-content: center; font-family: var(--serif); font-weight: 700; font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1; color: var(--gold-light); font-variant-numeric: tabular-nums; }
/* Odomètre « registre » — reels construits par app.js (roulement mécanique) */
.odometer { display: inline-flex; align-items: flex-end; }
.reel { display: inline-block; height: 1.2em; overflow: hidden; }
.reel > b { display: flex; flex-direction: column; font-weight: inherit; transform: translateY(0); transition: transform 1.3s var(--ease); }
.reel > b > i { height: 1.2em; line-height: 1.2em; font-style: normal; text-align: center; }
.stat.in .reel > b { transform: translateY(var(--ty, 0)); }
.stat__label { display: block; margin-top: .8rem; font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }

/* ---------- Activités (cartes + tilt) ---------- */
.activities { background: var(--black); }
.cards { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.4rem; perspective: 1200px; }
.card {
  position: relative; padding: 2.4rem 2rem; background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); transform-style: preserve-3d;
  transition: transform .25s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(260px circle at var(--px,50%) var(--py,0%), rgba(201,162,75,.14), transparent 60%); opacity: 0; transition: opacity .35s ease; }
.card::after { content: ""; position: absolute; top: 0; left: 0; width: 34px; height: 34px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); opacity: .5; transition: width .35s var(--ease), height .35s var(--ease), opacity .35s var(--ease); }
.card:hover { border-color: var(--line-str); box-shadow: 0 26px 56px rgba(0,0,0,.55); }
.card:hover::before { opacity: 1; }
.card:hover::after { width: 46px; height: 46px; opacity: 1; }
.card > * { position: relative; z-index: 1; transform: translateZ(28px); }
.card__num { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: transparent; -webkit-text-stroke: 1px var(--gold-deep); display: inline-block; margin-bottom: .6rem; }
.card h3 { font-size: 1.42rem; margin-bottom: .7rem; }
.card p { color: var(--muted); font-size: .92rem; margin: 0; }
/* Planche illustrée (duotone) en tête de carte */
.card__plate { aspect-ratio: 16 / 10; margin: 0 0 1.3rem; overflow: hidden; border: 1px solid var(--line); background: var(--panel-2); }
.card__plate img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.card:hover .card__plate img { transform: scale(1.05); }

/* ---------- Essence « page de catalogue » : Activités sur crème ---------- */
.activities { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); color: var(--cream-ink); }
.activities .kicker { color: var(--oxblood); }
.activities .rule { background: linear-gradient(90deg, var(--oxblood), var(--gold-deep)); }
.activities .lead { color: var(--cream-mut); }
.activities .card { background: #f4edda; border: 1px solid var(--cream-line); box-shadow: 0 10px 30px rgba(60,40,15,.1); }
.activities .card::before { background: radial-gradient(260px circle at var(--px,50%) var(--py,0%), rgba(154,63,48,.1), transparent 60%); }
.activities .card::after { border-top-color: var(--oxblood); border-left-color: var(--oxblood); opacity: .55; }
.activities .card:hover { border-color: var(--oxblood); box-shadow: 0 22px 46px rgba(60,40,15,.18); }
.activities .card__num { -webkit-text-stroke: 0; color: var(--oxblood); }
.activities .card h3 { color: var(--cream-ink); }
.activities .card p { color: var(--cream-mut); }

/* ---------- Dalloul Invest ---------- */
.invest { position: relative; background: radial-gradient(70% 90% at 50% 0%, rgba(201,162,75,.1), transparent 60%), linear-gradient(180deg, var(--black-2), var(--black)); text-align: center; overflow: hidden; }
/* Grand « 07 » en contour, derrière */
.invest__num { position: absolute; inset: 0; display: grid; place-items: center; z-index: 0; pointer-events: none;
  font-family: var(--serif); font-weight: 300; font-size: clamp(9rem, 30vw, 22rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--line-str); opacity: .5; }
/* Éventail art-déco qui s'ouvre au scroll */
.invest__fan { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 0; pointer-events: none;
  width: min(92vw, 60rem); aspect-ratio: 2 / 1; opacity: .5;
  background: repeating-conic-gradient(from -90deg at 50% 100%, color-mix(in oklch, var(--gold) 60%, transparent) 0 .5deg, transparent .5deg 7.5deg);
  mask: conic-gradient(from -90deg at 50% 100%, #000 var(--fan), transparent 0), radial-gradient(circle at 50% 100%, transparent 20%, #000 20.4% 72%, transparent 72.4%);
  mask-composite: intersect;
  -webkit-mask: conic-gradient(from -90deg at 50% 100%, #000 var(--fan), transparent 0), radial-gradient(circle at 50% 100%, transparent 20%, #000 20.4% 72%, transparent 72.4%);
  -webkit-mask-composite: source-in; }
.invest__inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; border: 1px solid var(--line); padding: clamp(2.6rem, 6vw, 4.6rem) clamp(1.5rem, 5vw, 3.5rem); background: rgba(14,13,11,.55); backdrop-filter: blur(6px); }
.invest__tag { display: inline-block; font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.4rem; }
.invest__claim { font-family: var(--serif); font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-style: italic; margin: 0 0 1.6rem; }
.invest__sub { letter-spacing: .22em; text-transform: uppercase; font-size: .76rem; color: var(--gold-light); margin: 0 0 1.6rem; }
.invest__body { color: var(--ink); max-width: 62ch; margin: 0 auto 2rem; }
.invest__tags { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; padding: 0; margin: 0 0 1.8rem; }
.invest__tags li { border: 1px solid var(--line); padding: .45rem 1.1rem; font-size: .76rem; letter-spacing: .08em; color: var(--gold-light); border-radius: 40px; transition: border-color .3s, color .3s; }
.invest__tags li:hover { border-color: var(--gold); color: #fff; }
.invest__note { color: var(--muted); font-size: .82rem; font-style: italic; margin: 0; }

/* ---------- Contact ---------- */
.contact { background: var(--black); }
.contact__grid { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.contact__item { display: flex; flex-direction: column; gap: .4rem; padding: 1.9rem; border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel), var(--panel-2)); transition: border-color .3s, transform .3s var(--ease); }
a.contact__item:hover { border-color: var(--gold); transform: translateY(-5px); }
.contact__label { font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.contact__value { font-size: 1rem; }

/* ---------- Footer ---------- */
.footer { position: relative; text-align: center; padding: clamp(3.5rem, 7vw, 5.5rem) 1.25rem; border-top: 1px solid var(--line); background: var(--black-2); overflow: hidden; content-visibility: auto; contain-intrinsic-size: auto 460px; }
.footer__watermark { position: absolute; left: 50%; top: 50%; width: 460px; max-width: 120%; transform: translate(-50%,-50%); opacity: .04; pointer-events: none; }
.footer__logo, .footer__name, .footer__tag, .footer__copy { position: relative; }
.footer__logo { width: 52px; height: auto; margin: 0 auto 1.1rem; }
.footer__name { letter-spacing: .3em; font-size: .95rem; margin: 0 0 .3rem; }
.footer__tag { color: var(--gold); letter-spacing: .14em; font-size: .78rem; margin: 0 0 1.4rem; }
.footer__copy { color: var(--muted); font-size: .76rem; margin: 0; }

/* Utilitaire lecteur d'écran */
.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; }

/* ============================================================
   RÉVÉLATIONS — view() natif, repli IntersectionObserver
   (contenu visible par défaut : sans JS / sans support / mouvement réduit)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal both; animation-timeline: view(); animation-range: entry 5% cover 28%; }
    @keyframes reveal { from { opacity: 0; translate: 0 32px; } }
  }
  @supports not (animation-timeline: view()) {
    .js .reveal { opacity: 0; translate: 0 32px; transition: opacity .8s var(--ease), translate .8s var(--ease); }
    .js .reveal.in { opacity: 1; translate: 0 0; }
  }
}

/* ============================================================
   NARRATION 2026 — scroll-driven natif (amélioration progressive)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {

  /* Hero : monogramme tracé puis doré */
  .mono__p { fill: transparent; stroke: url(#dd-gold-mono); stroke-width: 1.4; vector-effect: non-scaling-stroke;
    stroke-dasharray: 1; stroke-dashoffset: 1;
    animation: mono-draw 1.7s var(--ease) .2s forwards, mono-gild 1s ease 1.7s forwards; }
  .mono__p:nth-child(2) { animation-delay: .5s, 2s; }
  .mono__p:nth-child(3) { animation-delay: .8s, 2.2s; }
  @keyframes mono-draw { to { stroke-dashoffset: 0; } }
  @keyframes mono-gild { to { fill: url(#dd-gold-mono); } }

  /* Titre : mots qui montent derrière un masque (--i posé par app.js) */
  .js .hero__title .split .w > span { translate: 0 110%; animation: word-up 1s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms + .25s); }
  @keyframes word-up { to { translate: 0 0; } }

  @supports (animation-timeline: view()) {
    /* Hero recule au scroll, le soleil s'ouvre */
    .hero__inner { animation: hero-recede 1ms linear both; animation-timeline: view(); animation-range: exit 0% exit 90%; }
    @keyframes hero-recede { to { scale: .9; opacity: 0; } }

    /* Fil d'or tracé au fil de l'histoire */
    .story { view-timeline: --story block; }
    .thread path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: thread-draw 1ms linear both; animation-timeline: --story; animation-range: entry 20% exit 30%; }
    @keyframes thread-draw { to { stroke-dashoffset: 0; } }

    /* Numéros de chapitre : encre d'or qui se remplit */
    .chapter__num { -webkit-text-stroke: 0; background: linear-gradient(90deg, var(--gold-light) 0 50%, rgba(246,241,233,.14) 50%) 100% 0 / 200% 100% no-repeat; -webkit-background-clip: text; background-clip: text;
      animation: num-ink 1ms linear both; animation-timeline: view(); animation-range: entry 40% cover 50%; }
    @keyframes num-ink { to { background-position: 0 0; } }

  }

  /* Portrait « caméra » : pose → transmission → plongée (timeline-scope) */
  @supports (timeline-scope: --a) and (animation-timeline: view()) {
    .story { timeline-scope: --ch1, --ch2, --ch3, --fin; }
    #ch1 { view-timeline: --ch1 block; } #ch2 { view-timeline: --ch2 block; } #ch3 { view-timeline: --ch3 block; }
    .story__end { view-timeline: --fin block; }

    .portrait__frame { animation: cam-pose 1ms linear both, cam-plunge 1ms linear both; animation-timeline: --ch1, --fin; animation-range: entry 0% contain 30%, entry 0% entry 100%; }
    @keyframes cam-pose { from { scale: 1.08; opacity: .4; } }
    @keyframes cam-plunge { to { scale: 2.4; opacity: 0; } }

    .orbit { animation: orbit-spin 1ms linear both; animation-timeline: --ch2; animation-range: cover; }
    @keyframes orbit-spin { from { --rot: -40deg; } to { --rot: 80deg; } }
    .orbit li { opacity: 0; animation: orbit-show 1ms linear both; animation-timeline: --ch2; animation-range: entry 15% contain 20%; }
    @keyframes orbit-show { to { opacity: .9; } }
  }
}

/* ============================================================
   PHASE 3 — signature
   ============================================================ */
/* Coins biseautés art-déco (Chromium) */
@supports (corner-shape: bevel) {
  .card { border-radius: 1.5rem 0; corner-shape: bevel; }
}

/* Activités : défilement horizontal épinglé (desktop + scroll-driven) */
.acts { position: relative; }
@media (min-width: 720px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .acts { height: 300svh; view-timeline: --acts block; }
    .acts__pin { position: sticky; top: 0; height: 100svh; overflow: clip; display: grid; align-content: center; }
    .acts .cards { display: flex; flex-wrap: nowrap; grid-template-columns: none; width: max-content; gap: 2rem; padding-inline: 10vw;
      animation: acts-slide 1ms linear both; animation-timeline: --acts; animation-range: contain 0% contain 100%; }
    .acts .card { width: min(26rem, 78vw); flex: 0 0 auto; display: flex; flex-direction: column; justify-content: flex-start; }
    @keyframes acts-slide { to { translate: calc(-100% + 100vw) 0; } }
    .acts__horizon { position: absolute; left: 0; bottom: 13%; width: 100%; height: 1px; transform-origin: left;
      background: linear-gradient(90deg, var(--oxblood), var(--gold-deep)); opacity: .7;
      animation: acts-horizon 1ms linear both; animation-timeline: --acts; animation-range: contain; }
    @keyframes acts-horizon { from { scale: 0 1; } }
  }
}
.acts__horizon { display: none; }
@media (min-width: 720px) { @supports (animation-timeline: view()) { .acts__horizon { display: block; } } }

/* Dalloul Invest : ouverture de l'éventail */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .invest__fan { animation: fan-open 1ms linear both; animation-timeline: view(); animation-range: entry 8% cover 55%; }
    @keyframes fan-open { from { --fan: 0deg; } }
  }
}

/* Contact : révélation en ziggourat art-déco */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .contact__panel { animation: ziggurat 1ms linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; }
    @keyframes ziggurat {
      from { clip-path: polygon(0 100%, 0 100%, 30% 100%, 30% 80%, 40% 80%, 40% 60%, 60% 60%, 60% 80%, 70% 80%, 70% 100%, 100% 100%, 100% 100%); }
      to   { clip-path: polygon(0 100%, 0 0, 0 0, 0 0, 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 100% 0, 100% 100%); }
    }
  }
}

/* ============================================================
   MICRO-MOTION 2026 — pack signature (sobre, 1 moment / section)
   ============================================================ */
.foil { --foil-base: var(--white); color: var(--foil-base); }
.activities .foil { --foil-base: var(--cream-ink); }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    /* B — Balayage « foil » or sur les grands titres de section */
    .foil {
      background: linear-gradient(100deg, var(--foil-base) 0 42%, #fff3d0 50%, var(--foil-base) 58% 100%);
      background-size: 250% 100%; background-position: 115% 0;
      -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
      animation: foil-sweep 1ms linear both; animation-timeline: view(); animation-range: entry 20% cover 58%;
    }
    @keyframes foil-sweep { from { background-position: 115% 0; } to { background-position: -15% 0; } }

    /* A — Respiration de la graisse (serif variable) sur les titres de chapitre */
    .chapter h3, .story__end h3 {
      font-variation-settings: 'wght' var(--wght);
      animation: wght-breathe 1ms linear both; animation-timeline: view(); animation-range: entry 8% cover 55%;
    }
    @keyframes wght-breathe { from { --wght: 330; } to { --wght: 640; } }

    /* C — Révélation « darkroom » du portrait (flou→net, grain qui se dissipe) */
    .portrait__frame img {
      animation: develop 1ms linear both; animation-timeline: view(); animation-range: entry 0% cover 42%;
    }
    /* « Darkroom » sans blur animé (re-rasterisation coûteuse) : désaturation + luminosité */
    @keyframes develop {
      from { filter: grayscale(1) brightness(.4) contrast(.95); opacity: .2; }
      to   { filter: grayscale(0) sepia(.3) contrast(1.06) brightness(1.03); opacity: 1; }
    }
  }
}

/* ============================================================
   DÉTAIL ÉDITORIAL — « gazette » (OpenType, folios, bichromie)
   ============================================================ */
/* Chiffres alignés (lining + tabular) pour les données ; oldstyle ailleurs (via body) */
.stat__n, .reel, .reel > b > i { font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "kern" 1, "lnum" 1, "tnum" 1; }

/* Masthead de section : folio Nº + intitulé en petites capitales + filet « scotch » */
body { counter-reset: folio; }
.story__head .kicker {
  font-family: var(--serif); font-variant: small-caps; font-weight: 600;
  letter-spacing: .1em; font-size: 1.05rem; color: var(--gold); text-transform: none;
  display: inline-flex; align-items: baseline; gap: .7rem;
}
.story__head .kicker::before {
  counter-increment: folio; content: "N\00ba\00a0" counter(folio, decimal-leading-zero);
  font-variant-numeric: lining-nums; font-size: .8em; letter-spacing: .08em; color: var(--oxblood);
}
/* Filet scotch (gras + fin) sous le titre de section */
.story__head .rule {
  width: min(240px, 55%); height: auto; margin: 1.5rem auto 0; background: none;
  border: 0; border-top: 3px solid var(--gold); border-bottom: 1px solid var(--gold);
  padding-top: 3px; opacity: .85;
}
.reveal.in .rule, .story__head.in .rule { transition: none; }

/* Bichromie « encre rouge » : emphase en oxblood (papier) */
strong { color: var(--oxblood); font-weight: 600; }
.chapter em { color: var(--oxblood); font-style: italic; }
.on-dark strong { color: var(--gold-light); }

/* Marque de fin (fleuron) à la clôture d'une section */
.story__end p:last-child::after { content: " \2766"; color: var(--oxblood); font-size: 1.05em; }

/* Plaque de catalogue : légende du portrait */
.portrait figcaption { border-top: 1px solid var(--line); padding-top: .85rem; }
.portrait figcaption strong { color: var(--fg, inherit); }
.portrait figcaption strong::before { content: "Fig. \2014 "; color: var(--oxblood); font-variant: small-caps; letter-spacing: .04em; }

/* Citation Invest traitée en pull-quote */
.invest__claim { font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.1; }
.invest__claim::before, .invest__claim::after { color: var(--gold); }

/* Légère pression d'encre sur les titres (papier) ; neutre en sombre */
h1, h2, h3 { text-shadow: 0 1px 0 rgba(255,250,238,.4); }
.on-dark h1, .on-dark h2, .on-dark h3 { text-shadow: none; }

/* Filet de colonne dans la grille éditoriale de l'histoire (desktop) */
@media (min-width: 881px) {
  .story__grid { column-rule: 1px solid var(--line); }
}

/* ============================================================
   PERFORMANCE — containment + couches GPU (2026)
   ============================================================ */
/* Isole le recalcul de mise en page des composants répétés (fluidité au scroll) */
.card, .contact__item, .stat { contain: layout; }
/* will-change est posé/retiré en JS (uniquement quand la section approche) — cf. app.js */

/* Économie de données : on coupe les décors non essentiels */
@media (prefers-reduced-data: reduce) {
  .grain, .cursor-glow, .hero__route, .hero__grid, .invest__fan { display: none !important; }
}

/* ============================================================
   GÉOMÉTRIE — transitions de sections en diagonale (clip-path)
   ============================================================ */
@media (min-width: 621px) {
  /* Filet OR le long des diagonales : la section est peinte en or, un ::before
     sombre au tracé décalé de 2px laisse apparaître un liseré doré sur le biais. */
  .specimen.on-dark, .invest.on-dark, .footer.on-dark { position: relative; isolation: isolate; background: var(--gold); }
  .specimen.on-dark::before, .invest.on-dark::before, .footer.on-dark::before { content: ""; position: absolute; inset: 0; z-index: -1; }

  /* Bandeau métiers : bord bas en biais (sombre → papier) */
  .specimen.on-dark { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 1.6rem)); padding-bottom: calc(clamp(1rem, 2.4vw, 1.6rem) + 1.2rem); }
  .specimen.on-dark::before { background: var(--dk-bg2); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2px), 0 calc(100% - 1.6rem - 2px)); }

  /* Dalloul Invest : plaque sombre tranchée en parallélogramme dans le papier */
  .invest.on-dark { clip-path: polygon(0 2.6rem, 100% 0, 100% calc(100% - 2.6rem), 0 100%); padding-block: calc(clamp(4.5rem, 9vw, 8rem) + 2.6rem); margin-block: -1px; }
  .invest.on-dark::before { background: radial-gradient(70% 90% at 50% 0%, rgba(201,162,75,.1), transparent 60%), linear-gradient(180deg, var(--dk-bg2), var(--dk-bg)); clip-path: polygon(0 calc(2.6rem + 2px), 100% 2px, 100% calc(100% - 2.6rem - 2px), 0 calc(100% - 2px)); }

  /* Footer : bord haut en biais */
  .footer.on-dark { clip-path: polygon(0 2.2rem, 100% 0, 100% 100%, 0 100%); padding-top: calc(clamp(3.5rem, 7vw, 5.5rem) + 2.2rem); margin-top: -1px; }
  .footer.on-dark::before { background: var(--dk-bg2); clip-path: polygon(0 calc(2.2rem + 2px), 100% 2px, 100% 100%, 0 100%); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 880px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .hero { min-height: auto; align-items: start; }
  .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .manifest { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 1.6rem; }
  .story__grid { grid-template-columns: 1fr; }
  .portrait { position: relative; top: auto; min-height: 0; align-items: center; }
  .portrait__media { width: min(100%, 22rem); }
  .orbit, .thread { display: none; }
  .chapter { min-height: auto; padding-block: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .route-dot { animation: none !important; }
  .mono__p { fill: url(#dd-gold-mono); stroke: none; stroke-dashoffset: 0; }
  .portrait__frame img { filter: none; }
  .orbit { display: none; }
}
