/* =========================================================================
   STMGATE — nouveau design (maquettes Stitch, DESIGN.md du 26/10/2026)
   Couche chargée APRÈS app.css : elle ne fait que redéfinir les jetons
   (couleurs, ombres, arrondis) et affiner les composants communs.
   Pour revenir à l'ancien design : retirer le <link> de base.html.
   ========================================================================= */

/* ---------------------------------------------------------------- jetons : clair */
:root {
  --ds-plum: #4b1240;           /* « STM » : identité, pastilles de filière */
  --ds-vert: #6aae2a;           /* « GATE » : progression, réussites */
  --ds-bleu: #2748c9;           /* actions principales uniquement */
  --ds-bleu-hover: #1e39a8;
  --ds-ring: 0 0 0 3px rgba(39, 72, 201, .35);
  --ds-card-border: rgba(0, 0, 0, .06);
  --ds-shadow-1: 0 2px 8px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .04);
  --ds-shadow-2: 0 4px 12px rgba(0, 0, 0, .06), 0 12px 32px rgba(0, 0, 0, .08);
  --ds-shadow-3: 0 16px 40px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .04);
  --ds-verre: rgba(255, 255, 255, .85);
  --ds-verre-border: rgba(0, 0, 0, .08);
  --ds-ligne: rgba(0, 0, 0, .05);
  --ds-survol: rgba(0, 0, 0, .04);
  /* pastilles d'état */
  --ds-rendu-bg: rgba(16, 185, 129, .12);  --ds-rendu: #047857;
  --ds-retard-bg: rgba(244, 63, 94, .12);  --ds-retard: #be123c;
  --ds-corriger-bg: rgba(245, 158, 11, .14); --ds-corriger: #b45309;
  --ds-filiere-bg: rgba(75, 18, 64, .08);  --ds-filiere: #4b1240;
}
:root:not([data-theme="dark"]) {
  --bg: #f5f5f7; --surface: #ffffff; --surface-2: #f5f5f7;
  --text: #1c1c1e; --muted: #6e6e73; --faint: #86868b;
  --border: rgba(0, 0, 0, .08); --border-strong: rgba(0, 0, 0, .12);
  --primary: #2748c9; --primary-ink: #ffffff; --primary-soft: rgba(39, 72, 201, .10);
  --neutral-soft: rgba(0, 0, 0, .05);
  --shadow: var(--ds-shadow-1); --shadow-lg: var(--ds-shadow-3);
  --radius: 18px; --radius-sm: 14px;
}

/* ---------------------------------------------------------------- jetons : sombre (noir et graphite) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e;
  --text: #f5f5f7; --muted: #a1a1a6; --faint: #86868b;
  --border: rgba(255, 255, 255, .08); --border-strong: rgba(255, 255, 255, .14);
  --primary: #5b7cff; --primary-ink: #ffffff; --primary-soft: rgba(91, 124, 255, .18);
  --neutral-soft: rgba(255, 255, 255, .07);
  --ds-bleu: #3e64ff; --ds-bleu-hover: #5b7cff; --ds-plum: #e7b6dc; --ds-vert: #9ad94a;
  --ds-card-border: rgba(255, 255, 255, .08);
  --ds-shadow-1: 0 1px 2px rgba(0, 0, 0, .5); --ds-shadow-2: 0 8px 24px rgba(0, 0, 0, .55); --ds-shadow-3: 0 16px 40px rgba(0, 0, 0, .6);
  --shadow: var(--ds-shadow-1); --shadow-lg: var(--ds-shadow-3);
  --ds-verre: rgba(28, 28, 30, .85); --ds-verre-border: rgba(255, 255, 255, .12);
  --ds-ligne: rgba(255, 255, 255, .06); --ds-survol: rgba(255, 255, 255, .06);
  --ds-rendu-bg: rgba(16, 185, 129, .20);  --ds-rendu: #34d399;
  --ds-retard-bg: rgba(244, 63, 94, .22);  --ds-retard: #fb7185;
  --ds-corriger-bg: rgba(245, 158, 11, .22); --ds-corriger: #fbbf24;
  --ds-filiere-bg: rgba(231, 182, 220, .14); --ds-filiere: #e7b6dc;
  --radius: 18px; --radius-sm: 14px;
} }
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e;
  --text: #f5f5f7; --muted: #a1a1a6; --faint: #86868b;
  --border: rgba(255, 255, 255, .08); --border-strong: rgba(255, 255, 255, .14);
  --primary: #5b7cff; --primary-ink: #ffffff; --primary-soft: rgba(91, 124, 255, .18);
  --neutral-soft: rgba(255, 255, 255, .07);
  --ds-bleu: #3e64ff; --ds-bleu-hover: #5b7cff; --ds-plum: #e7b6dc; --ds-vert: #9ad94a;
  --ds-card-border: rgba(255, 255, 255, .08);
  --ds-shadow-1: 0 1px 2px rgba(0, 0, 0, .5); --ds-shadow-2: 0 8px 24px rgba(0, 0, 0, .55); --ds-shadow-3: 0 16px 40px rgba(0, 0, 0, .6);
  --shadow: var(--ds-shadow-1); --shadow-lg: var(--ds-shadow-3);
  --ds-verre: rgba(28, 28, 30, .85); --ds-verre-border: rgba(255, 255, 255, .12);
  --ds-ligne: rgba(255, 255, 255, .06); --ds-survol: rgba(255, 255, 255, .06);
  --ds-rendu-bg: rgba(16, 185, 129, .20);  --ds-rendu: #34d399;
  --ds-retard-bg: rgba(244, 63, 94, .22);  --ds-retard: #fb7185;
  --ds-corriger-bg: rgba(245, 158, 11, .22); --ds-corriger: #fbbf24;
  --ds-filiere-bg: rgba(231, 182, 220, .14); --ds-filiere: #e7b6dc;
  --radius: 18px; --radius-sm: 14px;
}

/* ---------------------------------------------------------------- typographie */
body { font-size: 15px; line-height: 1.45; letter-spacing: -0.002em; -webkit-font-smoothing: antialiased; }
h1, .page-head h1 { font-size: 2rem; line-height: 1.19; font-weight: 600; letter-spacing: -0.016em; }
h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.008em; }
h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.006em; }
@media (max-width: 639px) { h1, .page-head h1 { font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.012em; } }
.num, table, input[type=number], .count { font-feature-settings: "tnum" 1, "zero" 1; }
.section-title { font-size: .6875rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }

/* ---------------------------------------------------------------- cartes (niveau 1 → 2 au survol) */
.card { border-radius: var(--radius); border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1); padding: 24px; }
@media (max-width: 639px) { .card { padding: 16px; } }
a.card, .card.is-cliquable { transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
a.card:hover, .card.is-cliquable:hover { transform: translateY(-1px); box-shadow: var(--ds-shadow-2); text-decoration: none; }

/* ---------------------------------------------------------------- boutons */
.btn { border-radius: 12px; padding: 10px 18px; font-weight: 600; border-color: var(--border-strong); transition: background .15s, transform .15s, box-shadow .15s; }
.btn:hover { background: var(--ds-survol); }
.btn:focus-visible { outline: none; box-shadow: var(--ds-ring); }
.btn-primary { background: var(--ds-bleu); border-color: var(--ds-bleu); color: #fff; }
.btn-primary:hover { background: var(--ds-bleu-hover); transform: scale(1.01); }
.btn-secondaire { background: var(--ds-filiere-bg); border-color: transparent; color: var(--ds-filiere); }
.btn-secondaire:hover { background: color-mix(in srgb, var(--ds-filiere) 14%, transparent); }
.btn-ghost { border-radius: 10px; color: var(--text); }
.btn-ghost:hover { background: var(--ds-survol); }
.btn-sm { border-radius: 10px; }

/* ---------------------------------------------------------------- champs */
input[type=text], input[type=password], input[type=number], input[type=search], input[type=datetime-local], input[type=url],
input[type=email], input[type=date], input[type=time], select, textarea {
  border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ds-bleu); box-shadow: 0 0 0 3px rgba(39, 72, 201, .20); }
::placeholder { color: var(--faint); }
.check input, input[type=checkbox], input[type=radio] { accent-color: var(--ds-bleu); }

/* ---------------------------------------------------------------- pastilles d'état */
.chip { min-height: 24px; padding: 3px 10px; font-size: .6875rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.chip-success { background: var(--ds-rendu-bg); color: var(--ds-rendu); }
.chip-danger { background: var(--ds-retard-bg); color: var(--ds-retard); }
.chip-warn { background: var(--ds-corriger-bg); color: var(--ds-corriger); }
.chip-violet, .chip-filiere { background: var(--ds-filiere-bg); color: var(--ds-filiere); }
.chip-neutral { background: var(--neutral-soft); color: var(--muted); }
.chip-success::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------------------------------------------------------------- tableaux : lignes de 48 px, filets fins, survol arrondi */
table.data td, table.data th, .table td, .table th { border-color: var(--ds-ligne); }
table.data tbody tr:hover td, .table tbody tr:hover td { background: var(--ds-survol); }

/* ---------------------------------------------------------------- en-tête : verre dépoli (niveau 3) */
@media (min-width: 900px) {
  .entete { background: var(--ds-verre); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--ds-verre-border); }
}

/* ---------------------------------------------------------------- hauteur de page : pas de défilement à vide
   app.css calcule la hauteur avec celle de l'en-tête collant (53 ou 61 px) mais oublie le bandeau slogan et le ruban
   « Copie de test » au-dessus : ~40 px de trop sur les pages courtes. Ici, la mise en page remplit le reste de l'écran ;
   la barre latérale suit cette hauteur (sans la pousser) et reste plafonnée à l'écran pour rester collante. */
@media (min-width: 900px) {
  body { display: flex; flex-direction: column; min-height: 100vh; }
  body > .layout, body.a-barre > .layout { flex: 1 0 auto; min-height: 0; }
  .layout > .sidebar { height: auto; max-height: calc(100vh - 61px); contain: size; }
  body.a-barre .layout > .sidebar { height: auto; max-height: calc(100vh - 53px); }
}

/* ================================================================ Accueil : couleurs des outils et tuiles (élève) */
.oc-projet { --tc: #3b5bdb; } .oc-etude_gestion { --tc: #c2255c; } .oc-quiz { --tc: #0ca678; } .oc-progression { --tc: #1c7ed6; }
.oc-calcul { --tc: #f76707; } .oc-classe_virtuelle { --tc: #1098ad; } .oc-ap { --tc: #2b8a3e; } .oc-orientation { --tc: #e8590c; }
.oc-parcoursup { --tc: #5f3dc4; } .oc-convertisseur { --tc: #495057; } .oc-cours { --tc: #0e2a5c; } .oc-pgi { --tc: #2b8a3e; } .oc-avancement { --tc: #d9480f; } .oc-annales { --tc: #9c36b5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .oc-convertisseur { --tc: #adb5bd; } :root:not([data-theme="light"]) .oc-cours { --tc: #7aa7ff; } }
:root[data-theme="dark"] .oc-convertisseur { --tc: #adb5bd; } :root[data-theme="dark"] .oc-cours { --tc: #7aa7ff; }

.outils { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.outils > li { display: flex; }
.outil { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 18px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1); color: var(--text); position: relative;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, border-color .25s; }
a.outil:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--ds-shadow-2); border-color: color-mix(in srgb, var(--tc) 30%, transparent); }
.outil-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.outil-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--tc);
  background: color-mix(in srgb, var(--tc) 13%, transparent); }
.outil-badge { padding: 3px 10px; border-radius: 999px; font-size: .6875rem; font-weight: 600; letter-spacing: .02em;
  background: var(--neutral-soft); color: var(--muted); white-space: nowrap; }
.outil-badge.is-terminale { background: var(--ds-filiere-bg); color: var(--ds-filiere); }
.outil-badge.is-premiere { background: var(--primary-soft); color: var(--ds-bleu); }
.outil-nom { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.006em; line-height: 1.3; }
.outil-desc { color: var(--muted); font-size: .875rem; line-height: 1.45; flex: 1; }
.outil-pied { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ds-ligne); }
.outil-info { font-size: .75rem; font-weight: 600; color: var(--tc); }
.outil-go { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; font-weight: 600; color: var(--muted); transition: color .15s, gap .15s; }
a.outil:hover .outil-go { color: var(--tc); gap: 7px; }
.outil.is-bientot { background: transparent; box-shadow: none; border-style: dashed; border-color: var(--border-strong); }
.outil.is-bientot .outil-ic { color: var(--faint); background: var(--neutral-soft); }
.outil.is-bientot .outil-nom, .outil.is-bientot .outil-desc { color: var(--faint); }

/* ================================================================ Accueil élève (maquette Stitch « Bonjour Lina »)
   Salutation et 3 repères, puis tâches (7/12) à côté de la jauge Défi Calcul et des derniers résultats (5/12),
   puis les outils et le binôme. Uniquement des données réelles : une carte sans donnée n'est pas affichée. */
main:has(.ace) { max-width: 1400px; }
.ace { --ace-rayon: 24px; display: grid; gap: 24px; }
.ace-hero, .ace-carte, .ace-binome { background: var(--surface); border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1);
  border-radius: var(--ace-rayon); }
.ace-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap; padding: 28px 32px; }
.ace-hero::before { content: ""; position: absolute; right: -64px; top: -64px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, var(--ds-filiere-bg), transparent 70%); pointer-events: none; }
.ace-hero > * { position: relative; }
.ace-hero-texte { flex: 1 1 360px; min-width: 0; }
.ace-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; }
.ace-classe { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--ds-filiere-bg);
  color: var(--ds-filiere); font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ace-date { display: inline-flex; align-items: center; gap: 5px; font-size: .8125rem; color: var(--muted); }
.ace-hero h1 { margin: 0 0 4px; font-size: 2rem; line-height: 1.2; letter-spacing: -0.016em; }
.ace-sous { margin: 0; color: var(--muted); font-size: 1.0625rem; }
.ace-kpis { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 220px); gap: 12px; }
.ace-kpi { display: flex; align-items: center; gap: 12px; height: 100%; padding: 12px 16px; border-radius: 16px; background: var(--surface-2); color: var(--text); }
a.ace-kpi { transition: background .15s; } a.ace-kpi:hover { text-decoration: none; background: var(--ds-survol); }
.ace-kpi-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.kpi-rouge .ace-kpi-ic { background: var(--ds-retard); } .kpi-bleu .ace-kpi-ic { background: var(--ds-bleu); }
.kpi-vert .ace-kpi-ic { background: var(--ds-rendu); }
.kpi-rouge:is(a) { background: var(--ds-retard-bg); }
.ace-kpi-txt { display: grid; min-width: 0; }
.ace-kpi-lib { font-size: .6875rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.kpi-rouge:is(a) .ace-kpi-lib { color: var(--ds-retard); }
.ace-kpi b { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.ace-kpi-det { font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1099px) { .ace-kpis { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); width: 100%; } }

.ace-grille { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1100px) { .ace-grille { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .ace-grille.is-seule { grid-template-columns: 1fr; } }
.ace-carte { display: flex; flex-direction: column; gap: 16px; padding: 24px; min-width: 0; }
.ace-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ace-tete h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.0625rem; font-weight: 700; }
.ace-h-ic { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--ds-bleu); }
.ace-h-ic.is-prune { background: var(--ds-filiere-bg); color: var(--ds-filiere); }
.ace-liste, .ace-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ace-tache { --ton: var(--ds-bleu); --ton-bg: var(--primary-soft); display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 18px;
  background: var(--surface-2); transition: box-shadow .2s; }
.ace-tache:hover { box-shadow: var(--ds-shadow-2); }
.ace-tache.tone-warn { --ton: var(--ds-retard); --ton-bg: var(--ds-retard-bg); }
.ace-tache.tone-violet { --ton: var(--ds-filiere); --ton-bg: var(--ds-filiere-bg); }
.ace-tache.tone-success { --ton: var(--ds-rendu); --ton-bg: var(--ds-rendu-bg); }
.ace-tache-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--ton-bg); color: var(--ton); }
.ace-tache-corps { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ace-tache-haut { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 2px; }
.ace-etiquette { padding: 2px 8px; border-radius: 999px; background: var(--ton); color: #fff; font-size: .6875rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; }
.ace-outil { font-size: .75rem; font-weight: 600; color: var(--muted); }
.ace-tache-titre { font-size: .9375rem; font-weight: 700; line-height: 1.35; }
.ace-tache-quand { font-size: .8125rem; color: var(--muted); }
.ace-tache .btn { flex: none; }
.ace-tache .btn:not(.btn-primary) { background: var(--surface); }
@media (max-width: 640px) { .ace-tache { flex-wrap: wrap; } .ace-tache .btn { width: 100%; justify-content: center; } }
.ace-rien { display: flex; align-items: center; gap: 8px; margin: 0; padding: 16px; border-radius: 18px; background: var(--surface-2);
  color: var(--muted); font-size: .9375rem; }
.ace-rien .ic { color: var(--ds-rendu); }

.ace-cote { display: grid; gap: 24px; min-width: 0; }
.ace .acp-carte.ace-calcul { position: relative; overflow: hidden; padding: 24px; gap: 12px; border-radius: var(--ace-rayon); }
.ace-calcul .acp-score { font-size: 1.75rem; }
.ace-calcul .acp-jauge { height: 14px; }
.ace-calcul .acp-paliers { font-size: .75rem; }
.ace-calcul .acp-gouter { padding: 10px 12px; font-size: .875rem; }
.ace-calcul-pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 0;
  font-size: .8125rem; color: var(--acp-or); }
.ace-calcul-pied b { color: var(--acp-or-fonce); font-weight: 600; }
.ace-calcul-pied a { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--acp-or-fonce); }
.ace-note { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); color: var(--text); }
.ace-note:hover { text-decoration: none; background: var(--ds-survol); }
.ace-note-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--ds-bleu); color: #fff; }
.ace-note-txt { flex: 1; min-width: 0; display: grid; }
.ace-note-txt b { font-size: .9375rem; line-height: 1.3; }
.ace-note-txt span { font-size: .75rem; color: var(--muted); }
.ace-note-val { font-size: 1.25rem; font-weight: 700; color: var(--ds-bleu); }
.ace-note-val span { font-size: .75rem; font-weight: 500; color: var(--muted); }
.ace-remarque { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 16px; background: var(--ds-filiere-bg);
  color: var(--text); font-size: .875rem; line-height: 1.45; }
.ace-remarque:hover { text-decoration: none; }
.ace-remarque b { color: var(--ds-filiere); }
.ace-remarque-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ds-filiere); color: var(--surface); }

.ace-outils { display: grid; gap: 16px; }
.ace-section-tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; }
.ace-section-tete h2 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.ace-section-tete > p { margin: 0; font-size: .8125rem; color: var(--muted); }
.ace-surtitre { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: .6875rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ds-filiere); }
.ace .outils { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.ace .outil { border-radius: var(--ace-rayon); padding: 24px; }

.ace-binome { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; padding: 28px 32px; }
.ace-binome-ic { flex: none; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--ds-rendu-bg); color: var(--ds-rendu); }
.ace-binome-txt { flex: 1 1 360px; min-width: 0; }
.ace-binome-txt .ace-surtitre { color: var(--ds-rendu); }
.ace-binome-txt h2 { margin: 0 0 4px; font-size: 1.25rem; font-weight: 700; }
.ace-binome-txt > p:last-child { margin: 0; color: var(--muted); }
.ace-binome-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 640px) { .ace-hero, .ace-binome { padding: 20px; } .ace-carte, .ace .acp-carte.ace-calcul { padding: 18px; } .ace-hero h1 { font-size: 1.5rem; } }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .outil-ic { background: color-mix(in srgb, var(--tc) 24%, transparent); } }
:root[data-theme="dark"] .outil-ic { background: color-mix(in srgb, var(--tc) 24%, transparent); }

/* ================================================================ Accueil prof « sur un seul écran » (maquette Stitch compacte)
   3 cartes (matin · progression · Défi Calcul) puis 10 tuiles en 2 rangées de 5, sans défiler en 1440×900. */
main:has(.acp) { max-width: 1440px; }
@media (min-width: 900px) { main:has(.acp) { padding-bottom: 24px; } }
.acp, .ace { --acp-or-fond: #fff8eb; --acp-or-clair: #fdecc8; --acp-or: #b45309; --acp-or-fonce: #78350f; --acp-or-btn: #d97706; }
.acp { display: grid; gap: 14px; }
.acp-haut { display: grid; gap: 14px; align-items: stretch; }
@media (min-width: 1100px) {
  .acp-haut { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .acp-matin { grid-column: span 2; }
  .acp-haut:not(:has(.acp-prog)) .acp-matin, .acp-haut:not(:has(.acp-calcul)) .acp-matin { grid-column: span 3; }
  .acp-haut:not(:has(.acp-prog)):not(:has(.acp-calcul)) .acp-matin { grid-column: span 4; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .acp-haut { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acp-matin { grid-column: 1 / -1; }
}
.acp-carte { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1); position: relative; overflow: hidden; }
.acp-carte h1 { font-size: 1.25rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.008em; margin: 0; }
.acp-carte h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .9375rem; font-weight: 600; letter-spacing: -0.004em; min-width: 0; }
.acp-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.acp .chip { min-height: 20px; padding: 2px 8px; font-size: .625rem; white-space: nowrap; }
.acp .chip-bleu { background: var(--primary-soft); color: var(--ds-bleu); }

/* carte du matin */
.acp-matin::before { content: ""; position: absolute; right: -64px; top: -64px; width: 192px; height: 192px; border-radius: 50%;
  background: color-mix(in srgb, var(--ds-filiere) 12%, transparent); filter: blur(32px); pointer-events: none; }
.acp-matin > * { position: relative; }
.acp-pastilles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; }
.acp-semaine { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--ds-bleu);
  font-size: .6875rem; font-weight: 600; letter-spacing: .02em; }
.acp-semaine .acp-point { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.acp-lieu { font-size: .75rem; color: var(--muted); }
.acp-sous { margin: 2px 0 0; font-size: .8125rem; color: var(--muted); line-height: 1.35; }
.acp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.acp-actions .btn { padding: 6px 12px; border: 0; color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.acp-btn-vert { background: #336100; } .acp-btn-vert:hover { background: #244700; }
.acp-btn-prune { background: #894878; } .acp-btn-prune:hover { background: var(--ds-plum); }
.acp-btn-reglage { background: #3f4a5a; } .acp-btn-reglage:hover { background: #2b3440; }
.acp-minis { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.acp-minis > li { display: flex; min-width: 0; }
.acp-mini { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 9px 10px; border-radius: 12px; background: var(--surface-2); color: var(--text); transition: background .15s; }
.acp-mini:hover { text-decoration: none; background: var(--ds-survol); }
.acp-mini-haut { display: flex; align-items: center; justify-content: space-between; gap: 4px; flex-wrap: wrap; }
.acp-mini-haut b { font-size: .8125rem; font-weight: 700; }
.acp-mini-bas { display: flex; align-items: center; gap: 5px; font-size: .6875rem; line-height: 1.3; color: var(--muted); min-width: 0; }
.acp-mini-bas .ic { flex: none; }

/* carte progression */
.acp-classe-nom { padding: 1px 8px; border-radius: 999px; background: var(--neutral-soft); color: var(--muted); font-size: .6875rem; font-weight: 600; }
.acp-prog h2 .ic { color: var(--ds-bleu); }
.acp-prog-corps { display: flex; align-items: center; gap: 12px; flex: 1; }
.acp-anneau { position: relative; flex: none; width: 84px; height: 84px; display: grid; place-items: center; }
.acp-anneau svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.acp-anneau circle { fill: none; stroke-width: 3.2; }
.acp-anneau-fond { stroke: var(--neutral-soft); }
.acp-anneau-val { stroke: var(--ds-bleu); stroke-linecap: round; }
.acp-anneau-txt { display: grid; justify-items: center; line-height: 1; }
.acp-anneau-txt b { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
.acp-anneau-txt span { margin-top: 3px; font-size: .5625rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.acp-chiffres { flex: 1; min-width: 0; margin: 0; display: grid; gap: 4px; }
.acp-chiffres > div { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: .6875rem; color: var(--muted); }
.acp-chiffres dd { margin: 0; font-weight: 600; color: var(--text); white-space: nowrap; }
.acp-chiffres .acp-chiffre-fort { display: block; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); }
.acp-chiffre-fort dt { font-size: .5625rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.acp-chiffre-fort dd { font-size: .875rem; font-weight: 700; }
.acp-chiffre-fort dd span { font-size: .6875rem; font-weight: 400; color: var(--muted); }
.acp-vide { margin: 0; flex: 1; font-size: .8125rem; color: var(--muted); }
.acp-lien { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding: 7px 12px; border-radius: 12px;
  background: var(--surface-2); color: var(--ds-bleu); font-size: .8125rem; font-weight: 600; transition: background .15s; }
.acp-lien:hover { text-decoration: none; background: var(--primary-soft); }
/* carte étroite (écran de 1150 px, ex. 1440 px à 125 %) : pastille sous le titre, anneau réduit, chiffres empilés */
.acp-matin, .acp-prog, .acp-calcul { container-type: inline-size; }
@container (max-width: 520px) {
  .acp-minis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .acp-mini { padding: 7px 8px; }
  .acp-mini-haut { display: grid; justify-items: start; gap: 3px; }
  .acp-mini-haut b { white-space: nowrap; }
}
/* carte « Bonjour » étroite (à gauche de l'emploi du temps) : raccourcis 2 × 2, nombre et pastille sur une ligne */
@container (max-width: 360px) {
  .acp-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acp-mini-haut { display: flex; justify-content: space-between; }
}
/* écran peu haut (portable à 125 %) : marges resserrées pour tout garder sans défiler */
@media (min-width: 900px) and (max-height: 820px) {
  main:has(.acp) { padding-top: 14px; padding-bottom: 12px; }
  .acp, .acp-haut { gap: 10px; }
  .acp-carte { padding: 12px 14px; gap: 8px; }
  .acp-tuiles { gap: 8px; }
  .acp-tuile { padding: 7px 10px; }
}
@container (max-width: 220px) {
  .acp-tete { flex-wrap: wrap; row-gap: 4px; }
  .acp-prog-corps { gap: 10px; }
  .acp-anneau { width: 64px; height: 64px; }
  .acp-anneau-txt b { font-size: .9375rem; }
  .acp-chiffres > div { display: grid; gap: 0; }
  .acp-lien { padding: 6px 10px; }
  .acp-paliers { flex-wrap: wrap; }
  .acp .acp-btn-rituel { padding: 7px 10px; font-size: .875rem; }
}

/* emploi du temps de la semaine (Pronote) : à droite des cartes « Bonjour » et Défi Calcul */
@media (min-width: 1100px) {
  .acp-haut:has(.acp-edts) { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.6fr); }
  .acp-haut:has(.acp-edts) > :is(.acp-matin, .acp-calcul) { grid-column: 1; }
  .acp-haut:has(.acp-edts) > .acp-edts { grid-column: 2; grid-row: 1 / span 2; }
}
@media (min-width: 700px) and (max-width: 1099px) { .acp-edts { grid-column: 1 / -1; } }
.edt-t-bleu { --edt: #2748c9; } .edt-t-vert { --edt: #2b8a3e; } .edt-t-prune { --edt: #894878; } .edt-t-orange { --edt: #d9480f; }
.edt-t-sarcelle { --edt: #0c8599; } .edt-t-gris { --edt: #6e6e73; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.edt-t-bleu, .edt-t-vert, .edt-t-prune, .edt-t-orange, .edt-t-sarcelle, .edt-t-gris) { --edt-ink: var(--text); } }
:root[data-theme="dark"] :is(.edt-t-bleu, .edt-t-vert, .edt-t-prune, .edt-t-orange, .edt-t-sarcelle, .edt-t-gris) { --edt-ink: var(--text); }
.acp-carte.acp-edts { align-self: start; gap: 6px; padding: 12px 14px; }
.acp-edts h2 .ic { color: var(--ds-bleu); }
.acp-edts-note { font-size: .625rem; color: var(--faint); white-space: nowrap; }
.edt-defile { overflow-x: auto; min-width: 0; }
/* rangées à la hauteur du texte (classe + matière) ; 11h40-12h35 replié quand aucun cours ne l'occupe */
.edt-grille { display: grid; min-width: 440px; grid-template-columns: 34px repeat(5, minmax(0, 1fr));
  grid-template-rows: auto repeat(4, minmax(30px, auto)) 12px repeat(5, minmax(30px, auto)); }
.edt-grille.sans-l4 { grid-template-rows: auto repeat(3, minmax(30px, auto)) 0 12px repeat(5, minmax(30px, auto)); }
.edt-grille.sans-l4 :is(.edt-heure, .edt-fond).edt-l4 { display: none; }
.edt-grille.edt-n6 { grid-template-columns: 34px repeat(6, minmax(0, 1fr)); }
.edt-c0 { grid-column: 2; } .edt-c1 { grid-column: 3; } .edt-c2 { grid-column: 4; } .edt-c3 { grid-column: 5; } .edt-c4 { grid-column: 6; } .edt-c5 { grid-column: 7; }
.edt-l1 { grid-row-start: 2; } .edt-l2 { grid-row-start: 3; } .edt-l3 { grid-row-start: 4; } .edt-l4 { grid-row-start: 5; }
.edt-l5 { grid-row-start: 7; } .edt-l6 { grid-row-start: 8; } .edt-l7 { grid-row-start: 9; } .edt-l8 { grid-row-start: 10; } .edt-l9 { grid-row-start: 11; }
.edt-f1 { grid-row-end: 3; } .edt-f2 { grid-row-end: 4; } .edt-f3 { grid-row-end: 5; } .edt-f4 { grid-row-end: 6; }
.edt-f5 { grid-row-end: 8; } .edt-f6 { grid-row-end: 9; } .edt-f7 { grid-row-end: 10; } .edt-f8 { grid-row-end: 11; } .edt-f9 { grid-row-end: 12; }
.edt-entete { grid-row: 1; padding: 0 0 4px; text-align: center; font-size: .6875rem; font-weight: 600; color: var(--muted); }
.edt-entete.is-aujourdhui { color: var(--ds-bleu); font-weight: 700; }
.edt-heure { grid-column: 1; display: grid; align-content: space-between; padding: 1px 0; font-size: .5625rem; line-height: 1.2; color: var(--faint); }
.edt-fond { border-top: 1px solid var(--ds-ligne); border-left: 1px solid var(--ds-ligne); }
.edt-fond.is-aujourdhui { background: color-mix(in srgb, var(--ds-bleu) 6%, transparent); }
.edt-pause { grid-row: 6; grid-column: 1 / -1; display: grid; place-items: center; font-size: .5rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint); background: var(--surface-2); border-radius: 5px; }
.edt-case { display: flex; gap: 2px; min-width: 0; padding: 1px 2px; }
.edt-cours { flex: 1; min-width: 0; display: grid; align-content: start; gap: 0; padding: 3px 6px; border-radius: 7px; border-left: 3px solid var(--edt);
  background: color-mix(in srgb, var(--edt) 11%, var(--surface)); font-size: .625rem; line-height: 1.25; color: var(--muted); }
.edt-cours-haut { display: flex; align-items: center; justify-content: space-between; gap: 3px; min-width: 0; }
.edt-cours b { font-size: .75rem; color: var(--edt-ink, var(--edt)); }
.edt-cours-m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edt-cours .chip { min-height: 13px; padding: 0 4px; font-size: .5rem; }
/* séance en cours : case pleine à la couleur de la matière, liseré et pastille « En cours » */
.edt-cours.is-en_cours { position: relative; z-index: 1; background: var(--edt); border-left-color: var(--edt); color: #fff;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--edt), var(--ds-shadow-2); }
.edt-cours.is-en_cours b { color: #fff; }
.edt-maintenant { flex: none; padding: 0 5px; border-radius: 999px; background: #fff; color: var(--edt); font-size: .5rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; line-height: 1.6; }
.edt-cours.is-passe { opacity: .55; }

/* carte Défi Calcul (dorée) */
.acp-calcul { background: var(--acp-or-fond); color: var(--acp-or-fonce); gap: 8px; }
.acp-calcul::after { content: ""; position: absolute; right: -24px; bottom: -24px; width: 112px; height: 112px; border-radius: 50%;
  background: color-mix(in srgb, var(--acp-or-btn) 22%, transparent); filter: blur(24px); pointer-events: none; }
.acp-calcul > * { position: relative; z-index: 1; }
.acp-calcul-ic { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--acp-or-clair); color: var(--acp-or-fonce); }
.acp-calcul h2 > span:last-child { display: grid; line-height: 1.2; min-width: 0; }
.acp-calcul-sur { font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--acp-or); }
.acp-calcul-classe { font-size: .6875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acp-calcul-pct { padding: 2px 8px; border-radius: 999px; background: var(--acp-or-clair); font-size: .6875rem; font-weight: 700; }
.acp-score { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1; }
.acp-score span { font-size: .8125rem; font-weight: 400; color: var(--acp-or); }
.acp-jauge { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border: 0; border-radius: 99px; overflow: hidden; background: var(--acp-or-clair); }
.acp-jauge::-webkit-progress-bar { background: var(--acp-or-clair); }
.acp-jauge::-webkit-progress-value { background: var(--acp-or-btn); border-radius: 99px; }
.acp-jauge::-moz-progress-bar { background: var(--acp-or-btn); border-radius: 99px; }
.acp-paliers { display: flex; justify-content: space-between; gap: 6px; margin: 0; font-size: .625rem; font-weight: 600; }
.acp-paliers .is-atteint::before { content: "✓ "; color: #336100; }
.acp-gouter { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 10px; border-radius: 12px; background: var(--acp-or-clair);
  font-size: .75rem; font-weight: 500; line-height: 1.3; }
.acp-gouter > span:first-child { font-size: 1.125rem; }
.acp-gouter b { color: var(--acp-or); }
.acp-prochaine { margin: auto 0 0; font-size: .6875rem; color: var(--acp-or); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acp-prochaine b { color: var(--acp-or-fonce); font-weight: 600; }
.acp-prochaine + .acp-btn-rituel { margin-top: 0; }
/* accueil prof : carte resserrée sur 3 lignes (titre + total, jauge, goûter et séance à côté du bouton) */
.acp-calcul-total { display: flex; align-items: baseline; gap: 8px; margin: 0; white-space: nowrap; }
.acp-calcul-bas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: auto; }
.acp-calcul-infos { flex: 1 1 160px; min-width: 0; display: grid; gap: 2px; }
.acp-calcul-bas .acp-gouter { padding: 0; background: none; }
.acp-calcul-bas .acp-gouter > span:first-child { font-size: .9375rem; }
.acp-calcul-bas .acp-prochaine { margin: 0; }
.acp .acp-calcul-bas .acp-btn-rituel { flex: 0 1 auto; margin: 0; padding: 7px 14px; white-space: nowrap; }
.acp-lien .acp-classe-nom { margin-left: 4px; }
.acp .acp-btn-rituel { margin-top: auto; justify-content: center; display: flex; align-items: center; gap: 6px; padding: 8px 12px;
  background: var(--acp-or-btn); border: 0; color: #fff; }
.acp .acp-btn-rituel:hover { background: var(--acp-or); }

/* tuiles compactes : rangées de 6 */
.acp-tuiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.acp-tuiles > li { display: flex; min-width: 0; }
/* picto devant le titre : nom sur la 1re ligne, niveau et description sur la 2de */
.acp-tuile { flex: 1; min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-areas: "ic nom" "ic bas";
  align-items: center; column-gap: 8px; row-gap: 3px; padding: 9px 10px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1); color: var(--text);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, border-color .25s; }
a.acp-tuile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--ds-shadow-2); border-color: color-mix(in srgb, var(--tc) 30%, transparent); }
.acp-tuile-ic { grid-area: ic; align-self: center; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--tc);
  background: color-mix(in srgb, var(--tc) 13%, transparent); transition: background .2s, color .2s; }
a.acp-tuile:hover .acp-tuile-ic { background: var(--tc); color: #fff; }
.acp-tuile .outil-badge { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; font-size: .5625rem; }
.acp-tuile-nom { grid-area: nom; align-self: end; min-width: 0; font-size: .8125rem; font-weight: 600; letter-spacing: -0.004em; line-height: 1.2; hyphens: auto;
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; transition: color .15s; }
.acp-tuile-bas { grid-area: bas; align-self: start; display: flex; align-items: center; gap: 6px; min-width: 0; }
a.acp-tuile:hover .acp-tuile-nom { color: var(--ds-bleu); }
.acp-tuile-desc { min-width: 0; font-size: .6875rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acp-tuile.is-bientot { background: transparent; box-shadow: none; border-style: dashed; border-color: var(--border-strong); opacity: .7; cursor: not-allowed; }
.acp-tuile.is-bientot .acp-tuile-ic { color: var(--faint); background: var(--neutral-soft); }
.acp-tuile.is-bientot .acp-tuile-nom, .acp-tuile.is-bientot .acp-tuile-desc { color: var(--faint); }

/* sombre : carte dorée en graphite chaud */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.acp, .ace) { --acp-or-fond: #2a2118; --acp-or-clair: rgba(251, 191, 36, .16); --acp-or: #fbbf24; --acp-or-fonce: #fde7b0; --acp-or-btn: #d97706; }
  :root:not([data-theme="light"]) .acp-tuile-ic { background: color-mix(in srgb, var(--tc) 24%, transparent); }
  :root:not([data-theme="light"]) .acp-btn-vert { background: #4d8a14; } :root:not([data-theme="light"]) .acp-btn-prune { background: #a4588f; } :root:not([data-theme="light"]) .acp-btn-reglage { background: #56637a; } }
:root[data-theme="dark"] :is(.acp, .ace) { --acp-or-fond: #2a2118; --acp-or-clair: rgba(251, 191, 36, .16); --acp-or: #fbbf24; --acp-or-fonce: #fde7b0; --acp-or-btn: #d97706; }
:root[data-theme="dark"] .acp-tuile-ic { background: color-mix(in srgb, var(--tc) 24%, transparent); }
:root[data-theme="dark"] .acp-btn-vert { background: #4d8a14; } :root[data-theme="dark"] .acp-btn-prune { background: #a4588f; } :root[data-theme="dark"] .acp-btn-reglage { background: #56637a; }

/* ================================================================ Projet / GO : tableau de bord (maquette Stitch)
   En-tête avec filtres et recherche, liste des binômes (8/12) à côté des échéances, de l'aperçu de la cohorte et des
   raccourcis (4/12). Les statuts reprennent les pastilles du design system (retard, à corriger, délai, à jour). */
main:has(.pgo) { max-width: 1440px; }
.pgo { display: grid; gap: 24px; }
.pgo-hero, .pgo-binome, .pgo-carte { background: var(--surface); border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1); }
.pgo-hero { position: relative; overflow: hidden; padding: 24px; border-radius: 20px; }
.pgo-hero::before, .pgo-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.pgo-hero::before { right: -64px; top: -64px; width: 320px; height: 320px; background: radial-gradient(circle, var(--primary-soft), transparent 70%); }
.pgo-hero::after { right: 160px; bottom: -80px; width: 256px; height: 256px; background: radial-gradient(circle, var(--ds-filiere-bg), transparent 70%); }
.pgo-hero > * { position: relative; }
.pgo-hero-haut { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.pgo-hero-texte { flex: 1 1 420px; min-width: 0; }
.pgo-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 8px; }
.pgo-serie { padding: 3px 10px; border-radius: 999px; background: var(--ds-filiere-bg); color: var(--ds-filiere); font-size: .6875rem; font-weight: 600; }
.pgo-annee { font-size: .8125rem; color: var(--muted); }
.pgo-hero h1 { margin: 0 0 4px; font-size: 2rem; line-height: 1.2; letter-spacing: -0.016em; }
.pgo-sous { margin: 0; max-width: 720px; color: var(--muted); }
.pgo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pgo-barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 8px;
  border-radius: 14px; background: var(--surface-2); }
.pgo-classes { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 2px 4px 8px;
  border-bottom: 1px solid var(--ds-ligne); }
.pgo-classes-lib { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); }
.pgo-classes button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: .8125rem; font-weight: 600; }
.pgo-classes button:hover { border-color: var(--ds-bleu); }
.pgo-classes button .num { font-weight: 500; color: var(--faint); }
.pgo-classes button[aria-pressed="true"] { background: var(--ds-bleu); border-color: var(--ds-bleu); color: #fff; }
.pgo-classes button[aria-pressed="true"] .num { color: rgba(255, 255, 255, .8); }
.pgo-filtres { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--neutral-soft); }
.pgo-filtres a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 9px; color: var(--muted); font-size: .8125rem; font-weight: 600; }
.pgo-filtres a:hover { text-decoration: none; color: var(--text); }
.pgo-filtres a[aria-current] { background: var(--surface); color: var(--text); box-shadow: var(--ds-shadow-1); }
.pgo-filtres .num { font-weight: 500; color: var(--faint); }
.pgo-point { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.f-retard .pgo-point { background: var(--ds-retard); } .f-corriger .pgo-point { background: var(--ds-corriger); } .f-delai .pgo-point { background: var(--ds-filiere); }
.pgo-recherche { position: relative; flex: 1 1 280px; max-width: 440px; display: flex; align-items: center; margin: 0; }
.pgo-recherche .ic { position: absolute; left: 12px; color: var(--faint); pointer-events: none; }
.pgo-recherche input { min-height: 38px; padding: 8px 12px 8px 38px; border-radius: 10px; background: var(--surface); }
.pgo > .callout { margin: 0; }

.pgo-grille { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1200px) { .pgo-grille { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); } }
.pgo-liste { display: grid; gap: 16px; min-width: 0; }
.pgo-liste-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.pgo-liste-tete h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.0625rem; font-weight: 700; }
.pgo-tri { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; color: var(--muted); }
/* Carte binôme compacte, sur deux lignes : numéro | élèves et organisation | statut | actions,
   puis l'étape en cours (code, titre, état, dernière activité) et l'avancement (barre + détail par phase). */
.pgo-liste { gap: 10px; }
.pgo-binome { --st: var(--ds-rendu); --st-bg: var(--ds-rendu-bg); display: grid; grid-template-columns: 36px minmax(0, 1fr) auto minmax(200px, auto);
  grid-template-areas: "num id statut actions" "num etape etape av"; align-items: center; gap: 6px 14px; padding: 12px 16px; border-radius: 16px;
  transition: box-shadow .2s; }
.pgo-binome:hover { box-shadow: var(--ds-shadow-2); }
.pgo-binome[hidden] { display: none; }
.pgo-binome.st-retard { --st: var(--ds-retard); --st-bg: var(--ds-retard-bg); }
.pgo-binome.st-corriger { --st: var(--ds-corriger); --st-bg: var(--ds-corriger-bg); }
.pgo-binome.st-delai { --st: var(--ds-filiere); --st-bg: var(--ds-filiere-bg); }
.pgo-num { grid-area: num; align-self: start; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--st-bg); color: var(--st); font-size: .875rem; font-weight: 700; }
.pgo-b-id { grid-area: id; min-width: 0; }
.pgo-b-id h3 { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgo-b-id h3 a { color: var(--text); }
.pgo-b-id p { margin: 1px 0 0; font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgo-org { font-weight: 600; color: var(--ds-bleu); }
.pgo-org.is-vide { font-weight: 500; font-style: italic; color: var(--faint); }
.pgo-statut { grid-area: statut; justify-self: end; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--st-bg);
  color: var(--st); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pgo-statut::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pgo-b-actions { grid-area: actions; display: flex; justify-content: flex-end; gap: 6px; }
.pgo-b-actions .btn { min-height: 32px; padding: 4px 12px; }
.pgo-b-etape { grid-area: etape; display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 6px 10px; border-radius: 10px;
  background: var(--surface-2); font-size: .8125rem; }
.pgo-b-titre { flex: 0 1 auto; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgo-b-etape .chip { flex: none; }
.pgo-quand { flex: none; margin-left: auto; font-size: .75rem; color: var(--faint); white-space: nowrap; }
.pgo-b-av { grid-area: av; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; }
.pgo-b-av progress { height: 6px; }
.pgo-b-av b { font-size: .8125rem; }
.pgo-b-phases { grid-column: 1 / -1; font-size: .6875rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 760px) {
  .pgo-binome { grid-template-columns: 36px minmax(0, 1fr) auto auto; grid-template-areas: "num id id statut" "etape etape etape etape" "av av actions actions"; }
  .pgo-b-av { width: auto; }
  .pgo-quand { display: none; }
}
.pgo-aucun { margin: 0; padding: 16px; border-radius: 14px; background: var(--surface-2); color: var(--muted); text-align: center; }

.pgo-cote { display: grid; gap: 20px; min-width: 0; }
@media (min-width: 1200px) { .pgo-cote { position: sticky; top: 76px; } }
/* Écran de portable (moins de 1200 px) : échéances et cohorte au-dessus de la liste, côte à côte ; les raccourcis
   (déjà dans la barre latérale) sont masqués. */
@media (max-width: 1199px) {
  .pgo-cote { order: -1; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; }
  .pgo-cote .pgo-carte:has(.pgo-raccourcis) { display: none; }
  .pgo-cote .pgo-anneau { width: 112px; height: 112px; }
  .pgo-cote .pgo-carte { gap: 10px; }
  .pgo-cote .pgo-echeances { gap: 8px; }
  .pgo-cote .pgo-echeances li:nth-child(n+4) { display: none; }
  .pgo-cote .pgo-echeances a { padding: 8px 10px; }
}
.pgo-carte { display: grid; gap: 14px; padding: 18px; border-radius: 18px; }
.pgo-carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pgo-carte-tete h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; font-weight: 700; }
.pgo-carte-tete h2 .ic { color: var(--ds-bleu); }
.pgo-lien { font-size: .8125rem; font-weight: 600; }
.pgo-vide { margin: 0; color: var(--muted); font-size: .875rem; }
.pgo-echeances, .pgo-raccourcis, .pgo-compteurs { list-style: none; margin: 0; padding: 0; }
.pgo-echeances { display: grid; gap: 10px; }
.pgo-echeances a, .pgo-raccourcis a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface-2); color: var(--text); }
.pgo-echeances a:hover, .pgo-raccourcis a:hover { text-decoration: none; background: var(--ds-survol); }
.pgo-date { flex: none; width: 48px; padding: 6px 0; border-radius: 12px; display: grid; justify-items: center; background: var(--primary-soft); color: var(--ds-bleu); }
.pgo-date b { font-size: 1.25rem; line-height: 1; }
.pgo-date span { font-size: .625rem; font-weight: 700; letter-spacing: .06em; }
.pgo-date.is-proche { background: var(--ds-retard-bg); color: var(--ds-retard); }
.pgo-ech-txt { display: grid; gap: 2px; min-width: 0; font-size: .75rem; color: var(--muted); }
.pgo-ech-txt b { font-size: .875rem; line-height: 1.3; color: var(--text); }
.pgo-ech-quand { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.pgo-date.is-proche + .pgo-ech-txt .pgo-ech-quand { color: var(--ds-retard); }
.pgo-anneau { position: relative; width: 148px; height: 148px; margin: 0 auto; }
.pgo-anneau svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pgo-anneau circle { fill: none; stroke-width: 3.5; }
.pgo-anneau-fond { stroke: var(--neutral-soft); }
.pgo-anneau-val { stroke: var(--ds-vert); stroke-linecap: round; }
.pgo-anneau-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.pgo-anneau-txt b { font-size: 1.625rem; line-height: 1.1; }
.pgo-anneau-txt span { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pgo-compteurs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pgo-compteurs li > *, .pgo-compteurs li { border-radius: 12px; }
.pgo-compteurs li { --c: var(--ds-rendu); --c-bg: var(--ds-rendu-bg); background: var(--c-bg); color: var(--c); }
.pgo-compteurs li.c-corriger { --c: var(--ds-corriger); --c-bg: var(--ds-corriger-bg); }
.pgo-compteurs li.c-retard { --c: var(--ds-retard); --c-bg: var(--ds-retard-bg); }
.pgo-compteurs li, .pgo-compteurs a { display: grid; justify-items: center; padding: 8px 4px; }
.pgo-compteurs li:has(a) { padding: 0; }
.pgo-compteurs a { color: inherit; } .pgo-compteurs a:hover { text-decoration: none; }
.pgo-compteurs b { font-size: 1.25rem; line-height: 1.2; }
.pgo-compteurs span { font-size: .6875rem; font-weight: 600; }
.pgo-raccourcis { display: grid; gap: 8px; }
.pgo-raccourcis a > span:nth-child(2) { flex: 1; display: grid; min-width: 0; font-size: .75rem; color: var(--muted); }
.pgo-raccourcis b { font-size: .875rem; color: var(--text); }
.pgo-raccourcis a > .ic:last-child { color: var(--faint); }
.pgo-r-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--ds-bleu); }
@media (max-width: 640px) { .pgo-hero { padding: 18px; } .pgo-hero h1 { font-size: 1.5rem; } }

/* ================================================================ Projet / GO : espace élève (maquette Stitch)
   En-tête, carte « Mon binôme » (organisation, avancement par phase, membres), tâches et livrables (8/12) à côté des
   évaluations, des retours du professeur et d'une fiche d'aide (4/12). */
main:has(.gos) { max-width: 1440px; }
.gos { display: grid; gap: 24px; }
.gos-hero, .gos-carte, .gos-tache { background: var(--surface); border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1); }
.gos-hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px; border-radius: 20px; }
.gos-hero::before { content: ""; position: absolute; right: -64px; top: -64px; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, var(--ds-filiere-bg), transparent 70%); pointer-events: none; }
.gos-hero > * { position: relative; }
.gos-hero-texte { flex: 1 1 380px; min-width: 0; }
.gos-eyebrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.gos-bac, .gos-classe { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .6875rem; font-weight: 600; }
.gos-bac { background: var(--ds-filiere-bg); color: var(--ds-filiere); }
.gos-classe { background: var(--ds-rendu-bg); color: var(--ds-rendu); }
.gos-hero h1 { margin: 0 0 4px; font-size: 2rem; line-height: 1.2; letter-spacing: -0.016em; }
.gos-sous { margin: 0; color: var(--muted); }
.gos-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gos > .callout { margin: 0; }
.gos-surtitre { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: .6875rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }

.gos-carte { display: grid; gap: 14px; padding: 20px; border-radius: 18px; min-width: 0; }
.gos-sans-binome { grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; }
.gos-sans-binome h2 { margin: 0 0 4px; } .gos-sans-binome p:last-child { margin: 0; color: var(--muted); }
.gos-gros-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--ds-bleu); }
@media (max-width: 640px) { .gos-sans-binome { grid-template-columns: 1fr; } }

.gos-binome { grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 20px; }
@media (max-width: 899px) { .gos-binome { grid-template-columns: 1fr; } }
.gos-binome-projet h2 { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--ds-bleu); }
.gos-binome-projet .gos-surtitre .ic { color: var(--ds-bleu); }
.gos-binome-sous { margin: 2px 0 14px; font-size: .875rem; color: var(--muted); }
.gos-avancement { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.gos-av-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0; font-size: .8125rem; font-weight: 600; }
.gos-av-tete span { display: inline-flex; align-items: center; gap: 6px; } .gos-av-tete .ic { color: var(--ds-vert); }
.gos-avancement progress { height: 10px; }
.gos-avancement progress::-webkit-progress-value { background: var(--ds-bleu); }
.gos-phases { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: .75rem; color: var(--muted); }
.gos-phases b, .gos-moi b { color: var(--text); }
.gos-moi { margin: 0; font-size: .75rem; color: var(--muted); }
.gos-membres { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.gos-membres ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gos-membres li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface); font-size: .9375rem; }
.gos-moi-tag { padding: 1px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--ds-bleu); font-size: .6875rem; font-weight: 700; }
.gos-membres-pied { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin: auto 0 0; font-size: .8125rem; font-weight: 600; }
.gos-membres-pied a { display: inline-flex; align-items: center; gap: 5px; }

.gos-grille { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1200px) { .gos-grille { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); } }
.gos-taches { display: grid; gap: 12px; min-width: 0; }
.gos-taches-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.gos-taches-tete h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.0625rem; font-weight: 700; }
.gos-lien { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; font-weight: 600; }
.gos-tache { --t: var(--ds-bleu); --t-bg: var(--primary-soft); display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: 16px;
  transition: box-shadow .2s; }
.gos-tache:hover { box-shadow: var(--ds-shadow-2); }
.gos-tache.s-verrouillee { --t: var(--ds-retard); --t-bg: var(--ds-retard-bg); border-color: color-mix(in srgb, var(--ds-retard) 30%, transparent); }
.gos-tache.s-a_reprendre { --t: var(--ds-corriger); --t-bg: var(--ds-corriger-bg); }
.gos-tache.s-rendue { --t: var(--ds-filiere); --t-bg: var(--ds-filiere-bg); }
.gos-tache.s-validee { --t: var(--ds-rendu); --t-bg: var(--ds-rendu-bg); }
.gos-tache.s-a_venir { --t: var(--faint); --t-bg: var(--neutral-soft); box-shadow: none; background: transparent; border-style: dashed; border-color: var(--border-strong); }
.gos-tache-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--t-bg); color: var(--t); }
.gos-tache-corps { flex: 1; min-width: 0; display: grid; gap: 4px; }
.gos-tache-haut { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: .75rem; color: var(--muted); }
.gos-tache-haut > span:not(.chip) { display: inline-flex; align-items: center; gap: 4px; }
.gos-tache-quand { margin-left: auto; }
.gos-tache h3 { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.35; }
.gos-tache h3 a { color: var(--text); }
.gos-tache.s-a_venir h3 a { color: var(--muted); }
.gos-tache-resume { margin: 0; font-size: .875rem; color: var(--muted); line-height: 1.45; }
.gos-tache-info { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: .8125rem; color: var(--ds-filiere); }
.gos-tache-fin { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.gos-note { display: grid; justify-items: center; min-width: 72px; padding: 6px 10px; border-radius: 12px; background: var(--ds-rendu-bg); color: var(--ds-rendu); }
.gos-note b { font-size: 1.25rem; line-height: 1.1; } .gos-note span { font-size: .6875rem; font-weight: 600; }
@media (max-width: 640px) { .gos-tache { flex-wrap: wrap; } .gos-tache-fin { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
  .gos-tache-quand { margin-left: 0; } .gos-hero h1 { font-size: 1.5rem; } }
.gos-vide { margin: 0; color: var(--muted); font-size: .875rem; }

.gos-cote { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.gos-carte > * { min-width: 0; }
@media (max-width: 1199px) { .gos-cote { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: start; } }
.gos-carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gos-carte-tete h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; font-weight: 700; }
.gos-carte-tete h2 .ic { color: var(--ds-bleu); }
.gos-moyenne { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--primary-soft); }
.gos-moyenne-val { flex: none; white-space: nowrap; }
.gos-moyenne-val b { font-size: 2rem; line-height: 1; color: var(--ds-bleu); }
.gos-moyenne-val span { margin-left: 4px; font-size: .875rem; color: var(--muted); }
.gos-moyenne-txt { font-size: .75rem; color: var(--muted); }
.gos-notes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.gos-notes b { flex: none; white-space: nowrap; }
.gos-notes a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: .8125rem; }
.gos-notes a:hover, .gos-retour:hover { text-decoration: none; background: var(--ds-survol); }
.gos-notes .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gos-notes b span { font-weight: 500; color: var(--muted); }
.gos-retour { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface-2); color: var(--text); }
.gos-retour .grow { display: grid; gap: 2px; min-width: 0; }
.gos-retour-tete { font-size: .75rem; color: var(--muted); } .gos-retour-tete b { color: var(--text); }
.gos-retour-txt { font-size: .875rem; font-style: italic; line-height: 1.45; }
.gos-fiche { background: var(--ds-bleu); border-color: transparent; color: #fff; gap: 8px; }
.gos-fiche .gos-surtitre { color: rgba(255, 255, 255, .75); }
.gos-fiche h2 { margin: 0; font-size: 1.125rem; font-weight: 700; color: #fff; }
.gos-fiche p { margin: 0; font-size: .875rem; color: rgba(255, 255, 255, .85); }
.gos-fiche .gos-fiche-liens { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.gos-fiche-liens a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; background: rgba(255, 255, 255, .16);
  color: #fff; font-size: .8125rem; font-weight: 600; }
.gos-fiche-liens a:hover { text-decoration: none; background: rgba(255, 255, 255, .26); }
.gos > #push-card { margin: 0; }

/* ================================================================ Quiz : projection au TNI (maquette Stitch) */
.proj-v2 { background: none; border: 0; box-shadow: none; padding: 0; display: grid; gap: 20px; }
.proj-barre-haut { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap;
  padding: 14px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1); }
.proj-ident { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.proj-direct { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--ds-filiere-bg); color: var(--ds-filiere);
  font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.proj-pulse { width: 9px; height: 9px; border-radius: 50%; background: #e11d48; animation: proj-pulse 1.6s ease-in-out infinite; }
@keyframes proj-pulse { 50% { opacity: .35; transform: scale(.8); } }
.proj-classe { padding: 4px 10px; border-radius: 8px; background: var(--ds-bleu); color: #fff; font-size: .8125rem; font-weight: 600; }
.proj-titre { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.008em; }
.proj-v2 .proj-num { padding: 3px 10px; border-radius: 999px; background: var(--neutral-soft); color: var(--muted); font-size: .75rem; font-weight: 600; }
.proj-v2 .proj-num:empty { display: none; }
.proj-participation { display: grid; justify-items: end; gap: 6px; }
.proj-v2 .proj-compte { font-size: .875rem; font-weight: 500; color: var(--text); }
.proj-jauge { -webkit-appearance: none; appearance: none; width: 180px; height: 8px; border: 0; border-radius: 99px; overflow: hidden; background: var(--neutral-soft); }
.proj-jauge::-webkit-progress-bar { background: var(--neutral-soft); }
.proj-jauge::-webkit-progress-value { background: var(--ds-vert); border-radius: 99px; }
.proj-jauge::-moz-progress-bar { background: var(--ds-vert); border-radius: 99px; }

.proj-centre { display: grid; gap: 20px; align-items: stretch; }
@media (min-width: 1000px) { .proj-centre { grid-template-columns: minmax(0, 1fr) 260px; } }
.proj-carte-q, .proj-carte-chrono { border-radius: 20px; background: var(--surface); border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-2); }
.proj-carte-q { padding: 32px 36px; display: flex; flex-direction: column; justify-content: center; min-height: 200px; }
.proj-v2 .proj-question { font-size: clamp(1.6rem, 2.9vw, 2.6rem); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.proj-consigne { margin: 18px 0 0; color: var(--muted); font-size: .9375rem; }
.proj-consigne:empty { display: none; }
.proj-carte-chrono { position: relative; display: grid; place-items: center; padding: 20px; min-height: 200px; }
.proj-anneau { width: 176px; height: 176px; transform: rotate(-90deg); grid-area: 1 / 1; }
.proj-anneau circle { fill: none; stroke-width: 12; }
.proj-anneau-fond { stroke: var(--neutral-soft); }
.proj-anneau-val { stroke: var(--ds-bleu); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.proj-anneau-val.is-urgent { stroke: #e11d48; }
.proj-v2 .proj-chrono { grid-area: 1 / 1; background: none; color: var(--text); width: auto; height: auto; min-width: 0; border-radius: 0;
  font-size: 3rem; font-weight: 700; letter-spacing: -0.03em; font-feature-settings: "tnum" 1; margin-top: -14px; }
.proj-v2 .proj-chrono.is-urgent { background: none; color: #e11d48; }
.proj-chrono-unite { grid-area: 1 / 1; margin-top: 52px; font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.proj-carte-chrono.is-inactif .proj-anneau, .proj-carte-chrono.is-inactif .proj-chrono-unite { opacity: .25; }

.proj-v2 .proj-choix { gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.proj-v2 .proj-choix li { --lc: var(--ds-bleu); display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 150px;
  padding: 24px 26px; border-radius: 20px; border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1);
  background: linear-gradient(color-mix(in srgb, var(--lc) 6%, transparent), color-mix(in srgb, var(--lc) 6%, transparent)), var(--surface);
  font-size: clamp(1.15rem, 1.8vw, 1.55rem); font-weight: 600; line-height: 1.3; transition: opacity .3s, box-shadow .3s; }
.proj-v2 .proj-choix li.proj-choix-0 { --lc: #2748c9; } .proj-v2 .proj-choix li.proj-choix-1 { --lc: #894878; } .proj-v2 .proj-choix li.proj-choix-2 { --lc: #336100; }
.proj-v2 .proj-choix li.proj-choix-3 { --lc: #6e6e73; } .proj-v2 .proj-choix li.proj-choix-4 { --lc: #d9480f; } .proj-v2 .proj-choix li.proj-choix-5 { --lc: #0b7285; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .proj-v2 .proj-choix li.proj-choix-1 { --lc: #c77bb4; } :root:not([data-theme="light"]) .proj-v2 .proj-choix li.proj-choix-2 { --lc: #6aae2a; } }
:root[data-theme="dark"] .proj-v2 .proj-choix li.proj-choix-1 { --lc: #c77bb4; } :root[data-theme="dark"] .proj-v2 .proj-choix li.proj-choix-2 { --lc: #6aae2a; }
.proj-choix-haut { display: flex; align-items: center; gap: 18px; }
.proj-v2 .proj-lettre { flex: none; width: 60px; height: 60px; border-radius: 16px; background: var(--lc) !important; color: #fff; font-size: 1.9rem; font-weight: 800;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--lc) 35%, transparent); }
.proj-choix-bas { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: .875rem; font-weight: 500; color: var(--muted); }
.proj-v2 .proj-n { color: var(--lc); font-weight: 700; font-size: 1rem; grid-row: auto; grid-column: auto; }
.proj-v2 .proj-barre { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border: 0; border-radius: 99px; overflow: hidden; background: var(--neutral-soft); }
.proj-v2 .proj-barre::-webkit-progress-bar { background: var(--neutral-soft); }
.proj-v2 .proj-barre::-webkit-progress-value { background: var(--lc); border-radius: 99px; }
.proj-v2 .proj-barre::-moz-progress-bar { background: var(--lc); border-radius: 99px; }
.proj-v2 .proj-choix li.is-ok { box-shadow: 0 0 0 4px var(--ds-vert), var(--ds-shadow-2); background: var(--surface); }
.proj-v2 .proj-choix li.is-faux { opacity: .4; }
.proj-v2 .proj-explication { margin: 0; padding: 20px 24px; border-radius: 18px; background: color-mix(in srgb, var(--ds-vert) 16%, var(--surface)); color: var(--text); font-weight: 500; font-size: 1.0625rem; }
.proj-pied { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1); }
.proj-majorite { margin: 0; font-weight: 600; color: var(--muted); }
.proj-majorite:empty::before { content: "Les résultats s'affichent quand vous révélez la solution."; font-weight: 400; }
.proj-v2 .proj-boutons { margin: 0; }
.proj-v2 .proj-boutons .btn { min-height: 48px; padding: 12px 22px; font-size: 1rem; }
.proj-v2 .podium { padding: 20px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1); margin: 0; }
.proj-v2 .podium-liste { max-width: none; }
.proj-v2 .podium-liste li { background: var(--surface-2); }

/* ================================================================ Page d'un QCM : questions (maquette Stitch) */
.questions .qcard { padding: 22px 24px; gap: 16px; }
.questions .qnum { flex: none; display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 10px;
  background: var(--primary-soft); color: var(--ds-bleu); font-weight: 700; font-size: .875rem; font-feature-settings: "tnum" 1; }
.questions .qcard-enonce { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.006em; line-height: 1.35; margin: 4px 0 14px; }
.questions .qcard-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; margin: 0 0 12px; font-size: .9375rem; }
.questions .qcard-choix li { align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--ds-card-border); }
.qc-lettre { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--surface);
  border: 1px solid var(--border-strong); color: var(--muted); font-size: .75rem; font-weight: 700; }
.qc-txt { flex: 1; min-width: 0; }
.questions .qcard-choix li.is-ok { background: color-mix(in srgb, var(--ds-vert) 22%, var(--surface)); border-color: color-mix(in srgb, var(--ds-vert) 55%, transparent); color: var(--text); font-weight: 600; }
.questions .qcard-choix li.is-ok .qc-lettre { background: #2b5a00; border-color: #2b5a00; color: #fff; }
.questions .qcard-choix .qc-ok { color: #2b5a00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .questions .qcard-choix .qc-ok { color: var(--ds-vert); } :root:not([data-theme="light"]) .questions .qcard-choix li.is-ok .qc-lettre { background: var(--ds-vert); border-color: var(--ds-vert); color: #10200a; } }
:root[data-theme="dark"] .questions .qcard-choix .qc-ok { color: var(--ds-vert); }
:root[data-theme="dark"] .questions .qcard-choix li.is-ok .qc-lettre { background: var(--ds-vert); border-color: var(--ds-vert); color: #10200a; }
.qc-expl { margin: 0 0 10px; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); font-size: .875rem; line-height: 1.5; color: var(--text); }
.qc-expl b { display: block; margin-bottom: 2px; font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ds-bleu); }
.questions.is-compacte .qc-expl { display: none; }
.questions.is-compacte .qnum { min-width: 28px; height: 28px; }
.questions.is-compacte .qcard-enonce { margin: 0; font-size: .9375rem; }

/* ================================================================ Progression (maquette Stitch) */
.prog-table-wrap { border-radius: 18px; border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1); }
.prog-table thead th { background: var(--surface-2); font-size: .6875rem; letter-spacing: .04em; color: var(--muted); }
.prog-table td, .prog-table tbody th { border-bottom-color: var(--ds-ligne); }
.prog-table td + td, .prog-table th + td { border-left-color: var(--ds-ligne); }
.prog-table tbody tr:hover > td { background: color-mix(in srgb, var(--ds-bleu) 3%, transparent); }
.pt-code { color: var(--ds-bleu); font-weight: 700; font-feature-settings: "tnum" 1; }
.pt-select { border-radius: 999px; font-weight: 600; }
.pt-select.st-vu { background-color: var(--ds-rendu-bg); color: var(--ds-rendu); border-color: transparent; }
.pt-select.st-en_cours { background-color: var(--ds-corriger-bg); color: var(--ds-corriger); border-color: transparent; }
.pt-select.st-absent { background-color: var(--ds-retard-bg); color: var(--ds-retard); border-color: transparent; }
.prog-legende-box { border-radius: 16px; border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1); }

/* ================================================================ Densité sur ordinateur (demande de Ramzi, 27/10)
   Police un cran plus petite (la base rem passe de 16 à 14 px, le texte courant de 15 à 14 px) et espacements resserrés,
   à partir de 900 px. Le téléphone garde ses tailles ; les écrans projetés ou passés en classe (TNI, Défi Calcul,
   projection d'un travail, quiz élève) aussi, pour rester lisibles. */
@media (min-width: 900px) {
  html:has(> body:not(.tni, .projection, .page-tni, .mode-projection, .page-passer)) { font-size: 14px; }
  body:not(.tni, .projection, .page-tni, .mode-projection, .page-passer) { font-size: 14px; }
  main { padding: 16px 20px 32px; }
  h1, .page-head h1 { font-size: 1.75rem; }
  .page-head { margin-bottom: 12px; }
  .side-link { padding: 7px 10px; gap: 10px; }
  .side-title { padding: 10px 10px 4px; }
  .callout { padding: 10px 12px; }
  .btn { min-height: 38px; padding: 7px 14px; }
  .btn-sm { min-height: 32px; padding: 5px 11px; }
  input:not([type=checkbox]):not([type=radio]), select:not(.pt-select), .field input, .field select { min-height: 38px; padding-top: 7px; padding-bottom: 7px; }
  /* Accueils et Projet / GO : blocs plus serrés, titres moins hauts */
  .ace, .pgo, .gos { gap: 16px; }
  .ace-grille, .pgo-grille, .gos-grille { gap: 16px; }
  .ace-cote, .pgo-cote, .gos-cote { gap: 14px; }
  .ace-hero, .pgo-hero, .gos-hero { padding: 16px 20px; }
  .ace-hero h1, .pgo-hero h1, .gos-hero h1 { font-size: 1.75rem; }
  .pgo-hero-texte, .gos-hero-texte { flex-basis: 300px; }
  .pgo-barre { margin-top: 12px; padding: 6px; }
  .pgo-classes { padding-bottom: 6px; }
  .pgo-classes button { min-height: 30px; padding: 3px 10px; }
  .pgo-filtres a { padding: 5px 10px; }
  .pgo-recherche input { min-height: 34px; }
  .pgo-binome { padding: 10px 14px; gap: 5px 12px; }
  .pgo-liste, .gos-taches { gap: 8px; }
  .pgo-carte, .gos-carte, .ace-carte { padding: 14px 16px; gap: 10px; }
  .gos-tache { padding: 12px 14px; }
  .ace-binome { padding: 18px 20px; }
  .ace .outil { padding: 18px; }
}

/* ================================================================ Progression : en-tête et commandes compacts
   Une ligne de titre (classe en liste déroulante, dernière mise à jour), puis une seule barre de commandes en trois
   groupes : affichage et export | modification (prof) | légende des couleurs. Tableau resserré. */
.prg-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; }
.prg-tete h1 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 1.5rem; }
.prg-tete h1 .ic { color: #1c7ed6; }
.prg-classe { margin: 0; }
.prg-classe select { width: auto; min-width: 150px; min-height: 34px; padding: 4px 32px 4px 12px; border-radius: 999px; font-weight: 700;
  font-size: .9375rem; background-color: var(--surface); border: 1px solid var(--border-strong); cursor: pointer; }
.prg-maj { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; color: var(--muted); }
.prg-sous { flex-basis: 100%; margin: 0; color: var(--muted); }
.prg-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; padding: 6px 8px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1); }
.prg-groupe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.prg-groupe form { margin: 0; }
.prg-edition { padding-left: 10px; border-left: 1px solid var(--ds-ligne); }
.prg-barre .btn-sm, .prg-barre .prog-vue { min-height: 30px; padding: 3px 10px; font-size: .8125rem; }
.prg-barre .prog-vues { border-radius: 9px; }
.prg-barre .btn.is-on { background: var(--primary-soft); color: var(--ds-bleu); border-color: transparent; }
.prg-liste { display: grid; gap: 2px; width: 200px; padding: 6px; }
.prg-liste a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: .875rem; font-weight: 600; }
.prg-liste a:hover { text-decoration: none; background: var(--ds-survol); }
.prg-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 0 auto; padding: 0 6px; list-style: none;
  font-size: .75rem; font-weight: 600; color: var(--muted); }
.prg-legende li { display: inline-flex; align-items: center; gap: 5px; cursor: default; }
.prg-legende .lg { width: 4px; height: 14px; margin: 0; border-radius: 2px; }
@media (max-width: 899px) { .prg-edition { padding-left: 0; border-left: 0; } .prg-legende { margin-left: 0; } }
@media (min-width: 900px) {
  .prog-table thead th { padding: 8px; min-width: 180px; }
  .prog-table td, .prog-table tbody th { padding: 6px 8px; }
  .prog-table th.pt-sem { min-width: 116px; width: 116px; }
  .pt-pied { margin-top: 4px; }
  .pt-select { min-height: 26px; padding-top: 1px; padding-bottom: 1px; }
  .pt-btn { min-height: 26px; }
  .prog-defil { margin-bottom: 6px; }
}
/* Vue compacte : heures, liste d'avancement et crayon sur une seule ligne (la liste se rétrécit si la colonne est
   étroite) ; la ligne ne se replie que lorsque l'éditeur de la case est ouvert. */
.prog-table.is-compacte .pt-pied { flex-wrap: nowrap; }
.prog-table.is-compacte .pt-pied:has(.pt-edit[open]) { flex-wrap: wrap; }
.prog-table.is-compacte .pt-pied > span { flex: none; }
.prog-table.is-compacte .pt-valid { flex: 1 1 auto; min-width: 0; }
.prog-table.is-compacte .pt-select { width: 100%; min-width: 0; max-width: 130px; padding-left: 8px; padding-right: 20px; text-overflow: ellipsis; }
.prog-table.is-compacte .pt-pied > .pt-edit:not([open]) { flex: none; }
.prog-table.is-compacte .pt-sem .pt-avalider { position: absolute; left: 1px; top: 50%; width: 6px; height: 6px; margin: -3px 0 0; padding: 0;
  border-radius: 50%; background: var(--ds-corriger); font-size: 0; }

/* ================================================================ Projet / GO : en-tête compact (comme la Progression)
   Titre + classes à cocher (liste déroulante) + chiffres clés, puis une barre : filtres | recherche | actions. */
.pgo-tete h1 .ic { color: #3b5bdb; }
.pgo-classes-menu > summary { list-style: none; }
.pgo-classes-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; max-width: 340px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); font-weight: 700; font-size: .9375rem; cursor: pointer; user-select: none; }
.pgo-classes-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgo-classes-btn .ic:first-child { color: var(--muted); flex: none; }

.pgo-classes-menu[open] .pgo-classes-btn { border-color: var(--ds-bleu); box-shadow: var(--ds-ring); }

.prog-pop.pgo-classes-pop { width: 280px; padding: 10px; display: grid; gap: 2px; }
.pgo-classes-titre { margin: 0 4px 4px; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pgo-coche { display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .875rem; }
.pgo-coche:hover { background: var(--ds-survol); }
.pgo-coche input { width: 16px; height: 16px; min-height: 0; margin: 0; }
.pgo-coche .num { font-size: .75rem; font-weight: 500; color: var(--faint); }
.pgo-classes-actions { display: flex; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--ds-ligne); }
.pgo-etab { margin-left: auto; font-size: .75rem; color: var(--muted); }
.pgo-commandes { gap: 8px; }
.pgo-commandes .pgo-filtres { padding: 3px; }
.pgo-commandes .pgo-filtres a { padding: 4px 10px; font-size: .8125rem; }
.pgo-commandes .pgo-recherche { flex: 1 1 150px; max-width: 360px; }
@media (max-width: 1299px) { .pgo-etab { display: none; } }
.pgo-commandes .pgo-recherche input { min-height: 32px; padding-top: 4px; padding-bottom: 4px; font-size: .8125rem; }
.pgo-commandes .pgo-actions { margin-left: auto; }
.pgo-alerte { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 7px 12px; border-radius: 10px;
  background: var(--warn-soft); color: var(--warn); font-size: .8125rem; }
.pgo-alerte a { font-weight: 600; }
.pgo > .prg-tete, .pgo > .prg-barre { margin: 0; }
.pgo { gap: 12px; }
.pgo-chevron { flex: none; width: 7px; height: 7px; margin: -3px 2px 0 2px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .15s; }
.pgo-classes-menu[open] .pgo-chevron { margin-top: 3px; transform: rotate(-135deg); }

/* ================================================================ Défi Calcul : interrupteur Première / Terminale */
.dc-tete h1 .ic { color: #f76707; }
.dc-bascule { position: relative; display: inline-flex; padding: 3px; border-radius: 999px; background: var(--neutral-soft);
  border: 1px solid var(--border); }
.dc-bascule a { position: relative; z-index: 1; display: inline-flex; align-items: center; min-height: 30px; padding: 4px 16px; border-radius: 999px;
  color: var(--muted); font-size: .875rem; font-weight: 700; transition: color .2s, background-color .2s, box-shadow .2s; }
.dc-bascule a:hover { text-decoration: none; color: var(--text); }
.dc-bascule a[aria-current] { background: #f76707; color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.dc-tete .prg-sous { font-size: .8125rem; }

/* ================================================================ Défi Calcul : bibliothèque, parcours, création */
.dc-tete-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.dc-filtres select { width: auto; min-height: 32px; padding: 4px 28px 4px 10px; font-size: .8125rem; border-radius: 9px; }
.dc-filtres .pgo-recherche { flex: 1 1 200px; max-width: 360px; }
.dc-filtres .pgo-recherche input { min-height: 32px; padding-top: 4px; padding-bottom: 4px; font-size: .8125rem; }
.dc-biblio { display: grid; gap: 12px; }
.dc-defis { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.dc-defi { position: relative; display: flex; align-items: stretch; gap: 0; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--ds-card-border); box-shadow: var(--ds-shadow-1); transition: box-shadow .2s, border-color .2s; }
.dc-defi:hover { box-shadow: var(--ds-shadow-2); }
.dc-defi:has(input:checked) { border-color: #f76707; box-shadow: 0 0 0 2px color-mix(in srgb, #f76707 35%, transparent); }
.dc-defi-coche { flex: none; display: grid; place-items: center; width: 42px; margin: 0; cursor: pointer; border-right: 1px solid var(--ds-ligne); }
.dc-defi-coche input { width: 18px; height: 18px; min-height: 0; accent-color: #f76707; }
.dc-defi-corps { flex: 1; min-width: 0; display: grid; gap: 3px; padding: 10px 12px; color: var(--text); }
.dc-defi-corps:hover { text-decoration: none; }
.dc-defi-haut { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.dc-defi-haut .chip { font-size: .6875rem; }
.dc-defi-niv { font-size: .6875rem; font-weight: 600; color: var(--muted); margin-left: auto; }
/* Difficulté des défis (Bronze, Argent, Or) */
.dc-diff { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: .6875rem;
  font-weight: 700; letter-spacing: .02em; border: 1px solid transparent; white-space: nowrap; }
.dc-diff::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dc-diff-bronze { color: #9a5418; background: #fbeee2; border-color: #efcfb1; }
.dc-diff-argent { color: #55606e; background: #eef1f5; border-color: #d3d9e2; }
.dc-diff-or { color: #8a6400; background: #fff6d6; border-color: #f0dc8c; }
.dc-tete > .dc-diff { align-self: center; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dc-diff-bronze { color: #f0b47e; background: rgba(205, 127, 50, .16); border-color: rgba(205, 127, 50, .4); }
  :root:not([data-theme="light"]) .dc-diff-argent { color: #c9d1dc; background: rgba(170, 180, 195, .14); border-color: rgba(170, 180, 195, .35); }
  :root:not([data-theme="light"]) .dc-diff-or { color: #f5cf55; background: rgba(230, 180, 30, .15); border-color: rgba(230, 180, 30, .4); }
}
:root[data-theme="dark"] .dc-diff-bronze { color: #f0b47e; background: rgba(205, 127, 50, .16); border-color: rgba(205, 127, 50, .4); }
:root[data-theme="dark"] .dc-diff-argent { color: #c9d1dc; background: rgba(170, 180, 195, .14); border-color: rgba(170, 180, 195, .35); }
:root[data-theme="dark"] .dc-diff-or { color: #f5cf55; background: rgba(230, 180, 30, .15); border-color: rgba(230, 180, 30, .4); }
.dc-defi-titre { font-size: .9375rem; line-height: 1.3; }
.dc-defi-sous { font-size: .75rem; color: var(--muted); }
.dc-defi-notion { display: block; font-size: .6875rem; font-weight: 600; color: var(--ds-bleu);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-defi-notion .ic { vertical-align: -2px; margin-right: 2px; }
.dc-defi-voir { align-self: center; margin-right: 6px; }
.dc-attribuer { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: 14px; background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--ds-card-border);
  box-shadow: var(--ds-shadow-2); backdrop-filter: blur(10px); }
.dc-attribuer-lib { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .8125rem; }
.dc-attribuer .outil-check span { min-height: 30px; padding: 3px 10px; font-size: .8125rem; }

.dc-parcours { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.dc-etape { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--ds-card-border); }
.dc-etape .dc-n { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #fff3e6; color: #c2410c; font-weight: 800; font-size: .8125rem; }
.dc-etape-txt { flex: 1; min-width: 0; display: grid; }
.dc-etape-txt b { font-size: .875rem; }
.dc-etape-txt span { font-size: .75rem; color: var(--muted); }
.dc-etape .dc-pts { flex: none; min-width: 52px; text-align: right; font-weight: 700; }
.dc-etape .dc-pts.is-vide { color: var(--faint); }
.dc-etape-actions { flex: none; display: flex; gap: 2px; margin: 0; }
.dc-etape-actions .btn { min-height: 30px; padding: 3px 7px; }
.dc-retablir { margin: 0; }

.dc-fiche { display: grid; gap: 14px; align-items: start; }
@media (min-width: 1000px) { .dc-fiche { grid-template-columns: minmax(0, 1fr) 300px; } }
.dc-fiche-contenu { display: grid; gap: 10px; }
.dc-fiche-contenu h2 { margin: 0; }
.dc-consigne { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.dc-consigne p { margin: 0 0 6px; }
.dc-calculs { margin: 0; padding-left: 1.6em; display: grid; gap: 4px; }
.dc-calculs li { padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.dc-calcul-q { font-weight: 700; }
.dc-calcul-r { margin-left: 8px; font-weight: 800; color: var(--ds-rendu); }
.dc-calcul-a { margin-left: 10px; font-size: .8125rem; color: var(--muted); }
.dc-fiche-cote { display: grid; gap: 14px; }
.dc-fiche-carte { display: grid; gap: 8px; justify-items: start; }
.dc-fiche-carte h2 { margin: 0; font-size: 1rem; }
.dc-fiche-carte form { margin: 0; }

.dc-form { display: grid; gap: 14px; }
.dc-form-bloc { display: grid; gap: 10px; }
.dc-form-bloc h2 { margin: 0; font-size: 1rem; }
.dc-form-aide { font-size: .8125rem; font-weight: 500; }
.dc-form-ligne { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.dc-form-ligne .dc-grand { grid-column: span 2; }
@media (max-width: 640px) { .dc-form-ligne .dc-grand { grid-column: auto; } }
.dc-form .field { margin: 0; }
.dc-exemple { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: .8125rem; white-space: pre-wrap; }
.dc-calculs-saisie { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .875rem; }
.dc-form-fin { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.dc-format { font-size: .8125rem; }

/* ================================================================ Classes et outils (super-administrateur)
   Même ergonomie que l'accueil Projet / GO : en-tête (classe ou enseignant à afficher), barre filtres | recherche |
   nouvelle classe, puis une ligne compacte par classe et par enseignant : identité | réglages | Enregistrer, et
   dessous les outils à cocher. Le bouton Enregistrer s'allume dès qu'une ligne est modifiée. */
.cfo-tete h1 .ic { color: #3f4a5a; }
.cfo-pop { width: 300px; max-height: min(70vh, 520px); overflow-y: auto; }
.cfo-pop .pgo-classes-titre { margin-top: 8px; }
.cfo-pop a.pgo-coche { color: var(--text); }
.cfo-pop a.pgo-coche:hover { text-decoration: none; }
.cfo-pop a.pgo-coche.is-on { background: var(--primary-soft); color: var(--ds-bleu); }
.f-classes .pgo-point { background: var(--ds-bleu); } .f-profs .pgo-point { background: var(--ds-filiere); }
.cfo-nouvelle > summary { list-style: none; }
.cfo-nouvelle > summary::-webkit-details-marker { display: none; }
.prog-pop.cfo-nouvelle-pop { left: auto; right: 0; width: min(92vw, 320px); display: grid; gap: 8px; }
.cfo-nouvelle-pop label { margin: 0; font-weight: 700; font-size: .875rem; }
.cfo-nouvelle-pop .row { flex-wrap: nowrap; gap: 6px; }
.cfo-nouvelle-pop input { min-height: 34px; }
.cfo-nouvelle-pop p { margin: 0; }

.cfo-ligne { padding: 10px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--ds-card-border);
  box-shadow: var(--ds-shadow-1); transition: box-shadow .2s; scroll-margin-top: 90px; }
.cfo-ligne:hover { box-shadow: var(--ds-shadow-2); }
.cfo-ligne:target { border-color: var(--ds-bleu); box-shadow: var(--ds-ring); }
.cfo-ligne[hidden] { display: none; }
.cfo-ligne.is-archivee { opacity: .7; }
.cfo-ligne form { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; grid-template-areas: "badge id reglages bouton" "badge outils outils outils";
  align-items: center; gap: 6px 14px; margin: 0; }
.cfo-badge { grid-area: badge; align-self: start; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--ds-bleu); }
.is-prof .cfo-badge { background: var(--ds-filiere-bg); color: var(--ds-filiere); }
.cfo-id { grid-area: id; min-width: 0; }
.cfo-id h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.cfo-id h3 a { color: var(--text); }
.cfo-id p { margin: 1px 0 0; font-size: .75rem; color: var(--muted); }
.cfo-id p a { color: var(--muted); font-weight: 600; }
.cfo-reglages { grid-area: reglages; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.cfo-reglages select { width: auto; max-width: 190px; min-height: 30px; padding: 3px 28px 3px 10px; border-radius: 9px; font-size: .8125rem; }
.cfo-archive { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: .8125rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.cfo-archive input { width: 16px; height: 16px; min-height: 0; margin: 0; }
.cfo-enregistrer { grid-area: bouton; justify-self: end; min-height: 30px; padding: 3px 12px; }
.is-prof .cfo-enregistrer { grid-row: 1; }
.cfo-ligne.is-modifiee { border-color: var(--ds-bleu); }
.cfo-ligne.is-modifiee .cfo-enregistrer { background: var(--primary); border-color: var(--primary); color: #fff; }
.cfo-outils { grid-area: outils; margin: 0; gap: 6px; }
.cfo-outils legend.sr-only { width: 1px; }
.cfo-outils .outil-check span { min-height: 30px; padding: 3px 10px; font-size: .8125rem; }
.is-prof form { grid-template-areas: "badge id id bouton" "badge outils outils outils"; }
@media (max-width: 760px) {
  .cfo-ligne { padding: 10px 12px; }
  .cfo-ligne form, .is-prof form { grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "badge id bouton" "reglages reglages reglages" "outils outils outils"; }
  .cfo-reglages { justify-content: flex-start; }
}
/* Classes et outils : formulaire « Nouveau prof » (prénom, initiale, puis une ligne par classe : enseigne | PP). */
.prog-pop.cfo-nouveau-prof { width: min(92vw, 340px); }
.cfo-deux { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }
.cfo-deux > div { display: grid; gap: 4px; }
.cfo-prof-classes { display: grid; gap: 0; max-height: 240px; overflow-y: auto; margin: 0; padding: 0; border: 0; }
.cfo-prof-classes legend { margin-bottom: 4px; padding: 0; font-weight: 700; font-size: .875rem; }
.cfo-prof-entete, .cfo-prof-classe { display: grid; grid-template-columns: 1fr 70px 40px; align-items: center; justify-items: center; }
.cfo-prof-entete > span:first-child, .cfo-prof-classe > span { justify-self: start; }
.cfo-prof-entete { font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cfo-prof-classe { padding: 4px 6px; border-radius: 8px; font-size: .875rem; font-weight: 600; }
.cfo-prof-classe:hover { background: var(--ds-survol); }
.cfo-prof-classe input { width: 16px; height: 16px; min-height: 0; margin: 0; }
