/* ==================================================================================================================
   Roboloto · « Doux & chaleureux », bleu marine, blanc et rouge.
   Public : joueurs souvent seniors. Priorités : lisibilité (texte à 20 px, contraste fort, polices Open Sans et Quicksand,
   rondes et familières), repères familiers (menu toujours visible, gros boutons avec des mots), chaleur (crème,
   bleu, rouge, coins arrondis, titres en Quicksand).
   Feuille unique, aucune règle en ligne (CSP stricte), aucun script.
   ================================================================================================================== */

@font-face { font-family: "Open Sans"; src: url("/static/fonts/open-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/static/fonts/open-sans-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/static/fonts/open-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Quicksand"; src: url("/static/fonts/quicksand-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --creme: #F7F5EF;          /* fond de page : blanc cassé, papier */
  --blanc: #FFFFFF;          /* cartes */
  --pale: #E4EAF4;           /* cartes mises en avant, encadrés : bleu très pâle */
  --second: #2D4F8E;         /* libellés, texte secondaire fort : bleu (7,3:1) */
  --encre: #16284A;          /* texte, boutons principaux : bleu marine (13,4:1) */
  --texte: #16284A;
  --doux: #3F4B66;           /* texte secondaire (8:1) */
  --accent: #C42B38;         /* accent de fond : rouge (texte blanc dessus : 5,6:1) */
  --sur-accent: #FFFFFF;
  --accent-fonce: #A51D29;   /* survol des boutons rouges */
  --accent-texte: #A8222E;   /* accent en texte (6,6:1) */
  --accent-clair: #F4A7A0;   /* accent sur fond marine (7,6:1) */
  --trait: rgba(22, 40, 74, .14);
  --trait-fort: rgba(22, 40, 74, .3);
  --vert: #2E6B3A; --rouge: #A3271B;
  --serie1: #2C5F9E; --serie2: #C77F1A;  /* graphiques : palette validée (contraste, daltonisme) */
  --pop0: #1F3F7A; --pop1: #7D97C8; --pop2: #BFCDE6; --pop3: #F1EFEA; --pop4: #F4C6C1; --pop5: #E07A72; --pop6: #A3222E;
  --titre: "Quicksand", "Trebuchet MS", Arial, sans-serif;
  --sans: "Open Sans", "Segoe UI", Arial, sans-serif;
  --rayon: 24px;
  --large: 1180px;
  --mesure: 720px;
}

/* ---- Base ------------------------------------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-size: 93.75%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--creme); color: var(--texte); font: 400 1.14rem/1.75 var(--sans); }
main { flex: 1 0 auto; }
a { color: var(--encre); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--accent); }
a:hover { color: var(--accent-texte); }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; border-radius: 6px; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--titre); font-weight: 700; color: var(--encre); line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin: .2em 0 .55em; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); margin: 2em 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 .5em; }
h4 { font: 700 1.1rem var(--sans); margin: 0 0 .7em; }
p { margin: 0 0 1.15em; }
strong, b { font-weight: 700; }
code, .mono { font-family: Consolas, monospace; font-size: .92em; }
.petit { font-size: .95rem; color: var(--doux); }
.evitement { position: absolute; left: -999px; top: 0; }
.evitement:focus { left: 8px; top: 8px; background: var(--blanc); padding: 12px 16px; z-index: 20; border-radius: 10px; }
.largeur { width: min(var(--large), 100% - 40px); margin-inline: auto; }
.etroit { max-width: var(--mesure); }
.cache-mobile { } @media (max-width: 560px) { .cache-mobile { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
.surtitre, .rubrique { display: block; font: 700 1.05rem var(--sans); color: var(--second); margin: 0 0 .5em; }

/* ---- Bandeau d'information et en-tête --------------------------------------------------------------------------- */
.bandeau { background: var(--encre); color: #E3E8F2; font-size: .94rem; line-height: 1.4; }
.bandeau .largeur { display: flex; justify-content: space-between; gap: 6px 20px; padding: 6px 0; flex-wrap: wrap; }
.bandeau b { color: #fff; }
.entete .largeur { display: flex; align-items: center; gap: 14px 24px; padding: 18px 0; flex-wrap: wrap; }
/* Logo (SVG en ligne) : lettres marine, anneau rouge, trèfle bleu ; variante claire pour les fonds foncés. */
.logo { display: block; --logo-lettres: var(--encre); --logo-anneau: var(--accent); --logo-trefle: var(--second); }
.logo .l { fill: var(--logo-lettres); } .logo .a { fill: var(--logo-anneau); } .logo .t { fill: var(--logo-trefle); }
.logo.clair { --logo-lettres: var(--creme); --logo-trefle: var(--creme); }
.marque { flex: none; display: block; padding: 6px 0; }
.marque .logo { height: 46px; width: auto; }
.marque:hover .logo { --logo-trefle: var(--accent-texte); }
.marque:hover .logo.clair { --logo-trefle: var(--accent-clair); }
@media (max-width: 600px) { .marque .logo { height: 36px; } }
.entete nav { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.entete nav a { font: 700 1.03rem var(--sans); color: var(--encre); text-decoration: none; padding: 12px 16px; border-radius: 12px; }
.entete nav a:hover { background: var(--pale); color: var(--encre); }
.entete nav a[aria-current="page"] { background: var(--pale); }
.entete a.cta { flex: none; font: 700 .97rem var(--sans); color: var(--sur-accent); background: var(--accent); text-decoration: none; padding: 10px 18px; border-radius: 999px; }
.entete a.cta:hover { background: var(--accent-fonce); color: var(--sur-accent); }
/* Petits écrans : le menu reste entièrement visible, en gros boutons. */
@media (max-width: 980px) {
  .entete .largeur { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
  .entete a.cta { grid-row: 1; grid-column: 2; padding: 9px 15px; font-size: .95rem; }
  .entete nav { grid-row: 2; grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .entete nav a { background: var(--blanc); text-align: center; padding: 13px 10px; }
  .entete nav a[aria-current="page"] { background: var(--pale); }
}

/* ---- Pages intérieures ------------------------------------------------------------------------------------------ */
.contenu { padding: 26px 0 70px; }
.titre-page { margin-bottom: 30px; max-width: 900px; }
.titre-page h1 { margin-top: .1em; }
.fil { font-size: 1.02rem; color: var(--doux); margin: 0 0 14px; }
.fil a { color: var(--doux); text-decoration-color: var(--trait-fort); }
.chapo { font-size: 1.2rem; line-height: 1.7; color: var(--doux); max-width: 780px; }
.meta { font-size: 1.02rem; color: var(--doux); margin: 0 0 1.2em; }

/* ---- Boutons et liens ------------------------------------------------------------------------------------------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 .97rem/1.2 var(--sans); text-decoration: none; color: var(--creme);
  background: var(--encre); border: 0; border-radius: 999px; padding: 11px 22px; cursor: pointer; transition: background .15s, transform .15s; }
.bouton:hover { background: #24396A; color: #fff; transform: translateY(-1px); }
.bouton.or { background: var(--accent); color: var(--sur-accent); }
.bouton.or:hover { background: var(--accent-fonce); color: var(--sur-accent); }
.bouton.secondaire { background: transparent; color: var(--encre); box-shadow: inset 0 0 0 1.5px var(--encre); }
.bouton.secondaire:hover { background: var(--encre); color: var(--creme); }
.bouton[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.lien-fleche { display: inline-block; font-weight: 700; font-size: .97rem; color: var(--accent-texte); padding: 10px 0; }
.lien-fleche::after { content: " →"; }
button.lien { background: none; border: 0; color: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; font: inherit; padding: 10px 0; }
.actions { display: flex; gap: 14px 18px; flex-wrap: wrap; align-items: center; margin-top: 24px; }

/* ---- Formulaires -------------------------------------------------------------------------------------------------- */
label { display: block; font: 600 .97rem var(--sans); color: var(--encre); margin: 18px 0 6px; }
input[type=email], input[type=text], input[type=number], select { width: 100%; max-width: 420px; padding: 10px 14px; border: 1.5px solid var(--trait-fort);
  border-radius: 12px; font: 400 1.05rem var(--sans); color: var(--encre); background: var(--blanc); }
input::placeholder { color: #6B7487; }
input:focus, select:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--encre); }
label.case { display: flex; gap: 10px; align-items: center; font: 400 1rem/1.4 var(--sans); margin: 0; padding: 7px 0; cursor: pointer; }
/* Coches rondes : disque blanc cerclé ; cochée, disque bleu avec une coche blanche qui apparaît en douceur. */
label.case input { flex: none; appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 50%;
  border: 1.5px solid var(--second); background: #fff center / 12px 12px no-repeat; cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s; }
label.case input:hover { border-color: var(--encre); box-shadow: 0 0 0 4px rgba(45, 79, 142, .12); }
label.case input:checked { background-color: var(--second); border-color: var(--second);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3l2.3 2.3 4.7-5' fill='none' stroke='%23F7F3E8' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
label.case input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (forced-colors: active) { label.case input { appearance: auto; -webkit-appearance: auto; } }
fieldset.cases { border: 0; padding: 0; margin: 22px 0 4px; }
fieldset.cases legend { font: 600 .97rem var(--sans); padding: 0; margin-bottom: 4px; }
.formulaire-court { max-width: 600px; }
.formulaire-court input[type=email] { max-width: none; }
.message { border-radius: 16px; background: var(--pale); padding: 16px 20px; margin: 0 0 22px; }
.message.erreur { background: #F6DCD6; color: #6B1D14; }
.message.ok { background: #DCEBD9; color: #1E4A27; }
.saisie-grille { display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: flex-end; margin: 8px 0; }
.saisie-numeros, .saisie-chance { display: flex; gap: 8px; flex-wrap: wrap; position: relative; padding-top: 30px; }
.legende-saisie { position: absolute; top: 0; left: 0; font-weight: 700; font-size: 1.02rem; white-space: nowrap; }
.saisie-grille input { width: 60px; height: 58px; text-align: center; font-weight: 700; padding: 6px 2px; }

/* Bulletin à cocher : de grandes cases arrondies, comme un bulletin papier. Compteur en CSS. */
.bulletin-saisie { border: 0; padding: 0; margin: 0; min-width: 0; max-width: 410px; counter-reset: coches chances; }
.bulletin-saisie legend { font: 600 .97rem var(--sans); margin-bottom: 10px; padding: 0; }
.cases-numeros, .cases-chance { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.cases-chance { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--trait); }
.cases-chance::before { content: "Votre numéro chance :"; grid-column: 1 / -1; font-weight: 600; font-size: .97rem; }
.cases-numeros label, .cases-chance label { position: relative; margin: 0; aspect-ratio: 1; min-height: 0; display: grid; place-items: center; cursor: pointer;
  border-radius: 8px; background: var(--creme); border: 1px solid var(--trait-fort); font: 600 .95rem var(--sans); color: var(--encre); }
.cases-numeros input, .cases-chance input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.cases-numeros input:checked { counter-increment: coches; }
.cases-chance input:checked { counter-increment: chances; }
.cases-numeros label:hover, .cases-chance label:hover { border-color: var(--encre); }
.cases-numeros label:has(input:checked) { background: var(--encre); border-color: var(--encre); color: #fff; }
.cases-chance label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
.cases-numeros label:has(input:focus-visible), .cases-chance label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.compteur { font-weight: 600; font-size: .97rem; color: var(--doux); margin: 14px 0 0; }
.compteur::before { content: counter(coches) " numéro(s) coché(s) sur 5 · " counter(chances) " numéro chance sur 1"; }
@media (max-width: 600px) { .cases-numeros, .cases-chance { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

/* ---- Cartes et chiffres ------------------------------------------------------------------------------------------- */
.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grille-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grille-3, .grille-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grille-2, .grille-3, .grille-4 { grid-template-columns: 1fr; } }
.carte { background: var(--blanc); border-radius: var(--rayon); padding: 28px 32px; }
.carte h2:first-child, .carte h3:first-child { margin-top: 0; }
.carte > :last-child { margin-bottom: 0; }
.tuile { background: var(--blanc); border-radius: 20px; padding: 22px 24px; }
.tuile .libelle { display: block; font-weight: 700; font-size: 1.05rem; color: var(--second); }
.tuile .valeur { display: block; font: 700 clamp(1.8rem, 3vw, 2.2rem)/1.1 var(--titre); color: var(--encre); margin: 8px 0 6px; }
.tuile .detail { display: block; font-size: 1.05rem; line-height: 1.45; color: var(--doux); }
a.tuile-lien { text-decoration: none; color: var(--encre); display: block; transition: transform .15s; }
a.tuile-lien:hover { transform: translateY(-2px); }
a.tuile-lien .valeur { color: var(--accent-texte); }
.pastille { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--sur-accent); font: 700 1.1rem var(--titre); margin-bottom: 16px; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }

/* Ticket (prochain tirage, formules) : carte bleu pâle */
.ticket { background: var(--pale); border-radius: var(--rayon); }
.ticket-corps { padding: 34px 38px 12px; }
.ticket-souche { padding: 8px 38px 32px; }
.ticket h3 { margin: 0 0 8px; }

/* ---- Boules ---------------------------------------------------------------------------------------------------- */
.boules { display: inline-flex; gap: 8px; flex-wrap: wrap; vertical-align: middle; }
.boule { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--blanc); border: 2.5px solid var(--encre); font: 700 1.25rem/1 var(--sans); color: var(--encre); }
.boule.chance, .boule.etoile { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
.boules.petites { gap: 5px; }
.boules.petites .boule { width: 34px; height: 34px; font-size: .95rem; border-width: 2px; }

/* ---- Bulletin de popularité (49 numéros) ------------------------------------------------------------------------ */
.bulletin { display: grid; gap: 10px; max-width: 660px; }
.bulletin.col10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.bulletin.col7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.bulletin .case { aspect-ratio: 1; border-radius: 12px; gap: 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: var(--encre); transition: transform .15s; }
a.case:hover { transform: scale(1.06); color: var(--encre); }
.bulletin .case .num { font: 700 1rem/1 var(--sans); }
.bulletin .case .fac { font: 400 .78rem/1 var(--sans); opacity: .85; }
.bulletin .case.choisi { box-shadow: 0 0 0 3px var(--encre); }
@media (max-width: 900px) { .bulletin .case .fac { display: none; } .bulletin.col10 { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.pop0 { background: var(--pop0); color: #fff !important; } .pop1 { background: var(--pop1); } .pop2 { background: var(--pop2); } .pop3 { background: var(--pop3); }
.pop4 { background: var(--pop4); } .pop5 { background: var(--pop5); } .pop6 { background: var(--pop6); color: #fff !important; }
.legende-pop { display: flex; align-items: center; gap: 0; font-weight: 700; font-size: 1.02rem; margin: 14px 0; max-width: 640px; }
.legende-pop i { display: inline-block; flex: 1; height: 14px; } .legende-pop i:nth-of-type(1) { border-radius: 7px 0 0 7px; } .legende-pop i:nth-of-type(7) { border-radius: 0 7px 7px 0; }
.legende-pop span:first-child { margin-right: 12px; } .legende-pop span:last-child { margin-left: 12px; }

/* ---- Graphiques simples (labo) ---------------------------------------------------------------------------------- */
svg.barre { width: 100%; height: 10px; display: block; border-radius: 5px; overflow: hidden; }
svg.barre .fond { fill: rgba(22, 40, 74, .1); } svg.barre .val { fill: var(--encre); }
svg.barre.or .val { fill: var(--accent); } svg.barre.rouille .val { fill: var(--serie2); } svg.barre.bleu .val { fill: var(--serie1); }
svg.histo { width: 100%; height: auto; display: block; }
svg.histo rect.h { fill: var(--serie1); } svg.histo rect.h:hover { fill: var(--encre); }
svg.histo polyline.ref { fill: none; stroke: var(--serie2); stroke-width: 2; }
svg.histo text { font: 13px var(--sans); fill: var(--doux); text-anchor: middle; }
svg.nuage { width: 100%; max-width: 400px; height: auto; background: var(--blanc); border-radius: 16px; }
svg.nuage line { stroke: var(--serie2); stroke-width: 1; } svg.nuage circle { fill: var(--serie1); opacity: .45; }

/* ---- Tableaux ------------------------------------------------------------------------------------------------------ */
.tableau { overflow-x: auto; margin: 16px 0 26px; background: var(--blanc); border-radius: 20px; padding: 6px 18px; }
table { border-collapse: collapse; width: 100%; font-size: 1.08rem; }
th, td { padding: 13px 14px 13px 0; border-bottom: 1px solid var(--trait); text-align: left; vertical-align: middle; }
th:last-child, td:last-child { padding-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
th { font-weight: 700; font-size: 1.02rem; color: var(--second); border-bottom: 2px solid var(--trait-fort); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:hover { background: rgba(196, 43, 56, .07); }
tr.total td { font-weight: 700; }
table caption { text-align: left; font-weight: 700; padding: 10px 0; }
.positif { color: var(--vert); } .negatif { color: var(--rouge); }

/* ---- Figures (src/figures.js) ------------------------------------------------------------------------------------ */
.figure { max-width: 880px; margin: 36px 0; padding: 28px 32px 22px; background: var(--blanc); border-radius: var(--rayon); }
.figure figcaption { margin-bottom: 14px; }
.figure figcaption strong { display: block; font: 700 1.2rem/1.3 var(--titre); }
.figure figcaption span { display: block; font-size: .98rem; color: var(--doux); margin-top: 4px; }
.figure-svg { width: 100%; height: auto; display: block; overflow: visible; }
.figure-svg text { font-family: var(--sans); font-size: 13.5px; font-weight: 400; }
.figure-svg .axe { fill: var(--doux); }
.figure-svg .valeur, .figure-svg .etiquette { fill: var(--encre); font-weight: 600; }
.figure-svg .grille { stroke: rgba(22, 40, 74, .1); stroke-width: 1; }
.figure-svg .base { stroke: var(--trait-fort); stroke-width: 1.5; }
.figure-svg .separateur { stroke: var(--doux); stroke-width: 1; stroke-dasharray: 3 4; }
.figure-svg .marque path { fill: var(--serie1); }
.figure-svg .marque.accent path { fill: var(--serie2); }
.figure-svg .marque .cible { fill: transparent; }
.figure-svg .marque:hover path { fill: var(--encre); }
.figure-svg .marque:hover .cible { fill: rgba(196, 43, 56, .1); }
.figure-svg .reference { fill: none; stroke: var(--serie2); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.figure-svg .trace { fill: none; stroke: var(--serie1); stroke-width: 2; stroke-linejoin: round; }
.figure-svg .point circle, .figure-svg .point-legende { fill: var(--serie2); stroke: var(--blanc); stroke-width: 2; }
.figure-svg .point:hover circle { fill: var(--encre); }
.nuage-log .pt { fill: var(--serie1); fill-opacity: .3; }
.figure .valeurs { margin-top: 12px; }
.figure .valeurs summary { cursor: pointer; padding: 10px 0; font-weight: 600; font-size: .95rem; color: var(--accent-texte); }
.figure .valeurs .tableau { max-height: 380px; overflow: auto; padding: 0; }
.figure .source { font-size: .88rem; line-height: 1.55; color: var(--doux); margin: 6px 0 0; padding-top: 12px; border-top: 1px solid var(--trait); }
.prose .figure { max-width: var(--mesure); }

/* ---- Lecture : articles et pages de texte ------------------------------------------------------------------------ */
.prose { max-width: var(--mesure); font-size: 1.2rem; line-height: 1.8; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.prose h3 { font-size: 1.45rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .4em 0; }
.prose blockquote { margin: 1.4em 0; padding: 18px 24px; border-radius: 18px; background: var(--pale); }
.prose table { font-size: 1.05rem; }
pre { overflow-x: auto; max-width: 100%; background: var(--blanc); border-radius: 16px; padding: 16px 20px; margin: 1.2em 0; font-size: 1.05rem; }
.formule { overflow-x: auto; background: var(--blanc); border-radius: 16px; padding: 16px 20px; font: 1.2rem/1.7 Consolas, monospace; }
.formule sub, .formule sup { font-size: .85em; }
.formule sub sub, .formule sup sup { font-size: 100%; }
.article-grille { display: grid; grid-template-columns: minmax(0, var(--mesure)) minmax(0, 300px); gap: 50px; align-items: start; }
.article-grille > * { min-width: 0; }
.article-marge { position: sticky; top: 20px; }
@media (max-width: 1060px) { .article-grille { grid-template-columns: 1fr; gap: 0; } .article-marge { position: static; order: -1; } }
.sommaire { background: var(--blanc); border-radius: var(--rayon); padding: 22px 26px; margin: 0 0 26px; }
.sommaire strong { display: block; font-weight: 700; color: var(--second); margin-bottom: 8px; }
.sommaire ol { margin: 0; padding-left: 24px; }
.sommaire li { padding: 0; font-size: 1.08rem; line-height: 1.35; }
.sommaire li a { display: block; padding: 9px 0; }
.sommaire a { text-decoration: none; }
.sommaire a:hover { text-decoration: underline; }
.photo-article { margin: 0 0 28px; max-width: var(--mesure); }
.photo-article img { display: block; width: 100%; height: auto; border-radius: var(--rayon); background: var(--pale); }
.photo-article figcaption { font-size: .95rem; color: var(--doux); margin-top: 8px; }
.photo-article figcaption a { color: var(--doux); }
.encart-fin { background: var(--pale); border-radius: var(--rayon); padding: 28px 32px; margin: 40px 0 0; max-width: var(--mesure); display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: center; }
.encart-fin h3 { margin: 0 0 6px; font-size: 1.6rem; }
.encart-fin p { margin: 0; color: var(--doux); }
.encart-fin .actions { margin: 0; }
@media (max-width: 760px) { .encart-fin { grid-template-columns: 1fr; } }

/* Listes d'articles : cartes avec photo */
.revue { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; margin: 10px 0 20px; }
.revue a { display: flex; flex-direction: column; background: var(--blanc); border-radius: var(--rayon); overflow: hidden; text-decoration: none; color: var(--texte); transition: transform .15s; }
.revue a:hover { transform: translateY(-3px); color: var(--texte); }
.revue a:hover h3 { color: var(--accent-texte); }
.revue .num { display: none; }
.revue img { order: -1; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.revue a > div { padding: 20px 24px 24px; }
.revue h3 { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.25; }
.revue p { margin: 0; color: var(--doux); font-size: 1.05rem; }
.revue .meta { margin: 12px 0 0; font-size: 1rem; font-weight: 700; color: var(--second); }
.une-article { margin: 6px 0 24px; }
.une-article a { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); background: var(--blanc); border-radius: var(--rayon); overflow: hidden; text-decoration: none; color: var(--texte); }
.une-article a.sans-photo { grid-template-columns: 1fr; }
.une-article img { width: 100%; height: auto; display: block; align-self: center; }
.une-article a > div { padding: 30px 34px; align-self: center; }
.une-article h3 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); margin: 6px 0 12px; }
.une-article p { color: var(--doux); }
.une-article .meta { font-weight: 700; color: var(--second); margin: 0; }
.une-article a:hover h3 { color: var(--accent-texte); }
@media (max-width: 760px) { .une-article a { grid-template-columns: 1fr; } }
.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.filtres a { text-decoration: none; padding: 11px 18px; border-radius: 999px; background: var(--blanc); font-weight: 700; font-size: 1.05rem; }
.filtres a:hover, .filtres a[aria-current="page"] { background: var(--pale); color: var(--encre); }

/* ---- Accueil ----------------------------------------------------------------------------------------------------- */
.section { padding: 88px 0; }
.section.claire { background: var(--blanc); }
.section h2 { margin-top: 0; }
.intro { font-size: 1.2rem; line-height: 1.75; color: var(--doux); max-width: 720px; margin: 0 0 34px; }
.accroche { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 72px; padding: 64px 0 88px; align-items: center; }
@media (max-width: 960px) { .accroche { grid-template-columns: 1fr; gap: 34px; padding-top: 20px; } }
.accroche h1 { font-size: clamp(2.2rem, 4.4vw, 3.3rem); line-height: 1.12; margin: 0 0 26px; }
.accroche h1 span { color: var(--accent-texte); }
.accroche .chapo { font-size: 1.22rem; line-height: 1.75; margin-bottom: 36px; }
.accroche .slogan { display: inline-block; font-weight: 700; color: var(--second); margin-bottom: 14px; font-size: 1.15rem; }
.ticket-tirage .gros { font: 700 clamp(2.6rem, 5vw, 3.4rem)/1 var(--titre); color: var(--encre); margin: 10px 0 18px; }
.ticket-tirage .r, .ligne-chiffre { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--trait-fort); font-size: 1.07rem; }
.ticket-tirage .r b { white-space: nowrap; }
.ligne-chiffre b { text-align: right; }
.ticket-tirage .plus { display: inline-block; background: var(--accent); color: var(--sur-accent); font-weight: 700; padding: 4px 12px; border-radius: 999px; margin-left: 6px; font-size: 1rem; }
.ticket-tirage .souche-valeur { font-size: 1.15rem; line-height: 1.5; }
.registre { width: 100%; font-size: 1.05rem; }
.registre td { border-bottom: 1px solid var(--trait); padding: 9px 10px 9px 0; }
.registre td:nth-child(3) { width: 30%; padding-right: 0; }
.registre tbody tr:hover { background: none; }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
@media (max-width: 900px) { .duo { grid-template-columns: 1fr; gap: 30px; } }
.histoire { background: var(--encre); color: #E3E8F2; border-radius: var(--rayon); padding: 34px 38px; }
.histoire h3 { color: #fff; font-size: 1.45rem; margin: 0 0 14px; }
.histoire .grand { display: block; font: 700 clamp(2.2rem, 4vw, 2.8rem)/1 var(--titre); color: var(--accent-clair); margin: 6px 0 14px; }
.histoire a { color: #fff; }
.histoire .rubrique, .engagements .rubrique { color: var(--accent-clair); }
.etapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 900px) { .etapes { grid-template-columns: 1fr; } }
.etapes .carte h3 { margin: 0 0 12px; font-size: 1.3rem; }
.etapes .carte p { margin: 0; color: var(--doux); }
ul.faits { padding-left: 24px; margin: 14px 0; max-width: 820px; }
ul.faits li { margin: 0 0 12px; }
.engagements { background: var(--encre); color: #E3E8F2; border-radius: var(--rayon); padding: 30px 34px; }
.engagements h3 { color: #fff; margin: 0 0 12px; }
.engagements ul { padding-left: 22px; margin: 0; } .engagements li { margin: 0 0 12px; }
.engagements a { color: #fff; }

/* Bloc illustré (illustrations d'origine, jamais recadrées) */
.bloc-illustre { align-items: center; margin: 12px 0 34px; }
.illustration { display: block; width: 100%; max-width: var(--mesure); height: auto; border-radius: var(--rayon); margin: 10px 0 34px; }
.bloc-illustre .illustration { margin: 0; }

/* ---- Analyse : jauge de popularité ------------------------------------------------------------------------------- */
.analyse-grille { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; align-items: start; margin-bottom: 20px; }
@media (max-width: 960px) { .analyse-grille { grid-template-columns: 1fr; } }
.formulaire-bulletin { background: var(--blanc); border-radius: var(--rayon); padding: 30px 32px; }
.verdict { font: 700 clamp(1.6rem, 2.6vw, 2rem)/1.3 var(--titre); color: var(--encre); margin: 10px 0 18px; }
.verdict span { color: var(--accent-texte); }
.jauge { height: 20px; border-radius: 10px; background: linear-gradient(90deg, var(--pop0), var(--pop2), var(--pop3), var(--pop5), var(--pop6)); position: relative; margin: 14px 0 6px; }
.jauge u { position: absolute; top: -8px; width: 8px; height: 36px; border-radius: 4px; background: var(--encre); box-shadow: 0 0 0 3px var(--blanc); margin-left: -4px; }
.jauge .pos0 { left: 2%; } .jauge .pos1 { left: 11.6%; } .jauge .pos2 { left: 21.2%; } .jauge .pos3 { left: 30.8%; } .jauge .pos4 { left: 40.4%; } .jauge .pos5 { left: 50%; }
.jauge .pos6 { left: 59.6%; } .jauge .pos7 { left: 69.2%; } .jauge .pos8 { left: 78.8%; } .jauge .pos9 { left: 88.4%; } .jauge .pos10 { left: 98%; }
.jauge-legende { display: flex; justify-content: space-between; font-weight: 700; font-size: 1rem; color: var(--doux); margin-bottom: 18px; }

/* ---- Tarifs ------------------------------------------------------------------------------------------------------ */
.tarifs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; margin: 10px 0 30px; }
@media (max-width: 900px) { .tarifs { grid-template-columns: 1fr; } }
.tarifs .ticket { display: flex; flex-direction: column; background: var(--blanc); }
.tarifs .ticket-corps { flex: 1; }
.tarifs .ticket.mise-en-avant { background: var(--pale); box-shadow: inset 0 0 0 3px var(--accent); }
.prix { font: 700 3rem/1 var(--titre); margin: 10px 0 6px; }
.prix small { font: 400 1.05rem var(--sans); color: var(--doux); }
.formule-tarif ul { padding: 0; list-style: none; margin: 16px 0 0; }
.formule-tarif li { padding: 9px 0 9px 32px; position: relative; border-top: 1px solid var(--trait); font-size: 1.1rem; }
.formule-tarif li::before { content: "✓"; position: absolute; left: 2px; top: 8px; font-weight: 700; color: var(--accent-texte); }

/* ---- Labo ------------------------------------------------------------------------------------------------------- */
.planches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 10px 0 30px; counter-reset: planche; }
@media (max-width: 800px) { .planches { grid-template-columns: 1fr; } }
.planches a { counter-increment: planche; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; padding: 28px 30px; background: var(--blanc); border-radius: var(--rayon); text-decoration: none; color: var(--encre); align-items: start; transition: transform .15s; }
.planches a:hover { transform: translateY(-2px); color: var(--encre); }
.planches a::before { content: counter(planche); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--sur-accent); font: 700 1.1rem var(--titre); }
.planches h3 { margin: 4px 0 8px; font-size: 1.25rem; }
.planches p { margin: 0; color: var(--doux); }
.grille-validation { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.grille-validation .figure { margin: 0; }
@media (max-width: 900px) { .grille-validation { grid-template-columns: 1fr; } }
.chiffres { gap: 14px; margin-top: 14px; }
.chiffres .libelle { display: block; font-weight: 700; color: var(--second); font-size: 1rem; }
.chiffres .valeur { display: block; font: 700 2rem/1.15 var(--titre); }

/* ---- Pages de message --------------------------------------------------------------------------------------------- */
.message-centre { padding: 40px 0; max-width: 680px; }
.code-erreur { font: 700 6rem/1 var(--titre); color: var(--accent-texte); margin: 0; }

/* ---- Pied de page ------------------------------------------------------------------------------------------------- */
.pied { flex-shrink: 0; background: var(--encre); color: #D3DAE8; font-size: 1.08rem; margin-top: 30px; }
.pied a { color: #fff; text-decoration-color: rgba(244, 167, 160, .7); }
.pied a:hover { color: var(--accent-clair); }
.colonnes-pied { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 36px; padding: 50px 0 36px; }
@media (max-width: 900px) { .colonnes-pied { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .colonnes-pied { grid-template-columns: 1fr; } }
.pied h4 { color: #fff; font: 700 1.35rem var(--titre); }
.pied ul { list-style: none; padding: 0; margin: 0; } .pied li a { display: inline-block; padding: 7px 0; }
.marque-pied .marque { display: inline-block; margin-bottom: 14px; }
.marque-pied .marque .logo { height: 52px; }
.marque-pied .baseline { font: 700 1.3rem/1.3 var(--titre); color: #fff; margin-bottom: 12px; }
.aide { background: #22365C; border-radius: 18px; padding: 18px 22px; color: #fff; margin-top: 16px; }
.bas-pied { border-top: 1px solid rgba(255, 255, 255, .14); padding: 16px 0 20px; font-size: 1rem; }
.bas-pied .largeur { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; }
.bas-pied button.lien { color: #fff; }
.saviez.grille-3 { grid-template-columns: 1fr; gap: 12px; }

.duo > *, .grille-2 > *, .grille-3 > *, .accroche > *, .analyse-grille > * { min-width: 0; }
details > summary { cursor: pointer; padding: 10px 0; }
.histoire .lien-fleche { color: #fff; }
.section.claire .carte, .section.claire .tuile { background: var(--creme); }

/* Alignement : sur les pages de données, textes, tableaux et figures partagent la même colonne */
.contenu > .tableau, .contenu > p, .contenu > ul, .contenu > .figure, .contenu > .grille-validation { max-width: 880px; }
.entete-labo { align-items: center; margin-bottom: 40px; }
.entete-labo .titre-page { margin: 0; }
.entete-labo .illustration { margin: 0; }

/* ---- Questions fréquentes (page Aide) ---- */
details.question { background: var(--blanc); border-radius: 16px; margin: 0 0 10px; padding: 0 22px; }
details.question > summary { list-style: none; position: relative; padding: 16px 32px 16px 0; font-weight: 600; color: var(--encre); }
details.question > summary::-webkit-details-marker { display: none; }
details.question > summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 700 1.4rem/1 var(--titre); color: var(--accent-texte); }
details.question[open] > summary::after { content: "−"; }
details.question > div { padding: 0 0 6px; border-top: 1px solid var(--trait); }
details.question > div p { margin: 14px 0; }

/* ---- Emblème (anneau et trèfle) ---- */
.ticket-tirage { position: relative; }
.ticket-tirage > .embleme { position: absolute; top: 26px; right: 28px; width: 54px; height: 54px; }
.ticket-tirage .ticket-corps > .rubrique { padding-right: 70px; display: inline-block; }
.ornement { display: flex; align-items: center; gap: 18px; margin: 44px 0 36px; }
.ornement::before, .ornement::after { content: ""; flex: 1; height: 1px; background: var(--trait-fort); }
.ornement .embleme { width: 34px; height: 34px; flex: none; }
