/* Guides de voltena.app, toutes langues. Mêmes jetons que la landing (DA
   Tilleul) : Nuit par défaut, Jour quand le téléphone est en clair. Une
   colonne de lecture, des filets plutôt que des cartes, le tilleul réservé à
   ce qui touche à la charge. Les schémas en SVG lisent ces mêmes variables. */
:root {
  --bg: #141B26; --card: #1B2431; --card-alt: #232D3B;
  --line: rgba(238,240,236,0.12); --line-strong: rgba(238,240,236,0.20);
  --text: #EEF0EC; --text-soft: #C4CBD3; --text-faint: #A2ABB6;
  --accent: #A9DA85; --accent-ink: #16240F; --accent-dim: rgba(169,218,133,0.14);
  --accent-text: #A9DA85; --accent-line: rgba(169,218,133,0.45);
  --amber: #F0AD4E; --track: rgba(238,240,236,0.10);
  --nav-bg: rgba(20,27,38,0.86); --barre-neutre: rgba(238,240,236,0.38);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F3F2EC; --card: #FAF9F5; --card-alt: #E6E4DB;
    --line: rgba(20,27,38,0.12); --line-strong: rgba(20,27,38,0.22);
    --text: #141B26; --text-soft: #3A414B; --text-faint: #5A616B;
    --accent: #A9DA85; --accent-ink: #16240F; --accent-dim: rgba(169,218,133,0.40);
    --accent-text: #2F6B12; --accent-line: rgba(47,107,18,0.45);
    --amber: #9A5F08; --track: rgba(20,27,38,0.08);
    --nav-bg: rgba(243,242,236,0.88); --barre-neutre: rgba(20,27,38,0.30);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text-soft); font: 18px/1.7 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
strong { color: var(--text); font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.visuel-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* En-tête et pied, comme la landing */
.nav { position: sticky; top: 0; z-index: 10; background: var(--nav-bg); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.nav .wrap { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.lg-mark { width: 24px; height: 24px; color: var(--accent-text); }
.lg-word { height: 17px; width: calc(17px * 4.7798); color: var(--text); }
.nav nav { display: flex; align-items: center; gap: 18px; font-size: 15px; font-weight: 600; }
.nav nav a { color: var(--text-soft); text-decoration: none; }
.nav .btn { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); }
footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 40px; font-size: 14px; color: var(--text-faint); line-height: 1.6; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 12px; }
footer nav a { color: var(--text-soft); text-decoration: none; }
footer p { margin: 0; max-width: 720px; }

/* Article */
main { max-width: 700px; margin: 0 auto; padding: 36px 20px 0; }
.fil { margin: 0 0 18px; font-size: 15px; color: var(--text-faint); }
.fil a { text-decoration: none; font-weight: 600; }
h1, h2, h3 { color: var(--text); letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.1; margin: 0 0 14px; font-weight: 700; }
.meta { font-size: 15px; color: var(--text-faint); margin: 0; }
.langues { font-size: 15px; color: var(--text-faint); margin: 8px 0 0; }

.bref { margin: 32px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); }
.bref-titre { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--accent-text); }
.bref p { margin: 0 0 8px; color: var(--text); }
.bref ol, .bref ul { margin: 0; padding-left: 1.2em; color: var(--text); }
.bref ol + p, .bref ul + p { margin-top: 12px; color: var(--text-soft); }
.bref li + li { margin-top: 6px; }

.sommaire { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin: 0 0 8px; font-size: 16px; }
.sommaire p { margin: 0 0 6px; font-weight: 700; color: var(--text); font-size: 15px; }
.sommaire ol { margin: 0; padding-left: 1.3em; }
.sommaire li { margin: 3px 0; }
.sommaire a { text-decoration: none; }
.sommaire a:hover { text-decoration: underline; }

.corps h2 { font-size: 1.55rem; line-height: 1.2; margin: 52px 0 12px; scroll-margin-top: 80px; }
.corps h3 { font-size: 1.15rem; margin: 32px 0 8px; }
.corps p { margin: 0 0 18px; }
.corps ul, .corps ol { margin: 0 0 18px; padding-left: 1.3em; }
.corps li { margin: 6px 0; }
.corps .note { font-size: 16px; color: var(--text-faint); border-top: 1px solid var(--line); padding-top: 12px; }
.corps .attention { border-left: 3px solid var(--amber); padding: 2px 0 2px 18px; margin: 24px 0; }
.corps .attention strong:first-child { color: var(--amber); }
.corps table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 16px; font-variant-numeric: tabular-nums; }
.corps th, .corps td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.corps th { color: var(--text); font-weight: 600; border-bottom-color: var(--line-strong); }
.corps td:first-child, .corps th:first-child { padding-left: 0; }
.corps td:first-child { white-space: nowrap; color: var(--text); }

/* Schémas : une figure, son titre, sa légende. Le SVG prend ses couleurs ici. */
figure.schema { margin: 32px 0; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
figure.schema .titre { margin: 0 0 16px; font-weight: 700; color: var(--text); font-size: 16px; }
figure.schema figcaption { margin-top: 14px; font-size: 15px; color: var(--text-faint); line-height: 1.55; }
.schema svg text { font-family: var(--font); fill: var(--text-soft); }
.schema .s-trait { fill: none; stroke: var(--line-strong); stroke-width: 2; }
.schema .s-corps { fill: var(--card); stroke: var(--text-faint); stroke-width: 2; }
.schema .s-trou { fill: var(--bg); stroke: var(--text-faint); stroke-width: 1.5; }
.schema .s-broche { fill: var(--text-soft); }
.schema .s-vide { fill: var(--bg); stroke: var(--amber); stroke-width: 2; stroke-dasharray: 4 3; }
.schema .s-phase { fill: var(--bg); stroke: var(--accent); stroke-width: 3; }
.schema .s-broche-phase { fill: var(--accent); }

/* Deux prises côte à côte, légendes en HTML pour rester lisibles sur téléphone */
.prises { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.prises > div { text-align: center; }
.prises svg { width: 100%; max-width: 220px; margin: 0 auto; }
.prises h3 { margin: 10px 0 2px; font-size: 16px; }
.prises p { margin: 0; font-size: 15px; color: var(--text-faint); line-height: 1.45; }
.prises svg.repere { display: inline-block; width: 12px; height: 12px; margin: 0 6px 0 0; vertical-align: -1px; }
.schema .repere .s-vide { stroke-dasharray: 2.5 2; stroke-width: 1.5; }

/* Échelle de puissance lue sur la borne */
.echelle { position: relative; margin: 8px 0 0; }
.echelle .piste { position: relative; height: 34px; border-radius: 6px; background: var(--track); }
.echelle .zone { position: absolute; top: 0; bottom: 0; border-radius: 4px; display: flex; align-items: center; padding: 0 10px; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.echelle .zone.mono { background: var(--card-alt); color: var(--text); }
.echelle .zone.tri { background: var(--accent); color: var(--accent-ink); }
.echelle .graduations { position: relative; height: 24px; margin-top: 6px; font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.echelle .graduations span { position: absolute; transform: translateX(-50%); }
.echelle .graduations span:first-child { transform: none; }

/* Barres de durée face à la nuit d'heures creuses */
.nuit { font-size: 15px; font-variant-numeric: tabular-nums; }
.nuit .ligne { display: grid; grid-template-columns: 9.5rem 1fr; gap: 12px; align-items: center; margin: 10px 0; }
.nuit .nom { color: var(--text); line-height: 1.3; }
.nuit .nom small { display: block; color: var(--text-faint); font-size: 13px; }
.nuit .zone-barre { position: relative; height: 26px; }
.nuit .fenetre { position: absolute; top: -6px; bottom: -6px; left: 0; border: 1px dashed var(--accent-line); border-radius: 6px; background: var(--accent-dim); }
.nuit .barre { position: absolute; top: 4px; height: 18px; left: 0; border-radius: 0 4px 4px 0; background: var(--barre-neutre); }
.nuit .barre.ok { background: var(--accent); }
.nuit .valeur { position: absolute; top: 2px; font-size: 14px; color: var(--text-soft); padding-left: 8px; white-space: nowrap; }
.nuit .legende { display: grid; grid-template-columns: 9.5rem 1fr; gap: 12px; color: var(--text-faint); font-size: 13px; margin-top: 10px; }
.nuit .axe { position: relative; height: 20px; }
.nuit .axe span { position: absolute; white-space: nowrap; }
.nuit .axe span + span { transform: translateX(-100%); border-right: 1px dashed var(--accent-line); padding-right: 6px; }
@media (max-width: 520px) {
  .nuit .ligne, .nuit .legende { grid-template-columns: 1fr; gap: 4px; }
  .nuit .legende > span:first-child { display: none; }
}

/* Appel de fin : un filet en tilleul, pas une carte */
.cta { margin: 56px 0 0; padding: 32px 0; border-top: 2px solid var(--accent); border-bottom: 1px solid var(--line); }
.cta-mark { width: 28px; height: 28px; color: var(--accent-text); margin-bottom: 14px; }
.cta h2 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 10px; }
.cta p { margin: 0 0 20px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 12px; }
.stores img { height: 48px; width: auto; }
.cta .essai { font-size: 15px; color: var(--text-faint); margin: 0; }

.sources { margin-top: 40px; font-size: 15px; color: var(--text-faint); }
.sources h2 { font-size: 16px; margin: 0 0 8px; }
.sources ol { margin: 0; padding-left: 1.3em; }
.sources a { color: var(--text-soft); word-break: break-word; }
.retour { margin: 32px 0 0; font-weight: 600; }
.retour a { text-decoration: none; }

/* Index des guides */
.index .chapo { font-size: 1.1rem; margin: 0 0 6px; }
.recherche input { width: 100%; margin: 28px 0 8px; height: 50px; padding: 0 16px; font: inherit; font-size: 17px; color: var(--text); background: transparent; border: 1px solid var(--line-strong); border-radius: 12px; }
.recherche input::placeholder { color: var(--text-faint); }
.recherche input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { border-bottom: 1px solid var(--line); }
.liste a { display: block; padding: 22px 0; text-decoration: none; color: inherit; }
.liste h2 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 6px; }
.liste a:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.liste p { margin: 0 0 6px; font-size: 16px; }
.liste .meta { font-size: 14px; }
.vide { color: var(--text-faint); padding: 22px 0; }

@media (max-width: 520px) {
  body { font-size: 18px; }
  .nav nav { gap: 14px; }
  .prises { gap: 10px; }
}

/* Capture de l'app dans l'appel de fin. Sur téléphone, elle s'intercale entre
   la phrase et les boutons des stores ; sur ordinateur, elle passe à droite. */
.cta.avec-scene { display: flex; flex-direction: column; }
.cta.avec-scene .cta-texte { display: contents; }
.cta.avec-scene .cta-mark, .cta.avec-scene h2, .cta.avec-scene .cta-texte > p:not(.essai) { order: 1; }
.cta .scene { order: 2; margin: 4px 0 24px; }
.cta.avec-scene .stores { order: 3; }
.cta.avec-scene .essai { order: 4; }
.scene img { width: 100%; max-width: 400px; height: auto; padding-top: 14px; background: var(--bg); border-radius: 16px; border: 1px solid var(--line-strong); }
@media (min-width: 720px) {
  .cta.avec-scene { display: grid; grid-template-columns: 1fr 280px; gap: 32px; align-items: center; }
  .cta.avec-scene .cta-texte { display: block; }
  .cta .scene { margin: 0; }
}
