/* ============================================================
   CyberSafe — surcharges locales (le reste vient de console.css)
   Sorti du <style> inline d'index.html (dette front, lot 8) :
   même règles, aucun changement de rendu visé.
   ============================================================ */
.cs-hero{ display:grid; grid-template-columns:1.35fr 1fr; gap:20px; align-items:center; background:linear-gradient(135deg, color-mix(in srgb,var(--accent) 12%,var(--surface)), var(--surface)); border:1px solid var(--border); border-radius:var(--radius); padding:28px 30px; }
.cs-hero h2{ font-size:27px; font-weight:800; letter-spacing:-.02em; line-height:1.12; margin-bottom:12px; }
.cs-hero h2 em{ font-style:normal; color:var(--accent); }
.cs-hero p{ font-size:14px; line-height:1.6; color:var(--text-muted); max-width:56ch; }
.cs-hero .cta{ display:flex; gap:10px; margin-top:18px; flex-wrap:wrap; }
.cs-hero .glyph{ font-size:104px; line-height:1; text-align:center; opacity:.9; filter:drop-shadow(0 10px 26px rgba(0,0,0,.38)); }
@media(max-width:760px){ .cs-hero{ grid-template-columns:1fr; padding:24px; } .cs-hero h2{ font-size:24px; } .cs-hero .glyph{ font-size:80px; } }

/* Threats / Protections — cartes avec icône grosse + liste advice */
.cs-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:16px; }
.cs-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; transition:border-color .15s, transform .15s, box-shadow .15s; }
.cs-card:hover{ border-color:var(--accent); transform:translateY(-2px); box-shadow:0 12px 28px -22px var(--accent); }
.cs-card .ic{ width:40px; height:40px; border-radius:10px; background:var(--badge-bg); color:var(--accent); display:grid; place-items:center; font-size:21px; margin-bottom:12px; border:1px solid color-mix(in srgb,var(--accent) 30%,transparent); }
.cs-card h3{ font-size:16px; font-weight:700; margin-bottom:6px; letter-spacing:-.01em; }
.cs-card p{ font-size:12.5px; color:var(--text-muted); line-height:1.55; margin-bottom:12px; }
.cs-card .advice{ list-style:none; padding:0; margin:0; }
.cs-card .advice li{ display:flex; gap:8px; align-items:flex-start; font-size:12.5px; color:var(--text); padding:6px 0; border-top:1px solid var(--border); }
.cs-card .advice li:first-child{ border-top:none; padding-top:0; }
.cs-card .advice li::before{ content:'✓'; color:var(--accent); font-weight:700; flex:0 0 auto; }
.cs-card .danger{ display:inline-block; font-size:10.5px; font-weight:700; padding:3px 8px; border-radius:999px; letter-spacing:.05em; text-transform:uppercase; margin-bottom:10px; }
.cs-card .danger.high{ color:#fff; background:#dc2626; }
.cs-card .danger.med{ color:#fff; background:#e0820a; }
.cs-card .danger.low{ color:#fff; background:#16a34a; }

/* Rules — tables propres */
.cs-rules h3{ display:flex; align-items:center; gap:10px; font-size:16px; font-weight:700; margin:24px 0 12px; }
.cs-rules h3 .ic{ width:32px; height:32px; border-radius:8px; background:var(--badge-bg); color:var(--accent); display:grid; place-items:center; font-size:16px; border:1px solid color-mix(in srgb,var(--accent) 30%,transparent); }
.cs-rules table{ width:100%; }
.cs-rules .verb{ display:inline-block; font-size:10.5px; font-weight:700; padding:2px 7px; border-radius:5px; letter-spacing:.04em; margin-right:8px; }
.cs-rules .verb.must{ color:#fff; background:#16a34a; }
.cs-rules .verb.mustnot{ color:#fff; background:#dc2626; }
.cs-rules .verb.should{ color:#fff; background:#2563eb; }

/* Quiz */
.cs-quiz{ max-width:780px; }
.cs-q{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:22px; margin-bottom:16px; }
.cs-q .qnum{ font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--text-faint); font-weight:700; }
.cs-q h4{ font-size:16px; font-weight:600; margin:6px 0 16px; }
.cs-q .opts{ display:grid; gap:8px; }
.cs-q .opt{ display:flex; align-items:center; gap:11px; padding:11px 14px; border:1px solid var(--border); border-radius:9px; background:var(--surface); cursor:pointer; transition:.12s; font-size:13.5px; }
.cs-q .opt:hover{ background:var(--surface-2); }
.cs-q .opt input{ accent-color:var(--accent); }
.cs-q.locked .opt{ cursor:default; }
.cs-q.locked .opt.correct{ border-color:#16a34a; background:#f0fdf4; color:#15803d; font-weight:600; }
.cs-q.locked .opt.wrong{ border-color:#dc2626; background:#fef2f2; color:#b91c1c; }
:root[data-theme=dark] .cs-q.locked .opt.correct{ background:rgba(22,163,74,.18); color:#86efac; }
:root[data-theme=dark] .cs-q.locked .opt.wrong{ background:rgba(220,38,38,.18); color:#fca5a5; }
.cs-q .explain{ display:none; margin-top:13px; padding:12px 14px; border-radius:9px; background:var(--surface-2); border-left:3px solid var(--accent); font-size:13px; color:var(--text-muted); line-height:1.55; }
.cs-q.locked .explain{ display:block; }
.cs-quiz-bar{ display:flex; align-items:center; gap:14px; margin-bottom:18px; padding:14px 16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); }
.cs-quiz-bar .prog{ flex:1; height:7px; background:var(--surface-2); border-radius:99px; overflow:hidden; border:1px solid var(--border); }
.cs-quiz-bar .prog i{ display:block; width:0%; height:100%; background:var(--accent); transition:width .25s; }
.cs-quiz-bar .score{ font-weight:700; font-size:14px; }
.cs-quiz-end{ text-align:center; padding:32px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); }
.cs-quiz-end .big{ font-size:54px; font-weight:800; color:var(--accent); }
.cs-quiz-end .lbl{ font-size:13px; color:var(--text-muted); margin-top:8px; }
.cs-quiz-end .verdict{ font-size:18px; font-weight:700; margin:14px 0 6px; }

/* Glossary */
.cs-glo{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:12px; }
.cs-term{ background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:14px 16px; }
.cs-term dt{ display:flex; align-items:center; gap:8px; font-size:14px; font-weight:700; margin-bottom:5px; }
.cs-term dt span{ font-size:10.5px; font-weight:700; padding:2px 7px; border-radius:5px; color:var(--accent); background:var(--badge-bg); border:1px solid color-mix(in srgb,var(--accent) 30%,transparent); margin-left:auto; }
.cs-term dd{ font-size:12.5px; color:var(--text-muted); line-height:1.55; margin:0; }

/* Resources */
.cs-res{ display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:14px; }
.cs-res a{ display:flex; gap:14px; padding:16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); transition:.15s; }
.cs-res a:hover{ border-color:var(--accent); transform:translateY(-2px); }
.cs-res .ic{ width:38px; height:38px; border-radius:9px; background:var(--badge-bg); color:var(--accent); display:grid; place-items:center; font-size:18px; flex:0 0 auto; }
.cs-res .meta b{ font-size:13.5px; display:block; }
.cs-res .meta small{ font-size:11.5px; color:var(--text-faint); display:block; margin-top:2px; }
.cs-res .meta p{ font-size:12px; color:var(--text-muted); margin-top:6px; line-height:1.5; }

/* Quiz — submit button + leaderboard + save form */
.btn[disabled]{ opacity:.5; cursor:not-allowed; }
.cs-submit-wrap{ display:flex; justify-content:center; margin:6px 0 4px; }
.cs-board{ margin-top:24px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px; }
.cs-board h3{ font-size:15px; font-weight:700; margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.cs-board-list{ list-style:none; margin:0; padding:0; }
.cs-board-list li{ display:flex; align-items:center; gap:12px; padding:9px 8px; border-radius:8px; font-size:13.5px; }
.cs-board-list li + li{ border-top:1px solid var(--border); }
.cs-board-list .rk{ width:26px; height:26px; flex:0 0 auto; border-radius:7px; background:var(--surface-2); color:var(--text-muted); display:grid; place-items:center; font-weight:800; font-size:12px; }
.cs-board-list li:nth-child(1) .rk{ background:#f59e0b; color:#231803; }
.cs-board-list li:nth-child(2) .rk{ background:#cbd5e1; color:#1e293b; }
.cs-board-list li:nth-child(3) .rk{ background:#d97706; color:#fff; }
.cs-board-list .nm{ flex:1; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cs-board-list .sc{ font-weight:800; color:var(--accent); }
.cs-board-list .det{ font-size:11.5px; color:var(--text-faint); width:48px; text-align:right; flex:0 0 auto; }
.cs-board-list li.me{ background:var(--badge-bg); outline:1px solid color-mix(in srgb,var(--accent) 45%,transparent); }
.cs-board-empty{ color:var(--text-faint); justify-content:center; }
.cs-save{ margin-top:18px; padding-top:18px; border-top:1px solid var(--border); }
.cs-save label{ display:block; font-size:12.5px; color:var(--text-muted); margin-bottom:8px; }
.cs-save-row{ display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.cs-save-row input{ padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); color:var(--text); font-size:13.5px; min-width:210px; }
.cs-save-row input:focus{ outline:none; border-color:var(--accent); }
.cs-save-msg{ font-size:12.5px; margin-top:9px; min-height:16px; }
.cs-save-done{ font-size:14px; font-weight:600; }

/* Videos section */
.cs-vid-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:16px; }
.cs-vid{ display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; transition:transform .15s, border-color .15s; }
.cs-vid:hover{ transform:translateY(-3px); border-color:var(--accent); }
.cs-vid > b{ font-size:13.5px; padding:12px 14px 0; }
.cs-vid > small{ font-size:11.5px; color:var(--text-faint); padding:2px 14px 0; }
.cs-vid > p{ font-size:12px; color:var(--text-muted); line-height:1.5; padding:6px 14px 0; }
.cs-vid-thumb{ position:relative; display:block; width:100%; aspect-ratio:16/9; overflow:hidden; border-radius:var(--radius) var(--radius) 0 0; background:var(--surface-2); }
.cs-vid-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.cs-vid-thumb .play{ position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:46px; height:46px; border-radius:50%; background:rgba(0,0,0,.55); color:#fff; display:flex; align-items:center; justify-content:center; font-size:16px; line-height:1; }
.cs-vid-thumb.noimg{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; }
.cs-vid-thumb.noimg .play{ position:static; transform:none; width:46px; height:46px; font-size:18px; }
.cs-vid-thumb.noimg .src-tag{ font-size:10.5px; font-weight:700; color:var(--text-faint); text-transform:uppercase; letter-spacing:.04em; }
.cs-kw{ display:flex; flex-wrap:wrap; gap:6px; padding:10px 14px 14px; margin-top:auto; }
.cs-kw span{ font-size:10.5px; padding:2px 8px; border-radius:99px; background:var(--badge-bg); color:var(--accent); border:1px solid color-mix(in srgb,var(--accent) 30%,transparent); }

/* Single page — toutes les sections empilées, le menu scrolle */
html{ scroll-behavior:smooth; }
.cs-section{ display:block; scroll-margin-top:80px; }
.cs-section + .cs-section{ margin-top:34px; padding-top:32px; border-top:1px solid var(--border); }
.cs-sechead{ font-size:20px; font-weight:800; letter-spacing:-.02em; margin-bottom:12px; }

/* Chapeaux de section (anciens style="margin-bottom:18px" inline) */
.cs-section > .form-hint{ margin-bottom:18px; }

/* Quiz — écran de lancement + une question à la fois */
#cs-quiz-start{ text-align:center; padding:30px 22px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); }
#cs-quiz-start .form-hint{ max-width:60ch; margin:0 auto 18px; }
#cs-quiz-stage .cs-q{ margin-bottom:0; }
.cs-correction{ margin-top:22px; }
.cs-correction .cs-corr-lbl{ font-size:13px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.06em; margin:0 0 12px; }

/* Les derniers attributs style= du HTML, passés en classes (lot 8) :
   un `style=` est bloqué par une politique de sécurité de contenu en
   `style-src 'self'` — la règle ne s'applique alors tout simplement pas. */
.cs-intro{ margin-bottom:18px; }
#cs-prog{ width:0; }   /* point de départ ; le JS fait varier la largeur ensuite */
