/* =====================================================================
   Bulletin des Artisans du Bâtiment — Édition web
   Design system institutionnel (style publication officielle)
   ===================================================================== */
:root {
    --navy: #0b2f5c;
    --navy-2: #14427b;
    --navy-soft: #eef3fa;
    --blue: #1f6fb2;
    --gold: #c9a227;
    --gold-soft: #faf5e4;
    --red: #b3261e;
    --green: #1a7a4a;
    --green-soft: #e8f4ee;
    --ink: #1c1f26;
    --ink-dim: #545d6c;
    --ink-faint: #8491a5;
    --line: #d7dde7;
    --line-strong: #b9c2d1;
    --paper: #ffffff;
    --paper-alt: #f5f7fb;
    --paper-tint: #eaf1f9;
    --serif: Georgia, "Times New Roman", "DejaVu Serif", serif;
    --sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --shadow: 0 10px 30px rgba(11, 47, 92, 0.08);
    --radius: 4px;
    /* Hauteur de la barre de navigation sticky : sert d'offset à la ligne
       d'en-tête collante des tableaux. Valeurs de repli si le script ne tourne
       pas (llm.js pose la valeur mesurée) — 44 px en dessous de 1100 px (onglets
       sur une ligne), 106 px au-dessus (onglets sur deux lignes). */
    --nav-h: 44px;
}
@media (min-width: 1100px) { :root { --nav-h: 106px; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper-alt);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* ---------- Bandeau tricolore ---------- */
.tricolor { display: flex; height: 6px; }
.tricolor span { flex: 1; }
.tricolor span:nth-child(1) { background: #0b2f5c; }
.tricolor span:nth-child(2) { background: #ffffff; border-bottom: 1px solid var(--line); }
.tricolor span:nth-child(3) { background: #b3261e; }

/* ---------- Mât ---------- */
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; padding-top: 22px; padding-bottom: 22px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand:hover { text-decoration: none; }
.brand-emblem { width: 58px; height: 58px; flex-shrink: 0; display: block; }
.brand-emblem svg { width: 100%; height: 100%; }
.brand-name {
    display: block; font-family: var(--serif); font-weight: 700;
    font-size: 1.55rem; line-height: 1.15; color: var(--navy);
    letter-spacing: 0.2px;
}
.brand-name em { font-style: normal; color: var(--navy-2); }
.brand-sub {
    display: block; font-size: 0.76rem; color: var(--ink-faint);
    text-transform: uppercase; letter-spacing: 1.6px; margin-top: 4px;
}
.brand-name.small { font-size: 1.02rem; }
.edition-tag {
    display: flex; align-items: center; gap: 12px;
    border: 1px solid var(--line); border-left: 4px solid var(--navy);
    background: var(--navy-soft); padding: 8px 14px; border-radius: var(--radius);
}
.edition-num {
    font-family: var(--serif); font-size: 1.7rem; font-weight: 700;
    color: var(--navy); line-height: 1;
}
.edition-meta { font-size: 0.74rem; color: var(--ink-dim); line-height: 1.35; }

/* ---------- Navigation ---------- */
.topnav {
    position: sticky; top: 0; z-index: 120; background: var(--navy);
    box-shadow: 0 2px 10px rgba(11,47,92,0.18);
}
.topnav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; }
.nav-list a {
    display: block; color: #e8eef6; padding: 14px 12px; font-size: 0.86rem;
    font-weight: 500; letter-spacing: 0.1px; border-bottom: 3px solid transparent;
    transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.nav-list a:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.nav-list a.active { background: rgba(255,255,255,0.12); color: #fff; border-bottom-color: var(--gold); }
.nav-cta {
    color: #fff; background: var(--blue); font-weight: 600; font-size: 0.85rem;
    padding: 9px 16px; border-radius: var(--radius); white-space: nowrap;
}
.nav-cta:hover { background: #2a7fc4; text-decoration: none; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 14px 6px; }
.nav-toggle span { width: 24px; height: 2.5px; background: #fff; border-radius: 2px; }

/* ---------- Contenu ---------- */
.content { min-height: 60vh; }
.content .wrap { padding-top: 34px; padding-bottom: 56px; }
/* Toute cible d'ancre garde de la place sous la barre sticky */
[id] { scroll-margin-top: 78px; }

/* ---------- Section (titre + règle) ---------- */
.section-head { margin-bottom: 26px; }
.eyebrow {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 2.4px;
    color: var(--blue); font-weight: 700; margin-bottom: 6px;
}
.section-head h1 {
    font-family: var(--serif); font-size: 2.2rem; color: var(--navy);
    line-height: 1.12; font-weight: 700;
}
.section-head .subtitle { color: var(--ink-dim); font-size: 1.02rem; margin-top: 8px; max-width: 820px; }
.rule { height: 3px; background: linear-gradient(90deg, var(--navy) 0 110px, var(--gold) 110px 138px, var(--paper-tint) 138px); margin: 18px 0 8px; border: 0; }

/* ---------- Bandeau d'intro ---------- */
.lede {
    background: var(--navy-soft); border-left: 4px solid var(--navy);
    padding: 16px 20px; border-radius: var(--radius); margin: 6px 0 22px;
    color: var(--ink-dim); font-size: 1.02rem;
}
.lede a { font-weight: 600; }

/* ---------- Cartes ---------- */
.card {
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; min-width: 0;
    box-shadow: var(--shadow);
}
.card h2 { font-family: var(--serif); color: var(--navy); font-size: 1.32rem; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.card h2 .num {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 30px; height: 30px; background: var(--navy); color: #fff;
    font-family: var(--serif); font-size: 1rem; border-radius: 3px; flex-shrink: 0;
}
.card h2 i { color: var(--gold); font-size: 1.1rem; }

/* ---------- KPI / stats ---------- */
.kpi-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.kpi {
    flex: 1 1 160px; background: var(--paper); border: 1px solid var(--line);
    border-left: 4px solid var(--navy); border-radius: var(--radius);
    padding: 16px 18px; box-shadow: var(--shadow);
}
.kpi .v { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.kpi .l { font-size: 0.76rem; color: var(--ink-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.8px; }
.kpi .s { font-size: 0.72rem; color: var(--ink-faint); margin-top: 2px; }

/* ---------- Filtres ---------- */
.filterbar {
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px 16px; margin-bottom: 22px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap; box-shadow: var(--shadow);
}
.filterbar .flabel { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-faint); font-weight: 700; }
.filterset { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
    font-size: 0.82rem; padding: 6px 12px; border: 1px solid var(--line);
    background: var(--paper-alt); color: var(--ink-dim); border-radius: 20px;
    cursor: pointer; transition: all 0.15s; font-family: var(--sans);
}
.chip:hover { border-color: var(--navy-2); color: var(--navy-2); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-search { flex: 1 1 200px; min-width: 170px; }
.filter-search input {
    width: 100%; padding: 8px 12px; border: 1px solid var(--line);
    border-radius: var(--radius); font-family: var(--sans); font-size: 0.88rem;
}
.filter-search input:focus { outline: 2px solid var(--blue); border-color: transparent; }
.sortsel { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--sans); font-size: 0.85rem; }

/* ---------- Cartes de marché ---------- */
.markets { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.market {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px 22px; display: flex; flex-direction: column; gap: 10px;
    box-shadow: var(--shadow); animation: fadeUp 0.4s ease both;
}
.market-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.market .mnum {
    font-family: var(--serif); font-weight: 700; color: var(--gold);
    font-size: 1.1rem; line-height: 1;
}
.market .proc { font-size: 0.7rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.6px; text-align: right; }
.market h3 { font-size: 1.02rem; color: var(--navy); line-height: 1.3; font-weight: 700; }
.meta-row { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; }
.meta-row .k { color: var(--ink-faint); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; }
.meta-row .v { color: var(--ink); font-weight: 600; }
.montant { color: var(--green); font-weight: 700; font-size: 1.12rem; font-family: var(--serif); }
.market .detail { color: var(--ink-dim); font-size: 0.9rem; }
.market .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 0.74rem; color: var(--ink-faint); }
.market-title { color: var(--navy); text-decoration: none; }
.market-title:hover { color: var(--navy-2); text-decoration: underline; }
.market .foot a { color: var(--blue); font-weight: 700; text-decoration: none; white-space: nowrap; }
.market .foot a:hover { text-decoration: underline; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 0.72rem; background: var(--navy-soft); color: var(--navy-2); padding: 3px 9px; border-radius: 3px; font-weight: 600; }
.tag.dept { background: var(--gold-soft); color: #8a6d12; }
.tag.off-1 { background: var(--green-soft); color: var(--green); }
.tag.off-many { background: #fff1f0; color: var(--red); }
/* Mention éditoriale attachée à un modèle (ex. « retrait programmé ») */
.tag.retrait { background: #fdeee0; color: #8a4b12; border: 1px solid #e6a86a; display: inline-block; margin-left: 6px; vertical-align: middle; white-space: nowrap; cursor: help; }
/* Gamme d'un modèle : dernière génération (en cours) ou génération antérieure */
.tag.gamme { display: inline-block; margin-left: 6px; vertical-align: middle; white-space: nowrap; cursor: help; border: 1px solid transparent; }
.tag.gamme.courant { background: #e3f3e9; color: #14663c; border-color: #9dcfb4; }
.tag.gamme.precedent { background: #f1f3f6; color: #5c6675; border-color: #ccd3dc; }
/* En-tête de bloc qui scinde un tableau en deux (générations) */
.group-head { padding: 14px 2px 8px; }
.group-head h3 { font-family: var(--serif); color: var(--navy); font-size: 1.12rem; margin: 0 0 4px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.group-head .grp-sub { font-size: 0.8rem; color: var(--ink-faint); margin: 0; }
.group-head .grp-count { font-size: 0.72rem; font-weight: 700; color: var(--navy-2); background: var(--navy-soft); border-radius: 3px; padding: 3px 9px; vertical-align: middle; white-space: nowrap; }
.group-table { margin-top: 8px; }

/* ---------- Bilan ---------- */
.bilan {
    background: var(--gold-soft); border: 1px solid var(--gold);
    border-left: 5px solid var(--gold); border-radius: var(--radius);
    padding: 18px 22px; margin-top: 6px;
}
.bilan h4 { color: #7a5d10; font-family: var(--serif); font-size: 1.05rem; margin-bottom: 6px; }
.bilan p { color: #6b5a26; font-size: 0.92rem; }

/* ---------- Boîte info ---------- */
.info-item { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.info-item:last-child { border-bottom: 0; }
.info-item h3 { color: var(--navy); font-size: 1.05rem; margin-bottom: 8px; }
.info-item p, .info-item li { color: var(--ink-dim); }

/* ---------- Listes à puces ---------- */
ul.check, ul.arrow { list-style: none; }
ul.check li, ul.arrow li { position: relative; padding-left: 24px; margin-bottom: 8px; color: var(--ink-dim); }
ul.check li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
ul.arrow li::before { content: "›"; position: absolute; left: 4px; color: var(--gold); font-weight: 700; font-size: 1.1rem; line-height: 1.2; }

/* ---------- Chiffres (stat cards dans aides/opp) ---------- */
.figures { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.figure {
    background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px 16px; text-align: center; flex: 1 1 130px;
}
.figure .fv { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.figure .fl { font-size: 0.72rem; color: var(--ink-dim); margin-top: 3px; }
.figure .fn { font-size: 0.66rem; color: var(--ink-faint); margin-top: 1px; }

/* ---------- Diagrammes ---------- */
.fig-frame {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px; margin-bottom: 22px; box-shadow: var(--shadow);
}
.fig-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.fig-title h3 { font-family: var(--serif); color: var(--navy); font-size: 1.05rem; }
.fig-title .fig-legend { font-size: 0.72rem; color: var(--ink-faint); text-align: right; }
.fig { width: 100%; }
.fig svg { display: block; width: 100%; height: auto; }

/* Tooltip */
.tip { position: relative; }
.tip .tipbox {
    position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
    background: var(--navy); color: #fff; font-size: 0.74rem; padding: 6px 10px;
    border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none;
    transition: opacity 0.15s; z-index: 5; box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.tip:hover .tipbox { opacity: 1; }

/* Légende de la carte des départements */
.map-legend {
    display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 12px;
    padding-top: 12px; border-top: 1px solid var(--line);
    font-size: 0.78rem; color: var(--ink-dim);
}
.map-legend .lg-item { display: inline-flex; align-items: center; gap: 7px; }
.map-legend .lg {
    display: inline-block; width: 16px; height: 16px; border-radius: 3px;
    border: 1.5px solid transparent; flex-shrink: 0;
}
.map-legend .lg-gold { background: #c9a227; font-style: normal; text-align: center; font-family: var(--serif); font-weight: 700; color: #fff; font-size: 0.74rem; line-height: 16px; border: 0; }

/* ---------- Tableaux ----------
   La ligne des têtes reste visible pendant qu'on parcourt un tableau vers le bas.
   Deux montages, parce qu'un en-tête collant ne fonctionne pas sous un ancêtre
   défilant : dès qu'une boîte autour du tableau défile (ici .table-wrap, dont le
   débordement horizontal est indispensable aux écrans étroits), l'en-tête se colle
   au haut de CETTE BOÎTE et non à la fenêtre.
   - Au-dessus de 1100 px, les grands tableaux tiennent dans la page : la boîte ne
     défile plus (overflow: visible) et l'en-tête se colle sous la barre de
     navigation pendant le défilement de la page.
   - En dessous, le tableau garde sa boîte défilante : l'en-tête se colle au haut de
     la boîte, et la boîte est bornée à la hauteur de l'écran pour que ce haut reste
     visible pendant qu'on la parcourt.
   Les petites tables des fiches fournisseurs (dans une carte, sans la classe
   .group-table) gardent leur boîte et ne portent pas d'en-tête collant : elles
   tiennent entières à l'écran. */
.table-wrap { overflow-x: auto; }
.table-wrap.group-table { overflow: visible; }
/* La révélation au scroll décale la boîte de 22 px tant que le tableau n'est pas
   entré à l'écran — or un transform, même résiduel, sur un ancêtre crée un bloc
   conteneur et ANNULE l'effet collant de l'en-tête sous la fenêtre. Le tableau se
   contente donc d'un fondu, sans glissement. */
.table-wrap.reveal { transform: none !important; }
.table-wrap.group-table table.dash thead th {
    position: sticky; top: var(--nav-h, 106px); z-index: 40;
    background: var(--paper);
}
@media (max-width: 1099px) {
    .table-wrap.group-table {
        overflow: auto;
        max-height: calc(100vh - var(--nav-h, 44px) - 12px);
    }
    .table-wrap.group-table table.dash thead th { top: 0; }
}
table.dash { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.dash th { text-align: left; padding: 10px 12px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--ink-faint); border-bottom: 2px solid var(--line); }
table.dash td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.dash tr:hover td { background: var(--navy-soft); }
table.dash td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Grids ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Accueil / mât héro ---------- */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #1f6fb2 100%);
    color: #fff; border-radius: var(--radius); padding: 42px 40px; margin-bottom: 30px;
    position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.hero::after { content: ""; position: absolute; right: -40px; bottom: -50px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,0.06); }
.hero .eyebrow { color: var(--gold); }
.hero h1 { font-family: var(--serif); font-size: 2.7rem; line-height: 1.1; margin: 6px 0 14px; }
.hero p { max-width: 640px; font-size: 1.04rem; color: #d7e3f2; }
.hero .hero-meta { display: flex; gap: 22px; margin-top: 24px; flex-wrap: wrap; }
.hero .hero-meta div b { display: block; font-family: var(--serif); font-size: 1.5rem; }
.hero .hero-meta div span { font-size: 0.74rem; color: #a9c3e0; text-transform: uppercase; letter-spacing: 1px; }

/* Sommaire (accueil) */
.sommaire-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; margin-top: 20px; }
.sommaire-card {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px 22px; display: flex; gap: 16px; align-items: flex-start; min-width: 0;
    box-shadow: var(--shadow); transition: transform 0.15s, border-color 0.15s; color: var(--ink);
}
.sommaire-card:hover { transform: translateY(-3px); border-color: var(--navy-2); text-decoration: none; }
.sommaire-card .snum { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--gold); line-height: 1; }
.sommaire-card .stitle { font-weight: 700; color: var(--navy); font-size: 1.02rem; }
.sommaire-card .sdetail { color: var(--ink-dim); font-size: 0.85rem; margin-top: 4px; }
.sommaire-card .sicon { margin-left: auto; color: var(--navy-2); flex-shrink: 0; opacity: 0.6; }

/* Partenaires */
.partners { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .partners { grid-template-columns: 1fr; } }
.partner {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; display: flex; gap: 16px; align-items: center; box-shadow: var(--shadow);
}
.partner img { max-height: 46px; max-width: 120px; object-fit: contain; }
.partner .pn { font-weight: 700; color: var(--navy); font-size: 1.02rem; }
.partner .pd { font-size: 0.83rem; color: var(--ink-dim); }
.partner .pl { font-size: 0.68rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 1px; }

/* Mentions / conclusion */
.conclusion {
    background: var(--navy-soft); border-left: 5px solid var(--navy); border-radius: var(--radius);
    padding: 20px 24px; margin-bottom: 24px; color: var(--ink-dim);
}
.conclusion h2 { color: var(--navy); font-family: var(--serif); margin-bottom: 8px; }
.legal-box { background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; font-size: 0.86rem; color: var(--ink-dim); }
.legal-box p { margin-bottom: 10px; }

/* ---------- Accordéon ---------- */
details.acc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; box-shadow: var(--shadow); }
details.acc summary { cursor: pointer; padding: 16px 20px; font-weight: 700; color: var(--navy); list-style: none; display: flex; align-items: center; gap: 10px; }
details.acc summary::before { content: "＋"; color: var(--gold); font-weight: 700; }
details.acc[open] summary::before { content: "−"; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc .acc-body { padding: 0 20px 18px; color: var(--ink-dim); }

/* ---------- Fil d'étapes (flow) ---------- */
.flow { display: flex; gap: 0; flex-wrap: wrap; align-items: stretch; margin: 14px 0; }
.flow .step { flex: 1 1 160px; text-align: center; position: relative; padding: 0 8px 26px; }
.flow .step .dot { width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%; background: var(--navy-soft); border: 2px solid var(--navy-2); color: var(--navy-2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.82rem; }
.flow .step h5 { font-size: 0.86rem; color: var(--navy); margin-bottom: 4px; }
.flow .step p { font-size: 0.76rem; color: var(--ink-dim); }
.flow .step::after { content: "→"; position: absolute; top: 12px; left: calc(50% + 30px); color: var(--gold); font-weight: 700; font-size: 1.1rem; }
.flow .step:last-child::after { content: ""; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--line-strong); }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--navy); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--line-strong); }
.tl-item .tldate { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--blue); font-weight: 700; }
.tl-item h5 { color: var(--navy); font-size: 1rem; margin: 2px 0 4px; }
.tl-item p { color: var(--ink-dim); font-size: 0.9rem; }

/* ---------- Boutons ---------- */
.btn { display: inline-block; padding: 10px 18px; border-radius: var(--radius); background: var(--navy); color: #fff; font-weight: 600; font-size: 0.9rem; border: 0; cursor: pointer; transition: background 0.15s; font-family: var(--sans); }
.btn:hover { background: var(--navy-2); text-decoration: none; }
.btn.gold { background: var(--gold); }
.btn.ghost { background: transparent; border: 1.5px solid var(--navy-2); color: var(--navy-2); }
.btn.ghost:hover { background: var(--navy-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c3d3e8; margin-top: 30px; }
.footer-inner { padding: 34px 22px 26px; display: flex; gap: 30px; flex-wrap: wrap; justify-content: space-between; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-name em { color: #cfe0f5; }
.footer-color { font-size: 0.76rem; color: #9fb6d3; }
.footer-links { display: flex; flex-direction: column; gap: 7px; }
.footer-links a { color: #c3d3e8; font-size: 0.88rem; }
.footer-links a:hover { color: #fff; }
.footer-legal { max-width: 420px; font-size: 0.82rem; color: #a9bedb; }
.footer-legal a { color: #fff; }
.footer-note { font-size: 0.74rem; color: #7f97b6; margin-top: 8px; }

/* ---------- Bouton haut ---------- */
.to-top { position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.25s; box-shadow: 0 6px 18px rgba(0,0,0,0.25); z-index: 90; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--navy-2); }
.to-top:hover { text-decoration: none; }

/* ---------- Animation ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
/* La révélation au scroll n'est active que si JS est présent (sinon contenu toujours visible). */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.market.dim, table.dash tr.dim { opacity: 0.3; filter: grayscale(0.4); }

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {
    .nav-toggle { display: flex; }
    .nav-list { display: none; width: 100%; flex-direction: column; padding-bottom: 6px; }
    .nav-list.open { display: flex; }
    .nav-list a { padding: 12px 8px; }
    .topnav-inner { flex-wrap: wrap; }
    .nav-cta { display: none; }
}
@media (max-width: 860px) {
    .hero h1 { font-size: 2rem; }
    .section-head h1 { font-size: 1.7rem; }
    .brand-name { font-size: 1.2rem; }
    .brand-sub { font-size: 0.66rem; letter-spacing: 1px; }
    .brand-emblem { width: 46px; height: 46px; }
    .edition-tag { display: none; }
}

/* ---------- Impression ---------- */
@media print {
    .topnav, .tricolor, .to-top, .filterbar, .filter-search, .nav-toggle, .btn, .nav-cta { display: none !important; }
    body { background: #fff; }
    .content .wrap { padding: 0; }
    .hero { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
    .hero::after { display: none; }
    .card, .market, .sommaire-card, .bilan, .legal-box { box-shadow: none; break-inside: avoid; }
    .reveal { opacity: 1 !important; transform: none !important; }
}

/* =====================================================================
   Rapport Hebdomadaire de Comparaison des LLM — spécifique
   ===================================================================== */
/* Badges (pays / fournisseur) */
.badge { display:inline-block; font-size:0.72rem; font-weight:700; padding:3px 10px; border-radius:20px; background:var(--navy-soft); color:var(--navy-2); border:1px solid var(--line); }
.badge.flag { font-size:0.9rem; background:var(--gold-soft); color:#7a5d10; border-color:var(--gold); }

/* Jauges Oui/Non/Partiel dans les tableaux de classement prix */
.g-ok { background:var(--green-soft); color:var(--green); font-weight:700; }
.g-part { background:var(--gold-soft); color:#8a6d12; font-weight:600; }
.g-no { background:#f5f6f8; color:#9aa4b5; font-weight:500; }
.g-mid { background:var(--navy-soft); color:var(--navy-2); font-weight:600; }
table.dash td.g-ok, table.dash td.g-no, table.dash td.g-part, td.g-ok, td.g-no, td.g-part { text-align:center; border-radius:3px; }

/* Cellules matrice de capacités */
.cap-yes { background:var(--green-soft); color:var(--green); text-align:center; font-weight:700; }
.cap-part { background:var(--gold-soft); color:#8a6d12; text-align:center; font-weight:600; }
.cap-no { background:#f5f6f8; color:#a8b0bf; text-align:center; }

/* Ligne de note (numéro) */
.note-pill { display:inline-block; min-width:34px; text-align:center; padding:2px 6px; border-radius:3px; font-weight:700; font-family:var(--serif); color:#fff; }
/* Pastille de note : la couleur vient du fond posé par note_style() (échelle
   continue bleu → rouge, la même que celle des anneaux). Le gris ne sert plus
   qu'à « n.c. ». Les quatre paliers de couleur ont été retirés le 21/09/2026. */
.note-nc { background:#8491a5; }

/* Cartes synthèse recommandations */
.rec-card { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:18px 20px; margin-bottom:14px; box-shadow:var(--shadow); }
.rec-card .rank { font-family:var(--serif); font-weight:700; color:var(--gold); font-size:1.2rem; }
.rec-card h3 { color:var(--navy); font-size:1.08rem; margin:2px 0 8px; }
.rec-card .rec-meta { display:flex; flex-wrap:wrap; gap:10px 18px; font-size:0.85rem; margin:6px 0; }
.rec-card .rec-meta b { color:var(--navy); }
.rec-card ul { margin:6px 0 0 0; }
.rec-card ul li { color:var(--ink-dim); font-size:0.88rem; }
.verdict { background:var(--navy); color:#dbe6f3; border-radius:var(--radius); padding:20px 24px; margin-bottom:22px; font-size:0.95rem; }
.verdict strong { color:#fff; }
.verdict h4 { color:#fff; font-family:var(--serif); font-size:1.15rem; margin-bottom:10px; }

/* Rang dans un tableau (épinglette) */
.rank-cell { font-family:var(--serif); font-weight:700; color:var(--gold); }

/* Stats sommaire — grandes valeurs */
.hero .hero-meta div b.value { color:var(--gold); }

/* Sort table header */
table.dash th[data-sort].sort-asc, table.dash th[data-sort].sort-desc { color:var(--navy); }
table.dash th[data-sort] { user-select:none; white-space:nowrap; }
table.dash th[data-sort]:hover { color:var(--navy-2); }
.sort-arrow { color:var(--gold); font-weight:700; font-size:0.8rem; }
/* panneau de filtres dans les pages de tableau */
.filter-panel { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; margin-bottom:20px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; box-shadow:var(--shadow); }
.filter-panel .flabel { font-size:0.74rem; text-transform:uppercase; letter-spacing:1px; color:var(--ink-faint); font-weight:700; }
/* sous-titre de tableau */
.table-note { font-size:0.8rem; color:var(--ink-faint); margin:6px 0 16px; }

/* Info-bulle du nuage de points (survol) */
.scatter-pt { cursor: pointer; transition: r 0.12s ease, opacity 0.12s ease; }
.scatter-pt:hover { r: 9; opacity: 0.9; }
.scatter-tip {
    position: fixed; z-index: 999; pointer-events: none; opacity: 0;
    background: var(--navy); color: #fff; padding: 9px 13px; border-radius: 6px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.28); max-width: 280px;
    transform: translateY(6px); transition: opacity 0.15s ease, transform 0.15s ease;
}
.scatter-tip.show { opacity: 1; transform: translateY(0); }
.scatter-tip .st-nom { display: block; font-family: var(--serif); font-weight: 700; font-size: 0.95rem; color: #fff; margin-bottom: 3px; }
.scatter-tip .st-row { display: block; font-size: 0.76rem; color: #cfe0f5; }
.scatter-tip .st-row b { color: var(--gold); }

/* Info-bulle des graphiques (scatter + barres) */
.chart-pt, .scatter-pt { cursor: pointer; }
.scatter-pt { transition: r 0.12s ease, opacity 0.12s ease; }
.scatter-pt:hover { r: 9; opacity: 0.9; }
.chart-pt { transition: opacity 0.12s ease; }
.chart-pt:hover { opacity: 0.88; }
.chart-tip {
    position: fixed; z-index: 999; pointer-events: none; opacity: 0;
    background: var(--navy); color: #fff; padding: 9px 13px; border-radius: 6px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.28); max-width: 300px;
    transform: translateY(6px); transition: opacity 0.15s ease, transform 0.15s ease;
}
.chart-tip.show { opacity: 1; transform: translateY(0); }
.chart-tip .st-nom { display: block; font-family: var(--serif); font-weight: 700; font-size: 0.95rem; color: #fff; margin-bottom: 3px; }
.chart-tip .st-meta { display: block; font-size: 0.76rem; color: #cfe0f5; margin-bottom: 2px; }
.chart-tip .st-row { display: block; font-size: 0.76rem; color: #cfe0f5; }
.chart-tip .st-row b { color: var(--gold); }

/* ---------- « Ce qui a changé » (accueil) ---------- */
/* La couleur du filet de gauche porte le sens : vert = favorable (prix en baisse,
   ELO/vitesse/note en hausse), rouge = défavorable, bleu = entrée/sortie de tableau,
   gris = information neutre. Aucune légende écrite : le détail chiffré la remplace. */
.chg .chg-resume { margin: 0 0 6px; color: var(--ink); font-size: 1.02rem; }
.chg-fam { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.chg-fam h3 {
    display: flex; align-items: center; gap: 9px; margin: 0 0 8px;
    font-family: var(--sans); font-size: 0.95rem; font-weight: 700;
    color: var(--navy); letter-spacing: 0; text-transform: none;
}
.chg-nb {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; padding: 1px 7px; border-radius: 999px;
    background: var(--navy-soft); color: var(--navy); font-size: 0.76rem;
}
.chg-fam ul { list-style: none; margin: 0; padding: 0; }
.chg-fam li {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
    padding: 6px 0 6px 12px; border-left: 3px solid var(--line-strong);
    color: var(--ink-dim); font-size: 0.92rem;
}
.chg-fam li b { color: var(--ink); font-weight: 600; }
.chg-fam li.chg-bon { border-left-color: var(--green); }
.chg-fam li.chg-mauvais { border-left-color: var(--red); }
.chg-fam li.chg-info { border-left-color: var(--blue); }
.chg-fam li.chg-plus { border-left-color: transparent; color: var(--ink-faint); font-style: italic; }
.chg-sources {
    margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line);
    font-size: 0.78rem; color: var(--ink-dim);
}
@media (max-width: 700px) { .chg-fam li { flex-direction: column; gap: 2px; } }
