/* ==========================================================
   Temple de la Renommée du Mème Québécois
   Feuille de style statique — tokens repris du design Stitch
   Aucune dépendance externe hors polices Google.
   ========================================================== */

/* ---------- 1. Tokens ---------- */
/* Polices declarees dans polices.css (auto-hebergees, genere par
   outils/polices.py). Aucune requete vers Google Fonts. */
:root {
  /* Primaire — bleu glacier */
  --primary: #a2c9ff;
  --primary-container: #3394f1;
  --primary-fixed: #d3e4ff;
  --primary-fixed-dim: #a2c9ff;
  --on-primary: #00315b;
  --on-primary-container: #002b50;
  --on-primary-fixed: #001a42;
  --on-primary-fixed-variant: #004881;
  --on-primary-container-alt: #002b50;
  --inverse-primary: #0060a8;

  /* Secondaire — or muséal */
  --secondary-container: #ffdb3c;
  --secondary-fixed: #ffe16d;
  --secondary-fixed-dim: #e9c400;
  /* Texte pose sur les aplats or. Le modele d'origine utilisait
     #725f00, a 4,61:1 — juste AA. #524200 atteint 7,2:1 (AAA) sans
     changer la teinte du bouton. */
  --on-secondary-container: #524200;
  --on-secondary-fixed: #221b00;
  --on-secondary: #3a3000;
  --secondary: #fff9ef;

  /* Tertiaire */
  --tertiary: #adc6ff;
  --tertiary-container: #7090d3;
  --on-tertiary: #002e6a;

  /* Erreur */
  --error: #ffb4ab;
  --error-container: #93000a;
  --on-error-container: #ffdad6;

  /* Surfaces */
  --background: #10141a;
  --surface: #10141a;
  --surface-container-lowest: #0a0e14;
  --surface-container-low: #181c22;
  --surface-container: #1c2026;
  --surface-container-high: #262a31;
  --surface-container-highest: #31353c;
  --surface-bright: #353940;
  --on-surface: #dfe2eb;
  --on-surface-variant: #c0c7d4;
  --outline: #8a919e;
  --outline-variant: #404752;
  --inverse-surface: #dfe2eb;
  --inverse-on-surface: #2d3137;

  /* Typographie */
  --font-titre: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-texte: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;

  /* Rythme */
  --gutter: 1.5rem;
  --es-xs: 0.25rem;
  --es-sm: 0.5rem;
  --es-md: 1rem;
  --es-lg: 1.5rem;
  --es-xl: 2.5rem;
  --es-mega: 3rem;

  /* Formes */
  --r-s: 0.75rem;
  --r-m: 1rem;
  --r-l: 2rem;
  --r-full: 9999px;

  --entete-h: 80px;
  --largeur-max: 1440px;

  --halo-or: 0 0 35px -4px rgba(255, 219, 60, 0.45);
  --halo-or-doux: 0 0 24px -4px rgba(255, 219, 60, 0.35);
  --halo-bleu: 0 0 24px -4px rgba(51, 148, 241, 0.35);
  --ombre-carte: 0 10px 30px -12px rgba(0, 0, 0, 0.65);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--entete-h) + 1rem);
}

body {
  margin: 0;
  background: var(--background);
  color: var(--on-surface);
  font-family: var(--font-texte);
  font-size: 15px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg, iframe, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
/* `font: inherit` ne reinitialise pas la couleur : sans cette ligne,
   le navigateur impose `color: buttontext` (noir) sur les <button>,
   ce qui rend le texte illisible sur le theme sombre. Les boutons qui
   ont leur propre couleur la redéfinissent et restent inchangés. */
button { font: inherit; cursor: pointer; color: inherit; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.saut-contenu {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  padding: var(--es-md) var(--es-lg);
  z-index: 200;
  border-radius: 0 0 var(--r-m) 0;
  font-weight: 700;
}
.saut-contenu:focus { left: 0; }

/* ---------- 3. Typographie ---------- */
.t-hero {
  font-family: var(--font-titre);
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 var(--es-md);
  text-wrap: balance;
}
.t-1 {
  font-family: var(--font-titre);
  font-size: clamp(30px, 4.5vw, 44px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--es-sm);
}
.t-2 {
  font-family: var(--font-titre);
  font-size: 28px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 var(--es-xs);
}
.t-3 {
  font-family: var(--font-titre);
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  margin: 0 0 4px;
}
.t-corps-l { font-size: 18px; line-height: 28px; }
.t-corps   { font-size: 15px; line-height: 24px; }
.t-petit    { font-size: 13px; line-height: 20px; }
.t-etiquette {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.t-etiquette-l {
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }

/* Jeu d'icones : Material Icons (auto-heberge, 125 Ko). Les ligatures
   transforment <span class="sym">search</span> en glyphe. Sans ce bloc,
   le mot s'affiche tel quel en clair. */
.sym,
.material-icons,
.material-symbols-outlined {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  user-select: none;
}
.muet { color: var(--on-surface-variant); }
.or   { color: var(--secondary-fixed); }
.bleu { color: var(--primary); }
.italique { font-style: italic; }
.equilibre { text-wrap: balance; }

/* ---------- 4. Structure ---------- */
.conteneur {
  width: 100%;
  max-width: var(--largeur-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.principal { padding-top: var(--entete-h); flex: 1; }
.section { padding-block: var(--es-xl); }
.section-basse { background: var(--surface-container-lowest); }
.rangee { display: flex; gap: var(--es-md); align-items: center; flex-wrap: wrap; }
.rangee-serree { display: flex; gap: var(--es-xs); align-items: center; flex-wrap: wrap; }
.entre { justify-content: center; }
.colonne { display: flex; flex-direction: column; gap: var(--es-md); }
.pile { display: flex; flex-direction: column; }

/* Utilitaire de positionnement. Les decors qui doivent rester
   confines a leur conteneur en dependent : sans cela, un halo sans
   position s'echappe de overflow:hidden et fait deborder la page. */
.relative { position: relative; }

.grille { display: grid; gap: var(--es-lg); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ColonnesEditoriales (12 colonnes de grille).
   Ces classes existent pour que la coupure mobile puisse les
   remplacer : un `grid-column` en style inline resterait
   prioritaire sur la media query et le deborderait. */
.col-5 { grid-column: span 5; }
.col-7 { grid-column: span 7; }

/* --- Pied de page : grille explicite, pas de 12 colonnes ---
   Proportions du modele : 5 (presentation) + 2 + 2 (liens) + 3.
   11 gouttieres de 2,5 rem ne tiennent pas dans un telephone ;
   la grille se replie 4 colonnes -> 2 -> 1. */
.pied-grille { grid-template-columns: repeat(12, 1fr); }
.pied-col { grid-column: span 3; }
.pied-col.c2 { grid-column: span 2; }
.pied-col.c5 { grid-column: span 5; }

/* --- Fiche : bento 3 / 5 / 4, empile sur petit ecran --- */
.grille-fiche { grid-template-columns: repeat(12, 1fr); }
.cellule { grid-column: span 12; }

.sur-titre { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--es-lg); flex-wrap: wrap; margin-bottom: var(--es-xl); }

/* Halos d'ambiance */
.halo { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0; }
.halo-bleu-g { background: rgba(162, 201, 255, 0.10); width: 700px; height: 400px; }
.halo-or-g   { background: rgba(255, 219, 60, 0.15);  width: 420px; height: 220px; }

/* ---------- 5. Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--es-sm);
  padding: var(--es-md) var(--es-xl);
  border-radius: var(--r-full);
  border: 0;
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .sym { font-size: 20px; }

.btn-or {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  box-shadow: var(--halo-or);
}
.btn-or:hover { background: var(--secondary-fixed); color: var(--on-secondary-fixed); }

.btn-fantome {
  background: var(--surface-container-highest);
  color: var(--primary);
}
.btn-fantome:hover { background: var(--surface-bright); color: var(--on-surface); }

.btn-bleu {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-bleu:hover { background: var(--primary-fixed); }

.btn-plein { width: 100%; }

.btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--es-xs);
  padding: var(--es-sm) var(--es-lg);
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface-container-high);
  color: var(--on-surface);
  font-size: 14px;
  letter-spacing: 0.06em;
  font-weight: 600;
  transition: background-color .18s ease, color .18s ease;
}
.btn-mini:hover { background: var(--primary); color: var(--on-primary); }

.btn-fantome-plein {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface-container-high);
  color: var(--on-surface);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--es-xs);
  transition: background-color .18s ease, color .18s ease;
}
.btn-fantome-plein:hover { background: var(--primary); color: var(--on-primary); }
.btn-fantome-plein[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* Combinaisons de boutons.
   `.btn-mini` est declare apres les variantes de couleur : sans ce
   bloc, un `class="btn btn-or btn-mini"` (bouton de l'en-tete)
   perdait sa couleur d'accent et restait neutre. Les combinaisons
   sont donc regroupees ici, apres les deux definitions. */
.btn.btn-or {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  box-shadow: var(--halo-or-doux);
}
.btn.btn-or:hover {
  background: var(--secondary-fixed);
  color: var(--on-secondary-fixed);
}
.btn.btn-fantome {
  background: var(--surface-container-highest);
  color: var(--primary);
}
.btn.btn-fantome:hover { background: var(--surface-bright); color: var(--on-surface); }
.btn.btn-bleu { background: var(--primary); color: var(--on-primary); }
.btn.btn-bleu:hover { background: var(--primary-fixed); }

.btn-pastille {
  width: 40px; height: 40px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface-container-low);
  color: var(--on-surface-variant);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .18s ease, color .18s ease;
}
.btn-pastille:hover { background: var(--surface-container-high); color: var(--on-surface); }

/* ---------- 6. Pastilles / badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px var(--es-md);
  border-radius: var(--r-full);
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-or {
  background: rgba(255, 219, 60, 0.16);
  color: var(--secondary-container);
}
.badge-or-plein { background: var(--secondary-container); color: var(--on-secondary-container); }
.badge-bleu { background: rgba(162, 201, 255, 0.14); color: var(--primary); }
.badge-neutre { background: var(--surface-container); color: var(--on-surface-variant); }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--surface-container);
  color: var(--on-surface-variant);
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag-or { background: var(--surface-container); color: var(--secondary-container); }

.puce-registre {
  display: inline-flex;
  align-items: center;
  gap: var(--es-xs);
  padding: var(--es-xs) var(--es-sm);
  border-radius: var(--r-full);
  background: var(--surface-container-high);
  color: var(--on-surface-variant);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
}

.mention {
  display: inline-flex;
  align-items: center;
  gap: var(--es-xs);
  padding: 6px var(--es-md);
  border-radius: var(--r-full);
  background: var(--surface-container-high);
  color: var(--secondary-container);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
}

/* ---------- 7. En-tête ---------- */
.entete {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--entete-h);
  background: rgba(16, 20, 26, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}
.entete-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--es-md);
}
.marque {
  display: flex;
  align-items: center;
  gap: var(--es-sm);
  flex-shrink: 0;
}
.marque img { height: 32px; width: auto; }
.marque-txt { display: flex; flex-direction: column; }
.marque-txt .t-3 { transition: color .18s ease; }
.marque:hover .t-3 { color: var(--primary); }
.marque-sous {
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-top: -2px;
}

.nav-pilules {
  display: none;
  align-items: center;
  gap: var(--es-xs);
  padding: var(--es-xs);
  border-radius: var(--r-full);
  background: rgba(10, 14, 20, 0.7);
  backdrop-filter: blur(12px);
}
.nav-pilules a {
  padding: var(--es-xs) var(--es-md);
  border-radius: var(--r-full);
  font-size: 14px;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--on-surface-variant);
  transition: background-color .18s ease, color .18s ease;
}
.nav-pilules a:hover { background: var(--surface-container); color: var(--on-surface); }
.nav-pilules a[aria-current="page"] { background: var(--surface-container-high); color: var(--primary); font-weight: 700; }

.actions-entete { display: flex; align-items: center; gap: var(--es-sm); flex-shrink: 0; }
.btn-bascule-menu { display: inline-flex; }

.avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: var(--primary);
  color: var(--on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Menu mobile */
.menu-mobile {
  position: fixed;
  inset: var(--entete-h) 0 auto 0;
  z-index: 55;
  background: var(--surface-container-lowest);
  border-bottom: 1px solid var(--outline-variant);
  padding: var(--es-md) var(--gutter) var(--es-lg);
  display: none;
  flex-direction: column;
  gap: var(--es-xs);
}
.menu-mobile.ouvert { display: flex; }
.menu-mobile a {
  padding: var(--es-md);
  border-radius: var(--r-m);
  font-size: 18px;
  color: var(--on-surface-variant);
}
.menu-mobile a[aria-current="page"] { background: var(--surface-container-high); color: var(--primary); font-weight: 700; }

/* ---------- 8. Héros ---------- */
.heros {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: 3rem var(--es-xl);
  background: linear-gradient(180deg, var(--surface-container-lowest) 0%, var(--surface) 55%, var(--surface-container-low) 100%);
}
.heros-inner { position: relative; z-index: 2; width: 100%; display: flex; flex-direction: column; align-items: center; }
.heros .halo-bleu-g { top: 25%; left: 50%; transform: translate(-50%, -50%); }
.heros .halo-or-g { top: 38%; left: 50%; transform: translateX(-50%); filter: blur(90px); }

.degrade-texte {
  background: linear-gradient(90deg, var(--primary), var(--primary-container), var(--secondary-container));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stats {
  width: 100%;
  max-width: 896px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--es-md);
  padding: var(--es-md);
  border-radius: var(--r-l);
  background: rgba(10, 14, 20, 0.8);
  backdrop-filter: blur(24px);
  box-shadow: var(--ombre-carte);
}
.stat { display: flex; flex-direction: column; align-items: center; padding: var(--es-sm); }
.stat-val {
  font-family: var(--font-titre);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stat-val .unite { font-family: var(--font-texte); font-size: 14px; letter-spacing: .06em; font-weight: 600; }

/* ---------- 9. Cartes d'intronisés ---------- */
.carte {
  display: flex;
  flex-direction: column;
  padding: var(--es-lg);
  border-radius: var(--r-l);
  background: var(--surface-container-low);
  box-shadow: var(--ombre-carte);
  transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.carte:hover { transform: translateY(-3px); box-shadow: 0 0 35px -4px rgba(255, 219, 60, 0.3); }

/* Le vignette entier est cliquable ; le bouton d'action est un
   lien frere pose par-dessus. Deux liens distincts, jamais imbriques. */
.carte-media-zone { position: relative; }

.carte-media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--surface-container);
  margin-bottom: var(--es-md);
}
.carte-media:hover { box-shadow: inset 0 0 0 1px rgba(162, 201, 255, .25); }
.carte-media:focus-visible {
  box-shadow: inset 0 0 0 2px var(--primary);
  border-radius: var(--r-m);
}

/* Bouton pose sur le vignette, en haut a droite. */
.carte-cta {
  position: absolute;
  top: var(--es-sm);
  right: var(--es-sm);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: blur(12px);
  color: var(--on);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border: 1px solid var(--outline-variant);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.carte-cta:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.carte-entete { display: flex; align-items: center; justify-content: space-between; gap: var(--es-sm); margin-bottom: var(--es-md); flex-wrap: wrap; }

.vignette {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 25%, hsla(var(--teinte, 210), 60%, 42%, .55), transparent 60%),
    radial-gradient(circle at 75% 80%, hsla(calc(var(--teinte, 210) + 40), 70%, 38%, .45), transparent 65%),
    linear-gradient(150deg, var(--surface-container), var(--surface-container-lowest));
  font-family: var(--font-titre);
  font-size: 3rem;
  font-weight: 800;
  color: rgba(223, 226, 235, 0.85);
  letter-spacing: -0.03em;
}
.vignette img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* La pastille audio n'est plus un lien : c'est un habillage du
   vignette, qui est elle-meme cliquable. */
.legende-audio {
  position: absolute;
  left: var(--es-sm);
  right: var(--es-sm);
  bottom: var(--es-sm);
  display: flex;
  align-items: center;
  gap: var(--es-sm);
  padding: var(--es-sm) var(--es-md);
  border-radius: var(--r-full);
  background: rgba(10, 14, 20, 0.9);
  backdrop-filter: blur(12px);
  color: var(--secondary-fixed);
  border: 0;
  text-align: left;
  transition: background-color .2s ease, color .2s ease;
}
.legende-audio:hover { background: var(--secondary-container); color: var(--on-secondary-container); }
.legende-audio .sym { flex: 0 0 auto; }
.legende-txt {
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* La pastille audio ne porte plus de forme d'onde : l'icone de
   lecture suffit a signaler le media, et la citation peut respirer. */

.replique { color: var(--primary); font-style: italic; margin: 0 0 var(--es-sm); }
.resume {
  color: var(--on-surface-variant);
  font-size: 13px;
  line-height: 20px;
  flex: 1;
  margin: 0 0 var(--es-md);
}
.carte-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--es-md); }

/* ---------- 10. Candidats & vote ---------- */

/* (Le bandeau de scrutin de l accueil a ete supprime : ce bloc
   commence directement a la grille des cartes.) */

.candidat {
  display: flex;
  flex-direction: column;
  padding: var(--es-md);
  border-radius: var(--r-l);
  background: var(--surface-container);
  box-shadow: var(--ombre-carte);
  transition: box-shadow .25s ease;
}
.candidat:hover { box-shadow: 0 0 24px -4px rgba(162, 201, 255, 0.3); }
.candidat-media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-m);
  overflow: hidden;
  margin-bottom: var(--es-sm);
  background: var(--surface-container-high);
}
.part {
  position: absolute;
  top: var(--es-xs);
  right: var(--es-xs);
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: rgba(10, 14, 20, 0.82);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

.jauge {
  width: 100%;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--surface-container-highest);
  overflow: hidden;
  margin-bottom: var(--es-sm);
}
.jauge-barre {
  height: 100%;
  background: var(--secondary-container);
  transition: width .7s ease;
}
.jauge-barre.bleue { background: var(--primary); }
.jauge-barre.grise { background: var(--surface-bright); }

.jauge-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: .08em;
  margin-bottom: var(--es-sm);
  color: var(--on-surface-variant);
}

.candidat.vote-ok .jauge-barre { background: var(--secondary-fixed); }

/* Modale de confirmation de vote */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--es-md);
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: blur(16px);
}
.modal.ouvert { display: flex; }
.modal-boite {
  position: relative;
  width: 100%;
  max-width: 672px;
  padding: var(--es-xl);
  border-radius: var(--r-l);
  background: var(--surface-container-high);
  box-shadow: 0 24px 70px -12px rgba(0, 0, 0, .8);
  max-height: 88vh;
  overflow-y: auto;
}
.modal-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--es-md); padding-bottom: var(--es-sm); margin-bottom: var(--es-md); }
.modal-titre { display: flex; align-items: center; gap: var(--es-xs); color: var(--secondary-container); }
.modal-titre h3 { margin: 0; color: var(--on-surface); }
.modal-fermer {
  width: 32px; height: 32px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface-container);
  color: var(--on-surface-variant);
  flex-shrink: 0;
}
.modal-fermer:hover { color: var(--on-surface); }

.p-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  z-index: 95;
  display: flex;
  align-items: center;
  gap: var(--es-sm);
  padding: var(--es-md) var(--es-lg);
  border-radius: var(--r-full);
  background: var(--surface-container-high);
  border: 1px solid var(--outline-variant);
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, .8);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  max-width: min(92vw, 560px);
}
.p-toast.visible { opacity: 1; transform: translate(-50%, 0); }
.p-toast.succes { border-color: rgba(255, 219, 60, .5); color: var(--secondary-fixed); }
.p-toast.erreur  { border-color: rgba(255, 180, 171, .5); color: var(--error); }

/* ---------- 11. Piliers ---------- */
.pilier {
  padding: var(--es-lg);
  border-radius: var(--r-l);
  background: var(--surface-container-low);
  box-shadow: 0 6px 20px -10px rgba(0, 0, 0, .6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--es-md);
  transition: background-color .2s ease;
}
.pilier:hover { background: var(--surface-container); }
.pilier-icone {
  width: 48px; height: 48px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--es-md);
}
.pilier-pied {
  padding-top: var(--es-sm);
  margin-top: var(--es-md);
  border-top: 1px solid var(--outline-variant);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}

/* Citation en vedette */
.citation-vedette {
  position: relative;
  overflow: hidden;
  padding: var(--es-xl);
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--surface-container), var(--surface-container-high));
  box-shadow: var(--ombre-carte);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--es-lg);
}
.citation-vedette .sym-fantome {
  position: absolute;
  right: -32px; bottom: -32px;
  font-size: 180px;
  line-height: 1;
  color: rgba(255, 219, 60, 0.10);
  pointer-events: none;
}
.auteur { display: flex; align-items: center; gap: var(--es-md); }
.auteur-pastille {
  width: 48px; height: 48px;
  border-radius: var(--r-full);
  background: var(--primary-container);
  color: var(--on-primary-container);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-titre);
  font-weight: 700;
  flex-shrink: 0;
}
.temoignage {
  padding: var(--es-md);
  border-radius: var(--r-l);
  background: var(--surface-container-low);
  display: flex;
  flex-direction: column;
  gap: var(--es-xs);
}
.appel-soumettre {
  padding: var(--es-md);
  border-radius: var(--r-l);
  background: rgba(51, 148, 241, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--es-md);
  flex-wrap: wrap;
}

/* ---------- 12. Fiche ---------- */
.fil-ariane {
  display: flex;
  align-items: center;
  gap: var(--es-xs);
  font-size: 11px;
  letter-spacing: .08em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  flex-wrap: wrap;
}
.fil-ariane a:hover { color: var(--primary); }
.fil-ariane .sep { color: var(--outline-variant); }

.cadre-video {
  position: relative;
  padding: var(--es-sm);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--secondary-fixed), var(--surface-container-high) 45%, var(--surface-container-lowest));
  box-shadow: 0 0 50px -10px rgba(255, 219, 60, 0.35);
}
.cadre-video .ratio { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-l); overflow: hidden; background: var(--surface-container-lowest); }
.cadre-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lecteur {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--es-sm);
  background: linear-gradient(180deg, rgba(10, 14, 20, .45), rgba(10, 14, 20, .88));
}
/* La vignette du lecteur est en position absolue, donc elle se
   superpose au bouton de lecture qui, lui, reste dans le flux : sans
   ces deux corrections, l'image passe devant le bouton et avale le
   clic. On la rend transparente aux evenements et on remonte les
   controles. */
.cadre-video .vignette { pointer-events: none; z-index: 0; }
.btn-lecture,
.lecteur-hint { position: relative; z-index: 2; }
.cadre-video .bandeau-archive { z-index: 3; }

.btn-lecture {
  width: 96px; height: 96px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(255, 219, 60, 0.65);
  transition: transform .2s ease;
}
.btn-lecture:hover { transform: scale(1.08); }
.lecteur-hint {
  padding: var(--es-xs) var(--es-md);
  border-radius: var(--r-full);
  background: rgba(10, 14, 20, 0.9);
  font-size: 11px;
  letter-spacing: .08em;
  font-weight: 700;
  text-transform: uppercase;
}
.bandeau-archive {
  position: absolute;
  inset: var(--es-md) var(--es-md) auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--es-sm);
  pointer-events: none;
}

.grille-fiche { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--es-md); }
.cellule {
  /* Le span et les variantes l3 / l4 / l5 sont definis dans le
     bloc « Grilles editoriales » en haut de fichier, avec leurs
     coupures responsive. Ne pas redeclarer grid-column ici. */
  padding: var(--es-lg);
  border-radius: var(--r-l);
  background: var(--surface-container-low);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--es-md);
}
.cellule-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--es-sm); }
.cellule-mise { display: flex; flex-direction: column; gap: 4px; }
.valeur { font-family: var(--font-titre); font-size: 28px; line-height: 36px; font-weight: 700; color: var(--primary); }
.cellule-or { background: var(--surface-container); box-shadow: 0 0 24px -4px rgba(51, 148, 241, 0.2); }

.barre-outils { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--es-sm); }
.outil {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--es-sm);
  padding: var(--es-md);
  border: 0;
  border-radius: var(--r-l);
  background: var(--surface-container);
  text-align: left;
  transition: background-color .2s ease;
}
.outil:hover { background: var(--surface-container-high); }
.outil-icone {
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chrono { position: relative; padding-left: 1.5rem; display: flex; flex-direction: column; gap: var(--es-lg); }
.chrono::before {
  content: '';
  position: absolute;
  left: 8px; top: 10px; bottom: 10px;
  width: 2px;
  background: var(--surface-container-highest);
}
.jalon { position: relative; display: flex; flex-direction: column; gap: 4px; }
.jalon::before {
  content: '';
  position: absolute;
  left: -27px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--surface-container-high);
  box-shadow: 0 0 0 4px var(--background);
}
.jalon.accent::before { background: var(--primary-container); }
.jalon-or::before { background: var(--secondary-fixed); box-shadow: 0 0 0 4px var(--background), 0 0 16px #ffe16d; width: 16px; height: 16px; left: -28px; }

.graphique-jour { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--es-sm); height: 64px; }
.graphique-jour > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.graphique-jour .barre { width: 100%; border-radius: 4px 4px 0 0; background: var(--surface-container-high); min-height: 8px; }
.graphique-jour .jour { font-size: 10px; color: var(--outline); }

.tribune { padding: var(--es-lg); border-radius: var(--r-xl); background: var(--surface-container-low); }
.champ {
  width: 100%;
  padding: var(--es-sm) var(--es-md);
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface-container);
  color: var(--on-surface);
  font: inherit;
  font-size: 15px;
}
.champ:focus { outline: none; box-shadow: 0 0 0 2px var(--primary); }
.champ::placeholder { color: var(--outline); }
textarea.champ { border-radius: var(--r-m); resize: vertical; min-height: 120px; }
.champ-texte {
  border-radius: var(--r-s);
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
}
select.champ-texte { appearance: none; padding-right: 2rem; }

/* ---------- 13. Pied de page ---------- */
.pied { background: var(--surface-container-lowest); color: var(--on-surface); margin-top: var(--es-xl); }
.pied-grille { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--es-xl); padding-block: var(--es-xl) var(--es-lg); }
/* Le span des colonnes est défini dans le bloc « Grilles éditoriales ». */
.pied-col { display: flex; flex-direction: column; gap: var(--es-md); }
.pied-liens { display: flex; flex-direction: column; gap: var(--es-sm); }
.pied-liens a { color: var(--on-surface-variant); font-size: 15px; }
.pied-liens a:hover { color: var(--on-surface); }

/* Lien de retour dans l'administration : hauteur de ligne insuffisante
   pour un doigt, on lui donne une zone tactile confortable. */
.lien-retour {
  display: inline-block;
  padding: 10px 0;
  min-height: 40px;
}

/* Filtres du Panthéon : utilisés comme boutons, donc cliquables
   sur toute leur surface. */
.filtres .badge { padding: 10px 16px; letter-spacing: .06em; }
.tris .badge { padding-block: 8px; }
.pied-bas {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--es-md);
  padding-block: var(--es-lg);
  border-top: 1px solid var(--outline-variant);
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--on-surface-variant);
}
.pied-bas a:hover { color: var(--primary); }

/* Mention « icône + texte » du pied : l'icône reste sur la
   premiere ligne, le texte se replie sous elle. */
.pied-mention {
  display: flex;
  align-items: flex-start;
  gap: var(--es-sm);
}
.pied-mention > .sym { flex: 0 0 auto; margin-top: 2px; }
.pied-mention > span { min-width: 0; }

/* ---------- 14. État vide / divers ---------- */
.etat-vide {
  padding: var(--es-xl);
  border-radius: var(--r-l);
  background: var(--surface-container-low);
  text-align: center;
  color: var(--on-surface-variant);
}
.erreur-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--es-md);
  min-height: 55vh;
  text-align: center;
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 15. Adaptatif ---------- */
@media (max-width: 1279px) {
  .nav-pilules { display: none; }
  .btn-bascule-menu { display: inline-flex; }
}
@media (min-width: 1280px) {
  .btn-bascule-menu { display: none; }
  .menu-mobile { display: none !important; }
}
@media (max-width: 1023px) {
  .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .barre-outils { grid-template-columns: repeat(2, 1fr); }
  .pied-grille { grid-template-columns: repeat(2, 1fr); }
  .pied-col,
  .pied-col.c2,
  .pied-col.c5 { grid-column: 1 / -1; }
  .col-5, .col-7 { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  /* Bento de la fiche descriptive : 3 / 5 / 4 puis 4 / 4 / 4 */
  .cellule.l3 { grid-column: span 3; }
  .cellule.l4 { grid-column: span 4; }
  .cellule.l5 { grid-column: span 5; }
}
@media (max-width: 767px) {
  :root { --gutter: 1rem; --es-xl: 1.75rem; }
  .grille { gap: var(--es-md); }
  .g-3, .g-4 { grid-template-columns: 1fr; }
  .pied-grille { grid-template-columns: 1fr; gap: var(--es-xl); }
  .stats { grid-template-columns: 1fr; }
  .heros { padding-block: 2rem var(--es-xl); }
  .citation-vedette { padding: var(--es-lg); }
  .citation-vedette .sym-fantome { font-size: 120px; }
}
@media (max-width: 767px) {
  .barre-outils { grid-template-columns: 1fr; }
  .btn { padding: var(--es-md) var(--es-lg); }

  /* L'en-tête doit tenir sur telephone et tablette. On retire la
     recherche (deja presente dans le menu mobile), puis le libelle
     du bouton pour ne garder que l'icone. */
  .entete-actions .recherche-pastille { display: none; }
  .entete-actions .lbl { display: none; }
  .entete-actions .btn-or { padding: 10px 14px; }

  /* Cibles tactiles : 44 px de haut minimum sur petits ecrans. */
  .pied-liens a { display: block; padding-block: 10px; }
  .pied-bas a { display: inline-block; padding-block: 8px; }
}

@media (max-width: 479px) {
  /* Sous 480 px, le bouton d'action passe dans le menu mobile.
     Le sous-titre de la marque est conserve : c'est lui qui donne
     son ton au logo. On reduit la typo et les gouttieres pour
     que « TEMPLE DU MÈME QUÉBÉCOIS » tienne sur une ligne. */
  .entete-actions .btn-or { display: none; }
  .entete-inner { gap: 10px; }
  .marque { min-width: 0; gap: 9px; }
  .marque img { height: 28px; }
  .marque-txt { min-width: 0; }
  .marque-txt .t-3 { font-size: 13px; letter-spacing: -.015em; }
  .marque-sous { font-size: 10px; letter-spacing: .06em; margin-top: -3px; }
  .entete .conteneur { padding-inline: 12px; }
}

/* ---------- 16. Préférences de mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .entete, .pied, .menu-mobile, .p-toast { display: none !important; }
  .principal { padding-top: 0; }
  body { background: #fff; color: #000; }
}