/* ═══════════════════════════════════════════════════════════════════
   ElectroLab — CSS Principal
   Police: Outfit + JetBrains Mono
═══════════════════════════════════════════════════════════════════ */
/* Unlock Mode for copying code */
body.unlock-mode .code-block, 
body.unlock-mode .code-block * {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
}
body.unlock-mode .no-copy-notice {
  display: none !important;
}

:root {
  --bg-dark: #0a0b14;
  --bg-card: #12131f;
  --bg-card2: #1a1b2e;
  --border: rgba(255,255,255,0.07);
  --accent-blue: #4f8ef7;
  --accent-teal: #00d4aa;
  --accent-purple: #a855f7;
  --accent-orange: #f97316;
  --accent-yellow: #fbbf24;
  --text: #e8eaf0;
  --text-muted: #7a7d94;
  --module-colors: #4f8ef7, #a855f7, #f97316, #00d4aa;

  --m1: #4f8ef7;
  --m2: #a855f7;
  --m3: #f97316;
  --m4: #00d4aa;
  --m5: #f43f5e;
  --m6: #06b6d4;
  --m7: #84cc16;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Fond animé étoiles */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(79,142,247,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(168,85,247,0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ─── TOP BAR ─────────────────────────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,11,20,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
}

.top-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.module-dots {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active, .dot.done {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue);
}

.dot[data-module="1"].active { background: var(--m2); border-color: var(--m2); box-shadow: 0 0 8px var(--m2); }
.dot[data-module="2"].active { background: var(--m3); border-color: var(--m3); box-shadow: 0 0 8px var(--m3); }
.dot[data-module="3"].active { background: var(--m4); border-color: var(--m4); box-shadow: 0 0 8px var(--m4); }

.module-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── MODULES WRAPPER ─────────────────────────────────────────── */
.modules-wrapper {
  position: relative;
  z-index: 1;
}

.module {
  min-height: 100vh;
  padding: 80px 2rem 120px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.module-content {
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ─── MODULE HEADER ───────────────────────────────────────────── */
.module-header {
  text-align: center;
  margin-bottom: 3rem;
}

.module-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  background: rgba(79,142,247,0.15);
  border: 1px solid rgba(79,142,247,0.3);
  color: var(--accent-blue);
}

#module-1 .module-badge { background: rgba(168,85,247,0.15);  border-color: rgba(168,85,247,0.3);  color: var(--m2); }
#module-2 .module-badge { background: rgba(249,115,22,0.15);  border-color: rgba(249,115,22,0.3);  color: var(--m3); }
#module-3 .module-badge { background: rgba(0,212,170,0.15);   border-color: rgba(0,212,170,0.3);   color: var(--m4); }
#module-4 .module-badge { background: rgba(244,63,94,0.15);   border-color: rgba(244,63,94,0.3);   color: var(--m5); }
#module-5 .module-badge { background: rgba(6,182,212,0.15);   border-color: rgba(6,182,212,0.3);   color: var(--m6); }
#module-6 .module-badge { background: rgba(132,204,22,0.15);  border-color: rgba(132,204,22,0.3);  color: var(--m7); }

/* ── Global section cards ───────────────────────────── */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 2rem;
}
.section-card p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}
.section-card p:last-child { margin-bottom: 0; }

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Normalize all .module-content direct children spacing */
.module-content > .ohm-container,
.module-content > .uart-container,
.module-content > .fritzing-section,
.module-content > .accordion-section,
.module-content > .accordion,
.module-content > .explainer-box {
  /* already handled by the flex gap on module-content */
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* code inline */
code {
  background: rgba(79,142,247,0.12);
  color: var(--accent-blue);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
}

/* Module titles: h1 and h2 are visually identical in module-header */
.module-header h1,
.module-header h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  margin-bottom: 0.75rem;
  line-height: 1.1;
}

.module-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ─── EXPLAINER BOX ───────────────────────────────────────────── */
.explainer-box {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin-top: 2.5rem;
}

.explainer-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.explainer-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.explainer-box p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.4rem;
}

.explainer-box strong { color: var(--text); }
.explainer-box code {
  background: rgba(79,142,247,0.15);
  color: var(--accent-blue);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}

/* ─── NAV BAR ─────────────────────────────────────────────────── */
.nav-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,11,20,0.9);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-btn:hover:not(:disabled) {
  background: var(--bg-card2);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.next-btn {
  background: linear-gradient(135deg, var(--accent-blue), #335ccd);
  border: none;
  color: white;
}

.next-btn:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--accent-blue), #335ccd);
}

.nav-progress {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.nav-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-teal));
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 25%;
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 1 — OHM
═══════════════════════════════════════════════════════════════ */
.ohm-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

.water-scene {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  position: relative;
}

#water-canvas {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.water-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.label-bubble {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.2);
  color: var(--text-muted);
}

.label-bubble b { color: var(--accent-blue); }

.sliders-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.slider-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
}

.slider-group label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.slider-icon { font-size: 1.5rem; }

.slider-analogy {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-blue);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(79,142,247,0.5);
  transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-value {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.slider-value b {
  color: var(--accent-blue);
  font-size: 1.1rem;
}

.result-card {
  background: var(--bg-card2);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.result-formula {
  font-size: 1.5rem;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-blue);
  margin-bottom: 0.75rem;
}

.result-values {
  font-size: 1rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 1rem;
}

.result-values .highlight {
  color: var(--accent-teal);
  font-weight: 700;
}

.led-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
}

.led-bulb {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #7fff7f, #00cc00);
  box-shadow: 0 0 12px #00cc00, 0 0 24px #00cc00, 0 0 4px #00ff00 inset;
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.led-bulb.dead {
  background: #3a3a3a;
  box-shadow: none;
}

.led-bulb.danger {
  background: radial-gradient(circle at 35% 35%, #ffaa7f, #cc4400);
  box-shadow: 0 0 12px #ff4400, 0 0 24px #ff4400;
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ═══════════════════════════════════════════════════════════════  
   MODULE 2 — BITS
═══════════════════════════════════════════════════════════════ */

.bits-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.bits-visualizer {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
}

.bits-row {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.bit-button {
  width: 62px; height: 62px;
  border-radius: 12px;
  border: 2px solid rgba(168,85,247,0.3);
  background: var(--bg-card2);
  color: var(--text-muted);
  font-size: 1.5rem;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.bit-button:hover {
  border-color: var(--m2);
  background: rgba(168,85,247,0.1);
  transform: translateY(-2px);
}

.bit-button.on {
  background: linear-gradient(135deg, rgba(168,85,247,0.3), rgba(168,85,247,0.15));
  border-color: var(--m2);
  color: var(--m2);
  box-shadow: 0 0 16px rgba(168,85,247,0.4), 0 4px 12px rgba(0,0,0,0.3);
  transform: translateY(-3px);
}

.bits-powers {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.bit-power {
  width: 62px;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.2s;
}

.bit-power.on { color: var(--m2); }

.bits-values-panel {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.value-display {
  flex: 1;
  max-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  text-align: center;
}

.value-display.decimal { border-color: rgba(168,85,247,0.3); }
.value-display.hex { border-color: rgba(79,142,247,0.3); }
.value-display.percent { border-color: rgba(251,191,36,0.3); }

.value-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.value-number {
  font-size: 2rem;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  transition: transform 0.1s;
}

.decimal .value-number { color: var(--m2); }
.hex .value-number { color: var(--accent-blue); }
.percent .value-number { color: var(--accent-yellow); }

.potentiometer-sim {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
}

.pot-label {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.pot-bar-container {
  position: relative;
  margin-top: 0.75rem;
  height: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  overflow: hidden;
}

.pot-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--m2), var(--accent-blue));
  border-radius: 4px;
  width: 0%;
  transition: width 0.05s linear;
}

.pot-segments {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
}

.bits-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn-action {
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  border: 1px solid rgba(168,85,247,0.3);
  background: rgba(168,85,247,0.1);
  color: var(--m2);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action:hover {
  background: rgba(168,85,247,0.2);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 3 — CIRCUIT
═══════════════════════════════════════════════════════════════ */

.circuit-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.circuit-scene {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

#circuit-canvas {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.circuit-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-circuit {
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  border: 1px solid rgba(249,115,22,0.4);
  background: rgba(249,115,22,0.1);
  color: var(--m3);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-circuit:hover {
  background: rgba(249,115,22,0.2);
  transform: translateY(-1px);
}

.circuit-state {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.current-explainer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.current-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
}

.current-card.fun {
  border-color: rgba(249,115,22,0.2);
  background: rgba(249,115,22,0.05);
}

.current-arrow {
  font-size: 2rem;
  margin-bottom: 0.4rem;
  font-weight: 900;
}

.current-arrow.conventional { color: var(--accent-blue); }
.current-arrow.electron { color: var(--m3); }

.current-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.current-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 4 — UART
═══════════════════════════════════════════════════════════════ */

.uart-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cups-scene {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  justify-content: center;
}

#uart-canvas {
  width: 100%;
  max-width: 700px;
  height: auto;
}

.uart-panels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}

.uart-side {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
}

.godot-side { border-color: rgba(55,143,190,0.3); }
.arduino-side { border-color: rgba(0,151,157,0.3); }

.side-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.side-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
}

.side-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

.baudrate-selector {
  margin-bottom: 1rem;
}

.baudrate-selector label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.baudrate-selector select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--bg-card2);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.baudrate-selector select:focus { border-color: var(--accent-teal); }

.message-input-area {
  display: flex;
  gap: 0.5rem;
}

.message-input-area input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--bg-card2);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.message-input-area input:focus { border-color: var(--accent-teal); }

.btn-send {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.godot-btn {
  background: linear-gradient(135deg, #378fbe, #1a5e8a);
  color: white;
}
.godot-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

.arduino-btn {
  background: linear-gradient(135deg, #00979d, #005f62);
  color: white;
}
.arduino-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

.wire-middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.wire-line {
  width: 2px;
  height: 80px;
  background: linear-gradient(180deg, var(--accent-teal), var(--accent-blue));
  border-radius: 1px;
}

.wire-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent-teal);
  box-shadow: 0 0 8px var(--accent-teal);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.reception-zone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.receiver-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.4s ease;
}

.receiver-face {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.receiver-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 0.4rem;
  min-height: 1.2em;
}

.receiver-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  opacity: 0.6;
}

.receiver-box.ok {
  border-color: rgba(0,212,170,0.4);
  background: rgba(0,212,170,0.05);
}

.receiver-box.error {
  border-color: rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.05);
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .ohm-container { grid-template-columns: 1fr; }
  .circuit-container { grid-template-columns: 1fr; }
  .uart-panels { grid-template-columns: 1fr; }
  .wire-middle { display: none; }
  .bits-values-panel { flex-direction: column; align-items: center; }
  .reception-zone { grid-template-columns: 1fr; }
}

/* ─── ANIMATIONS D'ENTRÉE ─────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.module.active .module-header {
  animation: fadeInUp 0.5s ease forwards;
}

.module.active .ohm-container,
.module.active .bits-container,
.module.active .circuit-container,
.module.active .uart-container {
  animation: fadeInUp 0.5s 0.1s ease both;
}

.module.active .explainer-box {
  animation: fadeInUp 0.5s 0.2s ease both;
}

/* ═══════════════════════════════════════════════════════════════
   ACCORDÉON — Pour aller plus loin
═══════════════════════════════════════════════════════════════ */
.accordion-section {
  margin-top: 1.5rem;
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 16px;
  overflow: hidden;
}

.accordion-btn {
  width: 100%;
  padding: 1.1rem 1.5rem;
  background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(79,142,247,0.05));
  border: none;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}
.accordion-btn:hover { background: rgba(168,85,247,0.12); }
.accordion-btn::after {
  content: '▼';
  transition: transform 0.3s;
  font-size: 1rem;
  color: var(--accent-teal);
  opacity: 0.9;
  flex-shrink: 0;
}
.accordion-btn.open::after { transform: rotate(180deg); }

.accordion-content {
  display: none;
  padding: 1.5rem;
  background: var(--bg-card2);
  border-top: 1px solid rgba(168,85,247,0.15);
}
.accordion-content.open { display: block; animation: fadeInUp 0.3s ease; }

.accordion-intro {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}
.accordion-intro code {
  background: rgba(79,142,247,0.15);
  color: var(--accent-blue);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}
.accordion-tip {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.accordion-tip code {
  background: rgba(251,191,36,0.15);
  color: var(--accent-yellow);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}

/* ═══════════════════════════════════════════════════════════════
   CODE BLOCK — Non copiable
═══════════════════════════════════════════════════════════════ */
.no-copy-notice {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.03em;
}

.code-block {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 0.5rem 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  color: #c9d1d9;
  overflow-x: auto;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  position: relative;
  cursor: not-allowed;
  white-space: pre-wrap;
  tab-size: 2;
  /* Neutralise la marge par défaut des <pre> */
  display: block;
}
.code-block::before {
  content: attr(data-lang);
  position: absolute;
  top: 0.6rem; right: 1rem;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.c-comment  { color: #8b949e; font-style: italic; }
.c-keyword  { color: #ff7b72; }
.c-type     { color: #79c0ff; }
.c-string   { color: #a5d6ff; }
.c-number   { color: #f0883e; }
.c-function { color: #d2a8ff; }
.c-pin      { color: #7ee787; font-weight: bold; }

/* ═══════════════════════════════════════════════════════════════
   FRITZING SECTION
═══════════════════════════════════════════════════════════════ */
.fritzing-section {
  margin-top: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem 2rem;
}
.fritzing-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.fritzing-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.fritzing-canvas-wrapper,
.fritzing-img-wrapper {
  background: #12131f;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.05);
  min-height: 200px;
  align-items: center;
}
.fritzing-canvas-wrapper canvas,
.fritzing-img {
  width: 100%;
  max-width: 760px;
  height: auto;
  display: block;
}
/* Placeholder si l'image n'existe pas encore */
.fritzing-img[src$=".png"]:not([src=""]) {
  object-fit: contain;
}
.fritzing-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.legend-item { display: flex; align-items: center; gap: 0.4rem; }
.wire-dot-yellow {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #f5c542;
  display: inline-block;
}
.wire-dot-black {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #555;
  border: 1px solid #888;
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════════════
   PINS EXPLAINER — Module 2
═══════════════════════════════════════════════════════════════ */
.pins-explainer {
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
}
.pins-explainer h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.pins-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.pin-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}
.pin-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.pin-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Module 2 potentiomètre slider amélioré */
.potentiometer-sim .pot-slider-filled {
  height: 8px;
  margin-bottom: 0.5rem;
}
.potentiometer-sim .pot-slider-filled::-webkit-slider-thumb {
  background: var(--m2);
  box-shadow: 0 0 10px rgba(168,85,247,0.5);
}
.pot-segments {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 4 — CODE SÉRIE
═══════════════════════════════════════════════════════════════ */
.serial-code-section {
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(0,212,170,0.15);
  border-radius: 20px;
  padding: 1.5rem 2rem;
}
.serial-code-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.serial-code-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.code-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.code-step {
  background: var(--bg-card2);
  border: 1px solid rgba(0,212,170,0.1);
  border-radius: 14px;
  padding: 1.25rem;
}
.step-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: rgba(0,212,170,0.15);
  border: 1px solid rgba(0,212,170,0.3);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--m4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.step-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

@media (max-width: 768px) {
  .pins-grid { grid-template-columns: 1fr; }
  .code-steps { grid-template-columns: 1fr; }
}

/* ================================================================
   MODULE 5 — delay() vs millis()
================================================================ */

.millis-visual-wrapper {
  background: #0a0b14;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}
.millis-visual-wrapper canvas {
  width: 100%;
  max-width: 760px;
  height: auto;
  display: block;
}

/* ── Simulateur ── */
.task-simulator {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.sim-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

/* Mode buttons */
.sim-mode-toggle {
  display: flex;
  gap: 0.5rem;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  padding: 4px;
}
.mode-btn {
  padding: 0.45rem 1rem;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.mode-btn.active {
  background: rgba(255,255,255,0.1);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.mode-btn:hover:not(.active) {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

/* Banner */
.sim-mode-banner {
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: #fca5a5;
  transition: all 0.4s ease;
}
.sim-mode-banner.millis {
  background: rgba(0,212,170,0.1);
  border-color: rgba(0,212,170,0.25);
  color: #6ee7d9;
}

/* Tasks grid */
.tasks-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.task-card {
  display: grid;
  grid-template-columns: 14px 1fr 160px 90px;
  align-items: center;
  gap: 0.9rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: opacity 0.3s ease, filter 0.3s ease;
}
.task-card.blocked {
  opacity: 0.35;
  filter: grayscale(0.7);
}
.task-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}
.task-info { min-width: 0; }
.task-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}
.task-interval {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.task-progress-wrap {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.task-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width 0.05s linear, background 0.3s ease;
}
.task-state {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  text-align: right;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.task-state.fired {
  color: #4ade80;
  animation: flash-state 0.4s ease;
}
.task-state.blocked-state {
  color: #f87171;
}
@keyframes flash-state {
  0%   { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Controls */
.sim-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.btn-action.secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-action.secondary:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

/* ── LED / GND info section (Module 1) ── */
.led-anatomy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
  align-items: start;
}
.led-diagram-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0d0e1a;
  border-radius: 14px;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.05);
}
.led-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.led-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.led-info-list li strong { color: var(--text); }
.led-pin-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.led-pin-badge.anode   { background: rgba(249,115,22,0.15); color: #fb923c; border: 1px solid rgba(249,115,22,0.3); }
.led-pin-badge.cathode { background: rgba(99,102,241,0.15); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }
.led-pin-badge.gnd     { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }

.gnd-explainer {
  background: linear-gradient(135deg, rgba(99,102,241,0.05), rgba(0,212,170,0.05));
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}
.gnd-explainer h4 {
  color: var(--text);
  font-size: 0.95rem;
  margin: 0 0 0.6rem 0;
}
.gnd-explainer p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .pins-grid     { grid-template-columns: 1fr; }
  .code-steps    { grid-template-columns: 1fr; }
  .task-card     { grid-template-columns: 14px 1fr; grid-template-rows: auto auto; }
  .task-progress-wrap { grid-column: 1 / -1; }
  .task-state    { grid-column: 1 / -1; text-align: left; }
  .led-anatomy   { grid-template-columns: 1fr; }
  .cpu-compare-table { flex-direction: column; }
}

/* ================================================================
   MODULE 6 — CPU Cores & Frequency
================================================================ */

.cpu-compare-table {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.cpu-chip-card {
  flex: 1;
  min-width: 180px;
  background: rgba(0,0,0,0.3);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  border: 2px solid;
}
.cpu-chip-card.nano  { border-color: rgba(79,142,247,0.4); }
.cpu-chip-card.esp32 { border-color: rgba(0,212,170,0.4); }
.chip-name {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.cpu-chip-card.nano  .chip-name { color: var(--m1); }
.cpu-chip-card.esp32 .chip-name { color: var(--m4); }
.chip-spec {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-family: 'JetBrains Mono', monospace;
}
.chip-spec:last-child { border-bottom: none; }
.cpu-vs {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-muted);
  text-align: center;
  flex-shrink: 0;
}

.cycles-visual {
  margin-top: 1.25rem;
}
.cycles-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
}
.cycles-label span { color: var(--text); font-weight: 700; }
.cycles-track {
  height: 28px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  overflow: hidden;
}
.cycles-bar {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  white-space: nowrap;
  color: white;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.cycles-bar.nano-bar { background: linear-gradient(90deg, var(--m1), #3378d4); }
.cycles-bar.esp-bar  { background: linear-gradient(90deg, var(--m4), #00a880); }

/* ================================================================
   MODULE 7 — Servo SG90 & PWM
================================================================ */

.servo-controls {
  margin-top: 0.75rem;
}
.servo-readout {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  padding: 0.75rem 1rem;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
}
.servo-readout strong { color: var(--m7); }

.pwm-table {
  margin-top: 1rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.pwm-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pwm-row:last-child { border-bottom: none; }
.pwm-row.header {
  background: rgba(255,255,255,0.04);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pwm-row span { color: var(--text-muted); }
.pwm-row.header span { color: var(--text-muted); }

/* ================================================================
   SYSTÈME QCM — Vérification des acquis
================================================================ */

.qcm-wrapper {
  margin-top: 2.5rem;
  border-top: 2px solid rgba(139,92,246,0.25);
  padding-top: 2rem;
}

.qcm-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.qcm-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.qcm-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.3rem 0;
  color: var(--text);
  letter-spacing: -0.02em;
}

.qcm-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.qcm-questions-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.qcm-question {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.3s ease;
}

.qcm-question[data-answered="correct"] {
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.04);
}

.qcm-q-text {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 1rem 0;
  line-height: 1.6;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.qcm-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(139,92,246,0.25);
  border: 1px solid rgba(139,92,246,0.4);
  color: #c4b5fd;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

.qcm-choices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.qcm-btn {
  width: 100%;
  text-align: left;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.5;
}

.qcm-btn:hover:not(:disabled) {
  background: rgba(139,92,246,0.1);
  border-color: rgba(139,92,246,0.3);
  color: var(--text);
  transform: translateX(3px);
}

.qcm-btn:disabled {
  cursor: default;
}

.qcm-btn.is-correct,
.qcm-btn.is-correct-final {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.4);
  color: #86efac;
  font-weight: 600;
}

.qcm-btn.is-wrong {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.4);
  color: #fca5a5;
}

.qcm-feedback {
  margin-top: 0.75rem;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

.qcm-feedback.correct {
  background: rgba(34,197,94,0.08);
  color: #86efac;
  border: 1px solid rgba(34,197,94,0.2);
}

.qcm-feedback.wrong {
  background: rgba(239,68,68,0.08);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.2);
}

.qcm-footer {
  margin-top: 1.25rem;
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qcm-validated {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(34,197,94,0.1));
  border: 1px solid rgba(139,92,246,0.35);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #c4b5fd;
  animation: popIn 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
