/* ============================================================
   Cockpit Soutenance — style clair, inspiré Notion
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f6f3;
  --bg-sidebar: #fbfbfa;
  --border: #ebeae8;
  --border-strong: #e0dfdb;
  --text: #37352f;
  --text-soft: #6b6a66;
  --text-faint: #9b9a97;
  --accent: #2f6f4f;
  --accent-soft: #e8f1ec;
  --blue: #3a6ea5;
  --blue-soft: #eaf1f8;
  --warn: #d9730d;
  --warn-soft: #fbecdd;
  --danger: #c0392b;
  --danger-soft: #fbe9e7;
  --ok: #2f7d4f;
  --ok-soft: #e6f3ea;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(15, 15, 15, 0.08), 0 4px 12px rgba(15, 15, 15, 0.04);
  --font: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Bricolage Grotesque", "Hanken Grotesk", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Rail de navigation sombre (immersif) */
  --rail: #11151b;
  --rail-2: #161b22;
  --rail-text: #c9d2dd;
  --rail-faint: #6b7686;
  --rail-border: #232b35;
  --rail-accent: #4ade9b;
  --rail-accent-dim: rgba(74, 222, 155, 0.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }

/* Icônes SVG : se calent sur la taille de police courante */
.ic { display: inline-block; vertical-align: -0.15em; flex-shrink: 0; }
.ic-inline { display: inline-flex; font-size: 14px; }

/* ---------- Login ---------- */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px; color: var(--rail-text);
  background:
    radial-gradient(90% 70% at 50% -10%, rgba(74,222,155,.10), transparent 60%),
    linear-gradient(180deg, #161b22, #0e1217);
}
.login-body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(var(--rail-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--rail-border) 1px, transparent 1px);
  background-size: 30px 30px; mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 75%);
}
.login-card {
  position: relative; background: rgba(22,27,34,.72); border: 1px solid var(--rail-border);
  border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.45);
  backdrop-filter: blur(10px); padding: 44px 40px;
  width: 100%; max-width: 360px; text-align: center;
  animation: block-in .6s cubic-bezier(.22,.8,.3,1) both;
}
.login-emoji { font-size: 46px; color: var(--rail-accent); display: inline-flex;
  justify-content: center; filter: drop-shadow(0 0 14px rgba(74,222,155,.5)); }
.login-card h1 { font-family: var(--font-display); font-weight: 800; font-size: 25px;
  letter-spacing: -.02em; color: #fff; margin: 12px 0 2px; }
.login-sub { color: var(--rail-faint); margin: 0 0 26px; font-size: 12px;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.login-card input {
  width: 100%; padding: 12px 13px; border: 1px solid var(--rail-border);
  border-radius: 10px; font-size: 15px; margin-bottom: 12px; font-family: var(--font);
  background: rgba(13,17,22,.7); color: #fff;
}
.login-card input::placeholder { color: var(--rail-faint); }
.login-card input:focus { outline: none; border-color: var(--rail-accent);
  box-shadow: 0 0 0 3px var(--rail-accent-dim); }
.login-card button {
  width: 100%; padding: 12px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--rail-accent); color: #0e1217; font-size: 15px; font-weight: 700;
  font-family: var(--font); transition: filter .15s, box-shadow .15s;
  box-shadow: 0 6px 20px rgba(74,222,155,.25);
}
.login-card button:hover { filter: brightness(1.06); box-shadow: 0 8px 26px rgba(74,222,155,.38); }
.login-error { color: #ff7a6b; font-size: 13px; min-height: 18px; margin: 10px 0 0; }

/* ---------- Barre mobile (cachée sur PC) ---------- */
.topbar { display: none; }
.hamburger {
  font-size: 22px; line-height: 1; background: none; border: none;
  padding: 4px 8px; color: var(--text); border-radius: 6px;
}
.hamburger:hover { background: var(--bg-soft); }
.sidebar-overlay { display: none; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 256px; flex-shrink: 0; padding: 18px 12px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  color: var(--rail-text);
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(74,222,155,.07), transparent 60%),
    linear-gradient(180deg, var(--rail-2), var(--rail) 40%);
  border-right: 1px solid var(--rail-border);
}
/* fine grille technique en fond du rail */
.sidebar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(var(--rail-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--rail-border) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: linear-gradient(180deg, #000, transparent 70%);
}
.sidebar > * { position: relative; z-index: 1; }

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 16px; }
.brand-logo { color: var(--rail-accent); font-size: 26px; display: inline-flex;
  filter: drop-shadow(0 0 6px rgba(74,222,155,.45)); }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 19px;
  letter-spacing: -.01em; color: #fff; line-height: 1; }
.brand-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--rail-faint);
  letter-spacing: .02em; margin-top: 3px; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; position: relative; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
/* indicateur actif qui glisse */
.nav-indicator {
  position: absolute; left: 0; top: 0; width: 100%; height: 38px; border-radius: 9px;
  background: var(--rail-accent-dim); border: 1px solid rgba(74,222,155,.28);
  box-shadow: 0 0 18px rgba(74,222,155,.12), inset 0 0 0 1px rgba(74,222,155,.05);
  transform: translateY(0); opacity: 0;
  transition: transform .34s cubic-bezier(.4,1.2,.4,1), opacity .25s ease;
}
.nav-indicator::before {
  content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 3px; background: var(--rail-accent); box-shadow: 0 0 10px var(--rail-accent);
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 0 12px; height: 38px;
  border-radius: 9px; color: var(--rail-text); border: none; background: none;
  font-size: 14.5px; text-align: left; width: 100%; position: relative;
  opacity: .72; transition: opacity .18s ease, color .18s ease, transform .18s ease;
  animation: nav-in .5s both;
}
.nav-item:hover { opacity: 1; transform: translateX(2px); }
.nav-item.active { opacity: 1; color: #fff; font-weight: 600; }
.nav-item.active .nav-icon { color: var(--rail-accent); }
.nav-icon { font-size: 19px; width: 22px; display: inline-flex; justify-content: center;
  color: var(--rail-faint); transition: color .18s ease, transform .25s cubic-bezier(.4,1.4,.4,1); }
.nav-item:hover .nav-icon { color: var(--rail-accent); transform: scale(1.12); }
.nav-label { line-height: 1; }
@keyframes nav-in { from { opacity: 0; transform: translateX(-10px); } }

.sidebar-footer { margin-top: auto; padding: 12px 8px 4px; font-size: 12px; }
.ai-pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 11px;
  padding: 4px 10px; border-radius: 20px; margin-bottom: 10px;
  font-family: var(--font-mono); letter-spacing: .03em; text-transform: uppercase;
  border: 1px solid var(--rail-border); color: var(--rail-faint);
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rail-faint); }
.ai-pill.on { color: var(--rail-accent); border-color: rgba(74,222,155,.3); }
.ai-pill.on .pill-dot { background: var(--rail-accent); box-shadow: 0 0 8px var(--rail-accent);
  animation: pulse 2s infinite; }
.ai-pill.off { color: var(--warn); border-color: rgba(217,115,13,.3); }
.ai-pill.off .pill-dot { background: var(--warn); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.logout-link { color: var(--rail-faint); cursor: pointer; transition: color .15s; }
.logout-link:hover { color: #ff7a6b; }

.content { flex: 1; min-width: 0; padding: 36px 48px; }
/* Vue « plein écran » (agent IA) : la page ne scrolle pas ; titre + barre de
   saisie restent fixes, seul le journal des messages défile. */
.content.fixed-view { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.content.fixed-view > * { flex: 0 0 auto; }
.content.fixed-view .chat-wrap { flex: 1 1 auto; height: auto; min-height: 0; }
.view-title { font-family: var(--font-display); font-size: 30px; font-weight: 800;
  letter-spacing: -.02em; margin: 0 0 5px; }
.view-sub { color: var(--text-faint); margin: 0 0 26px; }
.hidden { display: none !important; }

/* Transition de vue : la vue entre, ses blocs apparaissent en cascade */
.content.view-enter { animation: view-in .42s cubic-bezier(.22,.8,.3,1) both; }
.content.view-enter > * { animation: block-in .5s cubic-bezier(.22,.8,.3,1) both; }
.content.view-enter > *:nth-child(1) { animation-delay: .04s; }
.content.view-enter > *:nth-child(2) { animation-delay: .09s; }
.content.view-enter > *:nth-child(3) { animation-delay: .15s; }
.content.view-enter > *:nth-child(4) { animation-delay: .21s; }
.content.view-enter > *:nth-child(5) { animation-delay: .27s; }
.content.view-enter > *:nth-child(n+6) { animation-delay: .31s; }
@keyframes view-in { from { opacity: 0; } }
@keyframes block-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  .content.view-enter, .content.view-enter > *, .nav-item { animation: none !important; }
  .nav-indicator { transition: none; }
}

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.stat .stat-num { font-size: 30px; font-weight: 700; }
.stat .stat-label { color: var(--text-faint); font-size: 13px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-faint); margin: 30px 0 12px; font-weight: 600; }

/* ---------- Phase chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 4px 11px; border-radius: 20px; font-size: 13px; font-weight: 600;
  background: var(--blue-soft); color: var(--blue);
}
.chip.muted { background: var(--bg-soft); color: var(--text-faint); }

/* ---------- Badges ---------- */
.badge { font-size: 11.5px; padding: 2px 8px; border-radius: 5px; font-weight: 600; }
.badge.type-phase { background: var(--blue-soft); color: var(--blue); }
.badge.type-document { background: #eef0f2; color: #555; }
.badge.type-decision { background: var(--accent-soft); color: var(--accent); }
.badge.type-risk { background: var(--warn-soft); color: var(--warn); }
.badge.type-jury_question { background: #f0e9f8; color: #7a4fb0; }
.badge.type-member { background: #fdeef3; color: #b03a6b; }
.badge.st-maitrise { background: var(--ok-soft); color: var(--ok); }
.badge.st-a_revoir { background: var(--warn-soft); color: var(--warn); }
.badge.st-dangereux { background: var(--danger-soft); color: var(--danger); }
.badge-index { display: inline-block; margin-top: 6px; padding: 2px 8px; font-size: 11.5px;
  background: #eef6ee; color: #2a6b2a; border-radius: 5px; font-weight: 600; }

/* ---------- Lists / doc cards ---------- */
.toolbar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar input, .toolbar select {
  padding: 8px 11px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); font-size: 14px;
}
.toolbar input { flex: 1; min-width: 220px; }
.search-box { position: relative; display: flex; align-items: center; flex: 1; min-width: 220px; }
.search-box .search-ic { position: absolute; left: 12px; color: var(--text-faint);
  font-size: 16px; pointer-events: none; display: inline-flex; }
.search-box input { width: 100%; padding-left: 36px; }
.guide-sec li .ic { margin-right: 7px; color: var(--danger); vertical-align: -0.12em; }
.doc-card { cursor: pointer; transition: border-color .12s; }
.doc-card:hover { border-color: var(--accent); }
.doc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.doc-title { font-weight: 600; }
.doc-summary { color: var(--text-soft); font-size: 14px; margin: 4px 0; }
.doc-keypoints { font-size: 13px; color: var(--text-soft); margin: 8px 0 0; padding-left: 18px; }
.doc-sources { font-size: 12px; color: var(--text-faint); margin-top: 8px; }

.alert-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.alert-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.alert-dot.danger { background: var(--danger); }
.alert-dot.warning { background: var(--warn); }

/* ---------- Agent IA ---------- */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 200px); }
/* Fil de discussion type SMS / WhatsApp : bulles compactes, ajustées au contenu. */
.chat-log { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column;
  gap: 6px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; }
/* Une rangée par message : décide de l'alignement gauche/droite. */
.msg { max-width: 70%; display: flex; }
.msg.user { align-self: flex-end; }          /* message envoyé → à droite */
.msg.bot { align-self: flex-start; }          /* message reçu → à gauche  */
/* Un peu plus d'air quand l'auteur change (nouveau groupe de messages). */
.msg.grp-start { margin-top: 6px; }
/* La bulle s'adapte au texte : hauteur auto, pas de min-height, texte à gauche.
   IMPORTANT : white-space:normal sur la bulle pour que l'indentation du template
   HTML (sauts de ligne entre éléments) ne crée PAS de lignes vides fantômes.
   Le retour à la ligne des vrais messages est géré sur .msg-text uniquement. */
.msg-bubble { position: relative; width: fit-content; max-width: 100%; height: auto; min-height: 0;
  padding: 6px 10px; border-radius: 16px; text-align: left; white-space: normal;
  line-height: 1.35; font-size: 14px; box-sizing: border-box;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .07); }
.msg.user .msg-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.msg.bot .msg-bubble { background: var(--bg); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg-text { text-align: left; white-space: pre-wrap; overflow-wrap: break-word; }
.msg-sources { font-size: 12px; color: var(--text-faint); margin-top: 6px; }
/* Nom de l'expéditeur (messages reçus seulement), horodatage discret, bouton supprimer. */
.msg-meta { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 1px; text-align: left; }
.msg.user .msg-meta { display: none; }
.msg-time { float: right; font-size: 10.5px; opacity: .6; margin: 7px 0 -2px 10px;
  user-select: none; white-space: nowrap; }
.msg-del { position: absolute; top: 4px; right: 6px; border: none; background: transparent;
  color: inherit; opacity: 0; cursor: pointer; padding: 2px; line-height: 0; transition: opacity .15s; }
.msg-bubble:hover .msg-del { opacity: .45; }
.msg-del:hover { opacity: 1; color: var(--danger); }
.msg-empty { color: var(--text-faint); text-align: center; padding: 32px 12px; font-size: 14px; margin: auto; }
/* Pièce jointe image dans une bulle (cliquable → pleine taille). */
.msg-img { display: block; max-width: 240px; max-height: 260px; width: auto; height: auto;
  border-radius: 10px; margin: 1px 0 2px; cursor: pointer; }
.msg-img-link { display: block; line-height: 0; }
.msg-bubble-img { padding: 4px; }                 /* image seule : bulle quasi sans marge */
.msg-bubble-img .msg-time { margin-right: 4px; margin-bottom: 2px; }
/* Bouton « joindre une image » : icône neutre (écrase le style accent générique). */
.chat-input-row .attach-btn { flex: 0 0 auto; width: 48px; padding: 0; background: var(--bg);
  color: var(--text-soft); border: 1px solid var(--border-strong);
  justify-content: center; }
.chat-input-row .attach-btn:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.attach-btn svg { width: 20px; height: 20px; }
.msg-nodes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.node-tag { font-size: 11.5px; padding: 2px 8px; border-radius: 12px; background: var(--accent-soft);
  color: var(--accent); cursor: pointer; }
.chat-input-row { display: flex; gap: 10px; margin-top: 12px; }
.chat-input-row textarea {
  flex: 1; resize: none; padding: 11px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); font-size: 15px; font-family: var(--font); height: 52px;
}
.chat-input-row button {
  padding: 0 22px; border: none; border-radius: var(--radius);
  background: var(--accent); color: #fff; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; font-size: 15px;
}
.chat-input-row #chat-send .ic { font-size: 17px; }
.chat-input-row #chat-send:hover { filter: brightness(1.06); }
/* Bouton micro (dictée) */
.mic-btn {
  padding: 0 15px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--bg); color: var(--text-soft); font-size: 19px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, color .15s;
}
.mic-btn:hover { border-color: var(--accent); color: var(--accent); }
.mic-btn.recording {
  background: #e5484d; border-color: #e5484d; color: #fff;
  animation: mic-pulse 1.1s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .55); }
  50%      { box-shadow: 0 0 0 7px rgba(229, 72, 77, 0); }
}

/* Bouton lecture (TTS) sur les bulles de réponse */
.speak-btn {
  display: inline-flex; align-items: center; margin-top: 8px; padding: 2px 9px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--bg);
  color: var(--text-soft); font-size: 13px; cursor: pointer; line-height: 1.6;
}
.speak-btn:hover { border-color: var(--accent); color: var(--accent); }
.speak-btn.playing { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.suggestion {
  font-size: 13px; padding: 6px 12px; border: 1px solid var(--border-strong);
  border-radius: 20px; background: var(--bg); color: var(--text-soft);
}
.suggestion:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Cartographie ---------- */
.graph-layout { display: flex; gap: 18px; }
.graph-stage { flex: 1; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-soft); overflow: hidden; }
#graph-svg { width: 100%; height: 70vh; display: block; }
.graph-side { width: 300px; flex-shrink: 0; }
.graph-node-circle { cursor: pointer; stroke: #fff; stroke-width: 1.5; }
.graph-edge { stroke: #cfcdc8; stroke-width: 1.2; }
.graph-edge.hl { stroke: var(--accent); stroke-width: 2.4; }
.graph-label { font-size: 10.5px; fill: var(--text-soft); pointer-events: none; }
.graph-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 12.5px; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 11px; height: 11px; border-radius: 50%; }

/* Interactions du graphe */
#graph-svg { cursor: grab; touch-action: none; }
#graph-svg.is-panning { cursor: grabbing; }
.graph-phase-tag { font-size: 11px; font-weight: 600; fill: var(--text-faint);
  text-anchor: middle; letter-spacing: .04em; text-transform: uppercase; pointer-events: none; }
.graph-rel-label { font-size: 10px; fill: var(--accent); text-anchor: middle;
  pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.graph-edge { transition: opacity .15s ease; }
.graph-node-circle { transition: opacity .15s ease, stroke .15s ease; }

/* Barre d'outils de la cartographie */
.carto-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 12px; }
.carto-toolbar .ct-group { display: flex; align-items: center; gap: 6px; }
.carto-toolbar select, .carto-toolbar input[type="search"] {
  font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--border);
  border-radius: 7px; background: var(--bg); color: var(--text); }
.carto-toolbar input[type="search"] { min-width: 160px; }
.ct-btn { font: inherit; font-size: 13px; padding: 5px 11px; border: 1px solid var(--border);
  border-radius: 7px; background: var(--bg); color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; }
.ct-btn:hover { background: var(--bg-soft); }
.ct-btn.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.ct-spacer { flex: 1; }

/* Parcours guidé */
.tour-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-soft); }
.tour-bar .tour-count { font-size: 12.5px; color: var(--text-faint); min-width: 64px; }
.tour-bar .tour-title { flex: 1; font-weight: 600; font-size: 13.5px; }

/* Boutons IA sur le détail d'un nœud */
.node-ai-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 4px; }
.node-ai-answer { margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--border); font-size: 13.5px;
  white-space: pre-wrap; line-height: 1.5; }
.node-ai-answer.is-loading { color: var(--text-faint); font-style: italic; }
.path-hint { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }

/* ---------- Répartition ---------- */
.rp-saved { font-size: 12px; color: var(--text-faint); margin-left: 6px; font-style: italic; }
.rp-summary { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.rp-sum-card { flex: 1; min-width: 150px; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg-soft); }
.rp-sum-name { font-weight: 600; font-size: 14px; }
.rp-sum-pct { font-size: 26px; font-weight: 700; color: var(--accent); margin: 4px 0 2px;
  font-variant-numeric: tabular-nums; }
.rp-sum-lbl { font-size: 11.5px; color: var(--text-faint); }
.rp-part { margin-bottom: 16px; }
.rp-part-title { margin: 0 0 10px; font-size: 15px; }
.rp-table-wrap { overflow-x: auto; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rp-table th, .rp-table td { padding: 7px 9px; border-bottom: 1px solid var(--border); text-align: left; }
.rp-table thead th { font-size: 12px; color: var(--text-faint); font-weight: 600; white-space: nowrap; }
.rp-table th.rp-mem, .rp-table .rp-cell, .rp-table .rp-sum,
.rp-table .rp-foot-pct { text-align: center; }
.rp-table .rp-item { width: 46%; color: var(--text-soft); }
.rp-grouprow td { background: var(--bg-soft); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); }
.rp-table input[type="number"] { width: 58px; font: inherit; font-size: 13px; text-align: center;
  padding: 4px 5px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg);
  color: var(--text); font-variant-numeric: tabular-nums; }
.rp-table input[type="number"]:focus { outline: none; border-color: var(--accent); }
.rp-sum { font-variant-numeric: tabular-nums; color: var(--text-faint); }
.rp-sum.rp-bad { color: var(--danger, #d9730d); font-weight: 700; }
.rp-table tfoot td { font-weight: 600; border-top: 2px solid var(--border); border-bottom: none; }
.rp-foot-pct { font-variant-numeric: tabular-nums; color: var(--accent); }

/* ---------- Documents : onglets + Nos rendus ---------- */
.doc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.doc-tab { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border: none;
  background: none; color: var(--text-faint); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; }
.doc-tab:hover { color: var(--text); }
.doc-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.rd-total { font-size: 13.5px; color: var(--text-soft); margin: 0 0 14px; }
.rd-phase { padding: 0; margin-bottom: 10px; overflow: hidden; }
.rd-phase > summary { list-style: none; cursor: pointer; padding: 12px 16px; display: flex;
  align-items: center; gap: 12px; font-weight: 600; }
.rd-phase > summary::-webkit-details-marker { display: none; }
.rd-phase > summary::before { content: "▸"; color: var(--text-faint); transition: transform .15s; }
.rd-phase[open] > summary::before { transform: rotate(90deg); }
.rd-phase-name { font-size: 15px; }
.rd-phase-count { font-size: 12px; color: var(--accent); background: var(--bg-soft);
  padding: 2px 9px; border-radius: 99px; }
.rd-zip { font-size: 12px; color: var(--text-faint); margin-left: auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.rd-groups { padding: 0 16px 14px; }
.rd-group { margin-top: 10px; }
.rd-folder { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
  color: var(--text-faint); padding: 6px 0 4px; border-bottom: 1px solid var(--border); }
.rd-folder-n { color: var(--accent); margin-left: 4px; }
.rd-files { list-style: none; margin: 4px 0 0; padding: 0; }
.rd-file { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.rd-name { flex: 1; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-size { font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-ext { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #fff;
  background: #8a8a82; border-radius: 4px; padding: 2px 5px; min-width: 30px; text-align: center; }
.rd-ext-pdf { background: #c0392b; }
.rd-ext-xlsx, .rd-ext-xls, .rd-ext-csv { background: #2f6f4f; }
.rd-ext-rvt { background: #3a6ea5; }
.rd-ext-jpg, .rd-ext-jpeg, .rd-ext-png, .rd-ext-webp { background: #7a4fb0; }
a.rd-name { text-decoration: none; }
a.rd-name:hover { color: var(--accent); text-decoration: underline; }

/* Archive dépliée (onglet « Documents profs ») : nom du ZIP au-dessus de ses pièces */
.dp-archive { margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--border); }
.dp-archive:first-child { border-top: none; padding-top: 0; }
.dp-archive-name { display: flex; align-items: center; gap: 6px; font-size: 12.5px;
  font-weight: 700; color: var(--text-soft); padding: 2px 0 2px; }
.dp-archive-name svg { width: 14px; height: 14px; }

/* Vue Questions jury : grille de cartes par thème */
.jq-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 8px; }
.jq-theme-n { color: var(--accent); margin-left: 4px; }
.jq-card { cursor: pointer; }
.jq-card .doc-title { font-size: 14px; margin: 4px 0; }
.jq-card .doc-summary { font-size: 12.5px; color: var(--text-soft); }

/* Vue Patch : journal des changements en langage simple */
.patch-entry > summary { gap: 10px; flex-wrap: wrap; }
.patch-date { font-size: 12px; font-weight: 700; color: #fff; background: var(--accent);
  border-radius: 99px; padding: 2px 10px; white-space: nowrap; }
.patch-body { padding: 0 16px 16px; }
.patch-resume { font-size: 13.5px; color: var(--text-soft); margin: 4px 0 12px; }
.patch-changes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.patch-change { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; }
.patch-text { color: var(--text); }
.patch-tag { flex: none; font-size: 11px; font-weight: 700; border-radius: 5px;
  padding: 2px 8px; min-width: 64px; text-align: center; }
.pt-nouveau { background: var(--ok-soft); color: var(--ok); }
.pt-ameliore { background: var(--blue-soft); color: var(--blue); }
.pt-retire { background: #eef0f2; color: #777; }
.pt-corrige { background: var(--warn-soft); color: var(--warn); }
.rd-hint { font-weight: 400; color: var(--text-faint); font-size: 12.5px; }
.rd-hint svg { width: 13px; height: 13px; vertical-align: -2px; }

/* Bouton-pastille « notes » sur une ligne de fichier */
.rd-note-toggle { display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--text-soft);
  border-radius: 99px; padding: 1px 8px; font-size: 12px; line-height: 1.6; }
.rd-note-toggle:hover { border-color: var(--accent); color: var(--accent); }
.rd-note-toggle.is-open { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.rd-note-toggle svg { width: 12px; height: 12px; }
.rd-note-count { font-variant-numeric: tabular-nums; font-weight: 600; }
.rd-note-panel { padding: 4px 0 10px 40px; }

/* Pastille de compteur de notes (résumé de phase Consignes) */
.note-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: auto;
  font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft);
  border-radius: 99px; padding: 2px 9px; }
.note-badge svg { width: 12px; height: 12px; }

/* Bloc de notes partagées (réutilisable : Consignes + Rendus) */
.notes-block { margin-top: 6px; }
.note-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.note-item { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.note-text { font-size: 13.5px; line-height: 1.5; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.note-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 5px; font-size: 11.5px; color: var(--text-faint); }
.note-del { border: none; background: none; cursor: pointer; color: var(--text-faint);
  font-size: 12px; line-height: 1; padding: 2px 4px; border-radius: 4px; }
.note-del:hover { color: var(--danger); background: var(--danger-soft); }
.note-empty { list-style: none; color: var(--text-faint); font-size: 12.5px; font-style: italic; }
.note-form { display: flex; gap: 8px; align-items: flex-end; }
.note-input { flex: 1; resize: vertical; min-height: 38px; font: inherit; font-size: 13px;
  padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--bg); color: var(--text); }
.note-input:focus { outline: none; border-color: var(--accent); }
.note-add { cursor: pointer; border: none; background: var(--accent); color: #fff;
  font: inherit; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 8px; white-space: nowrap; }
.note-add:hover { filter: brightness(1.05); }

/* ============ Onglet Incohérences ============ */
.inc-summary { padding: 14px 16px; margin-bottom: 14px; }
.inc-summary-top { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; }
.inc-total { font-size: 16px; }
.inc-total b { font-size: 22px; color: var(--text); }
.inc-sev-tally { display: flex; gap: 6px; flex-wrap: wrap; }
.inc-meta { margin-top: 8px; font-size: 12px; color: var(--text-faint); }
.inc-demo { color: var(--warn); font-weight: 700; }

.inc-sev-badge { font-size: 11px; font-weight: 700; border-radius: 99px; padding: 2px 9px;
  white-space: nowrap; }
.inc-sev-haute { background: var(--danger-soft); color: var(--danger); }
.inc-sev-moyenne { background: var(--warn-soft); color: var(--warn); }
.inc-sev-faible { background: var(--blue-soft); color: var(--blue); }

.inc-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.inc-chip { cursor: pointer; border: 1px solid var(--border-strong); background: var(--bg);
  color: var(--text-soft); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 13px; }
.inc-chip span { color: var(--text-faint); font-weight: 700; }
.inc-chip:hover { border-color: var(--accent); color: var(--accent); }
.inc-chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.inc-chip.is-active span { color: rgba(255, 255, 255, .8); }

.inc-type-section { margin-bottom: 26px; }
.inc-type-title { font-family: var(--font-display); font-size: 18px; margin: 0 0 4px;
  display: flex; align-items: center; gap: 8px; }
.inc-type-count { font-size: 12px; font-weight: 700; color: var(--text-faint);
  background: var(--bg-soft); border-radius: 99px; padding: 1px 9px; }
.inc-theme { margin-top: 12px; }
.inc-theme-name { font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-faint); margin-bottom: 8px; }

.inc-card { padding: 14px 16px; margin-bottom: 10px; border-left: 3px solid var(--border-strong); }
.inc-bd-haute { border-left-color: var(--danger); }
.inc-bd-moyenne { border-left-color: var(--warn); }
.inc-bd-faible { border-left-color: var(--blue); }
.inc-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.inc-theme-tag { font-size: 11px; color: var(--text-soft); background: var(--bg-soft);
  border-radius: 99px; padding: 2px 9px; }
.inc-ttl { font-weight: 600; font-size: 15px; line-height: 1.4; color: var(--text); }
.inc-expl { font-size: 13.5px; line-height: 1.55; color: var(--text-soft); margin: 6px 0 0; }
.inc-reco { font-size: 13px; line-height: 1.5; color: var(--text); margin-top: 8px;
  background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; }
.inc-sources-label { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-faint); margin: 12px 0 6px; }
.inc-sources { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.inc-source { font-size: 13px; }
.inc-source a { color: var(--blue); text-decoration: none; }
.inc-source a:hover { text-decoration: underline; }
.inc-source svg { width: 13px; height: 13px; vertical-align: -2px; }
.inc-quote { display: block; margin: 2px 0 0 18px; font-size: 12.5px; font-style: italic;
  color: var(--text-soft); }

/* Contexte projet + frise des phases */
.inc-context { padding: 14px 16px; margin-bottom: 14px; }
.inc-ctx-ident { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px;
  color: var(--text-soft); margin-bottom: 6px; }
.inc-ctx-ident span { position: relative; }
.inc-ctx-ident span + span::before { content: "·"; position: absolute; left: -9px; color: var(--text-faint); }
.inc-ctx-resume { font-size: 13.5px; line-height: 1.55; color: var(--text); margin: 0 0 12px; }
.inc-frise { display: flex; align-items: stretch; flex-wrap: wrap; gap: 6px; }
.inc-phase { flex: 1 1 120px; min-width: 110px; border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 9px; background: var(--bg-soft); }
.inc-phase-code { display: block; font-weight: 700; font-size: 13px; color: var(--accent); }
.inc-phase-lbl { display: block; font-size: 11px; font-weight: 600; color: var(--text); margin: 1px 0 2px; }
.inc-phase-desc { display: block; font-size: 11px; line-height: 1.4; color: var(--text-soft); }
.inc-phase-arrow { align-self: center; color: var(--text-faint); font-weight: 700; }
@media (max-width: 560px) { .inc-phase-arrow { display: none; } }

/* Glossaire */
.inc-glossary { padding: 0; margin-bottom: 16px; }
.inc-glossary > summary { list-style: none; cursor: pointer; padding: 12px 16px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; }
.inc-glossary > summary::-webkit-details-marker { display: none; }
.inc-glossary > summary::before { content: "▸"; color: var(--text-faint); transition: transform .15s; }
.inc-glossary[open] > summary::before { transform: rotate(90deg); }
.inc-glossary > summary span { font-size: 12px; font-weight: 700; color: var(--text-faint);
  background: var(--bg-soft); border-radius: 99px; padding: 0 8px; }
.inc-gl-list { margin: 0; padding: 0 16px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
@media (max-width: 560px) { .inc-gl-list { grid-template-columns: 1fr; } }
.inc-gl-row { display: flex; gap: 7px; font-size: 12.5px; line-height: 1.45; }
.inc-gl-row dt { font-weight: 700; color: var(--text); white-space: nowrap; }
.inc-gl-row dd { margin: 0; color: var(--text-soft); }

/* Enjeu (pourquoi ça compte) + défense orale */
.inc-tag-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  border-radius: 4px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px; white-space: nowrap; }
.inc-enjeu { font-size: 13.5px; line-height: 1.55; color: var(--text); margin-top: 8px;
  background: var(--warn-soft); border-radius: 8px; padding: 8px 10px; }
.inc-enjeu .inc-tag-lbl { background: var(--warn); color: #fff; }
.inc-defense { font-size: 13.5px; line-height: 1.55; color: var(--text); margin-top: 8px;
  background: var(--blue-soft); border-radius: 8px; padding: 8px 10px; }
.inc-defense .inc-tag-lbl { background: var(--blue); color: #fff; }
.inc-detail { margin-top: 8px; }
.inc-detail > summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--text-faint); }
.inc-detail > summary::-webkit-details-marker { display: none; }
.inc-detail > summary::before { content: "▸ "; color: var(--text-faint); }
.inc-detail[open] > summary::before { content: "▾ "; }
.inc-detail .inc-expl { margin-top: 4px; }

/* Consignes par phase */
.cs-phase { padding: 0; margin-bottom: 10px; overflow: hidden; }
.cs-phase > summary { list-style: none; cursor: pointer; padding: 12px 16px; display: flex;
  align-items: center; gap: 10px; font-weight: 600; }
.cs-phase > summary::-webkit-details-marker { display: none; }
.cs-phase > summary::before { content: "▸"; color: var(--text-faint); transition: transform .15s; }
.cs-phase[open] > summary::before { transform: rotate(90deg); }
.cs-phase-name { font-size: 15px; }
.cs-statut { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: #fff; background: var(--accent); border-radius: 99px; padding: 2px 9px; }
.cs-body { padding: 0 16px 16px; }
.cs-body .label { margin-top: 14px; }
.cs-attendus { list-style: none; margin: 6px 0 0; padding: 0; }
.cs-att { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; line-height: 1.5; }
.cs-att b { display: block; color: var(--text); }
.cs-att span { color: var(--text-soft); }
.cs-vigilance { font-size: 13.5px; padding: 9px 12px; border-radius: 8px;
  background: var(--bg-soft); border-left: 3px solid var(--accent); }
.cs-sujet-link { display: inline-flex; align-items: center; gap: 7px; margin: 12px 0 4px;
  padding: 8px 13px; font-size: 13px; font-weight: 600; text-decoration: none;
  color: var(--accent); background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 8px; }
.cs-sujet-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Détail node panel ---------- */
.detail-card h3 { margin: 0 0 4px; }
.detail-meta { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.detail-card .label { font-size: 12px; color: var(--text-faint); text-transform: uppercase;
  letter-spacing: .03em; margin: 14px 0 4px; }
.empty-hint { color: var(--text-faint); font-size: 14px; }

/* ---------- Guide soutenance ---------- */
.guide { max-width: none; }
.guide-sec { margin-bottom: 22px; }
.guide-sec h2 {
  font-size: 18px; margin: 0 0 6px; display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap;
}
.guide-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 700;
}
.guide-time {
  font-size: 12px; font-weight: 600; color: var(--blue);
  background: var(--blue-soft); padding: 2px 9px; border-radius: 20px;
}
.guide-sec ul { margin: 6px 0; padding-left: 20px; }
.guide-sec li { margin: 3px 0; color: var(--text-soft); }
.guide-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px; margin-top: 10px;
}
.guide-cell h4 { margin: 0 0 6px; font-size: 14px; color: var(--text);
  display: flex; align-items: center; gap: 7px; }
.guide-cell.ok { border-left: 3px solid var(--ok); }
.guide-cell.ok h4 .ic { color: var(--ok); }
.guide-cell.ko { border-left: 3px solid var(--danger); }
.guide-cell.ko h4 .ic { color: var(--danger); }
.chip.muted .ic { color: var(--warn); margin-right: 1px; }
.doc-sources .ic { color: var(--text-faint); }
.callout {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 12px 14px; border-radius: 0 8px 8px 0; margin: 12px 0; font-size: 14.5px;
}
.callout.warn { border-color: var(--warn); background: var(--warn-soft); }
.callout.blue { border-color: var(--blue); background: var(--blue-soft); }
.callout b { color: var(--text); }
.guide-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.guide-table td, .guide-table th {
  border: 1px solid var(--border); padding: 8px 12px; text-align: left; vertical-align: top;
}
.guide-table th { background: var(--bg-soft); font-weight: 600; }
.time-table td:first-child {
  font-weight: 700; color: var(--accent); width: 90px; white-space: nowrap;
}
.checklist { list-style: none; padding: 0; margin: 8px 0 0; }
.checklist li { padding: 5px 0 5px 28px; position: relative; color: var(--text-soft); }
.checklist li::before {
  content: "\2610"; position: absolute; left: 4px; color: var(--text-faint); font-size: 16px;
}
.guide-quote {
  font-size: 16px; font-style: italic; color: var(--text);
  border-left: 3px solid var(--accent); padding: 6px 0 6px 16px; margin: 10px 0;
}
@media (max-width: 760px) {
  .guide-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ---------- Profils ---------- */
.profile-card { display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.profile-name { font-size: 17px; font-weight: 700; }
.score-bar { height: 8px; background: var(--bg-soft); border-radius: 5px; overflow: hidden; margin-top: 6px; }
.score-fill { height: 100%; background: var(--accent); transition: width .2s ease; }

/* ---------- Sélecteur de profil (sidebar) ---------- */
.profile-switch { padding: 6px 8px 14px; border-bottom: 1px solid var(--rail-border); margin-bottom: 10px; }
.profile-switch label { display: flex; align-items: center; gap: 6px; font-size: 10.5px;
  color: var(--rail-faint); margin-bottom: 6px; font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: .04em; }
.profile-switch select {
  width: 100%; padding: 8px 10px; font-size: 13.5px; border: 1px solid var(--rail-border);
  border-radius: 8px; background: var(--rail-2); color: var(--rail-text); cursor: pointer;
  font-family: var(--font); transition: border-color .15s, box-shadow .15s;
}
.profile-switch select:hover { border-color: rgba(74,222,155,.4); }
.profile-switch select:focus { outline: none; border-color: var(--rail-accent);
  box-shadow: 0 0 0 3px var(--rail-accent-dim); }

/* ---------- Mise en avant « moi » ---------- */
.profile-card.is-me { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.me-badge, .prep-card .me-badge { font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 1px 7px; border-radius: 5px; vertical-align: middle; }

/* ---------- Suivi de prépa ---------- */
.prep-card { margin-top: 18px; }
.prep-empty { margin-top: 18px; color: var(--text-faint); }
.prep-head { font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex;
  align-items: center; gap: 8px; flex-wrap: wrap; }
.prep-pct { margin-left: auto; font-size: 13px; color: var(--accent); font-weight: 700; }
.prep-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 18px; }
.prep-item { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; cursor: pointer; padding: 3px 0; }
.prep-item input { margin-top: 3px; width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }

/* ---------- Bandeau profil du chat ---------- */
.chat-profilebar { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px;
  font-size: 13px; color: var(--text-soft); }
.chat-clear { margin-left: auto; font-size: 12.5px; padding: 4px 10px; border: 1px solid var(--border);
  background: #fff; border-radius: 7px; cursor: pointer; color: var(--text-soft); }
.chat-clear:hover { border-color: var(--danger); color: var(--danger); }

/* ---------- Responsive : tablette ---------- */
@media (max-width: 1024px) {
  .content { padding: 28px 28px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .graph-layout { flex-direction: column; }
  .graph-side { width: 100%; }
}

/* ---------- Responsive : mobile (drawer) ---------- */
@media (max-width: 760px) {
  .topbar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 30; height: 52px; padding: 0 12px;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .topbar-title { font-weight: 700; font-size: 15px; }

  .layout { display: block; }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 50;
    height: 100vh; width: 264px; max-width: 82vw;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay {
    display: block; position: fixed; inset: 0; z-index: 40;
    background: rgba(15, 15, 15, .4);
    opacity: 0; pointer-events: none; transition: opacity .22s;
  }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }

  .content { padding: 18px 16px; }
  .view-title { font-size: 23px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .toolbar input { min-width: 0; }
  .msg { max-width: 100%; }
  .chat-wrap { height: calc(100vh - 270px); }
  #graph-svg { height: 60vh; }
}

/* ---------- Très petits écrans ---------- */
@media (max-width: 420px) {
  .grid { gap: 10px; }
  .chat-input-row button { padding: 0 16px; }
}

/* ============================================================
   Jury blanc — simulation d'oral notée (rubrique « oral »)
   ============================================================ */
.oral-setup .label { margin-top: 4px; }
.oral-diff-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.oral-diff-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.oral-diff-badge {
  font-family: var(--font-mono); font-weight: 600; font-size: 13px;
  color: var(--accent); background: var(--accent-soft);
  padding: 2px 8px; border-radius: 999px; min-width: 38px; text-align: center;
}
.oral-diff-label { font-size: 13px; color: var(--text-soft); margin-top: 6px; min-height: 18px; }

.oral-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.oral-btn-primary, .oral-btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius); font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.oral-btn-primary { background: var(--accent); color: #fff; }
.oral-btn-primary:hover { background: #285f43; }
.oral-btn-ghost { background: var(--bg); color: var(--text-soft); border-color: var(--border-strong); }
.oral-btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.oral-btn-primary .ic, .oral-btn-ghost .ic { width: 1.05em; height: 1.05em; }

/* Minuteur */
.oral-timer-card { display: flex; flex-direction: column; gap: 10px; }
.oral-timer-head { display: flex; align-items: baseline; gap: 8px; }
.oral-time { font-family: var(--font-mono); font-size: 30px; font-weight: 600; color: var(--text); line-height: 1; }
.oral-int-timer .oral-time { font-size: 24px; }
.oral-time-budget { font-family: var(--font-mono); font-size: 15px; color: var(--text-faint); }
.oral-progress { height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.oral-progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .4s linear, background .3s; }
.oral-progress-fill.warn { background: var(--warn); }
.oral-progress-fill.over { background: var(--danger); }
.oral-alert { font-size: 13px; font-weight: 600; min-height: 18px; color: var(--text-faint); }
.oral-alert.warn { color: var(--warn); }
.oral-alert.over { color: var(--danger); }

/* Transcription (présentation) */
.oral-transcript {
  width: 100%; min-height: 220px; resize: vertical; margin-top: 12px;
  padding: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg);
}
.oral-transcript:focus { outline: none; border-color: var(--accent); }
.oral-live-hint { min-height: 20px; margin: 6px 2px 0; }
.oral-interim { font-size: 13px; color: var(--text-faint); font-style: italic; }

/* Entretien — fil de discussion jury / candidat */
.oral-dialog { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; max-height: 50vh; overflow-y: auto; padding: 2px; }
.oral-bubble { max-width: 82%; padding: 12px 14px; border-radius: 12px; }
.oral-bubble.jury { align-self: flex-start; background: var(--blue-soft); border: 1px solid #d8e6f2; }
.oral-bubble.candidate { align-self: flex-end; background: var(--accent-soft); border: 1px solid #d6e7dd; }
.oral-bubble-role { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-bottom: 3px; }
.oral-bubble-text { font-size: 15px; line-height: 1.55; color: var(--text); white-space: pre-wrap; }

/* Carte de réponse candidat (textarea + micro) */
.oral-answer-card { display: flex; flex-direction: column; gap: 10px; }
.oral-answer-card textarea {
  width: 100%; min-height: 80px; resize: vertical; padding: 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg);
}
.oral-answer-card textarea:focus { outline: none; border-color: var(--accent); }

/* Bandeau « transcription en direct » (le micro reste à l'écoute) */
.oral-live-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  color: var(--text-soft); min-height: 18px; flex-wrap: wrap; }
.oral-live-dot { width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--border-strong); transition: background .2s; }
.oral-live-dot.on { background: var(--danger); animation: oral-pulse 1.4s ease-in-out infinite; }
@keyframes oral-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.oral-live-label { font-weight: 600; }
.oral-live-interim { color: var(--text-faint); font-style: italic; }

/* Ligne d'actions sous la réponse : Passer (ghost) + Répondre (primary) */
.oral-answer-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.oral-answer-actions .oral-btn-primary, .oral-answer-actions .oral-btn-ghost { padding: 8px 16px; }

/* Écrans d'attente (transcription / débrief en cours) */
.oral-center { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding: 40px 20px; }
.oral-spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--border-strong); border-top-color: var(--accent);
  animation: oral-spin .8s linear infinite;
}
@keyframes oral-spin { to { transform: rotate(360deg); } }

/* Débrief — note globale + grille */
.oral-score-card { display: flex; align-items: center; gap: 18px; }
.oral-global { display: flex; align-items: baseline; gap: 2px; padding: 8px 18px; border-radius: 12px; background: var(--bg-soft); }
.oral-global-num { font-family: var(--font-mono); font-size: 40px; font-weight: 700; line-height: 1; }
.oral-global-max { font-family: var(--font-mono); font-size: 18px; color: var(--text-faint); }
.oral-global.good { background: var(--ok-soft); } .oral-global.good .oral-global-num { color: var(--ok); }
.oral-global.ok   { background: var(--warn-soft); } .oral-global.ok .oral-global-num { color: var(--warn); }
.oral-global.bad  { background: var(--danger-soft); } .oral-global.bad .oral-global-num { color: var(--danger); }
.oral-global-side .label { margin: 0; }

.oral-grille .guide-table { width: 100%; }
.oral-cell-note { font-family: var(--font-mono); font-weight: 700; text-align: center; }
.oral-cell-note.good { color: var(--ok); } .oral-cell-note.ok { color: var(--warn); } .oral-cell-note.bad { color: var(--danger); }

/* Listes forts/faibles, questions ratées, conseils */
.oral-flunked-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.oral-flunked-row:last-child { border-bottom: none; }
.oral-flunked-q { font-weight: 600; color: var(--text); }
.oral-flunked-why { font-size: 14px; color: var(--danger); margin-top: 4px; }
.oral-flunked-model { font-size: 14px; color: var(--text-soft); margin-top: 4px; padding-left: 12px; border-left: 2px solid var(--accent); }
.oral-advice li { margin-bottom: 6px; }

/* Historique des sessions (setup) */
.oral-history-list { display: flex; flex-direction: column; gap: 8px; }
.oral-history-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg);
}
.oral-history-row:hover { background: var(--bg-soft); border-color: var(--border-strong); }
.oral-hist-note { font-family: var(--font-mono); font-weight: 700; font-size: 17px; min-width: 56px; }
.oral-hist-note.good { color: var(--ok); } .oral-hist-note.ok { color: var(--warn); } .oral-hist-note.bad { color: var(--danger); }
.oral-hist-when { font-size: 14px; color: var(--text); }
.oral-hist-meta { font-size: 12px; color: var(--text-faint); }

/* Débrief rejoué en surimpression */
.oral-modal { max-height: 85vh; overflow: auto; background: var(--bg); border-radius: 12px; padding: 22px; box-shadow: var(--shadow); }

@media (max-width: 640px) {
  .oral-bubble { max-width: 95%; }
  .oral-score-card { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ============================================================
   Fil rouge — fils conducteurs narratifs de l'oral (rubrique « filrouge »)
   ============================================================ */
.fr-generator { display: flex; flex-direction: column; gap: 10px; }
.fr-hint { font-size: 13px; color: var(--text-soft); margin: 0; }
.fr-gen-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fr-input {
  flex: 1; min-width: 220px; padding: 9px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg);
}
.fr-input:focus { outline: none; border-color: var(--accent); }

.fr-btn-primary, .fr-btn-ghost {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.fr-btn-primary { background: var(--accent); color: #fff; }
.fr-btn-primary:hover { background: #285f43; }
.fr-btn-ghost { background: var(--bg); color: var(--text-soft); border-color: var(--border-strong); }
.fr-btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.fr-btn-danger { color: var(--danger); }
.fr-btn-danger:hover { background: var(--danger-soft); border-color: var(--danger-soft); color: var(--danger); }
.fr-btn-primary .ic, .fr-btn-ghost .ic { width: 1.05em; height: 1.05em; }

/* Éditeur */
.fr-editor-slot { margin: 14px 0; }
.fr-editor { display: flex; flex-direction: column; gap: 12px; }
.fr-field { display: flex; flex-direction: column; gap: 5px; }
.fr-field .label, .fr-part-label { font-size: 12px; font-weight: 600; color: var(--text-faint); }
.fr-textarea {
  width: 100%; resize: vertical; padding: 10px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg);
}
.fr-textarea:focus, .fr-part-input:focus { outline: none; border-color: var(--accent); }
.fr-part-input { min-height: 48px; }
.fr-editor-actions { margin-top: 4px; }

/* Liste de cartes */
.fr-list { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.fr-card { display: flex; flex-direction: column; gap: 12px; }
.fr-card.fr-retenu { border: 1.5px solid var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fr-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fr-title { margin: 0; font-family: var(--font-display); font-size: 19px; color: var(--text); }
.fr-card-tags { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.fr-retenu-star { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--accent); }
.fr-retenu-star .ic { width: 1em; height: 1em; }
.fr-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; }
.fr-badge-seed { background: var(--accent-soft); color: var(--accent); }
.fr-badge-ai { background: var(--blue-soft); color: var(--blue); }
.fr-badge-manual { background: var(--bg-soft); color: var(--text-soft); }
.fr-thesis { margin: 0; font-size: 15px; font-style: italic; color: var(--text-soft); border-left: 3px solid var(--accent); padding-left: 12px; }

/* Timeline des 6 parties */
.fr-timeline { display: grid; grid-template-columns: 140px 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.fr-part { display: contents; }
.fr-part-label { background: var(--bg-soft); padding: 9px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); display: flex; align-items: center; }
.fr-part-text { background: var(--bg); padding: 9px 12px; font-size: 14px; line-height: 1.5; color: var(--text); }
.fr-part-empty .fr-part-text { color: var(--text-faint); }

.fr-transitions .label { margin-bottom: 4px; }
.fr-trans-list { margin: 0; padding-left: 18px; }
.fr-trans-list li { font-size: 14px; color: var(--text-soft); margin-bottom: 3px; }

.fr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fr-empty, .fr-notice { font-size: 14px; color: var(--text-soft); }
.fr-notice { color: var(--warn); margin: 8px 0; }

/* Spinner (génération / enregistrement) */
.fr-spinner { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: fr-spin .7s linear infinite; vertical-align: -2px; }
.fr-btn-ghost .fr-spinner { border: 2px solid var(--border-strong); border-top-color: var(--accent); }
@keyframes fr-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .fr-timeline { grid-template-columns: 1fr; }
  .fr-part-label { padding-bottom: 0; }
  .fr-card-head { flex-direction: column; }
}

/* ---------- Compte à rebours avant l'oral (sidebar, discret) ---------- */
.countdown {
  display: flex; flex-direction: column; gap: 1px;
  padding: 7px 10px; margin-bottom: 10px;
  border: 1px solid var(--rail-border); border-radius: 9px;
  background: var(--rail-accent-dim);
}
.cd-num {
  font-family: var(--font-mono); font-size: 15px; font-weight: 700;
  color: var(--rail-accent); letter-spacing: .02em; line-height: 1.1;
}
.cd-sub { font-family: var(--font-mono); font-size: 10px; color: var(--rail-faint); letter-spacing: .02em; }
.countdown.is-now { border-color: rgba(74,222,155,.4); }
.countdown.is-now .cd-num { animation: pulse 2s infinite; }

/* ---------- Fil rouge → bouton « Développé » (génération PowerPoint) ---------- */
.fr-deck-slot:empty { display: none; }
.fr-deck-slot { margin-top: 4px; }
.fr-btn-primary.is-busy { opacity: .7; cursor: progress; }
.fr-deck-prog { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.fr-deck-msg { font-size: 13px; color: var(--text-soft); }
.fr-deck-prog .fr-progress { flex: 1 1 100%; height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.fr-deck-prog .fr-progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.fr-deck-dl { text-decoration: none; }
.fr-deck-ok { font-size: 13px; color: var(--text-faint); margin-left: 10px; }
.fr-deck-err { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 13px; color: var(--danger); padding: 8px 0; }
.fr-deck-err .ic { color: var(--danger); }
.fr-deck-prog .fr-spinner { border: 2px solid var(--border-strong); border-top-color: var(--accent); }

/* ============================================================
   Page « Développé » d'un fil rouge (sous-vue de la rubrique Fil rouge)
   ============================================================ */
.dev-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.dev-head { display: flex; flex-direction: column; gap: 10px; }
.dev-thesis { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.25; }
.dev-sub { margin: 0; color: var(--text-soft); font-size: 15px; }
.dev-strat { font-size: 14px; }
.dev-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.dev-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-soft);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px; }
.dev-gauge { font-family: var(--font-mono); font-weight: 700; color: var(--accent); background: var(--accent-soft); border-color: #d6e7dd; }
.dev-bet { font-size: 13px; }

/* Carte de partie */
.dev-part { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.dev-part-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dev-part-head h3 { margin: 0; font-family: var(--font-display); font-size: 19px; color: var(--text); }
.dev-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dev-badge { font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.dev-badge-grade { background: var(--accent-soft); color: var(--accent); }
.dev-badge-ctx { background: var(--blue-soft); color: var(--blue); }
.dev-badge-soft { background: var(--bg-soft); color: var(--text-faint); }
.dev-badge-guide { background: var(--bg-soft); color: var(--text-soft); border: 1px solid var(--border); }
.dev-badge-warn { background: var(--warn-soft); color: var(--warn); }
.dev-badge-prov { background: var(--danger-soft); color: var(--danger); }

.dev-fil { margin: 0; font-style: italic; color: var(--text-soft); border-left: 3px solid var(--accent); padding-left: 12px; }
.dev-slides { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.dev-slides b { color: var(--text); }
.dev-cumul { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.dev-decoupage { margin: 0; padding-left: 18px; }
.dev-decoupage li { font-size: 14px; color: var(--text); margin-bottom: 3px; }

.dev-block { display: flex; flex-direction: column; gap: 6px; }
.dev-bt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); display: flex; align-items: center; gap: 6px; }
.dev-justif { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.dev-jrow { display: grid; grid-template-columns: 150px 1fr; gap: 10px; font-size: 14px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.dev-jrow:last-child { border-bottom: none; }
.dev-jlabel { font-weight: 600; color: var(--text-soft); }

.dev-figs { display: flex; flex-wrap: wrap; gap: 6px; }
.dev-fig { font-size: 13px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px 9px; }
.dev-fig i { color: var(--text-faint); font-size: 11px; }
.dev-fig-todo { background: var(--warn-soft); border-color: #f0d8bf; color: var(--warn); }
.dev-fig-todo i { color: var(--warn); }

.dev-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dev-col ul { margin: 4px 0 0; padding-left: 18px; }
.dev-col li { font-size: 14px; line-height: 1.5; color: var(--text); margin-bottom: 4px; }
.dev-dom { font-weight: 700; color: var(--accent); }
.dev-muted { color: var(--text-faint); list-style: none; margin-left: -18px; }

.dev-qj { padding: 8px 0; border-bottom: 1px solid var(--border); }
.dev-qj:last-child { border-bottom: none; }
.dev-q { font-weight: 600; color: var(--text); font-size: 14px; }
.dev-a { font-size: 14px; color: var(--text-soft); margin-top: 2px; }
.dev-transition { font-size: 14px; font-style: italic; color: var(--accent); background: var(--accent-soft);
  border-radius: var(--radius); padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.dev-empty p { font-size: 15px; line-height: 1.6; color: var(--text-soft); }
.dev-prog { margin-bottom: 8px; }

@media (max-width: 640px) {
  .dev-cols { grid-template-columns: 1fr; }
  .dev-jrow { grid-template-columns: 1fr; gap: 2px; }
}

/* ============================================================
   Vue Chiffres clés (référence)
   ============================================================ */
.ref-card { margin-bottom: 12px; }
.ref-head { display: flex; align-items: center; gap: 10px; }
.ref-canonical { font-size: 1.4rem; font-weight: 700; }
.ref-label { color: var(--muted, #888); margin-top: 2px; }
.ref-variants { margin-top: 8px; font-size: .9rem; }
.ref-variant { text-decoration: line-through; opacity: .7; margin-right: 6px; }
.ref-badge svg { width: 14px; height: 14px; vertical-align: -2px; }

/* ============================================================
   Vue Glossaire
   ============================================================ */
.search-input {
  display: block; width: 100%; padding: 9px 13px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-size: 15px; font-family: var(--font); background: var(--bg-soft);
  color: var(--text); margin-bottom: 4px;
}
.search-input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); }
.gloss-list { margin-top: 12px; }
.gloss-row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line, #eee); }
.gloss-row dt { font-weight: 700; }
.gloss-row dd { margin: 0; color: var(--muted, #555); }
@media (max-width: 640px) { .gloss-row { grid-template-columns: 1fr; gap: 2px; } }

/* ============================================================
   Vue Fiche de révision
   ============================================================ */
.fiche-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fiche-toolbar .view-title { margin: 0; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: var(--bg-soft);
  font-size: 14px; font-family: var(--font); font-weight: 600;
  color: var(--text); cursor: pointer; transition: background .15s;
}
.btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.fiche { }
.fiche h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700;
  margin: 24px 0 10px; border-bottom: 2px solid var(--border-strong); padding-bottom: 6px; }
.fiche-phase { margin-bottom: 14px; }
.fiche-phase h3 { font-size: 15px; font-weight: 700; color: var(--accent); margin: 0 0 4px; }
.fiche-phase ul { margin: 0; padding-left: 18px; }
.fiche-phase li { font-size: 14px; line-height: 1.6; }
.fiche-phase p { font-size: 14px; line-height: 1.6; margin: 0; color: var(--text-soft); }

/* ---------- Carte d'onboarding (Dashboard) ---------- */
.onboarding { position: relative; border-left: 3px solid var(--accent, #16a34a); }
.onb-title { font-weight: 700; margin-bottom: 6px; }
.onb-steps { margin: 0; padding-left: 18px; line-height: 1.9; }
.onb-steps a { cursor: pointer; text-decoration: underline; }
.onb-close { position: absolute; top: 8px; right: 8px; background: none; border: none; cursor: pointer; opacity: .6; }
.onb-close svg { width: 18px; height: 18px; }

@media print {
  .sidebar, aside, #sidebar, #nav, .nav, .no-print, .countdown, .ai-pill,
  .topbar, .sidebar-overlay { display: none !important; }
  main.content, #content { margin: 0 !important; padding: 12pt !important; }
  .fiche { font-size: 12pt; }
  .fiche-phase { break-inside: avoid; margin-bottom: 8px; }
}
