/* Exercice de crise */
.cr { --cr-ink: #0f172a; --cr-muted: #64748b; --cr-line: #e2e8f0; --cr-accent: #b91c1c; --cr-ok: #15803d; --cr-mid: #b45309; --cr-ko: #b91c1c;
  color: var(--cr-ink); background: var(--site-bg, #f1f5f9); min-height: 70vh; }   /* fond : dégradé de Typographie */
.cr *, .cr *::before, .cr *::after { box-sizing: border-box; }
.cr-wrap { max-width: 1320px; margin: 0 auto; padding: 0 2rem; }   /* même largeur que l'en-tête du site (.nav-inner) */
.cr-hero { background: radial-gradient(circle at 85% 0%, #7f1d1d 0%, #111827 62%); color: #fee2e2; padding: 2rem 0 1.4rem; }
.cr-kicker { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fca5a5; margin: 0 0 .4rem; }
.cr-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; color: #fff; margin: 0; }
.cr-body { padding-top: 1.5rem; padding-bottom: 3rem; }
.cr-card { background: #fff; border: 1px solid var(--cr-line); border-radius: 16px; padding: clamp(1.1rem, 3vw, 1.8rem); box-shadow: 0 6px 24px rgba(15, 23, 42, .06); margin-bottom: 1.2rem; }
.cr-h { font-size: 1.25rem; font-weight: 800; margin: 0 0 1rem; }
.cr-muted { color: var(--cr-muted); }
.cr .small { font-size: .85rem; }
.cr-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.cr-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.2rem; border-radius: 10px; border: 1px solid #cbd5e1; background: #fff; color: var(--cr-ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.cr-btn:hover { border-color: var(--cr-accent); color: var(--cr-accent); }
.cr-btn.primary { background: var(--cr-accent); border-color: var(--cr-accent); color: #fff; }
.cr-btn.primary:hover { background: #991b1b; color: #fff; }
.cr-btn.ghost { background: transparent; }
.cr-btn.big { font-size: 1.1rem; padding: .9rem 1.5rem; }
.cr button:focus-visible, .cr a:focus-visible, .cr input:focus-visible, .cr textarea:focus-visible, .cr summary:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
.cr-input { width: 100%; font: inherit; padding: .6rem .8rem; border-radius: 8px; border: 1px solid #cbd5e1; margin-top: .3rem; }

/* Accueil */
.cr-intro { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .cr-intro { grid-template-columns: 1.3fr 1fr; } }
.cr-intro h2 { font-size: 1.35rem; font-weight: 800; margin: 0 0 .6rem; }
.cr-intro p { line-height: 1.65; }
.cr-facts { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .4rem; }
.cr-facts i { color: var(--cr-accent); margin-right: .3rem; }
.cr-steps { margin: 0; padding: 1rem 1rem 1rem 2.2rem; background: #fef2f2; border-radius: 12px; display: grid; gap: .6rem; line-height: 1.5; }
.cr-resume { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; border-color: #fca5a5; }
.cr-resume > i { font-size: 2rem; color: var(--cr-accent); }
.cr-resume > div { flex: 1; }
.cr-resume span { display: block; color: var(--cr-muted); }
.cr fieldset { border: 1px solid var(--cr-line); border-radius: 12px; padding: 1rem 1.2rem; margin: 0 0 1rem; }
.cr legend { font-weight: 800; font-size: 1rem; padding: 0 .4rem; width: auto; float: none; margin: 0; }
.cr-scenarios { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.cr-scenario { --s: var(--cr-accent); display: flex; gap: .7rem; align-items: flex-start; border: 2px solid var(--cr-line); border-radius: 14px; padding: 1rem; cursor: pointer; }
.cr-scenario:has(input:checked) { border-color: var(--s); background: color-mix(in srgb, var(--s) 6%, #fff); }
.cr-scenario input { margin-top: .3rem; }
.cr-scenario-top { display: block; font-size: 1.05rem; }
.cr-scenario-top i { color: var(--s); }
.cr-scenario small { display: block; color: #334155; margin: .3rem 0 .5rem; line-height: 1.45; }
.cr-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.cr-tags em { font-style: normal; font-size: .72rem; font-weight: 600; background: #f1f5f9; border-radius: 999px; padding: .1rem .55rem; }
.cr-meta { display: block; margin-top: .5rem; font-size: .82rem; color: var(--cr-muted); }
.cr-radios { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.cr-radios label { cursor: pointer; }
.cr-grid2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.cr-grid2 label { font-weight: 600; font-size: .9rem; }
.cr-more { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Rôles */
.cr-roles { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); margin: 1rem 0; }
.cr-role { border: 1px solid var(--cr-line); border-radius: 14px; padding: 1rem; background: #f8fafc; }
.cr-role i { font-size: 1.6rem; color: var(--cr-accent); }
.cr-role strong { display: block; margin: .4rem 0 .3rem; font-size: 1.05rem; }
.cr-role p { margin: 0; font-size: .88rem; line-height: 1.45; color: #334155; }
.cr-situation { background: #fef2f2; border-radius: 12px; padding: 1rem 1.2rem; }
.cr-situation h3 { font-size: 1rem; font-weight: 800; margin: 0 0 .4rem; }
.cr-situation p { margin: 0; }

/* Barre de l'animateur */
.cr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.5rem; margin-top: 1rem; }
.cr-inds { display: grid; grid-template-columns: repeat(2, minmax(170px, 1fr)); gap: .4rem 1.2rem; flex: 1 1 380px; }
.cr-ind { display: grid; grid-template-columns: 7.5rem 1fr 2rem; align-items: center; gap: .5rem; font-size: .85rem; }
.cr-ind b { color: #fff; text-align: right; font-variant-numeric: tabular-nums; }
.cr-ind-bar { height: 9px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.cr-ind-bar span { display: block; height: 100%; background: #22c55e; transition: width .7s ease; }
.cr-ind-bar span.is-mid { background: #f59e0b; }
.cr-ind-bar span.is-low { background: #ef4444; }
.cr-timer { font-size: clamp(1.2rem, 2.6vw, 1.8rem); font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.cr-timer.is-short { color: #fbbf24; }
.cr-timer.is-late { color: #fca5a5; animation: cr-blink 1s infinite; }
.cr-timer.is-done { color: #86efac; font-size: 1.1rem; }
.cr-paused { font-size: .8rem; vertical-align: middle; background: #f59e0b; color: #111827; border-radius: 6px; padding: .1rem .5rem; }
@keyframes cr-blink { 50% { opacity: .55; } }
.cr-tools { display: flex; flex-wrap: wrap; gap: .4rem; }
.cr-tool { font: inherit; font-size: .85rem; font-weight: 600; color: #fee2e2; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; padding: .45rem .8rem; cursor: pointer; }
.cr-tool:hover { background: rgba(255, 255, 255, .18); color: #fff; }

/* Événement */
.cr-event-head { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
.cr-alert { display: inline-flex; align-items: center; gap: .4rem; background: #fee2e2; color: #991b1b; font-weight: 800; border-radius: 999px; padding: .3rem .9rem; animation: cr-ring .8s ease 2; }
@keyframes cr-ring { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
.cr-clock { font-weight: 700; color: #334155; }
.cr-from { margin: .9rem 0 .2rem; color: var(--cr-muted); font-weight: 600; }
.cr-event h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin: .2rem 0 .6rem; }
.cr-text { font-size: 1.12rem; line-height: 1.65; margin: 0 0 .8rem; }
.cr-concerned { margin: 0 0 .8rem; color: var(--cr-muted); }
.cr-chip { display: inline-flex; align-items: center; gap: .3rem; margin: .2rem .3rem 0 0; background: #f1f5f9; border-radius: 999px; padding: .15rem .6rem; color: var(--cr-ink); font-size: .85rem; }
.cr-debate { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: .7rem 1rem; margin-bottom: 1rem; }
.cr-debate summary { cursor: pointer; font-weight: 700; color: #92400e; }
.cr-debate ul { margin: .5rem 0 0; padding-left: 1.3rem; line-height: 1.6; font-size: 1.05rem; }
.cr-q { font-size: 1.1rem; font-weight: 800; margin: 0 0 .6rem; }
.cr-choices { display: grid; gap: .6rem; }
.cr-choice { display: flex; gap: .8rem; align-items: flex-start; text-align: left; font: inherit; font-size: 1.05rem; line-height: 1.45; padding: .9rem 1rem; border-radius: 12px; border: 2px solid #cbd5e1; background: #fff; color: inherit; cursor: pointer; }
.cr-choice:hover:not(:disabled) { border-color: var(--cr-accent); background: #fff7f7; }
.cr-choice:disabled { cursor: default; }
.cr-letter { flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: #f1f5f9; }
.cr-choice.is-chosen { border-width: 3px; }
.cr-choice.is-chosen.q-best { border-color: var(--cr-ok); background: #f0fdf4; }
.cr-choice.is-chosen.q-ok { border-color: #f59e0b; background: #fffbeb; }
.cr-choice.is-chosen.q-bad { border-color: var(--cr-ko); background: #fef2f2; }
.cr-choice.is-best { border-color: #86efac; border-style: dashed; }
.cr-choice.is-other { opacity: .55; }
.cr-outcome { margin-top: 1.2rem; border-radius: 14px; padding: 1.1rem 1.2rem; border: 1px solid; }
.cr-outcome.is-new { animation: cr-in .4s ease; }
@keyframes cr-in { from { opacity: 0; transform: translateY(8px); } }
.cr-outcome.q-best { background: #f0fdf4; border-color: #bbf7d0; }
.cr-outcome.q-ok { background: #fffbeb; border-color: #fde68a; }
.cr-outcome.q-bad { background: #fef2f2; border-color: #fecaca; }
.cr-outcome-title { font-size: 1.2rem; font-weight: 800; margin: 0 0 .5rem; }
.q-best .cr-outcome-title, td.q-best { color: var(--cr-ok); }
.q-ok .cr-outcome-title, td.q-ok { color: var(--cr-mid); }
.q-bad .cr-outcome-title, td.q-bad { color: var(--cr-ko); }
.cr-cons { font-size: 1.08rem; line-height: 1.6; margin: 0 0 .6rem; }
.cr-deltas { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.cr-delta { font-weight: 700; font-size: .9rem; border-radius: 999px; padding: .2rem .7rem; }
.cr-delta.up { background: #dcfce7; color: #166534; }
.cr-delta.down { background: #fee2e2; color: #991b1b; }
.cr-bestwas, .cr-lesson { margin: 0 0 .6rem; padding: .6rem .8rem; background: #fff; border-radius: 8px; line-height: 1.5; }
.cr-bestwas i { color: #d97706; }
.cr-lesson i { color: #2563eb; }
.cr-notes span { display: block; font-weight: 600; font-size: .9rem; color: #334155; }

/* Rapport */
.cr-report-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.cr-kicker2 { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cr-accent); margin: 0; }
.cr-report h2 { font-size: 1.5rem; font-weight: 800; margin: .3rem 0; }
.cr-report h3 { font-size: 1.1rem; font-weight: 800; margin: 1.4rem 0 .6rem; }
.cr-verdict { text-align: center; border-radius: 14px; padding: .8rem 1.2rem; min-width: 160px; border: 2px solid; }
.cr-verdict strong { display: block; font-size: 1.8rem; }
.cr-verdict.v-ok { border-color: #86efac; background: #f0fdf4; color: var(--cr-ok); }
.cr-verdict.v-mid { border-color: #fcd34d; background: #fffbeb; color: var(--cr-mid); }
.cr-verdict.v-ko { border-color: #fca5a5; background: #fef2f2; color: var(--cr-ko); }
.cr-report-inds { display: grid; gap: .5rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin: 1rem 0; }
.cr-report-inds > div { display: grid; grid-template-columns: 8rem 1fr 3.5rem; gap: .5rem; align-items: center; font-size: .9rem; }
.cr-report-inds .cr-ind-bar { background: #e2e8f0; }
.cr-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cr-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--cr-muted); border-bottom: 2px solid var(--cr-line); padding: .5rem; }
.cr-table td { border-bottom: 1px solid var(--cr-line); padding: .6rem .5rem; vertical-align: top; }
.cr-table td:last-child { white-space: nowrap; font-weight: 700; }
.cr-note { color: #475569; }
.cr-work { padding-left: 1.3rem; display: grid; gap: .4rem; line-height: 1.55; }
@media (max-width: 700px) {
  .cr-inds { grid-template-columns: 1fr; }
  .cr-table thead { display: none; }
  .cr-table tr { display: block; border-bottom: 2px solid var(--cr-line); padding: .4rem 0; }
  .cr-table td { display: block; border: 0; padding: .2rem 0; white-space: normal !important; }
}
.cr:fullscreen { overflow-y: auto; background: var(--site-bg, #f1f5f9); }

/* Impression : seul le rapport */
@media print {
  body * { visibility: hidden !important; }
  #crReport, #crReport * { visibility: visible !important; }
  #crReport { position: absolute; left: 0; top: 0; width: 100%; border: 0; box-shadow: none; padding: 0; }
  .cr-noprint { display: none !important; }
  .cr-ind-bar span, .cr-verdict { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) { .cr-alert, .cr-timer.is-late, .cr-outcome.is-new { animation: none; } }

/* Héros : même style que le tableau de bord (réglages admin/dashboard_hero.php, champs vides = Typographie) */
.cr-hero.crh { color: var(--td-hero-text, #fee2e2); }
.cr-hero.crh.is-light { --td-hero-text: var(--c-title, #111c2d); }
.crh h1 { color: var(--td-hero-text, #fff); }
.crh .cr-kicker { color: var(--td-acc1, var(--c-eyebrow, var(--gold, #fca5a5))); }
.crh.is-light .cr-ind b, .crh.is-light .cr-timer { color: var(--td-hero-text); }
.crh.is-light .cr-timer.is-short { color: #b45309; }
.crh.is-light .cr-timer.is-late { color: #b91c1c; }
.crh.is-light .cr-timer.is-done { color: #15803d; }
.crh.is-light .cr-ind-bar { background: rgba(15, 23, 42, .1); }
.crh.is-light .cr-tool { color: var(--td-hero-text); background: rgba(15, 23, 42, .05); border-color: rgba(15, 23, 42, .18); }
.crh.is-light .cr-tool:hover { background: rgba(15, 23, 42, .1); color: var(--td-hero-text); }

/* Roue de la fortune : tirage du scénario */
.cr-wheel-box { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.5rem; margin: .4rem 0 1.4rem; padding: 1.2rem; border-radius: 16px; background: #f8fafc; border: 1px dashed var(--cr-line); }
.cr-wheel { position: relative; width: min(320px, 100%); flex-shrink: 0; }
.cr-wheel-svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 22px rgba(15, 23, 42, .18)); }
.cr-wheel-txt { fill: #fff; font-size: 11px; font-weight: 700; paint-order: stroke; stroke: rgba(0, 0, 0, .25); stroke-width: 2px; }
.cr-wheel-pin { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent;
  border-top: 26px solid var(--gold, var(--cr-ink)); z-index: 2; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.cr-wheel-side { flex: 1 1 260px; }
.cr-wheel-side h3 { font-size: 1.15rem; font-weight: 800; margin: 0 0 .4rem; display: flex; align-items: center; gap: .5rem; }
.cr-wheel-side h3 .bi { color: var(--gold, var(--cr-accent)); }
.cr-wheel-res { margin: .9rem 0 0; font-size: 1.05rem; min-height: 1.5em; }
.cr-wheel-res .bi { color: #f59e0b; }
.cr-scenario.is-drawn { animation: cr-drawn 1.6s ease; }
@keyframes cr-drawn { 0%, 60% { box-shadow: 0 0 0 4px #f59e0b; } 100% { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .cr-scenario.is-drawn { animation: none; } }

/* Options de séance */
.cr-opts { display: grid; gap: .5rem; margin-top: .8rem; }
.cr-opts label { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; cursor: pointer; line-height: 1.45; }
.cr-opts input { margin-top: .25rem; }

/* Fiches de rôle : préparées sur la page, visibles seulement à l'impression (jamais sur l'écran projeté) */
.cr-sheets-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; margin: 1rem 0; padding: .9rem 1.1rem; border-radius: 12px; background: #f8fafc; border: 1px dashed var(--cr-line); }
.cr-sheets-cta strong { display: block; }
.cr-sheets-cta span { font-size: .88rem; }
.cr-sheets { display: none; }
.cr-sheet h2 { font-size: 1.5rem; margin: .2rem 0 1rem; }
.cr-sheet h3 { font-size: 1rem; margin: 1rem 0 .3rem; }
.cr-secret { margin-top: 1.4rem; padding: 1rem 1.2rem; border: 2px dashed #111827; border-radius: 12px; }
.cr-secret h3 { margin-top: 0; }
.cr-secret small { display: block; margin-top: .4rem; color: #475569; }
@media print {
  body.cr-printing-sheets * { visibility: hidden !important; }
  body.cr-printing-sheets #crSheets, body.cr-printing-sheets #crSheets * { visibility: visible !important; }
  body.cr-printing-sheets #crSheets { display: block !important; position: absolute; left: 0; top: 0; width: 100%; }
  body.cr-printing-sheets #crReport { display: none !important; }
  .cr-sheet { page-break-after: always; break-after: page; padding: 1cm 0; }
  .cr-plan .cr-input { border: 0; padding: 0; background: none; }
}

/* Coup de théâtre */
.cr-event.is-surprise { border: 2px solid #f59e0b; box-shadow: 0 0 0 6px rgba(245, 158, 11, .12); }
.cr-alert.cr-twist { background: #f59e0b; color: #111827; margin-right: .5rem; }
.cr-table tr.is-surprise td { background: #fffbeb; }
.cr-table tr.is-surprise .bi-lightning-charge-fill { color: #d97706; }

/* Plan d'action */
.cr-plan td { vertical-align: top; }
.cr-plan .cr-input { min-width: 0; width: 100%; margin: 0; padding: .4rem .55rem; font-size: .88rem; }
.cr-plan th:nth-child(2), .cr-plan th:nth-child(3) { width: 9.5rem; }
.cr-guide-link { white-space: nowrap; font-size: .82rem; }

/* Évolution sur le scénario */
.cr-history { margin: 1rem 0 1.4rem; padding: 1rem 1.2rem; border-radius: 12px; background: #f8fafc; border: 1px solid var(--cr-line); }
.cr-history h3 { margin-top: 0; }
.cr-history-row { display: flex; align-items: flex-end; gap: .8rem; margin: .6rem 0; }
.cr-history-pt { display: flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 3.4rem; font-size: .78rem; }
.cr-history-bar { display: flex; align-items: flex-end; width: 1.6rem; height: 70px; border-radius: 6px; background: #e2e8f0; overflow: hidden; }
.cr-history-bar span { display: block; width: 100%; background: #94a3b8; }
.cr-history-pt.is-now .cr-history-bar span { background: var(--gold, var(--cr-accent)); }
.cr-history-pt b { font-size: .95rem; }
.cr-history-pt small { color: var(--cr-muted); }
@media print { .cr-history-bar span { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
