/* =============================================================================
   ENTRELYO — Feuille de style
   Direction artistique « Digital Architecture » : le site est traité comme un
   plan. Grille éditoriale asymétrique, filets fins, cotes de dessin technique,
   typographie grotesque. Carbone pour la structure, ivoire pour le support,
   cuivre en accent uniquement.

   Polices hébergées localement (aucun appel à un service tiers) :
   Manrope (titres), Inter (textes), IBM Plex Mono (données techniques).
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* --- Jetons ------------------------------------------------------------- */
/* Contrastes WCAG 2.1 AA vérifiés : les couleurs « -ink » servent au texte,
   le cuivre et l'ardoise d'origine restent réservés aux filets et accents. */
:root {
  --carbon:       #151c22;  /* 16.2:1 sur ivoire */
  --carbon-2:     #212a31;
  --carbon-3:     #2e3942;
  --ivory:        #f4f1eb;
  --ivory-2:      #ebe6dc;
  --white:        #ffffff;
  --copper:       #c26d49;  /* accent graphique (filets, repères) */
  --copper-ink:   #9a4f31;  /* texte cuivre : 5.3:1 sur ivoire */
  --copper-light: #e7a483;  /* texte cuivre sur carbone : 7.4:1 */
  --slate:        #697a7d;  /* filets, pictogrammes */
  --slate-ink:    #4f5e62;  /* texte secondaire : 6.1:1 sur ivoire */
  --slate-light:  #a9b6b8;  /* texte secondaire sur carbone : 7.9:1 */

  /* Alias utilisés par l'ensemble des vues */
  --brand:        var(--carbon);
  --brand-dark:   #000000;
  --brand-light:  #e3ded3;
  --brand-ring:   rgba(194, 109, 73, .35);
  --accent:       var(--copper);
  --accent-ink:   var(--copper-ink);
  --accent-soft:  #f3e2d6;

  --ink:          var(--carbon);
  --ink-soft:     #2f3a41;
  --muted:        var(--slate-ink);
  --muted-soft:   #5b6a6e;

  --bg:           var(--ivory);
  --bg-alt:       var(--ivory-2);
  --surface:      var(--white);
  --surface-alt:  #faf8f4;
  --surface-sunk: #efebe3;

  --line:         #d8d2c6;
  --line-soft:    #e6e1d7;
  --line-strong:  #b9b1a2;
  --line-input:   #85847f;  /* bordures de champs : 3.6:1 sur blanc */
  --line-dark:    #34404a;  /* filets sur carbone */

  --ok:           #2d6a4f;
  --ok-bg:        #e8f0ea;
  --ok-line:      #b9d3c3;
  --warn:         #8d5a0e;
  --warn-bg:      #f6ecd9;
  --warn-line:    #e3c99a;
  --danger:       #a33a2a;
  --danger-bg:    #f7e4df;
  --danger-line:  #e5b8ad;
  --info:         #2f5468;
  --info-bg:      #e5edf0;
  --info-line:    #b7cbd4;

  --radius:       2px;
  --radius-lg:    2px;
  --radius-sm:    2px;

  --shadow-sm:    none;
  --shadow:       none;
  --shadow-lg:    0 24px 60px -30px rgba(21, 28, 34, .45);

  --font-display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font:         "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:         "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container:    1240px;
  --gutter:       clamp(20px, 3vw, 40px);
  --header-h:     72px;
  --sidebar-w:    256px;
  --ease:         cubic-bezier(.2, .7, .2, 1);
}

/* --- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
img, svg, video { max-width: 100%; height: auto; display: block; }
::selection { background: var(--copper); color: var(--white); }

h1, h2, h3, h4, h5 {
  margin: 0 0 .5em; font-family: var(--font-display); color: var(--ink);
  font-weight: 700; line-height: 1.12; letter-spacing: -.022em;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); letter-spacing: -.03em; }
h3 { font-size: 1.18rem; font-weight: 650; letter-spacing: -.012em; }
h4 { font-size: 1rem; font-weight: 650; letter-spacing: -.005em; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin-bottom: .3rem; }
strong { font-weight: 600; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: .2em; text-decoration-thickness: 1px; transition: color .2s, text-decoration-color .2s; }
a:hover { color: var(--copper-ink); text-decoration-color: var(--copper); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

code, kbd, pre { font-family: var(--mono); font-size: .86em; }
code { background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--radius); padding: .08em .35em; color: var(--ink-soft); word-break: break-word; }
pre { background: var(--carbon); color: #dfe5e6; padding: 1rem 1.2rem; border-radius: var(--radius); overflow-x: auto; margin: 0 0 1.2rem; line-height: 1.6; position: relative; }
pre code { background: none; border: 0; padding: 0; color: inherit; }
pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 0; right: 0; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-light); padding: 6px 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
blockquote { margin: 0 0 1.2rem; padding: .2rem 0 .2rem 1.2rem; border-left: 2px solid var(--copper); color: var(--ink-soft); }
blockquote p:last-child { margin-bottom: 0; }

table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2rem; -webkit-overflow-scrolling: touch; }
th, td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-family: var(--mono); font-weight: 500; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-ink); border-bottom: 1px solid var(--ink); white-space: nowrap; background: transparent; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--surface-alt); }

/* --- Utilitaires --------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 860px; }
.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section-sm { padding: 2.5rem 0; }
.section-alt { background: var(--bg-alt); }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-sm { font-size: .88rem; }
.text-xs { font-size: .78rem; }
.mono { font-family: var(--mono); font-size: .92em; }
.nowrap { white-space: nowrap; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: .5rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; } .mt-5 { margin-top: 2.5rem; }
.mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; } .mb-5 { margin-bottom: 2.5rem; }
.flex { display: flex; gap: 1rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; gap: .5rem; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.hide { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--carbon); color: var(--ivory); padding: .6rem 1rem; text-decoration: none; }
.skip-link:focus { top: 1rem; color: var(--ivory); }

.grid { display: grid; gap: 1.5rem; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Repère éditorial : petit carré cuivre + libellé technique */
.eyebrow, .label {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase; color: var(--copper-ink);
  margin-bottom: 1rem;
}
.eyebrow::before, .label::before { content: ""; width: 7px; height: 7px; background: var(--copper); flex: none; }
.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.55; color: var(--ink-soft); }

/* Lien fléché, signature des appels secondaires */
.link-arrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 650; font-size: .95rem;
  color: var(--ink); text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px; transition: background-size .35s var(--ease), color .2s;
}
.link-arrow::after { content: "→"; transition: transform .3s var(--ease); }
.link-arrow:hover { background-size: 100% 1px; color: var(--copper-ink); }
.link-arrow:hover::after { transform: translateX(4px); }

/* --- Boutons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.25rem;
  font-family: var(--font-display); font-size: .92rem; font-weight: 650; letter-spacing: -.005em;
  border: 1px solid var(--carbon); border-radius: var(--radius);
  background: var(--carbon); color: var(--ivory);
  cursor: pointer; text-decoration: none; white-space: nowrap; position: relative;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn::after {
  content: ""; position: absolute; left: -1px; right: -1px; bottom: -1px; height: 2px;
  background: var(--copper); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.btn:hover { background: var(--carbon-2); color: var(--white); text-decoration: none; }
.btn:hover::after { transform: scaleX(1); }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--ivory); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-sunk); color: var(--ink); }
.btn-ghost::after { display: none; }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #862d20; }
.btn-success { background: var(--ok); border-color: var(--ok); }
.btn-success:hover { background: #22523d; }
.btn-light, .btn-inverse { background: var(--ivory); color: var(--carbon); border-color: var(--ivory); }
.btn-light:hover, .btn-inverse:hover { background: var(--white); color: var(--carbon); }
.btn-lg { min-height: 52px; padding: .85rem 1.6rem; font-size: 1rem; }
.btn-sm { min-height: 34px; padding: .38rem .8rem; font-size: .82rem; }
.btn-block { width: 100%; }
.btn-white { background: var(--carbon); color: var(--ivory); }

/* --- Badges et statuts --------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .16rem .5rem; font-family: var(--font); font-size: .74rem; font-weight: 600; line-height: 1.5;
  border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink-soft); white-space: nowrap; text-decoration: none;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge-plain::before { display: none; }
.badge.ok     { background: var(--ok-bg);     color: var(--ok);     border-color: var(--ok-line); }
.badge.warn   { background: var(--warn-bg);   color: var(--warn);   border-color: var(--warn-line); }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge.info   { background: var(--info-bg);   color: var(--info);   border-color: var(--info-line); }
.badge.muted  { color: var(--muted); }
.badge.brand  { background: var(--carbon); color: var(--ivory); border-color: var(--carbon); }
a.badge:hover { color: inherit; filter: brightness(.96); }

/* --- Cartes : un cadre fin, pas d'ombre ---------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.card-hover { transition: border-color .2s; }
.card-hover:hover { border-color: var(--ink); }
.card-header {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin: -1.5rem -1.5rem 1.5rem; padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.card-header h2, .card-header h3 { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
.card-footer { margin: 1.5rem -1.5rem -1.5rem; padding: 1rem 1.5rem; border-top: 1px solid var(--line); background: var(--surface-alt); }
.card-flush { padding: 0; overflow: hidden; }
.card-flush .card-header { margin: 0; }
.card-flush table { margin: 0; }
.card-flush th:first-child, .card-flush td:first-child { padding-left: 1.5rem; }
.card-flush th:last-child, .card-flush td:last-child { padding-right: 1.5rem; }
.card-flush tbody tr:last-child td { border-bottom: 0; }
.card-accent { border-color: var(--ink); border-top: 3px solid var(--copper); }

/* --- Chiffres clés : une rangée de relevés ------------------------------- */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; position: relative; }
.stat::before { content: ""; position: absolute; left: -1px; top: -1px; width: 24px; height: 2px; background: var(--copper); }
.stat-label { font-family: var(--mono); font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .45rem; }
.stat-value { font-family: var(--font-display); font-size: 1.85rem; font-weight: 700; line-height: 1.05; letter-spacing: -.035em; }
.stat-hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.stat-value.ok { color: var(--ok); } .stat-value.warn { color: var(--warn); } .stat-value.danger { color: var(--danger); }
.stat-link { display: block; color: inherit; text-decoration: none; transition: border-color .2s; }
.stat-link:hover { color: inherit; border-color: var(--ink); }

/* --- Alertes ------------------------------------------------------------- */
.alert {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .85rem 1rem; margin-bottom: 1rem; font-size: .92rem;
  border: 1px solid var(--line); border-left: 3px solid var(--slate); border-radius: var(--radius);
  background: var(--surface);
}
.alert p:last-child { margin-bottom: 0; }
.alert-icon { flex: none; font-family: var(--mono); font-weight: 500; font-size: .85rem; line-height: 1.6; }
.alert.success { border-left-color: var(--ok); background: var(--ok-bg); color: #1f4d39; border-color: var(--ok-line); }
.alert.error   { border-left-color: var(--danger); background: var(--danger-bg); color: #7a2a1e; border-color: var(--danger-line); }
.alert.warning { border-left-color: var(--warn); background: var(--warn-bg); color: #6b440a; border-color: var(--warn-line); }
.alert.info    { border-left-color: var(--info); background: var(--info-bg); color: #243f4e; border-color: var(--info-line); }
.alert a { color: inherit; font-weight: 600; }
.flash-stack { position: sticky; top: calc(var(--header-h) + 8px); z-index: 40; }

/* --- Formulaires --------------------------------------------------------- */
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 1rem; }
label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: .35rem; color: var(--ink-soft); }
.label-hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="url"], input[type="tel"], input[type="date"], input[type="datetime-local"],
input[type="search"], input[type="file"], select, textarea {
  width: 100%; min-height: 44px; padding: .6rem .8rem;
  font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--line-input); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--brand-ring); }
input::placeholder, textarea::placeholder { color: #7c8488; opacity: 1; }
textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
textarea.code { font-family: var(--mono); font-size: .84rem; min-height: 260px; }
select {
  appearance: none; padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23151c22' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center;
}
input[type="file"] { padding: .45rem; background: var(--surface-alt); cursor: pointer; }
input[type="color"] { width: 52px; height: 40px; padding: 2px; cursor: pointer; border: 1px solid var(--line-input); }
input[disabled], select[disabled], textarea[disabled] { background: var(--surface-sunk); color: var(--muted); cursor: not-allowed; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .82rem; margin-top: .3rem; font-weight: 500; }
.field-help { color: var(--muted); font-size: .82rem; margin-top: .3rem; }
.check { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .65rem; }
.check input { width: 18px; height: 18px; margin: .15rem 0 0; flex: none; accent-color: var(--carbon); }
.check label { margin: 0; font-weight: 400; color: var(--ink-soft); font-size: .92rem; }
.check-inline { display: inline-flex; align-items: center; gap: .4rem; margin-right: 1.2rem; }
fieldset { border: 0; border-top: 1px solid var(--ink); border-radius: 0; padding: 1rem 0 .25rem; margin: 0 0 1.25rem; }
legend { font-family: var(--mono); font-weight: 500; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; padding: 0 .6rem 0 0; color: var(--copper-ink); }
.input-group { display: flex; }
.input-group input { flex: 1; min-width: 0; }
.input-prefix { display: flex; align-items: center; padding: 0 .75rem; background: var(--surface-sunk); border: 1px solid var(--line-input); border-right: 0; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.input-prefix + input { border-radius: 0 var(--radius) var(--radius) 0; }
.input-group .btn { margin-left: -1px; }
.input-sub { margin-top: .35rem; font-size: .84rem !important; min-height: 38px !important; }

/* --- En-tête public ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(244, 241, 235, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: border-color .3s, background .3s;
}
.site-header .container { display: flex; align-items: center; gap: 2rem; height: var(--header-h); }

/* Logotype : nom composé en Manrope, équerre cuivre en guise de repère */
.logo {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; letter-spacing: -.04em;
  color: var(--ink); text-decoration: none; line-height: 1;
}
.logo::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: var(--copper); border-bottom-color: var(--copper); flex: none; transition: transform .5s var(--ease); }
.logo:hover { color: var(--ink); }
.logo:hover::before { transform: rotate(90deg); }
.logo-dot { display: none; }

.main-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.main-nav a {
  position: relative; padding: .5rem .75rem; font-size: .9rem; font-weight: 500;
  color: var(--ink-soft); text-decoration: none;
}
.main-nav a:not(.btn)::after {
  content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .2rem; height: 1px;
  background: var(--copper); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.main-nav a:not(.btn):hover { color: var(--ink); }
.main-nav a:not(.btn):hover::after, .main-nav a.is-active::after { transform: scaleX(1); }
.main-nav a.is-active { color: var(--ink); font-weight: 600; }
.main-nav a.btn { color: var(--ivory); margin-left: .35rem; }
.main-nav a.btn-secondary { color: var(--ink); }
.main-nav a.btn-secondary:hover { color: var(--ivory); }
.nav-divider { width: 1px; height: 22px; background: var(--line-strong); margin: 0 .5rem; flex: none; }
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; padding: 0;
  background: none; border: 1px solid var(--ink); border-radius: var(--radius); cursor: pointer; color: var(--ink);
  place-items: center;
}
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; } .burger::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after { transform: translateY(-6px) rotate(-45deg); }

/* --- Pied de page -------------------------------------------------------- */
.site-footer { background: var(--carbon); color: var(--slate-light); padding: 4.5rem 0 2rem; font-size: .9rem; }
.site-footer .logo { color: var(--ivory); font-size: 1.5rem; }
.site-footer h4 { font-family: var(--mono); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--copper-light); margin-bottom: 1rem; }
.site-footer a { color: #d6dcdd; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--copper); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }
.footer-grid { display: grid; grid-template-columns: 5fr 2fr 2fr 3fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line-dark); }
.footer-note { color: var(--slate-light); max-width: 38ch; margin-top: 1rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-top: 1.5rem; font-family: var(--mono); font-size: .74rem; color: var(--slate-light); }

/* =============================================================================
   PAGE D'ACCUEIL
   ========================================================================== */

/* Ouverture : composition éditoriale sur la grille de plan */
.intro { position: relative; padding: clamp(3.5rem, 8vw, 7rem) 0 0; overflow: hidden; }
.intro .container { position: relative; }
.plan-grid::before {
  content: ""; position: absolute; inset: 0 var(--gutter); pointer-events: none; z-index: 0;
  background-image: linear-gradient(to right, rgba(21, 28, 34, .07) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  border-right: 1px solid rgba(21, 28, 34, .07);
}
.intro-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 0; position: relative; z-index: 1; }
.intro-label { grid-column: 1 / 7; margin-bottom: 2.5rem; }
.intro-title {
  grid-column: 1 / 11; margin: 0 0 3rem;
  font-size: clamp(2.7rem, 1.2rem + 5.4vw, 6.2rem); font-weight: 750; line-height: .98; letter-spacing: -.055em;
}
.intro-title span { display: block; color: var(--slate); font-weight: 500; }
.intro-title span::before { content: ""; display: inline-block; width: .55em; height: .08em; background: var(--copper); vertical-align: middle; margin-right: .25em; transform: translateY(-.1em); }
.intro-body { grid-column: 7 / 13; padding-left: clamp(0rem, 2vw, 2rem); border-left: 1px solid var(--ink); }
.intro-body p { font-size: 1.08rem; color: var(--ink-soft); max-width: 46ch; }
.intro-actions { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; margin-top: 1.75rem; }

/* Fiche technique : relevé en police mono, séparé par des filets */
.spec-strip {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(3.5rem, 7vw, 6rem) 0 0;
  border-top: 1px solid var(--ink);
}
.spec-strip > div { padding: 1.1rem 1.25rem 1.5rem 0; }
.spec-strip > div + div { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.spec-strip dt { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .35rem; }
.spec-strip dd { margin: 0; font-family: var(--font-display); font-weight: 650; font-size: 1rem; letter-spacing: -.01em; }

/* Bandeau carbone : les logiciels */
.band-carbon { background: var(--carbon); color: #d6dcdd; }
.band-carbon h2, .band-carbon h3 { color: var(--ivory); }
.band-carbon .eyebrow { color: var(--copper-light); }
.band-carbon .link-arrow { color: var(--ivory); }
.band-carbon .link-arrow:hover { color: var(--copper-light); }
.band-carbon a:not(.btn):not(.link-arrow) { color: var(--ivory); }
.band-head { display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 2rem; align-items: end; padding-bottom: 2rem; margin-bottom: 3rem; border-bottom: 1px solid var(--line-dark); }
.band-head h2 { margin: 0; }
.band-head p { margin: 0; color: var(--slate-light); }
.band-head .link-arrow { justify-self: end; }

/* Planche logiciel : visuel et texte, orientation alternée */
.plate { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: 1rem 0 4rem; }
.plate > * { min-width: 0; }
.plate + .plate { padding-top: 4rem; border-top: 1px solid var(--line-dark); }
.plate:last-child { padding-bottom: 0; }
.plate.is-reverse .plate-visual { order: 2; }
.plate-visual { position: relative; }
.plate-visual img { width: 100%; border: 1px solid var(--line-dark); transition: transform .8s var(--ease); }
.plate-visual a { display: block; overflow: hidden; text-decoration: none; }
.plate-visual a:hover img { transform: scale(1.015); }
/* Cotes de dessin technique autour du visuel */
.plate-visual::before, .plate-visual::after { content: ""; position: absolute; background: var(--copper); }
.plate-visual::before { left: 0; right: 0; bottom: -14px; height: 1px; }
.plate-visual::after { right: -14px; top: 0; bottom: 0; width: 1px; }
.plate-type {
  display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 16 / 10;
  padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--line-dark);
  background:
    linear-gradient(to right, var(--line-dark) 1px, transparent 1px) 0 0 / calc(100% / 8) 100%,
    var(--carbon-2);
}
.plate-type-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 1.5rem + 4vw, 5rem); letter-spacing: -.05em; line-height: .9; color: var(--ivory); }
.plate-type-meta { font-family: var(--mono); font-size: .74rem; color: var(--slate-light); text-transform: uppercase; letter-spacing: .07em; }
.plate-cat { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--copper-light); margin-bottom: .8rem; }
.plate-text h3 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); font-weight: 750; letter-spacing: -.04em; margin-bottom: .75rem; }
.plate-text p { color: var(--slate-light); font-size: 1.02rem; }
.plate-features { list-style: none; padding: 0; margin: 1.5rem 0 2rem; border-top: 1px solid var(--line-dark); }
.plate-features li { margin: 0; padding: .6rem 0; border-bottom: 1px solid var(--line-dark); color: #d6dcdd; font-size: .95rem; display: flex; gap: .75rem; }
.plate-features li::before { content: ""; width: 10px; height: 1px; background: var(--copper); margin-top: .75em; flex: none; }
.plate-actions { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.band-empty { color: var(--slate-light); }

/* Deux colonnes éditoriales : titre à gauche, contenu à droite */
.split { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.split > * { min-width: 0; }
.split-head { position: sticky; top: calc(var(--header-h) + 2rem); }
.split-head h2 { margin-bottom: 1rem; }
.split-head p { color: var(--muted); max-width: 34ch; }

/* Liste de services : lignes séparées par des filets */
.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.service-list li {
  display: grid; grid-template-columns: 5fr 6fr; gap: 1rem 2.5rem; margin: 0;
  padding: 1.75rem 0; border-bottom: 1px solid var(--line); position: relative;
}
.service-list li::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--copper);
  transition: width .5s var(--ease);
}
.service-list li:hover::before { width: 100%; }
.service-list h3 { margin: 0; font-size: clamp(1.25rem, 1.05rem + .7vw, 1.6rem); font-weight: 700; letter-spacing: -.03em; }
.service-list p { margin: 0 0 .75rem; color: var(--ink-soft); }

/* Cote : ligne de dimension horizontale jalonnée par les étapes */
.process-head { display: grid; grid-template-columns: 7fr 5fr; gap: 2rem; align-items: end; margin-bottom: 3.5rem; }
.process-head h2 { margin: 0; max-width: 16ch; }
.process-head p { margin: 0; color: var(--muted); }
.cote { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.cote::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--ink); }
.cote::after { content: ""; position: absolute; right: 0; top: 0; width: 1px; height: 15px; background: var(--ink); }
.cote li { position: relative; margin: 0; padding: 2.25rem 2rem 0 0; }
.cote li::before { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 15px; background: var(--ink); }
.cote li::after { content: ""; position: absolute; left: -3px; top: 4px; width: 7px; height: 7px; background: var(--copper); }
.cote-term { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; margin-bottom: .5rem; }
.cote li p { color: var(--ink-soft); margin: 0; max-width: 36ch; }

/* Espace client : relevé des rubriques */
.ledger { margin: 0; border-top: 1px solid var(--ink); }
.ledger > div { display: grid; grid-template-columns: 4fr 8fr; gap: 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); transition: padding .3s var(--ease); }
.ledger > div:hover { padding-left: .5rem; }
.ledger dt { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.ledger dd { margin: 0; color: var(--ink-soft); }

/* Questions : accordéons à filets */
details.accordion { border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; margin: 0; }
details.accordion:first-of-type { border-top: 1px solid var(--ink); }
details.accordion > summary {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  padding: 1.1rem 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 650; font-size: 1.02rem; letter-spacing: -.01em;
  transition: color .2s;
}
details.accordion > summary::-webkit-details-marker { display: none; }
details.accordion > summary::after { content: "+"; font-family: var(--mono); font-weight: 400; font-size: 1.1rem; color: var(--copper-ink); transition: transform .3s var(--ease); flex: none; }
details.accordion[open] > summary::after { transform: rotate(45deg); }
details.accordion > summary:hover { color: var(--copper-ink); }
.accordion-body { padding: 0 0 1.25rem; color: var(--ink-soft); max-width: 70ch; }
.accordion-body > :last-child { margin-bottom: 0; }

/* Bandeau de contact final */
.closing { background: var(--carbon); color: var(--slate-light); }
.closing-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.closing h2 { color: var(--ivory); font-size: clamp(2rem, 1.3rem + 3vw, 3.8rem); letter-spacing: -.05em; line-height: 1; margin-bottom: 2rem; }
.closing .eyebrow { color: var(--copper-light); }
.closing-contact { margin: 0; border-top: 1px solid var(--line-dark); }
.closing-contact > div { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line-dark); }
.closing-contact dt { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--slate-light); }
.closing-contact dd { margin: 0; color: var(--ivory); text-align: right; }
.closing-contact a { color: var(--ivory); text-decoration: none; }
.closing-contact a:hover { color: var(--copper-light); }

/* Appel à l'action générique (pages internes) */
.cta-band { border-top: 1px solid var(--ink); padding: clamp(2rem, 4vw, 3rem) 0 0; text-align: left; }
.cta-band h2 { max-width: 22ch; }
.cta-band p { color: var(--muted); max-width: 60ch; }
.cta-band .flex-center { justify-content: flex-start !important; }
.cta-band-split { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem 3rem; flex-wrap: wrap; }

/* =============================================================================
   PAGES INTERNES
   ========================================================================== */
.page-head { position: relative; padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--ink); }
.page-head h1 { margin-bottom: .6rem; max-width: 20ch; }
.page-head .lead { margin-bottom: 0; max-width: 62ch; }
.page-head .breadcrumb { margin-bottom: 1.25rem; }
.page-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.page-head-meta { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 1rem; }
.page-head-alt, .page-head-legal, .page-head-feature { background: transparent; }
.search-box { min-width: min(100%, 340px); }

.breadcrumb { display: flex; gap: .5rem; flex-wrap: wrap; font-family: var(--mono); font-size: .74rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--copper-ink); }
.breadcrumb span::after { content: "/"; margin-left: .5rem; color: var(--line-strong); }

.filters { display: flex; gap: 0; flex-wrap: wrap; margin-bottom: 0; border: 1px solid var(--ink); width: fit-content; max-width: 100%; }
.filter-chip { padding: .55rem 1rem; font-size: .86rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; border-right: 1px solid var(--line); transition: background .2s, color .2s; }
.filter-chip:last-child { border-right: 0; }
.filter-chip:hover { background: var(--surface-sunk); color: var(--ink); }
.filter-chip.is-active { background: var(--ink); color: var(--ivory); }
.filter-count { font-family: var(--mono); font-size: .75em; opacity: .7; margin-left: .25rem; }
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; font-size: .9rem; color: var(--muted); }

/* Catalogue : index éditorial des logiciels */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--line); }
.project-card { display: flex; flex-direction: column; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; transition: background .3s var(--ease); }
.project-card:hover { background: var(--surface); }
.project-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--carbon); text-decoration: none; }
.project-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.project-card:hover .project-card-media img { transform: scale(1.03); }
.project-card-monogram {
  display: flex; align-items: flex-end; height: 100%; padding: 1.25rem;
  font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; letter-spacing: -.05em; line-height: .9; color: var(--ivory);
  background: linear-gradient(to right, var(--line-dark) 1px, transparent 1px) 0 0 / 12.5% 100%, var(--carbon-2);
}
.project-card-body { padding: 1.4rem 1.5rem .5rem; flex: 1; }
.project-card-cat { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--copper-ink); }
.project-card-title { font-size: 1.5rem; font-weight: 750; letter-spacing: -.035em; margin: .35rem 0 .5rem; }
.project-card-title a { color: var(--ink); text-decoration: none; }
.project-card-title a:hover { color: var(--copper-ink); }
.project-card-body p { color: var(--ink-soft); font-size: .95rem; }
.project-card-points { list-style: none; padding: 0; margin: 0 0 1rem; font-size: .88rem; }
.project-card-points li { display: flex; gap: .6rem; color: var(--ink-soft); margin-bottom: .3rem; }
.project-card-points li::before { content: ""; width: 8px; height: 1px; background: var(--copper); margin-top: .75em; flex: none; }
.project-card-foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: 1rem 1.5rem 1.4rem; }
.project-card-tags { display: flex; gap: .35rem; flex-wrap: wrap; }

/* Fiche d'un logiciel */
.project-hero { padding: clamp(2.5rem, 5vw, 4rem) 0; border-bottom: 1px solid var(--ink); }
.project-hero-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: end; }
.project-hero-grid > * { min-width: 0; }
.project-hero-grid > div:only-child { grid-column: 1 / -1; max-width: 70ch; }
.project-hero-title { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.project-hero-title h1 { margin: 0; font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.4rem); letter-spacing: -.05em; line-height: .95; }
.project-logo { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--line); }
.project-monogram { display: none; }
.project-hero-cover { margin: 0; position: relative; }
.project-hero-cover img { width: 100%; border: 1px solid var(--line-strong); }
.project-hero-cover::after { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 1px; background: var(--copper); }
.spec-inline { display: flex; flex-wrap: wrap; margin: 1.5rem 0 0; border-top: 1px solid var(--line); }
.spec-inline > div { padding: .7rem 1.5rem .2rem 0; }
.spec-inline > div + div { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.spec-inline dt { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.spec-inline dd { margin: 0; font-family: var(--font-display); font-weight: 650; }
.hero-actions { display: flex; gap: 1rem 1.5rem; flex-wrap: wrap; align-items: center; margin-top: 2rem; }

.section-nav { position: sticky; top: var(--header-h); z-index: 30; background: rgba(244, 241, 235, .96); border-bottom: 1px solid var(--line); }
.section-nav .container { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.section-nav a { white-space: nowrap; padding: .9rem 1.1rem; font-size: .86rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; border-bottom: 2px solid transparent; transition: border-color .25s, color .25s; }
.section-nav a:first-child { padding-left: 0; }
.section-nav a:hover { color: var(--ink); border-bottom-color: var(--copper); }

.project-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(260px, 4fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.project-layout > * { min-width: 0; }
.project-main h2, .project-main > div[id] { scroll-margin-top: calc(var(--header-h) + 64px); }
.project-main > h2, .project-main > div > h2 { padding-top: 1rem; border-top: 1px solid var(--ink); }
.project-aside { position: sticky; top: calc(var(--header-h) + 72px); border-top: 3px solid var(--copper); }
.project-aside-title { font-size: 1.1rem; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 2rem; }
.feature { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.feature-num { display: none; }
.feature h3 { font-size: 1.02rem; margin: 0 0 .3rem; }
.feature p { font-size: .92rem; color: var(--muted); margin: 0; }

.doc-list { border-top: 1px solid var(--line); }
.doc-item { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.doc-item strong { display: block; font-family: var(--font-display); }
.pdf-card-icon { display: grid; place-items: center; flex: none; width: 40px; height: 48px; border: 1px solid var(--ink); font-family: var(--mono); font-size: .66rem; font-weight: 500; color: var(--ink); position: relative; }
.pdf-card-icon::after { content: ""; position: absolute; right: -1px; top: -1px; width: 10px; height: 10px; background: var(--bg); border-left: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.pdf-card { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .9rem 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.pdf-card-title { flex: 1; font-family: var(--font-display); font-weight: 650; min-width: 160px; }
.pdf-card-actions { display: flex; gap: .5rem; }
.pdf-preview { margin-top: .6rem; }
.pdf-preview summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--copper-ink); }
.pdf-preview iframe { width: 100%; height: 70vh; min-height: 420px; border: 1px solid var(--line); margin-top: .6rem; background: var(--white); }
.pdf-thumb { display: grid; place-items: center; aspect-ratio: 3 / 4; max-width: 110px; border: 1px solid var(--ink); font-family: var(--mono); font-size: .8rem; color: var(--ink); text-decoration: none; }
.pdf-thumb:hover { background: var(--surface); color: var(--copper-ink); }

/* Médias intercalés */
.media { margin: 1.75rem 0; }
.media img, .media video { width: 100%; border: 1px solid var(--line); background: var(--surface-alt); }
.media-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); background: var(--carbon); }
.media-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media figcaption { margin-top: .6rem; font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.media-consent { display: grid; place-items: center; text-align: center; background: linear-gradient(to right, var(--line-dark) 1px, transparent 1px) 0 0 / 12.5% 100%, var(--carbon); }
.media-consent-body { position: relative; padding: 1.25rem; max-width: 46ch; }
.media-consent-body p { color: var(--slate-light); font-size: .8rem; margin: 1rem 0 0; }
.media-consent-body a { color: var(--copper-light); }
.media-play { width: 68px; height: 68px; border-radius: 50%; border: 1px solid var(--ivory); background: transparent; color: var(--ivory); font-size: 1.3rem; padding-left: 5px; cursor: pointer; transition: background .25s, color .25s; }
.media-play:hover, .media-play:focus-visible { background: var(--ivory); color: var(--carbon); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.gallery .media { margin: 0; }

/* Contenu rédactionnel */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.5rem; font-size: 1.6rem; }
.prose h3 { margin-top: 1.75rem; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose img { border: 1px solid var(--line); margin: 1.25rem 0; }
.prose input[type="checkbox"] { width: auto; min-height: 0; margin-right: .35rem; }
.prose ul li::marker { color: var(--copper); }

.toc { position: sticky; top: calc(var(--header-h) + 20px); border-top: 1px solid var(--ink); padding-top: 1rem; font-size: .88rem; max-height: calc(100vh - 130px); overflow-y: auto; }
.toc h4 { font-family: var(--mono); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .07em; color: var(--copper-ink); margin-bottom: .75rem; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: .3rem 0 .3rem .75rem; border-left: 1px solid var(--line); color: var(--muted); text-decoration: none; transition: border-color .2s, color .2s; }
.toc a:hover { color: var(--ink); border-left-color: var(--copper); }
.toc .level-3 { padding-left: 1.4rem; font-size: .84rem; }
.toc .level-4 { padding-left: 2rem; font-size: .82rem; }
.doc-layout { display: grid; grid-template-columns: 240px 1fr; gap: 3.5rem; align-items: start; }
.doc-layout > * { min-width: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.75rem 3rem; border-left: 1px solid var(--line); margin-left: .9rem; }
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before { content: counter(step); position: absolute; left: -.9rem; top: 0; width: 1.8rem; height: 1.8rem; background: var(--carbon); color: var(--ivory); display: grid; place-items: center; font-family: var(--mono); font-size: .8rem; }

.free-banner { display: flex; gap: 1rem; align-items: flex-start; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.free-banner-icon { flex: none; font-family: var(--mono); color: var(--copper-ink); }
.free-banner p { margin: 0; font-size: .92rem; }

/* Pages légales : lecture continue */
.legal-nav { display: flex; gap: 0; flex-wrap: wrap; margin-top: 2rem; border: 1px solid var(--ink); width: fit-content; max-width: 100%; }
.legal-nav a { padding: .5rem .95rem; font-size: .84rem; color: var(--ink-soft); text-decoration: none; border-right: 1px solid var(--line); transition: background .2s; }
.legal-nav a:last-child { border-right: 0; }
.legal-nav a:hover { background: var(--surface-sunk); }
.legal-nav a.is-active { background: var(--ink); color: var(--ivory); }
.legal-text { max-width: 72ch; font-size: 1rem; line-height: 1.75; color: var(--ink-soft); }
.legal-text h2 { font-size: 1.3rem; margin: 2.75rem 0 .75rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ink); }
.legal-text h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.legal-text h3 { font-size: 1rem; margin: 1.5rem 0 .3rem; }

/* Divers */
.callout { display: flex; gap: .8rem; padding: .9rem 1rem; margin: 0 0 1.4rem; font-size: .9rem; color: var(--ink-soft); background: var(--surface-alt); border: 1px solid var(--line); border-left: 3px solid var(--copper); }
.callout-title { font-weight: 650; display: block; margin-bottom: .15rem; color: var(--ink); }
.empty-state { text-align: left; padding: 2.5rem 1.5rem; color: var(--muted); }
.card.empty-state { border-style: dashed; }
.empty-state-icon { font-family: var(--mono); font-size: 1.4rem; margin-bottom: .75rem; color: var(--copper-ink); }
.empty-state h3 { color: var(--ink); margin-bottom: .4rem; font-size: 1.1rem; }
.empty-state .flex-center { justify-content: flex-start !important; }
.feature-icon { display: none; }

/* =============================================================================
   ESPACE CLIENT ET ADMINISTRATION — interface de gestion
   ========================================================================== */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; background: var(--bg); }

.app-sidebar {
  background: var(--carbon); color: var(--slate-light);
  padding: 1.4rem 0 1rem; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin;
}
.app-sidebar .logo { color: var(--ivory); padding: 0 1.4rem 1.4rem; margin-bottom: .4rem; border-bottom: 1px solid var(--line-dark); width: 100%; }
.sidebar-badge { font-family: var(--mono); font-size: .6rem; font-weight: 500; letter-spacing: .08em; color: var(--copper-light); border: 1px solid var(--line-dark); padding: .1rem .35rem; margin-left: .5rem; }
.sidebar-section { padding: 1.3rem 1.4rem .5rem; font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: #8e9c9f; }
.sidebar-nav { display: flex; flex-direction: column; }
.sidebar-nav a {
  position: relative; display: flex; align-items: center; gap: .75rem;
  padding: .55rem 1.4rem; font-size: .9rem; color: #cdd5d6; text-decoration: none;
  transition: background .2s, color .2s;
}
.sidebar-nav a::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--copper); transform: scaleY(0); transition: transform .25s var(--ease); }
.sidebar-nav a:hover { background: var(--carbon-2); color: var(--white); }
.sidebar-nav a.is-active { background: var(--carbon-2); color: var(--white); font-weight: 600; }
.sidebar-nav a.is-active::before { transform: scaleY(1); }
.sidebar-nav .icon { width: 1.1rem; text-align: center; flex: none; font-size: .85rem; opacity: .7; }
.sidebar-nav .count { margin-left: auto; font-family: var(--mono); font-size: .7rem; color: var(--slate-light); border: 1px solid var(--line-dark); padding: 0 .4rem; }
.sidebar-nav .count.is-alert { background: var(--copper); border-color: var(--copper); color: var(--carbon); font-weight: 500; }
.sidebar-foot { margin-top: auto; padding: 1.2rem 1.4rem 0; border-top: 1px solid var(--line-dark); font-size: .82rem; }
.sidebar-foot .btn-secondary { color: var(--ivory); border-color: var(--line-dark); }
.sidebar-foot .btn-secondary:hover { background: var(--ivory); color: var(--carbon); }
.sidebar-foot .btn-ghost { color: var(--slate-light); }
.sidebar-foot .btn-ghost:hover { background: var(--carbon-2); color: var(--white); }
.sidebar-user { display: flex; align-items: center; gap: .65rem; margin-bottom: .9rem; }
.sidebar-user-name { display: block; font-size: .86rem; font-weight: 600; color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-meta { display: block; font-family: var(--mono); font-size: .7rem; color: #8e9c9f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; flex: none; background: var(--copper); color: var(--carbon); font-family: var(--font-display); font-size: .74rem; font-weight: 800; letter-spacing: -.02em; }
.avatar-lg { width: 52px; height: 52px; font-size: 1rem; }

.sidebar-toggle, .sidebar-close { display: none; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; background: none; border: 1px solid var(--ink); cursor: pointer; font-size: 1.2rem; line-height: 1; color: var(--ink); }
.sidebar-close { position: absolute; top: .9rem; right: .9rem; border-color: var(--line-dark); color: var(--ivory); }
.sidebar-backdrop { display: none; }

.app-main { min-width: 0; background: var(--bg); }
.app-topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 2.25rem; min-height: 72px;
  background: var(--bg); border-bottom: 1px solid var(--ink);
  position: sticky; top: 0; z-index: 30;
}
.app-topbar h1 { margin: 0; font-size: 1.35rem; letter-spacing: -.03em; }
.app-topbar .breadcrumb { margin-bottom: .25rem; }
.app-content { padding: 2rem 2.25rem 3rem; }
.app-content > .card, .app-content > .grid { margin-bottom: 1.5rem; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.data-table { width: 100%; }
.data-table td { font-size: .9rem; }
.data-table .actions { text-align: right; white-space: nowrap; }
.data-table .actions .btn, .data-table .actions form { margin-left: .3rem; }
.row-title { font-weight: 600; color: var(--ink); }
a.row-title { text-decoration: none; }
a.row-title:hover { color: var(--copper-ink); }
.row-sub { font-size: .8rem; color: var(--muted); }
.row-highlight { background: var(--warn-bg) !important; }

.pagination { display: flex; gap: 0; justify-content: flex-start; margin-top: 1.5rem; flex-wrap: wrap; border: 1px solid var(--ink); width: fit-content; }
.pagination a, .pagination span { padding: .45rem .8rem; font-family: var(--mono); font-size: .8rem; color: var(--ink-soft); text-decoration: none; border-right: 1px solid var(--line); }
.pagination a:last-child, .pagination span:last-child { border-right: 0; }
.pagination a:hover { background: var(--surface-sunk); }
.pagination .is-active { background: var(--ink); color: var(--ivory); }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

.license-key { display: inline-flex; align-items: center; gap: .6rem; width: 100%; font-family: var(--mono); font-size: .92rem; font-weight: 500; letter-spacing: .02em; background: var(--surface-alt); border: 1px solid var(--line-strong); padding: .55rem .75rem; word-break: break-all; }
.license-key-lg { font-size: 1.02rem; padding: .8rem 1rem; }
.copy-btn { border: 1px solid var(--line-strong); background: var(--white); color: var(--ink-soft); padding: .22rem .6rem; font-family: var(--font); font-size: .75rem; font-weight: 600; cursor: pointer; flex: none; transition: border-color .2s, background .2s; min-height: 30px; }
.copy-btn:hover { border-color: var(--ink); }
.copy-btn.is-done { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }

.meter { height: 4px; background: var(--surface-sunk); overflow: hidden; margin: .4rem 0; }
.meter-fill { height: 100%; background: var(--carbon); transition: width .4s var(--ease); }
.meter-fill.warn { background: var(--warn); }
.meter-fill.danger { background: var(--danger); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 1rem 1.3rem; border-left: 1px solid var(--line); margin-left: .3rem; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: .5rem; width: 7px; height: 7px; background: var(--line-strong); }
.timeline li.is-ok::before { background: var(--ok); }
.timeline li.is-warn::before { background: var(--warn); }
.timeline li.is-danger::before { background: var(--danger); }
.timeline-time { font-family: var(--mono); font-size: .72rem; color: var(--muted); }

.definition-list { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.25rem; font-size: .9rem; align-items: baseline; margin: 0; }
.definition-list dt { color: var(--muted); font-weight: 400; }
.definition-list dd { margin: 0; font-weight: 500; }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--ink); margin-bottom: 1.75rem; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: .7rem 1.1rem; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 500; color: var(--muted); white-space: nowrap; text-decoration: none; transition: color .2s, border-color .2s; }
.tabs a:first-child, .tabs button:first-child { padding-left: 0; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .is-active { color: var(--ink); border-bottom-color: var(--copper); font-weight: 600; }

.toolbar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; padding: 0 0 1.25rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.toolbar .field { margin: 0; min-width: 160px; }
.toolbar .grow { min-width: 220px; }

/* Règlements */
.pay-summary { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.25rem 2rem; flex-wrap: wrap; padding: 1.5rem 1.75rem; background: var(--carbon); color: var(--slate-light); border-left: 3px solid var(--copper); }
.pay-summary-label { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--copper-light); margin-bottom: .3rem; }
.pay-summary-amount { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; letter-spacing: -.04em; color: var(--ivory); line-height: 1; }
.pay-summary p { color: var(--slate-light); max-width: 52ch; }
.pay-summary .btn { background: var(--ivory); color: var(--carbon); border-color: var(--ivory); }
.pay-summary-alert { border-left-color: var(--copper); }
.pay-card { padding: 1.5rem 1.75rem; }
.pay-card-main { display: flex; justify-content: space-between; gap: 1rem 2rem; align-items: flex-start; flex-wrap: wrap; }
.pay-card-title { font-size: 1.25rem; margin: 0 0 .35rem; }
.pay-card-amount { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }
.pay-card-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }

.rib { display: grid; grid-template-columns: max-content 1fr; margin: 0; border-top: 1px solid var(--ink); }
.rib dt, .rib dd { padding: .85rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.rib dt { color: var(--muted); font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; padding-right: 1.5rem; display: flex; align-items: center; }
.rib dd { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.rib-value { font-family: var(--mono); font-size: 1.02rem; font-weight: 500; letter-spacing: .04em; color: var(--ink); }
.rib-amount { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }
.rib-ref { background: var(--accent-soft); color: var(--copper-ink); padding: .1rem .5rem; }

/* Sites du client */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.site-card { display: flex; flex-direction: column; padding-top: 0; }
.site-card-bar { display: flex; align-items: center; gap: 5px; margin: 0 -1.5rem 1.25rem; padding: .65rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface-alt); }
.site-card-bar span { width: 8px; height: 8px; border: 1px solid var(--line-strong); flex: none; }
.site-card-bar em { margin-left: .5rem; font-style: normal; font-family: var(--mono); font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-card-title { font-size: 1.3rem; margin-bottom: .35rem; }
.site-card-notes { color: var(--ink-soft); border-left: 2px solid var(--copper); padding-left: .75rem; }

.sub-card.is-ended { opacity: .7; }
.link-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.link-list li { margin: 0; border-bottom: 1px solid var(--line); }
.link-list a { display: flex; flex-direction: column; padding: .6rem 0; color: var(--ink); text-decoration: none; }
.link-list a span { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.link-list a:hover strong { color: var(--copper-ink); }

/* Administration : fiche client, abonnements, factures */
.client-head { border-top: 3px solid var(--carbon); }
.sub-row { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.sub-row:first-of-type { padding-top: 0; }
details.inline-edit { margin-top: .75rem; }
details.inline-edit > summary { cursor: pointer; list-style: none; display: inline-flex; font-size: .85rem; font-weight: 600; color: var(--copper-ink); }
details.inline-edit > summary::-webkit-details-marker { display: none; }
details.inline-edit > summary.btn { color: var(--ink); }
details.inline-edit > summary.btn:hover { color: var(--ivory); }

.invoice-lines { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .75rem; }
.invoice-line { display: grid; grid-template-columns: minmax(0, 1fr) 90px 150px; gap: .6rem; align-items: start; }
.invoice-line-head { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-bottom: .4rem; border-bottom: 1px solid var(--ink); }
.invoice-total-preview { text-align: right; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--ink); font-size: .95rem; }
.invoice-total-preview strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }

/* Authentification */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 2.5rem 1.25rem; background: var(--bg); position: relative; }
.auth-page::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, rgba(21, 28, 34, .06) 1px, transparent 1px); background-size: calc(100% / 12) 100%; }
.auth-page > * { position: relative; }
.auth-card { width: 100%; max-width: 440px; margin-inline: auto; background: var(--surface); border: 1px solid var(--ink); border-top: 3px solid var(--copper); padding: 2.25rem; }
.auth-card.wide { max-width: 600px; }
.auth-card h1 { font-size: 2rem; margin-bottom: .4rem; }
.auth-page .logo { font-size: 1.6rem; }
.auth-foot { margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.password-rules { list-style: none; padding: 0; margin: .45rem 0 0; font-size: .8rem; color: var(--muted); }
.password-rules li { padding-left: 1.1rem; position: relative; margin-bottom: .1rem; }
.password-rules li::before { content: "○"; position: absolute; left: 0; }
.password-rules li.is-valid { color: var(--ok); }
.password-rules li.is-valid::before { content: "●"; }

/* Facture */
.print-page { background: var(--bg-alt); }
.print-bar { background: var(--carbon); padding: .9rem 0; }
.print-bar a { color: var(--ivory); text-decoration: none; }
.print-bar .btn { background: var(--ivory); color: var(--carbon); border-color: var(--ivory); }
.invoice { max-width: 820px; margin: 2rem auto; padding: 3rem; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--carbon); }
.invoice-header { display: flex; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; flex-wrap: wrap; padding-bottom: 1.5rem; border-bottom: 1px solid var(--ink); }
.invoice-brand { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; letter-spacing: -.04em; margin-bottom: .4rem; }
.invoice-meta { text-align: right; }
.invoice-meta h1 { font-size: 2rem; margin-bottom: .4rem; }
.invoice-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.invoice-label { font-family: var(--mono); font-size: .7rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--copper-ink); margin-bottom: .5rem; }
.invoice-table .num { text-align: right; }
.invoice-total { margin-left: auto; width: min(320px, 100%); }
.invoice-total .flex-between { padding: .4rem 0; }
.invoice-total .total-row { border-top: 1px solid var(--ink); margin-top: .5rem; padding-top: .7rem; font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; }
.invoice-stamp { display: inline-block; margin-top: 1.75rem; padding: .45rem .9rem; border: 1.5px solid var(--ok); color: var(--ok); font-family: var(--mono); font-size: .82rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.invoice-due { margin-top: 1.75rem; padding: .9rem 1rem; border-left: 3px solid var(--copper); background: var(--surface-alt); font-size: .9rem; }
.invoice-legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); }

/* Bandeau d'information cookies */
.cookie-notice {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 90; max-width: 560px;
  display: flex; gap: 1.25rem; align-items: center;
  background: var(--carbon); color: var(--slate-light); border-left: 3px solid var(--copper);
  padding: 1rem 1.25rem; font-size: .84rem;
  animation: rise .6s var(--ease) both;
}
.cookie-notice p { margin: 0; }
.cookie-notice a { color: var(--copper-light); }
.cookie-notice .btn { flex: none; background: var(--ivory); color: var(--carbon); border-color: var(--ivory); }

/* Fenêtre de confirmation (remplace window.confirm) */
.modal { border: 1px solid var(--ink); border-top: 3px solid var(--copper); padding: 0; max-width: 460px; width: calc(100% - 2rem); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(21, 28, 34, .55); }
.modal[open] { animation: rise .35s var(--ease) both; }
.modal-body { padding: 1.6rem 1.6rem 1.25rem; }
.modal-title { font-size: 1.15rem; margin-bottom: .6rem; }
.modal-text { color: var(--ink-soft); margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.6rem; border-top: 1px solid var(--line); background: var(--surface-alt); }

/* Apparitions progressives */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.intro-title, .intro-label, .intro-body { animation: rise .9s var(--ease) both; }
.intro-title { animation-delay: .08s; }
.intro-body { animation-delay: .2s; }

/* =============================================================================
   IMPRESSION
   ========================================================================== */
@media print {
  .no-print, .site-header, .site-footer, .app-sidebar, .app-topbar, .cookie-notice, .print-bar, .section-nav { display: none !important; }
  body { background: #fff; font-size: 10.5pt; }
  .invoice { margin: 0; padding: 0; max-width: none; border: 0; }
  a { color: inherit; text-decoration: none; }
  .card { border: 1px solid #ccc; }
  .invoice-due { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* =============================================================================
   ADAPTATIONS — tablette et téléphone
   ========================================================================== */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .band-head { grid-template-columns: 1fr 1fr; }
  .band-head .link-arrow { justify-self: start; }
}

@media (max-width: 1024px) {
  .intro-title { grid-column: 1 / -1; }
  .intro-label { grid-column: 1 / -1; }
  .intro-body { grid-column: 3 / -1; }
  .plate, .plate.is-reverse { grid-template-columns: 1fr; gap: 2.5rem; }
  .plate.is-reverse .plate-visual { order: 0; }
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .split-head { position: static; }
  .process-head, .closing-grid { grid-template-columns: 1fr; }
  .project-layout, .project-hero-grid, .doc-layout { grid-template-columns: 1fr; }
  .project-aside, .toc { position: static; max-height: none; }
  .app-shell { grid-template-columns: 220px 1fr; }
  .app-content, .app-topbar { padding-left: 1.4rem; padding-right: 1.4rem; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  body { font-size: 15.5px; }

  /* Navigation mobile : panneau carbone plein écran, liens en grand */
  .nav-toggle { display: inline-grid; position: relative; z-index: 70; }
  .nav-toggle[aria-expanded="true"] { color: var(--ivory); border-color: var(--line-dark); }
  .main-nav {
    position: fixed; inset: 0; z-index: 65;
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
    padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2rem;
    background: var(--carbon); overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .main-nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .main-nav a { padding: .9rem 0; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; color: var(--ivory); border-bottom: 1px solid var(--line-dark); }
  .main-nav a:not(.btn)::after { display: none; }
  .main-nav a.is-active { color: var(--copper-light); }
  .main-nav a:not(.btn):hover { color: var(--copper-light); }
  .main-nav .nav-divider { display: none; }
  .main-nav a.btn { margin: 1.5rem 0 0; min-height: 54px; font-size: 1rem; background: var(--ivory); color: var(--carbon); border-color: var(--ivory); }
  .main-nav a.btn-secondary { background: transparent; color: var(--ivory); border-color: var(--line-dark); margin-top: .75rem; }
  html.nav-locked { overflow: hidden; }
  html.nav-locked .site-header .logo { position: relative; z-index: 70; color: var(--ivory); }

  .intro { padding-top: 2.5rem; }
  .plan-grid::before { background-size: calc(100% / 4) 100%; }
  .intro-body { grid-column: 1 / -1; padding-left: 1.1rem; }
  .intro-title { margin-bottom: 2rem; }
  .spec-strip { grid-template-columns: 1fr 1fr; }
  .spec-strip > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .spec-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .band-head { grid-template-columns: 1fr; gap: 1rem; }
  .service-list li { grid-template-columns: 1fr; gap: .5rem; }
  .cote { grid-template-columns: 1fr; }
  .cote::before { left: 7px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .cote::after { display: none; }
  .cote li { padding: 0 0 2rem 2.25rem; }
  .cote li::before { width: 15px; height: 1px; top: 7px; }
  .cote li::after { left: 4px; top: 4px; }
  .ledger > div { grid-template-columns: 1fr; gap: .25rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .plate-visual::after { display: none; }

  /* Menu latéral de l'espace client en tiroir */
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 80;
    width: min(300px, 86vw); height: 100dvh;
    transform: translateX(-100%); visibility: hidden;
    transition: transform .3s var(--ease), visibility .3s;
  }
  .app-sidebar.is-open { transform: none; visibility: visible; box-shadow: var(--shadow-lg); }
  .sidebar-close { display: grid; }
  .sidebar-nav a { padding: .75rem 1.4rem; font-size: .96rem; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 75; background: rgba(21, 28, 34, .5); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  .sidebar-backdrop.is-visible { opacity: 1; visibility: visible; }
  html.sidebar-locked { overflow: hidden; }
  .sidebar-toggle { display: inline-grid; }
  .app-topbar { flex-wrap: nowrap; gap: .75rem; padding: .7rem 1rem; min-height: 64px; }
  .app-topbar > .sidebar-toggle + * { flex: 1; min-width: 0; }
  .app-topbar h1 { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-topbar .page-actions:empty { display: none; }
  .app-content { padding: 1.25rem 1rem 2.5rem; }

  /* Tableaux : défilement horizontal plutôt que compression */
  .card-flush { overflow-x: auto; }
  .card-flush table { min-width: 560px; }

  .card { padding: 1.2rem; }
  .card-header { margin: -1.2rem -1.2rem 1.2rem; padding: .9rem 1.2rem; }
  .card-footer { margin: 1.2rem -1.2rem -1.2rem; padding: .9rem 1.2rem; }
  .card-flush .card-header { margin: 0; }
  .site-card-bar { margin: 0 -1.2rem 1.1rem; }
  .definition-list { grid-template-columns: 1fr; gap: .1rem; }
  .definition-list dd { margin-bottom: .65rem; }
  .rib { grid-template-columns: 1fr; }
  .rib dt { border-bottom: 0; padding-bottom: 0; }
  .invoice-parties { grid-template-columns: 1fr; gap: 1.25rem; }
  .invoice { padding: 1.4rem; }
  .invoice-meta { text-align: left; }
  .invoice-line { grid-template-columns: 1fr 70px 110px; }
  .pay-summary-amount { font-size: 2rem; }
  .auth-card { padding: 1.5rem; }
  .cookie-notice { left: .75rem; right: .75rem; flex-direction: column; align-items: stretch; }
  .filters, .legal-nav, .pagination { width: 100%; }
}

@media (max-width: 480px) {
  .spec-strip { grid-template-columns: 1fr; }
  .spec-strip > div { padding-left: 0 !important; border-left: 0 !important; border-top: 1px solid var(--line); }
  .spec-strip > div:first-child { border-top: 0; }
  .intro-actions .btn, .hero-actions .btn { width: 100%; }
  .invoice-line { grid-template-columns: 1fr; }
  .invoice-line-head { display: none; }
  .data-table .actions .btn { margin: .15rem 0 0 .2rem; }
}

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