.rev-page { max-width: min(1040px, 100%); min-width: 0; }
.rev-page .welcome-banner { margin-bottom: 20px; min-width: 0; }
.rev-page .welcome-banner h2 { overflow-wrap: anywhere; word-break: break-word; }
.rev-page .welcome-banner a:not(.btn) { color: rgba(255,255,255,.9); }
.rev-page .welcome-banner .btn { color: var(--brand); }

.rev-back { margin: 0 0 14px; font-size: .9rem; }
.rev-back a { color: var(--ink-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.rev-back a:hover { color: var(--brand); }

.rev-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: relative; z-index: 2; }
.rev-actions form { margin: 0; }

.rev-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  margin: 0 0 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.rev-tabs.dash-tabs { border-bottom: 1px solid var(--line); }
.rev-tabs .dash-tab {
  border: none;
  margin: 0;
  border-radius: 10px;
  padding: 10px 14px;
}
.rev-tabs .dash-tab.is-active {
  background: var(--brand);
  color: #fff;
  border-bottom-color: transparent;
}

.rev-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, .8fr);
  gap: 16px;
  margin-bottom: 20px;
}
.rev-plan {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.rev-plan::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 6px;
  height: 100%;
  background: var(--brand);
}
.rev-plan h2 { font-size: 1.15rem; margin: 0 0 6px; }
.rev-plan p { margin: 0 0 14px; color: var(--ink-muted); font-size: .9rem; line-height: 1.5; }
.rev-plan-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.rev-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 600;
  padding: 5px 10px; border-radius: 999px;
  background: var(--brand-muted); color: var(--brand);
}
.rev-chip.is-warn { background: #fef3c7; color: #92400e; }
.rev-ring-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
}
.rev-ring {
  --pct: 0;
  width: 112px; height: 112px; border-radius: 50%;
  background: conic-gradient(var(--brand) calc(var(--pct) * 1%), var(--line) 0);
  display: grid; place-items: center;
}
.rev-ring span {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--surface); display: grid; place-items: center;
  font-weight: 800; font-size: 1.25rem;
}
.rev-ring-card small { color: var(--ink-muted); font-size: .8rem; }

.rev-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.rev-tile {
  text-decoration: none;
  color: inherit;
  min-height: 148px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rev-tile:hover {
  border-color: var(--brand-light);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: inherit;
}
.rev-tile-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-muted);
  color: var(--brand);
  margin-bottom: 12px;
}
.rev-tile h3 { font-size: 1.02rem; margin: 0 0 6px; font-weight: 700; }
.rev-tile p { margin: 0; font-size: .85rem; color: var(--ink-muted); line-height: 1.45; }
.rev-tile-foot { margin-top: 12px; font-size: .75rem; font-weight: 700; color: var(--brand); }

.rev-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rev-empty { text-align: center; padding: 48px 24px; }
.rev-empty i { font-size: 1.8rem; color: var(--brand); margin-bottom: 10px; display: block; }
.rev-empty h2 { font-size: 1.15rem; margin: 0 0 8px; }
.rev-empty p { color: var(--ink-muted); margin: 0 0 16px; }

.rev-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.rev-kpi {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface);
}
.rev-kpi strong { display: block; font-size: 1.25rem; }
.rev-kpi span { font-size: .78rem; color: var(--ink-muted); }

.rev-course-due { color: #b45309; font-weight: 700; }

.rev-fiche { margin-top: 16px; border-radius: 16px; }
.rev-fiche h2 { font-size: 1.08rem; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.rev-fiche h2 i { color: var(--brand); width: 1.2em; text-align: center; }
.rev-prose { line-height: 1.8; color: var(--ink-secondary); font-size: .95rem; }
.rev-fiche ul { margin: 0; padding-left: 1.15rem; }
.rev-fiche li { margin-bottom: 10px; line-height: 1.6; }
.rev-defs { margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.rev-defs div { padding: 16px 18px; border-radius: 14px; background: var(--brand-muted); border: 1px solid var(--line); }
.rev-defs dt { font-weight: 700; margin: 0; font-size: .95rem; color: var(--brand); }
.rev-defs dd { margin: 8px 0 0; color: var(--ink-muted); font-size: .88rem; line-height: 1.55; }
.rev-formules { padding-left: 0; list-style: none; display: grid; gap: 10px; }
.rev-formules li {
  margin: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
}
.rev-formules code { font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.rev-concepts { display: grid; gap: 12px; }
.rev-concepts article {
  margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
}
.rev-concepts h3 { font-size: 1rem; margin: 0 0 6px; }
.rev-concepts p { margin: 0; color: var(--ink-muted); font-size: .9rem; line-height: 1.55; }
.rev-toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px;
}
.rev-toc a {
  font-size: .8rem; font-weight: 600; text-decoration: none;
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-secondary);
}
.rev-toc a:hover { border-color: var(--brand); color: var(--brand); }
.rev-print { float: right; }

.rev-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 12px 0 16px; }
.rev-filters label { display: grid; gap: 6px; margin: 0; min-width: 0; flex: 1 1 160px; }
.rev-filters .form-label { margin: 0; font-size: .75rem; font-weight: 600; color: var(--ink-muted); }
.rev-filters .form-select,
.rev-filters select {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 42px;
}
.rev-ia-banner {
  margin-top: 16px;
  border-color: var(--brand-light) !important;
}
.rev-ia-banner p { margin: 0 0 12px; }
.rev-exam-setup { margin-top: 20px; max-width: 720px; }
.rev-exam-setup h2 { font-size: 1.1rem; margin: 0 0 8px; }
.rev-exam-form { display: grid; gap: 16px; }
.rev-exam-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rev-exam-fields .form-label { display: block; margin-bottom: 6px; }
.rev-exam-fields .form-select,
.rev-exam-fields select { height: 46px; }
.rev-q-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.rev-question { margin-top: 16px; }
.rev-question h2, .rev-question legend {
  font-size: 1.05rem; font-weight: 600; margin-bottom: 12px;
}
.rev-option {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; margin: 8px 0; cursor: pointer;
  background: var(--surface);
}
.rev-option:hover, .rev-option:focus-within { border-color: var(--brand-light); background: var(--brand-muted); }
.rev-option kbd {
  font-size: .7rem; min-width: 1.4rem; text-align: center;
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; color: var(--ink-muted);
}
.rev-correction { padding: 14px 16px; border-radius: 12px; margin: 12px 0; }
.rev-correction.is-ok { background: var(--success-bg, #ecfdf5); }
.rev-correction.is-ko { background: #fef2f2; }
.rev-correction.is-open { background: var(--brand-muted); }
.rev-correction h3 { font-size: 1rem; margin: 0 0 8px; }

.rev-exam-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.rev-timer { font-weight: 700; font-size: 1.1rem; color: var(--brand); margin: 0; }
.rev-exam-progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 8px 0 18px; }
.rev-exam-progress > span { display: block; height: 100%; background: var(--brand); transition: width .2s ease; }
.rev-exam-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 16px; }
.rev-q-step { display: none; }
.rev-q-step.is-on { display: block; }

/* Examen blanc — structure de jeu */
.rev-exam-play { max-width: 760px; }
.rev-exam-shell {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow, 0 8px 24px rgba(15, 23, 42, .05));
}
.rev-exam-eyebrow {
  margin: 0 0 4px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-family: var(--font-display, inherit);
}
.rev-exam-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-display, inherit);
  line-height: 1.3;
  color: var(--ink);
}
.rev-exam-pos {
  margin: 6px 0 0;
  font-size: .9rem;
  color: var(--ink-muted);
}
.rev-exam-form-play { display: grid; gap: 4px; }
.rev-exam-play .rev-question {
  margin: 0;
  padding: 4px 0 8px;
  border: none;
  background: transparent;
  box-shadow: none;
}
.rev-q-legend {
  font-size: 1.08rem;
  font-weight: 600;
  font-family: var(--font-display, inherit);
  margin: 0 0 10px;
  line-height: 1.45;
  color: var(--ink);
  float: none;
  width: 100%;
  max-width: 100%;
  padding: 0;
  /* Un texte à trous (« Gestion et pilotage — ______ ») est un seul « mot »
     pour le navigateur : sans coupure forcée, il déborde de la carte. */
  overflow-wrap: anywhere;
  word-break: break-word;
}
.rev-exam-play .rev-option span,
.rev-exam-play .rev-q-meta { overflow-wrap: anywhere; min-width: 0; }
.rev-options { display: grid; gap: 8px; margin-top: 4px; }
.rev-exam-play .rev-option {
  margin: 0;
  align-items: center;
  transition: border-color .15s ease, background .15s ease;
}
.rev-exam-play .rev-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-muted, rgba(74, 98, 135, .08));
}
.rev-exam-nav-end { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.rev-timer.is-urgent { color: #b91c1c; }
.rev-deck-meta { margin: 16px 0 8px; font-size: .9rem; }

.rev-session-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.rev-session-card {
  min-height: 240px; border: 1px solid var(--line); border-radius: 18px;
  padding: 28px 24px; background: var(--surface); text-align: center;
}
.rev-session-card h2 { font-size: 1.2rem; margin: 12px 0; }
.rev-session-card .rev-verso { font-size: 1.02rem; line-height: 1.6; color: var(--ink-secondary); }
.rev-session-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }

.ia-flashdeck { margin-top: 12px; }
.ia-flashdeck-toolbar, .ia-flashdeck-controls, .ia-flashdeck-score {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between;
}
.ia-flashdeck-progress-wrap { flex: 1; min-width: 140px; }
.ia-flashdeck-progress-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.ia-flashdeck-progress-fill { height: 100%; background: var(--brand); }
.ia-flashdeck-stage { margin: 16px 0; }
.ia-flashdeck-card {
  width: 100%; min-height: 240px; border: 1px solid var(--line);
  border-radius: 18px; background: var(--surface); cursor: pointer; padding: 0;
  box-shadow: var(--shadow, 0 8px 24px rgba(15, 23, 42, .06));
}
.ia-flashdeck-card-inner { display: block; min-height: 240px; padding: 28px 24px; text-align: center; }
.ia-flashdeck-text { display: block; font-size: 1.2rem; font-weight: 600; margin: 16px 0; line-height: 1.5; }
.ia-flashdeck-tag, .ia-flashdeck-hint { display: block; font-size: .8rem; color: var(--ink-muted); }
.ia-flashdeck-card.is-flipped .ia-flashdeck-front { display: none; }
.ia-flashdeck-card:not(.is-flipped) .ia-flashdeck-back { display: none; }
.ia-flashdeck-summary { margin-top: 16px; }

/* Bilan de fin de série (Questions) */
.rev-bilan { margin-top: 16px; text-align: center; padding: 36px 24px; }
.rev-bilan-icon { font-size: 2rem; color: var(--brand); margin-bottom: 10px; }
.rev-bilan h2 { font-size: 1.2rem; margin: 0 0 4px; }
.rev-bilan-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 20px 0; }
.rev-bilan-stats > div {
  min-width: 120px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line);
  display: grid; gap: 2px;
}
.rev-bilan-stats strong { font-size: 1.6rem; line-height: 1.1; }
.rev-bilan-stats span { font-size: .78rem; color: var(--ink-muted); }
.rev-bilan-stats .is-ok { background: #ecfdf5; border-color: #a7f3d0; }
.rev-bilan-stats .is-ok strong { color: #047857; }
.rev-bilan-stats .is-ko { background: #fef2f2; border-color: #fecaca; }
.rev-bilan-stats .is-ko strong { color: #b91c1c; }
.rev-bilan-stats .is-open { background: var(--brand-muted); }
.rev-bilan-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* Identité visuelle par mode : examen blanc / session / flashcards */
.rev-mode { --rev-accent: var(--brand); --rev-accent-2: var(--brand); --rev-tint: var(--brand-muted); }
.rev-mode-examen {
  --rev-accent: #1e293b; --rev-accent-2: #334155; --rev-tint: #eef2f7;
}
.rev-mode-session {
  --rev-accent: #ea580c; --rev-accent-2: #f59e0b; --rev-tint: #fff4e8;
}
.rev-mode-flashcards {
  --rev-accent: #7c3aed; --rev-accent-2: #c026d3; --rev-tint: #f5f0ff;
}
.rev-mode {
  --brand: var(--rev-accent);
  --brand-light: var(--rev-accent-2);
  --brand-muted: var(--rev-tint);
  --accent-gradient: linear-gradient(135deg, var(--rev-accent), var(--rev-accent-2));
}
.rev-mode .btn-primary { box-shadow: 0 4px 14px color-mix(in srgb, var(--rev-accent) 30%, transparent); }

.rev-mode-hero {
  display: flex; gap: 16px; align-items: center;
  padding: 18px 22px; margin: 0 0 18px;
  border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, var(--rev-accent), var(--rev-accent-2));
  position: relative; overflow: hidden;
}
.rev-mode-hero h2 { margin: 0 0 2px; font-size: 1.2rem; color: #fff; }
.rev-mode-hero p { margin: 0; font-size: .88rem; color: rgba(255,255,255,.88); line-height: 1.45; }
.rev-mode-hero .rev-mode-hero-kicker {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.75);
}
.rev-mode-hero-icon {
  flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 14px; background: rgba(255,255,255,.16); font-size: 1.35rem;
}

/* Examen : salle d'épreuve — sobre, cadré, angles nets */
.rev-mode-examen .rev-mode-hero { border-radius: 10px; }
.rev-mode-examen .rev-mode-hero::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 22px, rgba(255,255,255,.05) 22px 23px);
  pointer-events: none;
}
.rev-mode-examen .rev-exam-setup,
.rev-mode-examen .rev-exam-shell { border-radius: 10px; border-top: 4px solid var(--rev-accent); }
.rev-mode-examen .rev-exam-shell { box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }
.rev-mode-examen .rev-option { border-radius: 6px; }
.rev-mode-examen .rev-option kbd { background: var(--rev-accent); color: #fff; border-color: var(--rev-accent); }
.rev-mode-examen .rev-timer {
  font-variant-numeric: tabular-nums; padding: 6px 12px; border-radius: 8px;
  background: var(--rev-accent); color: #fff;
}
.rev-mode-examen .rev-timer.is-urgent { background: #b91c1c; color: #fff; }

/* Session : élan quotidien — chaud, arrondi */
.rev-mode-session .rev-mode-hero { border-radius: 24px; }
.rev-mode-session .rev-plan { border-radius: 24px; background: linear-gradient(180deg, var(--rev-tint), var(--surface)); }
.rev-mode-session .rev-plan::before { background: linear-gradient(180deg, var(--rev-accent), var(--rev-accent-2)); }
.rev-mode-session .rev-chip { background: #fff; border: 1px solid #fed7aa; color: #c2410c; }
.rev-mode-session .rev-exam-progress { height: 10px; background: #ffedd5; }
.rev-mode-session .rev-exam-progress > span { background: linear-gradient(90deg, var(--rev-accent), var(--rev-accent-2)); }
.rev-mode-session .rev-session-card,
.rev-mode-session .rev-question { border-radius: 24px; border: 2px solid #fed7aa; background: var(--surface); }
.rev-mode-session .rev-option { border-radius: 999px; padding: 10px 16px; }

/* Flashcards : paquet de cartes — relief, pile */
.rev-mode-flashcards .rev-mode-hero { border-radius: 18px 18px 18px 4px; }
.rev-mode-flashcards .ia-flashdeck-stage { position: relative; padding: 0 8px 12px; }
.rev-mode-flashcards .ia-flashdeck-stage::before,
.rev-mode-flashcards .ia-flashdeck-stage::after {
  content: ""; position: absolute; left: 24px; right: 24px; height: 100%;
  border-radius: 18px; border: 1px solid #ddd6fe; background: var(--rev-tint); z-index: 0;
}
.rev-mode-flashcards .ia-flashdeck-stage::before { bottom: 0; transform: rotate(-1.5deg); }
.rev-mode-flashcards .ia-flashdeck-stage::after { bottom: 6px; left: 16px; right: 16px; transform: rotate(1deg); }
.rev-mode-flashcards .ia-flashdeck-card {
  position: relative; z-index: 1; border: 2px solid #ddd6fe;
  box-shadow: 0 14px 30px rgba(124, 58, 237, .14);
}
.rev-mode-flashcards .ia-flashdeck-card.is-flipped { background: linear-gradient(160deg, #faf5ff, var(--surface)); border-color: var(--rev-accent); }
.rev-mode-flashcards .ia-flashdeck-tag { color: var(--rev-accent); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* Laisser défiler le contenu au-dessus du bouton flottant de l'assistant IA */
.rev-page { padding-bottom: 88px; }
.ia-flashdeck-controls { justify-content: center; }

@media (max-width: 800px) {
  .rev-hero, .rev-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  /* Les 6 onglets + icônes + nowrap du dashboard débordent à 375 px.
     Grille 3×2, libellés autorisés à passer à la ligne. */
  .rev-tabs.dash-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: visible;
    flex-wrap: unset;
  }
  .rev-tabs .dash-tab {
    white-space: normal;
    flex: none;
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 8px 4px;
    font-size: .72rem;
    line-height: 1.25;
    margin-bottom: 0;
  }
  body.dashboard-app:has(.rev-page) .page-heading h1 {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
@media (max-width: 700px) {
  .rev-grid, .rev-hero, .rev-kpis, .rev-exam-fields { grid-template-columns: 1fr; }
  .rev-exam-head { flex-direction: column; align-items: flex-start; }
  .ia-flashdeck-card, .ia-flashdeck-card-inner { min-height: 180px; }
  .rev-print { float: none; display: inline-flex; margin-bottom: 8px; }
  .rev-exam-shell { padding: 18px 14px 16px; min-width: 0; }
  .rev-exam-nav { flex-direction: column-reverse; align-items: stretch; }
  .rev-exam-nav-end {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
  }
  .rev-exam-nav .btn,
  .rev-exam-nav-end .btn { width: 100%; justify-content: center; }
  .rev-actions { flex-direction: column; align-items: stretch; }
  .rev-actions form,
  .rev-actions .btn { width: 100%; }
  .rev-actions .btn { justify-content: center; }
  .rev-session-actions { flex-direction: column; align-items: stretch; }
  .rev-session-actions kbd { display: none; }
  .rev-session-actions form,
  .rev-session-actions .btn { width: 100%; }
  .rev-session-actions form .btn { width: 100%; justify-content: center; }
  .rev-ia-banner .btn { width: 100%; justify-content: center; }
  .rev-filters { flex-direction: column; align-items: stretch; }
  .rev-filters label { flex: 1 1 auto; }
  .rev-question h2,
  .rev-exam-title,
  .ia-flashdeck-text { overflow-wrap: anywhere; word-break: break-word; }
  .rev-option { min-width: 0; }
  .rev-option span { min-width: 0; overflow-wrap: anywhere; }
  .rev-mode-hero { padding: 14px 16px; gap: 12px; }
  .rev-mode-hero-icon { width: 42px; height: 42px; font-size: 1.1rem; }
  .rev-mode-hero p:not(.rev-mode-hero-kicker) { display: none; }
  .ia-flashdeck-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ia-flashdeck-controls .btn { width: 100%; justify-content: center; }
  .ia-flashdeck-controls [data-flashdeck-flip] { grid-column: 1 / -1; order: -1; }
  body:has(.rev-page) .ia-widget { right: 14px; bottom: 14px; }
  body:has(.rev-page) .ia-widget-toggle { width: 46px; height: 46px; font-size: 1.1rem; }
}
@media (max-width: 400px) {
  .rev-tabs.dash-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
  .rev-tabs, .rev-back, .rev-print, .rev-actions, .welcome-banner, .dash-tabs, .sidebar, .topbar, nav, footer, .btn { display: none !important; }
  .rev-page { max-width: none; }
  .rev-fiche { break-inside: avoid; }
}

/* Fiche de révision IA (affichage page) */
.ia-revision-card .form-label {
  font-weight: 700;
  font-family: var(--font-display, inherit);
}
.ia-revision-sheet-wrap,
.ia-revision-sheet {
  max-width: 820px;
}
.ia-revision-sheet {
  line-height: 1.65;
  color: var(--ink, #0f172a);
  font-size: .9rem;
  font-family: inherit;
  font-weight: 400;
}
.ia-revision-sheet h1,
.ia-revision-sheet h2,
.ia-revision-sheet h3,
.ia-revision-sheet .ia-chat-section {
  font-family: inherit;
  font-weight: 500;
  line-height: 1.4;
  margin: 1.1em 0 .45em;
  color: var(--ink, #0f172a);
}
.ia-revision-sheet h1 { font-size: 1.05rem; }
.ia-revision-sheet h2 {
  font-size: .95rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid var(--line, #e2e8f0);
}
.ia-revision-sheet h3 { font-size: .92rem; color: var(--ink, #0f172a); }
.ia-revision-sheet p,
.ia-revision-sheet .ia-chat-p { margin: 0 0 .65em; font-weight: 400; }
.ia-revision-sheet ul,
.ia-revision-sheet ol {
  margin: 0 0 .85em;
  padding-left: 1.25rem;
}
.ia-revision-sheet li { margin: .25em 0; font-weight: 400; }
.ia-revision-sheet strong,
.ia-revision-sheet em { font-weight: inherit; font-style: normal; color: inherit; }
.ia-revision-sheet code {
  font-size: .88em;
  padding: .1em .35em;
  border-radius: 6px;
  background: var(--bg-subtle, #f1f5f9);
}
