/* ============================================================
   Simulateur Examens 2026 — Design System
   Dark mode by default. Mobile-first. Indigo-violet palette.
   Philosophie UX : "Réducteur d'anxiété"
   ============================================================ */

/* --- Custom Properties — LIGHT MODE DEFAULT --- */
:root {
  --ex-bg: #F7F7FB;
  --ex-bg-card: #FFFFFF;
  --ex-bg-card-hover: #F0EEFA;
  --ex-bg-input: #FFFFFF;
  --ex-border: #E2E0EC;
  --ex-border-focus: #6D5BF7;
  --ex-text: #1A1726;
  --ex-text-muted: #6B6580;
  --ex-text-dim: #9B95B0;

  /* Accent palette */
  --ex-indigo: #4F46E5;
  --ex-indigo-soft: rgba(79,70,229,0.08);
  --ex-indigo-hover: #6D5BF7;
  --ex-violet: #7C3AED;
  --ex-violet-soft: rgba(124,58,237,0.08);

  /* Note colors */
  --ex-note-red: #DC2626;
  --ex-note-orange: #D97706;
  --ex-note-yellow: #CA8A04;
  --ex-note-green-light: #16A34A;
  --ex-note-green: #059669;
  --ex-note-violet: #7C3AED;

  /* Mention colors */
  --ex-mention-refuse: #DC2626;
  --ex-mention-rattrapage: #D97706;
  --ex-mention-admis: #64748B;
  --ex-mention-ab: #0284C7;
  --ex-mention-b: #059669;
  --ex-mention-tb: #6D28D9;
  --ex-mention-tbf: #7C3AED;

  /* Typography */
  --ex-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --ex-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Spacing (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;

  /* Radius */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 9999px;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 20px rgba(79,70,229,0.12);
}

/* --- Dark Mode Override --- */
.dark-mode {
  --ex-bg: #0F0D1A;
  --ex-bg-card: #1A1726;
  --ex-bg-card-hover: #231F33;
  --ex-bg-input: #13111F;
  --ex-border: #2D2840;
  --ex-text: #E8E6F0;
  --ex-text-muted: #9B95B0;
  --ex-text-dim: #6B6580;
  --ex-indigo: #6D5BF7;
  --ex-indigo-soft: rgba(109,91,247,0.12);
  --ex-violet: #A855F7;
  --ex-violet-soft: rgba(168,85,247,0.12);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-glow: 0 0 20px rgba(109,91,247,0.15);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--ex-font);
  background: var(--ex-bg);
  color: var(--ex-text);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  padding-bottom: calc(60px + env(safe-area-inset-bottom));
}

/* --- Header --- */
.ex-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--ex-bg);
  border-bottom: 1px solid var(--ex-border);
  display: flex;
  align-items: center;
  padding: 0 var(--s-4);
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ex-header-back {
  background: none;
  border: none;
  color: var(--ex-text-muted);
  cursor: pointer;
  padding: var(--s-2);
  margin-right: var(--s-2);
  border-radius: var(--r-sm);
  display: none;
}
.ex-header-back:hover { color: var(--ex-text); background: var(--ex-indigo-soft); }
.ex-header-back.visible { display: flex; }

.ex-header-logo {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.ex-logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--ex-indigo), var(--ex-violet));
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.ex-header-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: none;
  flex: 1;
}
.ex-header-title.visible { display: block; }

/* --- Main Content --- */
.ex-main {
  margin-top: 56px;
  padding: var(--s-4);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.ex-screen { display: none; }
.ex-screen.active { display: block; }

/* --- Bottom Navigation --- */
.ex-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--ex-bg);
  border-top: 1px solid var(--ex-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
}

.ex-nav-item {
  background: none;
  border: none;
  color: var(--ex-text-dim);
  font-family: var(--ex-font);
  font-size: 0.6875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--s-2) var(--s-3);
  cursor: pointer;
  border-radius: var(--r-md);
  transition: color 0.15s, background 0.15s;
  min-width: 56px;
}
.ex-nav-item:hover { color: var(--ex-text-muted); }
.ex-nav-item.active {
  color: var(--ex-indigo);
  background: var(--ex-indigo-soft);
}
.ex-nav-item svg { width: 22px; height: 22px; }

/* --- Cards --- */
.ex-card {
  background: var(--ex-bg-card);
  border: 1px solid var(--ex-border);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  margin-bottom: var(--s-3);
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s, transform 0.15s;
}
.ex-card:hover { border-color: var(--ex-indigo); transform: translateY(-1px); }

.ex-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-3);
}

.ex-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* --- Note Circle (score display) --- */
.ex-note-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: var(--s-4) auto;
  position: relative;
  background: var(--ex-bg-card);
  border: 3px solid var(--ex-border);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.ex-note-circle.computed { box-shadow: var(--shadow-glow); }
.ex-note-value {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ex-note-label {
  font-size: 0.75rem;
  color: var(--ex-text-muted);
  margin-top: 2px;
}

/* --- Mention Gauge --- */
.ex-gauge {
  background: var(--ex-bg-input);
  border-radius: var(--r-full);
  height: 32px;
  position: relative;
  overflow: hidden;
  margin: var(--s-3) 0;
  border: 1px solid var(--ex-border);
}
.ex-gauge-fill {
  height: 100%;
  border-radius: var(--r-full);
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s;
  display: flex;
  align-items: center;
  padding-left: var(--s-3);
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  min-width: 0;
  white-space: nowrap;
}
.ex-gauge-markers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}
.ex-gauge-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.2);
}
.ex-gauge-marker-label {
  position: absolute;
  top: -18px;
  font-size: 0.625rem;
  color: var(--ex-text-dim);
  transform: translateX(-50%);
  white-space: nowrap;
}

/* --- Subject Card (note input) --- */
.ex-subject-card {
  background: var(--ex-bg-card);
  border: 1px solid var(--ex-border);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-2);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  transition: border-color 0.15s;
}
.ex-subject-card:focus-within { border-color: var(--ex-indigo); }

.ex-subject-name {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
}
.ex-subject-coef {
  font-size: 0.6875rem;
  color: var(--ex-text-dim);
  background: var(--ex-indigo-soft);
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-weight: 600;
  white-space: nowrap;
}
.ex-subject-input {
  width: 64px;
  background: var(--ex-bg-input);
  border: 1px solid var(--ex-border);
  border-radius: var(--r-sm);
  color: var(--ex-text);
  font-family: var(--ex-font);
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
  padding: var(--s-2);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s;
}
.ex-subject-input:focus {
  outline: none;
  border-color: var(--ex-indigo);
  box-shadow: 0 0 0 3px var(--ex-indigo-soft);
}
.ex-subject-input::placeholder { color: var(--ex-text-dim); }

/* --- Slider (What-if) --- */
.ex-slider-group {
  margin-bottom: var(--s-4);
}
.ex-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s-2);
}
.ex-slider-label { font-size: 0.875rem; font-weight: 500; }
.ex-slider-value {
  font-size: 1.125rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: right;
}

input[type="range"].ex-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--ex-border);
  outline: none;
  cursor: pointer;
}
input[type="range"].ex-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ex-indigo);
  border: 3px solid var(--ex-bg);
  box-shadow: 0 2px 6px rgba(109,91,247,0.4);
  cursor: grab;
  transition: transform 0.15s;
}
input[type="range"].ex-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
input[type="range"].ex-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.25);
}
input[type="range"].ex-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ex-indigo);
  border: 3px solid var(--ex-bg);
  box-shadow: 0 2px 6px rgba(109,91,247,0.4);
  cursor: grab;
}

/* --- Buttons --- */
.ex-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-md);
  font-family: var(--ex-font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.ex-btn:active { transform: scale(0.97); }

.ex-btn-primary {
  background: linear-gradient(135deg, var(--ex-indigo), var(--ex-violet));
  color: white;
  box-shadow: 0 2px 8px rgba(109,91,247,0.3);
}
.ex-btn-primary:hover {
  background: linear-gradient(135deg, var(--ex-indigo-hover), #B060F8);
  box-shadow: 0 4px 12px rgba(109,91,247,0.4);
}

.ex-btn-secondary {
  background: var(--ex-bg-card);
  color: var(--ex-text);
  border: 1px solid var(--ex-border);
}
.ex-btn-secondary:hover { border-color: var(--ex-indigo); background: var(--ex-indigo-soft); }

.ex-btn-full { width: 100%; }

.ex-btn-premium {
  background: linear-gradient(135deg, var(--ex-indigo), var(--ex-violet));
  color: white;
  padding: var(--s-4) var(--s-6);
  font-size: 1rem;
  border-radius: var(--r-lg);
  box-shadow: 0 4px 16px rgba(109,91,247,0.3);
  position: relative;
  overflow: hidden;
}
.ex-btn-premium::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 200%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shimmer 3s infinite;
}
@keyframes shimmer { 100% { left: 100%; } }

/* --- Premium Paywall --- */
.ex-paywall {
  background: linear-gradient(135deg, rgba(109,91,247,0.08), rgba(168,85,247,0.08));
  border: 1px solid rgba(109,91,247,0.2);
  border-radius: var(--r-xl);
  padding: var(--s-6);
  text-align: center;
  margin: var(--s-4) 0;
}
.ex-paywall-icon {
  font-size: 2.5rem;
  margin-bottom: var(--s-3);
}
.ex-paywall-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--s-2);
  letter-spacing: -0.02em;
}
.ex-paywall-desc {
  color: var(--ex-text-muted);
  font-size: 0.875rem;
  margin-bottom: var(--s-4);
  line-height: 1.6;
}
.ex-paywall-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ex-indigo);
  margin-bottom: var(--s-1);
}
.ex-paywall-once {
  font-size: 0.8125rem;
  color: var(--ex-text-dim);
  margin-bottom: var(--s-5);
}
.ex-paywall-features {
  list-style: none;
  text-align: left;
  margin-bottom: var(--s-5);
}
.ex-paywall-features li {
  font-size: 0.875rem;
  padding: var(--s-2) 0;
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.ex-paywall-features li::before {
  content: '✓';
  color: var(--ex-note-green);
  font-weight: 700;
}

/* --- Section Headers --- */
.ex-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ex-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--s-3);
  margin-top: var(--s-5);
}

/* --- Timeline / Calendar --- */
.ex-timeline {
  position: relative;
  padding-left: var(--s-6);
}
.ex-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--ex-border);
}
.ex-timeline-item {
  position: relative;
  padding-bottom: var(--s-5);
}
.ex-timeline-dot {
  position: absolute;
  left: calc(-1 * var(--s-6) + 4px);
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ex-bg);
  border: 2px solid var(--ex-border);
}
.ex-timeline-dot.done {
  background: var(--ex-note-green);
  border-color: var(--ex-note-green);
}
.ex-timeline-dot.next {
  background: var(--ex-indigo);
  border-color: var(--ex-indigo);
  box-shadow: 0 0 8px rgba(109,91,247,0.4);
}
.ex-timeline-date {
  font-size: 0.75rem;
  color: var(--ex-text-dim);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ex-timeline-label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 2px;
}
.ex-timeline-countdown {
  font-size: 0.75rem;
  color: var(--ex-indigo);
  font-weight: 600;
  margin-top: 2px;
}

/* --- Select / Dropdown --- */
.ex-select {
  width: 100%;
  background: var(--ex-bg-input);
  border: 1px solid var(--ex-border);
  border-radius: var(--r-md);
  color: var(--ex-text);
  font-family: var(--ex-font);
  font-size: 0.875rem;
  padding: var(--s-3) var(--s-4);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239B95B0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.ex-select:focus {
  outline: none;
  border-color: var(--ex-indigo);
  box-shadow: 0 0 0 3px var(--ex-indigo-soft);
}

/* --- Tabs --- */
.ex-tabs {
  display: flex;
  gap: 2px;
  background: var(--ex-bg-input);
  border-radius: var(--r-md);
  padding: 3px;
  margin-bottom: var(--s-4);
}
.ex-tab {
  flex: 1;
  padding: var(--s-2) var(--s-3);
  border: none;
  background: none;
  color: var(--ex-text-muted);
  font-family: var(--ex-font);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.ex-tab.active {
  background: var(--ex-bg-card);
  color: var(--ex-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* --- Radar Chart (placeholder for canvas) --- */
.ex-radar-container {
  width: 100%;
  max-width: 300px;
  margin: var(--s-4) auto;
  aspect-ratio: 1;
}

/* --- Badge --- */
.ex-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ex-badge-premium {
  background: linear-gradient(135deg, var(--ex-indigo), var(--ex-violet));
  color: white;
}

/* --- Confetti Animation --- */
@keyframes confetti-fall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(40px) rotate(360deg); opacity: 0; }
}
.ex-confetti-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  animation: confetti-fall 1.2s ease-out forwards;
  pointer-events: none;
}

/* --- Mention Animation --- */
@keyframes mention-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(109,91,247,0); }
  50% { box-shadow: 0 0 30px rgba(109,91,247,0.3); }
}
.ex-note-circle.mention-achieved {
  animation: mention-glow 1.5s ease-in-out;
}

/* --- Empty State --- */
.ex-empty {
  text-align: center;
  padding: var(--s-10) var(--s-4);
  color: var(--ex-text-muted);
}
.ex-empty-icon { font-size: 3rem; margin-bottom: var(--s-3); opacity: 0.5; }
.ex-empty-text { font-size: 0.9375rem; line-height: 1.6; }

/* --- Drawer --- */
.ex-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.ex-drawer-overlay.open { opacity: 1; pointer-events: auto; }

.ex-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: var(--ex-bg);
  border-left: 1px solid var(--ex-border);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: var(--s-5) var(--s-4);
}
.ex-drawer.open { transform: translateX(0); }

.ex-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-6);
  font-weight: 700;
}
.ex-drawer-close {
  background: none;
  border: none;
  color: var(--ex-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--s-1);
}
.ex-drawer-nav { display: flex; flex-direction: column; gap: var(--s-1); }
.ex-drawer-link {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-3);
  border-radius: var(--r-md);
  color: var(--ex-text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.15s;
}
.ex-drawer-link:hover { background: var(--ex-indigo-soft); }

/* --- Responsive --- */
@media (min-width: 640px) {
  .ex-main { padding: var(--s-6); max-width: 560px; }
  .ex-note-circle { width: 140px; height: 140px; }
  .ex-note-value { font-size: 3rem; }
}

/* --- Screen Transitions --- */
.ex-screen {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.ex-screen.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* --- Onboarding Overlay --- */
.ex-onboarding {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--ex-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--s-6);
  text-align: center;
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.ex-onboarding-icon {
  font-size: 4rem;
  margin-bottom: var(--s-5);
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.ex-onboarding h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--s-3);
  background: linear-gradient(135deg, var(--ex-indigo), var(--ex-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ex-onboarding p {
  color: var(--ex-text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
  max-width: 320px;
  margin-bottom: var(--s-5);
}
.ex-onboarding-steps {
  list-style: none;
  text-align: left;
  max-width: 300px;
  margin-bottom: var(--s-6);
}
.ex-onboarding-steps li {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) 0;
  font-size: 0.875rem;
}
.ex-onboarding-steps li .step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ex-indigo-soft);
  color: var(--ex-indigo);
  font-weight: 700;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* --- Confetti Container --- */
.ex-confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 300;
  overflow: hidden;
}

/* --- Revision Suggestion Card --- */
.ex-suggestion {
  background: linear-gradient(135deg, rgba(109,91,247,0.06), rgba(168,85,247,0.06));
  border: 1px solid rgba(109,91,247,0.15);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  margin-top: var(--s-4);
}
.ex-suggestion-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ex-indigo);
  margin-bottom: var(--s-2);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.ex-suggestion-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-2) 0;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--ex-border);
}
.ex-suggestion-item:last-child { border-bottom: none; }
.ex-suggestion-impact {
  font-weight: 700;
  color: var(--ex-note-green);
  font-variant-numeric: tabular-nums;
}

/* --- Slider Track Gradient --- */
input[type="range"].ex-slider {
  background: linear-gradient(90deg, #EF4444 0%, #F59E0B 25%, #EAB308 40%, #22C55E 60%, #059669 75%, #8B5CF6 100%);
}

/* --- Voeu Status Badge --- */
.ex-voeu-status {
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--ex-font);
}
.ex-voeu-status[data-status="en-attente"] { background: rgba(234,179,8,0.15); color: #EAB308; }
.ex-voeu-status[data-status="accepte"] { background: rgba(5,150,105,0.15); color: #059669; }
.ex-voeu-status[data-status="refuse"] { background: rgba(220,38,38,0.15); color: #DC2626; }
.ex-voeu-status[data-status="liste-attente"] { background: rgba(2,132,199,0.15); color: #0284C7; }

/* --- Home Hero --- */
.ex-hero {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  border-radius: var(--r-xl);
  padding: var(--s-6) var(--s-4) var(--s-8);
  margin: 0 calc(-1 * var(--s-4)) var(--s-4);
  text-align: center;
  position: relative;
  color: white;
}
.ex-hero .ex-note-circle {
  background: white;
  border: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.ex-hero .ex-note-value { color: var(--ex-indigo); }
.ex-hero .ex-note-label { color: #6B6580; }
.ex-hero .ex-gauge {
  background: rgba(255,255,255,0.2);
  border: none;
}
.ex-hero .ex-gauge-marker { background: rgba(255,255,255,0.3); }
.ex-hero .ex-gauge-marker-label { color: rgba(255,255,255,0.7); }

/* --- Exam Cards with icons --- */
.ex-exam-card {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  cursor: pointer;
}
.ex-exam-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.ex-exam-icon.bac { background: linear-gradient(135deg, #EEF2FF, #E0E7FF); }
.ex-exam-icon.techno { background: linear-gradient(135deg, #FFF7ED, #FFEDD5); }
.ex-exam-icon.brevet { background: linear-gradient(135deg, #F0FDF4, #DCFCE7); }

/* --- Subject Cards with accent border --- */
.ex-subject-card.cc { border-left: 3px solid #4F46E5; }
.ex-subject-card.term { border-left: 3px solid #7C3AED; }

/* --- Mention Cards enriched --- */
.ex-mention-card {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.ex-mention-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* --- Paywall Feature Grid --- */
.ex-paywall-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
  text-align: left;
}
.ex-paywall-feature {
  background: var(--ex-bg);
  border-radius: var(--r-md);
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ex-paywall-feature-icon {
  font-size: 1.5rem;
  margin-bottom: 2px;
}
.ex-paywall-feature-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ex-text);
}
.ex-paywall-feature-desc {
  font-size: 0.6875rem;
  color: var(--ex-text-muted);
}

/* --- Countdown card styled --- */
.ex-countdown-card {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.ex-countdown-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* --- Empty state illustration --- */
.ex-paywall-illustration {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--s-4);
  background: linear-gradient(135deg, var(--ex-indigo-soft), var(--ex-violet-soft));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

/* --- Utilities --- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: var(--s-2); }
.mt-4 { margin-top: var(--s-4); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-4 { margin-bottom: var(--s-4); }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
