/* Réflexe — fiches, cartes, fenêtres, pastilles
   Extrait de index.html sans aucune modification de règle.
   L'ordre de chargement reproduit exactement la cascade d'origine :
   base.css → layout.css → components.css → features.css */

  .fiche{ background:var(--paper); color:var(--paper-ink); border-radius:10px; overflow:hidden; min-height:460px; display:flex; flex-direction:column; position:relative; box-shadow:0 12px 32px rgba(0,0,0,0.35); }
  .fiche-tab{ height:10px; background:var(--accent); }
  .fiche-tab.tab-quiz{ background:#4A7FBF; }
  .fiche-tab.tab-scenario{ background:var(--alert); }
  .fiche-tab.tab-slideshow{ background:#B98BD6; }
  .fiche-tab.tab-flashcards{ background:#D6A94F; }
  .fiche-title-bar{ padding:16px 26px 0; font-family:'IBM Plex Mono',monospace; font-size:0.72rem; text-transform:uppercase; letter-spacing:0.08em; color:#5c6b6f; }
  .fiche-body{ padding:10px 26px 20px; flex:1; overflow-y:auto; max-height:480px; }
  .fiche-body pre{ white-space:pre-wrap; font-family:'IBM Plex Sans',sans-serif; font-size:0.92rem; line-height:1.6; }
  .fiche-empty{ display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; min-height:460px; color:#5c6b6f; text-align:center; padding:30px; }
  .fiche-empty .mono{ font-size:0.75rem; letter-spacing:0.08em; text-transform:uppercase; margin-top:10px; }

  .gate-overlay{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; background:linear-gradient(to top, rgba(244,241,232,0.98) 40%, rgba(244,241,232,0.6) 70%, rgba(244,241,232,0)); padding:26px; text-align:center; }
  .gate-overlay p{ color:var(--paper-ink); font-weight:600; margin-bottom:12px; max-width:32ch; }
  .fiche-actions{ display:flex; gap:10px; padding:14px 26px; border-top:1px solid rgba(20,38,46,0.1); background:var(--paper); }
  .fiche-actions .btn{ flex:1; justify-content:center; }
  .fiche-actions .btn-primary{ background:var(--paper-ink); color:var(--paper); }
  .fiche-actions .btn-primary:hover{ background:#233c46; }
  .fiche-actions .btn-ghost{ border-color:#14262E33; color:#14262E; }

  .plan-toggle{ display:flex; gap:10px; margin-bottom:22px; font-size:0.85rem; }
  .plan-toggle button{ flex:1; padding:10px; border-radius:8px; border:1px solid var(--panel-border); background:var(--bg); color:var(--text-muted); cursor:pointer; font-family:'IBM Plex Mono',monospace; font-size:0.75rem; }
  .plan-toggle button.active{ border-color:var(--accent); color:var(--accent); background:rgba(87,201,165,0.08); }
  .demo-note{ font-size:0.78rem; color:var(--text-muted); margin-top:14px; text-align:center; }

  .pricing{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }
  @media (max-width:860px){ .pricing{ grid-template-columns:1fr; } }
  .plan-card{ background:var(--panel); border:1px solid var(--panel-border); border-radius:14px; overflow:hidden; display:flex; flex-direction:column; }
  .plan-tab{ height:6px; }
  .plan-tab.decouverte{ background:#5C6B6F; }
  .plan-tab.formateur{ background:var(--accent); }
  .plan-tab.etablissement{ background:var(--alert); }
  .plan-inner{ padding:28px; display:flex; flex-direction:column; flex:1; }
  .plan-inner h3{ font-size:1.1rem; margin-bottom:6px; }
  .plan-inner .price{ font-family:'Archivo Expanded','IBM Plex Sans',sans-serif; font-size:1.9rem; margin:14px 0 4px; }
  .plan-inner .price span{ font-size:0.85rem; color:var(--text-muted); font-family:'IBM Plex Sans',sans-serif; }
  .plan-inner ul{ list-style:none; margin:20px 0; flex:1; }
  .plan-inner li{ font-size:0.88rem; color:var(--text-muted); padding:7px 0; border-top:1px solid var(--panel-border); }
  .plan-inner li:first-child{ border-top:none; }
  .plan-inner li::before{ content:"✓ "; color:var(--accent); }

  footer{ padding:40px 0 60px; border-top:1px solid var(--panel-border); }
  footer .wrap{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; }
  footer p{ font-size:0.82rem; color:var(--text-muted); }

  .disclaimer{ background:var(--panel-light); border:1px solid var(--panel-border); border-radius:10px; padding:16px 20px; font-size:0.85rem; color:var(--text-muted); margin-top:14px; }
  .disclaimer strong{ color:var(--text); }

  /* ---- Quiz ---- */
  .quiz-score{ font-family:'IBM Plex Mono',monospace; font-size:0.8rem; padding:7px 14px; background:#14262E; color:#F4F1E8; border-radius:100px; display:inline-block; margin-bottom:18px; }
  .quiz-q{ margin-bottom:22px; padding-bottom:18px; border-bottom:1px solid #14262E14; }
  .quiz-q .qtext{ font-weight:600; margin-bottom:12px; font-size:0.96rem; }
  .quiz-opt{ display:block; width:100%; text-align:left; padding:11px 13px; margin-bottom:8px; border:1px solid #14262E30; border-radius:8px; background:#fff; cursor:pointer; font-family:'IBM Plex Sans',sans-serif; font-size:0.9rem; color:#14262E; }
  .quiz-opt:hover:not(:disabled){ border-color:#4A7FBF; }
  .quiz-opt.correct{ border-color:#2E5C50; background:#DFF2EA; font-weight:600; }
  .quiz-opt.incorrect{ border-color:var(--alert); background:#FBE4E0; }
  .quiz-opt:disabled{ cursor:default; }
  .quiz-explain{ font-size:0.85rem; color:#4a5a5f; margin-top:8px; padding:10px 12px; background:#EEF0E9; border-radius:6px; }

  /* ---- Scenario ---- */
  .scenario-text{ font-size:1rem; margin-bottom:20px; line-height:1.65; }
  .scenario-choice{ display:block; width:100%; text-align:left; padding:13px 15px; margin-bottom:10px; border:1px solid #14262E33; border-radius:8px; background:#fff; cursor:pointer; font-size:0.92rem; color:#14262E; }
  .scenario-choice:hover:not(:disabled){ border-color:var(--accent); }
  .scenario-choice:disabled{ cursor:default; opacity:0.6; }
  .scenario-end{ text-align:center; padding:34px 10px; }
  .scenario-end .tag{ font-family:'IBM Plex Mono',monospace; font-size:0.75rem; text-transform:uppercase; letter-spacing:0.08em; padding:6px 14px; border-radius:100px; display:inline-block; margin-bottom:14px; }
  .scenario-end.success .tag{ background:#DFF2EA; color:#1f5c46; }
  .scenario-end.failure .tag{ background:#FBE4E0; color:#a33; }
  .scenario-progress{ font-family:'IBM Plex Mono',monospace; font-size:0.72rem; color:#5c6b6f; margin-bottom:14px; }

  /* ---- Slideshow ---- */
  .slide-heading{ font-family:'IBM Plex Mono',monospace; font-size:0.78rem; text-transform:uppercase; letter-spacing:0.06em; color:#5c6b6f; margin-bottom:14px; }
  .slide-text{ font-size:1.08rem; line-height:1.65; min-height:140px; display:flex; align-items:center; justify-content:center; padding:6px 4px; text-align:center; }
  .slide-controls{ display:flex; gap:10px; justify-content:center; margin-top:20px; flex-wrap:wrap; }
  .slide-controls .btn{ padding:10px 18px; font-size:0.85rem; }
  .slide-dots{ display:flex; gap:6px; justify-content:center; margin-top:16px; }
  .slide-dot{ width:7px; height:7px; border-radius:50%; background:#14262E30; }
  .slide-dot.active{ background:#B98BD6; }

  /* ---- Flashcards ---- */
  .flash-progress{ text-align:center; font-family:'IBM Plex Mono',monospace; font-size:0.78rem; color:#5c6b6f; margin-bottom:12px; }
  .flash-card{ background:#fff; border:1px solid #14262E22; border-radius:10px; min-height:190px; display:flex; align-items:center; justify-content:center; padding:26px; text-align:center; cursor:pointer; font-size:1.02rem; margin-bottom:18px; user-select:none; }
  .flash-card .side-label{ position:absolute; top:10px; left:14px; font-family:'IBM Plex Mono',monospace; font-size:0.65rem; color:#9aa; }
  .flash-controls{ display:flex; gap:10px; justify-content:center; }

  /* ---- Icon badge ---- */
  .icon-badge{ width:42px; height:42px; color:var(--accent); margin:16px 26px 0; animation:iconPop .45s ease; }
  .icon-badge.badge-scenario{ color:var(--alert); }
  .icon-badge.badge-slideshow{ color:#9B6FBF; }
  .icon-badge.badge-flashcards{ color:#B98420; }
  .icon-badge.badge-quiz{ color:#3A6BA8; }
  .icon-badge svg{ width:100%; height:100%; }
  @keyframes iconPop{ from{ transform:scale(0.55); opacity:0; } to{ transform:scale(1); opacity:1; } }

  /* ---- Flashcard flip ---- */
  .flash-card-outer{ perspective:1200px; height:190px; margin-bottom:18px; cursor:pointer; }
  .flash-card-inner{ position:relative; width:100%; height:100%; transition:transform .5s cubic-bezier(.4,.2,.2,1); transform-style:preserve-3d; }
  .flash-card-inner.flipped{ transform:rotateY(180deg); }
  .flash-face{ position:absolute; inset:0; backface-visibility:hidden; -webkit-backface-visibility:hidden; display:flex; align-items:center; justify-content:center; padding:22px; text-align:center; border-radius:10px; border:1px solid #14262E22; background:#fff; font-size:1.02rem; }
  .flash-face.back{ transform:rotateY(180deg); background:#EEF6F0; }

  /* ---- Quiz feedback animation ---- */
  .quiz-opt.correct{ animation:bounceIn .4s ease; }
  .quiz-opt.incorrect{ animation:shakeX .4s ease; }
  @keyframes bounceIn{ 0%{ transform:scale(0.94); } 55%{ transform:scale(1.03); } 100%{ transform:scale(1); } }
  @keyframes shakeX{ 0%,100%{ transform:translateX(0); } 25%{ transform:translateX(-5px); } 75%{ transform:translateX(5px); } }
  .celebrate-banner{ text-align:center; padding:16px; margin-top:6px; background:#EEF6F0; border-radius:10px; font-size:0.92rem; color:#1f5c46; }
  .celebrate-emoji{ font-size:1.5rem; display:inline-block; margin:0 2px; animation:floatUp 1s ease infinite alternate; }
  .celebrate-emoji:nth-child(2){ animation-delay:.15s; }
  .celebrate-emoji:nth-child(3){ animation-delay:.3s; }
  @keyframes floatUp{ from{ transform:translateY(0); } to{ transform:translateY(-6px); } }

  /* ---- Scenario ending ---- */
  .end-icon{ width:44px; height:44px; margin:0 auto 12px; animation:bounceIn .5s ease; }
  .end-icon.success{ color:#1f5c46; }
  .end-icon.failure{ color:var(--alert); }

  /* ---- Slideshow transitions ---- */
  .slide-heading, .slide-text{ animation:slideFade .35s ease; }
  @keyframes slideFade{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:translateY(0); } }
  .metronome{ display:flex; align-items:center; justify-content:center; gap:8px; font-family:'IBM Plex Mono',monospace; font-size:0.75rem; color:#5c6b6f; margin-top:14px; }
  .metronome .dot{ width:10px; height:10px; border-radius:50%; background:var(--alert); animation:metronomeBeat .55s infinite; }
  @keyframes metronomeBeat{ 0%,100%{ transform:scale(1); opacity:1; } 50%{ transform:scale(1.5); opacity:0.45; } }

  /* ---- Fiche pro sections ---- */
  .fiche-intro{ font-size:0.94rem; color:#4a5a5f; margin-bottom:16px; font-style:italic; }
  .fiche-section{ margin-bottom:16px; border-radius:10px; overflow:hidden; border:1px solid #14262E14; animation:slideFade .3s ease; }
  .fiche-section-head{ display:flex; align-items:center; gap:9px; padding:11px 16px; font-family:'IBM Plex Mono',monospace; font-size:0.78rem; text-transform:uppercase; letter-spacing:0.03em; font-weight:600; }
  .fiche-section-body{ padding:14px 16px 16px; background:#fff; }
  .sec-signs .fiche-section-head{ background:#E9F1F8; color:#2C5A85; }
  .sec-steps .fiche-section-head{ background:#E9F5EF; color:#1f5c46; }
  .sec-vigilance .fiche-section-head{ background:#FCF1DD; color:#8a5a12; }
  .sec-forbidden .fiche-section-head{ background:#FBE4E0; color:#a33; }
  .sec-generic .fiche-section-head{ background:#F1EFE9; color:#4a5a5f; }
  .bullet-line{ display:flex; gap:9px; margin-bottom:9px; font-size:0.92rem; line-height:1.5; }
  .bullet-line:last-child{ margin-bottom:0; }
  .bullet-ico{ flex:0 0 auto; }
  .step-list{ list-style:none; }
  .step-item{ display:flex; gap:12px; margin-bottom:14px; position:relative; }
  .step-item:last-child{ margin-bottom:0; }
  .step-item:not(:last-child)::before{ content:''; position:absolute; left:12px; top:26px; width:2px; height:calc(100% - 8px); background:#1f5c4625; }
  .step-num{ flex:0 0 auto; width:25px; height:25px; border-radius:50%; background:#1f5c46; color:#fff; display:flex; align-items:center; justify-content:center; font-family:'IBM Plex Mono',monospace; font-size:0.76rem; font-weight:600; z-index:1; }
  .step-text{ padding-top:2px; font-size:0.92rem; line-height:1.5; }

  /* ---- Ribbon (inspiré des mini-fiches pro) ---- */
  .fiche-main{ position:relative; }
  .fiche-ribbon{ position:absolute; left:0; top:0; bottom:0; width:26px; background:var(--accent); display:flex; align-items:center; justify-content:center; }
  .fiche-ribbon span{ writing-mode:vertical-rl; transform:rotate(180deg); font-family:'IBM Plex Mono',monospace; font-size:0.68rem; letter-spacing:0.08em; text-transform:uppercase; font-weight:700; color:#06231C; white-space:nowrap; }
  .fiche-shifted{ margin-left:26px; }
  .fiche-body strong, .fiche-intro strong{ color:#14262E; font-weight:700; background:rgba(87,201,165,0.18); padding:0 3px; border-radius:3px; }

  /* ---- Illustrations techniques ---- */
  .fiche-illustration{ display:flex; flex-direction:column; align-items:center; padding:18px; margin-bottom:18px; background:#F1EFE9; border-radius:10px; border:1px solid #14262E14; }
  .fiche-illustration svg{ width:130px; height:98px; color:#1f5c46; }
  .illus-caption{ font-family:'IBM Plex Mono',monospace; font-size:0.7rem; text-transform:uppercase; letter-spacing:0.05em; color:#5c6b6f; margin-top:10px; text-align:center; }
  .slide-illustration{ display:flex; justify-content:center; margin-bottom:6px; animation:slideFade .35s ease; }
  .slide-illustration svg{ width:100px; height:76px; color:#9B6FBF; }

  /* ---- Loading state ---- */
  .loading-panel{ display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:460px; padding:30px; gap:18px; }
  .loading-pulse{ width:52px; height:52px; color:var(--alert); animation:heartbeat 1.1s ease-in-out infinite; }
  .loading-pulse svg{ width:100%; height:100%; }
  @keyframes heartbeat{ 0%,100%{ transform:scale(1); } 15%{ transform:scale(1.18); } 30%{ transform:scale(1); } 45%{ transform:scale(1.1); } 60%{ transform:scale(1); } }
  .loading-bar-track{ width:100%; max-width:260px; height:8px; background:#14262E14; border-radius:100px; overflow:hidden; }
  .loading-bar-fill{ height:100%; background:linear-gradient(90deg, var(--accent), #3A6BA8); border-radius:100px; transition:width .25s ease; }
  .loading-msg{ font-size:0.78rem; color:#5c6b6f; letter-spacing:0.04em; text-transform:uppercase; min-height:1em; text-align:center; }

  /* ================= THEME : bleu marine et blanc ================= */
  :root{
    --bg:#F5F8FB;
    --panel:#FFFFFF;
    --panel-light:#EEF3F8;
    --panel-border:#DCE4EC;
    --accent:#2C5A85;
    --accent-dim:#C9D8E8;
    --alert:#C8412E;
    --alert-dim:#F6DCD7;
    --text:#1D2B36;
    --text-muted:#5B6B78;
    --navy:#14385C;
    --paper:#FFFFFF;
    --paper-ink:#1D2B36;
  }
  h1,h2,h3{ color:var(--navy); }
  nav{ background:rgba(255,255,255,0.94); }
  .logo{ color:var(--navy); text-decoration:none; }
  a.btn{ text-decoration:none; }
  .nav-links a{ text-decoration:none; }
  .nav-links a:hover, .nav-links a.active{ color:var(--navy); }
  .logo-pulse, .wordmark-dot{ background:var(--alert); animation:none; box-shadow:none; }
  .btn-primary{ background:var(--accent); color:#fff; }
  .btn-primary:hover{ background:#23496D; }
  .btn-ghost{ background:#fff; color:var(--navy); }
  .eyebrow{ font-family:'IBM Plex Sans',sans-serif; text-transform:none; letter-spacing:0; font-size:0.9rem; font-weight:600;
            color:var(--alert); background:none; border:none; padding:0; margin-bottom:10px; }
  .chip{ background:#fff; }
  .chip.active, .wizard-card.selected, .live-mode-toggle button.active{ background:#EAF1F8; }
  .step, .wizard-card, .panel, .plan-card, .stat-pill{ background:#fff; }
  select, input[type=text], input[type=email], input[type=password]{
    width:100%; background:#fff; color:var(--text); border:1px solid var(--panel-border);
    padding:11px 13px; border-radius:8px; font-family:'IBM Plex Sans',sans-serif; font-size:0.94rem; }
  .field label{ font-family:'IBM Plex Sans',sans-serif; font-size:0.85rem; font-weight:600; color:var(--text); letter-spacing:0; }
  .fiche{ border:1px solid var(--panel-border); box-shadow:0 10px 30px rgba(20,56,92,0.08); }
  .fiche-ribbon span{ color:#fff; }
  .fiche-body strong, .fiche-intro strong{ background:#E3ECF5; }
  .gate-overlay{ background:linear-gradient(to top, rgba(255,255,255,0.98) 40%, rgba(255,255,255,0.65) 70%, rgba(255,255,255,0)); }
  .quiz-score{ background:var(--navy); }
  .participant-opt{ background:#fff; }
  .plan-toggle{ display:none; }
  .cesu-grid{ display:grid; grid-template-columns:0.8fr 1.2fr; gap:24px; align-items:start; }
  @media (max-width:900px){ .cesu-grid{ grid-template-columns:1fr; } }
  .cesu-h{ font-size:1.05rem; margin-bottom:16px; }
  .cesu-plan-head{ display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:6px; }
  .cesu-plan-head .cesu-h{ margin-bottom:0; }
  .cesu-reset{ padding:7px 12px; font-size:0.8rem; }
  .cesu-row{ display:flex; justify-content:space-between; align-items:center; gap:14px; padding:10px 0; border-bottom:1px solid var(--panel-border); }
  .cesu-row:last-child{ border-bottom:none; }
  .cesu-row span{ font-size:0.93rem; }
  .cesu-row span.changed::after{ content:" · modifié"; color:var(--accent); font-size:0.78rem; font-weight:600; }
  .cesu-row select{ width:auto; min-width:112px; padding:7px 10px; }
  .cesu-note{ font-size:0.82rem; color:var(--text-muted); margin-top:10px; }
  .cesu-save{ min-height:1.4em; margin-top:16px; font-size:0.88rem; color:#1F6B4F; font-weight:600; }
  .cesu-local{ margin-top:4px; }
  .print-cesu{ font-weight:600; color:#14385C; }
  .btn.tv-exit{ background:transparent; color:#C9D8E8; border-color:rgba(255,255,255,0.22); }
  .btn.tv-exit:hover{ color:#fff; border-color:rgba(255,255,255,0.5); }
  #livePresenterPanel:fullscreen{ padding:0; border:0; border-radius:0; background:#060f14; display:flex; overflow:auto; }
  #livePresenterPanel:fullscreen .tv-stage{ flex:1; min-height:100vh; border-radius:0; }
  #livePresenterPanel:fullscreen .tv-card-outer{ max-width:1000px; }
  #livePresenterPanel:fullscreen .tv-card{ min-height:340px; padding:70px 50px; }
  #livePresenterPanel:fullscreen .tv-card-content{ font-size:clamp(1.8rem, 3.6vw, 3.2rem); }
  #livePresenterPanel:fullscreen .tv-progress, #livePresenterPanel:fullscreen .tv-hint{ font-size:1.05rem; }
  #livePresenterPanel:fullscreen .tv-end{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; }
  #sessionControl{ display:none; }
  .btn-sm{ padding:8px 13px; font-size:0.82rem; }
  input[type=date], input[type=time]{ width:100%; background:#fff; color:var(--text); border:1px solid var(--panel-border);
    padding:10px 12px; border-radius:8px; font-family:'IBM Plex Sans',sans-serif; font-size:0.94rem; }

  /* ---- Mes journees ---- */
  .j-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:20px; flex-wrap:wrap; max-width:none; }
  .j-head > div{ max-width:60ch; }
