/* Batacord V16 — « Signalétique de chantier ». Une seule couche de style pour la vitrine et l'espace connecté.
   Fond clair béton (lisible dehors en plein soleil), jaune de signalisation en aplat seulement (jamais en texte sur fond clair),
   bleu des panneaux d'indication pour les liens et l'information, vert pour ce qui est signé et facturable, rouge pour les refus.
   Polices : Barlow Condensed (titres, dessinée d'après la signalisation routière) et Barlow (texte). Aucune ressource externe.
   Contrastes vérifiés (WCAG AA) : texte principal 15:1, texte secondaire ≥ 6:1, liens bleus 6:1, texte bitume sur jaune 9,7:1. */

@font-face { font-family: "Barlow"; src: url("/static/polices/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/static/polices/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/static/polices/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/static/polices/barlow-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/static/polices/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/static/polices/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/static/polices/barlow-condensed-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

/* ===================================================================================================================
   1. Jetons
   =================================================================================================================== */
:root {
  /* Matériaux du chantier */
  --bitume: #1c1d1b; --bitume-2: #2a2b28; --bitume-3: #3a3b37;
  --beton: #d9dad5; --beton-fonce: #b9bab4; --dalle: #edeeea; --blanc: #fafaf8;
  /* Signalisation (palette par rôle) */
  --jaune: #f7b500; --jaune-survol: #ffc42e; --jaune-pale: #fff3cc;
  --bleu: #0e5a8a; --bleu-fonce: #0a4468; --bleu-pale: #e3eef5;
  --vert: #00824a; --vert-texte: #006b3d; --vert-pale: #e0f2e9;
  --rouge: #c1272d; --rouge-texte: #a61e24; --rouge-pale: #fbe6e6;
  --encre-stylo: #17336b; /* signature au stylo bleu */

  /* Anciens noms de rôles, lus par les composants existants */
  --plan: var(--bleu); --plan-fonce: var(--bleu-fonce); --trace: var(--bleu); --trace-fonce: var(--bleu-fonce);
  --signal: var(--jaune); --signal-fonce: #7a5200; --encaisse: var(--vert); --cosmos: var(--bitume); --stellaire: var(--blanc);

  --accent: var(--jaune); --accent-survol: var(--jaune-survol); --accent-sur: var(--bitume); --accent-texte: var(--bleu);
  --accent-doux: var(--jaune-pale); --accent-doux-bord: #e8c55c;
  --nuit: var(--bitume); --nuit-2: var(--bitume-2); --nuit-3: var(--bitume-3); --nuit-texte: #e4e5df; --nuit-texte-doux: #b3b4ae;
  --papier: var(--dalle); --carte: var(--blanc); --encre: var(--bitume); --encre-2: #3d3e3a; --encre-3: #575853;
  --trait: #d3d4ce; --trait-fort: #a7a8a2;
  --ok: var(--vert-texte); --ok-fond: var(--vert-pale); --ok-bord: #9fd3b6;
  --ok-clair: #0b5d5a; --ok-clair-fond: #ddf0ee; --ok-clair-bord: #9dd2cc;
  --info: var(--bleu); --info-fond: var(--bleu-pale); --info-bord: #a9c7dc;
  --attente: #39495a; --attente-fond: #e4e9ee; --attente-bord: #b5c2cf;
  --alerte: #7a5200; --alerte-fond: var(--jaune-pale); --alerte-bord: #e8c55c;
  --danger: var(--rouge-texte); --danger-fond: var(--rouge-pale); --danger-bord: #eba9ab;
  --neutre: #4a4b47; --neutre-fond: #e6e7e2; --neutre-bord: #c8c9c3;

  --police: "Barlow", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --police-titre: "Barlow Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --rayon: 8px; --rayon-petit: 4px; --rayon-grand: 12px;
  --ombre-1: 0 1px 0 rgba(28, 29, 27, .06);
  --ombre-2: 0 2px 0 rgba(28, 29, 27, .06), 0 10px 24px -14px rgba(28, 29, 27, .35);
  --ombre-3: 0 24px 48px -20px rgba(28, 29, 27, .45);
  --focus: 0 0 0 2px var(--blanc), 0 0 0 4px var(--bleu);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --duree: 160ms;
}

/* ===================================================================================================================
   2. Base et typographie
   =================================================================================================================== */
html { overflow-x: clip; }
[hidden] { display: none !important; } /* l'attribut hidden gagne toujours (ex. bandeau « Pas de réseau » du signalement, montré seulement hors ligne) */
body { font-family: var(--police); font-feature-settings: "tnum" 1, "lnum" 1; overflow-x: clip; background: var(--papier); color: var(--encre); }
h1, h2, h3, h4 { font-family: var(--police-titre); font-weight: 700; letter-spacing: 0; line-height: 1.02; color: var(--encre); }
h1 { font-weight: 800; font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.7rem); }
h3 { font-size: 1.45rem; }
a { color: var(--accent-texte); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; box-shadow: none; border-radius: 3px; }
::selection { background: var(--jaune); color: var(--bitume); }
.nombre, .kpi-valeur, .chiffre-valeur, .v13-num { font-family: var(--police-titre); font-variant-numeric: tabular-nums; }
.doux { color: var(--encre-3); }
.chapeau { color: var(--encre-2); font-size: 1.12rem; max-width: 62ch; }
.sur-titre { font: 700 1.05rem var(--police-titre); color: var(--bleu); margin: 0 0 .4rem; letter-spacing: .01em; }

/* Bandeau du mode démo : le seul endroit à bandes jaunes et noires, parce que c'est un avertissement */
.bandeau-demo { background: repeating-linear-gradient(-45deg, var(--jaune) 0 14px, var(--bitume) 14px 28px); }
.bandeau-demo p { margin: 0 auto; width: fit-content; padding: .28rem .9rem; background: var(--jaune); color: var(--bitume); font-weight: 700; font-size: .85rem; text-align: center; }

/* ===================================================================================================================
   3. Composants : boutons, champs, cartes, tableaux, pastilles, alertes
   =================================================================================================================== */
.btn { border-radius: var(--rayon-petit); font-weight: 600; box-shadow: none; min-height: 46px; transition: transform var(--duree) var(--ease), box-shadow var(--duree) var(--ease), background-color var(--duree), border-color var(--duree); }
.btn:not(.btn-danger):not(.btn-principal):hover { border-color: var(--bitume); }
.btn-principal { --b-bord: var(--bitume); background-image: none; border-width: 2px; box-shadow: 3px 3px 0 var(--bitume); }
.btn-principal:hover { --b-bord: var(--bitume); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--bitume); }
.btn-principal:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--bitume); }
.btn-large { font: 700 1.22rem/1 var(--police-titre); letter-spacing: .01em; min-height: 54px; padding: .7em 1.5em; }
.btn-sombre { --b-fond: var(--bitume); --b-texte: var(--blanc); --b-bord: var(--bitume); }
.btn-discret:hover { --b-fond: rgba(28, 29, 27, .07); }
.btn[aria-busy="true"], button[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"]::after, button[aria-busy="true"]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 1.1em; height: 1.1em; border-radius: 50%; border: 2.5px solid var(--bitume); border-right-color: transparent; animation: sg-tourne .7s linear infinite; }
@keyframes sg-tourne { to { transform: rotate(360deg); } }
.sg-btn-trait { --b-fond: transparent; --b-bord: var(--bitume); border-width: 2px; }
.sg-btn-trait:hover { --b-fond: var(--blanc); }

input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
  border-radius: var(--rayon-petit); border: 1.5px solid var(--trait-fort); background-color: var(--carte); color: var(--encre); box-shadow: none;
}
input:hover, select:hover, textarea:hover { border-color: var(--encre-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(14, 90, 138, .25); outline: none; }
.champ label { font-weight: 600; color: var(--encre); }
.erreur-champ { color: var(--danger); font-weight: 600; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--bleu); }
.case:has(input:checked) { border-color: var(--bleu); background: var(--bleu-pale); }

.carte, .bloc { border-radius: var(--rayon); border: 1px solid var(--trait); box-shadow: none; background: var(--carte); }
.tableau thead th { font: 700 .82rem var(--police-titre); letter-spacing: .02em; color: var(--encre-3); background: transparent; border-bottom: 2px solid var(--bitume); }
.tableau tbody tr:hover { background: var(--jaune-pale); }
.pastille { border-radius: 999px; font-weight: 600; font-size: .8rem; padding: .18rem .62rem; }
.alerte { border-radius: var(--rayon-petit); border-width: 1.5px; box-shadow: none; }
.alerte-ok { color: #0d4a2a; }
.alerte-erreur { color: #7a1519; }
.alerte-info { color: var(--bleu-fonce); }
.alerte-attention { color: #5c3d00; }
.vide { border: 2px dashed var(--trait-fort); border-radius: var(--rayon); background: var(--carte); }

/* Notifications flottantes : les messages de confirmation existants sont repris par le JS */
.v13-toasts { position: fixed; z-index: 90; right: 1rem; bottom: 1rem; display: grid; gap: .6rem; max-width: min(420px, calc(100vw - 2rem)); pointer-events: none; }
.v13-toast { pointer-events: auto; display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--rayon-petit); background: var(--bitume); color: var(--blanc); border-left: 6px solid var(--vert); box-shadow: var(--ombre-3); animation: sg-entree .35s var(--ease) both; }
.v13-toast .ico { color: #5fd49a; flex: none; margin-top: .1rem; }
.v13-toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .75; cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 .2rem; }
.v13-toast.sortie { animation: sg-sortie .3s var(--ease) both; }
@keyframes sg-entree { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sg-sortie { to { opacity: 0; transform: translateY(8px); } }

.v13-squelette { background: linear-gradient(90deg, var(--beton) 0%, var(--dalle) 40%, var(--beton) 80%); background-size: 200% 100%; animation: sg-moire 1.2s linear infinite; border-radius: 4px; min-height: 1em; }
@keyframes sg-moire { to { background-position: -200% 0; } }
.v13-squelette-titre { height: 1.2em; width: 40%; }

/* ===================================================================================================================
   4. Vitrine : en-tête, pied, rythme des sections
   =================================================================================================================== */
.marque-nom { font-family: var(--police-titre); font-weight: 800; font-size: 1.45rem; letter-spacing: .01em; color: var(--bitume); }
.marque-clair .marque-nom { color: var(--blanc); }
.haut { background: rgba(237, 238, 234, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 2px solid var(--bitume); }
.haut-nav a { color: var(--encre-2); font-weight: 600; }
.haut-nav a:hover { color: var(--bitume); text-decoration: underline; text-decoration-color: var(--jaune); text-decoration-thickness: 4px; text-underline-offset: .35em; }
.pied { background: var(--bitume); color: var(--nuit-texte); }
.pied p { color: var(--nuit-texte-doux); }
.pied a { color: var(--nuit-texte); }
.vitrine section[aria-labelledby] { padding-block: clamp(3.5rem, 7vw, 6rem); }
.vitrine section > .section-interieur > h2 { max-width: 22ch; }

/* Appel à l'action collant sur téléphone : le bouton de l'en-tête y est masqué */
.sg-appel-mobile { display: none; }
@media (max-width: 899px) {
  .sg-appel-mobile { display: block; position: sticky; bottom: 0; z-index: 25; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); background: rgba(237, 238, 234, .96); border-top: 2px solid var(--bitume); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .sg-appel-mobile .btn { min-height: 50px; font: 700 1.15rem/1 var(--police-titre); }
  .sg-appel-mobile { transition: transform .25s var(--ease); }
  .sg-appel-mobile.sg-cache { transform: translateY(110%); }
}

/* ===================================================================================================================
   5. Héros : le panneau de chantier qui est aussi l'avenant
   =================================================================================================================== */
.sg-heros { position: relative; background: var(--dalle); overflow: clip; }
.vitrine section.sg-heros { padding-block: 0; }
.sg-heros::after { content: ""; display: block; height: 26px; background: repeating-linear-gradient(90deg, var(--jaune) 0 46px, transparent 46px 84px) center / 100% 3px no-repeat, var(--bitume); }
.sg-heros-interieur { max-width: 1180px; margin: 0 auto; padding: clamp(2rem, 4.5vw, 3.8rem) 1.25rem 0; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.sg-heros-texte { align-self: center; padding-bottom: clamp(2rem, 5vw, 4.5rem); }
.sg-heros h1 { font-size: clamp(3rem, 1.3rem + 4.4vw, 5.6rem); font-weight: 800; line-height: .9; letter-spacing: -.005em; max-width: 11ch; text-wrap: balance; margin: 0 0 1.4rem; }
.sg-heros-sous { font-size: clamp(1.08rem, 1rem + .35vw, 1.3rem); line-height: 1.55; color: var(--encre-2); max-width: 36em; margin: 0; }
.sg-heros-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.sg-heros-preuves { list-style: none; margin: 1.8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem 1.4rem; color: var(--encre-2); font-size: .95rem; font-weight: 500; }
.sg-heros-preuves li { display: flex; align-items: center; gap: .5rem; }
.sg-heros-preuves li::before { content: ""; width: .55rem; height: .55rem; background: var(--bitume); flex: none; }

.sg-panneau { position: relative; margin: 0; padding-bottom: clamp(5.5rem, 9vw, 7.5rem); max-width: 500px; justify-self: end; width: 100%; }
.sg-panneau-plaque { position: relative; z-index: 1; background: var(--blanc); border: 3px solid var(--bitume); border-radius: 6px; box-shadow: 12px 12px 0 rgba(28, 29, 27, .13); overflow: hidden; }
.sg-panneau-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0; padding: .7rem 1.1rem .6rem; background: var(--jaune); border-bottom: 3px solid var(--bitume); font: 800 1.5rem/1 var(--police-titre); text-transform: uppercase; letter-spacing: .03em; color: var(--bitume); }
.sg-panneau-tete span + span { font-size: .9rem; font-weight: 700; letter-spacing: .05em; }
.sg-panneau-lignes { margin: 0; display: grid; grid-template-columns: .7fr 1.3fr; }
.sg-panneau-lignes > div { grid-column: 1 / -1; padding: .65rem 1.1rem .7rem; border-bottom: 1.5px dashed var(--beton-fonce); }
.sg-panneau-lignes > .sg-demi { grid-column: auto; }
.sg-panneau-lignes > .sg-demi + .sg-demi { border-left: 1.5px dashed var(--beton-fonce); }
.sg-panneau-lignes > div:last-child { border-bottom: 0; }
.sg-panneau-lignes dt { font-size: .8rem; font-weight: 600; color: var(--encre-3); }
.sg-panneau-lignes dd { margin: .1rem 0 0; font: 700 1.38rem/1.15 var(--police-titre); color: var(--bitume); }
.sg-panneau-lignes .sg-montant { font-size: 2.2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.sg-montant small { font-size: .5em; font-weight: 700; color: var(--encre-3); }
.sg-ligne-signature dd { position: relative; height: 76px; }
.sg-signature { width: min(100%, 250px); height: 76px; overflow: visible; }
.sg-signature path { fill: none; stroke: var(--encre-stylo); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.sg-attente { position: absolute; left: 0; bottom: .3rem; font: italic 500 .95rem var(--police); color: var(--encre-3); opacity: 0; }
.sg-tampon { position: absolute; right: 1rem; bottom: 1.1rem; z-index: 2; margin: 0; display: grid; justify-items: center; padding: .4rem .9rem .5rem; border: 3px solid var(--vert); border-radius: 6px; box-shadow: inset 0 0 0 2px var(--blanc), inset 0 0 0 4px var(--vert); color: var(--vert); transform: rotate(-9deg); opacity: .94; mix-blend-mode: multiply; text-transform: uppercase; }
.sg-tampon strong { font: 800 2.3rem/1 var(--police-titre); letter-spacing: .06em; }
.sg-tampon span { font: 700 .8rem/1.2 var(--police-titre); letter-spacing: .08em; }
.sg-poteau { position: absolute; z-index: 0; top: 30%; bottom: 0; width: 16px; border-radius: 2px 2px 0 0; background: linear-gradient(90deg, #7d7f79, #c2c3bd 40%, #8d8f89); }
.sg-poteau-g { left: 17%; } .sg-poteau-d { right: 17%; }
.sg-panneau figcaption { position: absolute; left: calc(17% + 26px); right: calc(17% + 26px); bottom: 1rem; display: grid; justify-items: center; gap: .35rem; text-align: center; font-size: .8rem; color: var(--encre-3); }
.sg-rejouer { font: 600 .82rem var(--police); color: var(--bleu); background: none; border: 0; padding: .45rem .3rem; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }

/* La séquence : la ligne « en attente » apparaît, la signature se trace, le tampon tombe, la plaque encaisse le choc.
   Jouée une fois, quand le panneau arrive à l'écran (classe sg-joue posée par le script ; le bouton la rejoue).
   Sans JavaScript ou sans animation (mouvement réduit), on voit directement l'état final : signé, prêt à facturer. */
@media (prefers-reduced-motion: no-preference) {
  .v13-js .sg-panneau:not(.sg-joue) .sg-signature path { stroke-dashoffset: 1; }
  .v13-js .sg-panneau:not(.sg-joue) .sg-tampon { opacity: 0; }
  .sg-panneau.sg-joue .sg-signature path { stroke-dashoffset: 1; animation: sg-trace 1.5s cubic-bezier(.55, .1, .35, 1) .55s forwards; }
  .sg-panneau.sg-joue .sg-attente { animation: sg-attente .8s linear forwards; }
  .sg-panneau.sg-joue .sg-tampon { animation: sg-tampon .42s cubic-bezier(.2, 1.5, .45, 1) 2.15s both; }
  .sg-panneau.sg-joue .sg-panneau-plaque { animation: sg-choc .3s ease-out 2.4s both; }
}
@keyframes sg-trace { to { stroke-dashoffset: 0; } }
@keyframes sg-attente { 0% { opacity: 0; } 18%, 72% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sg-tampon { from { opacity: 0; transform: rotate(-9deg) scale(2.2); } to { opacity: .94; transform: rotate(-9deg) scale(1); } }
@keyframes sg-choc { 0% { translate: 0 0; } 35% { translate: 0 3px; } 100% { translate: 0 0; } }

/* Le chantier en 3D (ordinateur seulement, canvas ajouté par chantier-3d.js) : derrière le texte et le panneau, fondu à gauche */
.sg-heros-3d { position: absolute; top: 0; right: 0; bottom: 26px; width: 74%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%); mask-image: linear-gradient(90deg, transparent 0%, #000 34%); }
.sg-heros-3d.pret { opacity: 1; }
.sg-heros-interieur { position: relative; z-index: 1; }

/* Relief (ordinateur seulement) : le panneau pivote un peu vers la souris, le tampon « décolle » de la plaque, un reflet glisse.
   Variables --px et --py (de -1 à 1) posées par le script sur le panneau ; aucune bibliothèque, aucun poids en plus. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .sg-panneau { transform: perspective(1300px) rotateX(calc(var(--py, 0) * -4deg)) rotateY(calc(var(--px, 0) * 6deg)); transform-origin: 50% 75%; transition: transform .45s var(--ease); will-change: transform; }
  .sg-tampon { translate: calc(var(--px, 0) * -5px) calc(var(--py, 0) * -4px); filter: drop-shadow(calc(var(--px, 0) * 4px + 2px) calc(var(--py, 0) * 3px + 3px) 0 rgba(28, 29, 27, .14)); transition: translate .45s var(--ease), filter .45s var(--ease); }
  .sg-panneau-plaque::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: var(--reflet, 0); transition: opacity .4s var(--ease);
    background: radial-gradient(60% 50% at calc(50% + var(--px, 0) * 45%) calc(40% + var(--py, 0) * 40%), rgba(255, 255, 255, .55), transparent 70%); mix-blend-mode: soft-light; }
}

/* ===================================================================================================================
   6. Le parcours en quatre étapes (une vraie suite : numérotée, reliée par un trait)
   =================================================================================================================== */
.sg-parcours { background: var(--blanc); }
.sg-etapes { position: relative; list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.sg-etapes::before { content: ""; position: absolute; top: calc(1.55rem - 2px); left: 1.55rem; right: calc(25% - 2.05rem); height: 4px; background: var(--bitume); }
.sg-etapes li { position: relative; }
.sg-etape-num { position: relative; display: grid; place-items: center; width: 3.1rem; height: 3.1rem; margin-bottom: 1.4rem; }
.sg-etape-num::before { content: ""; position: absolute; inset: .35rem; background: var(--jaune); border: 3px solid var(--bitume); border-radius: 3px; transform: rotate(45deg); }
.sg-etape-num b { position: relative; font: 800 1.35rem/1 var(--police-titre); color: var(--bitume); }
.sg-etapes h3 { font-size: 1.65rem; margin-bottom: .5rem; }
.sg-etapes p { color: var(--encre-2); margin: 0; }
.sg-etapes small { display: block; margin-top: .8rem; font-weight: 700; color: var(--bleu); }
.sg-etapes li:last-child small { color: var(--vert-texte); }

/* ===================================================================================================================
   7. La vraie vidéo du logiciel
   =================================================================================================================== */
.sg-demo { background: var(--bitume); color: var(--nuit-texte); }
.sg-demo h2 { color: var(--blanc); max-width: 15ch; }
.sg-demo-grille { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.sg-demo-texte > p { font-size: 1.1rem; color: var(--nuit-texte); margin: 1rem 0 1.6rem; max-width: 40ch; }
.sg-automatismes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.sg-automatismes li { display: grid; gap: .1rem; padding-left: 1.5rem; position: relative; }
.sg-automatismes li::before { content: ""; position: absolute; left: 0; top: .42rem; width: .65rem; height: .65rem; background: var(--jaune); }
.sg-automatismes strong { color: var(--blanc); font: 700 1.25rem var(--police-titre); }
.sg-automatismes span { color: var(--nuit-texte-doux); }
.sg-video { margin: 0; }
.sg-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #0f100e; border: 3px solid var(--bitume-3); border-radius: var(--rayon); }
.sg-video figcaption { margin-top: .7rem; font-size: .88rem; color: var(--nuit-texte-doux); }

/* ===================================================================================================================
   8. Fonctions, pour qui, offres, confiance, questions, appel final
   =================================================================================================================== */
.fonctions { background: var(--dalle); border: 0; }
.sg-fonctions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem 2rem; margin-top: 2.6rem; }
.sg-fonctions article { border-top: 4px solid var(--bitume); padding-top: 1.2rem; }
.sg-fonctions h3 { margin: 0 0 .45rem; }
.sg-fonctions p { margin: 0; color: var(--encre-2); }
.bento-ico { display: inline-grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 4px; background: var(--bleu); color: var(--blanc); margin-bottom: 1rem; }
.sg-fonction-cle .bento-ico { background: var(--jaune); color: var(--bitume); outline: 2px solid var(--bitume); outline-offset: -2px; }

.pourqui { background: var(--blanc); }
.roles { margin: 0; border-top: 4px solid var(--bitume); }
.roles div { padding: 1.1rem 0; border-bottom: 1.5px solid var(--trait); display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; }
.roles dt { font: 700 1.35rem/1.1 var(--police-titre); color: var(--bitume); }
.roles dd { margin: 0; color: var(--encre-2); }

.tarifs { background: var(--dalle); border: 0; }
.apercu-offres { gap: 1.4rem; margin: 2rem 0; }
.apercu-offres a { background: var(--blanc); border: 1.5px solid var(--trait-fort); border-radius: 6px; padding: 1.3rem 1.3rem 1.2rem; color: var(--encre); transition: transform var(--duree) var(--ease), box-shadow var(--duree) var(--ease), border-color var(--duree); }
.apercu-offres a:hover { border-color: var(--bitume); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--bitume); }
.apercu-offres .recommandee { border: 3px solid var(--bitume); box-shadow: 7px 7px 0 var(--jaune); }
.apercu-offres .recommandee:hover { box-shadow: 9px 9px 0 var(--jaune); }
.apercu-offres strong { font: 700 1.45rem var(--police-titre); }
.apercu-offres .nombre { font: 800 2.5rem/1.1 var(--police-titre); color: var(--bitume); }

.bandeau-confiance { background: var(--bleu); color: #eaf2f8; }
.bandeau-confiance h2 { color: var(--blanc); }
.bandeau-confiance li svg { color: var(--blanc); }
.bandeau-confiance a { color: var(--blanc); font-weight: 700; }

.faq { background: var(--dalle); }
.faq-liste details { border-top: 2px solid var(--bitume); }
.faq-liste details:last-child { border-bottom: 2px solid var(--bitume); }
.faq-liste summary { font: 700 1.32rem/1.2 var(--police-titre); color: var(--bitume); min-height: 44px; }
.faq-liste summary::after { border-color: var(--bitume); }

.appel-final { background: var(--jaune); color: var(--bitume); border-top: 3px solid var(--bitume); }
.appel-final h2 { color: var(--bitume); font-size: clamp(2.2rem, 1.4rem + 3vw, 4rem); font-weight: 800; line-height: .95; max-width: 16ch; }
.appel-final .btn-principal { --b-fond: var(--bitume); --b-texte: var(--blanc); --b-bord: var(--bitume); box-shadow: 4px 4px 0 var(--blanc); }
.appel-final .btn-principal:hover { --b-fond: var(--bitume-2); box-shadow: 5px 5px 0 var(--blanc); }

/* Pages Tarifs, Sécurité, Démo, pages légales */
.tarifs-page { background: var(--dalle); }
.tarifs-page h1, .securite-page h1 { font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.2rem); font-weight: 800; line-height: .95; }
.offre { background: var(--blanc); border: 1.5px solid var(--trait-fort); border-radius: 6px; box-shadow: none; }
.offre-recommandee { border: 3px solid var(--bitume); box-shadow: 8px 8px 0 var(--jaune); }
.offre-ruban { background: var(--bitume); color: var(--jaune); border-radius: 3px; font: 800 .82rem var(--police-titre); letter-spacing: .06em; text-transform: uppercase; }
.offre h2 { font-size: 1.9rem; }
.offre-prix .nombre { font-weight: 800; }
.offre-limites { border-color: var(--trait); }
.offre-inclus li svg { color: var(--vert); }
.bascule-periode > label { border-radius: 4px; }
.bascule-periode > input:checked + label { background: var(--bitume); color: var(--blanc); border-color: var(--bitume); }
.badge-eco { background: var(--vert-pale); color: var(--vert-texte); border-radius: 3px; }
.bandeau-fondateurs { background: var(--jaune-pale); border: 2px solid var(--bitume); border-radius: 6px; color: var(--bitume); }
.calcul-resultat { background: var(--bleu-pale); border-color: var(--info-bord); border-radius: 6px; }
.calcul-total strong { font: 800 2rem var(--police-titre); color: var(--vert-texte); }
.grille-securite article { background: var(--blanc); border: 0; border-top: 4px solid var(--bitume); border-radius: 0; }
.legal h1 { font-weight: 800; }
.legal .encadre, .legal .sommaire { border-radius: 6px; }

/* Demande de démo : ce que la personne va voir, et le formulaire sur un panneau */
.sg-demande { background: var(--dalle); padding: clamp(2.5rem, 6vw, 5rem) 1.25rem; }
.vitrine section.sg-demande, .sg-demande { padding-block: clamp(2.5rem, 6vw, 5rem); }
.sg-demande-grille { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.sg-demande-texte h1 { font-size: clamp(2.6rem, 1.4rem + 3.6vw, 4.4rem); font-weight: 800; line-height: .93; max-width: 12ch; margin-bottom: 1rem; }
.sg-demande-texte h2 { font-size: 1.5rem; margin: 2rem 0 1rem; }
.sg-demande-etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; counter-reset: etape; }
.sg-demande-etapes li { position: relative; padding-left: 2.8rem; min-height: 2rem; color: var(--encre-2); counter-increment: etape; }
.sg-demande-etapes li::before { content: counter(etape); position: absolute; left: 0; top: -.15rem; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; background: var(--jaune); border: 2px solid var(--bitume); font: 800 1rem var(--police-titre); color: var(--bitume); }
.connexion-carte { border-radius: 6px; background: var(--blanc); border: 1px solid var(--trait); box-shadow: none; }
.sg-demande-carte { padding: 0 1.6rem 1.6rem; border: 3px solid var(--bitume); box-shadow: 10px 10px 0 rgba(28, 29, 27, .13); overflow: hidden; }
.sg-demande-tete { margin: 0 -1.6rem 1.4rem; padding: .7rem 1.6rem .6rem; background: var(--jaune); border-bottom: 3px solid var(--bitume); font: 800 1.35rem/1 var(--police-titre); text-transform: uppercase; letter-spacing: .03em; color: var(--bitume); }
.calculateur, .clarte { background: var(--blanc); }
.grille-securite .bento-ico { background: var(--bleu); color: var(--blanc); }
@media (max-width: 860px) { .sg-demande-grille { grid-template-columns: 1fr; } }

/* ===================================================================================================================
   9. Connexion
   =================================================================================================================== */
.v13-connexion { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); background: var(--dalle); }
.v13-connexion-scene { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 2rem clamp(1.5rem, 4vw, 3.5rem); background: var(--bitume); color: var(--nuit-texte); overflow: clip; }
.v13-connexion-scene::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--jaune); }
.v13-connexion-scene h1 { color: var(--blanc); font-size: clamp(2.6rem, 1.4rem + 3.6vw, 4.8rem); line-height: .92; max-width: 11ch; margin-bottom: 1rem; }
.v13-connexion-scene p { color: var(--nuit-texte-doux); max-width: 32em; font-size: 1.06rem; }
.sg-connexion-fil { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0; counter-reset: fil; }
.sg-connexion-fil li { position: relative; display: flex; align-items: center; gap: .5rem; padding-right: 2.2rem; font: 700 1.05rem var(--police-titre); color: var(--nuit-texte-doux); }
.sg-connexion-fil li::before { content: ""; width: .8rem; height: .8rem; background: var(--bitume-3); border: 2px solid var(--nuit-texte-doux); transform: rotate(45deg); }
.sg-connexion-fil li:not(:last-child)::after { content: ""; position: absolute; right: .6rem; top: 50%; width: 1rem; height: 2px; background: var(--bitume-3); }
.sg-connexion-fil li.fait { color: var(--blanc); }
.sg-connexion-fil li.fait::before, .sg-connexion-fil li:last-child::before { background: var(--jaune); border-color: var(--jaune); }
.v13-connexion-panneau { display: grid; place-items: center; padding: 2.5rem clamp(1.25rem, 4vw, 3.5rem); }
.v13-connexion-carte { width: min(420px, 100%); }
.v13-connexion-carte h2 { font-size: clamp(2rem, 1.5rem + 1.4vw, 2.8rem); font-weight: 800; }
.v13-connexion-carte .doux { margin: .4rem 0 1.6rem; }
.v13-connexion-carte input { min-height: 3.1rem; font-size: 1.04rem; }
.v13-mdp { position: relative; }
.v13-mdp input { padding-right: 6.5rem; width: 100%; }
.v13-mdp button { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); min-height: 38px; border: 0; background: var(--dalle); color: var(--bleu); font-weight: 600; border-radius: 3px; padding: .4rem .7rem; cursor: pointer; }
.v13-connexion-carte .btn-principal { width: 100%; min-height: 3.3rem; font: 700 1.22rem var(--police-titre); }
.v13-garanties { display: grid; gap: .3rem; margin-top: 1.6rem; padding: 0; list-style: none; color: var(--encre-3); font-size: .9rem; }
.v13-garanties li::before { content: "✓ "; color: var(--vert-texte); font-weight: 700; }

/* ===================================================================================================================
   10. Espace connecté
   =================================================================================================================== */
.espace { background: var(--papier); }
.lateral { background: var(--bitume); border-right: 0; }
.lateral-liste a { border-radius: 4px; color: #d6d7d1; }
.lateral-liste a:hover { background: var(--bitume-2); color: var(--blanc); }
.lateral-liste a[aria-current="page"] { background: var(--bitume-2); color: var(--blanc); }
.lateral-signaler { box-shadow: none !important; border-color: var(--accent) !important; font: 700 1.12rem var(--police-titre); }
.lateral-signaler:hover { transform: none; }
.barre-mobile { background: var(--bitume); }
.nav-basse { background: var(--bitume); border-top: 3px solid var(--jaune); box-shadow: none; }
.nav-basse .nav-signaler { background-image: none; border: 3px solid var(--bitume); box-shadow: 0 0 0 3px var(--jaune); }

/* Barre d'outils de l'espace */
.v13-barre { display: flex; align-items: center; gap: .55rem; margin: -.25rem 0 1.25rem; flex-wrap: wrap; }
.v13-recherche { flex: 1 1 280px; display: flex; align-items: center; gap: .6rem; min-height: 2.9rem; padding: 0 .9rem; border-radius: 4px; border: 1.5px solid var(--trait-fort); background: var(--carte); color: var(--encre-3); cursor: pointer; font: inherit; text-align: left; }
.v13-recherche:hover { border-color: var(--bitume); }
.v13-recherche kbd { margin-left: auto; font: 700 .76rem var(--police-titre); color: var(--encre-3); background: var(--papier); border: 1px solid var(--trait); border-radius: 3px; padding: .12rem .4rem; }
.v13-recherche .court { display: none; }
.v13-outil { min-height: 2.9rem; display: inline-flex; align-items: center; gap: .45rem; padding: 0 .9rem; border-radius: 4px; border: 1.5px solid var(--trait-fort); background: var(--carte); color: var(--encre-2); font-weight: 600; cursor: pointer; font-size: .92rem; text-decoration: none; }
.v13-outil:hover { border-color: var(--bitume); color: var(--bitume); text-decoration: none; }
.v13-outil[aria-pressed="true"], .v13-outil[aria-current="page"] { background: var(--bitume); border-color: var(--bitume); color: var(--blanc); }
.v13-theme { display: inline-flex; align-items: center; gap: .45rem; }
.v13-theme::before { content: ""; width: .9rem; height: .9rem; border-radius: 50%; background: linear-gradient(90deg, var(--jaune) 50%, var(--bitume) 50%); box-shadow: 0 0 0 1.5px currentColor; }
.v14-souci svg { color: var(--rouge); }
.v13-hud { display: inline-flex; align-items: center; gap: .9rem; margin-left: auto; font-size: .82rem; font-weight: 600; color: var(--encre-3); }
.v13-hud b { color: var(--vert-texte); font-weight: 700; }
.v13-hud [data-reseau="hors-ligne"] b { color: var(--danger); }

/* En-tête de module : un panneau de direction bleu, pointe à droite */
.v13-module { display: flex; align-items: center; min-height: 64px; margin: 0 0 1.4rem; padding: .7rem 3rem .75rem 1.2rem; background: var(--bleu); color: var(--blanc); border-radius: 6px 0 0 6px; clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 50%, calc(100% - 26px) 100%, 0 100%); }
.v13-module-texte { min-width: 0; }
.v13-module-titre { display: block; font: 700 1.3rem/1.1 var(--police-titre); letter-spacing: .01em; }
.v13-module p { margin: .1rem 0 0; color: #d4e4ef; font-size: .95rem; }
.v13-module[data-module="retour"] { background: var(--rouge); }
.v13-module[data-module="retour"] p { color: #fde3e4; }
.entete h1 { font-weight: 800; }

/* Tableau de bord */
.v13-mc { margin-bottom: 1.25rem; padding: clamp(1.2rem, 2.5vw, 1.8rem); background: var(--carte); border: 1px solid var(--trait); border-top: 6px solid var(--bitume); border-radius: var(--rayon); }
.v13-mc-date { margin: 0 0 .2rem; font: 700 1rem var(--police-titre); color: var(--encre-3); }
.v13-mc h1 { font-size: clamp(2.2rem, 1.6rem + 1.8vw, 3.2rem); }
.v13-mc-sous { color: var(--encre-2); margin: .4rem 0 0; max-width: 60ch; }
.v13-mc-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.v13-flux { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.v13-flux a { position: relative; display: block; height: 100%; padding: .85rem 1rem .9rem; border-radius: 4px; background: var(--papier); border: 1px solid var(--trait); border-top: 6px solid var(--teinte); color: var(--encre); text-decoration: none; transition: transform var(--duree) var(--ease), box-shadow var(--duree) var(--ease); }
.v13-flux a:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--bitume); }
.v13-flux .lib { display: block; font-size: .9rem; font-weight: 700; color: var(--encre-2); }
.v13-flux .v13-num { display: block; font-size: 2.4rem; font-weight: 800; line-height: 1.05; color: var(--bitume); }
.v13-flux small { display: block; color: var(--encre-3); font-size: .82rem; margin-top: .1rem; }
.v13-flux li:nth-child(1) { --teinte: var(--bleu); } .v13-flux li:nth-child(2) { --teinte: #5b87ab; } .v13-flux li:nth-child(3) { --teinte: var(--jaune); }
.v13-flux li:nth-child(4) { --teinte: var(--vert); } .v13-flux li:nth-child(5) { --teinte: var(--rouge); }
.v13-flux li:nth-child(4) a { background: var(--vert); border-color: var(--vert); border-top-color: #005c34; }
.v13-flux li:nth-child(4) :is(.lib, .v13-num, small) { color: var(--blanc); }
.v13-mc-pied { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: 1rem; font-size: .82rem; color: var(--encre-3); }

/* Agents (suivi, contrôle) */
.v13-agent-tete { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.v13-agent-badge { display: inline-flex; align-items: center; gap: .35rem; font: 700 .82rem var(--police-titre); letter-spacing: .02em; color: var(--bleu); background: var(--bleu-pale); border: 1px solid var(--info-bord); border-radius: 3px; padding: .15rem .5rem; }
.v13-agent-badge::before { content: ""; width: .45rem; height: .45rem; background: currentColor; transform: rotate(45deg); }
.v13-suivi { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .45rem; }
.v13-suivi a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .2rem .8rem; align-items: center; padding: .75rem .9rem; border-radius: 4px; border: 1px solid var(--trait); background: var(--carte); color: var(--encre); text-decoration: none; transition: border-color var(--duree), box-shadow var(--duree); }
.v13-suivi a:hover { border-color: var(--bitume); box-shadow: inset 4px 0 0 var(--jaune); }
.v13-suivi .pastille { grid-row: span 2; align-self: start; }
.v13-suivi strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v13-suivi .action { grid-column: 2; font-size: .86rem; color: var(--encre-3); }
.v13-suivi .ico { grid-row: span 2; color: var(--encre-3); }
.v13-controle { border-radius: var(--rayon); border: 1px solid var(--trait); background: var(--carte); padding: 1rem 1.1rem; }
.v13-controle[data-ton="danger"] { border-color: var(--danger-bord); box-shadow: inset 6px 0 0 var(--rouge); }
.v13-controle[data-ton="alerte"] { border-color: var(--alerte-bord); box-shadow: inset 6px 0 0 var(--jaune); }
.v13-controle[data-ton="ok"] { border-color: var(--ok-bord); box-shadow: inset 6px 0 0 var(--vert); }
.v13-controle h2 { font-size: 1.3rem; }
.v13-constats { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; gap: .55rem; }
.v13-constats li { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; font-size: .94rem; }
.v13-constats .niv { grid-row: span 2; width: .65rem; height: .65rem; margin-top: .4rem; }
.v13-constats .niv-bloquant { background: var(--rouge); } .v13-constats .niv-attention { background: var(--jaune); transform: rotate(45deg); } .v13-constats .niv-info { background: var(--bleu); border-radius: 50%; }
.v13-constats small { color: var(--encre-3); }
.v13-pieces { list-style: none; margin: .8rem 0 0; padding: .8rem 0 0; border-top: 1.5px dashed var(--trait-fort); display: grid; gap: .3rem; font-size: .9rem; }
.v13-pieces li::before { content: "○ "; color: var(--encre-3); }
.v13-pieces li.ok::before { content: "● "; color: var(--vert); }
.v13-jauge { height: 8px; border-radius: 0; background: var(--beton); overflow: hidden; margin: .5rem 0 .75rem; }
.v13-jauge span { display: block; height: 100%; background: var(--bleu); }
.v13-jauge-0 { width: 0%; } .v13-jauge-1 { width: 10%; } .v13-jauge-2 { width: 20%; } .v13-jauge-3 { width: 30%; } .v13-jauge-4 { width: 40%; } .v13-jauge-5 { width: 50%; }
.v13-jauge-6 { width: 60%; } .v13-jauge-7 { width: 70%; } .v13-jauge-8 { width: 80%; } .v13-jauge-9 { width: 90%; } .v13-jauge-10 { width: 100%; }

/* Assistant (palette Ctrl+K et page dédiée) */
.v13-palette { width: min(680px, calc(100vw - 2rem)); max-height: min(78vh, 720px); padding: 0; border: 3px solid var(--bitume); border-radius: var(--rayon); background: var(--carte); color: var(--encre); box-shadow: 10px 10px 0 rgba(28, 29, 27, .25); overflow: hidden; }
.v13-palette::backdrop { background: rgba(28, 29, 27, .55); }
.v13-palette[open] { animation: sg-entree .2s var(--ease) both; }
.v13-palette-champ { display: flex; align-items: center; gap: .6rem; padding: .9rem 1.1rem; border-bottom: 2px solid var(--bitume); background: var(--jaune); }
.v13-palette-champ input { flex: 1; border: 0; font: inherit; font-size: 1.1rem; outline: none; background: none; min-height: 2.2rem; color: var(--bitume); box-shadow: none; }
.v13-palette-champ input:focus-visible { box-shadow: none; }
.v13-palette-champ .ico { color: var(--bitume); }
.v13-palette-champ .btn-discret { color: var(--bitume); }
.v13-palette-corps { overflow: auto; max-height: calc(min(78vh, 720px) - 4rem); padding: .5rem; }
.v13-palette-groupe { padding: .5rem .6rem .2rem; font: 700 .85rem var(--police-titre); letter-spacing: .02em; color: var(--encre-3); }
.v13-palette-item { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .65rem .7rem; border-radius: 3px; color: var(--encre); text-decoration: none; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.v13-palette-item:hover, .v13-palette-item[aria-selected="true"] { background: var(--papier); box-shadow: inset 4px 0 0 var(--jaune); color: var(--encre); }
.v13-palette-item small { display: block; color: var(--encre-3); font-size: .82rem; }
.v13-reponse { padding: .4rem .6rem .8rem; }
.v13-reponse h3 { font-size: 1.25rem; margin: .3rem 0 .2rem; }
.v13-reponse p { margin: 0 0 .5rem; color: var(--encre-2); }
.v13-reponse .source { font-size: .78rem; color: var(--encre-3); margin-top: .6rem; }
.v13-elements { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.v13-elements a { display: flex; gap: .7rem; align-items: center; padding: .6rem .7rem; border-radius: 4px; border: 1px solid var(--trait); color: var(--encre); text-decoration: none; background: var(--carte); }
.v13-elements a:hover { border-color: var(--bitume); }
.v13-elements span { min-width: 0; }
.v13-elements strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v13-elements small { color: var(--encre-3); }
.v13-suggestions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.v13-suggestions button, .v13-suggestions a { border: 1.5px solid var(--trait-fort); background: var(--carte); border-radius: 999px; padding: .4rem .8rem; min-height: 38px; font: 600 .86rem var(--police); color: var(--encre-2); cursor: pointer; text-decoration: none; }
.v13-suggestions button:hover, .v13-suggestions a:hover { border-color: var(--bitume); color: var(--bitume); }

/* Travaux : colonnes du suivi */
.pipeline { gap: .9rem; }
.colonne { border-radius: 6px; background: #e3e4df; border: 1px solid var(--trait); }
.colonne-tete { border-top: 5px solid var(--teinte, var(--bleu)); border-radius: 6px 6px 0 0; }
.colonne-tete h2 { font-size: 1.12rem; }
.colonne-a_valider { --teinte: var(--bleu); } .colonne-valide { --teinte: #5b87ab; } .colonne-envoye { --teinte: var(--jaune); }
.colonne-pret_a_facturer { --teinte: var(--vert); } .colonne-clotures { --teinte: var(--beton-fonce); }
.carte-travail { border-radius: 4px; border: 1px solid var(--trait); background: var(--carte); transition: box-shadow var(--duree), border-color var(--duree); }
.carte-travail:hover { border-color: var(--bitume); box-shadow: 3px 3px 0 var(--bitume); }
.ct-prix { font-family: var(--police-titre); font-weight: 700; }
.vues button[aria-pressed="true"] { background: var(--bitume); color: var(--blanc); }
.compteur, .action-panneau, .carte-chantier, .bloc-formulaire form, .raccourcis a, .acces-rapides a { background: var(--carte); }

/* Signalement : rapide sur téléphone */
.v13-signaler .champ textarea { min-height: 9rem; font-size: 1.1rem; line-height: 1.5; }
.v13-signaler .champ select { min-height: 3.1rem; font-size: 1.05rem; }
.v13-signaler .btn-principal { min-height: 3.5rem; font: 700 1.3rem var(--police-titre); }
.v13-exemples { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.v13-exemples button { border: 1.5px dashed var(--trait-fort); background: var(--carte); border-radius: 4px; padding: .5rem .75rem; min-height: 44px; font: 500 .92rem var(--police); color: var(--encre-2); cursor: pointer; text-align: left; }
.v13-exemples button:hover { border-color: var(--bitume); border-style: solid; color: var(--bitume); }

/* Frise d'un travail : 5 étapes, le trait avance après une action */
.v13-fil { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin: .2rem 0 1.4rem; padding: 0; list-style: none; --de: var(--a); }
.v13-fil::before, .v13-fil::after { content: ""; position: absolute; top: .5rem; left: 10%; right: 10%; height: 4px; }
.v13-fil::before { background: var(--beton); }
.v13-fil::after { background: var(--bitume); clip-path: inset(0 calc(100% - var(--a)) 0 0); }
.fil-etape-0 { --a: 0%; } .fil-etape-1 { --a: 25%; } .fil-etape-2 { --a: 50%; } .fil-etape-3 { --a: 75%; } .fil-etape-4 { --a: 100%; }
.fil-depuis-0 { --de: 0%; } .fil-depuis-1 { --de: 25%; } .fil-depuis-2 { --de: 50%; } .fil-depuis-3 { --de: 75%; }
.v13-fil-avance::after { animation: v13-fil-avance 1s var(--ease) .2s both; }
@keyframes v13-fil-avance { from { clip-path: inset(0 calc(100% - var(--de)) 0 0); } to { clip-path: inset(0 calc(100% - var(--a)) 0 0); } }
.v13-fil li { position: relative; display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; font-size: .84rem; color: var(--encre-3); z-index: 1; }
.v13-fil li::before { content: ""; width: 1.1rem; height: 1.1rem; background: var(--carte); border: 2.5px solid var(--beton-fonce); transform: rotate(45deg); }
.v13-fil li.fait::before { background: var(--bitume); border-color: var(--bitume); }
.v13-fil li.courant { color: var(--encre); font-weight: 700; }
.v13-fil li.courant::before { background: var(--jaune); border-color: var(--bitume); box-shadow: 0 0 0 4px var(--jaune-pale); }
.v13-fil li:last-child.courant::before { background: var(--vert); border-color: var(--vert); box-shadow: 0 0 0 4px var(--vert-pale); }
.v13-fil-avance li.courant::before { animation: v13-fil-arrivee .5s var(--ease) 1.1s both; }
@keyframes v13-fil-arrivee { 0% { transform: rotate(45deg) scale(.4); } 60% { transform: rotate(45deg) scale(1.3); } 100% { transform: rotate(45deg) scale(1); } }
.v13-fil-refus li.courant::before { background: var(--rouge); border-color: var(--rouge); box-shadow: 0 0 0 4px var(--danger-fond); }
.v13-fil-refus li.courant { color: var(--danger); }
@media (prefers-reduced-motion: reduce) { .v13-fil-avance::after, .v13-fil-avance li.courant::before { animation: none; } }

/* Page du client : accord enregistré (sceau qui se dessine une fois) */
.v13-sceau { width: 112px; height: 112px; margin: 0 auto 1rem; display: block; overflow: visible; }
.v13-sceau-halo { fill: var(--vert-pale); animation: v13-sceau-halo .8s var(--ease) both; transform-origin: center; }
.v13-sceau-cercle, .v13-sceau-coche { fill: none; stroke: var(--vert); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; }
.v13-sceau-cercle { stroke-width: 5; stroke-dashoffset: 100; animation: v13-trace .8s var(--ease) .15s forwards; }
.v13-sceau-coche { stroke-width: 7; stroke-dashoffset: 100; animation: v13-trace .45s var(--ease) .85s forwards; }
@keyframes v13-trace { to { stroke-dashoffset: 0; } }
@keyframes v13-sceau-halo { from { transform: scale(.6); opacity: 0; } }
.v13-preuve { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; color: var(--encre-3); }
@media (prefers-reduced-motion: reduce) { .v13-sceau-cercle, .v13-sceau-coche { stroke-dashoffset: 0; animation: none; } .v13-sceau-halo { animation: none; } }

/* Actions groupées, photos, démo, éditeur, « Un souci ? », guide du patron, assistant IA */
.v14-lot-liste { list-style: none; margin: .8rem 0 1rem; padding: 0; display: grid; gap: .45rem; }
.v14-lot-liste li { display: flex; align-items: center; gap: .8rem; padding: .6rem .8rem; border-radius: 4px; border: 1px solid var(--trait); background: var(--carte); }
.v14-lot-liste li > a { margin-left: auto; flex: none; font-size: .88rem; }
.v14-lot-liste label { display: flex; align-items: center; gap: .7rem; min-width: 0; flex: 1; cursor: pointer; background: none; border: 0; padding: 0; }
.v14-lot-liste label > span { display: grid; min-width: 0; }
.v14-lot-liste strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v14-lot-liste small { color: var(--encre-3); }
.v14-lot-liste input[type="checkbox"], .v14-relecture input { width: 1.25rem; height: 1.25rem; accent-color: var(--bleu); flex: none; }
.v14-lot-liste label.case, .v14-lot-liste label.case:has(:checked) { background: none; border: 0; box-shadow: none; padding: 0; }
.v14-lot-liste li:has(input:checked) { border-color: var(--bitume); box-shadow: inset 4px 0 0 var(--jaune); }
.v14-relecture { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; font-weight: 600; }
.v14-ecartes { margin-top: 1rem; } .v14-ecartes summary { cursor: pointer; color: var(--encre-2); }
.v14-photos input[type="file"] { width: 100%; padding: .9rem; border: 2px dashed var(--trait-fort); border-radius: 4px; background: var(--carte); font-size: 1rem; }
.v14-apercus { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.v14-apercus img { width: 84px; height: 84px; object-fit: cover; border-radius: 4px; border: 1px solid var(--trait); }
.v14-vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; margin-top: .6rem; }
.v14-vignettes img { width: 100%; height: 140px; object-fit: cover; border-radius: 4px; border: 1px solid var(--trait); }
.v14-piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.v14-offre-choisie { margin: .4rem 0 1rem; }
.v14-demo-page select, .v14-demo-page textarea { width: 100%; }
.offre-action { display: grid; gap: .5rem; }
.v14-agent-ia { margin-top: .75rem; }
.v14-texte-agent { white-space: pre-line; }
.v14-editeur-totaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.v14-editeur-totaux .bloc { display: flex; flex-direction: column; gap: .2rem; margin: 0; border-top: 5px solid var(--bitume); }
.v14-editeur-totaux strong { font: 800 2.2rem/1 var(--police-titre); font-variant-numeric: tabular-nums; }
.v14-etape { white-space: normal; }
.v14-retours { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.v14-retours li { border-left: 4px solid var(--rouge); padding: .2rem 0 .2rem .8rem; }
.v14-retours p { margin: 0 0 .25rem; white-space: pre-line; }
.v14-retour textarea { width: 100%; }
.v14-retours-nb { margin-left: .4em; }
.v14-nouveau-client-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .8rem; align-items: end; }
.v14-nouveau-client-form .champ { margin: 0; }
.v14-relancer { margin-top: .4rem; }
.v14-nouveau-client { margin-bottom: 1rem; }
.v14-message { white-space: pre-line; max-width: 28rem; }
.v14-guide { margin-bottom: 1.2rem; border: 2px solid var(--bitume); }
.v14-guide-tete { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; align-items: flex-start; }
.v14-guide-tete h2 { margin: 0 0 .2rem; }
.v14-guide-barre { width: 100%; height: .6rem; margin: .8rem 0 1rem; accent-color: var(--vert); }
.v14-guide-etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.v14-guide-etapes li { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .8rem; align-items: center; padding: .6rem .7rem; border-radius: 4px; border: 1px solid var(--trait); }
.v14-guide-etapes li.prochaine { border-color: var(--bitume); box-shadow: inset 5px 0 0 var(--jaune); }
.v14-guide-etapes li.faite { opacity: .7; }
.v14-guide-etapes small { display: block; color: var(--encre-3); margin-top: .15rem; }
.v14-guide-num { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border: 2px solid var(--bitume); font: 800 1rem var(--police-titre); font-variant-numeric: tabular-nums; }
.faite .v14-guide-num { color: var(--blanc); background: var(--vert); border-color: var(--vert); }
.guide-kicker { color: var(--bleu); }
.guide-num { background: var(--jaune); color: var(--bitume); border-radius: 3px; }

/* ===================================================================================================================
   11. Mode nuit (au choix dans l'espace connecté) : bitume, accents jaunes
   =================================================================================================================== */
body.theme-sombre {
  color-scheme: dark;
  --papier: #151614; --carte: #1f201e; --encre: #eeeeea; --encre-2: #cfd0ca; --encre-3: #a9aaa4;
  --trait: #34352f; --trait-fort: #51524c; --beton: #3a3b37; --beton-fonce: #5a5b56;
  --accent-texte: var(--jaune); --accent-doux: rgba(247, 181, 0, .14); --accent-doux-bord: rgba(247, 181, 0, .45);
  --bleu-pale: rgba(98, 166, 214, .14); --vert-pale: rgba(46, 196, 120, .14); --jaune-pale: rgba(247, 181, 0, .12);
  --ok: #62d69a; --ok-fond: rgba(46, 196, 120, .13); --ok-bord: rgba(98, 214, 154, .4);
  --ok-clair: #6fd3cb; --ok-clair-fond: rgba(111, 211, 203, .12); --ok-clair-bord: rgba(111, 211, 203, .4);
  --info: #8cc4ea; --info-fond: rgba(98, 166, 214, .14); --info-bord: rgba(140, 196, 234, .4);
  --attente: #b9c6d3; --attente-fond: rgba(185, 198, 211, .1); --attente-bord: rgba(185, 198, 211, .32);
  --alerte: #ffd257; --alerte-fond: rgba(247, 181, 0, .13); --alerte-bord: rgba(255, 210, 87, .4);
  --danger: #ff9a9d; --danger-fond: rgba(193, 39, 45, .2); --danger-bord: rgba(255, 154, 157, .42);
  --neutre: #c4c5bf; --neutre-fond: rgba(196, 197, 191, .1); --neutre-bord: rgba(196, 197, 191, .3);
  background: var(--papier); color: var(--encre);
}
body.theme-sombre :is(h1, h2, h3, h4) { color: var(--encre); }
body.theme-sombre .v13-mc { border-top-color: var(--jaune); }
body.theme-sombre .v13-flux a:hover, body.theme-sombre .carte-travail:hover, body.theme-sombre .apercu-offres a:hover { box-shadow: 4px 4px 0 var(--jaune); }
body.theme-sombre :is(.v13-flux .v13-num, .roles dt) { color: var(--encre); }
body.theme-sombre .v13-flux li:nth-child(4) :is(.lib, .v13-num, small) { color: #fff; }
body.theme-sombre :is(.btn:not(.btn-danger):not(.btn-principal):hover, .v13-outil:hover, .v13-recherche:hover, .v13-suivi a:hover, .v13-elements a:hover) { border-color: var(--encre-3); }
body.theme-sombre .v13-outil:hover { color: var(--encre); }
body.theme-sombre .v13-outil[aria-pressed="true"], body.theme-sombre .v13-outil[aria-current="page"], body.theme-sombre .vues button[aria-pressed="true"] { background: var(--jaune); border-color: var(--jaune); color: var(--bitume); }
body.theme-sombre .btn-principal { box-shadow: 3px 3px 0 #000; }
body.theme-sombre .colonne { background: #1a1b19; }
body.theme-sombre .v13-fil::after, body.theme-sombre .v13-fil li.fait::before { background: var(--encre-2); border-color: var(--encre-2); }
body.theme-sombre .tableau tbody tr:hover { background: rgba(247, 181, 0, .07); }
body.theme-sombre .tableau thead th { border-bottom-color: var(--encre-3); }
body.theme-sombre .v13-palette { border-color: var(--jaune); box-shadow: 0 30px 80px -20px #000; }
body.theme-sombre .v13-palette-champ input { color: var(--bitume); }
body.theme-sombre .v13-palette-champ input::placeholder { color: #4a4b47; }
body.theme-sombre .qr-2fa { background: #fff; } /* le QR code reste noir sur blanc pour être lu par le téléphone */
body.theme-sombre .v13-squelette { background: linear-gradient(90deg, #262724 0%, #30312d 40%, #262724 80%); background-size: 200% 100%; }
body.theme-sombre .alerte-ok { color: var(--ok); } body.theme-sombre .alerte-erreur { color: var(--danger); }
body.theme-sombre .alerte-info { color: var(--info); } body.theme-sombre .alerte-attention { color: var(--alerte); }
body.theme-sombre .action-ligne:hover { background: #262724; }
body.theme-sombre .g-grille { stroke: var(--trait); }
body.theme-sombre .g-barre { fill: var(--jaune); }
body.theme-sombre .v13-hud b { color: var(--ok); }
body.theme-sombre .v13-agent-badge { color: var(--info); }
body.theme-sombre .lateral { border-right: 1px solid var(--trait); }
body.theme-sombre .v13-module { background: #0c4a72; }
body.theme-sombre .email-html { background: #fff; }

/* ===================================================================================================================
   12. Écrans moyens et téléphones
   =================================================================================================================== */
@media (max-width: 1100px) {
  .v13-flux { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v13-hud { display: none; }
}
@media (max-width: 960px) {
  .sg-heros-interieur { grid-template-columns: 1fr; gap: 1rem; }
  .sg-heros-texte { padding-bottom: 0; }
  .sg-panneau { justify-self: center; max-width: 460px; }
  .sg-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4rem 2rem; }
  .sg-etapes::before { display: none; }
  .sg-demo-grille { grid-template-columns: 1fr; }
  .sg-fonctions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v13-connexion { grid-template-columns: 1fr; }
  .v13-connexion-scene { min-height: 0; padding-bottom: 2rem; }
  .v13-connexion-scene h1 { font-size: clamp(2.2rem, 1.4rem + 4vw, 3.2rem); }
}
@media (max-width: 640px) {
  .sg-heros h1 { font-size: clamp(2.7rem, 1.6rem + 6vw, 3.6rem); }
  .sg-heros-actions .btn { flex: 1 1 100%; }
  .sg-heros-preuves { display: grid; gap: .4rem; }
  .sg-panneau-tete { font-size: 1.2rem; }
  .sg-panneau-lignes dd { font-size: 1.2rem; }
  .sg-panneau-lignes .sg-montant { font-size: 1.8rem; }
  .sg-tampon strong { font-size: 1.9rem; }
  .sg-etapes { grid-template-columns: 1fr; }
  .sg-fonctions { grid-template-columns: 1fr; gap: 2rem; }
  .roles div { grid-template-columns: 1fr; gap: .3rem; }
  .v13-flux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v13-flux li:nth-child(4) { grid-column: span 2; grid-row: 1; }
  .v13-barre .v13-theme { display: none; }
  .v13-mc-actions .btn { flex: 1 1 100%; }
  .v13-module { min-height: 0; padding: .55rem 2.4rem .55rem .9rem; }
  .v13-module p { display: none; }
  .v13-toasts { left: 1rem; right: 1rem; bottom: calc(var(--hauteur-nav-basse) + 1rem); }
  .v13-recherche .long, .v13-recherche kbd { display: none; }
  .v13-recherche .court { display: inline; }
  .v13-suivi a { grid-template-columns: minmax(0, 1fr); }
  .v13-suivi .pastille { grid-row: auto; justify-self: start; white-space: normal; }
  .v13-suivi strong { white-space: normal; }
  .v13-suivi .action { grid-column: 1; }
  .v13-suivi .ico { display: none; }
  .v13-fil li span { font-size: .72rem; }
  .v13-fil li:not(.courant) span { opacity: .75; }
}
@media (max-width: 560px) { .v14-guide-etapes li { grid-template-columns: 2.2rem 1fr; } .v14-guide-etapes li .btn { grid-column: 2; justify-self: start; } }

/* ===================================================================================================================
   13. Mouvement réduit, impression
   =================================================================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .sg-signature path { stroke-dashoffset: 0; }
  .sg-tampon { opacity: .94; }
  .sg-rejouer { display: none; }
}
@media print {
  .lateral, .nav-basse, .barre-mobile, .v13-barre, .v13-module, .v13-toasts, .bandeau-demo, .sg-appel-mobile, .haut { display: none !important; }
  .sg-heros::after { display: none; }
}
