/* G4G — styles de base & composants structurels (stylés UNIQUEMENT par tokens).
 *
 * ┌ DÉCISION D'OUTILLAGE (Phase 1, cf. prompt : « justifie ton choix ») ────────┐
 * │ CSS de composants + tokens — PAS Tailwind. Le doc 04 §7 proposait           │
 * │ Vite+Tailwind ; l'argument central du doc (§3) est « CSS minuscule ».       │
 * │ Or cette feuille fait déjà ~10 ko pour tout le site, largement sous le      │
 * │ budget (< 50 ko, doc 04 §10) — Tailwind résoudrait un problème qu'on n'a    │
 * │ pas, au prix de réécrire base.css + sections.css (275 réf. de tokens,       │
 * │ 16 blocs CMS testés) sans aucun gain visuel.                                │
 * │                                                                             │
 * │ Trois raisons de fond, au-delà du coût :                                    │
 * │  · Les blocs Wagtail réfèrent des classes SÉMANTIQUES (g4g-hero__heading).  │
 * │    C'est ce qui « verrouille sur la charte » un CMS de sections — des       │
 * │    utilitaires dans le StreamField rouvriraient exactement la porte que la  │
 * │    décision « pas de constructeur libre » a fermée.                         │
 * │  · Le JIT de Tailwind scanne des chaînes de classes ; en gabarits Django,   │
 * │    toute composition dynamique se fait purger en silence — panne classique  │
 * │    qui n'apparaît qu'en prod.                                               │
 * │  · Un composant = une classe = une ligne du /styleguide : le catalogue      │
 * │    reste lisible pour Claude Design, qui n'a pas à lire du Tailwind.        │
 * │                                                                             │
 * │ Node reste utilisé, mais UNIQUEMENT au build (sprite Lucide + polices,      │
 * │ cf. frontend/) : les artefacts sont versionnés, donc zéro dépendance à      │
 * │ l'exécution, zéro étape node en CI. Le doc 04 §2 prévoit explicitement      │
 * │ « un petit script svg-sprite + svgo » comme alternative à vite-plugin.      │
 * └─────────────────────────────────────────────────────────────────────────────┘
 */
* { box-sizing: border-box; }

/* [2026-10-13] « Affichage compact » (demande Alexandre) : reproduit un zoom navigateur à 80 %
   pour TOUT le site (met à l'échelle pixels, polices, images ; élargit les points de rupture).
   Appliqué UNIQUEMENT quand l'interrupteur staff `site.compact_zoom` est activé (classe posée sur
   le <body> par base.html) → repli immédiat = éteindre l'interrupteur dans Réglages, sans
   redéploiement. Défaut OFF → la parité mesure le design à l'échelle 1 (aucun re-calibrage). */
body.g4g-zoom-compact { zoom: 0.8; }

body {
  margin: 0;
  font-family: var(--g4g-font-sans);
  font-size: var(--g4g-text-base);
  line-height: var(--g4g-leading-normal);
  color: var(--g4g-text);
  background: var(--g4g-surface-alt);
  -webkit-font-smoothing: antialiased;
}

/* [2026-09-04] BARÈME TYPOGRAPHIQUE PILOTÉ PAR LE CMS (super-admin, bande bleue).
 * Les tailles/graisses viennent de variables réglables (tokens.css par défaut, remplacées
 * par un <style nonce> depuis common/typography.py). Appliqué aux ÉLÉMENTS DE BASE (h1–h4,
 * p — donc au contenu RichText et aux titres sans classe de taille dédiée) et à des CLASSES
 * UTILITAIRES `.g4g-t-*`. Les titres bespoke des sections gardent leur taille propre (classe
 * = spécificité plus forte que l'élément) tant qu'ils ne sont pas rebranchés (chantier suivant). */
/* [2026-09-07] Couleur par niveau (demande Alexandre) : var --g4g-{niveau}-color, émise
   seulement si une couleur est choisie dans le panneau Typographie ; sinon `inherit` =
   comportement actuel (le texte hérite du token de couleur). */
h1, .g4g-t-h1 { font-size: var(--g4g-h1-size); font-weight: var(--g4g-h1-weight); color: var(--g4g-h1-color, inherit); }
h2, .g4g-t-h2 { font-size: var(--g4g-h2-size); font-weight: var(--g4g-h2-weight); color: var(--g4g-h2-color, inherit); }
h3, .g4g-t-h3 { font-size: var(--g4g-h3-size); font-weight: var(--g4g-h3-weight); color: var(--g4g-h3-color, inherit); }
h4, .g4g-t-h4 { font-size: var(--g4g-h4-size); font-weight: var(--g4g-h4-weight); color: var(--g4g-h4-color, inherit); }
/* [2026-09-09] Gras AU MOT PRÈS dans les titres (demande Alexandre). La graisse par défaut des
   titres est allégée (typography.py : h1–h4 = 400, réglable au panneau) ; les segments marqués
   en GRAS (<b>/<strong> depuis l'éditeur RichText) passent à 700 → on choisit exactement quels
   mots sont en gras, comme dans un paragraphe. Couvre aussi les titres bespoke (éléments h1–h4). */
:is(h1, h2, h3, h4, .g4g-t-h1, .g4g-t-h2, .g4g-t-h3, .g4g-t-h4) :is(b, strong) { font-weight: var(--g4g-weight-bold); }
.g4g-t-subtitle { font-size: var(--g4g-subtitle-size); font-weight: var(--g4g-subtitle-weight); color: var(--g4g-subtitle-color, inherit); }
p, .g4g-t-body { font-size: var(--g4g-body-size); font-weight: var(--g4g-body-weight); color: var(--g4g-body-color, inherit); }
/* [2026-09-08] Bloc « Texte » unifié (#11/#12) : espacement de bloc (niveau/typo via .g4g-t-*). */
.g4g-texte { margin: 0 0 0.7rem; line-height: 1.4; }

/* Texte indicatif des champs (« G4G en mouvement », correctif transverse) : le
 * défaut navigateur varie et peut être illisible (trop pâle, opacité < 1 sur
 * certains UA). On le fixe à `--g4g-text-subtle` (assombri à 4,5:1 en tant que
 * TEXTE, cf. tokens.css) + `opacity:1` → placeholders lisibles et cohérents
 * partout, sans style inline (CSP). */
input::placeholder,
textarea::placeholder {
  color: var(--g4g-text-subtle);
  opacity: 1;
}

a { color: var(--g4g-primary); }
/* [p38] RÈGLE UNIVERSELLE anti-survol illisible : un survol ne doit JAMAIS rendre
   le texte d'un bouton de la même couleur que son fond. Le survol de lien global
   ci-dessous bavait sur les liens stylés en BOUTON (CTA à fond plein) : au survol,
   leur fond ET leur texte prenaient `--g4g-primary-hover` → foncé sur foncé,
   illisible (bug signalé sur la section ODD, mais latent aussi sur Programmes M4P,
   globe-intro, etc.). On EXCLUT donc les liens-boutons du survol de lien : ils
   conservent la couleur de texte définie par leur propre classe. Tout nouveau
   composant bouton stylé en `<a>` doit porter `g4g-btn` ou un suffixe `__cta` /
   `__hub` / `__btn` pour bénéficier de cette immunité.
   [2026-08-26] Deux immunités de plus (mêmes symptômes hors bouton) : les
   composants pilule/chip (`[class*="__chip"]`, ex. « Populaire » du répertoire :
   le texte blanc virait au bleu foncé illisible) et tout porteur d'infobulle-
   pilule `[data-g4g-tip]` (ex. icônes ODD : le pictogramme blanc virait au bleu).
   Leur encre reste celle de leur propre classe (blanc). */
a:hover:not(.g4g-btn):not([class*="__cta"]):not([class*="__hub"]):not([class*="__btn"]):not([class*="__chip"]):not([data-g4g-tip]) {
  color: var(--g4g-primary-hover);
}

/* ─────────────────────────────────────────────────────────────────────────
 * INFOBULLE-PILULE réutilisable (`data-g4g-tip`) — remplace l'attribut `title`
 * natif (lent ~0,5 s, non stylable). Pilule BLANCHE, bordure BLEUE 2 px, texte
 * BLEU, apparition RAPIDE (90 ms, aucun délai). Porter le libellé sur
 * `data-g4g-tip="…"` et TOUJOURS garder un nom accessible à côté (span
 * .g4g-visually-hidden ou aria-label) : `::after` n'est pas lu par les lecteurs
 * d'écran. Tout porteur est AUSSI immunisé du survol de lien global ci-dessus.
 * Variante `data-tip-pos="below"` : bulle sous l'élément (utile dans un panneau
 * qui rognerait une bulle au-dessus, ex. modale de filtres). Décision Alexandre
 * 2026-08-26 (esthétique de survol cohérente sur toute la plateforme). */
[data-g4g-tip] { position: relative; }
[data-g4g-tip]::after {
  content: attr(data-g4g-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 60;
  padding: 5px 12px;
  border: 2px solid var(--g4g-primary);
  border-radius: var(--g4g-radius-pill);
  background: var(--g4g-surface);
  color: var(--g4g-primary);
  font-size: var(--g4g-text-xs);
  font-weight: var(--g4g-weight-semibold);
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: var(--g4g-shadow-md);
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 90ms ease, transform 90ms ease;
  pointer-events: none;
}
[data-g4g-tip]:hover::after,
[data-g4g-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
[data-g4g-tip][data-tip-pos="below"]::after { bottom: auto; top: calc(100% + 8px); transform: translate(-50%, -4px); }
[data-g4g-tip][data-tip-pos="below"]:hover::after,
[data-g4g-tip][data-tip-pos="below"]:focus-visible::after { transform: translate(-50%, 0); }
/* Pas de bloc prefers-reduced-motion dédié : le garde-fou universel (`*, *::before,
   *::after`) plus bas neutralise déjà la transition de l'infobulle. */

/* Icônes (sprite Lucide) --------------------------------------------------
 * `currentColor` : l'icône hérite de la couleur du texte, donc des tokens —
 * jamais de couleur propre. `flex:none` empêche l'écrasement en conteneur flex.
 */
.g4g-icon {
  display: inline-block;
  vertical-align: middle;
  flex: none;
  color: currentColor;
}

/* Bouton porté par une icône seule (cloche…) : cible tactile ≥ 44 px même si
 * l'icône fait 21 px — le padding fait le reste (WCAG 2.5.8). */
.g4g-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: var(--g4g-space-2);
  border: none;
  border-radius: var(--g4g-radius-pill);
  background: transparent;
  color: var(--g4g-text-muted);
  cursor: pointer;
}
.g4g-icon-btn:hover { background: var(--g4g-surface-sunken); color: var(--g4g-primary); }
.g4g-icon-btn:focus-visible { outline: none; box-shadow: var(--g4g-focus-ring); }

/* Utilitaires d'accessibilité --------------------------------------------- */
/* Masque visuellement tout en restant lisible par les lecteurs d'écran. */
.g4g-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Lien d'évitement : hors écran, se révèle au focus clavier (WCAG 2.4.1). */
.g4g-skip-link {
  position: absolute;
  left: var(--g4g-space-2);
  top: -60px;
  z-index: var(--g4g-z-modal);
  padding: var(--g4g-space-2) var(--g4g-space-4);
  background: var(--g4g-primary);
  color: var(--g4g-primary-contrast);
  border-radius: var(--g4g-radius-md);
  text-decoration: none;
  transition: top 0.15s ease-in-out;
}
.g4g-skip-link:focus { top: var(--g4g-space-2); }

/* Coquille d'en-tête — 2 bandes, alignée sur la maquette « G4G Site - Accueil »
   (PROMPTS Alexandre 2026-08-25). Bande 1 (top) : mince, se rétracte au
   défilement (header.js). Bande 2 (nav) : le LOGO y vit, reste collée en haut.
   Contenu centré via `.g4g-header__inner` (1220 px). ----------------------- */
.g4g-header {
  background: var(--g4g-surface);
  position: sticky;
  top: 0;
  z-index: var(--g4g-z-sticky);
  /* Rétraction de la bande 1 : `header.js` bascule [data-tucked] et translate
   * l'en-tête vers le haut de la hauteur de la bande 1 (variable posée en JS),
   * pour que la bande 2 vienne se coller au sommet. SANS JS : en-tête entier. */
  transition: transform 0.28s cubic-bezier(0.16, 0.84, 0.44, 1);
  will-change: transform;
}
.g4g-header[data-tucked="true"] {
  transform: translateY(calc(-1 * var(--g4g-header-top-h, 0px)));
}
/* La transition de retraction est neutralisee par le garde-fou GLOBAL
   prefers-reduced-motion (* { transition-duration }) plus bas ; pas de bloc dedie. */

/* Conteneur centré, commun aux deux bandes. */
.g4g-header__inner {
  display: flex;
  align-items: center;
  gap: var(--g4g-space-3);
  max-width: 1220px;
  margin: 0 auto;
  /* `wrap` : sans lui, les contrôles forcent la barre à dépasser la fenêtre sur
   * mobile — le document défilerait HORIZONTALEMENT, ce qu'aucune page ne doit. */
  flex-wrap: wrap;
  /* `min-width:0` : autorise les enfants flex à rétrécir sous leur taille
   * intrinsèque (cause n°1 des débordements en flexbox). */
  min-width: 0;
}
/* Pousse ce qui suit vers la droite de la bande. */
.g4g-header__spacer { flex: 1 1 var(--g4g-space-4); min-width: var(--g4g-space-2); }

/* Bande 1 — utilitaires, mince, fond légèrement contrasté (maquette). */
.g4g-header__bar--top {
  background: var(--g4g-surface-alt);
  border-bottom: 1px solid var(--g4g-border);
}
.g4g-header__bar--top .g4g-header__inner {
  gap: var(--g4g-space-2);
  /* Plus d'air vertical (Alexandre 2026-08-26 : la bande était serrée, les
     boutons « Toutes les régions » collés en haut/bas). 4px → 8px. */
  padding: var(--g4g-space-2) var(--g4g-space-4);
}
/* Contrôles compacts dans la bande mince (sans éditer les partials région/langue). */
.g4g-header__bar--top .g4g-btn {
  min-height: 30px;
  padding: 3px 10px;
  font-size: var(--g4g-text-xs);
}

/* Bande 2 — logo + navigation + recherche + compte. */
.g4g-header__bar--nav {
  background: var(--g4g-surface);
  border-bottom: 1px solid var(--g4g-border);
}
.g4g-header__bar--nav .g4g-header__inner {
  padding: var(--g4g-space-2) var(--g4g-space-4);
}

@media (max-width: 720px) {
  /* Les libellés longs (région, courriel) tronquent au lieu de déborder. */
  .g4g-region > summary,
  .g4g-account__menu > summary {
    max-width: 44vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
.g4g-brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
/* [2026-10-12] Logo agrandi (demande Alexandre : « grossir le logo dans le menu »). Hauteur
   fixe + largeur auto → le ratio du logo RÉGIONAL (il change selon la région, cf. header.html)
   est toujours respecté, quelle que soit sa proportion. */
.g4g-brand__logo { display: block; height: 56px; width: auto; }
/* [2026-10-21 · demande Alexandre] Région Outaouais (toutes audiences) : logo plus grand — son
   dessin est presque carré avec des marges, il paraissait petit à 56 px à côté du logo Global (en
   largeur). La marge négative reste dans le rembourrage de la bande : la barre ne prend que 8 px. */
.g4g-brand__logo--outaouais { height: 76px; margin-block: -6px; }

/* Navigation secondaire (bande 1) — liens texte discrets (maquette). */
.g4g-nav-secondary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--g4g-space-1); min-width: 0; }
.g4g-nav-secondary__link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px var(--g4g-space-2);
  border-radius: var(--g4g-radius-pill);
  color: var(--g4g-text-muted);
  font-size: var(--g4g-text-xs);
  font-weight: var(--g4g-weight-medium);
  text-decoration: none;
  white-space: nowrap;
}
.g4g-nav-secondary__link:hover { color: var(--g4g-primary); }
.g4g-nav-secondary__link[aria-current="page"] { color: var(--g4g-primary); font-weight: var(--g4g-weight-semibold); }
.g4g-nav-secondary__link:focus-visible { outline: none; box-shadow: var(--g4g-focus-ring); }

/* --- Transition de page (View Transitions API — cross-document, MPA) ----------
   Fondu + léger glissement vers le haut à chaque navigation (calé sur l'esthétique
   des reveals du site). Site multi-pages Wagtail : natif, aucune librairie, aucune
   SPA. Fallback automatique : les navigateurs sans support ignorent la règle et font
   une navigation instantanée classique (aucune dégradation, aucun bug). Durées <350ms
   pour ne pas ralentir la navigation perçue. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 180ms ease-out both g4gPageFadeOut; }
::view-transition-new(root) { animation: 260ms ease-out both g4gPageReveal; }
@keyframes g4gPageFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes g4gPageReveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
/* Élément partagé : le logo (présent sur toutes les pages) reste stable / morphe
   d'une page à l'autre plutôt que de re-fondre. Nom UNIQUE par page (le logo n'apparaît
   qu'une fois dans l'en-tête). */
/* [2026-09-06] view-transition-name du logo RETIRÉ (demande Alexandre) : nommé, il était
   projeté dans la couche ::view-transition (au-dessus de TOUT) et flottait en surimpression
   pendant la bascule citoyen/entreprise. Sans nom, il fond avec la page (root) → reste
   derrière la transition. */
/* A11y : la neutralisation des transitions de page sous prefers-reduced-motion vit dans
   le garde-fou global plus bas (le `*` universel ne couvre PAS les pseudo ::view-transition-*). */

/* --- Transition de page (View Transitions API — cross-document, MPA) ----------
   Fondu + léger glissement vers le haut à chaque navigation (calé sur l'esthétique
   des reveals du site). Site multi-pages Wagtail : natif, aucune librairie, aucune
   SPA. Fallback automatique : les navigateurs sans support ignorent la règle et font
   une navigation instantanée classique (aucune dégradation, aucun bug). Durées <350ms
   pour ne pas ralentir la navigation perçue. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 180ms ease-out both g4gPageFadeOut; }
::view-transition-new(root) { animation: 260ms ease-out both g4gPageReveal; }
@keyframes g4gPageFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes g4gPageReveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
/* Élément partagé : le logo (présent sur toutes les pages) reste stable / morphe
   d'une page à l'autre plutôt que de re-fondre. Nom UNIQUE par page (le logo n'apparaît
   qu'une fois dans l'en-tête). */
/* [2026-09-06] view-transition-name du logo RETIRÉ (demande Alexandre) : nommé, il était
   projeté dans la couche ::view-transition (au-dessus de TOUT) et flottait en surimpression
   pendant la bascule citoyen/entreprise. Sans nom, il fond avec la page (root) → reste
   derrière la transition. */
/* A11y : la neutralisation des transitions de page sous prefers-reduced-motion vit dans
   le garde-fou global plus bas (le `*` universel ne couvre PAS les pseudo ::view-transition-*). */

.g4g-nav { display: flex; gap: var(--g4g-space-2); }

/* Navigation principale (3 piliers) — maquette « Coquille navigation » :
 * pilules, l'actif prend la teinte primaire (pas de soulignement). */
.g4g-nav-primary__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--g4g-space-2);
  flex-wrap: wrap;
}
.g4g-nav-primary__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--g4g-space-2) var(--g4g-space-4);
  border-radius: var(--g4g-radius-pill);
  color: var(--g4g-text-muted);
  font-size: var(--g4g-text-sm);
  font-weight: var(--g4g-weight-medium);
  text-decoration: none;
}
.g4g-nav-primary__link:hover { background: var(--g4g-surface-sunken); color: var(--g4g-primary); }
.g4g-nav-primary__link[aria-current="page"] {
  background: var(--g4g-primary-tint);
  color: var(--g4g-primary);
  font-weight: var(--g4g-weight-semibold);
}
.g4g-nav-primary__link:focus-visible { outline: none; box-shadow: var(--g4g-focus-ring); }

/* Bascule segmentée Citoyen / Espace pro (Lot 7a) — contrôle segmenté SANS JS. */
.g4g-mode-switch { display: inline-flex; border: 1px solid var(--g4g-border-strong); border-radius: var(--g4g-radius-pill); overflow: hidden; }
.g4g-mode-switch__form { margin: 0; display: flex; }
.g4g-mode-switch__opt {
  min-height: 40px;
  padding: 0 var(--g4g-space-3);
  border: none;
  background: transparent;
  color: var(--g4g-text-muted);
  font-family: inherit;
  font-size: var(--g4g-text-sm);
  font-weight: var(--g4g-weight-semibold);
  cursor: pointer;
}
.g4g-mode-switch__opt:hover { color: var(--g4g-primary); }
.g4g-mode-switch__opt.is-active { background: var(--g4g-primary); color: var(--g4g-primary-contrast); }
.g4g-mode-switch__opt:focus-visible { outline: none; box-shadow: var(--g4g-focus-ring); }

/* Barre d'onglets basse — MOBILE uniquement (Lot 7a). */
.g4g-tabbar { display: none; }
@media (max-width: 640px) {
  .g4g-tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 40;
    display: flex;
    justify-content: space-around;
    background: var(--g4g-surface);
    border-top: 1px solid var(--g4g-border);
    padding: var(--g4g-space-1) 0;
  }
  .g4g-tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 44px;
    min-height: 44px;
    padding: var(--g4g-space-1);
    color: var(--g4g-text-muted);
    text-decoration: none;
    font-size: 10px;
  }
  .g4g-tabbar__item.is-active { color: var(--g4g-primary); }
  .g4g-tabbar__label { font-weight: var(--g4g-weight-semibold); }
}
/* [2026-10-13] La réserve `body { padding-bottom: 64px }` liée à la barre d'onglets
   a été retirée en même temps que l'affichage de la barre (remplacée par le menu
   burger). Si la barre revient, remettre la réserve dans le @media ci-dessus. */

/* === Menu burger — navigation MOBILE consolidée (remplace la barre d'onglets) ===
   Masqué sur desktop (parité intacte : la nav desktop est inchangée). ≤ 720px il
   devient le point d'entrée unique : les versions EN LIGNE de la bande 1 et des
   piliers/compte de la bande 2 sont masquées, et le panneau les réaffiche empilées.
   <details> natif → ouverture SANS JS (CSP-safe). */
.g4g-burger { display: none; flex: none; }
/* Bouton hamburger (44×44, cible tactile) — le triangle natif du <summary> est retiré. */
.g4g-burger__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--g4g-radius-md);
  border: 1px solid var(--g4g-border-strong);
  background: var(--g4g-surface);
  color: var(--g4g-text);
  cursor: pointer;
  list-style: none;
}
.g4g-burger__btn::-webkit-details-marker { display: none; }
.g4g-burger__btn:focus-visible { outline: none; box-shadow: var(--g4g-focus-ring); }
.g4g-burger__bars { position: relative; display: block; width: 20px; height: 14px; }
.g4g-burger__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s var(--g4g-ease-out, ease), opacity 0.2s var(--g4g-ease-out, ease),
    top 0.2s var(--g4g-ease-out, ease);
}
.g4g-burger__bars span:nth-child(1) { top: 0; }
.g4g-burger__bars span:nth-child(2) { top: 6px; }
.g4g-burger__bars span:nth-child(3) { top: 12px; }
/* Ouvert → croix (×). */
.g4g-burger[open] .g4g-burger__bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.g4g-burger[open] .g4g-burger__bars span:nth-child(2) { opacity: 0; }
.g4g-burger[open] .g4g-burger__bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }
/* Panneau — tiroir déroulant ancré sous la bande 2 (et non sur le bouton, que le
   flex pousse à droite), avec une gouttière à droite. Son bloc conteneur est
   `.g4g-header__bar--nav` (position:relative posée dans le @media mobile). */
.g4g-burger__panel {
  position: absolute;
  top: calc(100% + var(--g4g-space-1));
  right: 12px;
  left: auto;
  z-index: var(--g4g-z-dropdown);
  width: min(92vw, 360px);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--g4g-space-3);
  padding: var(--g4g-space-3);
  background: var(--g4g-surface);
  border: 1px solid var(--g4g-border);
  border-radius: var(--g4g-radius-lg);
  box-shadow: var(--g4g-shadow-lg);
}
.g4g-burger__group { display: flex; flex-direction: column; gap: var(--g4g-space-1); }
.g4g-burger__group + .g4g-burger__group {
  border-top: 1px solid var(--g4g-border);
  padding-top: var(--g4g-space-3);
}
/* Dans le panneau : piliers et pages empilés, pleine largeur, alignés à gauche. */
.g4g-burger__panel .g4g-nav-primary__list,
.g4g-burger__panel .g4g-nav-secondary { flex-direction: column; align-items: stretch; gap: var(--g4g-space-1); }
.g4g-burger__panel .g4g-nav-primary__link,
.g4g-burger__panel .g4g-nav-secondary__link {
  width: 100%;
  justify-content: flex-start;
  border-radius: var(--g4g-radius-md);
  font-size: var(--g4g-text-base);
}
/* Sous-menus (Méthode 4P…) : dépliés en place (pas de survol sur tactile). */
.g4g-burger__panel .g4g-nav-primary__submenu {
  position: static;
  display: flex;
  flex-direction: column;
  border: none;
  box-shadow: none;
  padding: 0 0 0 var(--g4g-space-3);
  min-width: 0;
}
.g4g-burger__panel .g4g-nav-primary__caret { display: none; }
/* Menus <details> internes (région, compte) : leur panneau s'ouvre EN PLACE
   (flux), jamais en survol de la fenêtre. */
.g4g-burger__panel .g4g-menu__panel {
  position: static;
  min-width: 0;
  margin-top: var(--g4g-space-1);
  box-shadow: none;
}
.g4g-burger__panel .g4g-account {
  display: flex;
  flex-direction: column;
  gap: var(--g4g-space-1);
  width: 100%;
}
.g4g-burger__panel .g4g-account > .g4g-btn { width: 100%; text-align: center; justify-content: center; }
.g4g-burger__panel .g4g-region,
.g4g-burger__panel .g4g-account__menu { width: 100%; }
.g4g-burger__panel .g4g-region > summary,
.g4g-burger__panel .g4g-account__menu > summary { width: 100%; max-width: none; }
/* [2026-10-20 · QA, demande Alexandre] Audience et langue CENTRÉES dans le panneau (pas collées à gauche). */
.g4g-burger__panel .g4g-audiencesel,
.g4g-burger__panel .g4g-langsel { justify-content: center; }

@media (max-width: 720px) {
  .g4g-burger { display: block; }
  /* Bloc conteneur du panneau = la bande 2 (pleine largeur) → le tiroir s'ancre
     sous elle, jamais sur le bouton (que le flex colle à droite). */
  .g4g-header__bar--nav { position: relative; }
  /* La bande 1 (région/audience/pages/langue) migre entièrement dans le burger. */
  .g4g-header__bar--top { display: none; }
  /* Bande 2 : on masque les versions EN LIGNE (sélecteurs par enfant DIRECT de
     l'inner → n'affecte PAS les copies situées dans le panneau du burger). */
  .g4g-header__bar--nav .g4g-header__inner > .g4g-nav-primary,
  .g4g-header__bar--nav .g4g-header__inner > .g4g-mode-switch,
  .g4g-header__bar--nav .g4g-header__inner > .g4g-account { display: none; }
}

/* Menus déroulants natifs <details> (région, compte, acteur) — SANS JS */
.g4g-menu { position: relative; }
.g4g-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--g4g-space-1));
  z-index: var(--g4g-z-dropdown);
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: var(--g4g-space-1);
  padding: var(--g4g-space-2);
  background: var(--g4g-surface);
  border: 1px solid var(--g4g-border);
  border-radius: var(--g4g-radius-md);
  box-shadow: var(--g4g-shadow-md);
}
.g4g-menu__item {
  display: flex;
  align-items: center;
  gap: var(--g4g-space-2);
  min-height: 44px;
  padding: var(--g4g-space-2) var(--g4g-space-3);
  color: var(--g4g-text);
  text-decoration: none;
  border-radius: var(--g4g-radius-sm);
  width: 100%;
}
/* Item de menu rendu par un <button> (formulaire POST, ex. bascule du mode édition) :
   même rendu que le lien. */
.g4g-menu__item--button {
  width: 100%;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.g4g-account__form--edit {
  margin: 0;
}

.g4g-menu__item:hover { background: var(--g4g-surface-alt); }
.g4g-menu__item[aria-current="true"] { font-weight: 600; color: var(--g4g-primary); }
.g4g-menu summary { list-style: none; }
.g4g-menu summary::-webkit-details-marker { display: none; }
.g4g-menu__panel form { margin: 0; }

/* Sous-menu déroulant de la nav principale (ex. Méthode 4P → Global ESG / Global Vision).
   « Méthode 4P » reste un LIEN direct vers sa page ; le panneau (programmes) s'ouvre au
   SURVOL / focus clavier. Réutilise .g4g-menu__panel. CSP-safe (CSS pur, aucun JS).
   `top: 100%` (sans espace) = survol continu du lien vers le panneau. */
.g4g-nav-primary__menu { position: relative; }
.g4g-nav-primary__summary { display: inline-flex; align-items: center; gap: 4px; }
.g4g-nav-primary__caret { flex: none; transition: transform 180ms var(--lp-ease, ease); }
.g4g-nav-primary__submenu { right: auto; left: 0; top: 100%; display: none; }
.g4g-nav-primary__menu:hover .g4g-nav-primary__submenu,
.g4g-nav-primary__menu:focus-within .g4g-nav-primary__submenu { display: flex; }
.g4g-nav-primary__menu:hover .g4g-nav-primary__caret,
.g4g-nav-primary__menu:focus-within .g4g-nav-primary__caret { transform: rotate(180deg); }

/* Sélecteur de langue */
.g4g-langsel { display: flex; gap: var(--g4g-space-1); }
.g4g-langsel__form { margin: 0; }
/* Langue ACTIVE = pilule pleine (bleu, texte blanc) — nettement distincte de
   l'inactive (contour). Avant : simple gras + encre bleue, différence trop
   faible (Alexandre 2026-08-26 : « on ne voit pas bien laquelle est sélectionnée »).
   Le hover est surchargé pour ne pas retomber sur le tint clair du secondaire
   (garde-fou contraste : jamais de texte blanc sur fond clair). */
.g4g-langsel__btn[aria-current="true"] {
  background: var(--g4g-primary);
  border-color: var(--g4g-primary);
  color: var(--g4g-primary-contrast);
  font-weight: var(--g4g-weight-bold);
}
.g4g-langsel__btn[aria-current="true"]:hover {
  background: var(--g4g-primary-hover);
  border-color: var(--g4g-primary-hover);
  color: var(--g4g-primary-contrast);
}

/* Sélecteur d'audience (Personnes / Entreprises) — même forme que le sélecteur de langue
   (demande Alexandre 2026-10-12 : « un sélecteur comme pour EN et français, qui montre quelle
   audience est active »). Chaque audience est une pilule ; l'active = pilule pleine. Mêmes
   garde-fous de contraste que .g4g-langsel (jamais de texte blanc sur fond clair). */
.g4g-audiencesel { display: flex; gap: var(--g4g-space-1); }
.g4g-audiencesel__btn[aria-current="true"] {
  background: var(--g4g-primary);
  border-color: var(--g4g-primary);
  color: var(--g4g-primary-contrast);
  font-weight: var(--g4g-weight-bold);
}
.g4g-audiencesel__btn[aria-current="true"]:hover {
  background: var(--g4g-primary-hover);
  border-color: var(--g4g-primary-hover);
  color: var(--g4g-primary-contrast);
}

/* Menu Compte (anonyme = liens côte à côte) */
.g4g-account { display: flex; gap: var(--g4g-space-2); }

.g4g-container { max-width: 1100px; margin: 0 auto; padding: var(--g4g-space-6) var(--g4g-space-4); }

/* Fil d'Ariane */
.g4g-breadcrumb { max-width: 1100px; margin: 0 auto; padding: var(--g4g-space-3) var(--g4g-space-4) 0; }
.g4g-breadcrumb__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--g4g-space-2);
  font-size: var(--g4g-text-sm);
  color: var(--g4g-text-muted);
}
.g4g-breadcrumb__item { display: flex; align-items: center; gap: var(--g4g-space-2); }
.g4g-breadcrumb__item + .g4g-breadcrumb__item::before { content: "/"; color: var(--g4g-border); }
.g4g-breadcrumb__item[aria-current="page"] { color: var(--g4g-text); }

/* Pied de page */
.g4g-footer {
  background: var(--g4g-surface-alt);
  /* [2026-09-08] border-top retiré : la bande 4 couleurs (ci-dessous) est désormais le
     séparateur visuel du haut du footer (demande Alexandre : « premier élément au haut »). */
  padding: var(--g4g-space-8) var(--g4g-space-4);
  /* [2026-09-08] margin-top RETIRÉ : la marge (transparente) laissait voir le fond gris du
     body AU-DESSUS de la bande 4 couleurs. La bande doit être le vrai bord haut du footer. */
  margin-top: 0;
  color: var(--g4g-text);
}
/* [2026-09-08] Bande 4 couleurs de marque en TÊTE du footer, FULL-BLEED (demande Alexandre).
   Marges négatives = elle déborde le padding du footer jusqu'aux bords de la fenêtre. Dégradé
   des 4 tokens de pilier (Personnes/Planète/Prospérité/Pourquoi), proportions ~ image fournie. */
.g4g-footer__band {
  height: clamp(9px, 1.15vw, 15px);
  margin: calc(-1 * var(--g4g-space-8)) calc(-1 * var(--g4g-space-4)) var(--g4g-space-8);
  background: linear-gradient(
    to right,
    var(--g4g-people) 0 30%,
    var(--g4g-planet) 30% 53%,
    var(--g4g-prosperity) 53% 77%,
    var(--g4g-purpose) 77% 100%
  );
}
.g4g-footer__cols {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: var(--g4g-space-8);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.g4g-footer__title { margin: 0 0 var(--g4g-space-3); font-size: var(--g4g-text-lg); }
.g4g-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--g4g-space-2); }
.g4g-footer__address { font-style: normal; line-height: 1.6; color: var(--g4g-text-muted); }
.g4g-subscribe { display: grid; gap: var(--g4g-space-2); }
.g4g-subscribe__field {
  padding: var(--g4g-space-2) var(--g4g-space-3);
  border: 1px solid var(--g4g-border);
  border-radius: var(--g4g-radius-md);
  font-size: var(--g4g-text-sm);
  background: var(--g4g-surface-alt);
  min-height: 44px;
}
.g4g-footer__social {
  max-width: 1100px;
  margin: var(--g4g-space-8) auto 0;
  display: flex;
  gap: var(--g4g-space-4);
}
.g4g-footer__reconciliation {
  max-width: 1100px;
  margin: var(--g4g-space-8) auto 0;
  color: var(--g4g-text-muted);
}
.g4g-footer__legal {
  max-width: 1100px;
  margin: var(--g4g-space-8) auto 0;
  padding-top: var(--g4g-space-4);
  border-top: 1px solid var(--g4g-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--g4g-space-4);
  align-items: center;
  justify-content: space-between;
  font-size: var(--g4g-text-sm);
  color: var(--g4g-text-muted);
}
.g4g-footer__copy { margin: 0; }
.g4g-footer__legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--g4g-space-4);
}
/* [2026-10-06] Liens du pied de page (demande Alexandre) : encre NEUTRE (hérite du texte du
   footer) et SANS soulignement par défaut — jamais en bleu ; couleur de marque + soulignement
   AU SURVOL / focus seulement. Les liens-boutons (`g4g-btn`) gardent leur propre style. */
.g4g-footer a:not(.g4g-btn) { color: inherit; text-decoration: none; }
.g4g-footer a:not(.g4g-btn):hover,
.g4g-footer a:not(.g4g-btn):focus-visible { color: var(--g4g-primary); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════
 * BOUTONS — maquette « G4G Design System » §05.
 * PILULE PAR DÉFAUT (décision imposée n°2) : le rayon est porté par `.g4g-btn`
 * lui-même, donc aucune variante ne peut l'oublier (verrouillé par un test).
 * Le Design System pose lui-même « cible tactile ≥ 44 px » → min-height:44px.
 * ═══════════════════════════════════════════════════════════════════════════ */
.g4g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--g4g-space-2);
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--g4g-radius-pill);
  font-family: inherit;
  font-size: var(--g4g-text-base);
  font-weight: var(--g4g-weight-semibold);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.g4g-btn:focus-visible { outline: none; box-shadow: var(--g4g-focus-ring); }

/* [2026-09-04] Survol universel (demande Alexandre) : le bouton bleu plein (#004d71,
   texte blanc) s'INVERSE au survol → fond blanc, bordure bleue, texte bleu + légère
   ombre. Contraste OK (blanc/bleu). La bordure existe déjà (1px transparent) → aucun
   décalage. Idem pour les CTA de sections (cf. sections.css, bloc « survol boutons »). */
.g4g-btn--primary { background: var(--g4g-primary); color: var(--g4g-primary-contrast); }
.g4g-btn--primary:hover {
  background: var(--g4g-surface);
  border-color: var(--g4g-primary);
  color: var(--g4g-primary);
  box-shadow: var(--g4g-shadow-md);
}

.g4g-btn--secondary { border-color: var(--g4g-primary); background: transparent; color: var(--g4g-primary); }
.g4g-btn--secondary:hover { background: var(--g4g-surface); box-shadow: var(--g4g-shadow-md); }

.g4g-btn--ghost { padding: 11px 16px; background: transparent; color: var(--g4g-text-muted); }
.g4g-btn--ghost:hover { background: var(--g4g-surface-sunken); color: var(--g4g-text); }

.g4g-btn--danger { background: var(--g4g-danger); color: var(--g4g-primary-contrast); }
.g4g-btn--danger:hover { filter: brightness(0.92); color: var(--g4g-primary-contrast); }

/* Petite pilule (filtres, actions secondaires de carte). Le Design System la
 * dessine à 36 px : sous la cible de 44 px du prompt, mais au-dessus du minimum
 * WCAG 2.2 AA (2.5.8 = 24 px). Écart signalé au rapport retour. */
/* `--sm` = modificateur de TAILLE seul. L'apparence (fond/texte) vient de la variante
 * de couleur (--primary/--secondary/--danger/--ghost). RÈGLE Alexandre 2026-08-26 :
 * jamais de texte de la même couleur que le fond → une petite pilule PRIMAIRE reste
 * bleu-fond/texte-blanc, y compris au survol (avant, --sm forçait un texte bleu sur
 * le fond bleu du survol primaire). */
.g4g-btn--sm {
  min-height: 36px;
  padding: 7px 14px;
  font-size: var(--g4g-text-sm);
}
/* Petite pilule STANDALONE (sans variante de couleur) : contour blanc, texte foncé. */
.g4g-btn--sm:not(.g4g-btn--primary):not(.g4g-btn--secondary):not(.g4g-btn--danger):not(.g4g-btn--ghost) {
  border-color: var(--g4g-border);
  background: var(--g4g-surface);
  color: var(--g4g-text);
}
.g4g-btn--sm:not(.g4g-btn--primary):not(.g4g-btn--secondary):not(.g4g-btn--danger):not(.g4g-btn--ghost):hover {
  border-color: var(--g4g-primary);
  color: var(--g4g-primary);
}

/* Désactivé : jamais une simple opacité — le Design System spécifie des
 * couleurs propres (une opacité rendrait le texte illisible sur fond teinté). */
.g4g-btn[disabled],
.g4g-btn[aria-disabled="true"] {
  border-color: var(--g4g-border);
  background: var(--g4g-surface-sunken);
  color: var(--g4g-text-subtle);
  cursor: not-allowed;
  filter: none;
  pointer-events: none;
}

/* Chargement : le bouton garde sa taille (aucun saut de mise en page). */
.g4g-btn--loading { cursor: wait; opacity: 0.9; }
.g4g-btn__spinner {
  width: 15px;
  height: 15px;
  flex: none;
  border: 2px solid var(--g4g-spinner-track);
  border-top-color: var(--g4g-primary-contrast);
  border-radius: var(--g4g-radius-pill);
  animation: g4g-spin 0.7s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
 * CHAMPS DE FORMULAIRE — maquette « G4G Design System » §06.
 * ═══════════════════════════════════════════════════════════════════════════ */
.g4g-field { display: block; margin-bottom: var(--g4g-space-4); }
.g4g-field__label {
  display: block;
  margin-bottom: 7px;
  font-size: var(--g4g-text-sm);
  font-weight: var(--g4g-weight-semibold);
  color: var(--g4g-text);
}
/* Suffixe d'erreur dans le libellé (« Courriel — déjà utilisé »). */
.g4g-field__label-error { color: var(--g4g-danger); font-weight: var(--g4g-weight-semibold); }

.g4g-input,
.g4g-select,
.g4g-textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--g4g-border-strong);
  border-radius: var(--g4g-radius-sm);
  background: var(--g4g-surface);
  color: var(--g4g-text);
  font-family: inherit;
  font-size: var(--g4g-text-base);
}
.g4g-textarea { resize: vertical; }
.g4g-input:focus-visible,
.g4g-select:focus-visible,
.g4g-textarea:focus-visible {
  outline: none;
  border-color: var(--g4g-primary);
  box-shadow: var(--g4g-field-focus);
}
/* Champ à icône incrustée : réserve la place à gauche. */
.g4g-field--with-icon { position: relative; display: flex; align-items: center; }
.g4g-field--with-icon .g4g-input { padding-left: 38px; }
.g4g-field__icon { position: absolute; left: 12px; color: var(--g4g-text-subtle); pointer-events: none; }

/* Bascule « œil » afficher/masquer le mot de passe (static/js/password-toggle.js). Le bouton est
 * incrusté à droite du champ ; l'icône œil (afficher) / œil barré (masquer) suit `aria-pressed`. */
.g4g-input-wrap { position: relative; display: block; }
.g4g-input-wrap .g4g-input--pw { padding-right: 46px; }
.g4g-pw-toggle {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--g4g-text-subtle);
  cursor: pointer;
}
.g4g-pw-toggle:hover { color: var(--g4g-text); }
.g4g-pw-toggle:focus-visible {
  outline: none;
  color: var(--g4g-primary);
  box-shadow: var(--g4g-field-focus);
  border-radius: var(--g4g-radius-sm);
}
.g4g-pw-toggle__icon--hide { display: none; }
.g4g-pw-toggle[aria-pressed="true"] .g4g-pw-toggle__icon--show { display: none; }
.g4g-pw-toggle[aria-pressed="true"] .g4g-pw-toggle__icon--hide { display: inline; }

/* Erreur : bordure épaissie (1.5px) + halo danger. `aria-invalid` porte l'état
 * pour les lecteurs d'écran ; la classe ne fait que le peindre. */
.g4g-input[aria-invalid="true"],
.g4g-select[aria-invalid="true"],
.g4g-textarea[aria-invalid="true"] { border: 1.5px solid var(--g4g-danger); }
.g4g-input[aria-invalid="true"]:focus-visible,
.g4g-select[aria-invalid="true"]:focus-visible,
.g4g-textarea[aria-invalid="true"]:focus-visible {
  border-color: var(--g4g-danger);
  box-shadow: var(--g4g-field-focus-error);
}
.g4g-field__error { display: block; margin-top: 6px; font-size: var(--g4g-text-xs); color: var(--g4g-danger); }
.g4g-field__hint { display: block; margin-top: 6px; font-size: var(--g4g-text-xs); color: var(--g4g-text-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
 * BADGES, PASTILLES ODD, CARTES
 * ═══════════════════════════════════════════════════════════════════════════ */
.g4g-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--g4g-space-1);
  padding: 3px 10px;
  border: 1px solid var(--g4g-border);
  border-radius: var(--g4g-radius-pill);
  background: var(--g4g-surface-alt);
  color: var(--g4g-text-muted);
  font-size: var(--g4g-text-xs);
  font-weight: var(--g4g-weight-semibold);
}
/* Membre : aplat primaire + blanc = 9,13:1. */
.g4g-badge--member { border-color: transparent; background: var(--g4g-primary); color: var(--g4g-primary-contrast); }
/* Certifié : badge TEINTÉ (et non un aplat), comme le Design System le dessine.
 * Le texte utilise `--g4g-success-text` (vert de marque assombri) : le vert
 * nominal ne donnerait que 3,36:1 sur cette teinte — sous les 4,5:1 requis. */
.g4g-badge--certified {
  border-color: var(--g4g-success-tint-border);
  background: var(--g4g-success-tint);
  color: var(--g4g-success-text);
}
/* Featured : texte FONCÉ sur le jaune identitaire (6,38:1). Du blanc dessus ne
 * donnerait que 2,06:1 — illisible. */
.g4g-badge--featured { border-color: transparent; background: var(--g4g-purpose); color: var(--g4g-text); }
.g4g-badge--unclaimed { border-style: dashed; }

/* Pastille ODD : la couleur ONU vient du serveur (taxonomies.SDG.color) via une
 * variable inline `--sdg`, JAMAIS d'une classe par ODD — 17 classes en dur
 * dupliqueraient une donnée qui est déjà en base. */
.g4g-sdg-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: var(--g4g-radius-pill);
  background: var(--sdg, var(--g4g-border-strong));
}

/* Badge ODD (Phase 0) — composant transverse : carré couleur ONU + icône Lucide
 * BLANCHE au centre (jamais le numéro seul). La couleur vient de `--sdg` (servi
 * par la classe `g4g-sdg--<n>`) ; l'icône hérite de `currentColor` = contraste.
 * L'icône est dimensionnée en `1em`, donc pilotée par le `font-size` du badge. */
.g4g-sdg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  font-size: 16px;
  border-radius: var(--g4g-radius-sm);
  background: var(--sdg, var(--g4g-border-strong));
  color: var(--g4g-primary-contrast);
}
.g4g-sdg-badge .g4g-icon { width: 1em; height: 1em; }
.g4g-sdg-badge--sm { width: 22px; height: 22px; font-size: 14px; }
.g4g-sdg-badge--lg { width: 34px; height: 34px; font-size: 20px; }

.g4g-card {
  background: var(--g4g-surface);
  border: 1px solid var(--g4g-border);
  /* Rayon des cartes = 10px (dominant des maquettes, ×18 ; Porte 1 du protocole
   * Miroir). La carte est le conteneur de base de tous les écrans internes. */
  border-radius: var(--g4g-radius-card);
  box-shadow: var(--g4g-shadow-sm);
  padding: var(--g4g-space-4);
}

/* ═══════════════════════════════════════════════════════════════════════════
 * EN-TÊTE DE PAGE (titre + action) — motif commun à tous les écrans internes.
 * ═══════════════════════════════════════════════════════════════════════════ */
.g4g-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--g4g-space-4);
  flex-wrap: wrap;
  margin-bottom: var(--g4g-space-5);
}
.g4g-page-head__title { margin: 0; font-size: var(--g4g-text-xl); font-weight: var(--g4g-weight-semibold); color: var(--g4g-primary); }
.g4g-page-head__sub { margin: 3px 0 0; font-size: var(--g4g-text-sm); color: var(--g4g-text-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
 * CONTRÔLE SEGMENTÉ (filtres en pilules) — maquettes « Notifications »,
 * « États de recherche », « Coquille navigation ».
 * Rendu en LIENS (pas en boutons JS) : sans-JS, partageable, historique correct.
 * ═══════════════════════════════════════════════════════════════════════════ */
.g4g-segmented {
  display: inline-flex;
  gap: var(--g4g-space-1);
  padding: 4px;
  margin-bottom: var(--g4g-space-5);
  border: 1px solid var(--g4g-border);
  border-radius: var(--g4g-radius-pill);
  background: var(--g4g-surface-sunken);
  box-shadow: var(--g4g-shadow-sm);
}
.g4g-segmented__item {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 16px;
  border-radius: var(--g4g-radius-pill);
  color: var(--g4g-text-muted);
  font-size: var(--g4g-text-sm);
  font-weight: var(--g4g-weight-semibold);
  text-decoration: none;
}
.g4g-segmented__item:hover { color: var(--g4g-primary); }
.g4g-segmented__item--on,
.g4g-segmented__item--on:hover { background: var(--g4g-primary); color: var(--g4g-primary-contrast); }
.g4g-segmented__item:focus-visible { outline: none; box-shadow: var(--g4g-focus-ring); }

/* Pastille « non lu » sur la cloche du header. */
.g4g-icon-btn { position: relative; }
.g4g-icon-btn__dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--g4g-surface);
  border-radius: var(--g4g-radius-pill);
  background: var(--g4g-danger);
}

/* ── Commandites (A-3) ───────────────────────────────────────────────────────
 * Badge « Commandité » = pilule discrète (transparence, décision A-3). Carte du
 * rail communauté en ratio 6:5 (image pleine carte, place réservée → zéro CLS).
 * L'état vide est géré côté serveur (le bloc ne se rend pas) — aucune règle
 * « vide » ici. Le pixel d'impression (.g4g-ad-beacon) est sorti du flux. */
.g4g-ad-zone { position: relative; display: block; margin-top: var(--g4g-space-4); }
.g4g-ad-label {
  display: inline-block;
  margin-bottom: var(--g4g-space-2);
  padding: 2px var(--g4g-space-2);
  border-radius: var(--g4g-radius-pill);
  background: var(--g4g-surface-sunken);
  color: var(--g4g-text-subtle);
  font-size: var(--g4g-text-xs);
  font-weight: var(--g4g-weight-semibold);
}
.g4g-ad-creative {
  display: block;
  overflow: hidden;
  border: 1px solid var(--g4g-border);
  border-radius: var(--g4g-radius-md);
  background: var(--g4g-surface);
  box-shadow: var(--g4g-shadow-sm);
  color: var(--g4g-text);
  text-decoration: none;
}
.g4g-ad-creative:hover { box-shadow: var(--g4g-shadow-md); text-decoration: none; }
.g4g-ad-creative:focus-visible { outline: none; box-shadow: var(--g4g-focus-ring); }
/* `height: auto` (MES-12) : l'image porte désormais ses `width`/`height` réels ; sans lui, l'attribut
   height fixerait la hauteur et l'`aspect-ratio` 6/5 ne s'appliquerait plus. */
.g4g-ad-creative img { display: block; width: 100%; height: auto; aspect-ratio: 6 / 5; object-fit: cover; }
/* Repli texte (créative sans image) : même gabarit 6:5, lisible et centré. */
.g4g-ad-creative > span {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 6 / 5;
  padding: var(--g4g-space-4);
  text-align: center;
  font-weight: var(--g4g-weight-semibold);
  color: var(--g4g-primary);
}
.g4g-ad-beacon { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* Carte commanditée NATIVE de la liste du répertoire (« même gabarit qu'une
 * fiche ») : fond légèrement enfoncé pour la distinguer sans rompre la grille ;
 * le thumb accueille l'image de la créative (recadrée au carré). */
.g4g-listing--sponsored { background: var(--g4g-surface-sunken); }
.g4g-listing__thumb--ad { overflow: hidden; padding: 0; }
.g4g-listing__thumb--ad img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* Favori (cœur) — Lot 2. Bouton porteur d'action, cible ≥44px (WCAG 2.2 AA).
   État rempli via la classe .g4g-fav--on (le <use> du sprite hérite du fill) —
   jamais de fill inline (CSP). */
.g4g-fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--g4g-text-muted);
  cursor: pointer;
  border-radius: var(--g4g-radius-pill);
}
.g4g-fav:hover { color: var(--g4g-danger); background: var(--g4g-surface-sunken); }
.g4g-fav:focus-visible { outline: none; box-shadow: var(--g4g-focus-ring); }
.g4g-fav--on { color: var(--g4g-danger); }
.g4g-fav--on .g4g-fav__icon { fill: var(--g4g-danger); }
/* Cœur en surimpression sur la carte de résultat : cluster haut-droit, pastille
   translucide sur toute image de fond (color-mix tokenisé, aucune couleur en dur). */
.g4g-listing__fav {
  position: absolute;
  top: var(--g4g-space-2);
  right: var(--g4g-space-2);
}
.g4g-listing__fav .g4g-fav {
  background: color-mix(in srgb, var(--g4g-surface) 92%, transparent);
  box-shadow: var(--g4g-shadow-sm);
}
.g4g-listing__fav .g4g-fav:hover { background: var(--g4g-surface); }
/* Cœur d'en-tête de fiche : simple, aligné dans le cluster de badges. */
.g4g-fiche__fav { display: inline-flex; }

/* Formulaires longs (édition de fiche, profil, Paramètres, soumission…) : mêmes
 * codes de CARTE que le reste du site (surface blanche + bordure + rayon + ombre),
 * sinon ils flottent nus sur le fond gris et paraissent « moches ». Aligné sur le
 * patron des écrans auth cartés plus bas. */
.g4g-form {
  max-width: 46rem;
  padding: var(--g4g-space-6);
  background: var(--g4g-surface);
  border: 1px solid var(--g4g-border);
  border-radius: var(--g4g-radius-lg);
  box-shadow: var(--g4g-shadow-sm);
}
.g4g-form__actions {
  display: flex;
  gap: var(--g4g-space-3);
  flex-wrap: wrap;
  margin-top: var(--g4g-space-6);
  padding-top: var(--g4g-space-5);
  border-top: 1px solid var(--g4g-border);
}
/* Un `select multiple` natif : on lui donne de l'air, sinon il est illisible. */
.g4g-select[multiple] { min-height: 8rem; padding: var(--g4g-space-2); }

/* Bloc « réservé aux membres » dans un formulaire */
.g4g-locked--section { align-items: flex-start; text-align: left; margin-top: var(--g4g-space-6); }
.g4g-locked__title { margin: 0; font-size: var(--g4g-text-sm); font-weight: var(--g4g-weight-semibold); color: var(--g4g-text); }
.g4g-locked__list { margin: var(--g4g-space-2) 0; padding-left: var(--g4g-space-5); font-size: var(--g4g-text-sm); }

/* ═══════════════════════════════════════════════════════════════════════════
 * AUTHENTIFICATION (allauth) — connexion, inscription, lien magique, mot de
 * passe, vérification de courriel, MFA/TOTP, codes de secours.
 *
 * Aucune maquette ne couvre ces écrans (signalé à Claude Design). Ils sont donc
 * composés à partir des composants EXISTANTS du design system — carte, champs,
 * boutons en pilule — plutôt qu'inventés : c'est ce qui les fait ressembler au
 * reste du site sans broder par-dessus la charte.
 * ═══════════════════════════════════════════════════════════════════════════ */
.g4g-auth { display: flex; justify-content: center; padding: var(--g4g-space-8) 0; }
.g4g-auth__card { width: 100%; max-width: 27rem; padding: var(--g4g-space-8); }
.g4g-auth__title {
  margin: 0 0 var(--g4g-space-2);
  font-size: var(--g4g-text-xl);
  font-weight: var(--g4g-weight-semibold);
  color: var(--g4g-primary);
}
.g4g-auth__subtitle {
  margin: var(--g4g-space-6) 0 var(--g4g-space-2);
  font-size: var(--g4g-text-base);
  font-weight: var(--g4g-weight-semibold);
  color: var(--g4g-primary);
}
.g4g-auth__text { margin: 0 0 var(--g4g-space-5); font-size: var(--g4g-text-sm); color: var(--g4g-text-muted); }
.g4g-auth__text a { font-weight: var(--g4g-weight-semibold); }
.g4g-auth__sep { margin: var(--g4g-space-6) 0; border: 0; border-top: 1px solid var(--g4g-border); }
/* Les actions passent à la ligne sur mobile plutôt que de déborder ; le bouton
 * principal prend toute la largeur (cible tactile confortable au pouce). */
.g4g-auth__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--g4g-space-3);
  margin-top: var(--g4g-space-6);
}
.g4g-auth__actions .g4g-btn { flex: 1 1 auto; }
/* allauth rend parfois une liste d'actions secondaires (mot de passe oublié…). */
.g4g-auth__card ul { list-style: none; margin: var(--g4g-space-4) 0 0; padding: 0; display: grid; gap: var(--g4g-space-2); }
.g4g-auth__card ul a { font-size: var(--g4g-text-sm); }

/* Case à cocher / radio : la case garde 44 px de cible tactile — les champs
 * `checkbox` natifs font ~13 px par défaut, très en-dessous du minimum. */
.g4g-field--check { display: flex; align-items: center; gap: var(--g4g-space-3); flex-wrap: wrap; }
.g4g-check {
  width: 20px;
  height: 20px;
  flex: none;
  margin: 12px;
  accent-color: var(--g4g-primary);
  cursor: pointer;
}
.g4g-check:focus-visible { outline: none; box-shadow: var(--g4g-focus-ring); }
.g4g-check__label { font-size: var(--g4g-text-sm); color: var(--g4g-text); cursor: pointer; }
.g4g-field--check .g4g-field__error,
.g4g-field--check .g4g-field__hint { flex-basis: 100%; margin-top: 0; }
.g4g-space__meta { display: flex; align-items: center; gap: var(--g4g-space-1); margin: var(--g4g-space-3) 0 0; font-size: var(--g4g-text-sm); color: var(--g4g-text-subtle); }
/* En-tête de page avec action à droite (bouton « Nouveau message »). */
.g4g-page-head--action { display: flex; align-items: center; justify-content: space-between; gap: var(--g4g-space-3); flex-wrap: wrap; }
.g4g-skeleton-card {
  display: flex;
  gap: var(--g4g-space-4);
  padding: var(--g4g-space-4);
  border: 1px solid var(--g4g-border);
  border-radius: var(--g4g-radius-md);
  background: var(--g4g-surface);
}
.g4g-skeleton-card__thumb { width: 118px; height: 118px; flex: 0 0 auto; }
.g4g-skeleton-card__lines {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--g4g-space-3);
  padding-top: var(--g4g-space-1);
}
.g4g-skeleton-card__line { height: 12px; }
.g4g-skeleton-card__line--sm { width: 120px; height: 11px; }
.g4g-skeleton-card__line--lg { width: 62%; height: 18px; }
.g4g-skeleton-card__line--md { width: 150px; max-width: 80%; }
.g4g-skeleton-card__badges { display: flex; gap: var(--g4g-space-2); margin-top: var(--g4g-space-1); }
.g4g-skeleton-card__badge { width: 28px; height: 28px; }
.g4g-skeleton-card__pill { width: 84px; height: 22px; border-radius: var(--g4g-radius-pill); }

/* ═══════════════════════════════════════════════════════════════════════════
 * ONGLETS — maquette « G4G Fiche entreprise ».
 * Filet actif de 2 px + `margin-bottom:-1px` pour chevaucher la bordure de la
 * liste (c'est ce chevauchement qui « soude » l'onglet actif à son panneau).
 * ═══════════════════════════════════════════════════════════════════════════ */
.g4g-tabs__list {
  display: flex;
  gap: var(--g4g-space-1);
  margin-bottom: var(--g4g-space-4);
  border-bottom: 1px solid var(--g4g-border);
  overflow-x: auto; /* mobile : la barre défile plutôt que de se replier */
}
.g4g-tabs__tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--g4g-text-muted);
  font-size: var(--g4g-text-sm);
  font-weight: var(--g4g-weight-semibold);
  white-space: nowrap;
  cursor: pointer;
}
.g4g-tabs__tab:hover { color: var(--g4g-primary); }
/* Onglet actif = label dont le radio (frère précédent) est coché. */
#tab-desc:checked ~ .g4g-tabs__list label[for="tab-desc"],
#tab-coord:checked ~ .g4g-tabs__list label[for="tab-coord"],
#tab-hours:checked ~ .g4g-tabs__list label[for="tab-hours"],
#tab-odd:checked ~ .g4g-tabs__list label[for="tab-odd"],
#tab-avis:checked ~ .g4g-tabs__list label[for="tab-avis"],
#tab-activite:checked ~ .g4g-tabs__list label[for="tab-activite"] {
  color: var(--g4g-primary);
  border-bottom-color: var(--g4g-primary);
}
/* Focus clavier (le radio est masqué) → anneau sur son label via :has(). */
.g4g-tabs:has(#tab-desc:focus-visible) label[for="tab-desc"],
.g4g-tabs:has(#tab-coord:focus-visible) label[for="tab-coord"],
.g4g-tabs:has(#tab-hours:focus-visible) label[for="tab-hours"],
.g4g-tabs:has(#tab-odd:focus-visible) label[for="tab-odd"],
.g4g-tabs:has(#tab-avis:focus-visible) label[for="tab-avis"],
.g4g-tabs:has(#tab-activite:focus-visible) label[for="tab-activite"] {
  outline: none;
  border-radius: var(--g4g-radius-sm);
  box-shadow: var(--g4g-focus-ring);
}
/* Panneaux : masqués par défaut ; seul celui du radio coché s'affiche. */
.g4g-tabs__panel { display: none; margin-bottom: var(--g4g-space-4); }
#tab-desc:checked ~ #panel-desc,
#tab-coord:checked ~ #panel-coord,
#tab-hours:checked ~ #panel-hours,
#tab-odd:checked ~ #panel-odd,
#tab-avis:checked ~ #panel-avis,
#tab-activite:checked ~ #panel-activite { display: block; }
/* Onglets du profil (Lot 5) — même mécanique CSS-radios. */
#ptab-activite:checked ~ .g4g-tabs__list label[for="ptab-activite"],
#ptab-espaces:checked ~ .g4g-tabs__list label[for="ptab-espaces"],
#ptab-favoris:checked ~ .g4g-tabs__list label[for="ptab-favoris"],
#ptab-apropos:checked ~ .g4g-tabs__list label[for="ptab-apropos"] {
  color: var(--g4g-primary);
  border-bottom-color: var(--g4g-primary);
}
.g4g-tabs:has(#ptab-activite:focus-visible) label[for="ptab-activite"],
.g4g-tabs:has(#ptab-espaces:focus-visible) label[for="ptab-espaces"],
.g4g-tabs:has(#ptab-favoris:focus-visible) label[for="ptab-favoris"],
.g4g-tabs:has(#ptab-apropos:focus-visible) label[for="ptab-apropos"] {
  outline: none;
  border-radius: var(--g4g-radius-sm);
  box-shadow: var(--g4g-focus-ring);
}
#ptab-activite:checked ~ #panel-activite,
#ptab-espaces:checked ~ #panel-espaces,
#ptab-favoris:checked ~ #panel-favoris,
#ptab-apropos:checked ~ #panel-apropos { display: block; }
/* Onglets d'espace (Lot 6) — même mécanique CSS-radios. */
#stab-fil:checked ~ .g4g-tabs__list label[for="stab-fil"],
#stab-apropos:checked ~ .g4g-tabs__list label[for="stab-apropos"],
#stab-membres:checked ~ .g4g-tabs__list label[for="stab-membres"],
#stab-ressources:checked ~ .g4g-tabs__list label[for="stab-ressources"] {
  color: var(--g4g-primary);
  border-bottom-color: var(--g4g-primary);
}
.g4g-tabs:has(#stab-fil:focus-visible) label[for="stab-fil"],
.g4g-tabs:has(#stab-apropos:focus-visible) label[for="stab-apropos"],
.g4g-tabs:has(#stab-membres:focus-visible) label[for="stab-membres"],
.g4g-tabs:has(#stab-ressources:focus-visible) label[for="stab-ressources"] {
  outline: none;
  border-radius: var(--g4g-radius-sm);
  box-shadow: var(--g4g-focus-ring);
}
#stab-fil:checked ~ #panel-fil,
#stab-apropos:checked ~ #panel-apropos,
#stab-membres:checked ~ #panel-membres,
#stab-ressources:checked ~ #panel-ressources { display: block; }
/* Onglet « Événements » (5ᵉ, réintroduit post-parallélisation) — les onglets
 * CSS-radios sont un composant base.css : sa règle vit ici, jamais en couche de
 * domaine (garde-fou directory/tests_fiche_activity). Règles reprises telles
 * quelles de l'annexe du rapport 2026-08-04-com-lot1. */
#stab-evenements:checked ~ .g4g-tabs__list label[for="stab-evenements"] {
  color: var(--g4g-primary);
  border-bottom-color: var(--g4g-primary);
}
.g4g-tabs:has(#stab-evenements:focus-visible) label[for="stab-evenements"] {
  outline: none;
  border-radius: var(--g4g-radius-sm);
  box-shadow: var(--g4g-focus-ring);
}
#stab-evenements:checked ~ #panel-evenements { display: block; }

/* Section verrouillée par le palier — TEASING (doc marketing §5) : on montre que
 * la section existe, jamais son contenu (retenu côté serveur). */
.g4g-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--g4g-space-2);
  padding: var(--g4g-space-6);
  border: 1px dashed var(--g4g-border-strong);
  border-radius: var(--g4g-radius-sm);
  background: var(--g4g-surface-sunken);
  color: var(--g4g-text-subtle);
  text-align: center;
}
.g4g-locked--inline { flex-direction: row; padding: var(--g4g-space-2) var(--g4g-space-3); text-align: left; }
.g4g-locked__text { margin: 0; font-size: var(--g4g-text-sm); }

/* ═══════════════════════════════════════════════════════════════════════════
 * MESSAGES (framework messages de Django) — le balisage existait dans base.html
 * mais n'avait jamais été stylé : le message de succès du formulaire de contact
 * s'affichait en puces nues.
 *
 * Un liseré COLORÉ à gauche double la couleur de fond : la couleur seule ne doit
 * jamais être le seul véhicule de l'information (WCAG 1.4.1). L'icône textuelle
 * n'est pas nécessaire — `role="status"` porte déjà l'annonce vocale.
 * ═══════════════════════════════════════════════════════════════════════════ */
.g4g-messages { list-style: none; margin: 0 0 var(--g4g-space-5); padding: 0; display: grid; gap: var(--g4g-space-2); }
.g4g-message {
  padding: var(--g4g-space-3) var(--g4g-space-4);
  border: 1px solid var(--g4g-border);
  border-left: 3px solid var(--g4g-text-muted);
  border-radius: var(--g4g-radius-sm);
  background: var(--g4g-surface);
  box-shadow: var(--g4g-shadow-sm);
  font-size: var(--g4g-text-sm);
  animation: g4g-state-in 0.3s ease both;
}
.g4g-message--success { border-left-color: var(--g4g-success); }
.g4g-message--info { border-left-color: var(--g4g-info); }
.g4g-message--warning { border-left-color: var(--g4g-warning); }
.g4g-message--error { border-left-color: var(--g4g-danger); }
/* Django émet `debug` en DEBUG — traité comme `info` plutôt que sans liseré. */
.g4g-message--debug { border-left-color: var(--g4g-info); }

/* ═══════════════════════════════════════════════════════════════════════════
 * ÉTAT VIDE — partial `_states/empty.html`.
 * ═══════════════════════════════════════════════════════════════════════════ */
.g4g-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px var(--g4g-space-6) 68px;
  animation: g4g-state-in 0.3s ease both;
}
.g4g-empty--compact { padding: var(--g4g-space-8) var(--g4g-space-4); }
.g4g-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: var(--g4g-space-4);
  border: 1px solid var(--g4g-border);
  border-radius: var(--g4g-radius-pill);
  background: var(--g4g-surface-sunken);
  color: var(--g4g-text-subtle);
}
.g4g-empty--compact .g4g-empty__icon { width: 48px; height: 48px; margin-bottom: var(--g4g-space-3); }
.g4g-empty__title { margin: 0 0 var(--g4g-space-2); font-size: var(--g4g-text-lg); font-weight: var(--g4g-weight-semibold); color: var(--g4g-primary); }
.g4g-empty--compact .g4g-empty__title { font-size: var(--g4g-text-sm); }
.g4g-empty__text { margin: 0 0 var(--g4g-space-5); max-width: 440px; font-size: var(--g4g-text-base); color: var(--g4g-text-muted); }
.g4g-empty--compact .g4g-empty__text { margin-bottom: 0; font-size: var(--g4g-text-xs); }
.g4g-empty__actions { display: flex; gap: var(--g4g-space-3); flex-wrap: wrap; justify-content: center; }

/* ═══════════════════════════════════════════════════════════════════════════
 * PAGINATION
 * ═══════════════════════════════════════════════════════════════════════════ */
.g4g-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--g4g-space-4);
  margin: var(--g4g-space-8) 0;
}
.g4g-pagination__status { font-size: var(--g4g-text-sm); color: var(--g4g-text-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
 * ANIMATIONS — reprises telles quelles des maquettes (mêmes noms, mêmes courbes)
 * afin que le comportement spécifié soit reproductible à l'identique.
 * ═══════════════════════════════════════════════════════════════════════════ */
@keyframes g4g-spin { to { transform: rotate(360deg); } }
@keyframes g4g-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes g4g-state-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes g4g-panel-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Squelettes de chargement (shimmer) — maquette « États de recherche ». */
.g4g-skeleton {
  border-radius: var(--g4g-radius-sm);
  background: linear-gradient(
    90deg,
    var(--g4g-skeleton-base) 25%,
    var(--g4g-skeleton-highlight) 37%,
    var(--g4g-skeleton-base) 63%
  );
  background-size: 400% 100%;
  animation: g4g-shimmer 1.4s ease infinite;
}

/* Défilement doux des ancres (fiche entreprise : onglets → sections). Le bloc
 * `prefers-reduced-motion` ci-dessous le repasse en `auto`. */
html { scroll-behavior: smooth; }

/* Garde-fou global `prefers-reduced-motion` (règle n°10 + HANDOFF §5).
 * Neutralise TOUTE animation/transition, y compris celles ajoutées plus tard —
 * une règle par composant serait oubliée tôt ou tard. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  /* Le `*` universel ne matche PAS les pseudo ::view-transition-* (Section F) :
     on les neutralise explicitement dans le même garde-fou global. */
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 0.001ms !important;
    animation: none !important;
  }
}

/* Jumeau PILOTÉ PAR RÉGLAGE du garde-fou ci-dessus (« G4G en mouvement ») :
 * quand le staff choisit « Animations du site : sobres », le context processor
 * `motion_context` pose la classe `g4g-anim-sobre` sur le <body> → on neutralise
 * toute animation/transition, exactement comme `prefers-reduced-motion`. motion.js
 * lit la même classe et ne pose pas `g4g-motion` (donc rien n'est masqué). */
body.g4g-anim-sobre *,
body.g4g-anim-sobre *::before,
body.g4g-anim-sobre *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* Index des nouvelles (E3-A démo — sera réhabillé par Claude Design) */
.g4g-news__context { color: var(--g4g-text-muted); font-size: var(--g4g-text-sm); margin-top: 0; }
.g4g-news__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--g4g-space-4); }
.g4g-news__item { display: grid; gap: var(--g4g-space-2); }
.g4g-news__title { margin: 0; font-size: var(--g4g-text-xl); }
.g4g-news__title a:focus-visible { outline: 2px solid var(--g4g-accent); outline-offset: 2px; }
.g4g-news__date { margin: 0; color: var(--g4g-text-muted); font-size: var(--g4g-text-sm); }
.g4g-news__intro { margin: 0; }
.g4g-news__regions { margin: 0; display: flex; flex-wrap: wrap; gap: var(--g4g-space-2); }
.g4g-news__empty { display: grid; gap: var(--g4g-space-3); color: var(--g4g-text-muted); }
.g4g-news__pager { display: flex; align-items: center; gap: var(--g4g-space-4); margin-top: var(--g4g-space-6); }
.g4g-news__pager-status { color: var(--g4g-text-muted); font-size: var(--g4g-text-sm); }

/* ═══════════════════════════════════════════════════════════════════════════
 * STYLEGUIDE (/styleguide) — habillage du catalogue lui-même.
 * Ces classes `sg-*` n'existent QUE pour la page catalogue : aucune ne sert en
 * production. Elles sont ici pour que la page reste sans style inline (la CSP
 * doit pouvoir se resserrer sur `style-src` sans exception).
 * ═══════════════════════════════════════════════════════════════════════════ */
.sg-section { margin-bottom: var(--g4g-space-12); }
.sg-note { max-width: 60ch; color: var(--g4g-text-muted); font-size: var(--g4g-text-sm); }

.sg-swatches { display: flex; flex-wrap: wrap; gap: var(--g4g-space-3); }
.sg-swatches__group {
  margin: var(--g4g-space-6) 0 var(--g4g-space-2);
  font-size: var(--g4g-text-xs);
  font-weight: var(--g4g-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--g4g-tracking-caps);
  color: var(--g4g-text-subtle);
}
.sg-swatch { font-size: var(--g4g-text-xs); color: var(--g4g-text-muted); text-align: center; }
.sg-swatch span {
  display: block;
  width: 96px;
  height: 56px;
  border-radius: var(--g4g-radius-sm);
  border: 1px solid var(--g4g-border);
  margin-bottom: var(--g4g-space-1);
}
/* Une classe par token de couleur (miroir de COLOR_TOKEN_GROUPS dans
 * common/views.py). Un style inline `var(--g4g-{{ name }})` aurait obligé la CSP
 * à tolérer `style-src 'unsafe-inline'` pour une simple page de catalogue. */
.sg-swatch--surface { background: var(--g4g-surface); }
.sg-swatch--surface-alt { background: var(--g4g-surface-alt); }
.sg-swatch--surface-sunken { background: var(--g4g-surface-sunken); }
.sg-swatch--primary { background: var(--g4g-primary); }
.sg-swatch--primary-hover { background: var(--g4g-primary-hover); }
.sg-swatch--primary-contrast { background: var(--g4g-primary-contrast); }
.sg-swatch--accent { background: var(--g4g-accent); }
.sg-swatch--accent-hover { background: var(--g4g-accent-hover); }
.sg-swatch--people { background: var(--g4g-people); }
.sg-swatch--planet { background: var(--g4g-planet); }
.sg-swatch--prosperity { background: var(--g4g-prosperity); }
.sg-swatch--purpose { background: var(--g4g-purpose); }
.sg-swatch--text { background: var(--g4g-text); }
.sg-swatch--text-muted { background: var(--g4g-text-muted); }
.sg-swatch--text-subtle { background: var(--g4g-text-subtle); }
.sg-swatch--border { background: var(--g4g-border); }
.sg-swatch--border-strong { background: var(--g4g-border-strong); }
.sg-swatch--success { background: var(--g4g-success); }
.sg-swatch--warning { background: var(--g4g-warning); }
.sg-swatch--danger { background: var(--g4g-danger); }
.sg-swatch--info { background: var(--g4g-info); }
.sg-row { display: flex; gap: var(--g4g-space-3); flex-wrap: wrap; align-items: center; }
.sg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--g4g-space-5); }

/* Échelle typographique */
.sg-type {
  display: flex;
  align-items: baseline;
  gap: var(--g4g-space-4);
  padding: var(--g4g-space-3) 0;
  border-bottom: 1px solid var(--g4g-border);
}
.sg-type__label {
  flex: none;
  width: 110px;
  font-size: var(--g4g-text-xs);
  color: var(--g4g-text-subtle);
  font-variant-numeric: tabular-nums;
}
.sg-type__sample { margin: 0; max-width: 60ch; }
.sg-type--3xl {
  font-size: var(--g4g-text-3xl);
  font-weight: var(--g4g-weight-bold);
  line-height: var(--g4g-leading-tight);
  letter-spacing: var(--g4g-tracking-tight);
}
.sg-type--2xl { font-size: var(--g4g-text-2xl); font-weight: var(--g4g-weight-bold); line-height: var(--g4g-leading-tight); }
.sg-type--xl { font-size: var(--g4g-text-xl); font-weight: var(--g4g-weight-semibold); }
.sg-type--lg { font-size: var(--g4g-text-lg); font-weight: var(--g4g-weight-semibold); }
.sg-type--sm { font-size: var(--g4g-text-sm); font-weight: var(--g4g-weight-medium); color: var(--g4g-text-muted); }
.sg-type--xs { font-size: var(--g4g-text-xs); color: var(--g4g-text-subtle); }

/* Grille des 17 ODD */
.sg-sdgs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--g4g-space-2);
}
.sg-sdg { display: flex; align-items: center; gap: var(--g4g-space-2); font-size: var(--g4g-text-sm); }
.sg-sdg__num {
  flex: none;
  width: 2ch;
  font-weight: var(--g4g-weight-bold);
  color: var(--g4g-text-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.sg-sdg__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-sdg__hex { flex: none; font-size: var(--g4g-text-xs); color: var(--g4g-text-subtle); }

/* Démo des squelettes */
.sg-skeleton-demo { display: flex; gap: var(--g4g-space-4); max-width: 460px; }
.sg-skeleton__thumb { width: 118px; height: 118px; flex: none; }
.sg-skeleton__lines { flex: 1; display: flex; flex-direction: column; gap: var(--g4g-space-2); padding-top: var(--g4g-space-1); }
.sg-skeleton__line { height: 11px; }
.sg-skeleton__line--xs { width: 120px; }
.sg-skeleton__line--md { width: 150px; }
.sg-skeleton__line--lg { width: 62%; height: 18px; }

/* Démo de carte */
.sg-card-demo { max-width: 360px; }
.sg-card-demo__title { margin-top: 0; }
.sg-card-demo__text { color: var(--g4g-text-muted); }

/* Astérisque « requis » — décoratif : `required` sur le champ porte déjà
 * l'information pour les technologies d'assistance. */
.g4g-field__req { color: var(--g4g-danger); }

/* ── Paramètres du compte (droits Loi 25 self-serve) ───────────────────── */
/* Utilitaire de texte atténué (métadonnées, descriptions). */
.g4g-text-muted { color: var(--g4g-text-muted); }
/* Placeholder d'image (STAFF only, aide d'auteur) : remplit son conteneur
 * (couverture, galerie…) d'un bloc gris pointillé + libellé « placeholder » pour
 * signaler un emplacement photo à remplir. Jamais rendu pour le public. */
.g4g-img-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--g4g-space-1);
  width: 100%;
  height: 100%;
  min-height: 120px;
  border: 2px dashed var(--g4g-border-strong);
  border-radius: var(--g4g-radius-md);
  background: var(--g4g-surface-sunken);
  color: var(--g4g-text-subtle);
  font-size: var(--g4g-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.g4g-img-ph__text { font-weight: var(--g4g-weight-semibold); }
/* Lien texte générique (souligné au survol, halo au focus). Primitive TRANSVERSE :
 * répertoire (« Élargir » / « Revenir à… ») ET communauté (onglet Événements de
 * l'espace). Promue ici depuis app-repertoire.css — définition unique. */
.g4g-link {
  color: var(--g4g-primary);
  font-weight: var(--g4g-weight-semibold);
  text-decoration: none;
}
.g4g-link:hover { text-decoration: underline; }
.g4g-link:focus-visible { outline: none; border-radius: var(--g4g-radius-sm); box-shadow: var(--g4g-focus-ring); }
.g4g-settings { display: grid; gap: var(--g4g-space-6); }
.g4g-section__title {
  display: flex; align-items: center; gap: var(--g4g-space-2);
  margin: 0 0 var(--g4g-space-2);
  font-size: var(--g4g-text-lg); font-weight: var(--g4g-weight-semibold);
}
.g4g-sep { border: 0; border-top: 1px solid var(--g4g-border); margin: var(--g4g-space-5) 0; }
/* Ligne « description à gauche, action à droite » (export / suppression). */
.g4g-data-right {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--g4g-space-4); flex-wrap: wrap;
}
.g4g-data-right__body { flex: 1 1 16rem; }
.g4g-data-right__title { margin: 0 0 var(--g4g-space-1); font-size: var(--g4g-text-md); font-weight: var(--g4g-weight-semibold); }

/* ── Back-office de modération (file des cas) ───────────────────────────── */
.g4g-modqueue { display: grid; gap: var(--g4g-space-4); list-style: none; padding: 0; margin: 0; }
.g4g-modcase__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--g4g-space-2);
  margin: 0 0 var(--g4g-space-2);
  font-size: var(--g4g-text-sm); color: var(--g4g-text-muted);
}
.g4g-modcase__label { margin: 0 0 var(--g4g-space-1); font-weight: var(--g4g-weight-semibold); }
.g4g-modcase__body { margin: 0 0 var(--g4g-space-3); white-space: pre-line; }
.g4g-modcase__cats { display: flex; flex-wrap: wrap; gap: var(--g4g-space-1); margin: 0 0 var(--g4g-space-3); }
.g4g-modcase__actions { display: flex; flex-wrap: wrap; gap: var(--g4g-space-2); }

/* --- Portail de première visite (dimension audience) — SAS D'ENTRÉE ----------
   Habillage signature Claude Design (maquette « Portail d'entrée » 2026-08-21) :
   sas PLEIN CADRE et OPAQUE (le contenu de la page reste entier DERRIÈRE dans le
   DOM pour les robots + l'amélioration progressive), héro bichrome, deux
   cartes-audience, échappatoire, voile de transition. Tokens-only (CSP). */
.g4g-portal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  /* [p11] Filet anti-clipping : sur un écran court, le sas défile au lieu de couper
     le bas (overflow-x masqué pour ne pas révéler de barre pendant le slide). */
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--g4g-surface);
  color: var(--g4g-text);
  font-family: var(--g4g-font-heading);
  -webkit-font-smoothing: antialiased;
  /* [p12] Sortie « slide to right » : au choix d'une porte, le portail glisse hors
     champ vers la droite (au lieu du voile navy en coupe) et révèle la page. */
  transition: transform 520ms cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
.g4g-portal[data-portal-phase="sweep"] { transform: translateX(100%); }

/* Pictos flottants décoratifs (filigrane). */
.g4g-portal__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--g4g-border);
}
.g4g-portal__picto { position: absolute; }
.g4g-portal__picto--a { left: 6%; top: 22%; animation: g4gPortalFloatA 7200ms cubic-bezier(0.37, 0, 0.63, 1) infinite; }
.g4g-portal__picto--b { left: 14%; top: 64%; animation: g4gPortalFloatB 6400ms cubic-bezier(0.37, 0, 0.63, 1) infinite; }
.g4g-portal__picto--c { right: 8%; top: 18%; animation: g4gPortalFloatC 8000ms cubic-bezier(0.37, 0, 0.63, 1) infinite; }
.g4g-portal__picto--d { right: 15%; top: 70%; animation: g4gPortalFloatA 6800ms cubic-bezier(0.37, 0, 0.63, 1) infinite; }
.g4g-portal__picto--e { left: 44%; top: 8%; animation: g4gPortalFloatB 7600ms cubic-bezier(0.37, 0, 0.63, 1) infinite; }
/* Dégradé de teintes du filigrane (fidélité maquette : 3 valeurs échelonnées).
   Pictos a/c = teinte de base (--g4g-border héritée de __decor) ; b/d et e plus clairs. */
.g4g-portal__picto--b,
.g4g-portal__picto--d { color: color-mix(in srgb, var(--g4g-border) 79%, var(--g4g-surface)); }
.g4g-portal__picto--e { color: color-mix(in srgb, var(--g4g-border) 67%, var(--g4g-surface)); }

.g4g-portal__stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* En-tête : logo + sélecteur de langue. */
.g4g-portal__header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 30px 40px;
  animation: g4gPortalIn 520ms cubic-bezier(0.16, 0.84, 0.44, 1) both;
}
.g4g-portal__logo { display: block; height: 56px; width: auto; }
.g4g-portal__header-spacer { flex: 1; }
.g4g-portal__lang {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--g4g-border);
  border-radius: var(--g4g-radius-pill);
  font-size: 12.5px;
  font-weight: var(--g4g-weight-semibold);
}
.g4g-portal__lang-form { margin: 0; display: flex; }
.g4g-portal__lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 9px 16px;
  font: inherit;
  line-height: 1;
  color: var(--g4g-text-muted);
  cursor: pointer;
}
.g4g-portal__lang-btn.is-active {
  background: var(--g4g-primary);
  color: var(--g4g-primary-contrast);
}
/* Anneau de focus porté par le CONTENEUR (focus-within) : les boutons remplissent
   la pilule bord à bord, un anneau extérieur sur le bouton serait rogné par
   l'overflow:hidden du conteneur. Le conteneur, lui, a de la marge dans l'en-tête
   → anneau visible (WCAG 2.4.7). */
.g4g-portal__lang-btn:focus-visible { outline: none; }
.g4g-portal__lang:focus-within { box-shadow: var(--g4g-focus-ring); }

/* Corps centré. */
.g4g-portal__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 20px 40px 40px;
}

.g4g-portal__hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  animation: g4gPortalIn 620ms cubic-bezier(0.16, 0.84, 0.44, 1) 120ms both;
}
.g4g-portal__title {
  margin: 0;
  font-size: clamp(32px, 4.4vw, 54px); /* [p11] resserré pour tenir dans la page */
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: var(--g4g-weight-light);
  color: var(--g4g-text);
}
.g4g-portal__title-strong { font-weight: var(--g4g-weight-semibold); }
.g4g-portal__title-accent { font-weight: var(--g4g-weight-semibold); color: var(--g4g-accent); }
.g4g-portal__subtitle {
  margin: 16px auto 0;
  max-width: 56ch;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--g4g-text-muted);
  text-wrap: pretty;
}

/* Deux cartes-audience. */
.g4g-portal__choices {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.g4g-portal__choice { display: flex; }
.g4g-portal__choice:nth-child(1) .g4g-portal__card { animation: g4gPortalIn 680ms cubic-bezier(0.16, 0.84, 0.44, 1) 240ms both; }
.g4g-portal__choice:nth-child(2) .g4g-portal__card { animation: g4gPortalIn 680ms cubic-bezier(0.16, 0.84, 0.44, 1) 330ms both; }
.g4g-portal__card {
  display: flex; /* [p11] carte minimaliste, contenu centré */
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  width: 100%;
  padding: 30px 30px 26px;
  border: 1px solid var(--g4g-border);
  border-radius: var(--g4g-radius-lg);
  background: var(--g4g-surface);
  box-shadow: var(--g4g-shadow-sm);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 260ms cubic-bezier(0.16, 0.84, 0.44, 1),
    border-color 140ms cubic-bezier(0.16, 0.84, 0.44, 1),
    transform 260ms cubic-bezier(0.16, 0.84, 0.44, 1);
}
.g4g-portal__card:hover {
  box-shadow: var(--g4g-shadow-lg);
  border-color: var(--g4g-accent);
  transform: translateY(-3px);
}
.g4g-portal__card:focus-visible { outline: none; box-shadow: var(--g4g-focus-ring); }
.g4g-portal__media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--g4g-radius-lg);
  background: var(--g4g-surface-alt);
}
.g4g-portal__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.g4g-portal__eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}
.g4g-portal__choice-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 68px;  /* [p11] grand icône, remplace la photo */
  height: 68px;
  border-radius: var(--g4g-radius-pill);
  background: var(--g4g-primary-soft);
  color: var(--g4g-primary);
}
.g4g-portal__eyebrow {
  margin-top: 18px; /* [p11] sous l'icône (l'ancienne rangée eyebrow a été retirée) */
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: var(--g4g-weight-semibold);
  color: var(--g4g-text-muted);
}
.g4g-portal__choice-title {
  display: block;
  margin-top: 12px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: var(--g4g-weight-medium);
  color: var(--g4g-text);
}
.g4g-portal__choice-title-strong { font-weight: var(--g4g-weight-semibold); }
.g4g-portal__choice-desc {
  display: block;
  margin: 12px auto 0; /* [p11] centré */
  max-width: 34ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--g4g-text-muted);
}
.g4g-portal__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  min-height: 48px;
  padding: 13px 24px;
  border-radius: var(--g4g-radius-pill);
  background: var(--g4g-primary);
  color: var(--g4g-primary-contrast);
  font-size: 15px;
  font-weight: var(--g4g-weight-semibold);
}
.g4g-portal__choice-icon svg,
.g4g-portal__cta svg { stroke: currentColor; fill: none; }

/* Échappatoire « Explorer d'abord ». */
.g4g-portal__skip {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: g4gPortalIn 620ms cubic-bezier(0.16, 0.84, 0.44, 1) 460ms both;
}
.g4g-portal__skip-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  color: var(--g4g-text-muted);
  font-size: 14.5px;
  font-weight: var(--g4g-weight-medium);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--g4g-border-strong);
  transition: color 140ms cubic-bezier(0.16, 0.84, 0.44, 1);
}
.g4g-portal__skip-link:hover { color: var(--g4g-accent); }
.g4g-portal__skip-hint {
  font-size: 12.5px;
  color: var(--g4g-text-muted);
}

/* Voile de transition — glisse pour couvrir l'écran avant la navigation (piloté
   par portal-transition.js via [data-portal-phase], jamais de style inline). */
.g4g-portal__veil {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--g4g-primary);
  transform: translateX(-101%);
  transition: transform 520ms cubic-bezier(0.65, 0, 0.35, 1);
  pointer-events: none;
  will-change: transform;
}
/* [p12] Le voile navy n'est PLUS déclenché : la sortie se fait par glissement du
   portail entier vers la droite (règle `.g4g-portal[data-portal-phase="sweep"]`
   plus haut). Le voile reste hors champ (repli si le glissement est indisponible). */
/* Carte choisie mise en avant, l'autre s'efface (transition scénarisée).
   Fidélité maquette : la carte non choisie glisse horizontalement vers son bord
   (première → gauche, dernière → droite), la choisie grandit légèrement. */
.g4g-portal__choices[data-choosing="true"] .g4g-portal__choice:not([data-chosen]) {
  opacity: 0;
  transition: opacity 380ms cubic-bezier(0.65, 0, 0.35, 1), transform 380ms cubic-bezier(0.65, 0, 0.35, 1);
}
.g4g-portal__choices[data-choosing="true"] .g4g-portal__choice:first-child:not([data-chosen]) {
  transform: translateX(-28px);
}
.g4g-portal__choices[data-choosing="true"] .g4g-portal__choice:last-child:not([data-chosen]) {
  transform: translateX(28px);
}
.g4g-portal__choice[data-chosen] {
  transform: scale(1.03);
  transition: transform 380ms cubic-bezier(0.65, 0, 0.35, 1);
}

@media (max-width: 760px) {
  .g4g-portal__header { padding: 20px; gap: 12px; }
  .g4g-portal__body { padding: 12px 20px 32px; }
  .g4g-portal__choices { grid-template-columns: 1fr; margin-top: 36px; }
}

@keyframes g4gPortalIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes g4gPortalFloatA { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes g4gPortalFloatB { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@keyframes g4gPortalFloatC { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

@media (prefers-reduced-motion: reduce) {
  .g4g-portal *,
  .g4g-portal__veil {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- Modale de succès du formulaire de contact (?contact=success) -----------
   Couche flottante globale (rendue en fin de <body>). Voile + carte centrée ;
   tokens-only, aucun style inline (CSP). */
.g4g-cmodal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--g4g-space-5);
}
.g4g-cmodal__scrim {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--g4g-text) 55%, transparent);
  animation: g4gCmodalFade 200ms ease both;
}
.g4g-cmodal__dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--g4g-surface);
  color: var(--g4g-text);
  border-radius: var(--g4g-radius-lg);
  box-shadow: var(--g4g-shadow-lg);
  padding: var(--g4g-space-10) var(--g4g-space-8) var(--g4g-space-8);
  text-align: center;
  animation: g4gCmodalIn 260ms cubic-bezier(0.16, 0.84, 0.44, 1) both;
}
.g4g-cmodal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: var(--g4g-space-4);
  border-radius: var(--g4g-radius-pill);
  background: var(--g4g-success-tint);
  color: var(--g4g-success-text);
}
.g4g-cmodal__title {
  margin: 0 0 var(--g4g-space-2);
  font-size: var(--g4g-text-xl);
  font-weight: var(--g4g-weight-semibold);
  color: var(--g4g-primary);
}
.g4g-cmodal__text {
  margin: 0 0 var(--g4g-space-6);
  font-size: var(--g4g-text-base);
  line-height: 1.55;
  color: var(--g4g-text-muted);
}
.g4g-cmodal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--g4g-space-3) var(--g4g-space-6);
  border-radius: var(--g4g-radius-pill);
  background: var(--g4g-primary);
  color: var(--g4g-primary-contrast);
  font-weight: var(--g4g-weight-semibold);
  text-decoration: none;
}
.g4g-cmodal__btn:hover { background: var(--g4g-primary-hover); }
.g4g-cmodal__btn:focus-visible { outline: none; box-shadow: var(--g4g-focus-ring); }

@keyframes g4gCmodalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes g4gCmodalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .g4g-cmodal__scrim,
  .g4g-cmodal__dialog {
    animation-duration: 0.001ms !important;
  }
}

/* ── htmx : indicateurs de requête (MES-06, 2026-09-13) ──────────────────────────
   htmx 2 injecte ces règles dans une balise <style> inline SANS nonce → violation
   CSP `style-src` en console sur toutes les pages. base.html la désactive
   (`<meta name="htmx-config" content='{"includeIndicatorStyles": false}'>`) et les
   MÊMES règles vivent ici, en fichier statique (CSP-safe). */
.htmx-indicator {
  opacity: 0;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
  transition: opacity 200ms ease-in;
}
