/* ==========================================================================
   E-NETT — version moderne : base (polices, jetons, thèmes, typographie, boutons, logo)
   Charte « Le trait » : marine #082D4D, vert du trait #1A9A4B (réservé au trait et aux marques
   de « travail fait »), bleu #0A6FB8, craie #F3F4F1. Polices auto-hébergées : Archivo (variable,
   graisse 400–800, chasse 62–125 %) et Martian Mono (chiffres, étiquettes). Licences : ../fonts/OFL-*.txt.
   Principe : tout le contenu est lisible sans JavaScript ; les états de départ des animations ne
   s’appliquent que sous html.motion (posée dans le <head> si le mouvement n’est pas réduit),
   html.enter (entrée de page intérieure, < 1 s) ou html.intro-on (ouverture de l’accueil).
   Documentation : docs/design-system-moderne.md.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variable.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("../fonts/martian-mono-variable.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-style: normal;
  font-display: swap;
}

:root {
  --marine: #082D4D;
  --marine-2: #0B3A62;
  --nuit: #051C31;
  --vert: #1A9A4B;
  --bleu: #0A6FB8;
  --craie: #F3F4F1;
  --craie-2: #E9EBE6;
  --gris: #55677A;
  --rouge: #B3261E;
  --craie-72: rgba(243, 244, 241, .72);
  --craie-22: rgba(243, 244, 241, .22);
  --craie-12: rgba(243, 244, 241, .12);
  --marine-16: rgba(8, 45, 77, .16);
  --marine-10: rgba(8, 45, 77, .1);
  --f-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 3.9vw, 64px);
  --header-h: 76px;
  --sec-pad: clamp(72px, 10vh, 140px);       /* marge verticale d’une section courante */
  --sec-pad-sm: clamp(48px, 7vh, 96px);      /* section serrée (.section--tight) */
  --measure: 68ch;                           /* longueur de ligne d’un texte long */
  --ease-sweep: cubic-bezier(.77, 0, .18, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* Échelle typographique : l’impact vient du contraste, de la graisse et du mouvement, pas de la taille.
     Chaque taille plafonne en rem (rien ne grossit au-delà de ~1440 px de large). Règle client : aucun titre
     au-delà de 3 lignes ni d’un quart de l’écran entre 1280 et 1440 px ; pas de titre géant sur téléphone. */
  --t-hero: clamp(2.125rem, 1.25rem + 3.4vw, 4.25rem);     /* titre de l’accueil : 34 → 68 px */
  --t-h1: clamp(2rem, 1.35rem + 2.3vw, 3.5rem);            /* titre d’une page intérieure : 32 → 56 px */
  --t-call: clamp(2.25rem, 1.1rem + 4.2vw, 5.25rem);       /* « Parlons de vos locaux. » : 36 → 84 px */
  --t-h2: clamp(1.75rem, 1.15rem + 2.1vw, 3.25rem);        /* titres de section : 28 → 52 px */
  --t-h2-sm: clamp(1.5rem, 1.15rem + 1.2vw, 2.25rem);      /* titres de section discrets : 24 → 36 px */
  --t-h3: clamp(1.2rem, 1rem + .6vw, 1.625rem);            /* intertitres, titres de carte : 19 → 26 px */
  --t-statement: clamp(1.5rem, 1rem + 2vw, 2.75rem);       /* manifeste : 24 → 44 px */
  --t-quote: clamp(1.5rem, 1rem + 1.8vw, 2.5rem);          /* citation : 24 → 40 px */
  --t-scene: clamp(2.25rem, 1rem + 4.2vw, 5rem);           /* « Poussière. Traces. Odeurs. » : 36 → 80 px */
  --t-net: clamp(5rem, 2rem + 9vw, 10rem);                 /* « Net. » : 80 → 160 px */
  --t-marquee: clamp(2.5rem, 1rem + 4.6vw, 5.5rem);        /* bandeau : 40 → 88 px */
  --t-price: clamp(2.75rem, 1.75rem + 2.6vw, 4.25rem);     /* prix du simulateur : 44 → 68 px */
  --t-figure: clamp(2.5rem, 1.5rem + 2.4vw, 3.75rem);      /* 30 km, 10 € : 40 → 60 px */
  --t-num: clamp(3rem, 1.5rem + 3.6vw, 5.5rem);            /* numéros de la méthode : 48 → 88 px */
  --t-lede: clamp(1.0625rem, .98rem + .35vw, 1.25rem);     /* chapô : 17 → 20 px */

  /* Grain : bruit SVG (feTurbulence) en ligne, aucune ressource externe */
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.7 -.72'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .08 0 0 0 0 .05 0 0 0 1.9 -.8'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Taches (scène avant/après) : grandes marbrures sombres, même principe */
  --stains: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='600'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.008 .013' numOctaves='4' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .18 0 0 0 -2.6 1.38'/%3E%3C/filter%3E%3Crect width='900' height='600' filter='url(%23s)'/%3E%3C/svg%3E");
}
@media (max-width: 899px) { :root { --header-h: 62px; } }

/* Thème d’une section : couleurs relatives (texte, secondaire, filets, panneau, accent, focus, erreur).
   Avec les animations, les sections sans image prennent le thème du fond en cours. Le fond fait un fondu
   linéaire de 0,5 s ; le texte bascule d’un coup au milieu (0,25 s) : jamais de « vallée » de contraste
   où texte et fond traversent le même gris, et un seul recalcul de style par bascule. */
@property --fg { syntax: '<color>'; inherits: true; initial-value: #082D4D; }
@property --bg { syntax: '<color>'; inherits: true; initial-value: #F3F4F1; }
@property --muted { syntax: '<color>'; inherits: true; initial-value: #55677A; }
@property --line { syntax: '<color>'; inherits: true; initial-value: rgba(8, 45, 77, .16); }
@property --line-soft { syntax: '<color>'; inherits: true; initial-value: rgba(8, 45, 77, .1); }
@property --panel { syntax: '<color>'; inherits: true; initial-value: #EAECEA; }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #0A6FB8; }
@property --error { syntax: '<color>'; inherits: true; initial-value: #B3261E; }
:root, [data-theme="light"] {
  --fg: #082D4D; --bg: #F3F4F1; --muted: #55677A; --line: rgba(8, 45, 77, .16); --line-soft: rgba(8, 45, 77, .1);
  --panel: #EAECEA; --accent: #0A6FB8; --focus: #0A6FB8; --error: #B3261E;
  --field-line: rgba(8, 45, 77, .55); --field-bg: rgba(255, 255, 255, .6); /* bord de champ ≥ 3:1 (WCAG 1.4.11) */
}
[data-theme="dark"] {
  --fg: #F3F4F1; --bg: #082D4D; --muted: rgba(243, 244, 241, .74); --line: rgba(243, 244, 241, .22); --line-soft: rgba(243, 244, 241, .1);
  --panel: #072642; --accent: #7CB9E8; --focus: #F3F4F1; --error: #FFB4AB;
  --field-line: rgba(243, 244, 241, .55); --field-bg: rgba(5, 28, 49, .35);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--craie);
  color: var(--marine);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  font-stretch: 100%;
  background: var(--craie);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
html.motion body { background: transparent; }
html.intro-on, html.is-locked { overflow: hidden; }
img, svg, canvas, picture, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus, var(--bleu)); outline-offset: 3px; }
.intro :focus-visible, .menu :focus-visible, .mbar :focus-visible { outline-color: var(--craie); }
main:focus, [tabindex="-1"]:focus { outline: none; }
::selection { background: var(--marine); color: var(--craie); }
[data-theme="dark"] ::selection { background: var(--craie); color: var(--marine); }
[hidden] { display: none !important; } /* l’attribut hidden l’emporte toujours sur display (blocs conditionnels, messages) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nw, .nowrap { white-space: nowrap; }
.mono {
  font-family: var(--f-mono);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
  font-stretch: 100%;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.wrap { width: min(100% - 2 * var(--gutter), 1600px); margin-inline: auto; }
.wrap--text { width: min(100% - 2 * var(--gutter), 76rem); }   /* pages de texte (légal, FAQ) : colonne plus étroite */
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  padding: 12px 16px; background: var(--craie); color: var(--marine); font-weight: 600;
  transform: translateY(-180%); transition: transform .3s var(--ease-out);
}
.skip:focus { transform: none; }

/* ---------- Sections et fond ---------- */
/* Chaque section porte data-theme="light" (craie) ou "dark" (marine). Avec les animations, une scène fixe
   (.stage) fait le fondu marine ↔ craie au défilement et les sections deviennent transparentes. */
.section { position: relative; background: var(--bg); color: var(--fg); padding: var(--sec-pad) 0; }
.section--tight { padding: var(--sec-pad-sm) 0; }
.section--flush { padding: 0; }
.section--top0 { padding-top: 0; }
/* Le fond devient transparent seulement quand la scène a pris la couleur de la page (html.stage-on, js/motion.js) :
   jamais de texte clair sur fond clair pendant le chargement. Le hero, l’entrée de page et [data-bg="own"] gardent leur fond. */
html.stage-on .section:not(.hero):not(.page-hero):not([data-bg="own"]) { background: transparent; }
html.motion .section {
  transition: --fg 0s .25s, --bg 0s .25s, --muted 0s .25s, --line 0s .25s, --line-soft 0s .25s, --panel 0s .25s, --accent 0s .25s, --error 0s .25s;
}
/* Filet clavier (js/motion.js) : un bloc qui reçoit le focus est affiché tout de suite, quelle que soit son animation */
html.motion .is-shown { opacity: 1 !important; transform: none !important; clip-path: none !important; }
.stage { display: none; }
html.motion .stage { display: block; position: fixed; inset: 0; z-index: -1; background: var(--craie); }
.stage__dark { position: absolute; inset: 0; background: var(--marine); opacity: 0; }

/* Grain animé (film) : marge réduite (124 % du cadre) et déplacements de ±6 % */
.grain {
  position: absolute; inset: -12%;
  background-image: var(--grain-light);
  background-size: 220px 220px;
  opacity: .18;
  pointer-events: none;
}
.grain--dark { background-image: var(--grain-dark); opacity: .5; }
html.motion .grain { animation: grain .8s steps(1) infinite; }
html.motion .is-paused .grain { animation-play-state: paused; }
@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  17% { transform: translate3d(-5%, 4%, 0); }
  33% { transform: translate3d(4%, -6%, 0); }
  50% { transform: translate3d(-3%, 6%, 0); }
  67% { transform: translate3d(6%, 2%, 0); }
  83% { transform: translate3d(-6%, -4%, 0); }
}

/* ---------- Typographie ---------- */
.kicker {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: clamp(18px, 2vw, 30px);
  font-family: var(--f-mono); font-size: 12px; line-height: 1.4; letter-spacing: .08em;
  text-transform: uppercase; font-stretch: 100%;
}
.kicker__t { flex: none; width: 30px; height: 3px; background: var(--vert); transform-origin: left center; }
.kicker__txt { display: inline-block; }
.h1 {
  font-size: var(--t-h1); line-height: 1.02; font-weight: 720; font-stretch: 114%; letter-spacing: -.03em;
  max-width: 16em; text-wrap: balance;
}
.h2 {
  font-size: var(--t-h2);
  line-height: 1.02;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -.026em;
  text-wrap: balance;
}
.h2--sm { font-size: var(--t-h2-sm); line-height: 1.08; letter-spacing: -.02em; }
.h3 { font-size: var(--t-h3); line-height: 1.15; font-weight: 700; font-stretch: 108%; letter-spacing: -.015em; text-wrap: balance; }
.h4 { font-size: 17px; line-height: 1.3; font-weight: 650; font-stretch: 104%; }
.lede { font-size: var(--t-lede); line-height: 1.5; max-width: 40em; }
.muted { color: var(--muted); }
.text-sm { font-size: 15px; line-height: 1.5; }
.fine-print { margin-top: 24px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.fine-print a { color: inherit; text-underline-offset: 3px; }
/* Point final des titres classiques (« … locaux<span class="accent-dot">.</span> ») : neutre ici, le vert reste au trait */
.accent-dot { color: inherit; }
.mt-s { margin-top: 16px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: clamp(40px, 5vw, 64px); } .mt-xl { margin-top: clamp(56px, 8vw, 110px); }
.stack > * + * { margin-top: var(--stack, 16px); }

/* ---------- Boutons ---------- */
/* .btn : fond = couleur du texte de la section (marine sur craie, craie sur marine) ; le trait vert marque l’action */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 52px; padding: 0 22px;
  background: var(--fg, var(--craie)); color: var(--bg, var(--marine));
  font-family: var(--f-sans); font-size: 15.5px; font-weight: 600; font-stretch: 108%; letter-spacing: -.005em;
  line-height: 1.15; text-decoration: none; text-align: left;
  border: 0; cursor: pointer;
  transition: background-color .35s, color .35s, box-shadow .35s;
}
.btn__t { flex: none; width: 16px; height: 3px; background: var(--vert); transition: width .5s var(--ease-out); }
.btn:hover .btn__t, .btn:focus-visible .btn__t { width: 32px; }
.btn__label { display: inline-block; }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
.btn--ghost:hover { background: var(--line-soft, rgba(243, 244, 241, .1)); }
.btn--small { min-height: 42px; padding: 0 16px; font-size: 14px; gap: 10px; }
.btn--block { display: flex; width: 100%; justify-content: center; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.btn__short { display: none; }
.btn-row, .actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Lien avec trait : « Voir le secteur — » ; le trait s’allonge au survol. L’icône flèche des composants
   classiques (svg.icon-arrow) est remplacée par ce trait. */
.link-arrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 600; font-stretch: 106%; text-decoration: none;
}
.link-arrow::after { content: ""; flex: none; width: 22px; height: 3px; background: var(--vert); transition: width .5s var(--ease-out); }
.link-arrow:hover::after, .link-arrow:focus-visible::after { width: 36px; }
.link-arrow:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.link-arrow .icon, .index-list__go .icon { display: none; }
.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; }

/* Liens dans le texte courant */
.prose a, .link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: currentColor; }
.prose a:hover, .link:hover { text-decoration-color: var(--vert); text-decoration-thickness: 2px; }

/* ---------- Logo « Le trait » (lettres séparées pour les animations) ---------- */
.logo { position: relative; display: block; width: 100%; aspect-ratio: 564 / 100; }
.logo__l { position: absolute; top: 0; height: 100%; overflow: hidden; }
.logo__l svg { width: 100%; height: 100%; fill: currentColor; }
.logo__dash { position: absolute; left: 16.6667%; top: 40%; width: 10.2837%; height: 17%; background: var(--vert); }

/* ---------- Mouvement réduit : tout est affiché, rien ne bouge ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .skip, .site-header, .mbar, .menu, .stage, .cursor, .intro, .appel, .footer__logo { display: none !important; }
  .section { padding: 24px 0 !important; background: none !important; color: #000 !important; }
}
