/* HydroRackLab – feuille de style.
 * Charte : fond noir des rendus Blender, blanc PVC, gris raccord, vert lime de la vidéo.
 * Motif signature : la cote de dessin technique (ligne fine, traits d'extrémité, valeur en mm).
 */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --nuit: #000;
  --graphite: #1d201f;
  --ardoise: #2b2f2d;
  --trait: #3a3f3c;
  --raccord: #5c6166;
  --pvc: #eceee8;
  --brume: #a6aca5;
  --lime: #7ed957;
  --lime-sombre: #4f9a2f;
  --ambre: #f0b54a;
  --rouge: #ff7a6b;
  --r-media: 18px;
  --r-champ: 8px;
  --mesure: 68ch;
  --pas: clamp(1rem, 0.6rem + 1.6vw, 2rem);
  --ff: "Archivo", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--nuit); color: var(--pvc);
  font-family: var(--ff); font-size: 1.0625rem; line-height: 1.6; font-stretch: 100%;
  font-feature-settings: "tnum" 0; -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--lime); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--lime); color: #000; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mm, .num, td.n, .chiffre { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- typographie */
h1, h2, h3, h4 { line-height: 1.08; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 1.2rem + 5vw, 5.2rem); font-stretch: 118%; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.5rem); font-stretch: 112%; }
.hero ~ .section h2, .bande-chiffres ~ .section h2 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem); }
h3 { font-size: 1.35rem; font-stretch: 106%; font-weight: 750; }
h4 { font-size: 1.05rem; font-weight: 700; }
p, li { max-width: var(--mesure); }
p { margin: 0 0 1em; text-wrap: pretty; }
.chapo { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); color: var(--brume); max-width: 52ch; }
.muted { color: var(--brume); }
.petit { font-size: 0.9rem; }

/* ---------------------------------------------------------------- structure */
.page { width: min(1240px, 100% - 2 * var(--pas)); margin-inline: auto; }
.page-etroite { width: min(860px, 100% - 2 * var(--pas)); margin-inline: auto; }
main { display: block; min-height: 60vh; }
.section { padding-block: clamp(3.5rem, 2rem + 6vw, 7rem); }
.section + .section { padding-top: 0; }

/* en-tête */
.entete { position: sticky; top: 0; z-index: 50; background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ardoise); }
.entete .page { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.marque { display: flex; align-items: center; gap: 0.6rem; color: var(--pvc); text-decoration: none; font-weight: 800; font-stretch: 115%; font-size: 1.15rem; letter-spacing: -0.01em; }
.marque svg { width: 30px; height: 30px; }
.marque b { color: var(--lime); font-weight: 800; }
.nav { display: flex; gap: 0.25rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--pvc); text-decoration: none; padding: 0.55rem 0.8rem; border-radius: 999px; font-size: 0.97rem; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--graphite); }
.nav a[aria-current="page"] { color: var(--lime); }
.nav form { margin: 0; }
.nav .credits { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.8rem; border: 1px solid var(--lime-sombre); border-radius: 999px; color: var(--lime); font-weight: 650; font-size: 0.92rem; text-decoration: none; min-height: 36px; }
.menu-bouton { display: none; margin-left: auto; background: none; border: 1px solid var(--trait); color: var(--pvc); border-radius: 999px; padding: 0.5rem 0.9rem; font: inherit; min-height: 44px; }
@media (max-width: 880px) {
  .menu-bouton { display: inline-flex; align-items: center; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #000; border-bottom: 1px solid var(--ardoise); flex-direction: column; align-items: stretch; padding: 0.75rem var(--pas) 1.25rem; }
  .nav.ouvert { display: flex; }
  .nav a, .nav .bouton-lien { padding: 0.8rem 0.5rem; }
}

/* pied */
.pied { border-top: 1px solid var(--ardoise); margin-top: 5rem; padding-block: 3rem 2.5rem; color: var(--brume); font-size: 0.93rem; }
.pied .page { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
.pied a { color: var(--pvc); text-decoration: none; }
.pied a:hover { color: var(--lime); }
.pied ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.pied .mention-amazon { grid-column: 1 / -1; max-width: none; border-top: 1px solid var(--ardoise); padding-top: 1.25rem; font-size: 0.86rem; }
@media (max-width: 760px) { .pied .page { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- boutons */
.btn, .btn-ligne, .bouton-lien {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.7rem 1.4rem; border-radius: 999px; font: inherit; font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer; transition: background-color 0.18s, color 0.18s, border-color 0.18s, transform 0.12s;
  border: 2px solid var(--lime);
}
.btn { background: var(--lime); color: #000; }
.btn:hover { background: #95e676; border-color: #95e676; }
.btn:active, .btn-ligne:active { transform: translateY(1px); }
.btn-ligne { background: transparent; color: var(--pvc); }
.btn-ligne:hover { background: rgba(126, 217, 87, 0.1); }
.btn[disabled], .btn-ligne[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-danger { border-color: var(--rouge); color: var(--rouge); background: transparent; }
.btn-danger:hover { background: rgba(255, 122, 107, 0.1); }
.btn-petit { min-height: 38px; padding: 0.4rem 0.95rem; font-size: 0.92rem; }
.bouton-lien { border: none; background: none; color: var(--pvc); font-weight: 400; padding: 0.55rem 0.8rem; min-height: 44px; }
.bouton-lien:hover { background: var(--graphite); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* pastilles (reprennent les « pills » de la vidéo) */
.pastilles { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0; margin: 0 0 1.5rem; list-style: none; }
.pastilles li { border: 2px solid var(--lime); border-radius: 999px; padding: 0.35rem 1rem; font-size: 1rem; background: rgba(0, 0, 0, 0.55); }

/* ---------------------------------------------------------------- cote (motif signature) */
.cote-h { position: relative; height: 26px; margin: 0.5rem 0; color: var(--lime); }
.cote-h::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid currentColor; }
.cote-h::after { content: ""; position: absolute; inset: 0; border-inline: 1px solid currentColor; }
.cote-h span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--nuit); padding: 0 0.6rem; font-size: 0.85rem; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

svg .cote line { stroke: var(--lime); stroke-width: 2; vector-effect: non-scaling-stroke; }
svg .cote text, svg .cote-txt { fill: var(--lime); font-family: var(--ff); font-size: var(--fs, 54px); font-variant-numeric: tabular-nums; }
svg .cote-txt.gris { fill: var(--brume); }

/* ---------------------------------------------------------------- accueil */
.hero { position: relative; overflow: hidden; background: #000; border-bottom: 1px solid var(--ardoise); }
.hero .page { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 2rem; min-height: min(86vh, 820px); padding-block: 3rem; }
.hero h1 { margin-bottom: 0.4em; font-size: clamp(2.3rem, 1.1rem + 3.4vw, 4rem); }
.hero .chapo { margin-bottom: 2rem; }
.hero-visuel { position: relative; margin-right: calc(-1 * var(--pas)); }
.hero-visuel img { width: 100%; height: auto; -webkit-mask-image: radial-gradient(ellipse 56% 60% at 55% 50%, #000 58%, transparent 100%); mask-image: radial-gradient(ellipse 56% 60% at 55% 50%, #000 58%, transparent 100%); }
.hero-cotes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.hero-cotes line { stroke: var(--lime); stroke-width: 2.5; }
.hero-cotes text { fill: var(--lime); font-family: var(--ff); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-cotes .trace { stroke-dasharray: 600; stroke-dashoffset: 600; animation: trace 1.4s 0.5s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-cotes text { opacity: 0; animation: apparait 0.5s 1.6s forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes apparait { to { opacity: 1; } }
@media (max-width: 900px) {
  .hero .page { grid-template-columns: 1fr; min-height: 0; padding-top: 2rem; }
  .hero-visuel { margin-right: 0; order: -1; }
}

.bande-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--ardoise); }
.bande-chiffres > div { padding: 2rem var(--pas); border-right: 1px solid var(--ardoise); }
.bande-chiffres > div:last-child { border-right: 0; }
.bande-chiffres strong { display: block; font-size: clamp(2.6rem, 1.8rem + 3vw, 4.2rem); font-stretch: 125%; font-weight: 800; line-height: 1; color: var(--pvc); font-variant-numeric: tabular-nums; }
.bande-chiffres span { color: var(--brume); }
@media (max-width: 700px) { .bande-chiffres { grid-template-columns: 1fr; } .bande-chiffres > div { border-right: 0; border-bottom: 1px solid var(--ardoise); } }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.duo.inverse > :first-child { order: 2; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } .duo.inverse > :first-child { order: 0; } }
.media { border-radius: var(--r-media); overflow: hidden; background: #000; border: 1px solid var(--ardoise); }
.media img { width: 100%; height: auto; }

.etapes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: e; border-top: 1px solid var(--trait); }
.etapes li { counter-increment: e; padding: 1.5rem 1.5rem 1.5rem 0; position: relative; }
.etapes li + li { padding-left: 1.5rem; border-left: 1px solid var(--trait); }
.etapes li::before { content: counter(e); display: block; font-size: 3.2rem; font-weight: 800; font-stretch: 125%; color: var(--lime); line-height: 1; margin-bottom: 0.75rem; font-variant-numeric: tabular-nums; }
@media (max-width: 820px) { .etapes { grid-template-columns: 1fr; } .etapes li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--trait); } }

.video-cadre { width: min(360px, 100%); aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden; border: 1px solid var(--trait); background: #000; margin-inline: auto; }
.video-cadre video { width: 100%; height: 100%; object-fit: cover; }

.encart { border-left: 3px solid var(--ambre); padding: 0.9rem 1.2rem; background: rgba(240, 181, 74, 0.07); border-radius: 0 var(--r-champ) var(--r-champ) 0; }
.encart.info { border-color: var(--lime); background: rgba(126, 217, 87, 0.06); }
.encart p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- tarifs */
.offres { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.offre { border: 1px solid var(--trait); border-radius: var(--r-media); padding: 2rem; background: var(--graphite); display: flex; flex-direction: column; gap: 1rem; }
.offre .prix { font-size: 3rem; font-weight: 800; font-stretch: 120%; line-height: 1; font-variant-numeric: tabular-nums; }
.offre .prix small { font-size: 1rem; font-weight: 500; color: var(--brume); font-stretch: 100%; }
.offre ul { padding-left: 1.1rem; margin: 0; }
.offre form { margin-top: auto; }

/* ---------------------------------------------------------------- formulaires */
.carte-form { background: var(--graphite); border: 1px solid var(--trait); border-radius: var(--r-media); padding: clamp(1.5rem, 4vw, 2.5rem); }
.auth { width: min(460px, 100% - 2 * var(--pas)); margin: clamp(2rem, 8vh, 5rem) auto; }
.champ { display: grid; gap: 0.35rem; margin-bottom: 1.1rem; }
.champ label, .champ .label { font-weight: 650; font-size: 0.97rem; }
.champ .aide { color: var(--brume); font-size: 0.88rem; }
.champ .erreur, .erreur-txt { color: var(--rouge); font-size: 0.9rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  font: inherit; color: var(--pvc); background: #0d0f0e; border: 1px solid var(--trait); border-radius: var(--r-champ);
  padding: 0.7rem 0.85rem; min-height: 48px; width: 100%; font-variant-numeric: tabular-nums;
}
input:focus, select:focus, textarea:focus { border-color: var(--lime); outline: 2px solid rgba(126, 217, 87, 0.35); outline-offset: 0; }
input[aria-invalid=true] { border-color: var(--rouge); }
.case { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 1rem; }
.case input { width: 20px; height: 20px; margin-top: 0.2rem; accent-color: var(--lime); flex: none; }
.code-saisie { font-size: 2rem; letter-spacing: 0.5em; text-align: center; font-stretch: 115%; font-weight: 700; }
input[type=range] { width: 100%; accent-color: var(--lime); min-height: 32px; }
.unite { display: flex; align-items: center; gap: 0.5rem; }
.unite input { flex: 1; }
.unite span { color: var(--brume); min-width: 2.2em; }

.flash { list-style: none; padding: 0; margin: 1.25rem auto 0; width: min(1240px, 100% - 2 * var(--pas)); display: grid; gap: 0.5rem; }
.flash li { padding: 0.85rem 1.1rem; border-radius: var(--r-champ); border: 1px solid var(--trait); background: var(--graphite); max-width: none; }
.flash .succes { border-color: var(--lime-sombre); }
.flash .erreur { border-color: var(--rouge); }

/* ---------------------------------------------------------------- tableaux */
.tableau-defile { overflow-x: auto; border: 1px solid var(--trait); border-radius: var(--r-champ); }
table { border-collapse: collapse; width: 100%; font-size: 0.96rem; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--ardoise); vertical-align: top; }
th { font-weight: 650; color: var(--brume); background: var(--graphite); position: sticky; top: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.statut { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.82rem; border: 1px solid var(--trait); white-space: nowrap; }
.statut.paye, .statut.actif { border-color: var(--lime-sombre); color: var(--lime); }
.statut.rembourse, .statut.rembourse_partiel { border-color: var(--ambre); color: var(--ambre); }
.statut.inactif, .statut.echoue { border-color: var(--rouge); color: var(--rouge); }

/* ---------------------------------------------------------------- espace client */
.tete-page { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin: 2.5rem 0 2rem; }
.tete-page h1 { font-size: clamp(2rem, 1.4rem + 2.5vw, 3.2rem); margin: 0; }
.solde { display: flex; align-items: baseline; gap: 0.6rem; }
.solde strong { font-size: 3.4rem; font-weight: 800; font-stretch: 125%; color: var(--lime); line-height: 1; font-variant-numeric: tabular-nums; }
.grille-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.25rem; }
.design-carte { border: 1px solid var(--trait); border-radius: var(--r-media); padding: 1.25rem; background: var(--graphite); display: grid; gap: 0.6rem; text-decoration: none; color: inherit; transition: border-color 0.18s; }
.design-carte:hover { border-color: var(--lime); }
.design-carte h3 { margin: 0; font-size: 1.2rem; }
.design-carte dl { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 1rem; margin: 0; font-size: 0.93rem; }
.design-carte dt { color: var(--brume); }
.design-carte dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.vide { border: 1px dashed var(--trait); border-radius: var(--r-media); padding: 2.5rem; text-align: center; }
.vide p { margin-inline: auto; }

/* ---------------------------------------------------------------- configurateur */
.config { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 2rem; align-items: start; margin-top: 1.5rem; }
@media (max-width: 980px) { .config { grid-template-columns: 1fr; } }
.config-panneau { background: var(--graphite); border: 1px solid var(--trait); border-radius: var(--r-media); padding: 1.5rem; }
.fil-etapes { display: flex; gap: 0; list-style: none; padding: 0; margin: 0 0 1.5rem; border: 1px solid var(--trait); border-radius: 999px; overflow: hidden; }
.fil-etapes li { flex: 1; max-width: none; }
.fil-etapes button { width: 100%; background: none; border: 0; color: var(--brume); font: inherit; font-size: 0.9rem; padding: 0.65rem 0.4rem; cursor: pointer; min-height: 44px; }
.fil-etapes button[aria-current="step"] { background: var(--lime); color: #000; font-weight: 700; }
.fil-etapes button:disabled { cursor: not-allowed; opacity: 0.5; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.9rem; }
.choix-mur { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
.choix-mur label { border: 1px solid var(--trait); border-radius: var(--r-champ); text-align: center; padding: 0.55rem 0.2rem; cursor: pointer; font-size: 0.9rem; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.choix-mur input { position: absolute; opacity: 0; pointer-events: none; }
.choix-mur input:checked + span { color: #000; }
.choix-mur label:has(input:checked) { background: var(--lime); color: #000; border-color: var(--lime); font-weight: 700; }
.choix-mur label:has(input:focus-visible) { outline: 3px solid var(--lime); outline-offset: 2px; }
.plan-zone { background: #050605; border: 1px solid var(--ardoise); border-radius: var(--r-media); padding: 1rem; }
.plan-zone svg { width: 100%; height: auto; max-height: 72vh; }
.scenarios { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.9rem; margin-top: 1rem; }
.scenario { text-align: left; background: var(--graphite); border: 1px solid var(--trait); border-radius: 14px; padding: 0.9rem; color: var(--pvc); font: inherit; cursor: pointer; display: grid; gap: 0.5rem; transition: border-color 0.18s; }
.scenario:hover { border-color: var(--raccord); }
.scenario[aria-pressed="true"] { border-color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }
.scenario svg { width: 100%; height: 130px; background: #050605; border-radius: 8px; }
.scenario strong { font-size: 1rem; }
.scenario .chiffres { display: flex; gap: 1rem; font-size: 0.88rem; color: var(--brume); flex-wrap: wrap; }
.scenario .chiffres b { color: var(--pvc); font-variant-numeric: tabular-nums; }
.vues-rack { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; }
.vues-rack figure { margin: 0; background: #050605; border: 1px solid var(--ardoise); border-radius: var(--r-media); padding: 0.75rem; }
.vues-rack svg { width: 100%; height: auto; max-height: 520px; }
.vues-rack figcaption { color: var(--brume); font-size: 0.88rem; padding: 0.4rem 0.25rem 0; }
@media (max-width: 760px) { .vues-rack { grid-template-columns: 1fr; } }
.recap { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border: 1px solid var(--trait); border-radius: var(--r-media); overflow: hidden; margin: 1rem 0; }
.recap div { padding: 1rem 1.1rem; border-right: 1px solid var(--ardoise); border-bottom: 1px solid var(--ardoise); }
.recap strong { display: block; font-size: 1.9rem; font-weight: 800; font-stretch: 118%; line-height: 1.1; font-variant-numeric: tabular-nums; }
.recap span { color: var(--brume); font-size: 0.9rem; }
.messages-calc { list-style: none; padding: 0; margin: 0.75rem 0; display: grid; gap: 0.4rem; }
.messages-calc li { padding: 0.55rem 0.8rem; border-radius: var(--r-champ); font-size: 0.92rem; }
.messages-calc .err { border: 1px solid var(--rouge); color: var(--rouge); }
.messages-calc .avert { border: 1px solid var(--ambre); color: var(--ambre); }

/* éléments des plans SVG */
svg .grille line { stroke: #232725; stroke-width: 1; vector-effect: non-scaling-stroke; }
svg .murs { fill: none; stroke: var(--pvc); stroke-width: 4; vector-effect: non-scaling-stroke; }
svg .allee { stroke: none; opacity: 0.55; }
svg .hachure { stroke: #2a3a24; stroke-width: 40; }
svg .allee.distribution { opacity: 0.85; }
svg .porte path { fill: none; stroke: var(--ambre); stroke-width: 2; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
svg .porte .baie { stroke: #000; stroke-width: 8; vector-effect: non-scaling-stroke; }
svg .label-porte { fill: var(--ambre); font-size: var(--fs, 170px); font-family: var(--ff); font-weight: 700; }
svg .rack rect { fill: #e6e9e3; stroke: #8b918c; stroke-width: 1; vector-effect: non-scaling-stroke; }
svg .rack .face { stroke: var(--lime); stroke-width: 4; vector-effect: non-scaling-stroke; stroke-linecap: round; }
svg .rack .num { fill: #1d201f; font-size: 150px; font-weight: 800; font-family: var(--ff); }
svg .nord path { fill: var(--pvc); }
svg .nord text { fill: var(--pvc); font-size: 150px; font-weight: 800; font-family: var(--ff); }
.scenario svg .cote, .scenario svg .label-porte, .scenario svg .nord, .scenario svg .rack .num { display: none; }
svg .tube { fill: #f2f4ef; stroke: #59605b; stroke-width: 1; vector-effect: non-scaling-stroke; }
svg .raccord { fill: #5c6166; opacity: 0.95; }
svg .rail { fill: #2f4a24; stroke: var(--lime); stroke-width: 1; vector-effect: non-scaling-stroke; }
svg .led { fill: #fff9d6; stroke: #e6d27a; stroke-width: 1; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(255, 248, 200, 0.7)); }
svg .sol { stroke: var(--brume); stroke-width: 2; vector-effect: non-scaling-stroke; }

/* plan de débit */
.debit { display: grid; gap: 0.9rem; }
.debit-ligne { margin: 0; display: grid; gap: 0.35rem; }
.debit-svg { width: 100%; height: 34px; border-radius: 6px; overflow: hidden; }
.debit-svg .piece { stroke: #000; stroke-width: 2; vector-effect: non-scaling-stroke; }
.debit-svg .montant { fill: #eceee8; }
.debit-svg .longeron { fill: #b9c4b2; }
.debit-svg .traverse { fill: var(--lime); }
.debit-svg .trait { fill: var(--rouge); }
.debit-svg .chute { fill: #3a2a28; }
.debit-ligne figcaption { display: flex; gap: 0.9rem; flex-wrap: wrap; font-size: 0.93rem; }
.debit-ligne figcaption strong { font-variant-numeric: tabular-nums; min-width: 3ch; }
.legende { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.88rem; color: var(--brume); list-style: none; padding: 0; margin: 0.5rem 0 0; }
.legende i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 0.4rem; }

/* ---------------------------------------------------------------- guide personnalisé */
.guide h2 { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--trait); }
.guide h3 { margin-top: 2rem; }
.guide .sommaire { columns: 2; column-gap: 2rem; padding-left: 1.2rem; }
.guide .sommaire li { break-inside: avoid; }
.guide ol.pas > li { margin-bottom: 0.6rem; }
.guide .cases { list-style: none; padding: 0; }
.guide .cases li::before { content: ""; display: inline-block; width: 16px; height: 16px; border: 2px solid var(--lime); border-radius: 3px; margin-right: 0.6rem; vertical-align: -3px; }
.liens-achat { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 0.3rem; font-size: 0.93rem; }
.liens-achat .site { color: var(--brume); margin-right: 0.35rem; }
.badge { display: inline-block; font-size: 0.75rem; border: 1px solid var(--trait); border-radius: 999px; padding: 0 0.5rem; color: var(--brume); }
.badge.ok { border-color: var(--lime-sombre); color: var(--lime); }
.achat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--ardoise); }
.achat .qte { font-size: 1.6rem; font-weight: 800; font-stretch: 118%; text-align: right; font-variant-numeric: tabular-nums; }
.achat .qte small { display: block; font-size: 0.8rem; font-weight: 400; color: var(--brume); font-stretch: 100%; }
.barre-outils { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1rem 0 2rem; }

/* ---------------------------------------------------------------- admin */
.admin-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; border-bottom: 1px solid var(--ardoise); margin-bottom: 2rem; }
.admin-nav a { color: var(--brume); text-decoration: none; padding: 0.8rem 1rem; border-bottom: 2px solid transparent; }
.admin-nav a[aria-current="page"] { color: var(--pvc); border-bottom-color: var(--lime); }
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.kpi div { background: var(--graphite); border: 1px solid var(--trait); border-radius: 14px; padding: 1.1rem 1.2rem; }
.kpi strong { display: block; font-size: 2rem; font-weight: 800; font-stretch: 115%; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi span { color: var(--brume); font-size: 0.9rem; }
.colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 900px) { .colonnes { grid-template-columns: 1fr; } }
.boite { background: var(--graphite); border: 1px solid var(--trait); border-radius: 14px; padding: 1.25rem; }
.boite h2, .boite h3 { font-size: 1.15rem; font-stretch: 105%; margin-bottom: 0.9rem; }
.form-ligne { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: end; }
.form-ligne .champ { margin: 0; flex: 1; min-width: 140px; }
.recherche { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.recherche input { max-width: 360px; }
.recherche select { max-width: 220px; }
details.rembourser summary { cursor: pointer; color: var(--ambre); }
details.rembourser form { margin-top: 0.6rem; display: grid; gap: 0.5rem; min-width: 240px; }

/* ---------------------------------------------------------------- mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .hero-cotes .trace { stroke-dashoffset: 0; }
  .hero-cotes text { opacity: 1; }
}

/* ---------------------------------------------------------------- impression du guide (A4, fond blanc) */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  :root { --pvc: #111; --brume: #555; --graphite: #fff; --ardoise: #ccc; --trait: #bbb; --lime: #2f7d12; --nuit: #fff; color-scheme: light; }
  body { background: #fff; color: #111; font-size: 10.5pt; }
  .entete, .pied, .barre-outils, .flash, .ne-pas-imprimer { display: none !important; }
  .page, .page-etroite { width: 100%; }
  a { color: #111; text-decoration: none; }
  .guide h2 { break-before: page; border-top: 0; margin-top: 0; }
  .guide h2.sans-saut { break-before: auto; }
  figure, table, .achat, .recap, .vues-rack figure { break-inside: avoid; }
  .plan-zone, .vues-rack figure { background: #fff; border-color: #bbb; }
  svg .tube { fill: #fff; stroke: #333; }
  svg .rack rect { fill: #eee; stroke: #333; }
  svg .murs { stroke: #111; }
  svg .grille line { stroke: #eee; }
  svg .nord path { fill: #111; } svg .nord text { fill: #111; }
  svg .rail { fill: #dfe9d8; stroke: #5b8a4a; }
  svg .led { filter: none; }
  svg .hachure { stroke: #d8e6d0; }
  svg .rack .num { fill: #111; }
  .debit-svg .chute { fill: #f1d3cf; }
  .debit-svg .traverse { fill: #9bd47f; }
  th { background: #f1f1f1; color: #111; }
  .tableau-defile { overflow: visible; }
  td.n, th.n { white-space: normal; }
  table { font-size: 9pt; }
}

/* compléments */
.h3 { font-size: 1.35rem; font-stretch: 106%; font-weight: 750; }
.etape fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; }
.etape legend { padding: 0; margin-bottom: 0.35rem; }
.legende .l-montant { background: #eceee8; } .legende .l-longeron { background: #b9c4b2; }
.legende .l-traverse { background: var(--lime); } .legende .l-chute { background: #3a2a28; border: 1px solid #6b4a45; }
.config-vues { display: grid; gap: 1rem; min-width: 0; }
.config-vues h3 { margin-top: 1rem; }

.guide td:first-child { white-space: nowrap; }
@media (max-width: 420px) { .grille-2 { grid-template-columns: 1fr; } }
.bande-chiffres { padding-inline: max(0px, calc((100% - 1240px) / 2)); }
.bande-chiffres > div:first-child { padding-left: max(var(--pas), 0px); }

#zone-rack.perime .recap, #zone-rack.perime .vues-rack, #zone-rack.perime .debit { opacity: 0.3; filter: grayscale(1); transition: opacity 0.2s; }
#limites-rack { margin: 0 0 1.1rem; }
