/* ==========================================================================
   QuizLab Design System — design-system.css
   Exemple vivant de docs/design-system.md — à mettre à jour à CHAQUE
   changement de la spécification (voir design-system.md, en-tête et §26).

   Structure du fichier (miroir de la spec) :
   0. Marque (§0)
   1. Tokens (§3–7)          — la SEULE source de valeurs
   2. Base & primitives de layout (§8)
   3. Composants primitifs (§9–11)
   4. Compositions (§12–15)
   5. Formulaire (§16–17)
   6. Drag & drop — états visuels (§18)
   7. Composants métier (§19–23)
   8. Styles propres à la page de démonstration (préfixe .ds-)
   ========================================================================== */

/* Auto-hébergement d'Inter (§4) : fichiers woff2 variables livrés avec le
   catalogue (assets/fonts/), aucune requête vers Google Fonts (aucune
   donnée hors de Suisse, CLAUDE.md). Dans l'app, ces mêmes fichiers sont
   servis via le paquet npm @fontsource-variable/inter (layout.tsx).
   Fichiers `opsz` : Inter v4 porte deux axes, la graisse et la **taille
   optique**. Le second redessine la lettre selon la taille rendue — moins
   de contraste et plus de chasse en 11 px, plus de finesse en 31 px. Le
   navigateur le pilote seul (`font-optical-sizing: auto`, défaut) dès que
   le fichier l'expose : c'est le réglage, pas une autre police. */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("assets/fonts/inter-latin-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("assets/fonts/inter-latin-ext-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   1. TOKENS — design-system.md §3–7
   ========================================================================== */

:root {
  /* --- Couleur : surfaces (§3.2) — papier d'écolier (ADR au commit) --- */
  --ask-color-bg: #f7f2e7;
  --ask-color-surface: #fffdf7;
  --ask-color-surface-2: #f0e9da;
  --ask-color-surface-raised: #ffffff;
  --ask-color-surface-sunken: #e9e1cf;

  /* --- Couleur : contenu — encre chaude --- */
  --ask-color-text: #221d13;
  --ask-color-text-muted: #5c5342;
  --ask-color-text-faint: #756b57;
  --ask-color-text-on-accent: #ffffff;

  /* --- Couleur : interactif — vert tableau (extrémité turquoise du logo,
         assombrie pour AA, §0.2) --- */
  --ask-color-accent: #14695a;
  --ask-color-accent-hover: #0f574b;
  --ask-color-accent-active: #0b463c;
  --ask-color-accent-subtle: rgba(20, 105, 90, 0.1);
  --ask-color-border: rgba(34, 29, 19, 0.12);
  --ask-color-border-strong: rgba(34, 29, 19, 0.26);
  --ask-color-focus: #14695a;

  /* --- Couleur : intentions (quatuor fg / bg / border / solid) — danger
         inchangé : Citrus et Funky en héritent --- */
  --ask-color-success-fg: #3f6212;
  --ask-color-success-bg: #edf2dd;
  --ask-color-success-border: #c2d29b;
  --ask-color-success-solid: #3f6212;

  --ask-color-warning-fg: #9a5408;
  --ask-color-warning-bg: #f9eeda;
  --ask-color-warning-border: #e2c48c;
  --ask-color-warning-solid: #9a5408;

  --ask-color-danger-fg: #b02626;
  --ask-color-danger-bg: #fceceb;
  --ask-color-danger-border: #eeb4b2;
  --ask-color-danger-solid: #b02626;

  --ask-color-info-fg: #3f5799;
  --ask-color-info-bg: #eaeef8;
  --ask-color-info-border: #bcc7e6;
  --ask-color-info-solid: #3f5799;

  /* --- Couleur : données (graphiques uniquement, §3.1) --- */
  --ask-viz-1: #14695a;
  --ask-viz-2: #3f5799;
  --ask-viz-3: #a4650b;
  --ask-viz-4: #a8503a;
  --ask-viz-5: #84488f;
  --ask-viz-6: #66702e;

  /* --- Couleur : identité de domaine (§3.2, ADR-027) — la couleur dit
         l'appartenance à un domaine racine du référentiel, jamais une
         intention ni une mesure. Attribution cyclique par position du
         domaine racine (1 + position mod 8). --- */
  --ask-dom-1: #2563eb;
  --ask-dom-2: #0d9488;
  --ask-dom-3: #a16207;
  --ask-dom-4: #db2777;
  --ask-dom-5: #ea580c;
  --ask-dom-6: #7c3aed;
  --ask-dom-7: #0e7490;
  --ask-dom-8: #4d7c0f;
  /* Fonds teintés : dérivés une seule fois — var() se résout à l'usage,
     les valeurs sombres de --ask-dom-N suffisent donc aussi ici. */
  --ask-dom-1-subtle: color-mix(in srgb, var(--ask-dom-1) 12%, transparent);
  --ask-dom-2-subtle: color-mix(in srgb, var(--ask-dom-2) 12%, transparent);
  --ask-dom-3-subtle: color-mix(in srgb, var(--ask-dom-3) 12%, transparent);
  --ask-dom-4-subtle: color-mix(in srgb, var(--ask-dom-4) 12%, transparent);
  --ask-dom-5-subtle: color-mix(in srgb, var(--ask-dom-5) 12%, transparent);
  --ask-dom-6-subtle: color-mix(in srgb, var(--ask-dom-6) 12%, transparent);
  --ask-dom-7-subtle: color-mix(in srgb, var(--ask-dom-7) 12%, transparent);
  --ask-dom-8-subtle: color-mix(in srgb, var(--ask-dom-8) 12%, transparent);

  /* --- Couleur : catégories racines (§3.2, ADR-154) — choisie, stockée
         (`color_index` 1–20). Distincte de --ask-dom-* (identité de
         domaine). Les enfants héritent de la racine. --- */
  --ask-cat-1: #2563eb;
  --ask-cat-2: #0d9488;
  --ask-cat-3: #ca8a04;
  --ask-cat-4: #db2777;
  --ask-cat-5: #ea580c;
  --ask-cat-6: #7c3aed;
  --ask-cat-7: #0891b2;
  --ask-cat-8: #65a30d;
  --ask-cat-9: #e11d48;
  --ask-cat-10: #4f46e5;
  --ask-cat-11: #059669;
  --ask-cat-12: #c026d3;
  --ask-cat-13: #d97706;
  --ask-cat-14: #0284c7;
  --ask-cat-15: #be185d;
  --ask-cat-16: #0f766e;
  --ask-cat-17: #9333ea;
  --ask-cat-18: #b45309;
  --ask-cat-19: #1d4ed8;
  --ask-cat-20: #15803d;
  --ask-cat-1-subtle: color-mix(in srgb, var(--ask-cat-1) 12%, transparent);
  --ask-cat-2-subtle: color-mix(in srgb, var(--ask-cat-2) 12%, transparent);
  --ask-cat-3-subtle: color-mix(in srgb, var(--ask-cat-3) 12%, transparent);
  --ask-cat-4-subtle: color-mix(in srgb, var(--ask-cat-4) 12%, transparent);
  --ask-cat-5-subtle: color-mix(in srgb, var(--ask-cat-5) 12%, transparent);
  --ask-cat-6-subtle: color-mix(in srgb, var(--ask-cat-6) 12%, transparent);
  --ask-cat-7-subtle: color-mix(in srgb, var(--ask-cat-7) 12%, transparent);
  --ask-cat-8-subtle: color-mix(in srgb, var(--ask-cat-8) 12%, transparent);
  --ask-cat-9-subtle: color-mix(in srgb, var(--ask-cat-9) 12%, transparent);
  --ask-cat-10-subtle: color-mix(in srgb, var(--ask-cat-10) 12%, transparent);
  --ask-cat-11-subtle: color-mix(in srgb, var(--ask-cat-11) 12%, transparent);
  --ask-cat-12-subtle: color-mix(in srgb, var(--ask-cat-12) 12%, transparent);
  --ask-cat-13-subtle: color-mix(in srgb, var(--ask-cat-13) 12%, transparent);
  --ask-cat-14-subtle: color-mix(in srgb, var(--ask-cat-14) 12%, transparent);
  --ask-cat-15-subtle: color-mix(in srgb, var(--ask-cat-15) 12%, transparent);
  --ask-cat-16-subtle: color-mix(in srgb, var(--ask-cat-16) 12%, transparent);
  --ask-cat-17-subtle: color-mix(in srgb, var(--ask-cat-17) 12%, transparent);
  --ask-cat-18-subtle: color-mix(in srgb, var(--ask-cat-18) 12%, transparent);
  --ask-cat-19-subtle: color-mix(in srgb, var(--ask-cat-19) 12%, transparent);
  --ask-cat-20-subtle: color-mix(in srgb, var(--ask-cat-20) 12%, transparent);

  /* --- Typographie (§4) --- */
  --ask-font-sans: "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ask-font-mono: ui-monospace, "SF Mono", "Cascadia Code", monospace;
  --ask-text-xs: clamp(0.6875rem, 0.66rem + 0.1vw, 0.75rem);
  --ask-text-sm: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --ask-text-base: clamp(0.9375rem, 0.9rem + 0.15vw, 1rem);
  --ask-text-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --ask-text-xl: clamp(1.25rem, 1.15rem + 0.6vw, 1.5rem);
  --ask-text-2xl: clamp(1.625rem, 1.45rem + 0.9vw, 1.9375rem);
  /* Échelle affiche PUBLIQUE (ADR au commit) : le H1 du hero de la landing,
     et lui seul — display reste réservé au PIN live (§4). */
  --ask-text-poster: clamp(2.125rem, 1.4rem + 3.2vw, 3.5rem);
  --ask-text-display: clamp(2.75rem, 1.75rem + 4.5vw, 6rem);
  --ask-measure: 68ch;

  /* --- Espacement (§5.1) --- */
  --ask-space-1: 4px;
  --ask-space-2: 8px;
  --ask-space-3: 12px;
  --ask-space-4: 16px;
  --ask-space-5: 24px;
  --ask-space-6: 32px;
  --ask-space-7: 48px;
  --ask-space-8: 64px;

  /* --- Dimensions de contrôle (§5.2) --- */
  --ask-control-sm: 36px;
  --ask-control-md: 44px;
  --ask-control-lg: 52px;
  --ask-hit-min: 44px;

  /* --- Forme (§5.3) --- */
  --ask-radius-sm: 6px;
  --ask-radius-md: 10px;
  --ask-radius-lg: 16px;
  --ask-radius-full: 9999px;
  --ask-border-w: 1px;

  /* --- Élévation (§6) --- */
  --ask-elev-1: 0 1px 2px rgba(44, 36, 20, 0.05), 0 1px 3px rgba(44, 36, 20, 0.06);
  --ask-elev-2: 0 4px 10px rgba(44, 36, 20, 0.07), 0 2px 4px rgba(44, 36, 20, 0.05);
  --ask-elev-3: 0 16px 40px rgba(44, 36, 20, 0.14), 0 4px 12px rgba(44, 36, 20, 0.07);

  /* --- Z-index (échelle fermée, §6) --- */
  --ask-z-sticky: 100;
  --ask-z-nav: 200;
  --ask-z-overlay: 300;
  --ask-z-surface: 310;
  --ask-z-popover: 400;
  --ask-z-toast: 500;

  /* --- Mouvement (§7) --- */
  --ask-motion-fast: 120ms;
  --ask-motion-base: 200ms;
  --ask-motion-slow: 320ms;
  --ask-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ask-ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  /* Approximation CSS du spring(1, 80, 12) de la spec §7 : léger dépassement
     élastique — drag, célébrations, micro-délices (ADR-027). */
  --ask-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  color-scheme: light;
}

/* --- Jeu sombre : mêmes tokens, autres valeurs. Aucun composant ne teste le
       thème (§3.3) — seules ces valeurs changent. Depuis ADR-226 ce n'est
       plus une préférence et `data-theme` ne se pose plus sur <html> : il ne
       sert qu'en CADRAGE LOCAL, sur le sous-arbre qui doit passer au sombre
       (bandeau de la page publique). Le sombre choisi par l'utilisateur, lui,
       est un thème à part entière — opt4 Blacky. --- */
[data-theme="dark"] {
  --ask-color-bg: #121217;
  --ask-color-surface: #16161d;
  --ask-color-surface-2: #1e1e27;
  --ask-color-surface-raised: #232330;
  --ask-color-surface-sunken: #101015;

  --ask-color-text: #ededf2;
  --ask-color-text-muted: #a3a3b2;
  --ask-color-text-faint: #6e6e80;
  --ask-color-text-on-accent: #14141b;

  --ask-color-accent: #7d88e6;
  --ask-color-accent-hover: #9fa7ec;
  --ask-color-accent-active: #5e6ce0;
  --ask-color-accent-subtle: rgba(125, 136, 230, 0.14);
  --ask-color-border: rgba(237, 237, 242, 0.12);
  --ask-color-border-strong: rgba(237, 237, 242, 0.28);
  --ask-color-focus: #7d88e6;

  --ask-color-success-fg: #4ade80;
  --ask-color-success-bg: rgba(74, 222, 128, 0.12);
  --ask-color-success-border: rgba(74, 222, 128, 0.35);
  --ask-color-success-solid: #22c55e;

  --ask-color-warning-fg: #fbbf24;
  --ask-color-warning-bg: rgba(251, 191, 36, 0.12);
  --ask-color-warning-border: rgba(251, 191, 36, 0.35);
  --ask-color-warning-solid: #d97706;

  --ask-color-danger-fg: #f87171;
  --ask-color-danger-bg: rgba(248, 113, 113, 0.12);
  --ask-color-danger-border: rgba(248, 113, 113, 0.35);
  --ask-color-danger-solid: #dc2626;

  --ask-color-info-fg: #38bdf8;
  --ask-color-info-bg: rgba(56, 189, 248, 0.12);
  --ask-color-info-border: rgba(56, 189, 248, 0.35);
  --ask-color-info-solid: #0284c7;

  /* Identité de domaine (§3.2, ADR-027) : teintes éclaircies, les fonds
     -subtle se dérivent seuls (color-mix sur var, défini une fois en :root) */
  --ask-dom-1: #60a5fa;
  --ask-dom-2: #2dd4bf;
  --ask-dom-3: #eab308;
  --ask-dom-4: #f472b6;
  --ask-dom-5: #fb923c;
  --ask-dom-6: #a78bfa;
  --ask-dom-7: #22d3ee;
  --ask-dom-8: #a3e635;

  /* Catégories racines (ADR-154) : teintes éclaircies, -subtle via :root */
  --ask-cat-1: #60a5fa;
  --ask-cat-2: #2dd4bf;
  --ask-cat-3: #facc15;
  --ask-cat-4: #f472b6;
  --ask-cat-5: #fb923c;
  --ask-cat-6: #a78bfa;
  --ask-cat-7: #22d3ee;
  --ask-cat-8: #a3e635;
  --ask-cat-9: #fb7185;
  --ask-cat-10: #818cf8;
  --ask-cat-11: #34d399;
  --ask-cat-12: #e879f9;
  --ask-cat-13: #fbbf24;
  --ask-cat-14: #38bdf8;
  --ask-cat-15: #f9a8d4;
  --ask-cat-16: #2dd4bf;
  --ask-cat-17: #c084fc;
  --ask-cat-18: #fbbf24;
  --ask-cat-19: #60a5fa;
  --ask-cat-20: #4ade80;

  /* Élévation sombre : surfaces éclaircies, ombres discrètes (§6) */
  --ask-elev-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --ask-elev-2: 0 4px 10px rgba(0, 0, 0, 0.45);
  --ask-elev-3: 0 16px 40px rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}

/* Reduced motion : géré DANS les tokens, pas composant par composant (§7) */
/* Skin « funky » (ADR-059, valeurs ADR-145, personnalité poussée ADR-224) —
   surcharges de valeurs, défaut pour tous (data-skin sur <html>) : retirer
   l'attribut restaure le classique. Miroir de semantic.json (pnpm tokens). */
[data-skin="funky"] {
  --ask-radius-sm: 12px;
  --ask-radius-md: 20px;
  --ask-radius-lg: 32px;
  --ask-control-md: 46px;
  --ask-motion-base: 180ms;
  --ask-ease-spring: cubic-bezier(0.34, 1.75, 0.5, 1);

  --ask-color-bg: #fff3ea;
  --ask-color-surface: #ffffff;
  --ask-color-surface-2: #ffe9db;
  --ask-color-surface-sunken: #ffdcc7;
  --ask-color-text: #2a1520;
  --ask-color-text-muted: #6b4e58;
  --ask-color-text-faint: #7e5f69;
  --ask-color-accent: #be185d;
  --ask-color-accent-hover: #9d174d;
  --ask-color-accent-active: #831843;
  --ask-color-accent-subtle: rgba(190, 24, 93, 0.12);
  --ask-color-border: rgba(42, 21, 32, 0.13);
  --ask-color-border-strong: rgba(42, 21, 32, 0.30);
  --ask-color-focus: #be185d;
  --ask-color-info-fg: #be123c;
  --ask-color-info-bg: rgba(190, 18, 60, 0.10);
  --ask-color-info-border: rgba(190, 18, 60, 0.35);
  --ask-color-info-solid: #be123c;
  --ask-color-success-fg: #047857;
  --ask-color-success-bg: rgba(4, 120, 87, 0.10);
  --ask-color-success-border: rgba(4, 120, 87, 0.35);
  --ask-color-success-solid: #047857;
  --ask-color-warning-fg: #b45309;
  --ask-color-warning-bg: rgba(180, 83, 9, 0.12);
  --ask-color-warning-border: rgba(180, 83, 9, 0.35);
  --ask-color-warning-solid: #b45309;
  --ask-viz-1: #be185d;
  --ask-viz-2: #7c3aed;
  --ask-viz-3: #ea580c;
  --ask-viz-4: #0d9488;
  --ask-viz-5: #2563eb;
  --ask-viz-6: #a16207;
  --ask-elev-1: 0 1px 2px rgba(190, 24, 93, 0.14), 0 2px 6px rgba(190, 24, 93, 0.12);
  --ask-elev-2: 0 4px 14px rgba(190, 24, 93, 0.20), 0 2px 4px rgba(190, 24, 93, 0.12);
  --ask-elev-3: 0 18px 48px rgba(190, 24, 93, 0.32), 0 4px 12px rgba(190, 24, 93, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --ask-motion-fast: 0ms;
    --ask-motion-base: 0ms;
    --ask-motion-slow: 0ms;
  }
}

/* ==========================================================================
   0. MARQUE — §0
   Lockup logo + nom + baseline. Le fichier logo lui-même (design/assets/
   logo/) n'est jamais modifié (§0.1) ; ces classes ne stylent que le lockup
   texte autour de l'image, fournie en <img> par la page consommatrice.
   ========================================================================== */

.ask-logo {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  flex: none;
  color: inherit;
  text-decoration: none;
}
.ask-logo-mark {
  width: 38px;
  height: 38px;
  flex: none;
  object-fit: contain;
}
.ask-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.ask-logo-name {
  font-weight: 700;
  font-size: var(--ask-text-lg);
}
.ask-logo-baseline {
  font-weight: 400;
  font-size: calc(var(--ask-text-xs) - 2px);
  color: var(--ask-color-text-muted);
}

/* ==========================================================================
   2. BASE & PRIMITIVES DE LAYOUT — §8
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* HTML living standard : [hidden] doit gagner contre toute classe qui pose
   `display` (flex, grid, contents). Sans !important, ask-stack / app-editor-lock
   laissent le contenu à l'écran et le toggle n'a aucun effet. */
[hidden]:not([hidden="until-found"]) {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--ask-font-sans);
  font-size: var(--ask-text-base);
  /* 1.55 plutôt que 1.5 : un produit qui se lit beaucoup gagne à cette
     demi-ligne d'air, sans partir dans l'espacement d'un texte long. */
  line-height: 1.55;
  color: var(--ask-color-text);
  background: var(--ask-color-bg);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

/* Les contrôles de formulaire n'héritent pas de la police par défaut du
   navigateur (comportement UA historique) — sans ce reset, ask-input,
   ask-select, ask-textarea et tout ask-btn/ask-icon-btn (des <button>)
   retombent sur la police système au lieu de --ask-font-sans (§4). */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
}

/* La taille optique s'occupe du dessin ; reste l'approche, qu'Inter laisse
   volontairement large. Au-delà de 20 px un titre paraît alors délavé —
   un cheveu de crénage négatif lui rend sa tenue. */
h1, h2, h3, h4 {
  letter-spacing: -0.012em;
}

:focus-visible {
  outline: 2px solid var(--ask-color-focus);
  outline-offset: 2px;
  border-radius: var(--ask-radius-sm);
}

/* Les composants n'ont pas de marge externe : l'espacement vient du parent */
.ask-stack {
  display: flex;
  flex-direction: column;
  gap: var(--ask-space-4);
}
/* Un enfant de flex ne descend pas sous son min-content sans ça — même
 * mécanique que les pistes de grille (ADR-279). La règle vaut aussi pour les
 * primitives de mise en page elles-mêmes : sans elle, une table dans une
 * carte, dans une pile, dans une colonne de tableau de bord repoussait la
 * chaîne entière et la page devenait plus large que l'écran. */
.ask-stack,
.ask-stack > *,
.ask-card { min-width: 0; }
.ask-stack.row {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
}
/* Ligne média (anneau / avatar + libellé + action) : l'action reste à
   droite, le libellé rétrécit. `wrap` reste le défaut (chips, toolbars). */
.ask-stack.row.nowrap { flex-wrap: nowrap; }
/* Les enfants flexibles peuvent rétrécir proprement (le texte passe à la
   ligne au lieu de déborder) ; les éléments flex:none ne bougent pas. */
.ask-stack.row > * { min-width: 0; }
.ask-stack.gap-1 { gap: var(--ask-space-1); }
.ask-stack.gap-2 { gap: var(--ask-space-2); }
.ask-stack.gap-3 { gap: var(--ask-space-3); }
.ask-stack.gap-5 { gap: var(--ask-space-5); }

.ask-grid {
  display: grid;
  gap: var(--ask-space-4);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.ask-container { margin-inline: auto; width: 100%; }
.ask-container.content { max-width: 1200px; }
.ask-container.read { max-width: 760px; }
.ask-container.focus { max-width: 680px; }
.ask-container.stage { max-width: 1080px; } /* scène de quiz (§19.8, ADR-058) */

.ask-divider {
  border: 0;
  border-top: var(--ask-border-w) solid var(--ask-color-border);
  margin: 0;
}

/* ==========================================================================
   3. COMPOSANTS PRIMITIFS — §9–11
   ========================================================================== */

/* --- ask-icon (§11.0) ---
   Unique vecteur de pictogrammes de l'interface : masques SVG monochromes
   teintés par currentColor, dimensionnés en em (suivent le texte).
   AUCUN emoji dans l'interface (ux-ui §3.4) — les emojis ne sont admis
   que dans le contenu créé par les auteurs. --- */
.ask-ico {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.2em;
  background-color: currentColor;
  -webkit-mask: var(--ask-ico) center / contain no-repeat;
  mask: var(--ask-ico) center / contain no-repeat;
}
/* État « en cours » d'une icône (§11.0, ADR-206) : l'action est partie et
   travaille ailleurs. Réutilise `ask-live-pulse`, déjà au système, et son
   garde de mouvement réduit — une icône qui bat sans fin est pénible pour qui
   y est sensible. */
.ask-ico.is-working { opacity: 0.75; }
@media (prefers-reduced-motion: no-preference) {
  .ask-ico.is-working {
    animation: ask-live-pulse 1.2s var(--ask-ease-out) infinite;
  }
}

.ask-ico.sun { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); }
.ask-ico.compass { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolygon points='16 8 14 14 8 16 10 10 16 8'/%3E%3C/svg%3E"); }
.ask-ico.chart { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M8 17v-5M13 17v-9M18 17v-3'/%3E%3C/svg%3E"); }
.ask-ico.user { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-6 8-6s8 2 8 6'/%3E%3C/svg%3E"); }
.ask-ico.users { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c0-3.5 3-5 6.5-5s6.5 1.5 6.5 5M16 4a3.5 3.5 0 0 1 0 7M18 15.5c2.2.6 3.5 2 3.5 4.5'/%3E%3C/svg%3E"); }
.ask-ico.pencil { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3l4 4L8 20l-5 1 1-5L17 3z'/%3E%3C/svg%3E"); }
.ask-ico.more { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3C/svg%3E"); }
.ask-ico.route { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='5' r='2'/%3E%3Ccircle cx='18' cy='19' r='2'/%3E%3Cpath d='M8 5h7a4 4 0 0 1 0 8H9a4 4 0 0 0 0 8h7'/%3E%3C/svg%3E"); }
.ask-ico.tree { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='5' r='2'/%3E%3Ccircle cx='6' cy='19' r='2'/%3E%3Ccircle cx='18' cy='12' r='2'/%3E%3Cpath d='M6 7v10M6 12h10'/%3E%3C/svg%3E"); }
.ask-ico.search { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4.5-4.5'/%3E%3C/svg%3E"); }
.ask-ico.eye { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.ask-ico.eye-off { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18'/%3E%3Cpath d='M10.6 5.2A10.6 10.6 0 0 1 12 5c6.4 0 10 7 10 7a17.6 17.6 0 0 1-3.4 4.4M6.6 6.6C4 8.3 2 12 2 12s3.6 7 10 7a9.6 9.6 0 0 0 3.4-.6M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3C/svg%3E"); }
.ask-ico.filter { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E"); }
.ask-ico.building { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='1'/%3E%3Cpath d='M9 8h2M13 8h2M9 12h2M13 12h2M10 21v-4h4v4'/%3E%3C/svg%3E"); }
.ask-ico.alert { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3L2.5 20h19L12 3z'/%3E%3Cpath d='M12 10v4M12 17h.01'/%3E%3C/svg%3E"); }
.ask-ico.info { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E"); }
.ask-ico.flag { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4h12l-2.5 4 2.5 4H5'/%3E%3C/svg%3E"); }
.ask-ico.clock { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.ask-ico.target { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E"); }
.ask-ico.calendar { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='16' rx='2'/%3E%3Cpath d='M4 10h16M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.ask-ico.image { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='8.5' cy='10' r='1.5'/%3E%3Cpath d='M21 15l-5-5L6 20'/%3E%3C/svg%3E"); }
.ask-ico.paperclip { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 12.5l-8 8a5 5 0 0 1-7-7l9-9a3.5 3.5 0 0 1 5 5l-9 9a2 2 0 0 1-3-3l8-8'/%3E%3C/svg%3E"); }
.ask-ico.moon { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8.5 8.5 0 1 1 9.5 4a7 7 0 0 0 10.5 10.5z'/%3E%3C/svg%3E"); }
.ask-ico.globe { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c3 3.6 3 14.4 0 18M12 3c-3 3.6-3 14.4 0 18'/%3E%3C/svg%3E"); }
.ask-ico.logout { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E"); }
.ask-ico.sparkles { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.7 4.3L18 9l-4.3 1.7L12 15l-1.7-4.3L6 9l4.3-1.7L12 3z'/%3E%3Cpath d='M19 14l.9 2.1L22 17l-2.1.9L19 20l-.9-2.1L16 17l2.1-.9L19 14z'/%3E%3C/svg%3E"); }
.ask-ico.wifioff { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8.5C8 3.5 16 3.5 22 8.5M5 12.5c4-3.3 10-3.3 14 0M8.5 16c2-1.7 5-1.7 7 0M12 19.5h.01M3 3l18 18'/%3E%3C/svg%3E"); }
.ask-ico.hash { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9h16M4 15h16M10 3L8 21M16 3l-2 18'/%3E%3C/svg%3E"); }
.ask-ico.type { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7V4h16v3M12 4v16M9 20h6'/%3E%3C/svg%3E"); }
.ask-ico.checksquare { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M8 12l3 3 5-6'/%3E%3C/svg%3E"); }
.ask-ico.updown { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4v16M7 4L4 7M7 4l3 3M17 20V4M17 20l-3-3M17 20l3-3'/%3E%3C/svg%3E"); }
.ask-ico.grid { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
.ask-ico.link { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13.5a4.5 4.5 0 0 0 6.4 0l3-3a4.5 4.5 0 0 0-6.4-6.4L11.5 5.6M14 10.5a4.5 4.5 0 0 0-6.4 0l-3 3a4.5 4.5 0 0 0 6.4 6.4l1.5-1.5'/%3E%3C/svg%3E"); }
.ask-ico.play { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4l13 8-13 8V4z'/%3E%3C/svg%3E"); }
.ask-ico.trash { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M6 6l1 15h10l1-15M10 10v7M14 10v7'/%3E%3C/svg%3E"); }
.ask-ico.eye { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.ask-ico.settings { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.ask-ico.star { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E"); }
.ask-ico.ring { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3C/svg%3E"); }
/* Deux bulles de dialogue : le vocabulaire — `type` reste la saisie. */
.ask-ico.bubbles { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 3.5h-6a2 2 0 0 0-2 2V10a2 2 0 0 0 2 2h1v3l3.5-3h1.5a2 2 0 0 0 2-2V5.5a2 2 0 0 0-2-2z'/%3E%3Cpath d='M15 9.5h4.5a2 2 0 0 1 2 2V16a2 2 0 0 1-2 2h-1v3l-3.5-3H13.5a2 2 0 0 1-2-2v-1'/%3E%3C/svg%3E"); }
.ask-ico.thumb { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 22V10'/%3E%3Cpath d='M15 5.9 14 10h5.8a2 2 0 0 1 2 2.6l-2.4 8a2 2 0 0 1-1.9 1.4H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.8a2 2 0 0 0 1.8-1.1L12 2a3.1 3.1 0 0 1 3 3.9z'/%3E%3C/svg%3E"); }
.ask-ico.message { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.ask-ico.copy { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E"); }
.ask-ico.lock { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
.ask-ico.file { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.ask-ico.chevron { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.ask-ico.chevron.is-start { transform: rotate(90deg); }
.ask-ico.chevron.is-end { transform: rotate(-90deg); }
[dir="rtl"] .ask-ico.chevron.is-start { transform: rotate(-90deg); }
[dir="rtl"] .ask-ico.chevron.is-end { transform: rotate(90deg); }
.ask-icon-btn[aria-pressed="true"] .ask-ico.star { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E"); }
.ask-icon-btn[aria-pressed="true"] .ask-ico.ring { --ask-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Ccircle cx='12' cy='12' r='4.75' fill='black' stroke='none'/%3E%3C/svg%3E"); }

/* --- ask-button (§9.1) --- */
.ask-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ask-space-2);
  height: var(--ask-control-md);
  padding: 0 var(--ask-space-4);
  border: var(--ask-border-w) solid transparent;
  border-radius: var(--ask-radius-md);
  font: inherit;
  font-size: var(--ask-text-sm);
  font-weight: 500;
  cursor: pointer;
  /* Un bouton n'est jamais souligné — y compris rendu par un <a>/<Link>. */
  text-decoration: none;
  background: var(--ask-color-surface);
  color: var(--ask-color-text);
  border-color: var(--ask-color-border-strong);
  transition: background var(--ask-motion-fast) var(--ask-ease-out),
    transform var(--ask-motion-fast) var(--ask-ease-out);
  user-select: none;
  flex-shrink: 0;
}
.ask-btn:hover { background: var(--ask-color-surface-2); }
.ask-btn:active { transform: scale(0.98); }
.ask-btn.primary {
  background: var(--ask-color-accent);
  border-color: transparent;
  color: var(--ask-color-text-on-accent);
}
.ask-btn.primary:hover { background: var(--ask-color-accent-hover); }
.ask-btn.primary:active { background: var(--ask-color-accent-active); }
.ask-btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ask-color-accent);
}
.ask-btn.ghost:hover { background: var(--ask-color-accent-subtle); }
.ask-btn.danger {
  background: var(--ask-color-danger-solid);
  border-color: transparent;
  color: #fff;
}
.ask-btn.danger:hover { filter: brightness(1.08); }
/* Destructif secondaire (révoquer un lien, supprimer un commentaire) : le
   rouge est dans le texte, pas dans un aplat qui crierait plus fort que
   l'action principale de l'écran. */
.ask-btn.ghost.danger {
  background: none;
  border-color: var(--ask-color-border);
  color: var(--ask-color-danger-fg);
}
.ask-btn.ghost.danger:hover { background: var(--ask-color-danger-bg); filter: none; }
.ask-btn.sm { height: var(--ask-control-sm); font-size: var(--ask-text-xs); padding: 0 var(--ask-space-3); }
.ask-btn.lg { height: var(--ask-control-lg); font-size: var(--ask-text-base); padding: 0 var(--ask-space-5); }
.ask-btn.full { width: 100%; }
.ask-btn.play {
  inline-size: var(--ask-hit-min);
  padding-inline: 0;
  justify-content: center;
}
.ask-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.ask-btn.loading { position: relative; pointer-events: none; }
.ask-btn .ask-spinner { flex: none; }

.ask-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: var(--ask-radius-full);
  animation: ask-spin 700ms linear infinite;
}
@keyframes ask-spin { to { transform: rotate(360deg); } }

/* --- Surface occupée (ADR-264) : un contenu `inert` se floute — motif
   générique, pas propre à un composant. `inert` bloque déjà le focus et le
   pointeur nativement ; le flou est la seule chose que CSS doit ajouter. */
[inert] {
  filter: blur(3px);
  transition: filter var(--ask-motion-base) var(--ask-ease-out);
}
@media (prefers-reduced-motion: reduce) {
  [inert] { transition: none; }
}
/* Pastille de statut posée par-dessus un contenu occupé (ask-modal,
   ask-editor-dialog) — jamais elle-même `inert` : c'est elle qui annonce. */
.ask-busy-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}
.ask-busy-status > .pill {
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-3);
  padding: var(--ask-space-3) var(--ask-space-5);
  background: var(--ask-color-surface-raised);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-full);
  box-shadow: var(--ask-elev-3);
  font-size: var(--ask-text-sm);
  font-weight: 600;
  color: var(--ask-color-text);
}

/* --- ask-icon-button (§9.2) --- */
.ask-icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--ask-hit-min);
  height: var(--ask-hit-min);
  border: 0;
  border-radius: var(--ask-radius-md);
  background: transparent;
  color: var(--ask-color-text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: background var(--ask-motion-fast) var(--ask-ease-out);
}
.ask-icon-btn:hover { background: var(--ask-color-surface-2); color: var(--ask-color-text); }

/* --- ask-link (§9.3) --- */
.ask-link {
  color: var(--ask-color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ask-link:hover { color: var(--ask-color-accent-hover); }

/* --- ask-input / ask-textarea (§10.1–10.2) --- */
.ask-input,
.ask-textarea,
.ask-select {
  width: 100%;
  min-height: var(--ask-control-md);
  padding: var(--ask-space-2) var(--ask-space-3);
  font: inherit;
  font-size: var(--ask-text-base);
  color: var(--ask-color-text);
  background: var(--ask-color-surface);
  border: var(--ask-border-w) solid var(--ask-color-border-strong);
  border-radius: var(--ask-radius-sm);
  transition: border-color var(--ask-motion-fast) var(--ask-ease-out),
    box-shadow var(--ask-motion-fast) var(--ask-ease-out);
}
.ask-input::placeholder,
.ask-textarea::placeholder { color: var(--ask-color-text-faint); }
.ask-input:focus,
.ask-textarea:focus,
.ask-select:focus {
  outline: none;
  border-color: var(--ask-color-accent);
  box-shadow: 0 0 0 1px var(--ask-color-accent);
}
.ask-input.invalid,
.ask-textarea.invalid {
  border-color: var(--ask-color-warning-solid);
  box-shadow: 0 0 0 1px var(--ask-color-warning-solid);
}
.ask-input:disabled,
.ask-textarea:disabled { opacity: 0.5; cursor: not-allowed; }
.ask-input[readonly] { background: var(--ask-color-surface-2); }
.ask-textarea { resize: vertical; min-height: calc(var(--ask-control-md) * 2); }

/* `type=password` : bouton afficher/masquer (§10.1) — champ + bouton dans
   une enveloppe positionnée, le champ garde son padding-right pour ne
   jamais passer sous le bouton. */
.ask-input-wrap { position: relative; }
.ask-input-wrap .ask-input { padding-right: calc(var(--ask-control-md) + var(--ask-space-1)); }
.ask-input-wrap .toggle {
  position: absolute;
  top: 50%;
  right: var(--ask-space-1);
  transform: translateY(-50%);
}

/* --- ask-textarea-rich (§10.2, ADR-044) : WYSIWYG à sortie markdown —
   barre d'outils (6 actions) + zone d'édition aux styles d'ask-textarea. */
.ask-textarea-rich {
  border: var(--ask-border-w) solid var(--ask-color-border-strong);
  border-radius: var(--ask-radius-sm);
  background: var(--ask-color-surface);
  transition: border-color var(--ask-motion-fast) var(--ask-ease-out),
    box-shadow var(--ask-motion-fast) var(--ask-ease-out);
}
.ask-textarea-rich:focus-within {
  border-color: var(--ask-color-accent);
  box-shadow: 0 0 0 1px var(--ask-color-accent);
}
.ask-textarea-rich > .toolbar {
  display: flex;
  gap: var(--ask-space-1);
  padding: var(--ask-space-1) var(--ask-space-2);
  border-bottom: var(--ask-border-w) solid var(--ask-color-border);
}
.ask-textarea-rich > .toolbar .ask-icon-btn { font-size: var(--ask-text-sm); }
.ask-textarea-rich > .toolbar .ask-icon-btn[aria-pressed="true"] {
  background: var(--ask-color-accent-subtle);
  color: var(--ask-color-accent);
}
.ask-textarea-rich > .content {
  min-height: calc(var(--ask-control-md) * 2);
  max-height: 320px;
  overflow-y: auto;
  padding: var(--ask-space-2) var(--ask-space-3);
  font-size: var(--ask-text-base);
}
.ask-textarea-rich > .content :focus-visible { outline: none; }
.ask-textarea-rich > .content p { margin: 0 0 var(--ask-space-2); }
.ask-textarea-rich > .content p:last-child { margin-bottom: 0; }
.ask-textarea-rich > .content ul,
.ask-textarea-rich > .content ol {
  margin: 0 0 var(--ask-space-2);
  padding-left: var(--ask-space-5);
}
.ask-textarea-rich > .content a { color: var(--ask-color-accent); }

.ask-input-group {
  display: flex;
  align-items: stretch;
}
.ask-input-group .ask-input { border-radius: 0; }
.ask-input-group > :first-child { border-radius: var(--ask-radius-sm) 0 0 var(--ask-radius-sm); }
.ask-input-group > :last-child { border-radius: 0 var(--ask-radius-sm) var(--ask-radius-sm) 0; }
.ask-input-affix {
  display: grid;
  place-items: center;
  padding: 0 var(--ask-space-3);
  background: var(--ask-color-surface-2);
  border: var(--ask-border-w) solid var(--ask-color-border-strong);
  color: var(--ask-color-text-muted);
  font-size: var(--ask-text-sm);
}
.ask-input-group .ask-input + .ask-input-affix { border-left: 0; }
.ask-input-group .ask-input-affix:first-child { border-right: 0; }

/* --- ask-math-input (§10.9, experimental — ADR-288) : saisie d'expression
   mathématique — input + clavier de symboles + aperçu KaTeX débouncé. */
.ask-math-input {
  display: flex;
  flex-direction: column;
  gap: var(--ask-space-2);
}
.ask-math-keys {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ask-space-1);
  margin: 0;
  padding: 0;
  border: 0;
}
.ask-math-keys .ask-icon-btn {
  width: auto;
  min-width: var(--ask-hit-min);
  padding: 0 var(--ask-space-2);
  border: var(--ask-border-w) solid var(--ask-color-border);
}
.ask-math-preview {
  min-height: var(--ask-space-6);
  font-size: var(--ask-text-lg);
  color: var(--ask-color-text);
}

/* --- ask-checkbox / ask-radio, variante carte (§10.4) --- */
.ask-check {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  min-height: var(--ask-hit-min);
  cursor: pointer;
  font-size: var(--ask-text-base);
}
.ask-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--ask-color-accent);
  cursor: pointer;
}

.ask-choice-card {
  display: flex;
  align-items: flex-start;
  gap: var(--ask-space-3);
  width: 100%;
  min-height: 56px;
  padding: var(--ask-space-4);
  /* La carte est aussi un <button> (players QCM) : sans ces trois resets,
     l'agent utilisateur centre les lignes repliées et impose sa police —
     même raison que sur .ask-link-item. */
  font: inherit;
  color: inherit;
  text-align: start;
  background: var(--ask-color-surface);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  cursor: pointer;
  transition: border-color var(--ask-motion-fast) var(--ask-ease-out),
    background var(--ask-motion-fast) var(--ask-ease-out);
}
.ask-choice-card:hover { border-color: var(--ask-color-border-strong); }
.ask-choice-card input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--ask-color-accent);
}
.ask-choice-card.selected,
.ask-choice-card.is-selected,
.ask-choice-card:has(input:checked) {
  border-color: var(--ask-color-accent);
  box-shadow: 0 0 0 1px var(--ask-color-accent);
  background: var(--ask-color-accent-subtle);
}
/* En passation (v3) : 48 px, centrage vertical, contrôle DESSINÉ — les
   glyphes ○/● de police rendaient un faux radio gris et flottant. */
.ask-player.quiz .ask-choice-card {
  align-items: center;
  min-height: 48px;
  padding: var(--ask-space-3) var(--ask-space-4);
}
.ask-choice-card .ctrl {
  width: 20px;
  height: 20px;
  flex: none;
  border: 2px solid var(--ask-color-border-strong);
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-surface);
}
.ask-choice-card .ctrl.sq { border-radius: var(--ask-radius-sm); }
.ask-choice-card.is-selected .ctrl {
  border-color: var(--ask-color-accent);
  background: radial-gradient(
    circle,
    var(--ask-color-accent) 0 42%,
    transparent 46%
  );
}
.ask-choice-card.is-selected .ctrl.sq {
  display: grid;
  place-items: center;
  background: var(--ask-color-accent);
  color: var(--ask-color-text-on-accent);
  font-size: 13px;
  font-weight: 700;
}
/* Chip clavier 1–9 : pointeur fin seulement — sur tactile elle ment. */
/* Le chiffre est peint par le CSS (`data-key`) : décor pur, il n'entre pas
   dans le nom accessible du bouton — sans aria-hidden, que Biome refuse à
   l'intérieur d'un élément focusable. */
.ask-choice-card .key {
  display: none;
  margin-inline-start: auto;
  flex: none;
  font-size: var(--ask-text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--ask-color-text-muted);
  background: var(--ask-color-surface);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-bottom-width: 2px;
  border-radius: var(--ask-radius-sm);
  padding: 1px 7px;
}
/* Texte alternatif vide : sans lui, Chromium concatène le chiffre au nom
   accessible du bouton (« Distracteur 2 ») dès que la chip est visible. */
.ask-choice-card .key::before { content: attr(data-key) / ""; }
@media (hover: hover) and (pointer: fine) {
  .ask-player.quiz .ask-choice-card .key { display: inline-block; }
}
/* Vrai/Faux : deux cartes côte à côte — un cas si court ne justifie pas
   deux rangées pleine largeur. */
.ask-play-vf {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ask-space-3);
}
.ask-play-vf .ask-choice-card {
  justify-content: center;
  text-align: center;
  min-height: 72px;
  font-size: var(--ask-text-lg);
  font-weight: 600;
}
/* Cluster texte : colonne, jamais deux spans inline collés (JSX minifié
   supprime le whitespace — « SystèmeSuit », « FunkyViolet »). */
.ask-choice-card > input + span,
.ask-choice-card > span:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ask-space-1);
  min-width: 0;
  flex: 1;
}
/* Variante compacte (ADR-236) : listes denses de choix — l'écran de forçage
   des modes vocabulaire en voit dix d'un coup. Centrage vertical, padding
   resserré : la carte tient sur deux lignes de texte. */
.ask-choice-card.sm {
  align-items: center;
  min-height: 48px;
  padding: var(--ask-space-2) var(--ask-space-3);
}
.ask-choice-card .title { display: block; font-weight: 500; }
.ask-choice-card .desc { display: block; font-size: var(--ask-text-sm); color: var(--ask-color-text-muted); }
/* title + description s'empilent (API §10.4) — le <br> des maquettes / feedbacks devient no-op */
.ask-choice-card .title + br,
.ask-choice-card .desc + br { display: none; }
/* title/desc rendus par MarkdownText (ADR-288) : neutralise la marge de
   paragraphe par défaut, sinon un espace apparaît entre titre et description. */
.ask-choice-card .title p,
.ask-choice-card .desc p { margin: 0; }
/* Correction (§19.2) : intention par carte, jamais couleur seule */
.ask-choice-card.is-correct {
  border-color: var(--ask-color-success-border);
  background: var(--ask-color-success-bg);
}
.ask-choice-card.is-wrong {
  border-color: var(--ask-color-warning-border);
  background: var(--ask-color-warning-bg);
}
.ask-choice-card.is-almost {
  border-color: var(--ask-color-warning-border);
  background: var(--ask-color-warning-bg);
}

/* --- Vocabulaire multi-modes (ADR-066) --- */
.ask-vocab-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--ask-space-3);
  min-height: 12rem;
  width: 100%;
  padding: var(--ask-space-4);
  border: 1px solid var(--ask-color-border);
  border-radius: var(--ask-radius-lg);
  background: var(--ask-color-surface);
  text-align: center;
}
.ask-vocab-card__flip {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ask-space-3);
  min-height: 8rem;
  margin: 0;
  padding: var(--ask-space-4);
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
}
.ask-vocab-card__flip:hover {
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface-2);
}
.ask-vocab-card__face {
  font-size: var(--ask-text-xl);
  font-weight: 600;
}
.ask-vocab-listen {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ask-space-2);
}
.ask-vocab-listen .ask-btn {
  gap: var(--ask-space-2);
}
.ask-vocab-listen--play .ask-btn:not(.sm) {
  min-height: 56px;
  min-width: 56px;
}
/* Consigne en deux niveaux (ADR-289) : la tâche s'efface, la source saute aux
   yeux. Avant, tout tenait dans une phrase d'un seul poids et ce qu'il fallait
   traduire arrivait en dernier, entre guillemets — l'œil traversait une dizaine
   de mots d'intendance avant d'atteindre le contenu. */
.ask-vocab-consigne {
  display: grid;
  gap: var(--ask-space-1);
  margin: 0;
}
.ask-vocab-task {
  font-size: var(--ask-text-sm);
  font-weight: 400;
  color: var(--ask-color-text-muted);
  margin: 0;
}
/* La langue cible est la seule chose qui change d'une carte à l'autre : c'est
   elle qui porte le relief, pas le verbe. */
.ask-vocab-task b {
  font-weight: 600;
  color: var(--ask-color-text);
}
.ask-vocab-source {
  font-size: var(--ask-text-2xl);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ask-color-text);
  margin: 0;
  /* Une phrase entière se replie plutôt que de déborder (ADR-279). */
  overflow-wrap: break-word;
}
.ask-vocab-prompt {
  font-size: var(--ask-text-lg);
  font-weight: 500;
  margin: 0;
}
/* Saisie lettre par lettre (ADR-276) : standard de toute réponse attendue en
   texte libre du player — lettres à trou du vocabulaire (masque partiel) et
   remplacement des champs texte libre (masque plein) partagent ce rendu.
   `inline-flex` : reste dans le flux d'un texte à trous (`ask-play-cloze`),
   se comporte comme un bloc autonome partout ailleurs (seul enfant de son
   conteneur). */
.ask-letters {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-1);
  font-size: var(--ask-text-xl);
  font-weight: 600;
}
/* Un mot ne se coupe jamais entre deux lignes (ADR-287) : chaque mot est un
   item insécable de la grille — sans ce groupe, chaque lettre en était un et
   le retour à la ligne tombait au milieu d'un mot. Seuls les espaces restent
   des occasions de passer à la ligne. */
.ask-letters__word {
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-1);
}
.ask-letters__char {
  min-width: 1.25rem;
  text-align: center;
}
.ask-letters__space {
  width: var(--ask-space-3);
}
.ask-letter {
  width: 2rem;
  padding: var(--ask-space-1);
  text-align: center;
  font-size: var(--ask-text-lg);
  font-weight: 600;
}
/* Téléphone (base 0–639, ux-ui §5.1) : face / consigne / lettres +1 cran. */
.ask-player .ask-vocab-card__face,
.ask-player .ask-letters {
  font-size: var(--ask-text-2xl);
}
.ask-player .ask-vocab-prompt,
.ask-player .ask-vocab-cloze {
  font-size: var(--ask-text-xl);
}
.ask-player .ask-vocab-source {
  font-size: var(--ask-text-2xl);
}
.ask-player .ask-vocab-task {
  font-size: var(--ask-text-base);
}
.ask-player .ask-letter {
  width: var(--ask-control-md);
  min-height: var(--ask-control-md);
  font-size: var(--ask-text-xl);
}
@media (min-width: 640px) {
  .ask-player .ask-vocab-card__face,
  .ask-player .ask-letters {
    font-size: var(--ask-text-xl);
  }
  .ask-player .ask-vocab-prompt,
  .ask-player .ask-vocab-cloze {
    font-size: var(--ask-text-lg);
  }
  .ask-player .ask-letter {
    width: 2rem;
    min-height: unset;
    font-size: var(--ask-text-lg);
  }
}

/* Feedback + cloze + image (ADR-101) */
.ask-vocab-cloze {
  font-size: var(--ask-text-lg);
  line-height: 1.5;
  margin: 0;
}
.ask-vocab-feedback {
  margin-block-start: var(--ask-space-2);
}
/* Réponse juste en toutes lettres (ADR-266) — score non parfait seulement,
   avant le bouton Écouter : l'œil avant l'oreille. */
.ask-vocab-answer {
  margin: 0;
  font-size: var(--ask-text-base);
}
.ask-vocab-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  overflow: hidden;
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-lg);
  background: var(--ask-color-surface);
}
.ask-vocab-block__title {
  margin: 0;
  padding: var(--ask-space-3) var(--ask-space-4);
  border-block-end: var(--ask-border-w) solid var(--ask-color-border);
  background: var(--ask-color-surface-2);
  font-size: var(--ask-text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ask-color-text-muted);
}
.ask-vocab-block__footer {
  padding: var(--ask-space-3) var(--ask-space-4);
  border-block-start: var(--ask-border-w) solid var(--ask-color-border);
}
.ask-vocab-situations {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: vocab-sit;
  overflow: hidden;
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-lg);
  background: var(--ask-color-surface);
}
.ask-vocab-block .ask-vocab-situations,
.ask-vocab-block .ask-vocab-distractors,
.ask-card .ask-vocab-situations,
.ask-card .ask-vocab-distractors {
  border: 0;
  border-radius: 0;
}
.ask-card .ask-vocab-situations > li {
  padding-inline: 0;
}
.ask-card .ask-vocab-block__footer {
  padding: var(--ask-space-3) 0 0;
}
.ask-vocab-situations > li {
  counter-increment: vocab-sit;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: start;
  column-gap: var(--ask-space-3);
  margin: 0;
  padding: var(--ask-space-3) var(--ask-space-4);
  border-block-end: var(--ask-border-w) solid var(--ask-color-border);
  background: transparent;
  color: var(--ask-color-text);
  font-size: var(--ask-text-base);
  line-height: 1.5;
}
.ask-vocab-situations > li:last-child {
  border-block-end: 0;
}
.ask-vocab-situations > li::before {
  content: counter(vocab-sit, decimal-leading-zero);
  font-size: var(--ask-text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ask-color-accent);
  line-height: 1.5;
}
.ask-vocab-situations > li:has(> .ask-hover-actions) {
  grid-template-columns: 2rem minmax(0, 1fr) auto;
}
.ask-vocab-situations > li > span {
  min-width: 0;
  overflow-wrap: break-word;
}
.ask-vocab-situations > li > .ask-input {
  min-width: 0;
  width: 100%;
}
.ask-vocab-distractors {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-lg);
  background: var(--ask-color-surface);
}
.ask-vocab-distractors > li {
  display: flex;
  align-items: center;
  min-height: var(--ask-control-md);
  margin: 0;
  padding: var(--ask-space-3) var(--ask-space-4);
  border-block-end: var(--ask-border-w) solid var(--ask-color-border);
  background: transparent;
  color: var(--ask-color-text);
  font-size: var(--ask-text-sm);
  line-height: 1.4;
}
.ask-vocab-distractors > li:last-child {
  border-block-end: 0;
}
.ask-vocab-figure {
  margin: 0;
  max-width: 16rem;
}
/* `fill` : l'illustration occupe sa colonne au lieu d'y flotter en vignette —
   elle tient les bords et la hauteur disponible, et recadre plutôt que de
   laisser deux bandes de fond. Réservée à la colonne visuelle d'une scène
   (§19.1) : en compréhension orale, l'image *est* le support du sens, pas une
   décoration posée au-dessus de la consigne. */
.stage-media .ask-vocab-figure.fill {
  max-width: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
}
.stage-media .ask-vocab-figure.fill .ask-vocab-figure__img {
  /* Toute la largeur de la colonne, une proportion tenue, et un plafond en
     `dvh` : l'image grandit avec la place disponible sans jamais repousser le
     bouton hors de l'écran (ADR-214). `cover` plutôt que `contain` — elle tient
     ses bords au lieu de flotter entre deux bandes de fond. */
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  max-height: 46dvh;
  object-fit: cover;
  border-radius: var(--ask-radius-lg);
}
.ask-vocab-figure__img {
  display: block;
  width: 100%;
  border-radius: var(--ask-radius-md);
  border: 1px solid var(--ask-color-border);
}
.ask-vocab-figure__cap {
  margin-block-start: var(--ask-space-1);
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-muted);
}
.ask-vocab-figure__cap a {
  color: inherit;
}
.ask-vocab-card__image {
  max-width: none;
  margin-inline: auto;
}
.ask-vocab-card__image .ask-vocab-figure__img {
  max-height: 10rem;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

/* Fiche lecture Studio (ADR-106) — pas un player */
.ask-vocab-preview {
  display: flex;
  flex-direction: column;
  gap: var(--ask-space-5);
}
.ask-vocab-preview__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-2);
}
.ask-vocab-preview__figure {
  max-width: 20rem;
  margin-inline: auto;
}
.ask-vocab-preview__figure .ask-vocab-figure__img {
  max-height: 12rem;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}
.ask-vocab-preview__faces {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ask-space-3);
}
@media (min-width: 768px) {
  .ask-vocab-preview__faces {
    grid-template-columns: 1fr 1fr;
  }
}
.ask-vocab-preview__extras {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ask-space-4);
  align-items: start;
}
@media (min-width: 768px) {
  .ask-vocab-preview__extras:has(> :nth-child(2)) {
    grid-template-columns: minmax(0, 1.65fr) minmax(11rem, 0.85fr);
  }
}
.ask-vocab-card--read {
  text-align: start;
  min-height: 0;
  gap: var(--ask-space-3);
}
.ask-vocab-card--read .ask-vocab-listen {
  justify-content: flex-start;
}
.ask-vocab-preview__face-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ask-space-2);
}
.ask-vocab-preview__face-head h3 {
  margin: 0;
}
.ask-vocab-card--read .ask-vocab-card__face {
  margin: 0;
}
.ask-vocab-preview__meta {
  display: flex;
  flex-direction: column;
  gap: var(--ask-space-1);
  margin: 0;
  text-align: start;
}
.ask-vocab-preview__meta-row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: var(--ask-space-2);
  font-size: var(--ask-text-sm);
}
.ask-vocab-preview__meta-row dt {
  margin: 0;
  color: var(--ask-color-text-muted);
  font-weight: 500;
}
.ask-vocab-preview__meta-row dd {
  margin: 0;
}
.ask-vocab-mark {
  padding: 0 0.15em;
  border-radius: var(--ask-radius-sm);
  background: var(--ask-color-accent-subtle);
  color: inherit;
  font-weight: 600;
}

/* --- ask-switch (§10.5) --- */
.ask-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-3);
  cursor: pointer;
  min-height: var(--ask-hit-min);
}
.ask-switch input { position: absolute; opacity: 0; }
.ask-switch .track {
  width: 44px;
  height: 26px;
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-border-strong);
  position: relative;
  flex: none;
  transition: background var(--ask-motion-fast) var(--ask-ease-out);
}
.ask-switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-surface);
  box-shadow: var(--ask-elev-1);
  transition: transform var(--ask-motion-fast) var(--ask-ease-out);
}
.ask-switch input:checked + .track { background: var(--ask-color-accent); }
.ask-switch input:checked + .track::after { transform: translateX(18px); }
.ask-switch input:focus-visible + .track {
  outline: 2px solid var(--ask-color-focus);
  outline-offset: 2px;
}

/* --- ask-slider (§10.6) --- */
.ask-slider { accent-color: var(--ask-color-accent); width: 100%; }

/* --- ask-tag-input (§10.7) --- */
.ask-tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ask-space-2);
  padding: var(--ask-space-2);
  min-height: var(--ask-control-md);
  background: var(--ask-color-surface);
  border: var(--ask-border-w) solid var(--ask-color-border-strong);
  border-radius: var(--ask-radius-sm);
}
.ask-tag-input input {
  flex: 1;
  min-width: 120px;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
}
.ask-tag-input input:focus { outline: none; }

/* --- ask-badge (§11.1) --- */
.ask-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-1);
  padding: 2px var(--ask-space-2);
  border-radius: var(--ask-radius-sm);
  font-size: var(--ask-text-xs);
  font-weight: 500;
  background: var(--ask-color-surface-2);
  color: var(--ask-color-text-muted);
  border: var(--ask-border-w) solid var(--ask-color-border);
}
.ask-badge.success { background: var(--ask-color-success-bg); color: var(--ask-color-success-fg); border-color: var(--ask-color-success-border); }
.ask-badge.warning { background: var(--ask-color-warning-bg); color: var(--ask-color-warning-fg); border-color: var(--ask-color-warning-border); }
.ask-badge.danger { background: var(--ask-color-danger-bg); color: var(--ask-color-danger-fg); border-color: var(--ask-color-danger-border); }
.ask-badge.info { background: var(--ask-color-info-bg); color: var(--ask-color-info-fg); border-color: var(--ask-color-info-border); }
.ask-badge.accent { background: var(--ask-color-accent); color: var(--ask-color-text-on-accent); border-color: transparent; }

/* --- ask-chip (§11.2) : interactif, ≠ badge --- */
.ask-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-2);
  height: 32px;
  padding: 0 var(--ask-space-3);
  border-radius: var(--ask-radius-full);
  border: var(--ask-border-w) solid var(--ask-color-border-strong);
  background: var(--ask-color-surface);
  color: var(--ask-color-text);
  font: inherit;
  font-size: var(--ask-text-sm);
  cursor: pointer;
  transition: background var(--ask-motion-fast) var(--ask-ease-out);
}
.ask-chip:hover { background: var(--ask-color-surface-2); }
.ask-chip.pressed,
.ask-chip[aria-pressed="true"] {
  background: var(--ask-color-accent-subtle);
  border-color: var(--ask-color-accent);
  color: var(--ask-color-accent);
}
.ask-chip .x { color: var(--ask-color-text-muted); font-size: var(--ask-text-xs); }

/* --- ask-avatar (§11.3) --- */
.ask-avatar {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-accent-subtle);
  color: var(--ask-color-accent);
  font-size: var(--ask-text-sm);
  font-weight: 600;
  flex: none;
}
.ask-avatar.sm { width: 32px; height: 32px; font-size: var(--ask-text-xs); }
/* `xs` : l'avatar au fil du texte (auteur d'un contenu, d'un commentaire). */
.ask-avatar.xs { width: 22px; height: 22px; font-size: 10px; vertical-align: -5px; }
.ask-avatar-stack { display: inline-flex; }
.ask-avatar-stack .ask-avatar {
  border: 2px solid var(--ask-color-surface);
  margin-left: -8px;
}
.ask-avatar-stack .ask-avatar:first-child { margin-left: 0; }

/* --- ask-tooltip (§11.4) --- */
.ask-tooltip-host { position: relative; display: inline-flex; }
.ask-tooltip {
  position: absolute;
  bottom: calc(100% + var(--ask-space-2));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--ask-z-popover);
  padding: var(--ask-space-1) var(--ask-space-2);
  border-radius: var(--ask-radius-sm);
  background: var(--ask-color-text);
  color: var(--ask-color-bg);
  font-size: var(--ask-text-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ask-motion-fast) var(--ask-ease-out) 500ms;
}
.ask-tooltip-host:hover .ask-tooltip { opacity: 1; }
.ask-tooltip-host:focus-within .ask-tooltip { opacity: 1; transition-delay: 0ms; }

/* --- ask-progress (§11.5) --- */
.ask-progress-bar {
  height: 8px;
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-surface-sunken);
  overflow: hidden;
}
.ask-progress-bar .fill {
  height: 100%;
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-accent);
  transition: width var(--ask-motion-base) var(--ask-ease-out);
}
.ask-progress-bar.success .fill { background: var(--ask-color-success-solid); }

/* Mini-jauge couverture des lignes élève (§11.5 / §23.6 — ADR-143). */
.ask-cover {
  --cover: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 2px;
  width: 2.5rem;
  flex: none;
}
.ask-cover .ask-progress-bar { height: 6px; }
.ask-cover .fill { width: calc(var(--cover) * 1%); }
.ask-cover::after {
  content: attr(data-value);
  font-size: calc(var(--ask-text-xs) - 1px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--ask-color-text-muted);
  text-align: right;
}
.ask-cover.warn .fill { background: var(--ask-color-warning-border); }
.ask-cover.low .fill { background: var(--ask-color-danger-solid); }

/* La valeur de l'anneau est enregistrée (@property) pour pouvoir transiter :
   l'anneau « se remplit » à l'arrivée (≤ --ask-motion-slow, §7 ; statique en
   reduced-motion via les tokens). Navigateur sans @property : rendu direct. */
@property --ring-value {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}
@property --ask-xp-fill {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}
.ask-ring {
  --ring-value: 70;
  /* Couleur paramétrable (ADR-027) : accent par défaut, identité de domaine
     (--ask-dom-N) quand l'anneau vit dans un contexte de domaine. */
  --ring-color: var(--ask-color-accent);
  width: 72px;
  height: 72px;
  border-radius: var(--ask-radius-full);
  background: conic-gradient(
    var(--ring-color) calc(var(--ring-value) * 1%),
    var(--ask-color-surface-sunken) 0
  );
  display: grid;
  place-items: center;
  flex: none;
  transition: --ring-value var(--ask-motion-slow) var(--ask-ease-out);
}
.ask-ring::before {
  content: attr(data-value);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-surface);
  font-size: var(--ask-text-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ask-ring.sm { width: 48px; height: 48px; }
.ask-ring.sm::before { width: 36px; height: 36px; font-size: var(--ask-text-xs); }
.ask-ring.xs { width: 28px; height: 28px; }
.ask-ring.xs::before { width: 20px; height: 20px; font-size: calc(var(--ask-text-xs) - 2px); }
.ask-ring.warn { --ring-color: var(--ask-color-warning-border); }
.ask-ring.low { --ring-color: var(--ask-color-danger-solid); }
.ask-ring.lg { width: 112px; height: 112px; }
.ask-ring.lg::before { width: 88px; height: 88px; font-size: var(--ask-text-lg); }

.ask-dots { display: inline-flex; gap: var(--ask-space-2); }
.ask-dots i {
  width: 8px;
  height: 8px;
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-border-strong);
}
.ask-dots i.done { background: var(--ask-color-accent); }

/* --- ask-key-value (§11.6) --- */
.ask-kv .k {
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-muted);
  margin-bottom: 2px;
}
.ask-kv .v {
  font-size: var(--ask-text-base);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
/* Plusieurs paires côte à côte (carte d'identité d'un contenu, §23.15). */
.ask-kv-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: var(--ask-space-3) var(--ask-space-4);
}

/* --- ask-xp (§11.7) : niveau + points + anneau de palier, 28 px --- */
.ask-xp {
  --ask-xp-fill: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-2);
  height: 28px;
  padding: 0 var(--ask-space-2) 0 2px;
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-surface-2);
  border: var(--ask-border-w) solid var(--ask-color-border);
  vertical-align: middle;
  flex: none;
}
.ask-xp__mark {
  width: 24px;
  height: 24px;
  border-radius: var(--ask-radius-full);
  background: conic-gradient(
    var(--ask-color-accent) calc(var(--ask-xp-fill) * 1%),
    var(--ask-color-border-strong) 0
  );
  display: grid;
  place-items: center;
  flex: none;
  transition: --ask-xp-fill var(--ask-motion-slow) var(--ask-ease-out);
}
.ask-xp__lvl {
  width: 18px;
  height: 18px;
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-accent);
  color: var(--ask-color-text-on-accent);
  font-size: var(--ask-text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  display: grid;
  place-items: center;
}
.ask-xp__pts {
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-1);
  font-size: var(--ask-text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ask-color-text);
  line-height: 1;
}
.ask-xp__pts .ask-ico {
  color: var(--ask-color-accent);
  font-size: 0.85em;
}

/* ==========================================================================
   4. COMPOSITIONS — §12–15
   ========================================================================== */

/* --- ask-card (§12.1) --- */
.ask-card {
  background: var(--ask-color-surface);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  padding: var(--ask-space-5);
  box-shadow: var(--ask-elev-1);
}
.ask-card.interactive {
  cursor: pointer;
  transition: box-shadow var(--ask-motion-fast) var(--ask-ease-out),
    transform var(--ask-motion-fast) var(--ask-ease-out);
}
.ask-card.interactive:hover {
  box-shadow: var(--ask-elev-2);
  transform: translateY(-2px);
}
.ask-card.selected { border-color: var(--ask-color-accent); box-shadow: 0 0 0 1px var(--ask-color-accent); }
.ask-card.warning { border-color: var(--ask-color-warning-border); }
.ask-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ask-space-3);
  margin-bottom: var(--ask-space-3);
}
.ask-card-header h3, .ask-card-header h4 { font-size: var(--ask-text-base); font-weight: 600; }
.ask-card-footer {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  margin-top: var(--ask-space-4);
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-muted);
}

/* --- ask-modal (§12.2) : <dialog> natif, tailles sm/md/lg/xl, feuille montante < lg.
   display:flex seulement à l'ouverture ([open]) pour ne pas neutraliser le
   dialog:not([open]){display:none} de l'agent utilisateur ; l'attribut `open`
   sert aussi aux démos statiques du catalogue (<div class="ask-modal" open>). */
.ask-modal {
  padding: 0;
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-lg);
  max-width: none;
  max-height: min(680px, calc(100vh - 2 * var(--ask-space-6)));
  background: var(--ask-color-surface-raised);
  color: var(--ask-color-text);
  box-shadow: var(--ask-elev-3);
  overflow: hidden;
}
.ask-modal[open] { display: flex; flex-direction: column; }
.ask-modal::backdrop { background: rgba(10, 10, 16, 0.45); }
.ask-modal.sm { width: min(400px, calc(100vw - 2 * var(--ask-space-4))); }
.ask-modal.md { width: min(560px, calc(100vw - 2 * var(--ask-space-4))); }
.ask-modal.lg { width: min(800px, calc(100vw - 2 * var(--ask-space-4))); }

/* --- ask-drawer overlay (§12.3, ADR-087) : panneau latéral modal --- */
.ask-drawer {
  border: 0;
  padding: 0;
  margin: 0;
  max-width: none;
  max-height: none;
  width: min(460px, 100vw);
  height: 100%;
  max-height: 100%;
  position: fixed;
  inset: 0 0 0 auto;
  background: var(--ask-color-surface);
  box-shadow: var(--ask-elev-3, 0 16px 48px rgba(10, 10, 16, 0.18));
  display: none;
  flex-direction: column;
  z-index: var(--ask-z-surface);
}
.ask-drawer[open] { display: flex; }
.ask-drawer::backdrop { background: rgba(10, 10, 16, 0.45); }
.ask-drawer > header {
  display: flex;
  align-items: flex-start;
  gap: var(--ask-space-3);
  padding: var(--ask-space-4) var(--ask-space-5);
  border-bottom: var(--ask-border-w) solid var(--ask-color-border);
  flex: none;
}
.ask-drawer > header .ask-drawer-title {
  flex: 1;
  min-width: 0;
}
.ask-drawer > header h2 {
  margin: 0;
  font-size: var(--ask-text-lg);
  font-weight: 600;
}
.ask-drawer > .body {
  flex: 1;
  overflow: auto;
  padding: var(--ask-space-5);
}
@media (max-width: 1023px) {
  .ask-drawer {
    width: 100vw;
    inset: auto 0 0 0;
    height: min(92vh, 100%);
    border-radius: var(--ask-radius-lg) var(--ask-radius-lg) 0 0;
  }
}

/* --- Suivi classe : ligne élève (ADR-087) --- */
.ask-student-list {
  display: flex;
  flex-direction: column;
}
.ask-student-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-3);
  width: 100%;
  padding: var(--ask-space-3) 0;
  border: 0;
  border-bottom: var(--ask-border-w) solid var(--ask-color-border);
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ask-student-row:hover {
  background: var(--ask-color-surface-2);
}
.ask-student-row:focus-visible {
  outline: 2px solid var(--ask-color-accent);
  outline-offset: 2px;
}
.ask-student-row .who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-2);
  flex: 1;
  min-width: 12rem;
}
.ask-student-row .who .name {
  font-weight: 600;
}
.ask-student-row .who .cls {
  font-weight: 400;
  color: var(--ask-color-text-muted);
}
.ask-student-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ask-space-2);
  margin-left: auto;
}
.pips {
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-3);
  margin-left: auto;
  flex: none;
}
.ask-student-list .ask-student-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.ask-student-list .ask-student-row:first-child {
  padding-top: 0;
}
.ask-metric-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 4.5rem;
  padding: var(--ask-space-1) var(--ask-space-2);
  border-radius: var(--ask-radius-sm);
  background: var(--ask-color-surface-2);
  font-size: var(--ask-text-xs);
  line-height: 1.2;
}
.ask-metric-pill .label {
  color: var(--ask-color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.65rem;
}
.ask-metric-pill .value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ask-metric-pill[data-level="0"] .value { color: var(--ask-color-text-muted); }
.ask-metric-pill[data-level="1"] .value { color: var(--ask-color-warning-fg, #9a6700); }
.ask-metric-pill[data-level="2"] .value { color: var(--ask-color-accent); }
.ask-metric-pill[data-level="3"] .value { color: var(--ask-color-success-fg, #0d7a4f); }

.ask-drawer-section + .ask-drawer-section {
  margin-top: var(--ask-space-6);
  padding-top: var(--ask-space-5);
  border-top: var(--ask-border-w) solid var(--ask-color-border);
}
.ask-drawer-section h3 {
  margin: 0 0 var(--ask-space-3);
  font-size: var(--ask-text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ask-color-text-muted);
}
.ask-drawer-perf {
  display: flex;
  align-items: center;
  gap: var(--ask-space-4);
  flex-wrap: wrap;
}
/* xl (ADR-044) : édition riche — plus large et plus haute que l'aperçu lg. */
.ask-modal.xl {
  width: min(1200px, calc(100vw - 2 * var(--ask-space-4)));
  max-height: calc(100vh - 2 * var(--ask-space-6));
}
/* full (design-system.md §17.5) : quasi plein écran, réservé à l'édition
   d'un canevas (ask-draw) — la place disponible est la fonctionnalité, pas
   un confort ; ADR-190 continue de s'appliquer partout ailleurs. `height`
   (pas seulement max-height) : un <dialog> sans hauteur explicite se réduit
   à son contenu, quel que soit le max-height alloué — sans elle le corps
   n'a jamais d'espace réel à remplir (flex-grow n'a rien où grandir) et le
   canevas hérite d'une hauteur arbitrairement petite. */
.ask-modal.full {
  width: calc(100vw - 2 * var(--ask-space-4));
  height: calc(100vh - 2 * var(--ask-space-4));
  max-height: calc(100vh - 2 * var(--ask-space-4));
}
.ask-modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ask-space-3);
  padding: var(--ask-space-4) var(--ask-space-5);
  border-bottom: var(--ask-border-w) solid var(--ask-color-border);
}
.ask-modal > header h2,
.ask-modal > header h4 {
  margin: 0;
  font-size: var(--ask-text-lg);
  font-weight: 600;
}
.ask-modal > .body {
  /* flex:1 : sans grandir, .body reste à sa taille de contenu même dans un
     dialog rendu plus haut (.full) — le canevas hérite alors d'un espace
     arbitrairement petit. Sans effet sur les tailles qui se contractent au
     contenu (sm/md/lg/xl) : rien à faire grandir dans un dialog déjà
     shrink-wrap. */
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--ask-space-4) var(--ask-space-5);
  overflow-y: auto;
}
/* Gabarit editor en xl (ADR-075) : dès lg le corps ne défile plus — la
   colonne de formulaire seule scrolle, l'aside d'aperçu reste visible.
   Règles sur .ex-editor-split / .app-editor-split (examples.css, globals.css). */
.ask-modal > footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--ask-space-3);
  padding: var(--ask-space-4) var(--ask-space-5);
  border-top: var(--ask-border-w) solid var(--ask-color-border);
}
/* Sous lg : feuille montante pleine largeur ancrée en bas (ux-ui §5, §12.2). */
@media (max-width: 1023px) {
  .ask-modal.sm,
  .ask-modal.md,
  .ask-modal.lg,
  .ask-modal.xl,
  .ask-modal.full {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    margin: auto auto 0;
    border-radius: var(--ask-radius-lg) var(--ask-radius-lg) 0 0;
  }
  /* .full seule impose sa hauteur (feuille montante à 92vh, pas juste un
     plafond) : les autres tailles restent volontairement shrink-wrap. */
  .ask-modal.full {
    height: 92vh;
  }
}
.ask-overlay-demo {
  background: rgba(10, 10, 16, 0.45);
  padding: var(--ask-space-6);
  border-radius: var(--ask-radius-lg);
  display: grid;
  place-items: center;
}

/* --- ask-popover / menu (§12.4) --- */
.ask-menu {
  min-width: 220px;
  padding: var(--ask-space-2);
  background: var(--ask-color-surface-raised);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  box-shadow: var(--ask-elev-2);
  list-style: none;
}
.ask-menu li + li { margin-top: 2px; }
/* Items de menu : boutons ET liens de navigation, aspect identique — jamais
   soulignés (menu = navigation au contexte évident, §9.3). */
.ask-menu button,
.ask-menu a {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  width: 100%;
  padding: var(--ask-space-2) var(--ask-space-3);
  border: 0;
  border-radius: var(--ask-radius-sm);
  background: transparent;
  font: inherit;
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.ask-menu button:hover,
.ask-menu a:hover { background: var(--ask-color-surface-2); }
.ask-menu .sep {
  border-top: var(--ask-border-w) solid var(--ask-color-border);
  margin: var(--ask-space-2) calc(-1 * var(--ask-space-2));
}
.ask-menu button.danger { color: var(--ask-color-danger-fg); }
.ask-menu button.danger:hover { background: var(--ask-color-danger-bg); }
.ask-menu button:disabled {
  color: var(--ask-color-text-faint);
  cursor: not-allowed;
}
.ask-menu button:disabled:hover { background: transparent; }

/* --- ask-swatch (§17 / ADR-154) : picker de couleur, jamais couleur seule --- */
.ask-swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--ask-hit-min), 1fr));
  gap: var(--ask-space-2);
}
.ask-swatch {
  --swatch-color: var(--ask-color-accent);
  appearance: none;
  -webkit-appearance: none;
  width: var(--ask-hit-min);
  height: var(--ask-hit-min);
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--ask-radius-full);
  background: var(--swatch-color);
  cursor: pointer;
}
.ask-swatch:hover { transform: scale(1.06); }
.ask-swatch:checked,
.ask-swatch[aria-checked="true"] {
  border-color: var(--ask-color-text);
  box-shadow: 0 0 0 2px var(--ask-color-surface), 0 0 0 4px var(--swatch-color);
}
@media (prefers-reduced-motion: reduce) {
  .ask-swatch:hover { transform: none; }
}

/* --- ask-toast (§13.1) --- */
.ask-toast {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  max-width: 420px;
  padding: var(--ask-space-3) var(--ask-space-4);
  background: var(--ask-color-surface-raised);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-left: 3px solid var(--ask-color-success-solid);
  border-radius: var(--ask-radius-md);
  box-shadow: var(--ask-elev-2);
  font-size: var(--ask-text-sm);
}
.ask-toast .action {
  margin-left: auto;
  color: var(--ask-color-accent);
  font-weight: 500;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
#ds-toast-region {
  position: fixed;
  bottom: var(--ask-space-5);
  right: var(--ask-space-5);
  z-index: var(--ask-z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--ask-space-2);
}

/* --- ask-banner (§13.2) --- */
.ask-banner {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  padding: var(--ask-space-3) var(--ask-space-4);
  border-radius: var(--ask-radius-md);
  font-size: var(--ask-text-sm);
  border: var(--ask-border-w) solid var(--ask-color-info-border);
  background: var(--ask-color-info-bg);
  color: var(--ask-color-info-fg);
}
.ask-banner.warning {
  border-color: var(--ask-color-warning-border);
  background: var(--ask-color-warning-bg);
  color: var(--ask-color-warning-fg);
}
.ask-banner.danger {
  border-color: var(--ask-color-danger-border);
  background: var(--ask-color-danger-bg);
  color: var(--ask-color-danger-fg);
}
.ask-banner.success {
  border-color: var(--ask-color-success-border);
  background: var(--ask-color-success-bg);
  color: var(--ask-color-success-fg);
}

/* --- ask-empty-state (§13.3) --- */
.ask-empty {
  display: grid;
  justify-items: center;
  gap: var(--ask-space-3);
  padding: var(--ask-space-7) var(--ask-space-5);
  text-align: center;
  border: var(--ask-border-w) dashed var(--ask-color-border-strong);
  border-radius: var(--ask-radius-md);
}
.ask-empty .art { font-size: 36px; }
.ask-empty h2,
.ask-empty h3,
.ask-empty h4 { font-size: var(--ask-text-base); font-weight: 600; margin: 0; }
.ask-empty p { font-size: var(--ask-text-sm); color: var(--ask-color-text-muted); max-width: 40ch; }

/* --- ask-skeleton (§13.4) --- */
.ask-skeleton {
  display: block;
  border-radius: var(--ask-radius-sm);
  background: linear-gradient(
    90deg,
    var(--ask-color-surface-sunken) 25%,
    var(--ask-color-surface-2) 45%,
    var(--ask-color-surface-sunken) 65%
  );
  background-size: 200% 100%;
  animation: ask-shimmer 1.4s linear infinite;
}
@keyframes ask-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .ask-skeleton { animation: none; }
}
.ask-skeleton.text { height: 14px; }
.ask-skeleton.title { height: 22px; width: 60%; }
.ask-skeleton.media { height: 120px; border-radius: var(--ask-radius-md); }
.ask-skeleton.control { height: var(--ask-control-md); width: var(--ask-control-md); border-radius: var(--ask-radius-md); }

/* --- ask-nav-progress (§13.6) --- */
/* Un fil, pas une barre : la durée d'une navigation est inconnue, la course
   ralentit sans jamais atteindre le bout (§11.5 — une barre déterminée
   mentirait). Tout se joue en composition (opacité + transform), le fil ne
   déclenche ni layout ni paint pendant qu'il court. */
.ask-nav-progress {
  --ask-nav-progress-h: 3px;
  --ask-nav-progress-run: 12s;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--ask-nav-progress-h);
  z-index: var(--ask-z-toast);
  pointer-events: none;
  opacity: 0;
  /* Le délai est le seuil de perception (ux-ui §6.2) : une navigation plus
     rapide que ça ne montre rien du tout, pas même un clignotement. */
  animation: ask-nav-progress-in var(--ask-motion-fast) linear var(--ask-motion-base) forwards;
}
.ask-nav-progress::after {
  content: "";
  display: block;
  height: 100%;
  background: var(--ask-color-accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  animation: ask-nav-progress-run var(--ask-nav-progress-run) cubic-bezier(0, 0.6, 0.2, 1) var(--ask-motion-base) forwards;
}
[dir="rtl"] .ask-nav-progress::after { transform-origin: 100% 50%; }
@keyframes ask-nav-progress-in { to { opacity: 1; } }
@keyframes ask-nav-progress-run { to { transform: scaleX(0.92); } }
/* Sans mouvement, c'est la présence du fil qui porte l'information — pas sa
   course. Les tokens de durée tombent à 0 ms, la course s'annule ici. */
@media (prefers-reduced-motion: reduce) {
  .ask-nav-progress { opacity: 1; animation: none; }
  .ask-nav-progress::after { transform: scaleX(1); animation: none; }
}

/* --- ask-search-veil (§13.7) --- */
/* Le voile de recherche — « la Loupe » : l'exception encadrée à l'interdit
   du spinner plein écran (ux-ui §6.2). Une recherche explicite qui dure se
   joue sous un voile flouté : le <dialog> modal rend le fond inerte, une
   loupe de netteté (trou circulaire dans le masque du voile) balaie
   l'écran. Sa position vit dans --ask-veil-x / --ask-veil-y, animée par le
   composant en transform + masque seulement — jamais de layout. */
.ask-search-veil {
  --ask-veil-x: 50%;
  --ask-veil-y: 50%;
  --ask-veil-lens: 132px;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
/* Le voile vit dans un enfant, pas dans ::backdrop : le masque troué doit
   suivre la loupe, et ::backdrop ne se masque pas de façon fiable. */
.ask-search-veil::backdrop { background: transparent; }
.ask-search-veil .veil {
  position: absolute;
  inset: 0;
  /* La même encre que le voile des modales (§12.1). */
  background: rgba(10, 10, 16, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image: radial-gradient(
    circle at var(--ask-veil-x) var(--ask-veil-y),
    transparent 0 calc(var(--ask-veil-lens) / 2 - 6px),
    #000 calc(var(--ask-veil-lens) / 2 - 2px)
  );
  mask-image: radial-gradient(
    circle at var(--ask-veil-x) var(--ask-veil-y),
    transparent 0 calc(var(--ask-veil-lens) / 2 - 6px),
    #000 calc(var(--ask-veil-lens) / 2 - 2px)
  );
  animation: ask-veil-in var(--ask-motion-slow) var(--ask-ease-out);
}
@keyframes ask-veil-in {
  from {
    background: rgba(10, 10, 16, 0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
  }
}
.ask-search-veil .lens {
  position: absolute;
  left: var(--ask-veil-x);
  top: var(--ask-veil-y);
  translate: -50% -50%;
  width: var(--ask-veil-lens);
  height: var(--ask-veil-lens);
  /* Blanc posé sur le voile sombre — lisible sur tous les thèmes, comme
     l'encre du voile lui-même. */
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--ask-radius-full);
  pointer-events: none;
}
.ask-search-veil .lens::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -22px;
  width: 30px;
  height: 8px;
  border-radius: var(--ask-radius-full);
  background: rgba(255, 255, 255, 0.92);
  rotate: 45deg;
}
.ask-search-veil .status {
  position: absolute;
  left: 50%;
  bottom: var(--ask-space-6);
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  max-width: min(92%, 480px);
  padding: var(--ask-space-2) var(--ask-space-2) var(--ask-space-2) var(--ask-space-4);
  background: var(--ask-color-surface-raised);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-full);
  box-shadow: var(--ask-elev-3);
}
.ask-search-veil .status .msg {
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Annonce unique au lecteur d'écran (role="status") — les messages
   rotatifs, eux, sont purement visuels (ux-ui §4.5). */
.ask-search-veil .sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Sous prefers-reduced-motion le composant ne balaie pas (la loupe reste
   au centre) et l'entrée est instantanée (tokens de durée à 0) : la
   présence du voile porte l'information, pas son mouvement. */

/* --- ask-tabs (§14.1) --- */
/* `overflow-x: auto` seul force `overflow-y` à `auto` (une valeur non
   `visible` contamine l'autre axe) : le moindre dépassement vertical
   ouvrait une barre de défilement sur la bande d'onglets. L'axe Y est
   donc fermé explicitement, et l'onglet ne mord plus la bordure du bas
   — le trait court continu, le soulignement accent se pose dessus. */
.ask-tabs { border-bottom: var(--ask-border-w) solid var(--ask-color-border); display: flex; gap: var(--ask-space-2); overflow-x: auto; overflow-y: hidden; }
.ask-tab {
  padding: var(--ask-space-3) var(--ask-space-4);
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--ask-text-sm);
  font-weight: 500;
  color: var(--ask-color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.ask-tab:hover { color: var(--ask-color-text); }
.ask-tab[aria-selected="true"] {
  color: var(--ask-color-accent);
  border-bottom-color: var(--ask-color-accent);
}

/* --- ask-tabnav (§14.1) — navigation par onglets de PAGE ---
   Jumeau VISUEL d'ask-tabs, mais sémantique de NAVIGATION : chaque onglet
   est un lien <a> vers une page sœur (une sous-fonctionnalité qui ouvre sa
   propre interface), pas un panneau masqué du même objet. L'onglet actif se
   marque par aria-current="page" (état d'URL, pas aria-selected). Aucun JS,
   aucun role="tablist". Voir la distinction ask-tabs vs ask-tabnav en §14.1. */
.ask-tabnav { border-bottom: var(--ask-border-w) solid var(--ask-color-border); display: flex; gap: var(--ask-space-2); overflow-x: auto; overflow-y: hidden; }
.ask-tabnav a {
  padding: var(--ask-space-3) var(--ask-space-4);
  font-size: var(--ask-text-sm);
  font-weight: 500;
  color: var(--ask-color-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.ask-tabnav a:hover { color: var(--ask-color-text); }
.ask-tabnav a[aria-current="page"] {
  color: var(--ask-color-accent);
  border-bottom-color: var(--ask-color-accent);
}

/* --- ask-accordion (§14.2) --- */
.ask-accordion {
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface);
}
.ask-accordion + .ask-accordion { margin-top: var(--ask-space-2); }
.ask-accordion summary {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  padding: var(--ask-space-4) var(--ask-space-5);
  font-weight: 600;
  font-size: var(--ask-text-sm);
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.ask-accordion summary::before {
  content: "›";
  transition: transform var(--ask-motion-fast) var(--ask-ease-out);
  color: var(--ask-color-text-muted);
}
.ask-accordion[open] summary::before { transform: rotate(90deg); }
.ask-accordion .content { padding: var(--ask-space-1) var(--ask-space-5) var(--ask-space-5); }
.ask-accordion.attention { border-color: var(--ask-color-warning-border); }
.ask-accordion summary .who {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  flex-wrap: wrap;
}
.ask-accordion summary .meta {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  flex: none;
  margin-left: auto;
}

/* --- ask-regularity (§23.7) — heatmap 4 × 7, jamais la couleur seule --- */
.ask-regularity {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--ask-space-1);
  max-width: 14rem;
}
.ask-regularity .wd {
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-muted);
  text-align: center;
}
.ask-regularity .cell,
.ask-regularity-legend .cell {
  aspect-ratio: 1;
  border-radius: var(--ask-radius-sm);
  background: var(--ask-color-surface-sunken);
}
.ask-regularity .cell[data-level="1"],
.ask-regularity-legend .cell[data-level="1"] {
  background: var(--ask-color-accent-subtle);
}
.ask-regularity .cell[data-level="2"],
.ask-regularity-legend .cell[data-level="2"] {
  background: color-mix(in srgb, var(--ask-color-accent) 45%, var(--ask-color-surface-sunken));
}
.ask-regularity .cell[data-level="3"],
.ask-regularity-legend .cell[data-level="3"] {
  background: var(--ask-color-accent);
}
.ask-regularity .cell[data-future] { opacity: 0.35; }
.ask-regularity.compact {
  max-width: 7rem;
  gap: 2px;
}
.ask-regularity.compact .cell {
  width: 8px;
  height: 8px;
  aspect-ratio: auto;
}
.ask-regularity.week {
  display: inline-grid;
  grid-template-columns: repeat(7, 7px);
  gap: 2px;
  max-width: none;
  align-items: center;
  flex: none;
}
.ask-regularity.week .wd { display: none; }
.ask-regularity.week .cell {
  width: 7px;
  height: 14px;
  aspect-ratio: auto;
  border-radius: 2px;
}
.ask-regularity-legend {
  display: flex;
  align-items: center;
  gap: var(--ask-space-1);
  margin-top: var(--ask-space-2);
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-muted);
}
.ask-regularity-legend .cell {
  width: 10px;
  height: 10px;
  aspect-ratio: auto;
}
@media (max-width: 1023px) {
  .ask-accordion summary .ask-regularity.compact { display: none; }
}

/* --- ask-table / card-list (§14.3) --- */
/* Une table est le contenu large par excellence : ses en-têtes sont en
 * `nowrap`, son min-content dépasse vite l'écran, et une piste de grille non
 * bornée laissait ce min-content étirer la page entière. Elle défile donc
 * dans sa propre boîte tant qu'on est sous `lg` (ADR-279, règle « le contenu
 * large scrolle chez lui ») ; au-delà, elle retrouve sa mise en page de
 * table native. */
.ask-table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  width: 100%;
  border-collapse: collapse;
  font-size: var(--ask-text-sm);
}
@media (min-width: 1024px) {
  .ask-table { display: table; overflow-x: visible; }
}
.ask-table th {
  text-align: left;
  font-weight: 500;
  color: var(--ask-color-text-muted);
  padding: var(--ask-space-3) var(--ask-space-3);
  border-bottom: var(--ask-border-w) solid var(--ask-color-border-strong);
  white-space: nowrap;
}
.ask-table td {
  padding: var(--ask-space-3);
  border-bottom: var(--ask-border-w) solid var(--ask-color-border);
}
.ask-table tbody tr { cursor: pointer; }
.ask-table tbody tr:hover { background: var(--ask-color-surface-2); }
.ask-table tbody tr[aria-selected="true"] { background: var(--ask-color-accent-subtle); }

/* --- ask-stepper (§14.4) --- */
.ask-stepper { display: flex; align-items: center; gap: var(--ask-space-2); }
.ask-stepper .step {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-muted);
}
.ask-stepper .num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--ask-radius-full);
  border: var(--ask-border-w) solid var(--ask-color-border-strong);
  font-size: var(--ask-text-xs);
  font-weight: 600;
  flex: none;
}
.ask-stepper .step.done .num {
  background: var(--ask-color-accent);
  border-color: transparent;
  color: var(--ask-color-text-on-accent);
}
.ask-stepper .step.current { color: var(--ask-color-text); font-weight: 600; }
.ask-stepper .step.current .num { border-color: var(--ask-color-accent); color: var(--ask-color-accent); }
.ask-stepper .line { flex: 1; min-width: 16px; border-top: var(--ask-border-w) solid var(--ask-color-border-strong); }

/* --- ask-search (§14.5) : recherche globale du shell ---
   Desktop : champ centré (max 480) + panneau de résultats ancré dessous ;
   sous lg : loupe seule, l'ouverture passe en overlay plein écran. Résultats
   groupés (Catégories · Questions), surlignage <mark>, option active au
   clavier ↑↓. Le raccourci Cmd/Ctrl+K est affiché en <kbd> dans le champ. */
.ask-search {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}
.ask-search .field {
  position: relative;
  width: 100%;
  max-width: 480px;
  display: none;
}
.ask-search .field input.ask-input {
  width: 100%;
  min-height: var(--ask-control-sm);
  height: var(--ask-control-sm);
  background: var(--ask-color-surface-sunken);
  border-color: transparent;
}
.ask-search .field input.ask-input:focus {
  background: var(--ask-color-surface);
  border-color: var(--ask-color-accent);
}
.ask-search .field .hint {
  position: absolute;
  top: 50%;
  right: var(--ask-space-2);
  translate: 0 -50%;
  padding: 1px var(--ask-space-1);
  font-family: inherit;
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-faint);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-sm);
  background: var(--ask-color-surface);
  pointer-events: none;
}
.ask-search .field .close-btn { display: none; }
.ask-search .open-btn { display: none; }
.ask-search .panel {
  position: absolute;
  top: calc(100% + var(--ask-space-2));
  left: 50%;
  translate: -50% 0;
  z-index: var(--ask-z-popover);
  width: 100%;
  max-width: 560px;
  max-height: min(480px, 70vh);
  overflow-y: auto;
  padding: var(--ask-space-2);
  background: var(--ask-color-surface-raised);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  box-shadow: var(--ask-elev-3);
}
.ask-search .group { display: grid; gap: 2px; }
.ask-search .group + .group { margin-top: var(--ask-space-2); }
.ask-search .group-title {
  margin: 0;
  padding: var(--ask-space-1) var(--ask-space-2);
  font-size: var(--ask-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ask-color-text-faint);
}
.ask-search .opt {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  width: 100%;
  min-height: var(--ask-hit-min);
  padding: var(--ask-space-1) var(--ask-space-2);
  border: 0;
  border-radius: var(--ask-radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ask-search .opt:hover,
.ask-search .opt.active { background: var(--ask-color-surface-2); }
.ask-search .opt .ask-ico { flex: none; color: var(--ask-color-text-muted); }
.ask-search .opt-body { display: grid; gap: 1px; min-width: 0; }
.ask-search .opt-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ask-search .opt-label mark {
  background: var(--ask-color-accent-subtle);
  color: var(--ask-color-accent);
  border-radius: 2px;
  padding: 0 1px;
}
.ask-search .opt-path { font-size: var(--ask-text-xs); color: var(--ask-color-text-muted); }
@media (min-width: 1024px) {
  .ask-search .field { display: block; }
}
/* Sous lg : loupe dans la barre ; ouvert = overlay plein écran (§14.5). */
@media (max-width: 1023px) {
  .ask-search { justify-content: flex-end; }
  .ask-search .open-btn { display: inline-flex; }
  .ask-search.open {
    position: fixed;
    inset: 0;
    z-index: var(--ask-z-overlay);
    display: block;
    padding: var(--ask-space-3);
    background: var(--ask-color-bg);
  }
  .ask-search.open .open-btn { display: none; }
  .ask-search.open .field {
    display: flex;
    align-items: center;
    gap: var(--ask-space-2);
    max-width: none;
  }
  .ask-search.open .field .hint { display: none; }
  .ask-search.open .field .close-btn { display: inline-flex; position: static; }
  .ask-search.open .panel {
    position: static;
    translate: 0 0;
    margin-top: var(--ask-space-3);
    max-width: none;
    max-height: none;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0;
  }
}

/* --- Navigation : shell, breadcrumb, tree (§15) --- */
.ask-tabbar {
  display: flex;
  justify-content: space-around;
  background: var(--ask-color-surface);
  border-top: var(--ask-border-w) solid var(--ask-color-border);
  padding: var(--ask-space-2) 0;
  border-radius: 0 0 var(--ask-radius-lg) var(--ask-radius-lg);
}
.ask-tabbar a {
  display: grid;
  justify-items: center;
  gap: 2px;
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-muted);
  text-decoration: none;
  padding: var(--ask-space-1) var(--ask-space-2);
  position: relative;
  min-width: var(--ask-hit-min);
}
.ask-tabbar a .ico { font-size: 20px; }
.ask-tabbar a[aria-current="page"] { color: var(--ask-color-accent); font-weight: 600; }
.ask-tabbar .dot {
  position: absolute;
  top: 0;
  right: 6px;
  background: var(--ask-color-accent);
  color: var(--ask-color-text-on-accent);
  font-size: 10px;
  font-weight: 600;
  border-radius: var(--ask-radius-full);
  padding: 0 5px;
  line-height: 16px;
}

.ask-sidebar {
  width: 232px;
  background: var(--ask-color-surface);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  padding: var(--ask-space-3);
  font-size: var(--ask-text-sm);
}
.ask-sidebar-sep {
  height: 0;
  margin: var(--ask-space-3) var(--ask-space-2);
  border: 0;
  border-top: var(--ask-border-w) solid var(--ask-color-border);
}
.ask-sidebar a {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  min-height: 42px;
  padding: 0 var(--ask-space-3);
  border-radius: var(--ask-radius-md);
  color: var(--ask-color-text-muted);
  font-size: var(--ask-text-sm);
  font-weight: 500;
  text-decoration: none;
}
.ask-sidebar a.is-secondary { color: var(--ask-color-text-faint); }
.ask-sidebar a .ask-ico { font-size: var(--ask-text-base); }
.ask-sidebar a:hover:not([aria-current="page"]) {
  color: var(--ask-color-text);
  background: var(--ask-color-surface-2);
}
.ask-sidebar a[aria-current="page"] {
  background: var(--ask-color-accent-subtle);
  color: var(--ask-color-accent);
  font-weight: 700;
}

.ask-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-muted);
  list-style: none;
  padding: 0;
}
.ask-breadcrumb li + li::before { content: "/"; margin-right: var(--ask-space-2); color: var(--ask-color-text-faint); }
/* Segment cliquable : navigation au contexte évident — couleur héritée du fil
   (muted), jamais souligné au repos (§9.3). La règle est portée par le
   composant : les call-sites n'ajoutent aucune classe de lien. Le `<button>`
   sert au drill-down sans changement d'URL (Explorer) et doit perdre son
   chrome UA. */
.ask-breadcrumb a,
.ask-breadcrumb button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.ask-breadcrumb a:hover,
.ask-breadcrumb button:hover {
  color: var(--ask-color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ask-breadcrumb [aria-current="page"] { color: var(--ask-color-text); font-weight: 500; }
/* Drill-down Explorer (ADR-077, §15.3) : fil d'Ariane dès lg, « ← parent » en dessous. */
.ask-explorer-nav .ask-parent-back { display: inline-flex; }
@media (max-width: 1023px) {
  .ask-explorer-nav .ask-breadcrumb { display: none; }
}
@media (min-width: 1024px) {
  .ask-explorer-nav .ask-parent-back { display: none; }
}

.ask-tree { list-style: none; padding: 0; font-size: var(--ask-text-sm); }
.ask-tree ul { list-style: none; padding-left: var(--ask-space-4); }
.ask-tree .node {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  width: 100%;
  min-height: var(--ask-hit-min);
  padding: 0 var(--ask-space-2);
  border: 0;
  border-radius: var(--ask-radius-sm);
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.ask-tree .node:hover { background: var(--ask-color-surface-2); }
.ask-tree .node.selected { background: var(--ask-color-accent-subtle); color: var(--ask-color-accent); font-weight: 500; }
.ask-tree .chev {
  color: var(--ask-color-text-faint);
  width: 12px;
  flex: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  transition: transform 120ms ease;
}
.ask-tree .chev:disabled { visibility: hidden; }
/* Chevron d'expansion fin (glyphe d'angle ›), toujours à droite du nœud
   (§15.4, ADR-025) : le label pousse compteurs et chevron en fin de ligne ;
   `open` pivote le glyphe vers le bas quand la branche est dépliée. */
.ask-tree .node .label { flex: 1; }
.ask-tree .chev.open { display: inline-block; transform: rotate(90deg); }
.ask-tree .count { margin-left: auto; }
/* Sélection multiple (§15.4) : la case tri-état occupe la ligne (le libellé
   pousse compteurs, badges et chevron en fin) sans imposer la hauteur de
   cible de la variante autonome. */
.ask-tree .node .ask-check {
  flex: 1;
  min-width: 0;
  min-height: auto;
}
/* Marqueur d'identité de domaine (§15.4, ADR-027) : pastille carrée teintée
   --ask-dom-N sur les nœuds racines — l'appartenance, jamais une mesure. */
.ask-tree .dom-mark {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--dom-color, var(--ask-color-accent));
  flex: none;
}
/* Aperçu d'une catégorie (§15.4, ADR-026) : affordance dédiée (œil) avant le
   chevron — le corps du nœud reste réservé au geste principal (ADR-025). */
.ask-tree .peek { color: var(--ask-color-text-muted); }
.ask-tree .peek:hover { color: var(--ask-color-accent); }
/* Glisser-déposer d'un nœud (§15.4 renvoie à §18 : reorder + transfer
   combinés — dépose avant/après un frère ou dans un nœud pour re-parenter). */
.ask-tree .node .handle {
  color: var(--ask-color-text-faint);
  cursor: grab;
  font-size: 14px;
  letter-spacing: -1px;
  user-select: none;
  flex: none;
}
.ask-tree .node.dragging { opacity: 0.5; }
.ask-tree .node.drop-into {
  outline: 2px solid var(--ask-color-accent);
  outline-offset: -2px;
  background: var(--ask-color-accent-subtle);
}
.ask-tree li.drop-before > .node { box-shadow: inset 0 2px 0 var(--ask-color-accent); }
.ask-tree li.drop-after > .node { box-shadow: inset 0 -2px 0 var(--ask-color-accent); }

/* ==========================================================================
   5. FORMULAIRE — §16–17
   ========================================================================== */

.ask-field { display: grid; gap: var(--ask-space-1); }
.ask-field > label {
  font-size: var(--ask-text-sm);
  font-weight: 500;
}
.ask-field .optional { color: var(--ask-color-text-faint); font-weight: 400; }
.ask-field .help {
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-muted);
}
.ask-field .error {
  display: flex;
  align-items: center;
  gap: var(--ask-space-1);
  font-size: var(--ask-text-sm);
  color: var(--ask-color-warning-fg);
}
.ask-field .counter {
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-faint);
  justify-self: end;
}
fieldset.ask-field {
  border: 0;
  padding: 0;
  margin: 0;
}
fieldset.ask-field legend {
  font-size: var(--ask-text-sm);
  font-weight: 500;
  padding: 0;
  margin-bottom: var(--ask-space-1);
}

.ask-save-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-1);
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-muted);
}
.ask-save-indicator.saved { color: var(--ask-color-success-fg); }
.ask-save-indicator.error { color: var(--ask-color-warning-fg); }

/* --- ask-media-uploader (§17.1) --- */
.ask-dropzone {
  display: grid;
  justify-items: center;
  gap: var(--ask-space-2);
  padding: var(--ask-space-6);
  background: var(--ask-color-surface-sunken);
  border: 2px dashed var(--ask-color-border-strong);
  border-radius: var(--ask-radius-md);
  text-align: center;
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-muted);
  cursor: pointer;
  transition: border-color var(--ask-motion-fast) var(--ask-ease-out),
    background var(--ask-motion-fast) var(--ask-ease-out);
}
.ask-dropzone.over,
.ask-dropzone:hover {
  border-color: var(--ask-color-accent);
  background: var(--ask-color-accent-subtle);
}
.ask-media-item {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  padding: var(--ask-space-2) var(--ask-space-3);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface);
  font-size: var(--ask-text-sm);
}
.ask-media-item .thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--ask-radius-sm);
  background: var(--ask-color-surface-2);
  display: grid;
  place-items: center;
  flex: none;
}
.ask-dropzone.image {
  min-height: 10rem;
  font-size: var(--ask-text-base);
}
.ask-dropzone.image .ask-ico {
  width: 2em;
  height: 2em;
}
.ask-media-figure {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface-sunken);
  border: var(--ask-border-w) solid var(--ask-color-border);
}
.ask-media-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ask-media-figure .ask-icon-btn {
  position: absolute;
  top: var(--ask-space-2);
  right: var(--ask-space-2);
  background: var(--ask-color-surface);
}
/* Dessin ask-draw attaché à un slot (studio.editor.media, ADR-292) : aperçu
   grand format plutôt que la vignette 40px de .ask-media-item — le SVG a
   son propre ratio 800×600 et un fond blanc opaque, jamais recadré
   (`object-fit: contain`, pas `cover`). Toute la figure est cliquable pour
   rouvrir l'éditeur (éditer = remplacer, ADR-292). */
.ask-media-figure.draw {
  aspect-ratio: 4 / 3;
  background: #ffffff;
}
.ask-media-figure.draw img { object-fit: contain; }
.ask-media-figure__click {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* --- ask-media-tabs (§17.1, ADR-291) : source du média par onglets
   (téléverser / lien / dessin) — réutilise .ask-tabs (§14.1). */
.ask-media-tabs > .ask-tabs { margin-bottom: var(--ask-space-2); }

/* --- ask-draw (§17.4, experimental — ADR-292) : éditeur de dessin
   math. Barre d'outils / canevas / bandeau propriétés. Le SVG exporté est
   autoportant (couleurs hex) ; ces styles n'habillent que l'éditeur.
   Le corps de la modale ne défile plus (même gabarit que .app-editor-split,
   ADR-075) : la barre d'outils et le bandeau propriétés restent fixes, seul
   le canevas défile quand le dessin dépasse la hauteur disponible. */
.ask-modal > .body:has(> .ask-draw) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ask-draw {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr auto;
  gap: var(--ask-space-3);
  flex: 1 1 auto;
  min-height: 0;
}
/* Grille fixe à 2 colonnes (jamais une seule colonne de 15 icônes à
   parcourir) : chaque groupe — sélection / tracé / gabarits / historique —
   commence sa propre rangée, séparé par un trait plein qui court sur les
   deux colonnes (`.ask-draw-toolbar__sep`), pas un simple espace. Icônes
   réduites à 32px : sous le --ask-hit-min (44px) global, mais au-dessus du
   plancher WCAG 2.5.8 AA (24px) — panneau d'outils dense d'un éditeur, pas
   une navigation principale. */
.ask-draw-toolbar {
  grid-row: 1 / 3;
  display: grid;
  grid-template-columns: repeat(2, 32px);
  grid-auto-rows: 32px;
  gap: var(--ask-space-1);
  align-self: start;
  align-items: center;
  justify-items: center;
}
.ask-draw-toolbar .ask-icon-btn,
.ask-draw-toolbar .app-popover {
  width: 32px;
  height: 32px;
}
.ask-draw-toolbar .ask-icon-btn {
  border: var(--ask-border-w) solid var(--ask-color-border);
  font-size: var(--ask-text-sm);
}
.ask-draw-toolbar .ask-icon-btn[aria-pressed="true"] {
  background: var(--ask-color-accent-subtle);
  color: var(--ask-color-accent);
  border-color: var(--ask-color-accent);
}
.ask-draw-toolbar .ask-draw-menu-trigger {
  font-size: 11px;
}
.ask-draw-toolbar__sep {
  grid-column: 1 / -1;
  height: var(--ask-border-w);
  margin: var(--ask-space-1) 0;
  background: var(--ask-color-border);
}
/* Ratio 4/3 par requête de conteneur, pas par aspect-ratio posé sur l'item
   de grille : un item de grille non étiré (justify/align-self:center) avec
   seulement max-width/max-height:100% ne remplit pas sa cellule — sans
   dimension explicite pour amorcer aspect-ratio, il retombe sur la taille
   de remplacement par défaut du CSS (300×150), un timbre-poste au milieu
   d'une modale « quasi plein écran ». `.ask-draw-canvas-cell` (item de
   grille réel, `container-type:size`) fournit à `.ask-draw-canvas` une
   base de calcul (cqw/cqh) : chaque dimension prend le minimum entre 100 %
   et l'autre dimension convertie au ratio 4/3 — la plus grande boîte 4/3
   qui tient dans la cellule, centrée par `place-items`. Le SVG remplit
   ensuite `.ask-draw-canvas` à 100%×100% sans aucun rognage interne. Le
   dessin entier reste toujours visible, jamais de défilement propre au
   canevas ; `toCanvas()` (canvas.tsx) et la position du champ de saisie
   texte (--draw-x/--draw-y) restent une simple règle de trois sur la boîte
   `.ask-draw-canvas`. */
.ask-draw-canvas-cell {
  container-type: size;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
}
.ask-draw-canvas {
  position: relative;
  width: min(100%, calc(100cqh * 4 / 3));
  height: min(100%, calc(100cqw * 3 / 4));
  border: var(--ask-border-w) solid var(--ask-color-border-strong);
  border-radius: var(--ask-radius-md);
  overflow: hidden;
  background: #ffffff;
}
.ask-draw-canvas svg {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.ask-draw-handle { cursor: grab; }
.ask-draw-textinput {
  position: absolute;
  /* Position portée par la donnée (géométrie du canevas) — --draw-x/--draw-y. */
  left: var(--draw-x);
  top: var(--draw-y);
  max-width: 40%;
  font-size: var(--ask-text-sm);
}
.ask-draw-props {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-3);
}
.ask-draw-colors {
  display: flex;
  gap: var(--ask-space-1);
  margin: 0;
  padding: 0;
  border: 0;
}
.ask-draw-swatch {
  width: 24px;
  height: 24px;
  border-radius: var(--ask-radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  /* Couleur portée par la donnée (palette du dessin) — pas un token UI. */
  background: var(--draw-swatch);
}
.ask-draw-swatch[aria-pressed="true"] {
  border-color: var(--ask-color-accent);
  outline: 2px solid var(--ask-color-surface);
  outline-offset: -4px;
}
.ask-draw-props__sep {
  width: var(--ask-border-w);
  align-self: stretch;
  background: var(--ask-color-border);
}
.ask-draw-gridsize {
  width: auto;
  min-height: var(--ask-control-sm);
  margin-left: var(--ask-space-2);
}
/* Menus Formes 2D / Solides 3D (design-system.md §17.5) : liste de texte groupée à gauche,
   un seul aperçu à droite qui suit le survol/focus — motif « police/icône »
   (un choix à la fois, jamais une grille de vignettes à balayer). Même
   générateur que l'insertion (dogfooding, preview.tsx). */
.ask-draw-menu-trigger {
  font-size: var(--ask-text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ask-draw-toolbar .app-popover-panel {
  padding: 0;
  overflow: hidden;
  /* Le déclencheur vit tout à gauche (barre d'outils fixe) : sans plafond,
     le panneau (liste 200px + aperçu 160px) déborde le bord droit d'un
     écran étroit — ux-ui.md §5 interdit tout débordement à 360px.
     `container-type` ici, pas sur `.ask-draw-menu` : un élément ne peut pas
     être requêté par sa propre condition de conteneur (self-query invalide,
     silencieusement ignorée) — le conteneur doit être un ancêtre. */
  max-width: calc(100vw - 2 * var(--ask-space-4));
  container-type: inline-size;
}
.ask-draw-menu {
  display: flex;
  align-items: stretch;
}
/* Sous 360px de panneau, liste + aperçu (200+160px) ne tiennent plus côte à
   côte : empilés, chacun garde sa pleine largeur plutôt que de se
   comprimer illisiblement (container query sur le panneau lui-même — le
   panneau, pas le viewport, décide : ux-ui.md §5). */
@container (max-width: 359px) {
  .ask-draw-menu {
    flex-direction: column;
  }
  .ask-draw-menu__list {
    width: 100%;
    max-height: 240px;
    border-right: 0;
    border-bottom: var(--ask-border-w) solid var(--ask-color-border);
  }
  .ask-draw-menu__preview {
    width: 100%;
  }
}
.ask-draw-menu__list {
  width: 200px;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: var(--ask-space-2);
  border-right: var(--ask-border-w) solid var(--ask-color-border);
}
.ask-draw-menu__group + .ask-draw-menu__group {
  margin-top: var(--ask-space-3);
}
.ask-draw-menu__group-title {
  margin: 0 0 var(--ask-space-1);
  padding: 0 var(--ask-space-2);
  font-size: var(--ask-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ask-color-text-muted);
}
.ask-draw-menu__item {
  display: block;
  width: 100%;
  padding: var(--ask-space-2) var(--ask-space-2);
  border: 0;
  border-radius: var(--ask-radius-sm);
  background: none;
  color: var(--ask-color-text);
  font-size: var(--ask-text-sm);
  text-align: left;
  cursor: pointer;
}
.ask-draw-menu .ask-draw-menu__item:hover,
.ask-draw-menu .ask-draw-menu__item:focus-visible,
.ask-draw-menu__item[aria-current="true"] {
  background: var(--ask-color-accent-subtle);
  color: var(--ask-color-accent);
}
.ask-draw-menu__preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ask-space-2);
  width: 160px;
  padding: var(--ask-space-4);
}
.ask-draw-menu__preview svg { stroke: var(--ask-color-text); }
.ask-draw-menu__preview-label {
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-muted);
  text-align: center;
}

/* --- ask-category-picker (§17.2, ADR-021 : ouverture en modale) --- */
.ask-category-picker { display: inline-flex; align-items: center; gap: var(--ask-space-2); }
.ask-category-picker > .trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ask-space-2);
  min-width: 220px;
  cursor: pointer;
}
.ask-category-picker.secondary { flex-wrap: wrap; }
.ask-category-picker.secondary > .trigger { min-width: 0; }
.ask-category-picker .path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-category-picker .path strong { color: var(--ask-color-text); font-weight: 600; }
.ask-category-picker .ask-chip button.x {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

/* Modale du sélecteur : réutilise le shell générique .ask-modal (§12.2), taille
   md. Seuls le corps (arbre / résultats) et le voile propres au picker restent
   ici. Le corps est en flex-column pour empiler recherche + liste scrollable. */
.ask-category-picker-modal > .body {
  display: flex;
  flex-direction: column;
  gap: var(--ask-space-3);
  overflow: hidden;
}
.ask-category-picker-modal > .body input.ask-input { width: 100%; }
.ask-category-picker-modal > .body .ask-tree { overflow-y: auto; min-height: 0; }
.ask-category-picker-modal > .body .ask-tree .node.all { font-weight: 500; }

/* Mode recherche : liste de résultats à plat, classés, surlignés (command-palette). */
.ask-result-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; }
.ask-result-list .result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-height: var(--ask-hit-min);
  padding: var(--ask-space-2) var(--ask-space-3);
  border: 0;
  border-radius: var(--ask-radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ask-result-list .result.active { background: var(--ask-color-surface-2); }
.ask-result-list .result.selected .label { color: var(--ask-color-accent); font-weight: 500; }
.ask-result-list .result .label mark {
  background: var(--ask-color-accent-subtle);
  color: var(--ask-color-accent);
  border-radius: 2px;
  padding: 0 1px;
}
.ask-result-list .result .path-prefix { font-size: var(--ask-text-xs); color: var(--ask-color-text-muted); }
.ask-result-list .result .meta {
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-muted);
}

/* Sélecteur de contenu (§17.4, ADR-130) : recherche + facettes + résultats. */
.ask-content-picker {
  display: flex;
  flex-direction: column;
  gap: var(--ask-space-3);
  min-height: 0;
}
.ask-content-picker > .ask-input { width: 100%; }
.ask-content-picker .facets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-2);
}
.ask-content-picker .ask-result-list { max-height: 320px; }
.ask-empty-inline { padding: var(--ask-space-5); color: var(--ask-color-text-muted); text-align: center; }

/* Panneau du sélecteur (§17.2) : une seule source depuis ADR-068 §3 — le
   référentiel du domaine ; même pile que le corps (recherche + liste). */
.ask-category-picker-modal .source-panel {
  display: flex;
  flex-direction: column;
  gap: var(--ask-space-3);
  overflow: hidden;
  min-height: 0;
}

/* ==========================================================================
   6. DRAG & DROP — états visuels (§18)
   ========================================================================== */

.ask-dnd-item {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  min-height: var(--ask-hit-min);
  padding: var(--ask-space-2) var(--ask-space-3);
  background: var(--ask-color-surface);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  font-size: var(--ask-text-sm);
}
.ask-dnd-item .handle {
  color: var(--ask-color-text-faint);
  cursor: grab;
  font-size: 14px;
  letter-spacing: -1px;
  user-select: none;
}
.ask-dnd-item.dragging {
  box-shadow: var(--ask-elev-2);
  transform: scale(1.02) rotate(0.5deg);
  border-color: var(--ask-color-accent);
}
.ask-dnd-item .updown { margin-left: auto; display: flex; gap: var(--ask-space-1); }
.ask-dnd-item .updown button {
  width: 32px;
  height: 32px;
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-sm);
  background: var(--ask-color-surface);
  cursor: pointer;
  color: var(--ask-color-text-muted);
}
.ask-dnd-placeholder {
  min-height: var(--ask-hit-min);
  border: 2px dashed var(--ask-color-accent);
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-accent-subtle);
}
.ask-dropzone-target {
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  padding: var(--ask-space-3);
  background: var(--ask-color-surface-2);
}
.ask-dropzone-target.valid {
  border-color: var(--ask-color-accent);
  box-shadow: 0 0 0 1px var(--ask-color-accent);
  background: var(--ask-color-accent-subtle);
}
.ask-dropzone-target.invalid { opacity: 0.45; }

.ask-dnd-enabled { cursor: grab; }
.ask-dnd-enabled:active, .ask-dnd-source { cursor: grabbing; }
.ask-dnd-source { opacity: 0.4; }
.ask-dnd-dim { opacity: 0.38; }
.ask-dnd-over-into {
  outline: 2px solid var(--ask-color-accent);
  outline-offset: 2px;
  background: var(--ask-color-accent-subtle);
}
.ask-dnd-insert-before,
.ask-dnd-insert-end { position: relative; }
.ask-dnd-insert-before::before,
.ask-dnd-insert-end::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--ask-color-accent);
  z-index: 2;
}
.ask-dnd-insert-before::before { left: -6px; }
.ask-dnd-insert-end::after { right: -6px; }
.ask-dnd-overlay {
  box-shadow: var(--ask-elev-2);
  transform: scale(1.02);
  cursor: grabbing;
  pointer-events: none;
  width: min(280px, 80vw);
}
.ask-breadcrumb .ask-dnd-over-into {
  background: var(--ask-color-accent-subtle);
  border-radius: var(--ask-radius-sm);
  outline: 2px solid var(--ask-color-accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .ask-dnd-overlay { transform: none; }
  .ask-dnd-item.dragging { transform: none; }
}

/* ==========================================================================
   7. COMPOSANTS MÉTIER — §19–23
   ========================================================================== */

/* --- ask-player (§19.1) --- */
.ask-player {
  background: var(--ask-color-surface);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-lg);
  box-shadow: var(--ask-elev-1);
  overflow: hidden;
}
.ask-player .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ask-space-3) var(--ask-space-4);
}
/* Barre v3 : ✕ · jauge · compteur — une rangée, un seul motif de progression
   (les dots quittent la passation ; ils restent au composant §11.5). */
.ask-player .bar .gauge {
  flex: 1;
  height: 8px;
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-surface-sunken);
  overflow: hidden;
}
.ask-player .bar .gauge > i {
  display: block;
  height: 100%;
  width: calc(var(--gauge, 0) * 1%);
  border-radius: inherit;
  background: var(--ask-color-accent);
  transition: width var(--ask-motion-slow) var(--ask-ease-out);
}
.ask-player .bar .count {
  font-size: var(--ask-text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--ask-color-text-muted);
}
.ask-player .body { padding: var(--ask-space-4) var(--ask-space-5) var(--ask-space-5); display: grid; gap: var(--ask-space-5); }
.ask-player .statement {
  font-size: var(--ask-text-lg);
  font-weight: 600;
  max-width: var(--ask-measure);
}
.ask-player .hint { font-size: var(--ask-text-sm); color: var(--ask-color-text-muted); }
.ask-player .validate {
  padding: var(--ask-space-3) var(--ask-space-5) var(--ask-space-5);
  position: sticky;
  bottom: 0;
  /* Collée au pouce : fond opaque (le contenu ne défile plus en
     transparence derrière) et respect de la safe area iOS — le bouton ne
     passe jamais sous la barre home (ux-ui §5.3). */
  background: var(--ask-color-surface);
  padding-bottom: calc(var(--ask-space-5) + env(safe-area-inset-bottom, 0px));
}

/* --- variante quiz « scène » (§19.8, ADR-058) : le parcours de slides
   occupe la page — colonne pleine hauteur, slide centrée et animée (motion
   tokens : neutralisée par prefers-reduced-motion), énoncés agrandis. --- */
.ask-player.quiz {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--ask-space-8));
}
.ask-player.quiz .bar {
  gap: var(--ask-space-4);
  padding: var(--ask-space-2) var(--ask-space-3);
  min-height: 44px;
}
.ask-player.quiz .body {
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  align-content: center;
  padding: var(--ask-space-7) var(--ask-space-6);
  gap: var(--ask-space-6);
  animation: ask-slide-in var(--ask-motion-slow) var(--ask-ease-out) both;
}
.ask-player.quiz .statement { font-size: var(--ask-text-xl); }
/* Titre de slide (intro / clôture, §19.8) : un TITRE, donc un heading.
   Sans `:is(h1, h2)`, la règle fuyait sur les `.title` des cartes de choix —
   toutes les propositions d'un QCM héritaient du 2xl gras du titre d'intro. */
.ask-player.quiz :is(h1, h2).title {
  margin: 0;
  font-size: var(--ask-text-2xl);
  font-weight: 700;
  line-height: 1.15;
  max-width: var(--ask-measure);
}
.ask-player.quiz .halo {
  display: grid;
  place-items: center;
  width: var(--ask-space-8);
  height: var(--ask-space-8);
  margin-inline: auto;
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-accent-subtle);
  color: var(--ask-color-accent);
  font-size: var(--ask-text-xl);
}
.ask-player.quiz .validate {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ask-space-3) var(--ask-space-4);
  border-top: var(--ask-border-w) solid var(--ask-color-border);
  background: var(--ask-color-surface);
  padding: var(--ask-space-3) var(--ask-space-5);
}
/* Une bannière d'erreur prend sa propre ligne au-dessus du bouton. */
.ask-player.quiz .validate .ask-banner { flex: 1 1 100%; }
.ask-player.quiz .validate .ask-btn.primary {
  width: 100%;
}
@media (min-width: 768px) {
  .ask-player.quiz .validate .ask-btn.primary {
    width: auto;
    min-width: 220px;
    margin-inline-start: auto;
  }
}
.ask-player.quiz .keyhint { display: none; }
@media (min-width: 768px) {
  .ask-player.quiz .keyhint {
    display: block;
    margin: 0;
    flex: 1;
    text-align: left;
  }
}
/* --- Scène de passation (§19.1, ADR-214) : le player tient dans l'écran.
   `fit` découpe la hauteur que lui donne le gabarit focus en trois rangées —
   barre, scène, action. La page ne défile jamais ; si la scène déborde (six
   propositions longues sur un écran court), c'est `.stage-main` qui défile,
   barre de progression et Valider restent en place.

   Deux colonnes dès `md` quand la question porte une image, une vidéo, un
   embed ou un PDF : la lecture à gauche, le visuel à droite, dimensionné par
   la hauteur disponible (`object-fit: contain`) et non plus par un 16/9 qui
   fabriquait du vide. Sous `md`, une colonne et le visuel au-dessus, plafonné
   pour que les propositions restent visibles sans défiler.

   Le son ne part pas à droite : un lecteur audio *est* la question (dictée,
   compréhension orale), il reste dans la colonne de lecture — c'est ce que
   sépare `splitStageMedia` (src/lib/play-media.ts). --- */
.stage-media,
.stage-main {
  display: grid;
  gap: var(--ask-space-5);
  min-width: 0;
  align-content: start;
}
.stage-media { align-content: center; }

.ask-player.quiz.fit {
  /* Le gabarit focus (`app-focus-body`) pose un `space-4` autour. */
  height: calc(100dvh - 2 * var(--ask-space-4));
  min-height: 0;
}
/* Échelle propre à la passation, partagée fit/flow : plancher lisible,
   plafond abaissé à 1.375rem (v3) — l'énoncé n'est pas un titre. */
.ask-player.quiz.fit,
.ask-player.quiz.flow {
  --ask-play-stem: clamp(1.0625rem, 1rem + 0.35vw + 0.25vh, 1.375rem);
  --ask-play-option: clamp(0.9375rem, 0.85rem + 0.25vw + 0.2vh, 1.125rem);
}
/* ── flow (v3, amende ADR-214) : le défilement redevient celui du NAVIGATEUR.
   La garantie d'ADR-214 demeure — progression et action toujours visibles —
   le mécanisme devient sticky. Le player cesse d'être une carte : bord,
   rayon et ombre tomberaient de toute façon (`overflow: hidden` tuerait les
   sticky). `fit` reste à l'épreuve et au live (ADR-217). ── */
.ask-player.quiz.flow {
  min-height: calc(100dvh - 2 * var(--ask-space-4));
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  background: transparent;
}
.ask-player.quiz.flow .bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ask-color-bg);
}
.ask-player.quiz.flow .validate {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: var(--ask-color-bg);
}
.ask-player.quiz.flow .body {
  flex: 1 1 auto;
  max-width: 720px;
  padding: var(--ask-space-5) var(--ask-space-6);
  gap: var(--ask-space-5);
}
.ask-player.quiz.flow .statement { font-size: var(--ask-play-stem); }
.ask-player.quiz.flow .ask-choice-card { font-size: var(--ask-play-option); }
.ask-player.quiz.flow .ask-link-item { font-size: var(--ask-play-option); }
.ask-player.quiz.fit .body {
  flex: 1 1 auto;
  min-height: 0;
  max-width: 900px;
  padding: var(--ask-space-5) var(--ask-space-6);
  gap: var(--ask-space-5);
}
.ask-player.quiz.fit .stage-main {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  /* La barre de défilement ne colle pas au texte quand elle apparaît. */
  scrollbar-gutter: stable;
}
.ask-player.quiz.fit .statement { font-size: var(--ask-play-stem); }
.ask-player.quiz.fit .ask-choice-card { font-size: var(--ask-play-option); }
.ask-player.quiz.fit .ask-link-item { font-size: var(--ask-play-option); }
.stage-media .ask-stem-media img,
.stage-media .ask-stem-media video,
.stage-media .ask-vocab-figure__img {
  /* Le visuel s'ajuste à sa propre largeur : un portrait dans une colonne
     large n'étale plus deux bandes de fond de part et d'autre. La hauteur
     commande, la largeur suit. */
  aspect-ratio: auto;
  width: auto;
  max-width: 100%;
  max-height: 32dvh;
  margin-inline: auto;
  object-fit: contain;
}
/* L'image d'une carte de vocabulaire n'est plus bornée à 16rem quand elle
   tient la colonne visuelle : c'est la colonne qui la borne (ADR-214). */
.stage-media .ask-vocab-figure {
  max-width: 100%;
  justify-self: center;
}
/* Deux colonnes dès `lg` (1024) et pas dès `md` : à 768 de large, la colonne
   de lecture retombait à 380 px — une largeur de téléphone dont l'image aurait
   pris la moitié. Tablette portrait et téléphone empilent donc, tablette
   paysage et desktop séparent (ADR-214). */
/* `ask-play-scene` porte la même scène hors du chrome `ask-player` : la
   question projetée d'un live (§19.13) et celle d'un participant s'alignent
   sur la passation plutôt que d'inventer leur mise en page (ADR-217). */
.ask-play-scene {
  display: grid;
  gap: var(--ask-space-5);
  min-height: 0;
}
@media (min-width: 1024px) {
  :is(.ask-player.quiz.fit .body, .ask-player.quiz.flow .body, .ask-play-scene):has(.stage-media) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 40%);
    align-items: center;
    max-width: 1180px;
    gap: var(--ask-space-6);
  }
  :is(.ask-player.quiz.fit .body, .ask-player.quiz.flow .body, .ask-play-scene):has(.stage-media)
    .stage-main {
    grid-column: 1;
    grid-row: 1;
  }
  :is(.ask-player.quiz.fit .body, .ask-player.quiz.flow .body, .ask-play-scene):has(.stage-media)
    .stage-media {
    grid-column: 2;
    grid-row: 1;
    max-height: 100%;
  }
  .stage-media .ask-stem-media,
  .stage-media .ask-stem-media .embed,
  .stage-media .ask-stem-media .pdf {
    max-height: 100%;
    min-height: 0;
  }
  .stage-media .ask-stem-media img,
  .stage-media .ask-stem-media video,
  .stage-media .ask-vocab-figure__img {
    max-height: 100%;
  }
}

@keyframes ask-slide-in {
  from {
    opacity: 0;
    transform: translateY(var(--ask-space-3));
  }
}
.ask-slide-in {
  animation: ask-slide-in var(--ask-motion-slow) var(--ask-ease-out) both;
}

/* --- ask-stem-media / ask-feedback-slide (ADR-132) --- */
.ask-stem-media-stack {
  display: grid;
  gap: var(--ask-space-4);
}
.ask-stem-media {
  display: grid;
  gap: var(--ask-space-1);
  margin: 0;
  min-width: 0;
}
.ask-stem-media img,
.ask-stem-media video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface-2);
}
.ask-stem-media .embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--ask-radius-md);
  overflow: hidden;
  background: var(--ask-color-surface-2);
}
.ask-stem-media .embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.ask-stem-media audio { width: 100%; }
.ask-stem-media .pdf {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface-2);
}
.ask-stem-media figcaption { font-size: var(--ask-text-sm); }

.ask-feedback-slide {
  display: grid;
  gap: var(--ask-space-5);
}
.ask-feedback-slide .verdict {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  font-size: var(--ask-text-xl);
  font-weight: 700;
  outline: none;
  animation: ask-feedback-verdict var(--ask-motion-base) var(--ask-ease-out) both;
}
.ask-feedback-slide.is-partial .verdict { color: var(--ask-color-warning-fg); }
.ask-feedback-slide:not(.is-partial) .verdict { color: var(--ask-color-success-fg); }
/* Emoji du verdict (ADR-260) : seul pictogramme d'interface toléré, réservé à
   ce seul indicateur — décoratif, le libellé texte porte le nom accessible. */
.verdict-emoji {
  font-size: calc(var(--ask-text-2xl) * 2);
  line-height: 1;
}
.ask-feedback-slide .msg {
  font-size: var(--ask-text-base);
  max-width: var(--ask-measure);
}
@keyframes ask-feedback-verdict {
  from { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ask-player.quiz .body,
  .ask-feedback-slide .verdict {
    animation: none;
  }
}

/* --- ask-play-short-answer / cloze / numeric / hotspot (§19.9–19.12) --- */
.ask-play-short-answer .ask-input:not(.ask-letter) {
  min-height: var(--ask-control-lg);
  font-size: var(--ask-text-lg);
}
.ask-play-cloze {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--ask-space-2);
  line-height: 1.7;
  font-size: var(--ask-text-lg);
}
.ask-play-cloze .ask-input:not(.ask-letter),
.ask-play-cloze .ask-select {
  width: auto;
  min-width: 8ch;
  display: inline-block;
}
.ask-play-cloze .gap.is-correct .ask-input,
.ask-play-cloze .gap.is-correct .ask-select {
  border-color: var(--ask-color-success-fg);
}
.ask-play-cloze .gap.is-wrong .ask-input,
.ask-play-cloze .gap.is-wrong .ask-select {
  border-color: var(--ask-color-warning-solid);
}
.ask-play-cloze .gap-hint {
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-muted);
}
.ask-play-numeric .ask-input-group { max-width: 16rem; }
.ask-hotspot {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  background: var(--ask-color-surface-2);
  border-radius: var(--ask-radius-md);
  overflow: hidden;
  cursor: crosshair;
}
.ask-hotspot img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.ask-hotspot-stage {
  position: absolute;
  pointer-events: none;
  left: var(--hs-left);
  top: var(--hs-top);
  width: var(--hs-w);
  height: var(--hs-h);
}
.ask-hotspot-stage > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ask-hotspot-region,
.ask-hotspot-draft {
  fill: color-mix(in srgb, var(--ask-color-accent) 18%, transparent);
  stroke: var(--ask-color-accent);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.ask-hotspot-region.is-correct {
  fill: color-mix(in srgb, var(--ask-color-success-fg) 18%, transparent);
  stroke: var(--ask-color-success-fg);
}
.ask-hotspot-region.is-selected {
  stroke-width: 3;
}
.ask-hotspot-draft {
  fill: color-mix(in srgb, var(--ask-color-accent) 10%, transparent);
  stroke-dasharray: 5 4;
}
.ask-hotspot-pin {
  position: absolute;
  left: var(--hs-x);
  top: var(--hs-y);
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--ask-color-accent);
  box-shadow: 0 0 0 2px var(--ask-color-surface);
  pointer-events: none;
}
.ask-hotspot-pin.is-wrong {
  background: var(--ask-color-warning-solid);
}
.ask-hotspot-vertex {
  position: absolute;
  left: var(--hs-x);
  top: var(--hs-y);
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  pointer-events: auto;
}
.ask-hotspot-vertex::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--ask-color-surface);
  box-shadow: 0 0 0 2px var(--ask-color-accent);
}
.ask-hotspot-vertex.is-first::after {
  box-shadow: 0 0 0 2px var(--ask-color-success-fg);
}
.ask-hotspot-editor .ask-hotspot {
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}
.ask-hotspot-editor .ask-hotspot-region { pointer-events: none; }

/* --- diff vocabulaire (§19.3) --- */
.ask-diff { font-family: var(--ask-font-mono); font-size: var(--ask-text-sm); }
.ask-diff .ok { color: var(--ask-color-success-fg); }
.ask-diff .miss {
  color: var(--ask-color-warning-fg);
  background: var(--ask-color-warning-bg);
  border-radius: 2px;
  text-decoration: underline;
}

/* --- linking (§19.6) --- */
/* Le plateau : les éléments à relier à gauche, leurs correspondances à droite,
   et entre les deux la gouttière où passent les traits. Le SVG se superpose au
   plateau entier — positionné, donc hors grille, il ne prend pas de colonne —
   et travaille dans le repère du plateau : le composant mesure les items et
   trace, aucune coordonnée n'est écrite ici. */
.ask-link-board {
  position: relative;
  display: grid;
  /* `minmax(0, …)` : les colonnes peuvent passer sous la largeur de leur mot
     le plus long — sinon le plateau déborde son conteneur sur un écran
     étroit, et une passation ne fait jamais défiler la page (ux-ui §10.1).
     Le mot ne se coupe alors qu'en dernier recours (`break-word`). */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--ask-space-5);
  align-items: start;
}
@media (min-width: 768px) {
  .ask-link-board { gap: var(--ask-space-7); }
}
.ask-link-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  /* Le trait se regarde, il ne se clique pas : les cibles sont les items. */
  pointer-events: none;
}
.ask-link-wires .wire {
  fill: none;
  stroke: var(--ask-pair, var(--ask-color-border-strong));
  stroke-width: 2;
  stroke-linecap: round;
}
.ask-link-wires .port { fill: var(--ask-pair, var(--ask-color-border-strong)); }

.ask-link-col { display: grid; gap: var(--ask-space-2); align-content: start; }
.ask-link-item {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  width: 100%;
  min-height: var(--ask-hit-min);
  padding: var(--ask-space-2) var(--ask-space-3);
  border: var(--ask-border-w) solid var(--ask-color-border-strong);
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface);
  font-family: inherit;
  font-size: var(--ask-text-sm);
  color: inherit;
  text-align: start;
  cursor: pointer;
  transition: border-color var(--ask-motion-fast) var(--ask-ease-out),
    background var(--ask-motion-fast) var(--ask-ease-out);
}
button.ask-link-item:hover { border-color: var(--ask-color-accent); }
/* En correction le plateau n'est plus cliquable (des <div>) : le curseur
   ne promet pas un geste qui n'existe plus. */
div.ask-link-item { cursor: default; }
/* `break-word` et non `anywhere` : la largeur minimale de la colonne reste
   celle du mot le plus long — sinon la grille se laisse écraser et coupe
   « Éner/gie » au milieu sur un téléphone. */
.ask-link-item .label { min-width: 0; overflow-wrap: break-word; }
.ask-link-item .tag {
  margin-inline-start: auto;
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-muted);
}
.ask-link-item .pair {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--ask-radius-full);
  background: var(--ask-pair, var(--ask-color-border-strong));
  font-size: var(--ask-text-xs);
  font-weight: 700;
  color: #fff;
  flex: none;
}
/* Six couleurs de liaison (palette viz) : au-delà elles se répètent, le numéro
   non — la couleur accélère la lecture, elle ne la porte jamais seule (P5). */
.ask-link-item.p1, .ask-link-wires .p1 { --ask-pair: var(--ask-viz-2); }
.ask-link-item.p2, .ask-link-wires .p2 { --ask-pair: var(--ask-viz-4); }
.ask-link-item.p3, .ask-link-wires .p3 { --ask-pair: var(--ask-viz-3); }
.ask-link-item.p4, .ask-link-wires .p4 { --ask-pair: var(--ask-viz-6); }
.ask-link-item.p5, .ask-link-wires .p5 { --ask-pair: var(--ask-viz-5); }
.ask-link-item.p6, .ask-link-wires .p6 { --ask-pair: var(--ask-viz-1); }
.ask-link-item.p1, .ask-link-item.p2, .ask-link-item.p3,
.ask-link-item.p4, .ask-link-item.p5, .ask-link-item.p6 {
  border-color: var(--ask-pair);
}
.ask-link-item.grabbed {
  border-color: var(--ask-color-accent);
  box-shadow: 0 0 0 1px var(--ask-color-accent);
  background: var(--ask-color-accent-subtle);
}
.ask-link-item.dim { opacity: 0.45; }
/* Correction (§19.2) : intention par élément, jamais la couleur seule — le
   pastillon porte ✓ / ✗, et la correspondance manquée arrive en pointillés. */
.ask-link-item.is-correct {
  border-color: var(--ask-color-success-border);
  background: var(--ask-color-success-bg);
}
.ask-link-item.is-correct .pair { background: var(--ask-color-success-solid); }
.ask-link-item.is-wrong {
  border-color: var(--ask-color-warning-border);
  background: var(--ask-color-warning-bg);
}
.ask-link-item.is-wrong .pair { background: var(--ask-color-warning-solid); }
.ask-link-wires .is-correct { --ask-pair: var(--ask-color-success-solid); }
.ask-link-wires .is-wrong { --ask-pair: var(--ask-color-warning-solid); }
.ask-link-wires .is-expected { --ask-pair: var(--ask-color-text-faint); }
.ask-link-wires .is-expected .wire { stroke-dasharray: 4 6; }

/* --- ask-feedback (Studio / live — passation = ask-feedback-slide, ADR-132) --- */
.ask-feedback {
  border-radius: var(--ask-radius-md);
  border: var(--ask-border-w) solid var(--ask-color-success-border);
  background: var(--ask-color-success-bg);
  padding: var(--ask-space-4);
  display: grid;
  gap: var(--ask-space-3);
}
.ask-feedback.partial {
  border-color: var(--ask-color-warning-border);
  background: var(--ask-color-warning-bg);
}
.ask-feedback .verdict {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  font-weight: 600;
}
.ask-feedback.partial .verdict { color: var(--ask-color-warning-fg); }
.ask-feedback:not(.partial) .verdict { color: var(--ask-color-success-fg); }
.ask-feedback .msg { font-size: var(--ask-text-sm); }

/* --- ask-today + ask-today-item (§23.2, ADR-133, ADR-244) --- */
/* Bandeau plein accent : la promesse est le seul moment « affiche » de l'app. */
.ask-today {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: var(--ask-space-5);
  padding: var(--ask-space-6);
  border-radius: var(--ask-radius-lg);
  background:
    radial-gradient(130% 220% at 100% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(135deg, var(--ask-color-accent), var(--ask-color-accent-active));
  border: var(--ask-border-w) solid var(--ask-color-accent-active);
  color: var(--ask-color-text-on-accent);
  flex-wrap: wrap;
}
.ask-today .txt { flex: 1; display: grid; gap: var(--ask-space-2); min-width: 12rem; }
.ask-today .count {
  font-size: clamp(2rem, 1.1rem + 3.3vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-wrap: balance;
}
.ask-today .est {
  color: var(--ask-color-text-on-accent);
  opacity: 0.85;
  font-size: var(--ask-text-base);
  font-weight: 500;
}
.ask-today .ask-today-play {
  background: var(--ask-color-surface);
  color: var(--ask-color-accent);
}
.ask-today .ask-today-play:hover { background: var(--ask-color-surface-2); }
.ask-today .ask-today-play:active { background: var(--ask-color-surface-sunken); }
.ask-today .ask-today-play:focus-visible { outline-color: var(--ask-color-text-on-accent); }
.ask-today-play {
  width: 64px;
  min-height: 64px;
  padding: 0;
  justify-content: center;
  border-radius: var(--ask-radius-full);
}
.ask-today-play .ask-ico { font-size: var(--ask-text-2xl); }
@media (prefers-reduced-motion: no-preference) {
  .ask-today .ask-today-play { animation: ask-today-pulse 2.6s ease-out infinite; }
}
@keyframes ask-today-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); }
  70%, 100% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); }
}

.ask-today-section { display: grid; gap: var(--ask-space-4); }
.ask-today-section > header {
  display: flex;
  align-items: baseline;
  gap: var(--ask-space-2) var(--ask-space-3);
  flex-wrap: wrap;
}
.ask-today-section > header h2 {
  margin: 0;
  font-size: var(--ask-text-xl);
  font-weight: 700;
}
.ask-today-section > header .hint {
  color: var(--ask-color-text-muted);
  font-size: var(--ask-text-sm);
}
.ask-today-section > header .ask-btn { margin-left: auto; }

.ask-today-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--ask-space-4);
}

.ask-card.ask-today-item {
  display: flex;
  flex-direction: column;
  gap: var(--ask-space-3);
  box-shadow: var(--ask-elev-1);
  text-decoration: none;
  color: inherit;
}
.ask-today-kind {
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-1);
  font-size: var(--ask-text-xs);
  font-weight: 600;
  color: var(--ask-color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ask-today-kind .ask-ico { font-size: var(--ask-text-sm); }
.ask-today-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ask-space-2);
}
.ask-today-item-title {
  margin: 0;
  font-size: var(--ask-text-base);
  font-weight: 650;
  line-height: 1.25;
}
.ask-today-item-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ask-space-3);
}
.ask-today-item-foot .perf {
  color: var(--ask-color-text-muted);
  font-size: var(--ask-text-sm);
}
.ask-today-item-foot .actions {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  margin-left: auto;
}

.ask-labeled-bar { display: grid; gap: var(--ask-space-1); }
.ask-labeled-bar .line {
  display: flex;
  justify-content: space-between;
  gap: var(--ask-space-3);
  font-size: var(--ask-text-sm);
}
.ask-labeled-bar .line .name {
  color: var(--ask-color-text-muted);
  font-weight: 400;
}
.ask-labeled-bar .line .meta {
  font-variant-numeric: tabular-nums;
  color: var(--ask-color-text-muted);
}

/* --- ask-stats + ask-move (§23.14, ADR-138) --- */
.ask-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: var(--ask-space-4);
}
.ask-stat {
  display: grid;
  align-content: start;
  gap: var(--ask-space-1);
  padding: var(--ask-space-4) var(--ask-space-5);
  background: var(--ask-color-surface);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
}
.ask-stat .value {
  font-size: var(--ask-text-2xl);
  font-weight: 700;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.ask-stat .label { color: var(--ask-color-text-muted); font-size: var(--ask-text-sm); }
.ask-stat .trend {
  font-size: var(--ask-text-xs);
  color: var(--ask-color-accent);
  font-weight: 600;
}
.ask-stat .trend.warn { color: var(--ask-color-warning-border); }

.ask-move {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  min-height: 40px;
}
.ask-move .delta {
  min-width: 52px;
  text-align: right;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ask-color-accent);
}
.ask-move.down .delta { color: var(--ask-color-warning-border); }
.ask-move .who { flex: 1; min-width: 0; font-size: var(--ask-text-sm); }
.ask-move .who .cls { color: var(--ask-color-text-faint); }

/* --- ask-chart (§23.3) : barres simples de démonstration --- */
.ask-bars { display: grid; gap: var(--ask-space-3); font-size: var(--ask-text-sm); }
.ask-bars .row {
  display: grid;
  grid-template-columns: minmax(200px, 3fr) 2fr 48px;
  align-items: center;
  gap: var(--ask-space-4);
  min-height: 28px;
  line-height: 1.35;
}
@media (max-width: 479px) {
  .ask-bars { gap: var(--ask-space-4); }
  .ask-bars .row {
    grid-template-columns: 1fr 48px;
    row-gap: var(--ask-space-1);
  }
  .ask-bars .row > span:first-child { grid-column: 1 / -1; }
}
.ask-bars .track { height: 8px; background: var(--ask-color-surface-sunken); border-radius: var(--ask-radius-full); overflow: hidden; }
.ask-bars .val { height: 100%; border-radius: var(--ask-radius-full); background: var(--ask-viz-1); }
.ask-bars .num { font-variant-numeric: tabular-nums; color: var(--ask-color-text-muted); text-align: right; }

/* --- Paliers (ADR-272) — l'intention se dit **une fois**, dans le titre du
   groupe, avec son compte. Le badge par rangée qu'ADR-237 §2 posait sous 60 %
   vivait dans le fil du texte : il coupait la phrase et rendait les rangées
   inégales (60/60/60/28/28/28/28 px mesurés). Le texte porte toujours
   l'intention — la teinte de barre ne fait que le seconder. --- */
.ask-bars > .grp { display: grid; gap: var(--ask-space-2); }
.ask-bars > .grp + .grp { margin-top: var(--ask-space-5); }
.ask-bars > .grp > header {
  display: flex;
  align-items: baseline;
  gap: var(--ask-space-2);
  padding-bottom: var(--ask-space-1);
  border-bottom: var(--ask-border-w) solid var(--ask-color-border);
}
.ask-bars > .grp > header h4 {
  margin: 0;
  font-size: var(--ask-text-sm);
  font-weight: 650;
}
.ask-bars > .grp > header .n {
  color: var(--ask-color-text-muted);
  font-variant-numeric: tabular-nums;
}
.ask-bars > .grp > header .hint {
  margin-left: auto;
  color: var(--ask-color-text-faint);
  font-size: var(--ask-text-xs);
}
/* Le palier fragile teinte ses barres — jamais seul porteur du sens : son
   titre le dit, et chaque rangée garde son pourcentage. */
.ask-bars > .grp.is-weak .val { background: var(--ask-viz-3); }
/* Deux lignes au plus : au-delà, la rangée reprenait trois hauteurs et la
   colonne de mesure perdait son alignement. Le libellé entier reste au
   survol (`title`) et dans « Voir les données ». */
.ask-bars .lbl {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Palier sans mesure (« Jamais vues », ADR-237 §2 : aucun score inventé). */
.ask-bars > .grp .plain {
  display: grid;
  gap: var(--ask-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ask-color-text-muted);
}

/* --- Pied du tri d'import (§21.4, ADR-274) : naviguer et juger sont deux
   gestes, pas quatre boutons en file. Le groupe de jugement reste soudé et
   passe à la ligne d'un bloc sous 480 px, au lieu d'éparpiller Refuser,
   Modifier et Accepter sur deux rangées. --- */
.ask-sort-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-2);
}
.ask-sort-actions > .judge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-2);
  margin-left: auto;
}
@media (max-width: 479px) {
  .ask-sort-actions > .judge {
    margin-left: 0;
    width: 100%;
  }
  .ask-sort-actions > .judge > .ask-btn.primary { margin-left: auto; }
}

/* --- ask-chart (§23.3) : colonnes temporelles, tooltip clavier, bascule table.
   Chaque colonne est un <button> focusable : le tooltip (::after, data-tip)
   s'affiche au survol ET au focus — « tooltips accessibles au clavier, focus
   séquentiel des points ». La hauteur vient de --v (0..100, donnée). --- */
.ask-chart { display: grid; gap: var(--ask-space-2); }
.ask-chart .plot {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: 2px;
  height: 120px;
}
.ask-chart .col {
  --v: 0;
  position: relative;
  display: flex;
  align-items: flex-end;
  align-self: stretch;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: default;
}
.ask-chart .col::before {
  content: "";
  width: 100%;
  height: max(calc(var(--v) * 1%), 3px);
  border-radius: 2px 2px 0 0;
  background: var(--ask-color-surface-sunken);
  transition: background var(--ask-motion-fast) var(--ask-ease-out);
}
/* Jour actif : couleur de donnée — palette viz exclusivement (§23.3). */
.ask-chart .col.active::before { background: var(--ask-viz-1); }
.ask-chart .col::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + var(--ask-space-1));
  left: 50%;
  translate: -50% 0;
  z-index: var(--ask-z-popover);
  display: none;
  padding: var(--ask-space-1) var(--ask-space-2);
  white-space: nowrap;
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text);
  background: var(--ask-color-surface-raised);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-sm);
  box-shadow: var(--ask-elev-2);
}
.ask-chart .col:hover::after,
.ask-chart .col:focus-visible::after { display: block; }
/* Les colonnes de bord ancrent leur tooltip au bord pour ne pas déborder. */
.ask-chart .col:first-child::after { left: 0; translate: 0 0; }
.ask-chart .col:last-child::after { left: auto; right: 0; translate: 0 0; }
.ask-chart .axis {
  display: flex;
  justify-content: space-between;
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-muted);
}
/* Bascule « Voir les données » (obligatoire §23.3) : disclosure native. */
.ask-chart-data > summary { list-style: none; display: inline-flex; cursor: pointer; }
.ask-chart-data > summary::-webkit-details-marker { display: none; }
.ask-chart-data[open] > summary { margin-bottom: var(--ask-space-3); }

/* --- ask-domain-card (§23.10, ADR-026/027, ADR-077) ---
   Territoire d'un domaine / d'une catégorie. Mode `enter` : descente dans
   le navigateur Explorer (pas de aria-pressed). Mode historique : bouton
   aria-pressed pour une sélection d'entraînement. */
.ask-domain-card {
  --dom-color: var(--ask-color-accent);
  --dom-subtle: var(--ask-color-accent-subtle);
  display: grid;
  gap: var(--ask-space-3);
  align-content: space-between;
  width: 100%;
  padding: var(--ask-space-4);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-lg);
  background: linear-gradient(135deg, var(--dom-subtle), transparent 55%),
    var(--ask-color-surface);
  box-shadow: var(--ask-elev-1);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow var(--ask-motion-fast) var(--ask-ease-out),
    transform var(--ask-motion-base) var(--ask-ease-spring);
}
.ask-domain-card:hover { box-shadow: var(--ask-elev-2); transform: translateY(-2px); }
.ask-domain-card:active { transform: translateY(0) scale(0.99); }
.ask-domain-card[aria-pressed="true"],
.ask-domain-card.selected {
  border-color: var(--dom-color);
  box-shadow: 0 0 0 1px var(--dom-color);
}
.ask-domain-card .top {
  display: flex;
  align-items: flex-start;
  gap: var(--ask-space-3);
}
.ask-domain-card .code {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 var(--ask-space-2);
  border-radius: var(--ask-radius-md);
  background: var(--dom-color);
  color: var(--ask-color-text-on-accent);
  font-size: var(--ask-text-sm);
  font-weight: 800;
  letter-spacing: 0.03em;
  flex: none;
}
.ask-domain-card .name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  line-height: 1.3;
}
.ask-domain-card .top .ask-badge { flex: none; }
.ask-domain-card .bottom {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
}
.ask-domain-card .bottom .ask-ring { --ring-color: var(--dom-color); }
.ask-domain-card .meta {
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-muted);
}
.ask-domain-card.sm {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: var(--ask-space-3);
  gap: var(--ask-space-3);
}
.ask-domain-card.sm .top {
  flex: 1;
  min-width: 0;
  align-items: center;
}
.ask-domain-card.sm .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ask-domain-card.sm .bottom { flex: none; margin-inline-start: auto; }
.ask-domain-card.sm .code {
  min-width: 36px;
  height: 36px;
  font-size: var(--ask-text-xs);
}
.ask-icon-btn[aria-pressed="true"] .ask-ico.star,
.ask-icon-btn[aria-pressed="true"] .ask-ico.ring {
  color: var(--ask-color-accent);
}

/* --- ask-quest (§23.11, ADR-026/028) ---
   Défi personnel auto-généré (concept §11) : un but concret atteignable
   aujourd'hui, progression x/y, teinté au domaine concerné. Privé, jamais
   comparatif ; formulé en gain (P6). Le rail les fait défiler au pouce. */
.ask-quest-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 340px);
  gap: var(--ask-space-4);
  overflow-x: auto;
  padding-bottom: var(--ask-space-2);
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.ask-quest {
  --dom-color: var(--ask-color-accent);
  --dom-subtle: var(--ask-color-accent-subtle);
  scroll-snap-align: start;
  display: grid;
  gap: var(--ask-space-3);
  align-content: start;
  padding: var(--ask-space-4);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-lg);
  background: linear-gradient(135deg, var(--dom-subtle), transparent 60%),
    var(--ask-color-surface);
  box-shadow: var(--ask-elev-1);
}
.ask-quest .tag {
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-1);
  font-size: var(--ask-text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dom-color);
}
.ask-quest .goal { font-weight: 600; line-height: 1.35; }
.ask-quest .state {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
}
.ask-quest .state .ask-progress-bar { flex: 1; }
.ask-quest .ask-progress-bar .fill { background: var(--dom-color); }
.ask-quest .state .num {
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ask-quest footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ask-space-3);
}
.ask-quest footer .why {
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-faint);
}

/* --- ask-launchbar (§23.12, ADR-026) ---
   Barre de lancement flottante d'Explorer : récapitulatif de sélection +
   l'unique bouton primary de l'écran, toujours sous le pouce. Le décalage
   au-dessus de la tabbar mobile relève de la glue de gabarit (§24). */
.ask-launchbar {
  position: sticky;
  bottom: var(--ask-space-4);
  z-index: var(--ask-z-sticky);
  display: flex;
  align-items: center;
  gap: var(--ask-space-4);
  padding: var(--ask-space-3) var(--ask-space-4);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-lg);
  background: color-mix(in srgb, var(--ask-color-surface-raised) 94%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--ask-elev-3);
}
.ask-launchbar .summary { flex: 1; min-width: 0; }
.ask-launchbar .summary .line1 {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ask-launchbar .summary .line2 {
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ask-launchbar > .ask-btn { flex: none; }

/* ==========================================================================
   8. STYLES DE LA PAGE DE DÉMONSTRATION (préfixe .ds-)
   Ces styles servent la vitrine elle-même, pas le design system.
   ========================================================================== */

.ds-header {
  position: sticky;
  top: 0;
  z-index: var(--ask-z-nav);
  display: flex;
  align-items: center;
  gap: var(--ask-space-4);
  padding: var(--ask-space-3) var(--ask-space-5);
  background: color-mix(in srgb, var(--ask-color-surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: var(--ask-border-w) solid var(--ask-color-border);
}
.ds-header h1 { font-size: var(--ask-text-lg); font-weight: 700; }
.ds-header .version { color: var(--ask-color-text-faint); font-size: var(--ask-text-sm); font-weight: 400; }
.ds-header .spacer { flex: 1; }
/* Légende du skin courant : dit en une ligne ce que le sélecteur vient de
   changer. Masquée sous 1024px — l'en-tête tient alors sur une seule ligne. */
.ds-header .ds-skin-note {
  display: none;
  max-width: 36ch;
  text-align: right;
  font-size: var(--ask-text-xs);
  line-height: 1.35;
  color: var(--ask-color-text-faint);
}
@media (min-width: 1024px) {
  .ds-header .ds-skin-note { display: block; }
}

.ds-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ask-space-6);
  max-width: 1240px;
  margin-inline: auto;
  padding: var(--ask-space-5);
}
@media (min-width: 1024px) {
  .ds-layout { grid-template-columns: 200px 1fr; }
}

.ds-nav {
  display: none;
  position: sticky;
  top: 76px;
  align-self: start;
  font-size: var(--ask-text-sm);
}
@media (min-width: 1024px) {
  .ds-nav { display: block; }
}
.ds-nav a {
  display: block;
  padding: var(--ask-space-1) var(--ask-space-2);
  color: var(--ask-color-text-muted);
  text-decoration: none;
  border-radius: var(--ask-radius-sm);
}
.ds-nav a:hover { color: var(--ask-color-text); background: var(--ask-color-surface-2); }
.ds-nav .part {
  font-size: var(--ask-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ask-color-text-faint);
  padding: var(--ask-space-4) var(--ask-space-2) var(--ask-space-1);
}

.ds-main { display: grid; gap: var(--ask-space-7); min-width: 0; }

.ds-section { display: grid; gap: var(--ask-space-5); scroll-margin-top: 90px; }
.ds-section > h2 {
  font-size: var(--ask-text-xl);
  font-weight: 700;
  padding-bottom: var(--ask-space-2);
  border-bottom: var(--ask-border-w) solid var(--ask-color-border);
}
.ds-section > h2 .ref {
  font-size: var(--ask-text-sm);
  font-weight: 400;
  color: var(--ask-color-text-faint);
  margin-left: var(--ask-space-2);
}

.ds-specimen {
  display: grid;
  gap: var(--ask-space-3);
}
.ds-specimen > h3 { font-size: var(--ask-text-base); font-weight: 600; }
.ds-specimen > .note { font-size: var(--ask-text-sm); color: var(--ask-color-text-muted); max-width: var(--ask-measure); }
.ds-canvas {
  padding: var(--ask-space-5);
  background: var(--ask-color-surface);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
}
.ds-canvas.alt { background: var(--ask-color-bg); }

.ds-swatches { display: grid; gap: var(--ask-space-3); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ds-swatch {
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  overflow: hidden;
  font-size: var(--ask-text-xs);
}
.ds-swatch .color { height: 56px; }
.ds-swatch .meta { padding: var(--ask-space-2) var(--ask-space-3); display: grid; gap: 2px; background: var(--ask-color-surface); }
.ds-swatch .meta code { font-family: var(--ask-font-mono); color: var(--ask-color-text-muted); font-size: 11px; }

/* Vitrine du fil de navigation (§13.6) : en usage réel il est `fixed` en haut
   de la fenêtre — le catalogue le rejoue dans un cadre pour qu'il reste
   lisible à côté des autres retours système. */
.ds-navprogress {
  position: relative;
  overflow: hidden;
  height: 72px;
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface-sunken);
}
.ds-navprogress .ask-nav-progress { position: absolute; }

.ds-typo-row {
  display: flex;
  align-items: baseline;
  gap: var(--ask-space-4);
  padding: var(--ask-space-2) 0;
  border-bottom: var(--ask-border-w) solid var(--ask-color-border);
}
.ds-typo-row code {
  font-family: var(--ask-font-mono);
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-faint);
  min-width: 130px;
  flex: none;
}

.ds-space-row { display: flex; align-items: center; gap: var(--ask-space-4); font-size: var(--ask-text-sm); }
.ds-space-row code { font-family: var(--ask-font-mono); font-size: var(--ask-text-xs); color: var(--ask-color-text-muted); min-width: 130px; }
.ds-space-bar { height: 16px; background: var(--ask-color-accent); border-radius: 3px; }

.ds-radius-demo {
  width: 72px;
  height: 56px;
  background: var(--ask-color-accent-subtle);
  border: 2px solid var(--ask-color-accent);
  display: grid;
  place-items: center;
  font-size: var(--ask-text-xs);
  color: var(--ask-color-accent);
  font-weight: 600;
}

.ds-elev-demo {
  width: 130px;
  height: 80px;
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface);
  display: grid;
  place-items: center;
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-muted);
  border: var(--ask-border-w) solid var(--ask-color-border);
}

.ds-mobile-frame {
  width: 300px;
  border: var(--ask-border-w) solid var(--ask-color-border-strong);
  border-radius: var(--ask-radius-lg);
  overflow: hidden;
  background: var(--ask-color-bg);
}
.ds-mobile-frame .screen { padding: var(--ask-space-4); min-height: 120px; }

.ds-gabarit {
  border: var(--ask-border-w) solid var(--ask-color-border-strong);
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface);
  padding: var(--ask-space-2);
  display: grid;
  gap: var(--ask-space-1);
  font-size: 10px;
  color: var(--ask-color-text-faint);
  min-height: 110px;
}
.ds-gabarit .zone {
  background: var(--ask-color-surface-2);
  border: 1px dashed var(--ask-color-border-strong);
  border-radius: 4px;
  display: grid;
  place-items: center;
  padding: var(--ask-space-1);
  min-height: 20px;
}
.ds-gabarit .zone.accent { background: var(--ask-color-accent-subtle); border-color: var(--ask-color-accent); color: var(--ask-color-accent); }
.ds-gabarit.split { grid-template-columns: 1fr 1fr; }
.ds-gabarit.listdetail { grid-template-columns: 2fr 1fr; }

.ds-code {
  font-family: var(--ask-font-mono);
  font-size: var(--ask-text-xs);
  background: var(--ask-color-surface-sunken);
  border-radius: var(--ask-radius-sm);
  padding: 2px 6px;
}

.ds-two-col { display: grid; gap: var(--ask-space-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .ds-two-col { grid-template-columns: 1fr 1fr; } }

.ds-footer {
  text-align: center;
  color: var(--ask-color-text-faint);
  font-size: var(--ask-text-sm);
  padding: var(--ask-space-7) 0;
}

/* --- Explorer v2 (ADR-094 / 098 / 100) : search, tuiles, cartes ----------
   Seul consommateur de .ask-search-zone : suit toujours la barre d'action
   « Créer du contenu » (.ask-pagebar, elle-même déjà en padding-top) —
   padding haut réduit pour ne pas cumuler les deux (§11). */
.ask-search-zone {
  display: grid;
  gap: var(--ask-space-3);
  justify-items: center;
  padding: var(--ask-space-2) 0 var(--ask-space-2);
}
.ask-search-zone .ask-search-pill {
  width: min(100%, 640px);
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  min-height: 56px;
  padding: 0 var(--ask-space-3) 0 var(--ask-space-5);
  background: var(--ask-color-surface);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-full);
  box-shadow: var(--ask-elev-1);
}
.ask-search-zone .ask-search-pill:focus-within {
  border-color: var(--ask-color-accent);
  box-shadow: 0 0 0 3px var(--ask-color-accent-subtle);
}
.ask-search-zone .ask-search-pill .ask-ico {
  color: var(--ask-color-text-faint);
  font-size: var(--ask-text-lg);
}
.ask-search-zone .ask-search-pill input {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: var(--ask-text-base);
  color: var(--ask-color-text);
  outline: none;
  min-width: 0;
}
.ask-seg-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--ask-space-5);
}
.ask-seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: var(--ask-color-surface-2);
  border-radius: var(--ask-radius-full);
  /* Mobile (ux-ui §5.2) : une série longue — les 10 modes de vocabulaire —
     défile dans sa pilule au lieu de pousser la page en débordement
     horizontal. `max-width: 100%` borne le segment à son conteneur. */
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.ask-seg::-webkit-scrollbar {
  display: none;
}
.ask-seg button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: var(--ask-text-xs);
  font-weight: 500;
  color: var(--ask-color-text-muted);
  min-height: 32px;
  padding: 0 var(--ask-space-3);
  border-radius: var(--ask-radius-full);
  cursor: pointer;
  /* en défilement : le libellé ne se casse ni ne se comprime */
  flex: none;
  white-space: nowrap;
  scroll-snap-align: start;
}
/* Au doigt, la cible atteint le minimum du DS (§9.1) — au clavier/souris la
   pilule reste compacte. */
@media (pointer: coarse) {
  .ask-seg button {
    min-height: var(--ask-hit-min);
  }
}
.ask-seg button[aria-pressed="true"] {
  background: var(--ask-color-surface);
  color: var(--ask-color-text);
  font-weight: 600;
  box-shadow: var(--ask-elev-1);
}
.ask-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: var(--ask-space-4);
}
.ask-cat-tile {
  --dom-color: var(--ask-color-accent);
  --dom-subtle: var(--ask-color-accent-subtle);
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--ask-space-4);
  height: 78px;
  padding: 0 var(--ask-space-4) 0 var(--ask-space-5);
  background: var(--ask-color-surface);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-left: 4px solid var(--dom-color);
  border-radius: var(--ask-radius-md);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: background var(--ask-motion-fast) var(--ask-ease-out),
    transform var(--ask-motion-fast) var(--ask-ease-out);
}
.ask-cat-tile:hover {
  background: var(--dom-subtle);
  transform: translateY(-1px);
}
.ask-cat-tile .txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ask-cat-tile .name {
  font-weight: 600;
  font-size: var(--ask-text-base);
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ask-cat-tile .meta { color: var(--ask-color-text-muted); font-size: var(--ask-text-sm); }
.ask-cat-tile .chev { color: var(--ask-color-text-faint); font-size: var(--ask-text-lg); }
.ask-cat-tile.create {
  border-style: dashed;
  border-left-width: var(--ask-border-w);
  color: var(--ask-color-text-muted);
  justify-content: center;
  gap: var(--ask-space-2);
}
.ask-cat-tile.create:hover {
  color: var(--ask-color-accent);
  background: var(--ask-color-accent-subtle);
}
.ask-cat-tile.has-edit { position: relative; padding-right: var(--ask-space-2); }
.ask-cat-tile.has-edit > .app-popover { flex: none; }
.ask-cat-tile.has-edit .app-popover-panel {
  left: auto;
  right: 0;
}
.ask-cat-tile-go {
  display: flex;
  align-items: center;
  gap: inherit;
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.ask-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: var(--ask-space-4);
}
.ask-content-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--ask-space-2);
  padding: var(--ask-space-4);
  box-shadow: var(--ask-elev-1);
}
.ask-content-card.is-archived {
  opacity: 0.72;
}
.ask-pagebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-3);
  padding-top: var(--ask-space-6);
}
.ask-pagebar .ask-btn {
  margin-left: auto;
}
.ask-pagebar h1 {
  margin: 0;
  font-size: var(--ask-text-xl);
  font-weight: 700;
}
.ask-breadcrumb + .ask-pagebar {
  padding-top: var(--ask-space-3);
}
.ask-pagebar + .ask-tabs,
.ask-banner + .ask-tabs {
  margin-top: var(--ask-space-4);
}
.ask-pagebar + .ask-banner {
  margin-top: var(--ask-space-4);
}
.ask-tabs + .ask-stack {
  margin-top: var(--ask-space-5);
}
.ask-card.caution {
  border-color: var(--ask-color-warning-border);
}
.ask-kind,
.ask-content-card .kind {
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-1);
  font-size: var(--ask-text-xs);
  font-weight: 600;
  color: var(--ask-color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ask-kind .ask-ico,
.ask-content-card .kind .ask-ico { font-size: var(--ask-text-sm); }
.ask-content-card .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ask-space-2);
  min-height: var(--ask-hit-min);
}
.ask-content-card .right {
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-2);
}
.ask-content-card .title {
  display: flex;
  align-items: flex-start;
  gap: var(--ask-space-2);
}
.ask-content-card h3 {
  flex: 1;
  margin: 0;
  font-size: var(--ask-text-base);
  font-weight: 650;
  line-height: 1.2;
}
/* Le corps de la carte mène à la fiche du contenu (ADR-160, CD-1) : le lien
   du titre s'étend à toute la carte, les actions du pied et de l'en-tête
   repassent au-dessus et gardent leur geste direct. Un seul lien dans le
   balisage — pas de bouton imbriqué dans une ancre. */
.ask-content-card h3 a {
  color: inherit;
  text-decoration: none;
}
.ask-content-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.ask-content-card h3 a:hover {
  color: var(--ask-color-accent);
}
.ask-content-card:has(h3 a:hover) {
  border-color: var(--ask-color-accent);
}
.ask-content-card h3 a:focus-visible::after {
  outline: 2px solid var(--ask-color-focus);
  outline-offset: 2px;
}
.ask-content-card .top .right,
.ask-content-card .foot .actions {
  position: relative;
  z-index: 1;
}
.ask-content-card .foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ask-space-3);
}
.ask-content-card .foot .perf {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  color: var(--ask-color-text-muted);
  font-size: var(--ask-text-sm);
}
.ask-content-card .foot .actions {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  margin-left: auto;
}
.ask-content-card .foot .actions .studio {
  display: inline-flex;
  align-items: center;
  min-height: var(--ask-hit-min);
  padding-inline: var(--ask-space-2);
  font-size: var(--ask-text-xs);
  font-weight: 600;
  color: var(--ask-color-text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.ask-content-card .foot .actions .studio:hover {
  color: var(--ask-color-accent);
}

.ask-picker-sources {
  display: flex;
  gap: var(--ask-space-2);
  margin-bottom: var(--ask-space-3);
}

/* --- Éditeur plein écran (ADR-097 / 099) -------------------------------- */
.ask-editor-veil {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--ask-color-text) 32%, transparent);
  z-index: var(--ask-z-overlay);
}
.ask-editor-dialog {
  position: fixed;
  inset: var(--ask-space-4);
  background: var(--ask-color-surface-2);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-lg);
  box-shadow: var(--ask-elev-3);
  z-index: calc(var(--ask-z-overlay) + 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ask-editor-dialog > header {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  padding: var(--ask-space-3) var(--ask-space-5);
  background: var(--ask-color-surface);
  border-bottom: var(--ask-border-w) solid var(--ask-color-border);
  flex: none;
}
.ask-editor-dialog > header .kind { flex: none; }
.ask-editor-dialog > .body {
  flex: 1;
  overflow-y: auto;
  padding: var(--ask-space-6);
}
.ask-editor-dialog > .body > * {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
}
.ask-editor-dialog > footer {
  display: flex;
  align-items: center;
  gap: var(--ask-space-4);
  padding: var(--ask-space-3) var(--ask-space-5);
  background: var(--ask-color-surface);
  border-top: var(--ask-border-w) solid var(--ask-color-border);
  flex: none;
}
.ask-editor-dialog > footer .spacer { flex: 1; }
.ask-editor-dialog > footer .guards {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  flex-wrap: wrap;
  color: var(--ask-color-text-muted);
  font-size: var(--ask-text-sm);
}
.ask-title-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: var(--ask-text-lg);
  font-weight: 650;
  color: var(--ask-color-text);
  outline: none;
  padding: var(--ask-space-1) var(--ask-space-2);
  border-radius: var(--ask-radius-sm);
}
.ask-title-input:hover { background: var(--ask-color-surface-2); }
.ask-title-input:focus {
  background: var(--ask-color-surface-2);
  box-shadow: inset 0 0 0 2px var(--ask-color-accent-subtle);
}
.ask-editor-cols {
  display: grid;
  gap: var(--ask-space-6);
  align-items: start;
}
@media (min-width: 1024px) {
  .ask-editor-cols { grid-template-columns: minmax(0, 1fr) 340px; }
}
.ask-editor-cols > aside { display: grid; gap: var(--ask-space-5); }
.ask-quickadd {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  padding: var(--ask-space-3) var(--ask-space-4);
  background: var(--ask-color-accent-subtle);
  border: var(--ask-border-w) dashed var(--ask-color-accent);
  border-radius: var(--ask-radius-md);
}
.ask-quickadd input {
  flex: 1;
  min-width: 0;
  border: var(--ask-border-w) solid var(--ask-color-border);
  background: var(--ask-color-surface);
  font: inherit;
  color: var(--ask-color-text);
  min-height: 40px;
  padding: 0 var(--ask-space-3);
  border-radius: var(--ask-radius-sm);
  outline: none;
}
.ask-quickadd input:focus { border-color: var(--ask-color-accent); }
.ask-quickadd .arrow { color: var(--ask-color-text-faint); flex: none; }
.ask-vocab-row {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  min-height: var(--ask-hit-min);
  padding: var(--ask-space-2) var(--ask-space-3);
  border-bottom: var(--ask-border-w) solid var(--ask-color-border);
}
.ask-vocab-row:last-child { border-bottom: 0; }
.ask-vocab-row .front { flex: 1; min-width: 0; font-weight: 500; }
.ask-vocab-row .back { flex: 1; min-width: 0; color: var(--ask-color-text-muted); }
.ask-vocab-row .arrow { color: var(--ask-color-text-faint); flex: none; }
.ask-hover-actions,
.ask-vocab-row .row-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--ask-space-1);
  opacity: 0;
  transition: opacity var(--ask-motion-fast) var(--ask-ease-out);
}
.ask-vocab-row:hover .row-actions,
.ask-vocab-row:focus-within .row-actions,
.ask-vocab-row:hover .ask-hover-actions,
.ask-vocab-row:focus-within .ask-hover-actions,
.ask-vocab-situations > li:hover > .ask-hover-actions,
.ask-vocab-situations > li:focus-within > .ask-hover-actions {
  opacity: 1;
}

/* Grille de navigation d'épreuve (§19.7, ADR-130). */
.ask-exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: var(--ask-space-2);
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}
.ask-exam-grid button {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: var(--ask-radius-sm);
  border: var(--ask-border-w) solid var(--ask-color-border-strong);
  background: var(--ask-color-surface);
  font: inherit;
  font-size: var(--ask-text-sm);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.ask-exam-grid button.answered {
  background: var(--ask-color-accent-subtle);
  border-color: var(--ask-color-accent);
  color: var(--ask-color-accent);
  font-weight: 600;
}
.ask-exam-grid button.flagged {
  border-color: var(--ask-color-warning-solid);
  box-shadow: 0 0 0 1px var(--ask-color-warning-solid);
}
.ask-exam-grid button[aria-current="true"] {
  outline: 2px solid var(--ask-color-focus);
  outline-offset: 2px;
}
.ask-exam .ask-banner {
  border-radius: 0;
  justify-content: center;
}

/* --- Épreuve : la page entière tient dans l'écran (§19.7, ADR-217) ---
   Trois rangées — le bandeau de temps, la scène, le dock de navigation. Le
   player occupe la rangée du milieu et n'impose plus sa propre hauteur ; le
   plan de l'épreuve (grille des questions + Remettre) reste sous les yeux au
   lieu d'allonger la page. */
.ask-exam {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--ask-color-bg);
}
.ask-exam-main {
  min-height: 0;
  padding: var(--ask-space-4);
}
.ask-exam .ask-player.quiz {
  height: 100%;
  min-height: 0;
}
.ask-exam-dock {
  display: flex;
  align-items: center;
  gap: var(--ask-space-4);
  padding: var(--ask-space-3) var(--ask-space-4);
  padding-bottom: calc(var(--ask-space-3) + env(safe-area-inset-bottom, 0px));
  border-top: var(--ask-border-w) solid var(--ask-color-border);
  background: var(--ask-color-surface);
}
.ask-exam-dock-head { flex: none; }
/* Une seule rangée de numéros, qui défile horizontalement : vingt questions
   ne repoussent pas la scène. */
.ask-exam-dock .ask-exam-grid {
  flex: 1;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: 40px;
  overflow-x: auto;
  padding-block: var(--ask-space-1);
}
@media (max-width: 767px) {
  .ask-exam-dock { flex-wrap: wrap; }
  .ask-exam-dock .ask-exam-grid { order: 3; flex-basis: 100%; }
}

/* --- Explorer : la barre unique (§23.13, ADR-218) ---------------------
   Une seule rangée porte tout ce qui n'est pas du contenu : la recherche, les
   filtres, la création. Elle est identique du téléphone au grand écran — seuls
   les libellés des deux boutons s'effacent sous `md`, l'icône suffit.

   Les filtres vivent derrière leur bouton (popover §12.4) et ne reviennent en
   chips que lorsqu'ils sont actifs : tant qu'on ne filtre pas — le cas
   courant — ils ne coûtent aucune hauteur. C'est ce qui rend la barre
   insensible au nombre de niveaux déclarés par l'école. */
.ask-explore-bar {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  padding: var(--ask-space-1) var(--ask-space-1) var(--ask-space-1)
    var(--ask-space-3);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-surface);
}
/* L'anneau de focus se porte sur la barre : le champ n'a plus de bord propre,
   c'est elle qui montre où va la frappe. */
.ask-explore-bar:focus-within {
  border-color: var(--ask-color-accent);
  box-shadow: 0 0 0 3px var(--ask-color-accent-subtle);
}
.ask-explore-bar .field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  min-width: 0;
  color: var(--ask-color-text-muted);
}
.ask-explore-bar .field input {
  flex: 1;
  min-width: 0;
  min-height: var(--ask-control-md);
  border: 0;
  background: none;
  font: inherit;
  color: var(--ask-color-text);
}
.ask-explore-bar .field input:focus { outline: none; }
.ask-explore-bar .field input::-webkit-search-cancel-button { cursor: pointer; }
/* Compteur de filtres actifs : le bouton dit *qu'il se passe quelque chose*,
   même quand les chips sont hors de vue. */
.ask-explore-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-inline-start: var(--ask-space-1);
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-accent);
  color: var(--ask-color-text-on-accent);
  font-size: var(--ask-text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* Libellé des deux boutons : masqué sous `md`, l'icône porte le sens (le nom
   accessible reste sur le bouton). */
.ask-explore-bar .on-md { display: none; }
@media (min-width: 768px) {
  .ask-explore-bar .on-md { display: inline; }
}
.ask-explore-active {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ask-space-2);
  align-items: center;
}
/* Panneau de filtres : les groupes de chips, empilés et nommés. */
.ask-explore-filters {
  display: grid;
  gap: var(--ask-space-3);
  padding: var(--ask-space-4);
  max-width: min(420px, calc(100vw - 2 * var(--ask-space-4)));
}
.ask-explore-filters h4 {
  margin: 0;
  font-size: var(--ask-text-sm);
  font-weight: 600;
  color: var(--ask-color-text-muted);
}

/* --- ask-explore-bridge (§23.13, ADR-261) — le pont vers le catalogue public.
   Rendu SOUS CONDITIONS STRICTES : recherche non vide **et** au moins un
   résultat au catalogue. Jamais sur la vue d'entrée — le repos d'Explorer
   garde la hauteur qu'ADR-218 lui a rendue. La bordure tiretée la distingue
   d'une carte de contenu : ce n'est pas un résultat, c'est un chemin. --- */
.ask-explore-bridge {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: var(--ask-space-3) var(--ask-space-4);
  border: var(--ask-border-w) dashed var(--ask-color-border);
  border-radius: var(--ask-radius-lg);
  background: var(--ask-color-surface);
  color: var(--ask-color-text);
  font: inherit;
  transition:
    background var(--ask-motion-fast) var(--ask-ease-out),
    border-color var(--ask-motion-fast) var(--ask-ease-out);
}
.ask-explore-bridge:hover {
  background: var(--ask-color-accent-subtle);
  border-color: var(--ask-color-accent);
}
.ask-explore-bridge .mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--ask-hit-min);
  height: var(--ask-hit-min);
  border-radius: var(--ask-radius-full);
  background: var(--ask-color-accent-subtle);
  color: var(--ask-color-accent);
}
.ask-explore-bridge .txt {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.ask-explore-bridge .txt b { font-weight: 650; }
.ask-explore-bridge .txt .sub {
  color: var(--ask-color-text-muted);
  font-size: var(--ask-text-sm);
}
.ask-explore-bridge .chev {
  color: var(--ask-color-text-faint);
  font-size: var(--ask-text-lg);
}

/* --- Carte de catalogue public (§23.13, ADR-261) — variante de lecture d'une
   `ask-content-card` pour un contenu d'un **autre tenant**. Ce qu'elle n'a pas
   est la spécification : ni anneau de maîtrise, ni mise en travail, ni pouce,
   ni Retours, ni Studio (le SRS ne traverse pas les tenants). --- */
.ask-content-card.is-public .desc {
  margin: 0;
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ask-content-card.is-public .origin {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  font-size: var(--ask-text-xs);
  color: var(--ask-color-text-muted);
}
.ask-content-card.is-public .origin .ask-ico {
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-faint);
}
.ask-content-card.is-public .origin .dot { color: var(--ask-color-text-faint); }

/* La ligne de résultats d'une portée : ce qu'on cherche, où, et le retour. */
.ask-explore-scope {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--ask-space-2) var(--ask-space-3);
}
.ask-explore-scope .where {
  color: var(--ask-color-text-muted);
  font-size: var(--ask-text-sm);
}
.ask-explore-scope .back { margin-left: auto; }

/* --- ask-live (§19.13, ADR-156) : scène live play / host --- */
.ask-live {
  box-sizing: border-box;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: var(--ask-space-5);
  padding: var(--ask-space-5);
  padding-bottom: calc(var(--ask-space-5) + env(safe-area-inset-bottom, 0px));
  background: var(--ask-color-bg);
}
.ask-live.host {
  padding: var(--ask-space-6);
  gap: var(--ask-space-6);
}
.ask-live-chrome {
  display: flex;
  align-items: center;
  gap: var(--ask-space-3);
  flex-wrap: wrap;
}
.ask-live-chrome h1 {
  margin: 0;
  flex: 1;
  font-size: var(--ask-text-lg);
  font-weight: 600;
  line-height: 1.25;
}
.ask-live-progress {
  margin: 0;
  text-align: center;
  font-size: var(--ask-text-lg);
  font-weight: 600;
  color: var(--ask-color-text-muted);
}
.ask-live-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--ask-space-6);
  min-height: 0;
  overflow: auto;
}
.ask-live-stage:has(.ask-live-join):not(:has(.ask-live-board)),
.ask-live-stage:has(.ask-live-wait):not(:has(.ask-live-board)),
.ask-live.host .ask-live-stage:not(:has(.ask-live-board)) {
  justify-content: center;
}
.ask-live-dock {
  display: flex;
  gap: var(--ask-space-3);
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: var(--ask-z-sticky);
  padding-top: var(--ask-space-4);
  background: var(--ask-color-bg);
}
.ask-live-dock .ask-btn { flex: 1; }
.ask-live-dock .ask-btn.primary { flex: 2; }
.ask-live-pin {
  margin: 0;
  font-size: var(--ask-text-display);
  font-weight: 700;
  letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  color: var(--ask-color-text);
}
.ask-live-qr {
  width: min(280px, 70vw);
  height: auto;
  aspect-ratio: 1;
  border-radius: var(--ask-radius-lg);
  border: var(--ask-border-w) solid var(--ask-color-border);
  background: var(--ask-color-surface);
  padding: var(--ask-space-3);
}
.ask-live-stat {
  margin: 0;
  text-align: center;
}
.ask-live-stat .n {
  display: block;
  font-size: var(--ask-text-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.ask-live-stat .l {
  display: block;
  margin-top: var(--ask-space-2);
  font-size: var(--ask-text-lg);
  color: var(--ask-color-text-muted);
}
.ask-live-stem {
  margin: 0 auto;
  max-width: var(--ask-measure);
  text-align: center;
  font-size: var(--ask-text-2xl);
  font-weight: 600;
  line-height: 1.2;
}
.ask-live-nicks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ask-space-3);
}
.ask-live-nicks .ask-chip {
  font-size: var(--ask-text-lg);
  min-height: var(--ask-control-lg);
  padding-inline: var(--ask-space-5);
}
.ask-live-wait {
  text-align: center;
}
.ask-live-wait h1 {
  margin: 0 0 var(--ask-space-4);
  font-size: var(--ask-text-2xl);
  font-weight: 700;
  line-height: 1.15;
}
.ask-live-wait .pub-muted {
  margin: 0 0 var(--ask-space-5);
  font-size: var(--ask-text-lg);
}
.ask-live-wait .ask-badge { font-size: var(--ask-text-lg); }
@keyframes ask-live-pulse {
  50% { opacity: 0.55; }
}
@media (prefers-reduced-motion: no-preference) {
  .ask-live-wait .pub-muted {
    animation: ask-live-pulse 1.6s var(--ask-ease-out) infinite;
  }
}
.ask-live-board {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--ask-space-3);
  width: min(100%, 40rem);
  margin-inline: auto;
}
.ask-live-board-row {
  display: flex;
  align-items: center;
  gap: var(--ask-space-4);
  min-height: var(--ask-space-8);
  padding: var(--ask-space-4) var(--ask-space-5);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface);
  font-size: var(--ask-text-lg);
}
.ask-live-board-row.me {
  border-color: var(--ask-color-accent);
  background: var(--ask-color-accent-subtle);
}
.ask-live-board-row[data-rank="1"] {
  min-height: calc(var(--ask-space-8) + var(--ask-space-3));
  font-size: var(--ask-text-xl);
  font-weight: 700;
  border-color: var(--ask-color-accent);
}
.ask-live-board-row[data-rank="2"],
.ask-live-board-row[data-rank="3"] {
  font-size: var(--ask-text-xl);
  font-weight: 600;
}
.ask-live-board-rank {
  min-width: 2.5ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ask-color-text-muted);
}
.ask-live-board-row[data-rank="1"] .ask-live-board-rank {
  color: var(--ask-color-accent);
}
.ask-live-board-name { flex: 1; min-width: 0; }
.ask-live-board-pts {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ask-color-text-muted);
}
.ask-live-join {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ask-space-5);
  text-align: center;
  width: min(100%, 22rem);
  margin-inline: auto;
}
.ask-live.host .ask-live-join { width: min(100%, 28rem); }
.ask-live-join .ask-field {
  width: 100%;
  text-align: start;
}
.ask-live-url {
  margin: 0;
  font-size: var(--ask-text-sm);
  color: var(--ask-color-text-muted);
  word-break: break-all;
  max-width: 36ch;
}

/* Play : mobile-first, cibles et typo agrandies */
.ask-live.play {
  gap: var(--ask-space-6);
  padding: var(--ask-space-6) var(--ask-space-5);
  padding-bottom: calc(var(--ask-space-6) + env(safe-area-inset-bottom, 0px));
}
.ask-live.play .ask-field label {
  font-size: var(--ask-text-lg);
  font-weight: 600;
}
.ask-live.play .ask-input {
  min-height: var(--ask-space-8);
  font-size: var(--ask-text-xl);
  border-radius: var(--ask-radius-md);
}
.ask-live.play .ask-choice-card {
  min-height: var(--ask-space-8);
  padding: var(--ask-space-5);
  font-size: var(--ask-text-xl);
  border-radius: var(--ask-radius-md);
}
.ask-live.play .statement {
  font-size: var(--ask-text-2xl);
  font-weight: 700;
  line-height: 1.2;
}
.ask-live.play .ask-feedback .verdict {
  font-size: var(--ask-text-2xl);
  font-weight: 700;
}
.ask-live.play .ask-feedback .msg {
  font-size: var(--ask-text-lg);
}
.ask-live.play .ask-live-dock .ask-btn {
  height: auto;
  min-height: var(--ask-space-8);
  font-size: var(--ask-text-lg);
  font-weight: 600;
}
.ask-live.play .ask-live-wait h1 {
  font-size: var(--ask-text-display);
  letter-spacing: -0.03em;
}

/* Host : projection, un geste / un chiffre */
.ask-live.host .ask-live-dock .ask-btn {
  height: auto;
  min-height: var(--ask-space-8);
  font-size: var(--ask-text-lg);
  font-weight: 600;
}
.ask-live-lobby > section {
  min-height: 0;
  overflow: auto;
}
@media (min-width: 1024px) {
  .ask-live-lobby {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ask-space-8);
    align-items: center;
    flex: 1;
  }
  .ask-live.host .ask-live-chrome h1 { font-size: var(--ask-text-xl); }
  .ask-live-qr { width: 320px; }
}

/* ==========================================================================
   FICHE D'UN CONTENU — §23.15–23.18 (ADR-160)
   Un contenu (liste, vocabulaire, quiz) a une page à lui : identité, aperçu,
   statistiques anonymisées, lancement, retours. Les sous-pièces consomment
   `--dom-color` / `--dom-subtle` comme `ask-cat-tile` (ADR-154) : la fiche
   porte la couleur de sa catégorie racine.
   ========================================================================== */

/* --- ask-content-hero (§23.15) : l'identité, en un écran --- */
.ask-content-hero {
  --dom-color: var(--ask-color-accent);
  --dom-subtle: var(--ask-color-accent-subtle);
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--ask-space-4) var(--ask-space-5);
  padding: var(--ask-space-6);
  overflow: hidden;
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-lg);
  background:
    radial-gradient(120% 150% at 0% 0%, var(--dom-subtle), transparent 58%),
    var(--ask-color-surface);
}
.ask-content-hero::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  inline-size: var(--ask-space-1);
  background: var(--dom-color);
}
.ask-content-hero > .mark {
  display: grid;
  place-items: center;
  inline-size: var(--ask-space-8);
  block-size: var(--ask-space-8);
  border-radius: var(--ask-radius-md);
  background: var(--dom-subtle);
  color: var(--dom-color);
  font-size: var(--ask-text-xl);
}
.ask-content-hero > .head {
  display: grid;
  gap: var(--ask-space-3);
  min-width: 0;
}
.ask-content-hero .kind {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-2);
  margin: 0;
  font-size: var(--ask-text-sm);
  font-weight: 600;
  color: var(--dom-color);
}
/* Le titre porte une classe, pas un niveau : la fiche s'insère aussi bien en
   page (h1) qu'en démonstration de catalogue (h2) sans style en dur. */
.ask-content-hero .title {
  margin: 0;
  font-size: var(--ask-text-2xl);
  font-weight: 700;
  line-height: 1.15;
}
.ask-content-hero .pitch {
  margin: 0;
  max-width: var(--ask-measure);
  color: var(--ask-color-text-muted);
}
.ask-content-hero .badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-2);
}
.ask-content-hero > .aside {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: var(--ask-space-2);
  text-align: center;
  color: var(--ask-color-text-muted);
  font-size: var(--ask-text-sm);
}
.ask-content-hero > .actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-3);
  padding-top: var(--ask-space-4);
  border-top: var(--ask-border-w) solid var(--ask-color-border);
}
.ask-content-hero > .actions .spacer { flex: 1; }
.ask-content-hero.is-archived { --dom-color: var(--ask-color-text-faint); }
@media (min-width: 900px) {
  .ask-content-hero { grid-template-columns: auto minmax(0, 1fr) auto; }
}

/* --- ask-content-preview (§23.16) : le contenu tel qu'il sera joué --- */
.ask-content-preview {
  display: grid;
  gap: var(--ask-space-4);
  padding: var(--ask-space-5);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-lg);
  background: var(--ask-color-surface-2);
}
.ask-content-preview > .frame {
  display: grid;
  gap: var(--ask-space-5);
  padding: var(--ask-space-6);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface);
  box-shadow: var(--ask-elev-1);
}
.ask-content-preview > .foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-3);
  color: var(--ask-color-text-muted);
  font-size: var(--ask-text-sm);
}
.ask-content-preview > .foot .spacer { flex: 1; }

/* --- ask-session-launcher (§23.17) : toutes les façons de lancer --- */
.ask-session-launcher {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: var(--ask-space-4);
}
.ask-launch-card {
  display: grid;
  align-content: start;
  gap: var(--ask-space-2);
  padding: var(--ask-space-5);
  text-align: start;
  font: inherit;
  color: inherit;
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface);
  cursor: pointer;
  transition:
    border-color var(--ask-motion-fast) var(--ask-ease-out),
    transform var(--ask-motion-fast) var(--ask-ease-out);
}
.ask-launch-card:hover {
  border-color: var(--ask-color-accent);
  transform: translateY(-2px);
}
.ask-launch-card > .ask-ico {
  font-size: var(--ask-text-xl);
  color: var(--ask-color-accent);
}
.ask-launch-card .title {
  font-size: var(--ask-text-base);
  font-weight: 650;
}
.ask-launch-card .desc {
  color: var(--ask-color-text-muted);
  font-size: var(--ask-text-sm);
}
.ask-launch-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.ask-launch-card:disabled:hover { border-color: var(--ask-color-border); }

/* --- ask-share-link (§23.18) : lien extérieur, révocable --- */
.ask-share-link { display: grid; align-content: start; gap: var(--ask-space-4); }
.ask-share-link > .url {
  display: flex;
  align-items: center;
  gap: var(--ask-space-2);
  min-height: var(--ask-control-lg);
  padding-inline: var(--ask-space-4);
  border: var(--ask-border-w) solid var(--ask-color-border-strong);
  border-radius: var(--ask-radius-sm);
  background: var(--ask-color-surface-2);
}
.ask-share-link > .url .ask-ico { color: var(--ask-color-text-faint); }
.ask-share-link > .url input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
}
.ask-share-link > .url input:focus { outline: none; }
.ask-share-link > .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-2);
}
.ask-share-link > .row .spacer { flex: 1; }

/* --- ask-comment-thread (§23.19, ADR-159) : la parole des coachs --- */
.ask-comment-thread { display: grid; align-content: start; gap: var(--ask-space-3); }
.ask-comment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--ask-space-2) var(--ask-space-3);
  padding: var(--ask-space-4);
  border: var(--ask-border-w) solid var(--ask-color-border);
  border-radius: var(--ask-radius-md);
  background: var(--ask-color-surface);
}
.ask-comment > .ask-avatar { grid-row: span 2; }
.ask-comment .who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ask-space-2);
  font-weight: 600;
}
.ask-comment .when {
  color: var(--ask-color-text-faint);
  font-size: var(--ask-text-sm);
  font-weight: 400;
}
.ask-comment .body {
  margin: 0;
  max-width: var(--ask-measure);
  white-space: pre-wrap;
}
.ask-comment .acts {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ask-space-2);
  padding-top: var(--ask-space-1);
}
.ask-comment.reply { margin-inline-start: var(--ask-space-6); }
.ask-comment.restricted { border-color: var(--ask-color-info-border); }
