/* Réflexe — navigation, sections, menu latéral, pages publiques
   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 */

  nav{ position:sticky; top:0; z-index:50; background:rgba(11,31,42,0.85); backdrop-filter:blur(10px); border-bottom:1px solid var(--panel-border); }
  nav .wrap{ display:flex; align-items:center; justify-content:space-between; height:64px; }
  .logo{ display:flex; align-items:center; gap:10px; font-weight:700; font-size:1.05rem; }
  .logo-pulse{ width:9px; height:9px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 0 rgba(87,201,165,0.6); animation:pulse 1.8s infinite; }
  @keyframes pulse{ 0%{box-shadow:0 0 0 0 rgba(87,201,165,0.55);} 70%{box-shadow:0 0 0 8px rgba(87,201,165,0);} 100%{box-shadow:0 0 0 0 rgba(87,201,165,0);} }
  .nav-links{ display:flex; gap:28px; font-size:0.9rem; color:var(--text-muted); }
  .nav-links a:hover{ color:var(--text); }
  @media (max-width:640px){ .nav-links{ display:none; } }

  header.hero{ padding:88px 0 64px; position:relative; overflow:hidden; }
  .wordmark{ display:flex; align-items:center; gap:14px; margin:10px 0 6px; }
  .wordmark-text{ font-family:'Archivo Expanded', sans-serif; font-size:clamp(2.8rem, 8vw, 5rem); font-weight:800; letter-spacing:-0.02em; line-height:1; background:linear-gradient(100deg, var(--text) 30%, var(--accent) 100%); -webkit-background-clip:text; background-clip:text; color:transparent; }
  .wordmark-dot{ width:15px; height:15px; border-radius:50%; background:var(--accent); flex:0 0 auto; margin-bottom:0.4em; box-shadow:0 0 0 0 rgba(87,201,165,0.6); animation:pulse 1.8s infinite; }
  .tagline{ font-size:clamp(1.25rem, 3vw, 1.7rem); font-weight:600; color:var(--text); margin-bottom:16px; max-width:22ch; }
  .stat-strip{ display:flex; gap:12px; flex-wrap:wrap; margin-top:32px; }
  .stat-pill{ display:flex; flex-direction:column; gap:2px; padding:12px 18px; background:var(--panel); border:1px solid var(--panel-border); border-radius:10px; }
  .stat-num{ font-family:'IBM Plex Mono',monospace; font-size:1.25rem; font-weight:600; color:var(--accent); }
  .stat-label{ font-size:0.75rem; color:var(--text-muted); }
  .sources-line{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:22px; font-size:0.78rem; color:var(--text-muted); }
  .source-tag{ padding:4px 11px; border:1px solid var(--panel-border); border-radius:100px; font-family:'IBM Plex Mono',monospace; font-size:0.72rem; color:var(--text); background:var(--panel); }

  /* ---- Session live ---- */
  .live-mode-toggle{ display:flex; gap:10px; max-width:420px; margin-bottom:24px; }
  .live-mode-toggle button{ flex:1; padding:12px; border-radius:8px; border:1px solid var(--panel-border); background:var(--panel); color:var(--text-muted); cursor:pointer; font-size:0.88rem; font-weight:600; }
  .live-mode-toggle button.active{ border-color:var(--accent); color:var(--accent); background:rgba(87,201,165,0.08); }
  .live-code-display{ text-align:center; padding:30px 20px; }
  .live-code-display .code-label{ font-family:'IBM Plex Mono',monospace; font-size:0.78rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.08em; margin-bottom:10px; }
  .live-code-display .code-num{ font-family:'IBM Plex Mono',monospace; font-size:3.2rem; font-weight:700; letter-spacing:0.12em; color:var(--accent); }
  .live-q-title{ font-size:1.1rem; font-weight:600; margin-bottom:16px; }
  .vote-bar-row{ margin-bottom:14px; }
  .vote-bar-label{ display:flex; justify-content:space-between; font-size:0.85rem; margin-bottom:6px; }
  .vote-bar-track{ height:14px; background:var(--bg); border-radius:100px; overflow:hidden; border:1px solid var(--panel-border); }
  .vote-bar-fill{ height:100%; background:linear-gradient(90deg, var(--accent), #3A6BA8); transition:width .4s ease; border-radius:100px; }
  .vote-bar-fill.correct-fill{ background:linear-gradient(90deg,#2E5C46,#57C9A5); }
  .live-controls{ display:flex; gap:10px; margin-top:20px; flex-wrap:wrap; }
  .join-code-input{ font-size:1.6rem; text-align:center; letter-spacing:0.3em; font-family:'IBM Plex Mono',monospace; max-width:220px; margin:0 auto 16px; display:block; }
  .participant-opt{ display:block; width:100%; text-align:left; padding:14px 16px; margin-bottom:10px; border:1px solid var(--panel-border); border-radius:8px; background:var(--bg); color:var(--text); cursor:pointer; font-size:0.95rem; }
  .participant-opt:hover:not(:disabled){ border-color:var(--accent); }
  .participant-opt:disabled{ opacity:0.6; cursor:default; }
  .participant-opt.voted{ border-color:var(--accent); background:rgba(87,201,165,0.1); }

  /* ---- Esprit quiz-show ---- */
  .timer-track{ height:8px; background:var(--panel-border); border-radius:100px; overflow:hidden; margin-bottom:16px; }
  .timer-fill{ height:100%; background:var(--alert); transition:width .3s linear; }
  .kahoot-bar-row{ margin-bottom:14px; }
  .kahoot-bar-label{ display:flex; align-items:center; gap:8px; font-size:0.9rem; margin-bottom:6px; }
  .kahoot-shape{ font-size:1.1rem; }
  .kahoot-opt{ display:flex; align-items:center; gap:12px; width:100%; text-align:left; padding:18px 16px; margin-bottom:10px; border:none; border-radius:10px; color:#fff; font-weight:700; font-size:0.98rem; cursor:pointer; }
  .kahoot-opt .kahoot-shape{ font-size:1.5rem; }
  .kahoot-opt:disabled{ opacity:0.55; cursor:default; }
  .kahoot-opt.voted{ outline:3px solid #fff; outline-offset:-3px; }
  .kahoot-bar-row.kahoot-correct-row{ outline:2px solid var(--accent); border-radius:8px; padding:6px 8px; background:rgba(87,201,165,0.1); }
  .kahoot-check{ color:var(--accent); font-weight:700; font-size:0.8rem; white-space:nowrap; }

  /* ---- Buzzer plein écran, style jeu télévisé ---- */
  .tv-stage{ background:radial-gradient(ellipse at center, #17303d 0%, #060f14 100%); border-radius:16px; padding:40px 20px; text-align:center; position:relative; min-height:520px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
  .tv-stage:fullscreen{ width:100vw; height:100vh; border-radius:0; background:radial-gradient(ellipse at center, #17303d 0%, #060f14 100%); }
  .tv-fullscreen-btn{ position:absolute; top:16px; right:16px; background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.25); color:#fff; padding:8px 14px; border-radius:8px; font-size:0.78rem; cursor:pointer; }
  .tv-progress{ font-family:'IBM Plex Mono',monospace; color:var(--accent); font-size:0.85rem; letter-spacing:0.1em; text-transform:uppercase; margin-bottom:24px; }
  .tv-card-outer{ perspective:1400px; width:100%; max-width:640px; cursor:pointer; }
  .tv-card{ background:linear-gradient(160deg, #1c3a48, #0e222c); border:3px solid var(--accent); border-radius:20px; padding:60px 30px; min-height:220px; display:flex; align-items:center; justify-content:center; box-shadow:0 0 60px rgba(87,201,165,0.25), inset 0 0 30px rgba(0,0,0,0.3); transition:transform .15s ease, border-color .2s ease, box-shadow .2s ease; }
  .tv-card:active{ transform:scale(0.98); }
  .tv-card.is-back{ border-color:#D6A94F; box-shadow:0 0 60px rgba(214,169,79,0.3), inset 0 0 30px rgba(0,0,0,0.3); }
  .tv-card-content{ font-size:clamp(1.3rem,3vw,2.1rem); font-weight:800; color:#fff; line-height:1.4; font-family:'Archivo Expanded',sans-serif; }
  .tv-hint{ margin-top:22px; color:var(--text-muted); font-size:0.85rem; }
  .tv-dots{ display:flex; gap:6px; justify-content:center; margin-top:18px; flex-wrap:wrap; max-width:400px; }
  .tv-dot{ width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,0.15); }
  .tv-dot.active{ background:var(--accent); }
  .tv-exit{ margin-top:26px; border-color:rgba(255,255,255,0.2); color:#fff; }
  .tv-end{ text-align:center; padding:70px 20px; color:#fff; }

  /* ---- Impression / export PDF ---- */
  @media print{
    body.print-fiche-mode nav,
    body.print-fiche-mode header.hero,
    body.print-fiche-mode #comment,
    body.print-fiche-mode .section-head,
    body.print-fiche-mode .wizard,
    body.print-fiche-mode .wizard-summary,
    body.print-fiche-mode .panel,
    body.print-fiche-mode #live,
    body.print-fiche-mode #tarifs,
    body.print-fiche-mode footer,
    body.print-fiche-mode .fiche-actions,
    body.print-fiche-mode .gate-overlay{ display:none !important; }
    body.print-fiche-mode{ background:#fff; }
    body.print-fiche-mode #ficheContainer{ box-shadow:none; max-width:100%; }
    body.print-fiche-mode .fiche-body{ max-height:none !important; overflow:visible !important; }
    body.print-fiche-mode, body.print-fiche-mode *{ -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  }

  /* ---- Historique ---- */
  .hist-item{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; border-bottom:1px solid var(--panel-border); }
  .hist-item:last-child{ border-bottom:none; }
  .hist-item-info{ display:flex; flex-direction:column; gap:3px; }
  .hist-item-title{ font-weight:600; font-size:0.92rem; }
  .hist-item-meta{ font-size:0.78rem; color:var(--text-muted); font-family:'IBM Plex Mono',monospace; }
  .hist-empty{ text-align:center; color:var(--text-muted); padding:30px; font-size:0.9rem; }
  .stat-question-row{ padding:12px 0; border-bottom:1px solid var(--panel-border); }
  .stat-question-row:last-child{ border-bottom:none; }
  .stat-question-text{ font-size:0.9rem; margin-bottom:8px; }
  .stat-question-row.worst .stat-question-text{ color:var(--alert); font-weight:600; }
  .stat-question-row.worst .stat-question-text::before{ content:'⚠️ '; }

  .wizard-step{ animation:slideFadeIn .4s ease; margin-bottom:8px; }
  @keyframes slideFadeIn{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:translateY(0); } }
  .wizard-label{ font-size:0.72rem; letter-spacing:0.1em; text-transform:uppercase; color:var(--accent); margin-bottom:10px; }
  .wizard-step h3{ font-size:1.3rem; margin-bottom:20px; }
  .wizard-cards{ display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; margin-bottom:32px; }
  .wizard-card{ background:var(--panel); border:1px solid var(--panel-border); border-radius:12px; padding:20px 18px; cursor:pointer; text-align:left; transition:all .15s ease; }
  .wizard-card:hover{ border-color:var(--accent); transform:translateY(-2px); }
  .wizard-card.selected{ border-color:var(--accent); background:rgba(87,201,165,0.1); }
  .wizard-card.selected .wc-label::after{ content:' ✓'; color:var(--accent); }
  .btn:disabled{ opacity:0.4; cursor:not-allowed; }
  .btn:disabled:hover{ transform:none; }
  .wizard-card .wc-icon{ font-size:1.6rem; margin-bottom:10px; display:block; }
  .wizard-card .wc-label{ font-weight:600; font-size:0.95rem; margin-bottom:4px; }
  .wizard-card .wc-desc{ font-size:0.8rem; color:var(--text-muted); }
  .wizard-summary{ display:flex; gap:20px; align-items:center; flex-wrap:wrap; padding:14px 20px; background:var(--panel); border:1px solid var(--panel-border); border-radius:10px; margin-bottom:28px; font-size:0.88rem; animation:slideFadeIn .3s ease; }
  .wizard-summary strong{ color:var(--accent); }
  .eyebrow{ display:inline-flex; align-items:center; gap:8px; font-family:'IBM Plex Mono',monospace; font-size:0.72rem; letter-spacing:0.12em; text-transform:uppercase; color:var(--accent); border:1px solid var(--accent-dim); background:rgba(87,201,165,0.06); padding:6px 12px; border-radius:100px; margin-bottom:24px; }
  .hero h1{ font-size:clamp(2.1rem, 5vw, 3.4rem); font-weight:700; max-width:16ch; margin-bottom:20px; }
  .hero p.lede{ font-size:1.15rem; color:var(--text-muted); max-width:52ch; margin-bottom:36px; }
  .cta-row{ display:flex; gap:14px; flex-wrap:wrap; }
  .btn{ font-family:'IBM Plex Sans',sans-serif; font-weight:600; font-size:0.95rem; padding:13px 24px; border-radius:8px; border:1px solid transparent; cursor:pointer; transition:transform .15s ease, background .15s ease, border-color .15s ease; display:inline-flex; align-items:center; gap:8px; }
  .btn:active{ transform:scale(0.97); }
  .btn-primary{ background:var(--accent); color:#06231C; }
  .btn-primary:hover{ background:#6BDBB7; }
  .btn-ghost{ background:transparent; color:var(--text); border-color:var(--panel-border); }
  .btn-ghost:hover{ border-color:var(--accent); }

  .monitor{ margin-top:56px; border:1px solid var(--panel-border); background:var(--panel); border-radius:12px; overflow:hidden; }
  .monitor-head{ display:flex; justify-content:space-between; align-items:center; padding:10px 16px; border-bottom:1px solid var(--panel-border); font-family:'IBM Plex Mono',monospace; font-size:0.72rem; color:var(--text-muted); }
  .monitor-head .hr{ color:var(--accent); font-weight:600; }
  .monitor svg{ display:block; width:100%; height:90px; }
  .ecg-path{ fill:none; stroke:var(--accent); stroke-width:2; stroke-dasharray:900; stroke-dashoffset:900; animation:draw 3.2s linear infinite; }
  @keyframes draw{ to{ stroke-dashoffset:-900; } }
  @media (prefers-reduced-motion: reduce){ .ecg-path{ animation:none; stroke-dashoffset:0; } .logo-pulse{ animation:none; } }

  section{ padding:72px 0; border-top:1px solid var(--panel-border); }
  .section-head{ margin-bottom:44px; max-width:60ch; }
  .section-head .eyebrow{ margin-bottom:14px; }
  .section-head h2{ font-size:clamp(1.5rem,3vw,2.1rem); margin-bottom:12px; }
  .section-head p{ color:var(--text-muted); font-size:1.02rem; }

  .steps{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
  @media (max-width:800px){ .steps{ grid-template-columns:1fr; } }
  .step{ background:var(--panel); border:1px solid var(--panel-border); border-radius:12px; padding:26px; }
  .step .num{ font-family:'IBM Plex Mono',monospace; color:var(--accent); font-size:0.8rem; margin-bottom:14px; }
  .step h3{ font-size:1.05rem; margin-bottom:10px; }
  .step p{ color:var(--text-muted); font-size:0.92rem; }

  .generator{ display:grid; grid-template-columns:1fr 1fr; gap:28px; align-items:start; }
  @media (max-width:900px){ .generator{ grid-template-columns:1fr; } }
  .panel{ background:var(--panel); border:1px solid var(--panel-border); border-radius:14px; padding:26px; }
  .field{ margin-bottom:20px; }
  .field label{ display:block; font-size:0.82rem; color:var(--text-muted); margin-bottom:8px; font-family:'IBM Plex Mono',monospace; letter-spacing:0.02em; }
  select, input[type=text]{ width:100%; background:var(--bg); border:1px solid var(--panel-border); color:var(--text); padding:11px 13px; border-radius:8px; font-family:'IBM Plex Sans',sans-serif; font-size:0.94rem; }
  select:focus, input:focus{ border-color:var(--accent); }
  .chip-row{ display:flex; gap:8px; flex-wrap:wrap; }
  .chip{ padding:9px 14px; border-radius:100px; border:1px solid var(--panel-border); background:var(--bg); font-size:0.85rem; cursor:pointer; color:var(--text-muted); transition:all .15s ease; }
  .chip.active{ border-color:var(--accent); color:var(--accent); background:rgba(87,201,165,0.08); }
  .chip .fmt-icon{ margin-right:6px; }
  .generate-btn{ width:100%; margin-top:6px; padding:15px; border-radius:8px; border:none; cursor:pointer; background:var(--alert); color:#fff; font-weight:700; font-family:'IBM Plex Sans',sans-serif; font-size:0.98rem; display:flex; align-items:center; justify-content:center; gap:10px; transition:background .15s ease, transform .15s ease; }
  .generate-btn:hover{ background:#F3684F; }
  .generate-btn:active{ transform:scale(0.98); }
  .generate-btn:disabled{ opacity:0.55; cursor:not-allowed; }
  .charge-dot{ width:8px; height:8px; border-radius:50%; background:#fff; }
  .charge-dot.loading{ animation:pulse 0.9s infinite; }
