/* =====================================================================
   Veille Animale — feuille de style
   ===================================================================== */
:root {
    --paper: #f6f3ea;
    --paper-2: #efeadd;
    --card: #fffdf7;
    --ink: #1d221e;
    --ink-2: #4a514b;
    --ink-3: #737a72;
    --line: #ddd6c4;
    --brand: #1f5d3a;
    --brand-2: #2f7a4f;
    --accent: #c4552b;
    --pos: #2e7d4a;
    --pos-soft: #dcebdc;
    --neg: #b8452c;
    --neg-soft: #f4ddd3;
    --mid: #a69f8c;
    --cat-tf: #1f6e3f;
    --cat-f: #6ea65a;
    --cat-m: #c9c1a8;
    --cat-d: #df8a52;
    --cat-td: #b23b26;
    --cat-n: #e4dfd1;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(29, 34, 30, .06), 0 4px 16px rgba(29, 34, 30, .05);
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --paper: #151a17; --paper-2: #1b211d; --card: #1f2621; --ink: #ece8dc; --ink-2: #c3c0b4; --ink-3: #959a90;
        --line: #343c36; --brand: #7cc497; --brand-2: #96d4ad; --accent: #e8875d;
        --pos: #7cc497; --pos-soft: #213a2a; --neg: #ef8a6c; --neg-soft: #432820; --mid: #8d8878;
        --cat-tf: #4fae73; --cat-f: #8fc27c; --cat-m: #7d7867; --cat-d: #e2925f; --cat-td: #d75a42; --cat-n: #3a403a;
        --shadow: 0 1px 2px rgba(0,0,0,.3);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.7rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code, pre { font: .9em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre { background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; padding: .8em 1em; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
mark { background: #f5d77a; color: #1d221e; padding: 0 .1em; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--card); padding: .5rem 1rem; z-index: 10; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.section { padding-top: 2rem; padding-bottom: 2rem; }

/* ---------- En-tête ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand-mark { color: var(--brand); display: flex; }
.brand-name { display: block; font: 700 1.15rem/1.1 var(--serif); }
.brand-sub { display: block; font-size: .78rem; color: var(--ink-3); }
.nav { display: flex; gap: .2rem; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; padding: .45rem .75rem; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--brand); color: var(--paper); }
.nav a.nav-sec { color: var(--ink-3); }
.nav-toggle { display: none; }
@media (max-width: 860px) {
    .nav-toggle { display: block; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: .4rem .9rem; font: inherit; }
    .nav { display: none; width: 100%; flex-direction: column; padding-bottom: .8rem; }
    .nav.open { display: flex; }
}

/* ---------- Accueil ---------- */
.hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(47,122,79,.18), transparent 60%), var(--paper); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; gap: 2rem; padding-top: 3rem; padding-bottom: 3rem; align-items: center; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.5fr 1fr; } }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--accent); margin-bottom: .8rem; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 46ch; }
.lead-court { color: var(--ink-2); max-width: 70ch; }
.search { display: flex; gap: .5rem; max-width: 520px; margin-top: 1.5rem; }
.search input { flex: 1; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0; }
.stats > div { background: var(--card); padding: 1rem 1.2rem; }
.stats dt { font-size: .8rem; color: var(--ink-3); }
.stats dd { margin: .2rem 0 0; font: 700 2rem/1.1 var(--serif); }
.stats dd.small { font-size: 1.2rem; }
.stats-profil { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 1.5rem; }

.repartition { display: flex; height: 44px; border-radius: 8px; overflow: hidden; gap: 2px; }
.repartition.petite { height: 22px; font-size: .75rem; }
.repartition .seg { display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; font-weight: 700; min-width: 0; flex-basis: 0; }
.repartition .seg span { overflow: hidden; padding: 0 .2rem; }
.repartition .seg:hover { filter: brightness(1.08); }
.legende { list-style: none; padding: 0; margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .9rem; }
.legende a { color: var(--ink-2); text-decoration: none; }
.legende i { display: inline-block; width: .8em; height: .8em; border-radius: 3px; margin-right: .4em; vertical-align: -.05em; }
.cat-tf { background: var(--cat-tf); } .cat-f { background: var(--cat-f); } .cat-m { background: var(--cat-m); color: var(--ink) !important; }
.cat-d { background: var(--cat-d); } .cat-td { background: var(--cat-td); } .cat-n { background: var(--cat-n); color: var(--ink-2) !important; }

.deux-col { display: grid; gap: 2rem; }
@media (min-width: 900px) { .deux-col { grid-template-columns: 1fr 1fr; } }
.titre-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }

.liste-deputes { list-style: none; margin: 0; padding: 0; counter-reset: rang; }
.liste-deputes li { counter-increment: rang; }
.liste-deputes a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .6rem .4rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.liste-deputes a:hover { background: var(--card); }
.ld-nom { font-weight: 600; line-height: 1.3; }
.ld-nom small { display: block; font-weight: 400; color: var(--ink-3); font-size: .82rem; }
.ld-score { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; min-width: 96px; }
.ld-score b { font: 700 1.1rem var(--serif); }

.cartes { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.carte-texte { display: flex; flex-direction: column; gap: .5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.carte-texte:hover { border-color: var(--brand); color: var(--ink); }
.carte-texte strong { font-weight: 600; line-height: 1.35; }
.encart { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; margin: 2rem auto 3rem; max-width: 1104px; }

/* ---------- Composants ---------- */
.meta { font-size: .85rem; color: var(--ink-3); margin-bottom: .3rem; }
.type { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .1rem .5rem; border-radius: 4px; background: var(--paper-2); color: var(--ink-2); margin-right: .3rem; }
.type-scrutin { background: #e3e9f6; color: #2c4a86; }
.type-amendement { background: #f3e6d4; color: #7a4b12; }
.type-proposition { background: #e2efe5; color: #22603a; }
.type-question { background: #ece3f2; color: #5c3a7a; }
@media (prefers-color-scheme: dark) {
    .type-scrutin { background: #26324a; color: #b4c6ef; } .type-amendement { background: #3d3020; color: #ecc890; }
    .type-proposition { background: #213a2a; color: #9fd8b2; } .type-question { background: #33283d; color: #d4bdea; }
}
.sens { font-size: .85rem; font-weight: 600; }
.sens-favorable { color: var(--pos); } .sens-defavorable { color: var(--neg); }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #fff; white-space: nowrap; }
.groupe { display: inline-flex; align-items: center; gap: .35em; font-size: .85rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.groupe i { width: .7em; height: .7em; border-radius: 50%; display: inline-block; }
.g-abr { display: inline-block; font-size: .7rem; font-weight: 700; padding: 0 .4em; border-radius: 3px; border-left: 3px solid var(--gc, #8a8577); background: var(--paper-2); color: var(--ink-2); }
.compteur { display: inline-block; font: 600 .8rem var(--sans); background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); border-radius: 999px; padding: .05rem .55rem; vertical-align: middle; }
.vide { color: var(--ink-3); font-style: italic; }
.aide { color: var(--ink-3); font-size: .9rem; }
.note { background: var(--paper-2); border-left: 4px solid var(--mid); padding: .7rem 1rem; border-radius: 4px; }
.fil { font-size: .9rem; margin-bottom: 1rem; }
.pos-txt { color: var(--pos); } .neg-txt { color: var(--neg); }
.nowrap { white-space: nowrap; }
.sep { color: var(--ink-3); }

.avatar { --size: 44px; position: relative; flex: none; width: var(--size); height: var(--size); border-radius: 50%; overflow: hidden; background: var(--paper-2); box-shadow: 0 0 0 2px var(--gc, var(--line)); display: inline-block; }
.avatar::before { content: attr(data-initiales); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 calc(var(--size) * .36) var(--serif); color: var(--ink-2); }
.avatar img { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { --size: 34px; } .avatar.xl { --size: 112px; box-shadow: 0 0 0 4px var(--gc, var(--line)); }

.jauge { position: relative; display: block; width: 96px; height: 8px; border-radius: 4px; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; }
.jauge-xl { width: 100%; max-width: 280px; height: 14px; border-radius: 7px; }
.jauge-axe { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--ink-3); opacity: .5; }
.jauge-val { position: absolute; top: 0; bottom: 0; }
.jauge-val.pos { background: var(--pos); } .jauge-val.neg { background: var(--neg); } .jauge-val.mid { background: var(--mid); }
.jauge-vide { background: repeating-linear-gradient(45deg, var(--paper-2) 0 4px, transparent 4px 8px); }

button, .bouton { display: inline-flex; align-items: center; gap: .4rem; font: 600 .95rem var(--sans); padding: .6rem 1.1rem; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: var(--paper); cursor: pointer; text-decoration: none; }
button:hover, .bouton:hover { background: var(--brand-2); color: var(--paper); }
button.sec, .bouton-sec { background: transparent; color: var(--brand); }
button.sec:hover, .bouton-sec:hover { background: var(--paper-2); color: var(--brand); }
button.danger { background: transparent; color: var(--neg); border-color: var(--neg); }
button.danger:hover { background: var(--neg-soft); color: var(--neg); }
button.ok { background: var(--pos); border-color: var(--pos); }
button.petit { padding: .3rem .7rem; font-size: .85rem; }
button.lien { background: none; border: none; color: var(--ink-3); padding: 0 .2rem; font-weight: 500; font-size: .8rem; }
button.lien:hover { color: var(--accent); background: none; }
input[type=search], input[type=text], input[type=email], input[type=password], select, textarea {
    font: inherit; font-weight: 400; font-size: .95rem; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .75rem; width: 100%;
}
textarea { resize: vertical; }
.search input { padding: .75rem 1rem; font-size: 1.05rem; }
.search button { padding: .75rem 1.3rem; }

.filtres { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 1.2rem 0; }
.champ { display: flex; flex-direction: column; gap: .25rem; flex: 1 1 160px; min-width: 0; }
.champ-large { flex: 2 1 240px; }
.champ-bouton { flex: 0 0 auto; flex-direction: row; align-items: center; gap: .8rem; }
.champ label { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.lien-discret { font-size: .9rem; color: var(--ink-3); }
.compte { font-size: .9rem; color: var(--ink-3); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.tableau { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tableau th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; padding: .7rem .8rem; border-bottom: 1px solid var(--line); background: var(--paper-2); white-space: nowrap; }
.tableau td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: none; }
.tableau tbody tr:hover { background: var(--paper-2); }
.tableau .num { text-align: right; font-variant-numeric: tabular-nums; }
.cellule-depute { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); min-width: 220px; }
.cellule-depute small { display: block; color: var(--ink-3); font-size: .8rem; }
.indice-cell { display: inline-flex; align-items: center; gap: .6rem; justify-content: flex-end; }
.indice-cell b { font-family: var(--serif); min-width: 2.6em; text-align: right; }

.pagination { display: flex; gap: 1rem; justify-content: center; align-items: center; margin: 2rem 0; }

/* ---------- Fiche député ---------- */
.profil { display: grid; gap: 1.5rem; align-items: center; grid-template-columns: auto 1fr; }
@media (min-width: 820px) { .profil { grid-template-columns: auto 1fr auto; } }
.profil-id h1 { margin-bottom: .3rem; }
.profil-id p { margin: 0 0 .3rem; color: var(--ink-2); }
.profil-score { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; min-width: 260px; }
@media (min-width: 820px) { .profil-score { grid-column: auto; } }
.profil-indice { font: 700 3rem/1 var(--serif); }
.echelle { display: flex; justify-content: space-between; width: 100%; max-width: 280px; font-size: .72rem; color: var(--ink-3); }

.actions { list-style: none; margin: 0; padding: 0; }
.action { display: grid; grid-template-columns: 112px 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.action a { color: var(--ink); font-weight: 500; }
.action a:hover { color: var(--accent); }
.action-effet { align-self: start; text-align: center; font-size: .78rem; font-weight: 700; padding: .3rem .4rem; border-radius: 6px; background: var(--paper-2); color: var(--ink-2); }
.effet-favorable .action-effet { background: var(--pos-soft); color: var(--pos); }
.effet-defavorable .action-effet { background: var(--neg-soft); color: var(--neg); }
@media (max-width: 560px) { .action { grid-template-columns: 1fr; gap: .4rem; } .action-effet { justify-self: start; } }
.justif { font-size: .9rem; color: var(--ink-2); margin: .3rem 0 0; border-left: 3px solid var(--line); padding-left: .7rem; }
.justif-inline { color: var(--ink-3); font-size: .9rem; margin-left: .4rem; }
.absences { margin-top: 1.5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1.1rem; }
.absences summary { cursor: pointer; font-weight: 600; }
.liste-simple { padding-left: 1.2rem; font-size: .9rem; }

/* ---------- Textes ---------- */
.liste-textes { list-style: none; padding: 0; margin: 0; }
.liste-textes li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.liste-textes .titre { display: block; color: var(--ink); font-weight: 600; font-size: 1.05rem; margin-bottom: .3rem; line-height: 1.4; }
.liste-textes p { margin: 0; }
.titre-texte { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); max-width: 40ch; }
.verdict { border-radius: var(--radius); padding: 1.1rem 1.3rem; margin: 1.2rem 0; border: 1px solid var(--line); background: var(--card); }
.verdict p:last-child { margin-bottom: 0; }
.verdict-titre { font-weight: 700; font-size: 1.05rem; }
.sens-bloc-favorable { border-left: 6px solid var(--pos); }
.sens-bloc-defavorable { border-left: 6px solid var(--neg); }
.resume { margin: 1rem 0; }
.resume summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.resume p { color: var(--ink-2); font-size: .95rem; margin-top: .6rem; }
.barre-cell { min-width: 160px; }
.barre-vote { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--paper-2); }
.barre-vote .pos { background: var(--pos); } .barre-vote .neg { background: var(--neg); } .barre-vote .mid { background: var(--mid); }
.positions { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.position { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; border-top: 5px solid var(--mid); }
.position.effet-favorable { border-top-color: var(--pos); } .position.effet-defavorable { border-top-color: var(--neg); }
.position h3 small { display: block; font: 500 .8rem var(--sans); color: var(--ink-3); margin-top: .2rem; }
.noms { list-style: none; padding: 0; margin: 0; columns: 1; font-size: .9rem; max-height: 420px; overflow-y: auto; }
.noms li { padding: .15rem 0; break-inside: avoid; }
.noms a { color: var(--ink); text-decoration: none; }
.noms a:hover { text-decoration: underline; }

/* ---------- Groupes ---------- */
.groupes { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: 1.5rem; }
.groupe-carte { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; border-top: 6px solid var(--gc); display: flex; flex-direction: column; gap: .9rem; }
.groupe-carte header { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.groupe-carte h2 { font-size: 1.05rem; margin: 0; }
.groupe-carte h2 a { color: var(--ink); text-decoration: none; }
.groupe-score { display: flex; align-items: center; gap: 1rem; }
.groupe-score .profil-indice { font-size: 2rem; min-width: 2.6em; }
.mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; margin: 0; font-size: .8rem; }
.mini dt { color: var(--ink-3); } .mini dd { margin: 0; font-weight: 700; font-size: 1rem; }

.prose { max-width: 820px; }
.prose h2 { margin-top: 2rem; }
.liste-cat { list-style: none; padding: 0; } .liste-cat li { padding: .3rem 0; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-2); margin-top: 3rem; font-size: .9rem; color: var(--ink-2); }
.footer-inner { display: grid; gap: 1rem; padding-top: 2rem; padding-bottom: 2rem; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.5fr 1fr; } }

/* ---------- Administration ---------- */
.flash { padding: .8rem 1rem; border-radius: 8px; margin-top: 1rem; font-weight: 500; }
.flash-ok { background: var(--pos-soft); color: var(--pos); }
.flash-erreur { background: var(--neg-soft); color: var(--neg); }
.onglets { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 1rem 0; }
.onglets a { padding: .5rem .9rem; text-decoration: none; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 500; }
.onglets a[aria-current="page"] { border-color: var(--brand); color: var(--ink); font-weight: 700; }
.onglets a span { font-size: .8rem; color: var(--ink-3); }
.lot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; font-size: .9rem; }
.carte-admin { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.carte-admin header { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.carte-admin header .meta { margin: 0; }
.carte-admin .lien-source { margin-left: auto; font-size: .9rem; }
.carte-admin h3 { font: 600 1.02rem/1.4 var(--sans); }
.carte-admin details summary { cursor: pointer; color: var(--brand); font-size: .9rem; }
.resume-admin { font-size: .9rem; color: var(--ink-2); max-height: 320px; overflow-y: auto; background: var(--paper); padding: .7rem; border-radius: 6px; }
.alerte { font-size: .75rem; background: #f6e7b4; color: #6b5310; padding: .1rem .5rem; border-radius: 4px; }
.lie { font-size: .88rem; color: var(--ink-2); }
.mots { font-size: .8rem; color: var(--ink-3); }
.mots span { display: inline-block; background: var(--paper-2); border-radius: 4px; padding: 0 .4rem; margin: 0 .2rem .2rem 0; }
.form-valid { border-top: 1px dashed var(--line); margin-top: .8rem; padding-top: .8rem; display: grid; gap: .7rem; }
.choix-sens { border: none; padding: 0; margin: 0; display: flex; gap: .4rem 1.4rem; flex-wrap: wrap; }
.choix-sens legend { font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-bottom: .3rem; }
.choix-sens label { cursor: pointer; }
.ligne-champs { display: flex; gap: 1rem; flex-wrap: wrap; }
.ligne-champs label { display: flex; flex-direction: column; font-size: .8rem; font-weight: 600; color: var(--ink-2); gap: .2rem; }
.bloc { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.bloc small { font-weight: 400; color: var(--ink-3); }
.boutons { display: flex; gap: .6rem; flex-wrap: wrap; }
.carte-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; display: flex; flex-direction: column; gap: .8rem; align-items: flex-start; }
.carte-form > * { max-width: 100%; }
.carte-form h2 { margin: 0; }
.cases { border: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.cases legend { font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-bottom: .3rem; }
.mots-liste { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.mots-liste li { display: inline-flex; align-items: center; gap: .3rem; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .4rem .2rem .8rem; font-size: .9rem; }
.mots-liste li.inactif span { text-decoration: line-through; color: var(--ink-3); }
.mots-liste form { display: inline-flex; }
.statut { font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 4px; background: var(--paper-2); }
.statut-ok { background: var(--pos-soft); color: var(--pos); } .statut-erreur { background: var(--neg-soft); color: var(--neg); }
.sortie { max-height: 300px; overflow-y: auto; }
.login { max-width: 440px; }
.form-login { display: flex; flex-direction: column; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.form-login label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .9rem; }

/* ---------- Validation enrichie (résumé, élus, texte complet) ---------- */
.titre-lien { color: var(--ink); text-decoration: none; }
.titre-lien:hover { color: var(--accent); text-decoration: underline; }
.carte-corps { display: grid; gap: 1rem 1.6rem; margin: .4rem 0 .6rem; }
@media (min-width: 860px) { .carte-corps { grid-template-columns: 1.25fr 1fr; } }
.etiquette { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 .35rem; }
.etiquette small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.carte-resume p { margin-bottom: .6rem; color: var(--ink-2); font-size: .95rem; }
.en-savoir-plus { display: inline-block; font-weight: 600; font-size: .92rem; }
.carte-elus { background: var(--paper); border-radius: 8px; padding: .8rem .9rem; display: flex; flex-direction: column; gap: .5rem; }
.elu { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); padding: .35rem .4rem; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }
.elu:hover { border-color: var(--brand); color: var(--ink); }
.elu-id { line-height: 1.3; min-width: 0; }
.elu-id strong { display: block; }
.elu-id small { color: var(--ink-3); font-size: .8rem; }
.elu-score { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
.elu-score b { font: 700 1.15rem var(--serif); }
.ligne-photos { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.lp-lib { font-size: .8rem; font-weight: 600; color: var(--ink-2); min-width: 7.5em; }
.rangee { display: inline-flex; flex-wrap: wrap; align-items: center; }
.rangee a { margin-right: -6px; margin-bottom: 4px; transition: transform .1s; }
.rangee a:hover { transform: translateY(-2px); position: relative; z-index: 1; }
.rangee .avatar { box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--gc, var(--line)); }
.rangee-plus { margin-left: 12px; font-size: .8rem; font-weight: 700; color: var(--ink-3); }
.decompte { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .9rem; }
.decompte b { font: 700 1.25rem var(--serif); margin-right: .2em; }
.dc-pour { color: var(--brand); } .dc-contre { color: var(--accent); } .dc-abst { color: var(--ink-3); }
.effet-score { font-size: .88rem; color: var(--ink-2); background: var(--paper-2); border-radius: 6px; padding: .45rem .7rem; margin: .4rem 0; }

.detail-grille { display: grid; gap: 1.6rem; margin-top: 1rem; }
@media (min-width: 980px) { .detail-grille { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); align-items: start; } .detail-cote { position: sticky; top: 84px; } }
.detail-cote { display: flex; flex-direction: column; gap: 1rem; }
.detail-cote .carte-form { align-items: stretch; }
.detail-cote .form-valid { border-top: none; margin-top: 0; padding-top: 0; }
.encadre-resume { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.2rem; }
.encadre-resume p:last-child { margin: 0; }
.texte-complet { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; font-size: .97rem; line-height: 1.7; max-width: 75ch; }
.texte-complet p { margin: 0 0 .9em; }
.section-texte { font: 700 .78rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin: 1.2em 0 .5em; }
.section-texte:first-child { margin-top: 0; }
.h-lie { font-size: 1.1rem; }
.grille-elus { display: flex; flex-direction: column; gap: .4rem; max-height: 420px; overflow-y: auto; }
.sous-titre { font: 700 .9rem var(--sans); margin: .6rem 0 .2rem; }
.statut-attente { background: #f6e7b4; color: #6b5310; }
.resume-public { font-size: 1.05rem; color: var(--ink-2); max-width: 70ch; }
.resume .texte-complet { margin-top: .8rem; }

/* ---------- Progression de l'import ---------- */
.progression-import { align-items: stretch; margin-bottom: 1.5rem; }
.barre-prog { height: 14px; border-radius: 7px; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; }
.barre-prog span { display: block; height: 100%; background: var(--brand); transition: width .4s ease; }
.progression-import p { margin: 0; }
.progression-import .boutons form { display: inline; }
.statut-en_cours { background: #e3e9f6; color: #2c4a86; }
.statut-ignore { color: var(--ink-3); }
[hidden] { display: none !important; }
button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Aide de l'IA ---------- */
.bloc-ia { border: 1px solid #c9d6ee; background: #f2f6fd; border-radius: 8px; padding: .8rem 1rem; margin: .6rem 0; }
.bloc-ia .etiquette { color: #2c4a86; }
.bloc-ia .etiquette small { color: var(--ink-3); }
.bloc-ia-vide { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.bloc-ia-vide p { margin: 0; }
.ia-explication { color: var(--ink); margin: 0 0 .5rem; }
.ia-verdict { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .4rem; }
.ia-chip { font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
.ia-chip.ia-fav { background: var(--pos-soft); color: var(--pos); border-color: transparent; }
.ia-chip.ia-def { background: var(--neg-soft); color: var(--neg); border-color: transparent; }
.ia-chip.ia-hors { background: #ece9e1; color: var(--ink-2); border-color: transparent; }
.ia-conf-faible { border-color: var(--accent); color: var(--accent); }
.ia-attention { font-size: .88rem; color: #6b5310; background: #fbf3d5; border-radius: 6px; padding: .4rem .6rem; margin: .3rem 0 0; }
.note-ia { font-size: .85rem; color: #2c4a86; margin: 0; }
.form-valid.prerempli { border-top-color: #c9d6ee; }
button.danger.suggere { background: var(--neg-soft); }
.bandeau-ia { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; background: #f2f6fd; border: 1px solid #c9d6ee; border-radius: var(--radius); padding: .8rem 1rem; margin: 1rem 0; }
@media (prefers-color-scheme: dark) {
    .bloc-ia, .bandeau-ia { background: #1d2635; border-color: #33415c; }
    .bloc-ia .etiquette, .note-ia { color: #b4c6ef; }
    .ia-attention { background: #3a3220; color: #ecd48f; }
    .ia-chip.ia-hors { background: #2c302b; }
}

/* ---------- Partage sur les réseaux sociaux ---------- */
.partage { margin: 1.5rem 0 0; }
.partage-titre { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 .5rem; }
.partage-boutons { display: flex; flex-wrap: wrap; gap: .45rem; }
.pb { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--line);
      background: var(--card); color: var(--ink); font: 600 .88rem var(--sans); text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s; }
.pb:hover { border-color: var(--brand); background: var(--card); color: var(--ink); }
.pb .ico { flex: none; }
.pb-whatsapp .ico { color: #1f9e55; } .pb-facebook .ico { color: #1877f2; } .pb-bluesky .ico { color: #1185fe; }
.pb-linkedin .ico { color: #0a66c2; } .pb-insta .ico { color: #c13584; } .pb-x .ico, .pb-mail .ico, .pb-copier .ico { color: var(--ink-2); }
.pb-natif { background: var(--brand); color: var(--paper); border-color: var(--brand); }
.pb-natif:hover { background: var(--brand-2); color: var(--paper); }
.pb-ok { border-color: var(--pos); color: var(--pos); }
.hero .partage { margin: 0 0 2rem; }
@media (max-width: 560px) { .pb { font-size: .82rem; padding: .4rem .7rem; } }
