/**
 * Électrique.chiffrex.fr — identité Chiffrex v1 (octobre 2026).
 * Encre #0F1A2B, papier #F6F4EF, accent du sujet : Volt #65A30D.
 * Titres et chiffres en Host Grotesk, texte en Inter, métadonnées en JetBrains Mono.
 * Même gabarit que carburants.chiffrex.fr (à plat : la bordure fait le travail).
 */

/* ========================================
   Variables
   ======================================== */
:root {
    --ink: #0F1A2B;
    --paper: #F6F4EF;
    --sand: #EFECE4;
    --rule: #C9C3B4;
    --field: #CFC9BB;

    /* Électrique : Volt. Le texte Volt sur fond clair utilise --accent-text (contraste AA). */
    --accent: #65A30D;
    --accent-text: #4D7C0F;
    --accent-soft: #EEF5E1;
    --accent-ink: #1F3A06;

    --net-carburants: #F59E0B;
    --net-salaires: #0E9F6E;
    --net-delinquance: #7C3AAD;
    --net-loyers: #E2543A;
    --net-controle-technique: #0891B2;
    --net-eau: #2E86DE;
    --net-sante: #DB2777;
    --net-electrique: #65A30D;
    --net-elections: #4A5568;

    /* Couleurs Tempo : celles du tarif EDF, pas celles de la charte */
    --tempo-bleu: #2563EB;
    --tempo-blanc: #64748B;
    --tempo-rouge: #DC2626;

    --success: #15803D;
    --success-soft: #E6F4EA;
    --warning: #B45309;
    --warning-soft: #FDF1DC;
    --danger: #B91C1C;
    --danger-soft: #FCE9E7;

    --text: var(--ink);
    --text-muted: #4A5568;
    --border: #E2DDD1;
    --border-strong: #CFC9BB;
    --surface: #FFFFFF;

    --shadow-sm: 0 1px 2px rgba(15, 26, 43, .05);
    --shadow: 0 2px 6px rgba(15, 26, 43, .06);
    --shadow-lg: 0 8px 22px rgba(15, 26, 43, .1);

    --font-ui: 'Inter', system-ui, 'Segoe UI', sans-serif;
    --font-display: 'Host Grotesk', 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

    --radius-sm: 8px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 999px;

    --gap: 1.5rem;
    --transition: 180ms cubic-bezier(.4, 0, .2, 1);
}

/* ========================================
   Base
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--paper);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.main-content { flex: 1; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
.i { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: -.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(101, 163, 13, .55); outline-offset: 2px; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: var(--text);
}
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

.container { width: 100%; max-width: 1248px; margin: 0 auto; padding: 0 var(--gap); }
.container-narrow { max-width: 860px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.25rem; }

.kicker {
    font-family: var(--font-mono);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ========================================
   Bandeau réseau, annonce, navigation
   ======================================== */
.cx-network { background: var(--ink); }
.cx-network-inner { display: flex; flex-wrap: wrap; align-items: center; column-gap: 22px; row-gap: 2px; }
.cx-network-link {
    display: inline-flex; align-items: center; gap: 7px; padding: 6px 0;
    font-size: 13px; line-height: 1.3; font-weight: 500; color: #C9D0DC;
    border-bottom: 2px solid transparent; text-decoration: none;
}
.cx-network-link:hover { color: #fff; text-decoration: none; }
.cx-network-link[aria-current="page"] { color: #fff; font-weight: 700; border-bottom-color: #fff; }
.cx-network-home { margin-right: 6px; }
.cx-network-pill { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex-shrink: 0; }

.cx-promo { background: var(--sand); border-bottom: 1px solid var(--border); }
.cx-promo-inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px;
    padding-top: 8px; padding-bottom: 8px; font-size: .875rem; line-height: 1.45; text-align: center;
}
.cx-promo a {
    color: var(--ink); font-weight: 600; font-size: .8125rem; padding: 3px 10px;
    border: 1.5px solid var(--ink); border-radius: var(--radius-sm); text-decoration: none;
}
.cx-promo a:hover { background: var(--ink); color: #fff; }

.navbar { position: sticky; top: 0; z-index: 1000; background: var(--paper); border-bottom: 1px solid var(--border); }
.navbar-container { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.navbar-brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.navbar-brand img { display: block; height: 24px; width: auto; }
.navbar-center { display: flex; align-items: center; gap: 4px 22px; margin-left: auto; min-width: 0; }
.navbar-right { display: flex; align-items: center; gap: 12px; }

.nav-link {
    position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 0;
    font-size: 15px; font-weight: 500; color: var(--ink); white-space: nowrap;
    border-bottom: 2px solid transparent; text-decoration: none;
}
.nav-link:hover { border-bottom-color: var(--accent); text-decoration: none; }
.nav-link[aria-current="page"] { font-weight: 700; border-bottom-color: var(--ink); }
.nav-link-todo::after {
    content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 0 3px rgba(101, 163, 13, .22); margin-left: 2px;
}

.nav-btn-auth, .nav-btn-premium {
    display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px;
    font-size: 15px; font-weight: 600; line-height: 1.2; border-radius: var(--radius);
    border: 1.5px solid var(--ink); white-space: nowrap; text-decoration: none;
    transition: background-color var(--transition), color var(--transition);
}
.nav-btn-auth { background: var(--ink); color: #fff; }
.nav-btn-auth:hover { background: #1d2a40; color: #fff; text-decoration: none; }
.nav-btn-premium { background: transparent; color: var(--ink); }
.nav-btn-premium:hover { background: var(--ink); color: #fff; text-decoration: none; }

.user-menu { position: relative; }
.user-badge {
    display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; max-width: 200px;
    background: var(--sand); border: 1px solid var(--border); border-radius: var(--radius-full);
    color: var(--ink); white-space: nowrap; text-decoration: none;
}
.user-badge:hover { background: #fff; text-decoration: none; }
.user-avatar {
    width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0;
}
.user-name { font-size: .875rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.user-submenu {
    position: absolute; top: calc(100% + 8px); right: 0; min-width: 190px; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 8px;
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition); z-index: 1200;
}
.user-menu:hover .user-submenu, .user-menu:focus-within .user-submenu { opacity: 1; visibility: visible; transform: none; }
.user-submenu a { display: block; padding: 10px 12px; color: var(--ink); border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600; text-decoration: none; }
.user-submenu a:hover { background: var(--sand); }

.navbar-toggle {
    display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
    border: 1.5px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink); cursor: pointer;
}
.navbar-toggle line { transition: transform var(--transition), opacity var(--transition); transform-origin: center; }
.navbar-toggle.active .top-line { transform: translateY(6px) rotate(45deg); }
.navbar-toggle.active .mid-line { opacity: 0; }
.navbar-toggle.active .bot-line { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
    position: fixed; inset: 0; z-index: 1100; background: var(--paper); display: flex; flex-direction: column; overflow-y: auto;
    transform: translateX(100%); opacity: 0; pointer-events: none; visibility: hidden;
    transition: transform .35s cubic-bezier(.16, 1, .3, 1), opacity .35s, visibility 0s linear .35s;
}
.mobile-menu.active { transform: none; opacity: 1; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.mobile-menu-header {
    position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 14px var(--gap); border-bottom: 1px solid var(--border); background: var(--paper);
}
.mobile-menu-close {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border: 1.5px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink); cursor: pointer;
}
.mobile-menu-inner { display: flex; flex-direction: column; gap: .5rem; padding: 1rem var(--gap) 2.25rem; }
.mobile-link {
    font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em;
    color: var(--ink); padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none;
}
.mobile-auth { margin-top: 1.5rem; }
body.menu-open { overflow: hidden; }

@media (max-width: 1100px) {
    .navbar-center, .navbar-right .nav-link, .navbar-right .nav-auth, .nav-btn-premium { display: none !important; }
    .navbar-toggle { display: inline-flex; }
}
@media (min-width: 1101px) { .mobile-menu { display: none; } }

/* ========================================
   Boutons, pastilles, cartes
   ======================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px;
    font-size: .95rem; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none;
    border: 1.5px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink);
    transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1d2a40; color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-text); border-color: var(--accent-text); color: #fff; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-light { background: #f5f5f5; border-color: #f5f5f5; color: #0a0a0a; }
.btn-outline-light { border-color: rgba(255, 255, 255, .4); color: #f5f5f5; }
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 24px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-ghost { border-color: transparent; padding-left: 8px; padding-right: 8px; }
.btn-ghost:hover { background: var(--sand); }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); border-color: var(--border); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.card-flat { box-shadow: none; }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; font-size: 1.05rem; }
.card-title svg { width: 20px; height: 20px; color: var(--accent-text); flex-shrink: 0; }

.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-full);
    font-size: .78rem; font-weight: 600; line-height: 1.5; background: var(--sand); color: var(--ink); white-space: nowrap;
}
.chip-accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip-success { background: var(--success-soft); color: var(--success); }
.chip-warning { background: var(--warning-soft); color: var(--warning); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-rouge { background: color-mix(in srgb, var(--tempo-rouge) 12%, #fff); color: var(--tempo-rouge); }
.chip-blanc { background: color-mix(in srgb, var(--tempo-blanc) 14%, #fff); color: var(--tempo-blanc); }
.chip-bleu { background: color-mix(in srgb, var(--tempo-bleu) 12%, #fff); color: var(--tempo-bleu); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--ink)); display: inline-block; flex-shrink: 0; }
.dot-bleu { --c: var(--tempo-bleu); } .dot-blanc { --c: var(--tempo-blanc); } .dot-rouge { --c: var(--tempo-rouge); }

.notice { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--sand); font-size: .9rem; line-height: 1.5; }
.notice svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.notice-warning { background: var(--warning-soft); color: #7A3A06; }
.notice-danger { background: var(--danger-soft); color: var(--danger); }
.notice-accent { background: var(--accent-soft); color: var(--accent-ink); }

.skeleton { background: linear-gradient(90deg, var(--sand) 25%, #f6f3ec 50%, var(--sand) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(15, 26, 43, .15); border-top-color: currentColor; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================================
   Formulaires
   ======================================== */
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field + .field, .field-row + .field, .field + .field-row { margin-top: 1rem; }
.field label, .label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.hint { font-size: .8rem; color: var(--text-muted); line-height: 1.45; }
.input, .select {
    width: 100%; padding: 11px 13px; background: #fff; border: 1.5px solid var(--field);
    border-radius: var(--radius); font-size: .95rem; line-height: 1.4;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus, .select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(101, 163, 13, .3); outline: none; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 76px; }
.input-suffix span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-size: .8rem; color: var(--text-muted); pointer-events: none; }
.field-row .field { margin-top: 0 !important; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }

.seg { display: inline-flex; padding: 3px; background: var(--sand); border-radius: var(--radius); gap: 2px; flex-wrap: wrap; }
.seg button {
    padding: 8px 14px; border: 0; border-radius: 8px; background: transparent; font-size: .88rem; font-weight: 600; cursor: pointer; color: var(--text-muted);
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
    padding: 7px 14px; border: 1.5px solid var(--field); border-radius: var(--radius-full); background: #fff;
    font-size: .85rem; font-weight: 600; cursor: pointer; transition: all var(--transition);
}
.pill:hover { border-color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent-text); flex-shrink: 0; }
.check small { display: block; color: var(--text-muted); font-size: .8rem; }

input[type="range"] { width: 100%; accent-color: var(--accent-text); height: 28px; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.choice {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; cursor: pointer;
    background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-lg); transition: all var(--transition);
}
.choice:hover { border-color: var(--field); }
.choice[aria-pressed="true"] { border-color: var(--accent-text); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-text); }
.choice[disabled] { opacity: .5; cursor: not-allowed; }
.choice strong { display: block; font-size: .92rem; line-height: 1.3; }
.choice small { display: block; font-size: .78rem; color: var(--text-muted); line-height: 1.35; }
.choice-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 800; font-size: .78rem; background: color-mix(in srgb, var(--c) 16%, #fff); color: var(--c);
}
.choice-list { display: grid; gap: 10px; }

.suggest {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 900; list-style: none; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-height: 280px; overflow-y: auto;
}
.suggest li { padding: 10px 14px; font-size: .88rem; cursor: pointer; border-bottom: 1px solid var(--border); line-height: 1.4; }
.suggest li:last-child { border-bottom: 0; }
.suggest li:hover { background: var(--sand); }

.period-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.period-row .input { width: auto; }
.period-row + .period-row { margin-top: 10px; }

/* ========================================
   En-tête de page, sections
   ======================================== */
.page-head { padding: 2.25rem 0 1.25rem; }
.page-head .kicker { margin-bottom: .6rem; display: block; }
.page-head h1 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); }
.page-head .lead { margin-top: .8rem; font-size: 1.08rem; color: var(--text-muted); max-width: 66ch; }
.section { padding: 2.25rem 0; }
.section-head { margin-bottom: 1.25rem; }
.section-head p { color: var(--text-muted); margin-top: .35rem; max-width: 66ch; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.stack { display: grid; gap: var(--gap); }

/* ========================================
   Accueil : couleur du jour, tuiles, recommandation
   ======================================== */
.hero { padding: 2.5rem 0 1rem; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.hero-copy .kicker { display: block; margin-bottom: .8rem; }
.hero-copy h1 em { font-style: normal; color: var(--accent-text); }
.hero-copy p { margin-top: 1rem; font-size: 1.1rem; color: var(--text-muted); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }

.today-card { padding: 1.6rem; border-radius: 24px; }
.today-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.today-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.05; letter-spacing: -.03em; margin: .35rem 0 .25rem; color: var(--tc); }
.today-date { color: var(--text-muted); font-size: .95rem; }
.today-orb { width: 76px; height: 76px; border-radius: 50%; background: color-mix(in srgb, var(--tc) 13%, #fff); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.today-orb span { width: 42px; height: 42px; border-radius: 50%; background: var(--tc); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px color-mix(in srgb, var(--tc) 38%, transparent); }
.today-orb svg { width: 22px; height: 22px; color: #fff; }
.today-next { display: flex; align-items: center; gap: 10px; margin-top: 1.2rem; padding: 11px 14px; background: var(--paper); border-radius: var(--radius-lg); font-weight: 600; font-size: .95rem; }
.today-next .chip { margin-left: auto; }
.tc-bleu { --tc: var(--tempo-bleu); } .tc-blanc { --tc: var(--tempo-blanc); } .tc-rouge { --tc: var(--tempo-rouge); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile { padding: 1.1rem 1.2rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); }
.tile .icon { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--c); margin-bottom: .7rem; }
.tile .icon svg { width: 18px; height: 18px; }
.tile-label { font-size: .82rem; color: var(--text-muted); font-weight: 500; }
.tile-value { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; line-height: 1.25; letter-spacing: -.02em; }
.tile-value small { font-family: var(--font-ui); font-size: .78rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }

.reco { display: flex; gap: 16px; align-items: flex-start; }
.reco-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--warning-soft); color: var(--warning); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.reco-icon svg { width: 22px; height: 22px; }
.reco h3 { margin-bottom: .35rem; }
.reco p { color: var(--ink); line-height: 1.55; }

.quota-row + .quota-row { margin-top: 1rem; }
.quota-line { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 600; font-size: .92rem; }
.quota-line .figures { margin-left: auto; font-size: .82rem; color: var(--text-muted); font-weight: 500; }
.quota-line .figures b { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; color: var(--c); }
.bar { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--c) 14%, #fff); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--c); border-radius: 4px; }

.cta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cta { display: flex; align-items: center; gap: 14px; padding: 1.2rem; border-radius: var(--radius-xl); border: 1px solid var(--border); background: #fff; color: var(--ink); text-decoration: none; transition: border-color var(--transition), transform var(--transition); }
.cta:hover { border-color: var(--ink); text-decoration: none; transform: translateY(-2px); }
.cta .icon { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); flex-shrink: 0; }
.cta .icon svg { width: 22px; height: 22px; }
.cta strong { display: block; font-family: var(--font-display); font-size: 1.08rem; letter-spacing: -.01em; }
.cta small { color: var(--text-muted); font-size: .85rem; line-height: 1.4; display: block; }
.cta .arrow { margin-left: auto; color: var(--text-muted); width: 20px; height: 20px; flex-shrink: 0; }
.cta-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.cta-primary .icon { background: rgba(255, 255, 255, .2); color: #fff; }
.cta-primary small, .cta-primary .arrow { color: rgba(255, 255, 255, .88); }
.cta-primary:hover { border-color: var(--accent-text); background: var(--accent-text); }
.cta-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.cta-dark .icon { background: rgba(255, 255, 255, .12); color: #fff; }
.cta-dark small, .cta-dark .arrow { color: rgba(255, 255, 255, .75); }

.setup-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--accent-soft); border-color: #D5E6B3; }
.setup-card .icon { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--accent-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.setup-card .copy { flex: 1; min-width: 220px; }
.setup-card strong { font-family: var(--font-display); font-size: 1.1rem; }

.banner-offline { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--radius-lg); background: var(--warning-soft); color: #7A3A06; font-size: .88rem; }

.prose { max-width: 70ch; }
.prose h2 { margin: 2.2rem 0 .7rem; }
.prose h3 { margin: 1.6rem 0 .5rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose a { text-decoration: underline; }
.faq details { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.faq summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--accent-text); }
.faq details[open] summary::after { content: '−'; }
.faq p { margin-top: .6rem; color: var(--text-muted); max-width: 70ch; }

.rates { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rates th, .rates td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.rates th { font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); }
.rates td.num, .rates th.num { text-align: right; }
.rates td.num { font-family: var(--font-display); font-weight: 700; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-xl); border: 1px solid var(--border); background: #fff; }
.table-wrap .rates th:first-child, .table-wrap .rates td:first-child { padding-left: 1.2rem; }

/* ========================================
   Calendrier Tempo
   ======================================== */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.cal-head h2 { text-transform: capitalize; font-size: 1.35rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding: 6px 0; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 600; font-size: .95rem; margin: 0 auto; width: 100%; max-width: 50px; }
.cal-day.empty { visibility: hidden; }
.cal-day.known { color: #fff; background: var(--c); }
.cal-day.future { color: #b4aea0; }
.cal-day.today { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); font-weight: 800; }
.legend { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.legend span { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; }
.season-table td.rouge { color: var(--tempo-rouge); } .season-table td.blanc { color: var(--tempo-blanc); } .season-table td.bleu { color: var(--tempo-bleu); }

/* ========================================
   Bornes : carte + panneau
   ======================================== */
.map-shell { display: grid; grid-template-columns: 410px 1fr; height: calc(100vh - 128px); min-height: 620px; border-top: 1px solid var(--border); background: #fff; }
.map-panel { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); background: var(--paper); }
.map-panel-head { padding: 1rem 1.1rem .9rem; border-bottom: 1px solid var(--border); background: var(--paper); }
.map-panel-head h1 { font-size: 1.5rem; letter-spacing: -.03em; }
.search-row { display: flex; gap: 8px; margin-top: .8rem; }
.search-row .field { flex: 1; margin: 0; }
.map-panel .pills { margin-top: .8rem; }
.map-panel .pill { padding: 6px 12px; font-size: .8rem; }
.map-body { flex: 1; overflow-y: auto; padding: .8rem 1.1rem 1.2rem; }
.map-area { position: relative; min-height: 0; }
#map, #tripMap { width: 100%; background: #e9e6df; z-index: 1; }
#map { height: 100%; }
#tripMap { height: 340px; }
.map-overlay {
    position: absolute; left: 50%; top: 18px; transform: translateX(-50%); z-index: 500; max-width: calc(100% - 32px);
    padding: 10px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg); font-size: .88rem; font-weight: 600; text-align: center;
}
.map-legend {
    position: absolute; left: 12px; bottom: 26px; z-index: 500; display: flex; gap: 14px; padding: 8px 12px;
    background: rgba(255, 255, 255, .94); border: 1px solid var(--border); border-radius: var(--radius); font-size: .78rem; font-weight: 600;
}
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }

.station-item {
    display: block; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 10px; background: #fff; cursor: pointer;
    border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color var(--transition);
}
.station-item:hover, .station-item.active { border-color: var(--ink); }
.station-item .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.station-item strong { font-family: var(--font-display); font-size: 1rem; line-height: 1.3; letter-spacing: -.01em; }
.station-item .dist { font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted); white-space: nowrap; padding-top: 2px; }
.station-item .addr { font-size: .84rem; color: var(--text-muted); margin: 2px 0 8px; line-height: 1.4; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.detail h2 { font-size: 1.4rem; letter-spacing: -.025em; }
.detail .addr { color: var(--text-muted); margin: .25rem 0 .9rem; font-size: .95rem; }
.detail .block { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.detail .block h4 { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; margin-bottom: .55rem; }
.detail .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fact .k { font-size: .78rem; color: var(--text-muted); font-weight: 500; }
.fact .v { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.3; letter-spacing: -.02em; }
.fact .v small { font-family: var(--font-ui); font-size: .8rem; font-weight: 500; color: var(--text-muted); }
.detail .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.detail .small { font-size: .82rem; color: var(--text-muted); line-height: 1.5; }

.avail { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: .92rem; }
.avail::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.avail-available { --c: #22C55E; color: var(--success); }
.avail-busy { --c: #F59E0B; color: var(--warning); }
.avail-down { --c: #EF4444; color: var(--danger); }

.pin {
    position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--tempo-blanc); border: 2.5px solid #fff;
    box-shadow: 0 2px 6px rgba(15, 26, 43, .35); display: flex; align-items: center; justify-content: center; color: #fff;
    transition: transform var(--transition);
}
.pin svg { width: 16px; height: 16px; }
.pin.fast { background: var(--tempo-bleu); }
.pin.selected { transform: scale(1.3); background: var(--ink); box-shadow: 0 0 0 3px var(--accent), 0 4px 10px rgba(15, 26, 43, .4); z-index: 1000 !important; }
.pin .flag { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: #DC2626; border: 2px solid #fff; }
.pin .state { position: absolute; bottom: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: var(--c); }
.leaflet-container { font-family: var(--font-ui); }
.leaflet-div-icon { background: transparent; border: 0; }

.legend-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* ========================================
   Trajet
   ======================================== */
.trip-layout { display: grid; grid-template-columns: 400px 1fr; gap: var(--gap); align-items: start; }
.trip-form { position: sticky; top: 90px; }
.trip-summary { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.trip-map { height: 340px; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); }
.stop-card + .stop-card { margin-top: 12px; }
.stop-card .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: .6rem; }
.stop-card h3 { font-size: 1.1rem; }
.final-card { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 1rem 1.2rem; background: var(--success-soft); color: var(--success); border-radius: var(--radius-xl); font-family: var(--font-display); font-weight: 700; }
.final-card svg { width: 22px; height: 22px; flex-shrink: 0; }
.soc-bar { height: 6px; border-radius: 3px; background: var(--sand); margin: .4rem 0 .7rem; overflow: hidden; }
.soc-bar i { display: block; height: 100%; background: var(--accent); }
.soc-bar.low i { background: #DC2626; }

/* ========================================
   Estimation
   ======================================== */
.estimate-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }
.range-values { display: flex; justify-content: space-between; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin-bottom: .3rem; }
.dual-range { position: relative; height: 34px; }
.dual-range input { position: absolute; inset: 0; width: 100%; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; margin: 0; }
.dual-range input::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--accent-text); cursor: pointer; box-shadow: var(--shadow); }
.dual-range input::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--accent-text); cursor: pointer; }
.dual-range input::-webkit-slider-runnable-track { height: 6px; background: transparent; }
.dual-range input::-moz-range-track { height: 6px; background: transparent; }
.dual-track { position: absolute; left: 0; right: 0; top: 14px; height: 6px; border-radius: 3px; background: var(--sand); }
.dual-track i { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; }
.result-big { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.4rem, 5vw, 3.2rem); letter-spacing: -.035em; line-height: 1.1; color: var(--success); }
.facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 1.1rem; }

/* ========================================
   Journal
   ======================================== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1.1rem 1.3rem; }
.stat .v { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; letter-spacing: -.03em; line-height: 1.2; }
.stat .v.good { color: var(--success); }
.stat .k { font-size: .85rem; color: var(--text-muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.log-table td.actions { text-align: right; white-space: nowrap; }
.log-table td .save { color: var(--success); font-weight: 600; }
.split-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--sand); margin: .8rem 0 .6rem; }
.split-bar i { display: block; height: 100%; }
.split-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: .9rem; }
.split-legend span { display: inline-flex; align-items: center; gap: 8px; }
.monthly-table td:first-child { text-transform: capitalize; white-space: nowrap; }
.monthly-table .m-short { display: none; }
.monthly-table tfoot td { font-weight: 700; border-top: 2px solid var(--border); }
.monthly-table .cost-split { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 2px 10px; font-size: .78rem; font-weight: 400; color: var(--text-muted); white-space: nowrap; }
.monthly-table .cost-split span { display: inline-flex; align-items: center; gap: 5px; }
.monthly-table td .save { color: var(--success); font-weight: 600; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state svg { width: 44px; height: 44px; margin-bottom: .8rem; color: var(--field); }
.gate { text-align: center; padding: 3rem 1.5rem; }
.gate .icon { width: 60px; height: 60px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.gate .icon svg { width: 28px; height: 28px; }
.gate p { max-width: 46ch; margin: .6rem auto 1.4rem; color: var(--text-muted); }

/* ========================================
   Modale, toasts
   ======================================== */
.modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(15, 26, 43, .5); }
.modal-card { width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 22px; padding: 1.6rem; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 1.4rem; flex-wrap: wrap; }
.modal-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--text-muted); padding: 4px 8px; }
.summary-box { padding: 1rem 1.1rem; background: var(--paper); border-radius: var(--radius-lg); }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: 3px 0; font-size: .92rem; }
.summary-row b { font-family: var(--font-display); font-size: 1.05rem; }
.radio-list { display: grid; gap: 8px; }
.radio-list label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: .92rem; }
.radio-list input { accent-color: var(--accent-text); }
.radio-list label:has(input:checked) { border-color: var(--accent-text); background: var(--accent-soft); }
/* Choix d'une position : on déplace la carte sous un repère fixe (pointe au centre). */
.pick-map { position: relative; height: 220px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.pick-map .leaflet-container { height: 100%; }
.pick-map-pin { position: absolute; left: 50%; top: 50%; z-index: 500; width: 30px; height: 30px; margin: -30px 0 0 -15px; pointer-events: none; color: var(--accent-text); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.pick-map-pin svg { width: 100%; height: 100%; }
.field-error { margin-top: 4px; font-size: .8rem; color: var(--danger); }
/* Modération : carte de la borne à gauche, détails à droite (empilés sur mobile). */
.mod-card { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.mod-map { height: 200px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.mod-body p { margin: .3rem 0 0; }
.mod-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) { .mod-card { grid-template-columns: 1fr; } }
.propose-link { margin-top: .7rem; }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3000; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { padding: 12px 16px; border-radius: var(--radius-lg); background: var(--ink); color: #fff; font-size: .92rem; font-weight: 500; box-shadow: var(--shadow-lg); transition: opacity .4s, transform .4s; }
.toast-error { background: var(--danger); }
.toast-success { background: var(--success); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ========================================
   Pied de page
   ======================================== */
.footer { background: var(--ink); color: #C9D0DC; margin-top: 4rem; padding: 3.5rem 0 2rem; }
.footer a { color: #C9D0DC; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2rem; }
.footer-logo img { display: block; height: 24px; width: auto; }
.footer-tagline { margin: 1rem 0; font-size: .92rem; line-height: 1.6; max-width: 38ch; }
.footer-tagline strong { color: #fff; }
.footer-apps { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.footer-apps img { display: block; height: 42px; width: auto; }
.footer-links h4 { color: #fff; font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .9rem; }
.footer-links ul { list-style: none; display: grid; gap: .5rem; }
.footer-links a { font-size: .92rem; text-decoration: none; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #2A3547; font-size: .8rem; line-height: 1.7; color: #98A2B3; display: grid; gap: .6rem; }
.footer-bottom a { color: #C9D0DC; text-decoration: underline; }

/* ========================================
   Adaptation
   ======================================== */
@media (max-width: 1000px) {
    .hero-grid, .estimate-layout, .trip-layout, .grid-2 { grid-template-columns: 1fr; }
    .hero-grid { gap: 1.8rem; }
    .tiles, .stats { grid-template-columns: repeat(2, 1fr); }
    .cta-grid, .grid-3 { grid-template-columns: 1fr; }
    .trip-form { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
    .map-shell { grid-template-columns: 1fr; grid-template-rows: 56vh auto; height: auto; min-height: 0; }
    .map-area { order: -1; height: 56vh; min-height: 340px; }
    .map-panel { border-right: 0; }
    .map-body { overflow: visible; }
}
@media (max-width: 560px) {
    :root { --gap: 1rem; }
    .page-head { padding-top: 1.5rem; }
    .tiles { gap: 10px; }
    .tile { padding: .9rem; }
    .tile-value { font-size: 1.2rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats { gap: 10px; }
    .stat .v { font-size: 1.35rem; }
    .today-card { padding: 1.2rem; }
    .today-orb { width: 62px; height: 62px; }
    .today-orb span { width: 34px; height: 34px; }
    .card { padding: 1.1rem; border-radius: 18px; }
    .log-table th:nth-child(4), .log-table td:nth-child(4) { display: none; }
    .monthly-table th:nth-child(2), .monthly-table td:nth-child(2),
    .monthly-table th:nth-child(4), .monthly-table td:nth-child(4) { display: none; }
    .table-wrap .monthly-table th, .table-wrap .monthly-table td { padding-left: .45rem; padding-right: .45rem; }
    .monthly-table { font-size: .86rem; }
    .monthly-table th { letter-spacing: .02em; font-size: .66rem; }
    .monthly-table .m-long { display: none; }
    .monthly-table .m-short { display: inline; }
    .cal-grid { gap: 3px; }
    .cal-day { font-size: .85rem; }
    .map-legend { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
