/* ==============================================================================
   CYBER V2 : SIMULATEUR D'AVENTURES & AUTO-DÉFENSE INTERACTIVE
   Design intuitif, accessible collégiens (11+) & seniors, haut contraste
   ============================================================================== */

#cyber-v2-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: 44px;
  background: var(--bg);
  z-index: 99995;
  overflow-y: auto;
  font-family: var(--font-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  color: var(--ink-strong);
}

#cyber-v2-overlay.is-active {
  display: block;
}

.cv2-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* En-tête de la V2 */
.cv2-hero {
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
  color: #ffffff;
  padding: 24px 28px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
}

.cv2-hero-text h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.cv2-hero-text p {
  font-size: 14px;
  color: #cbd5e1;
  max-width: 650px;
  line-height: 1.5;
}

.cv2-hero-btn {
  background: #ffffff;
  color: #0f172a;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cv2-hero-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

/* Sélecteur de chapitres V2 */
.cv2-chapters-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.cv2-chapter-card {
  background: var(--panel);
  border: 2px solid var(--line-soft);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.cv2-chapter-card:hover {
  border-color: var(--line-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

.cv2-chapter-card.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

.cv2-chap-icon {
  font-size: 26px;
  margin-bottom: 6px;
}

.cv2-chap-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-strong);
  margin-bottom: 4px;
}

.cv2-chap-desc {
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* Scène interactive de simulation */
.cv2-stage {
  background: var(--panel);
  border: 1px solid var(--line-mid);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cv2-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.cv2-stage-step-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #bfdbfe;
}

[data-theme="dark"] .cv2-stage-step-badge {
  background: #1e3a8a;
  color: #93c5fd;
  border-color: #2563eb;
}

/* ==============================================================================
   SCÉNARIO 1 : LA BOÎTE AUX LETTRES & LA FAUSSE CARTE BANCAIRE
   ============================================================================== */
.mailbox-game {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: center;
}

@media (max-width: 850px) {
  .mailbox-game {
    grid-template-columns: 1fr;
  }
}

.mailbox-interactive-box {
  background: var(--bg);
  border: 2px dashed var(--line-mid);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.mailbox-icon {
  font-size: 64px;
  margin-bottom: 12px;
  transition: transform 0.3s;
}

.mailbox-icon.opened {
  transform: scale(1.1);
}

.letter-interactive {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
  text-align: left;
  max-width: 440px;
  width: 100%;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.letter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #1e3a8a;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.letter-bank-logo {
  font-weight: 800;
  font-size: 13px;
  color: #1e3a8a;
}

.letter-body {
  font-size: 12px;
  line-height: 1.5;
  color: #334155;
  margin-bottom: 14px;
}

.physical-card-mockup {
  width: 260px;
  height: 155px;
  background: linear-gradient(135deg, #0f172a, #2563eb);
  border-radius: 12px;
  color: #ffffff;
  padding: 14px;
  margin: 10px auto;
  box-shadow: 0 8px 18px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,0.2);
  position: relative;
  transition: transform 0.3s;
}

.physical-card-mockup:hover {
  transform: rotate(-2deg) scale(1.03);
}

.card-gold-chip {
  width: 34px;
  height: 26px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  border-radius: 4px;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.3);
}

.card-fake-number {
  font-family: Iosevka, monospace;
  font-size: 13px;
  letter-spacing: 2px;
}

.card-fake-footer {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  text-transform: uppercase;
  color: #cbd5e1;
}

.game-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.game-btn {
  background: var(--panel);
  border: 1.5px solid var(--line-mid);
  color: var(--ink-strong);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.game-btn:hover {
  border-color: #3b82f6;
  background: var(--bg);
}

.game-btn.danger {
  border-color: #ef4444;
}
.game-btn.danger:hover {
  background: rgba(239, 68, 68, 0.08);
}

.game-btn.success {
  border-color: #10b981;
}
.game-btn.success:hover {
  background: rgba(16, 185, 129, 0.08);
}

.game-result-box {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  display: none;
}

.game-result-box.is-shown {
  display: block;
  animation: slideUp 0.25s ease;
}

.game-result-box.bad {
  background: #fef2f2;
  border: 1.5px solid #ef4444;
  color: #991b1b;
}

.game-result-box.good {
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  color: #065f46;
}

[data-theme="dark"] .game-result-box.bad {
  background: #450a0a;
  color: #fca5a5;
  border-color: #991b1b;
}

[data-theme="dark"] .game-result-box.good {
  background: #064e3b;
  color: #6ee7b7;
  border-color: #059669;
}

/* ==============================================================================
   SCÉNARIO 2 : LE WEBMAIL INSTITUTIONNEL
   ============================================================================== */
.webmail-mockup {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  color: #1e293b;
}

.webmail-top-bar {
  background: #f1f5f9;
  padding: 8px 16px;
  border-bottom: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.webmail-browser-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 12px 0;
  background: #e2e8f0;
  border-bottom: 1px solid #cbd5e1;
}

.webmail-tab {
  padding: 6px 14px;
  background: #ffffff;
  border-radius: 6px 6px 0 0;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.webmail-tab.inactive {
  background: transparent;
  color: #64748b;
}

.webmail-url-bar {
  background: #ffffff;
  padding: 8px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Iosevka, monospace;
  font-size: 12px;
}

.url-chip {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 10px;
  color: #0f172a;
}

.url-fake-highlight {
  color: #dc2626;
  font-weight: 800;
  background: #fee2e2;
  padding: 1px 4px;
  border-radius: 3px;
}

.webmail-email-body {
  padding: 24px;
}

.email-meta {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}

.email-meta strong {
  color: #0f172a;
}

.email-content {
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
}

.email-btn-cta {
  display: inline-block;
  background: #0284c7;
  color: #ffffff !important;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  margin: 14px 0;
  cursor: pointer;
}

/* ==============================================================================
   SCÉNARIO 4 & 5 : LES NOTIONS CLÉS & LES 4 MYTHES CYBER
   ============================================================================== */
.cv2-concepts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.concept-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 18px;
}

.concept-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.concept-icon {
  font-size: 24px;
}

.concept-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-strong);
}

.concept-analogy {
  background: var(--bg);
  border-left: 3px solid #3b82f6;
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  margin-bottom: 10px;
  color: var(--ink-strong);
}

.concept-desc {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Grille des 4 Mythes Cyber (Style Infographie SecureMind) */
.mythes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.mythe-card {
  background: var(--panel);
  border-radius: 12px;
  border: 2px solid var(--line-mid);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.mythe-card.mythe-1 {
  border-color: #3b82f6;
}
.mythe-card.mythe-2 {
  border-color: #ec4899;
}
.mythe-card.mythe-3 {
  border-color: #f97316;
}
.mythe-card.mythe-4 {
  border-color: #10b981;
}

.mythe-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mythe-pill {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid currentColor;
}

.mythe-1 .mythe-pill { color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
.mythe-2 .mythe-pill { color: #ec4899; background: rgba(236, 72, 153, 0.1); }
.mythe-3 .mythe-pill { color: #f97316; background: rgba(249, 115, 22, 0.1); }
.mythe-4 .mythe-pill { color: #10b981; background: rgba(16, 185, 129, 0.1); }

.mythe-quote {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-strong);
  margin-bottom: 14px;
  line-height: 1.35;
}

.mythe-diagram-box {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mythe-truth {
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid #10b981;
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-strong);
}

.mythe-truth strong {
  color: #059669;
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

[data-theme="dark"] .mythe-truth strong {
  color: #34d399;
}
