/* Design system partagé par toutes les pages (src/webapp/templates/).
   Applique la charte docs/brand/charte-lancura.html : encre, papier de
   carte, un seul accent (golfe), filets plutôt qu'ombres, Archivo +
   IBM Plex Mono. Auto-contenu -- polices servies depuis static/fonts/
   (licence OFL), aucun CDN, tout fonctionne hors-ligne.
   Règles propres à une page : préfixées par la classe posée sur <body>
   par chaque template (page-liste, page-detail, page-adresse,
   page-presentation). */

:root {
    --encre: #0f2230;       /* texte, en-tête, boutons principaux */
    --encre-700: #1b3446;
    --golfe: #1d5e8c;       /* seul accent : liens, focus, repère du logo */
    --golfe-700: #174d74;
    --golfe-clair: #6fa6cf; /* accent sur fond encre */
    --golfe-bg: #e2edf5;
    /* Neutres légèrement teintés vert-gris (maquis), jamais de gris pur. */
    --gray-50: #f3f5f4;     /* papier de carte : fond de page */
    --gray-100: #eceeed;
    --gray-200: #e4e7e4;    /* calcaire : fonds secondaires */
    --gray-300: #d6dbd8;    /* filets */
    --gray-400: #8a9690;    /* brume : décor uniquement (2,8:1) */
    --gray-600: #56645e;    /* maquis : texte secondaire (5,7:1) */
    --gray-900: #0f2230;
    --f-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
    /* Échelle des scores (docs/brand/charte-lancura.html) : granit (faible)
       -> immortelle (moyen) -> golfe (bon). Orange contre bleu plutôt que
       rouge/vert : distinct pour les daltoniens, la clarté diffère aussi.
       Mêmes couleurs dans pdf_export.SCORE_COLORS et carte.js. */
    --score-good: #1d5e8c;
    --score-good-ink: #174d74;
    --score-good-bg: #e2edf5;
    --score-mid: #d9a12e;
    --score-mid-ink: #6e5010;
    --score-mid-bg: #f7ecd1;
    --score-low: #b5452a;
    --score-low-ink: #8a3219;
    --score-low-bg: #f5e0d9;
    /* Variantes claires pour fond sombre (bandeau de fiche, navy-900). */
    --score-good-on-dark: #8db5d6;
    --score-mid-on-dark: #ebc46e;
    --score-low-on-dark: #f0a48c;
    --radius: 14px;
    /* Filet d'un pixel dessiné en ombre : sépare les cartes du papier sans
       changer leurs dimensions (charte : filets plutôt qu'ombres). */
    --shadow: 0 0 0 1px var(--gray-300);
}

* { box-sizing: border-box; }
body {
    font-family: var(--f-sans);
    margin: 0;
    color: var(--gray-900);
    background: var(--gray-50);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Typographie (charte §05) ---------- */
@font-face {
    font-family: "Archivo";
    src: url("/static/fonts/archivo-var-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("/static/fonts/plexmono-400-latin.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("/static/fonts/plexmono-500-latin.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}
/* Titres : Archivo élargie, la largeur fait le contraste plutôt que le gras. */
h1, h2, h3, .fiche-title, .brand {
    font-stretch: 114%;
    font-weight: 620;
    letter-spacing: -0.012em;
    text-wrap: balance;
}
/* Sur-titres, en-têtes de colonnes, libellés : Plex Mono en capitales espacées. */
.eyebrow, .table-card th, table.compare th, .facts span, .score-hero .hero-label,
.preview-eyebrow, .sources-label, .kpi-label, .control-label,
form.filters label, form.search label, form.profile-form label {
    font-family: var(--f-mono);
    font-weight: 500;
    letter-spacing: 0.08em;
}
/* ...mais les champs qu'ils contiennent restent en Archivo
   (font-family posée sur les champs eux-mêmes, plus bas). */
form label input, form label select, form label .optional { letter-spacing: normal; }
a { color: var(--golfe); text-decoration: none; }
a:hover { color: var(--golfe-700); }
code {
    background: var(--gray-100);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.85em;
}

/* ---------- Barre de navigation ---------- */
.topbar {
    background: var(--encre);
    color: white;
    padding: 0.9rem 2rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}
.topbar .left { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.topbar .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    align-self: center;
    font-size: 1.2rem;
    font-stretch: 118%;
    font-weight: 620;
    letter-spacing: -0.012em;
    color: white;
    white-space: nowrap;
}
.topbar .brand-mark { width: 1.3em; height: 1.3em; flex: none; }
.topbar .tagline { font-size: 0.82rem; color: var(--gray-300); }
.topbar nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.topbar nav a { color: var(--gray-300); font-size: 0.88rem; font-weight: 600; white-space: nowrap; }
.topbar nav a:hover { color: white; }
.topbar nav { align-items: center; }
.topbar nav a.active { color: white; border-bottom: 2px solid var(--golfe-clair); padding-bottom: 0.3rem; }
.topbar nav a.nav-cta {
    background: var(--gray-50);
    color: var(--encre);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
}
.topbar nav a.nav-cta:hover { background: white; color: var(--golfe-700); }
.topbar nav a.nav-cta.active { border-bottom: none; padding-bottom: 0.35rem; box-shadow: 0 0 0 2px var(--golfe-clair); }

.skip-link {
    position: absolute;
    left: -999px;
    top: 0.5rem;
    background: white;
    color: var(--encre);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    z-index: 10;
    font-weight: 600;
}
.skip-link:focus { left: 0.5rem; }
a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 2px solid var(--golfe);
    outline-offset: 2px;
    border-radius: 4px;
}
.topbar a:focus-visible, .score-hero a:focus-visible, .score-hero summary:focus-visible { outline-color: var(--golfe-clair); }

.menu-toggle, .mobile-cta { display: none; }
@media (max-width: 760px) {
    .topbar { padding: 0.7rem 1rem; gap: 0.5rem; align-items: center; }
    .topbar .tagline { display: none; }
    .topbar nav { flex-wrap: nowrap; overflow-x: auto; gap: 1rem; width: 100%; scrollbar-width: none; }
    .topbar nav a { font-size: 0.85rem; }
    .topbar nav a.nav-secondary { display: none; }
    /* Avec JavaScript : menu complet derrière un bouton (audit UX, axe 5) --
       sans, la barre défilante ci-dessus reste le repli. */
    .js .topbar .left { flex: 1; min-width: 0; }
    .js .mobile-cta {
        display: inline-block;
        background: var(--gray-50);
        color: var(--encre);
        font-weight: 600;
        font-size: 0.82rem;
        padding: 0.45rem 0.85rem;
        border-radius: 999px;
        white-space: nowrap;
    }
    .js .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.4rem;
        height: 2.4rem;
        flex: none;
        border: 1px solid rgba(255, 255, 255, 0.28);
        border-radius: 999px;
        background: transparent;
        color: white;
        cursor: pointer;
    }
    .js .topbar nav, .js .topbar .lang-switch { display: none; }
    .js .topbar.menu-open nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; overflow: visible; padding-top: 0.3rem; }
    .js .topbar.menu-open nav a, .js .topbar.menu-open nav a.nav-secondary {
        display: block;
        padding: 0.8rem 0.2rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }
    .js .topbar.menu-open nav a.active { border-bottom: 1px solid rgba(255, 255, 255, 0.12); color: var(--golfe-clair); padding-bottom: 0.8rem; }
    .js .topbar.menu-open nav a.nav-cta { display: none; }
    .js .topbar.menu-open .lang-switch { display: flex; position: static; padding: 0.6rem 0.2rem 0.2rem; }
}

/* ---------- Mise en page ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 1.6rem 2rem 3rem; }
.page-detail main, .page-adresse main { max-width: 780px; }

h1 { font-size: 1.6rem; font-weight: 600; margin: 0 0 0.3rem; }
.page-liste h1 { font-size: 1.5rem; }
.subtitle { color: var(--gray-600); margin: 0 0 1.4rem; font-size: 0.95rem; }
.page-liste .subtitle { font-size: 0.92rem; }

footer {
    margin-top: 1.6rem;
    color: var(--gray-400);
    font-size: 0.8rem;
    text-align: center;
}

/* ---------- Formulaires ---------- */
form.filters, form.search {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.4rem;
    padding: 1rem 1.2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
form.search { padding: 1.2rem; }
form.filters label, form.search label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
form.filters input, form.filters select, form.search input {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: var(--f-sans);
    color: var(--gray-900);
}
form.filters input, form.filters select { min-width: 9rem; }
form.search input { padding: 0.5rem 0.7rem; width: 100%; }
/* flex-basis/flex-grow belong on the label (the actual flex item of
   form.search's row layout), not the input -- the input's own parent is
   the label, itself flex-direction:column, so sizing set directly on the
   input would size its HEIGHT (the column's main axis) instead of its
   width. Bug found 2026-09-22 via a real screenshot: the address input
   rendered ~320px tall. */
form.search label.label-adresse { min-width: 20rem; flex: 1 1 20rem; }
form.search label.label-prix, form.search label.label-surface { min-width: 7rem; }
input:focus, select:focus { outline: 2px solid var(--golfe); outline-offset: 1px; }

.btn, form.filters button, form.search button {
    padding: 0.5rem 1.1rem;
    background: var(--encre);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--f-sans);
    cursor: pointer;
}
.btn:hover, form.filters button:hover, form.search button:hover { background: var(--golfe); color: white; }
form.filters .reset { color: var(--gray-600); font-size: 0.85rem; padding-bottom: 0.55rem; }
.search-hint { color: var(--gray-600); font-size: 0.82rem; margin: -0.6rem 0 1.2rem; }

/* Sélecteur de profil (pages détail/adresse) */
form.profile-form { margin-bottom: 1.2rem; display: flex; align-items: flex-end; gap: 0.8rem; flex-wrap: wrap; }
form.profile-form label {
    font-size: 0.8rem; font-weight: 600; color: var(--gray-600);
    text-transform: uppercase; letter-spacing: 0.03em;
}
form.profile-form select {
    display: block; margin-top: 0.3rem; padding: 0.4rem 0.6rem;
    border: 1px solid var(--gray-300); border-radius: 6px;
    font-family: var(--f-sans); font-size: 0.9rem;
}

/* ---------- Liste des biens ---------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}
.page-head .subtitle { margin: 0; }
.btn-ghost {
    background: white;
    color: var(--golfe-700);
    border: 1px solid var(--gray-300);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--golfe-700); }
form.filters label.label-grow { flex: 1 1 12rem; }
form.filters label.label-grow input { width: 100%; }
form.filters input[name="score_min"] { min-width: 0; width: 7rem; }

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.1rem;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gray-600);
}
.legend .swatch {
    display: inline-block;
    width: 0.65em;
    height: 0.65em;
    border-radius: 50%;
    margin-right: 0.35rem;
    vertical-align: middle;
}
.segmented {
    display: inline-flex;
    background: var(--gray-200);
    border-radius: 8px;
    padding: 3px;
}
.segmented a {
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-600);
}
.segmented a.active { background: white; color: var(--encre); box-shadow: 0 1px 2px rgba(15, 34, 48, 0.12); }

.table-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    /* max-height + overflow (both axes) rather than overflow-x alone: a
       plain overflow-x: auto with overflow-y left at its visible default
       is computed by browsers as overflow-y: auto too, but with no
       max-height there was nothing to scroll internally -- the sticky
       column-header row had no scrollport to stick within. */
    max-height: 75vh;
    overflow: auto;
}
table { border-collapse: collapse; width: 100%; }
.table-card th, .table-card td {
    padding: 0.7rem 0.9rem;
    text-align: right;
    font-size: 0.88rem;
    white-space: nowrap;
}
.table-card th.col-bien, .table-card td.col-bien { text-align: left; }
.table-card td { border-bottom: 1px solid var(--gray-100); }
.table-card th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 2;
}
th a.sort-link { color: inherit; }
th a.sort-link:hover { color: var(--encre); }
th .sort-arrow { margin-left: 0.3rem; color: var(--gray-400); font-size: 0.9em; }
th.is-sorted { color: var(--encre); }
th.is-sorted .sort-arrow { color: var(--golfe); }

/* Ligne entière cliquable sans JS : le ::after du lien vers la fiche
   recouvre toute la ligne (le <tr> sert de bloc conteneur). */
tr.property-row { position: relative; }
tr.property-row:hover td { background: #eef3f7; }
tr.property-row:last-child td { border-bottom: none; }
a.row-link { color: var(--encre); font-weight: 600; }
a.row-link::after { content: ""; position: absolute; inset: 0; }
a.row-link:focus-visible { outline: none; }
tr.property-row:focus-within td { background: #eef3f7; }
td.col-bien .meta { display: block; font-size: 0.78rem; color: var(--gray-600); margin-top: 0.1rem; }

/* Score global : colonne collée à droite, toujours visible même quand la
   vue complète déborde horizontalement. */
.table-card .col-global {
    position: sticky;
    right: 0;
    background: white;
    box-shadow: -1px 0 0 var(--gray-200);
}
.table-card th.col-global { background: var(--gray-50); z-index: 3; }
tr.property-row:hover td.col-global { background: #eef3f7; }
.score-total {
    display: inline-block;
    min-width: 3.2rem;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    font-weight: 650;
    font-size: 1rem;
    text-align: center;
}
.score-total.score-good { background: var(--score-good); color: white; }
.score-total.score-mid { background: var(--score-mid); color: var(--encre); }
.score-total.score-low { background: var(--score-low); color: white; }

.empty {
    color: var(--gray-600);
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
}
.empty p { margin: 0.3rem 0; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1.1rem;
    font-size: 0.88rem;
}
.pagination a { font-weight: 600; }
.pagination .disabled { color: var(--gray-400); font-weight: 600; }
.pagination .page-info { color: var(--gray-600); }

.method-note { margin-top: 1.6rem; color: var(--gray-600); font-size: 0.8rem; text-align: center; }

@media (max-width: 640px) {
    main { padding: 1.2rem 1rem 2.5rem; }
    .table-card:not(.is-complete) .hide-sm { display: none; }
    .table-card th, .table-card td { padding: 0.6rem 0.55rem; }
    form.filters { padding: 0.9rem; gap: 0.7rem; }
    form.filters label { flex: 1 1 100%; }
    form.filters select, form.filters input, form.filters input[name="score_min"] { width: 100%; }
}

/* ---------- Badges de score ---------- */
.score-badge {
    display: inline-block;
    min-width: 2.4em;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
}
.score-good { background: var(--score-good-bg); color: var(--score-good-ink); }
.score-mid { background: var(--score-mid-bg); color: var(--score-mid-ink); }
.score-low { background: var(--score-low-bg); color: var(--score-low-ink); }
.score-none { background: var(--gray-100); color: var(--gray-400); }

/* ---------- Fiche bien / adresse ---------- */
.back-link { font-size: 0.85rem; font-weight: 600; display: inline-block; margin-bottom: 1rem; }

.banner {
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    font-size: 0.88rem;
    margin-bottom: 1.2rem;
}
.banner.warn { background: var(--score-mid-bg); color: var(--score-mid-ink); }
.banner.error { background: var(--score-low-bg); color: var(--score-low-ink); }
.banner strong { display: block; margin-bottom: 0.2rem; }

.fiche-head { margin-bottom: 1.2rem; }
.eyebrow {
    margin: 0 0 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--golfe);
}
.fiche-head h1, .fiche-title { font-size: 1.8rem; margin: 0 0 0.8rem; line-height: 1.2; }
.fiche-title { font-size: 1.4rem; }
.facts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.facts li {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 0.45rem 0.8rem;
    display: flex;
    flex-direction: column;
    min-width: 7.5rem;
}
.facts span { font-size: 0.72rem; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.04em; }
.facts b { font-size: 1rem; }

.score-hero {
    background: linear-gradient(135deg, var(--encre), var(--encre-700));
    color: white;
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 1.6rem 1.8rem;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 1.5rem 2rem;
    align-items: start;
}
@media (max-width: 640px) { .score-hero { grid-template-columns: 1fr; padding: 1.3rem; } }
.score-hero .hero-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-300);
    margin-bottom: 0.4rem;
}
.score-hero .global-score { font-size: 3.2rem; font-weight: 650; line-height: 1; white-space: nowrap; }
.score-hero .global-score span { font-size: 1.1rem; font-weight: 400; color: var(--gray-300); }
.hero-verdict { display: inline-block; margin-top: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.hero-verdict.score-good { color: var(--score-good-on-dark); background: none; }
.hero-verdict.score-mid { color: var(--score-mid-on-dark); background: none; }
.hero-verdict.score-low { color: var(--score-low-on-dark); background: none; }
.hero-verdict.score-none { color: var(--gray-300); background: none; }
.gauge { margin-top: 0.7rem; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.15); overflow: hidden; max-width: 16rem; }
.gauge i { display: block; height: 100%; border-radius: 999px; }
.gauge i.score-good { background: var(--score-good-on-dark); }
.gauge i.score-mid { background: var(--score-mid); }
.gauge i.score-low { background: var(--score-low-on-dark); }
.score-hero .hero-note { margin-top: 0.6rem; font-size: 0.82rem; color: var(--gray-300); }

.profile-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.profile-pills a {
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.25);
    color: var(--gray-300);
    font-size: 0.82rem;
    font-weight: 600;
}
.profile-pills a:hover { color: white; border-color: rgba(255,255,255,0.6); }
.profile-pills a.active { background: white; color: var(--encre); border-color: white; }
details.method { margin-top: 1rem; font-size: 0.82rem; color: var(--gray-300); }
details.method summary { cursor: pointer; color: white; font-weight: 600; }
details.method p { margin: 0.5rem 0 0; line-height: 1.5; }

.synthese {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 640px) { .synthese { grid-template-columns: 1fr; } }
.synthese .card { margin-bottom: 0; }
.section-title { font-size: 0.85rem; font-weight: 600; margin: 0 0 0.8rem; }
.section-heading { font-size: 1.1rem; margin: 1.8rem 0 0.8rem; }
.muted { color: var(--gray-600); font-size: 0.82rem; margin: 0.6rem 0 0; }

ul.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
ul.bars a {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr) 2.2rem;
    align-items: center;
    gap: 0.6rem;
    color: var(--gray-900);
    font-size: 0.84rem;
    padding: 0.15rem 0;
}
ul.bars a:hover .bar-label { color: var(--golfe); }
.bar { height: 8px; border-radius: 999px; background: var(--gray-100); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; }
.bar i.score-good { background: var(--score-good); }
.bar i.score-mid { background: var(--score-mid); }
.bar i.score-low { background: var(--score-low); }
.bar-value { text-align: right; font-weight: 600; }

.highlights { display: grid; gap: 1rem; align-content: start; }
/* Pas de barre latérale colorée (charte) : le titre porte la couleur. */
.highlight.good h2, .highlight.good h3 { color: var(--score-good-ink); }
.highlight.low h2, .highlight.low h3 { color: var(--score-low-ink); }
.highlight ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.88rem; }
.highlight li { display: flex; justify-content: space-between; gap: 0.5rem; }
.highlight li a { color: var(--gray-900); }
.highlight li a:hover { color: var(--golfe); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    padding: 1.1rem 1.3rem;
    margin-bottom: 1rem;
}
.grid .card { margin-bottom: 0; scroll-margin-top: 1rem; }
.grid .card:target { outline: 2px solid var(--golfe); }
.card.full { grid-column: 1 / -1; }
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
}
.card-head h2 { font-size: 0.9rem; font-weight: 600; margin: 0; color: var(--gray-900); }
dl { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0.5rem 1rem; margin: 0; }
dt { color: var(--gray-600); font-size: 0.84rem; }
dd { margin: 0; text-align: right; font-weight: 600; font-size: 0.84rem; }
dd.formula { grid-column: 1 / -1; text-align: left; font-weight: 400; color: var(--gray-600); font-size: 0.8rem; margin-top: -0.3rem; }

.dpe { display: inline-block; min-width: 1.8rem; padding: 0.1rem 0.4rem; border-radius: 4px; color: white; text-align: center; font-weight: 650; }
.dpe-a { background: #009a5c; } .dpe-b { background: #4db848; } .dpe-c { background: #a5c93a; color: var(--gray-900); }
.dpe-d { background: #f2e500; color: var(--gray-900); } .dpe-e { background: #f5b21b; color: var(--gray-900); }
.dpe-f { background: #ec6f20; } .dpe-g { background: #d7221f; }

label .optional { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--gray-400); }
button:disabled { opacity: 0.7; cursor: progress; }

/* ---------- Page présentation ---------- */
.page-presentation { line-height: 1.55; }
.page-presentation main { max-width: 1000px; padding: 3.5rem 2rem 2rem; }
.page-presentation footer { padding: 0 2rem 2rem; }

.page-hero {
    /* pas d'overflow: hidden -- la liste de suggestions d'adresse dépasse du bandeau */
    position: relative;
    background: var(--encre);
    color: white;
    padding: 4.5rem 2rem;
}
.page-hero .isobathes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 3rem;
    align-items: center;
}
.page-hero .eyebrow { color: var(--golfe-clair); }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 1.1rem; font-stretch: 120%; }
.page-hero p { font-size: 1.08rem; color: var(--gray-300); margin: 0 0 1.8rem; max-width: 36rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.cta {
    display: inline-block;
    background: var(--gray-50);
    color: var(--encre);
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-size: 0.95rem;
}
.cta:hover { background: white; color: var(--golfe-700); }
.cta-secondary { background: transparent; color: white; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4); }
.cta-secondary:hover { background: rgba(255,255,255,0.08); color: white; }

.hero-preview {
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease;
    margin: 0;
    background: white;
    color: var(--gray-900);
    border-radius: 16px;
    padding: 1.4rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    transform: rotate(1.2deg);
}
.preview-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.preview-eyebrow { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--golfe); }
.preview-title { font-weight: 600; }
.preview-score {
    background: var(--score-good);
    color: white;
    font-weight: 650;
    font-size: 1.5rem;
    padding: 0.35rem 0.7rem;
    border-radius: 10px;
}
.preview-score span { font-size: 0.8rem; font-weight: 500; opacity: 0.85; }
.preview-row {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr) 2rem;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.84rem;
}
.hero-preview:hover { transform: rotate(0deg); color: var(--gray-900); }
.preview-eyebrow, .preview-title, .preview-caption { display: block; }
.preview-bars { display: grid; gap: 0.35rem; }
.preview-score.score-mid { background: var(--score-mid); color: var(--encre); }
.preview-score.score-low { background: var(--score-low); }
.preview-caption { margin-top: 1rem; font-size: 0.78rem; color: var(--golfe); }

.sources-strip {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.sources-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-400); }
.sources-strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; justify-content: center; }
.sources-strip li { font-size: 0.88rem; font-weight: 600; color: var(--gray-600); }
.sources-row { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
/* Chiffres lus en base (main._landing_figures) : la preuve chiffrée sous l'écran d'accueil */
.sources-strip ul.figures { gap: 0.4rem 2.4rem; }
.sources-strip .figures li { font-weight: 400; font-size: 0.92rem; }
.figures b { font-size: 1.4rem; font-stretch: 116%; font-weight: 620; color: var(--encre); margin-right: 0.2rem; }

.page-presentation main section { margin-bottom: 3.5rem; }
.page-presentation main section h2 { font-size: 1.6rem; font-weight: 600; margin: 0 0 1.2rem; color: var(--encre); letter-spacing: -0.01em; }
.lead { color: var(--gray-600); font-size: 1.02rem; margin: -0.4rem 0 1.4rem; max-width: 42rem; }

ol.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
ol.steps li { background: white; border: 1px solid var(--gray-200); border-radius: 14px; padding: 1.4rem; }
.step-num {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--encre);
    color: var(--golfe-clair);
    font-weight: 650;
}
ol.steps h3 { font-size: 1.02rem; margin: 0.8rem 0 0.4rem; }
ol.steps p { margin: 0; color: var(--gray-600); font-size: 0.9rem; }

.problem-grid, .promise-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.problem-grid { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.problem-grid li {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}
.problem-grid li b { display: block; color: var(--gray-900); font-size: 0.98rem; }
.promise-grid { grid-template-columns: 1fr 1fr; }
.promise-grid li {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    font-size: 0.94rem;
    color: var(--gray-600);
}
.promise-grid strong { display: block; color: var(--gray-900); margin-bottom: 0.2rem; }

table.compare {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
}
table.compare th, table.compare td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--gray-100); }
table.compare th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
table.compare td:first-child { font-weight: 600; }

.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.status-card { background: white; border: 1px solid var(--gray-200); border-radius: 14px; padding: 1.4rem; text-align: center; }
.status-card .stat { font-size: 2.2rem; font-weight: 650; color: var(--encre); line-height: 1.1; }
.status-card .label { font-size: 0.85rem; color: var(--gray-600); margin-top: 0.3rem; }
.snapshot-date { font-size: 0.78rem; color: var(--gray-400); margin: 0.6rem 0 0; text-align: right; }

.honesty-note {
    background: var(--score-mid-bg);
    color: var(--score-mid-ink);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
}
.honesty-note strong { display: block; margin-bottom: 0.3rem; }

.final-cta {
    text-align: center;
    background: var(--encre);
    color: white;
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
}
.page-presentation .final-cta h2 { color: white; font-size: 1.4rem; }
.final-cta .hero-search { margin: 1.3rem auto 0; max-width: 34rem; text-align: left; }

/* ---------- Champ d'adresse + suggestions BAN (static/adresse.js) ---------- */
.hero-search { margin: 0 0 1.1rem; max-width: 36rem; }
.ac-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: white;
    border-radius: 999px;
    padding: 0.35rem 0.35rem 0.35rem 1.1rem;
    box-shadow: 0 0 0 1px var(--gray-300);
}
.ac-field:focus-within { box-shadow: 0 0 0 3px var(--golfe-clair); }
.ac-icon { color: var(--gray-600); flex: none; }
.ac-field input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font-family: var(--f-sans);
    font-size: 1rem;
    color: var(--encre);
    padding: 0.6rem 0;
}
.ac-field input:focus { outline: none; }
.ac-field button {
    flex: none;
    background: var(--golfe);
    color: white;
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1.3rem;
    font-family: var(--f-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}
.ac-field button:hover { background: var(--golfe-700); }
form.search { position: relative; }
.ac-list {
    position: absolute;
    z-index: 30;
    margin: 0;
    padding: 0.3rem;
    list-style: none;
    background: white;
    color: var(--encre);
    border-radius: 12px;
    box-shadow: 0 0 0 1px var(--gray-300), 0 14px 32px rgba(15, 34, 48, 0.18);
    max-height: 18rem;
    overflow: auto;
    text-align: left;
}
.ac-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.55rem 0.7rem; border-radius: 8px; cursor: pointer; font-size: 0.92rem; }
.ac-list li[aria-selected="true"], .ac-list li:hover { background: var(--golfe-bg); }
.ac-type { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-600); flex: none; }
.ac-list .ac-empty { color: var(--gray-600); cursor: default; }
.page-hero .hero-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin: 0; font-size: 0.95rem; }
.hero-links a { color: white; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 4px; }
.hero-links a:first-child { color: var(--golfe-clair); text-decoration-color: currentColor; font-weight: 600; }

@media (max-width: 760px) {
    .page-hero { padding: 3rem 1.2rem; }
    .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
    .page-hero h1 { font-size: 1.8rem; }
    .hero-preview { transform: none; }
    .page-presentation main { padding: 2.5rem 1.2rem 1.5rem; }
    ol.steps, .promise-grid, .status-grid { grid-template-columns: 1fr; }
}
.swatch.good { background: var(--score-good); }
.swatch.mid { background: var(--score-mid); }
.swatch.low { background: var(--score-low); }
@media (max-width: 640px) {
    form.search label.label-adresse { min-width: 0; flex-basis: 100%; }
    form.search label.label-prix, form.search label.label-surface { flex: 1 1 8rem; }
}

/* ---------- Carte prix x transports ---------- */
/* Façon Google Maps : la carte occupe tout l'écran sous la barre de
   navigation ; recherche et panneau d'analyse flottent par-dessus. */
.page-carte main { max-width: none; padding: 0; }
.carte-layout {
    position: relative;
    height: calc(100vh - 58px);
    min-height: 520px;
}
.carte-map { position: absolute; inset: 0; background: #e6ecea; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.map-search {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 380px;
    z-index: 1000;
}
.map-search input {
    width: 100%;
    height: 48px;
    padding: 0 1rem 0 2.6rem;
    border: none;
    border-radius: 24px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18), 0 1px 10px rgba(0, 0, 0, 0.08);
    font: inherit;
    font-size: 0.95rem;
    color: var(--gray-900);
}
.map-search input:focus { outline: 2px solid var(--golfe); outline-offset: 0; }
.map-search-icon { position: absolute; left: 1rem; top: 16px; color: var(--gray-600); pointer-events: none; }
.map-search-results {
    list-style: none;
    margin: 6px 0 0;
    padding: 6px 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    max-height: 320px;
    overflow-y: auto;
}
.map-search-results li { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.55rem 1rem; font-size: 0.88rem; cursor: pointer; }
.map-search-results li[aria-selected="true"], .map-search-results li:hover { background: var(--gray-100); }
.sr-type { color: var(--gray-400); font-size: 0.78rem; flex: none; }
.sr-empty { color: var(--gray-600); cursor: default; }

.carte-panel {
    position: absolute;
    top: 72px;
    left: 12px;
    bottom: 12px;
    width: 380px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18), 0 1px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
.carte-panel.collapsed { bottom: auto; }
.carte-panel.collapsed .panel-body { display: none; }
.panel-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1.1rem;
    border: none;
    border-bottom: 1px solid var(--gray-200);
    background: white;
    font: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--encre);
    cursor: pointer;
}
.panel-toggle .chevron { transition: transform 0.15s; }
.panel-toggle[aria-expanded="false"] .chevron { transform: rotate(-90deg); }
.panel-body { padding: 1.1rem 1.2rem 1.3rem; overflow-y: auto; }
.carte-panel h1 { font-size: 1.4rem; margin: 0 0 0.5rem; }
.carte-intro { font-size: 0.86rem; color: var(--gray-600); margin: 0 0 1rem; line-height: 1.5; }
.kpi {
    background: var(--encre);
    color: white;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
}
.kpi-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-300); }
.kpi-value { font-size: 2rem; font-weight: 650; line-height: 1.15; }
.kpi-value.pos { color: var(--score-good-on-dark); }
.kpi-value.neg { color: var(--score-low-on-dark); }
.kpi-note { font-size: 0.76rem; color: var(--gray-300); margin-top: 0.2rem; }
.control { margin-bottom: 0.9rem; }
.control-label { display: block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-600); margin-bottom: 0.35rem; }
.segmented button {
    border: none;
    background: transparent;
    font: inherit;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
}
.segmented button.active { background: white; color: var(--encre); box-shadow: 0 1px 2px rgba(15, 34, 48, 0.12); }
.legend-box { border-top: 1px solid var(--gray-200); padding-top: 0.9rem; margin-top: 0.4rem; font-size: 0.82rem; }
.legend-title { font-weight: 600; margin-bottom: 0.45rem; }
.legend-title-gap { margin-top: 0.8rem; }
.legend-row { display: flex; align-items: center; gap: 0.5rem; color: var(--gray-900); padding: 0.12rem 0; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1.5px white, 0 0 0 2.5px var(--gray-200); flex: none; }
.legend-nodata { background: white; box-shadow: none; border: 2px dashed var(--gray-400); }
.legend-foot { color: var(--gray-600); margin-top: 0.4rem; font-size: 0.78rem; }
.carte-status { font-size: 0.8rem; color: var(--gray-600); min-height: 1.2em; margin: 0.8rem 0 0; }
details.carte-method { color: var(--gray-600); }
details.carte-method summary { color: var(--golfe-700); }
.zoom-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 800;
    margin: 0;
    background: rgba(15, 34, 48, 0.88);
    color: white;
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    pointer-events: none;
    white-space: nowrap;
}
.carte-table { max-width: 1180px; margin: 1.2rem auto 2rem; padding: 0 2rem; }
.carte-table summary { cursor: pointer; font-weight: 600; color: var(--golfe-700); margin-bottom: 0.8rem; }

/* Leaflet : contrôles arrondis et ombrés, comme Google Maps */
.leaflet-tooltip, .leaflet-popup-content { font-family: inherit; font-size: 0.82rem; line-height: 1.45; }
.leaflet-tooltip .mode-icon { margin-right: 0.25rem; }
.tt-mode { color: var(--gray-600); font-size: 0.75rem; }
.leaflet-bar { border: none !important; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important; border-radius: 8px !important; overflow: hidden; }
.leaflet-bar a { width: 36px !important; height: 36px !important; line-height: 36px !important; font-size: 18px !important; color: var(--gray-600) !important; }
.leaflet-control-layers { border: none !important; border-radius: 10px !important; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important; font-family: inherit; font-size: 0.82rem; }
.leaflet-control-layers-expanded { padding: 0.5rem 0.75rem !important; }
.page-carte .leaflet-bottom.leaflet-left { left: 404px; }
.stop-pin { background: none; border: none; }
.stop-pin .mode-icon { box-shadow: 0 0 0 2px white, 0 1px 4px rgba(0, 0, 0, 0.35); }
.search-pin span {
    display: block;
    width: 26px;
    height: 26px;
    background: var(--golfe);
    border: 2px solid white;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

@media (max-width: 760px) {
    .carte-layout { height: auto; min-height: 0; }
    .carte-map { position: relative; inset: auto; height: 62vh; }
    .map-search { left: 10px; right: 10px; width: auto; }
    .carte-panel { position: static; width: auto; box-shadow: none; border-radius: 0; border-top: 1px solid var(--gray-200); }
    .page-carte .leaflet-bottom.leaflet-left { left: 0; }
    .zoom-hint { bottom: auto; top: 70px; white-space: normal; text-align: center; width: max-content; max-width: 80%; }
    .carte-table { padding: 0 1rem; }
}

/* Prime médiane par mode : barres divergentes autour de 0, cliquables */
.mode-chart { display: grid; gap: 2px; }
.mode-row {
    display: grid;
    grid-template-columns: 5.4rem minmax(0, 1fr) 3.3rem 4.4rem;
    white-space: nowrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.35rem 0.45rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: none;
    font: inherit;
    font-size: 0.8rem;
    color: var(--gray-900);
    text-align: left;
    cursor: pointer;
}
.mode-row:hover { background: var(--gray-50); }
.mode-row.active { background: var(--golfe-bg); border-color: #a9c8e2; }
.mode-name { font-weight: 600; }
.mode-bar { position: relative; height: 10px; }
.mode-bar { background: var(--gray-100); border-radius: 3px; }
.mode-bar::before { content: ""; position: absolute; left: 0; top: -3px; bottom: -3px; width: 1px; background: var(--gray-300); }
.mode-chart.diverging .mode-bar::before { left: 50%; }
.mode-bar i { position: absolute; top: 0; height: 100%; border-radius: 3px; }
.mode-bar i.pos { background: var(--golfe); }
.mode-bar i.neg { background: var(--score-low); }
.mode-val { text-align: right; font-weight: 600; }
.mode-n { text-align: right; color: var(--gray-600); font-size: 0.74rem; }
.mode-chart-note { font-size: 0.74rem; color: var(--gray-600); margin: 0.35rem 0 0; }

/* Modes de transport : badge pictogramme (src/webapp/mode_styles.py) */
.mode-icon {
    display: inline-grid;
    place-items: center;
    border-radius: 5px;
    flex: none;
    vertical-align: middle;
}
.best-mode { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.7rem; font-size: 0.88rem; }
ul.mode-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
ul.mode-list li {
    display: grid;
    grid-template-columns: auto 1fr auto 2.4rem;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.84rem;
    color: var(--gray-600);
}
ul.mode-list b { color: var(--gray-900); text-align: right; }
ul.mode-list small { color: var(--gray-400); text-align: right; }
.card-note { font-size: 0.76rem; color: var(--gray-600); margin: 0.7rem 0 0; }

/* Sélecteur de langue FR / EN (base.html) */
.lang-switch { display: inline-flex; gap: 0.15rem; white-space: nowrap; margin-left: 0.2rem; }
.lang-switch a { padding: 0.15rem 0.3rem; font-size: 0.8rem; font-weight: 600; color: var(--gray-400); }
.lang-switch a:hover { color: white; }
.lang-switch a.active { color: white; border-bottom: 2px solid var(--golfe-clair); }
@media (max-width: 760px) {
    /* Toujours visible : la nav défile horizontalement sur mobile. */
    .topbar { position: relative; }
    .lang-switch { position: absolute; top: 0.85rem; right: 1rem; }
}

/* ---------- Export PDF + offres ---------- */
.pdf-export { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin-top: 0.9rem; }
.page-head .pdf-export { margin-top: 0; justify-content: flex-end; }
.btn-pdf { display: inline-flex; align-items: center; gap: 0.4rem; }
.btn-pdf.is-exhausted { color: var(--gray-600); }
.pdf-quota { font-size: 0.78rem; color: var(--gray-600); }

.quota-card {
    max-width: 560px;
    margin: 2rem auto;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 1.8rem;
}
.quota-card h1 { font-size: 1.5rem; }
.quota-card p { color: var(--gray-600); line-height: 1.55; }
.quota-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }

.usage-note { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 0.8rem 1rem; font-size: 0.9rem; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.2rem; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan-card {
    position: relative;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 1.4rem;
}
.plan-card.is-current { border: 2px solid var(--golfe); }
.plan-card h2 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.plan-limit { margin: 0 0 0.8rem; color: var(--gray-600); }
.plan-limit b { font-size: 1.8rem; color: var(--encre); margin-right: 0.2rem; }
.plan-card ul { margin: 0; padding-left: 1.1rem; color: var(--gray-600); font-size: 0.88rem; line-height: 1.6; }
.plan-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--golfe);
    color: white;
}
.plan-badge.plan-soon { background: var(--gray-200); color: var(--gray-600); }

/* ---------- Accueil : onglets de profil, offres, FAQ (audit UX P2) ---------- */
.profiles .tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.2rem 0 1rem; }
.profiles [role="tab"] {
    font-family: var(--f-sans);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--encre);
    cursor: pointer;
}
.profiles [role="tab"][aria-selected="true"] { background: var(--encre); border-color: var(--encre); color: white; }
.profile-panel {
    display: flex;
    gap: 1.4rem;
    align-items: center;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.3rem 1.5rem;
}
.profile-panel[hidden] { display: none; }
/* Sans JavaScript, tous les profils restent lisibles les uns sous les autres */
.no-js .profile-panel[hidden] { display: flex; margin-top: 0.8rem; }
.profile-score { font-size: 2.6rem; font-stretch: 118%; font-weight: 640; letter-spacing: -0.02em; line-height: 1; padding: 0.6rem 0.9rem; border-radius: 12px; flex: none; }
.profile-score small { font-size: 0.95rem; font-weight: 500; opacity: 0.8; }
.profile-panel p { margin: 0 0 0.35rem; color: var(--gray-600); }
.profile-panel .profile-name { color: var(--encre); font-weight: 600; }
.profile-panel b { color: var(--encre); font-weight: 600; }
.offers-teaser .teaser-plans { list-style: none; margin: 1.1rem 0 0.8rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.teaser-plans li { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.2rem; display: grid; gap: 0.2rem; }
.teaser-plans b { font-stretch: 112%; font-weight: 620; font-size: 1.05rem; }
.teaser-plans span { color: var(--gray-600); font-size: 0.92rem; }
.teaser-plans em { font-style: normal; font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-600); }
.offers-teaser .more, .final-links a { font-weight: 600; }
.faq details { background: white; border-radius: 12px; box-shadow: var(--shadow); margin-top: 0.6rem; }
.faq summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); color: var(--golfe); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 1.2rem 1.1rem; color: var(--gray-600); }
.final-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.6rem; margin: 1.1rem 0 0; font-size: 0.95rem; }
.final-links a { color: var(--golfe-clair); }
.plan-cta { margin-top: 0.8rem; display: inline-block; }
@media (max-width: 760px) {
    .profile-panel { flex-direction: column; align-items: flex-start; }
    .offers-teaser .teaser-plans { grid-template-columns: 1fr; }
}

/* ---------- En-tête fixe au défilement (audit UX, axe 10) ---------- */
.topbar { position: sticky; top: 0; z-index: 40; }

/* ---------- Pied de page commun ---------- */
.site-footer { background: var(--encre); color: var(--gray-300); margin-top: 3rem; padding: 2.6rem 2rem 1.6rem; }
.page-carte .site-footer { margin-top: 0; }
.sf-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.sf-logo { color: white; font-stretch: 118%; font-weight: 620; font-size: 1.2rem; }
.sf-brand p { margin: 0.4rem 0 0; font-size: 0.88rem; color: var(--gray-400); }
.sf-links { display: flex; flex-wrap: wrap; gap: 1.6rem 3.5rem; }
.sf-links div { display: grid; gap: 0.45rem; align-content: start; }
.sf-links h2 { font-family: var(--f-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray-400); margin: 0 0 0.2rem; }
.sf-links a, .sf-links .link-button { color: var(--gray-50); font-size: 0.9rem; }
.sf-links a:hover { color: var(--golfe-clair); }
.sf-note { max-width: 1100px; margin: 2rem auto 0; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.78rem; color: var(--gray-400); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--golfe); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Pages légales ---------- */
.legal { max-width: 46rem; }
.legal h2 { font-size: 1.15rem; margin: 1.8rem 0 0.5rem; }
.legal p, .legal li { color: var(--gray-600); line-height: 1.6; }
.legal li { margin-bottom: 0.4rem; }
.legal li b { color: var(--encre); font-family: var(--f-mono); font-weight: 500; font-size: 0.88em; }
.to-fill { font-family: var(--f-mono); font-size: 0.85em; background: var(--score-mid-bg); color: var(--score-mid-ink); padding: 0.1rem 0.4rem; border-radius: 4px; }

/* ---------- Bandeau de consentement (Google Analytics) ---------- */
.consent-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    max-width: 44rem;
    margin: 0 auto;
    background: white;
    color: var(--encre);
    border-radius: 14px;
    box-shadow: 0 0 0 1px var(--gray-300), 0 18px 40px rgba(15, 34, 48, 0.22);
    padding: 1.1rem 1.3rem;
    display: flex;
    gap: 1rem 1.4rem;
    align-items: center;
    flex-wrap: wrap;
}
.consent-banner[hidden] { display: none; }
.consent-banner p { margin: 0; flex: 1 1 22rem; font-size: 0.9rem; color: var(--gray-600); }
.consent-actions { display: flex; gap: 0.6rem; }
/* Refuser aussi visible qu'Accepter (CNIL) : même taille, même graisse */
.consent-actions .btn { min-width: 7.5rem; justify-content: center; text-align: center; }
