/* =========================================================
   Persona pages — shared additional styles
   ========================================================= */

/* Persona-hero (warm royal blue) */
.p-hero {
  position: relative;
  padding: 180px 0 100px;
  background:
    radial-gradient(ellipse 70% 50% at 80% 20%, oklch(0.62 0.22 270 / 0.45), transparent 70%),
    radial-gradient(ellipse 60% 50% at 10% 80%, oklch(0.78 0.16 220 / 0.35), transparent 70%),
    radial-gradient(ellipse 50% 50% at 100% 100%, oklch(0.62 0.22 295 / 0.25), transparent 70%),
    linear-gradient(180deg, var(--bg-dark-2) 0%, var(--bg-dark) 100%);
  overflow: hidden;
  color: var(--text-dark);
}
.p-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}
@media (max-width: 900px) {
  .p-hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
.p-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.5vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 500;
}
.p-hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.p-hero .lead {
  margin-top: 24px;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-dark-muted);
  line-height: 1.55;
  max-width: 50ch;
}
.p-hero .ctas {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.p-hero .stats-row {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-dark);
}
.p-hero .stat .big {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.025em;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.p-hero .stat .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dark-soft);
  margin-top: 4px;
}

/* Persona-hero mockup card (right side) */
.p-hero-mockup {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 480px;
  margin-left: auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-dark);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
}
.p-hero-mockup .mp-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-dark);
  background: rgba(255,255,255,0.03);
}
.p-hero-mockup .mp-bar .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
}
.p-hero-mockup .mp-bar .label {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dark-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.p-hero-mockup .mp-body { padding: 22px; }

/* Floats near hero */
.p-hero-floats {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.p-hero-floats .glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
}
.p-hero-floats .glow-orb.a {
  width: 360px; height: 360px;
  top: 20%; left: -120px;
  background: oklch(0.55 0.22 270);
}
.p-hero-floats .glow-orb.b {
  width: 300px; height: 300px;
  bottom: 0%; right: -100px;
  background: oklch(0.78 0.16 220);
}

/* Capability grid (8 / 7 features bento) */
.cap-section {
  background: var(--bg-light);
  color: var(--text-light);
}
.cap-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
  align-items: end;
}
@media (max-width: 800px) {
  .cap-head { grid-template-columns: 1fr; gap: 24px; }
}
.cap-head .section-sub { color: var(--text-light-muted); }
.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1000px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .cap-grid { grid-template-columns: 1fr; }
}

/* Mobile collapse helpers for the inline-styled mockup grids (professor / admin pages).
   !important is required to override the inline grid-template-columns on those wrappers. */
@media (max-width: 760px) {
  .m-stack { grid-template-columns: 1fr !important; }
}
@media (max-width: 600px) {
  .m-grid-2 { grid-template-columns: repeat(2, 1fr) !important; }
}
.cap-card {
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  min-height: 240px;
  display: flex;
  flex-direction: column;
}
.cap-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light-hi);
  box-shadow: 0 20px 50px -20px rgba(10,12,28,0.15);
}
.cap-card.feature {
  grid-column: span 2;
  background: linear-gradient(160deg, var(--bg-dark-2), var(--bg-dark));
  color: var(--text-dark);
  border-color: var(--border-dark);
  min-height: 260px;
}
/* In a single column NO card may span 2, or it forces a phantom second column and
   the other cards get crushed. Covers both the .feature class and the inline
   `grid-column: span 2` used on the professor/admin pages — hence !important. */
@media (max-width: 540px) {
  .cap-card { grid-column: auto !important; }
}
.cap-card.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 100% 100%, oklch(0.55 0.22 270 / 0.3), transparent 70%);
  pointer-events: none;
}
.cap-card .cap-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg,
    color-mix(in oklab, currentColor 18%, transparent),
    color-mix(in oklab, currentColor 6%, transparent));
  border: 1px solid color-mix(in oklab, currentColor 35%, transparent);
  display: flex; align-items: center; justify-content: center;
  color: var(--icon-cyan);
  margin-bottom: 18px;
}
.cap-card .cap-icon svg {
  width: 22px; height: 22px;
  stroke-width: 1.75;
}
.cap-card .cap-icon.icon-cyan   { color: var(--icon-cyan);   }
.cap-card .cap-icon.icon-indigo { color: var(--icon-indigo); }
.cap-card .cap-icon.icon-violet { color: var(--icon-violet); }
.cap-card .cap-icon.icon-teal   { color: var(--icon-teal);   }
.cap-card .cap-icon.icon-warm   { color: var(--icon-warm);   }
.cap-card .cap-icon.icon-green  { color: var(--icon-green);  }
.cap-card .cap-icon.icon-rose   { color: var(--icon-rose);   }
.cap-card.feature .cap-icon {
  /* tile bg shows through better on dark surface */
  background: linear-gradient(135deg,
    color-mix(in oklab, currentColor 28%, transparent),
    color-mix(in oklab, currentColor 10%, transparent));
  border-color: color-mix(in oklab, currentColor 45%, transparent);
}
.cap-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.cap-card.feature h3 { font-size: 24px; }
.cap-card p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-light-muted);
}
.cap-card.feature p { color: var(--text-dark-muted); }
.cap-card .cap-tag {
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light-soft);
}
.cap-card.feature .cap-tag { color: var(--text-dark-soft); }

/* Exercise types showcase (student page) */
.exo-types {
  background: var(--bg-light);
}
.exo-head { text-align: center; margin-bottom: 60px; }
.exo-head .section-title { margin: 24px auto 0; }
.exo-head .section-sub { margin: 24px auto 0; }
.exo-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-light);
}
@media (max-width: 800px) {
  .exo-shell { grid-template-columns: 1fr; }
}
.exo-tabs {
  background: var(--bg-light);
  padding: 18px;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
@media (max-width: 800px) {
  .exo-tabs { border-right: 0; border-bottom: 1px solid var(--border-light); flex-direction: row; overflow-x: auto; padding: 12px; }
}
.exo-tab {
  text-align: left;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.exo-tab:hover { color: var(--text-light); background: #fff; }
.exo-tab.active {
  background: linear-gradient(135deg, var(--bg-dark-2), var(--bg-dark));
  color: #fff;
}
.exo-tab.active .badge { background: rgba(255,255,255,0.15); color: #fff; }
.exo-tab .badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-light);
  color: var(--text-light-soft);
  margin-left: auto;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.exo-stage {
  padding: 32px;
  position: relative;
  min-height: 460px;
  display: flex;
  flex-direction: column;
}
.exo-screen {
  display: none;
  flex: 1;
  flex-direction: column;
  gap: 14px;
}
.exo-screen.active { display: flex; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.exo-screen .exo-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.exo-screen .exo-desc {
  font-size: 15px;
  color: var(--text-light-muted);
  line-height: 1.55;
  margin-bottom: 8px;
}
.exo-screen .exo-sample {
  margin-top: 8px;
  padding: 22px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  flex: 1;
}
.exo-screen .exo-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light-soft);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* Schema with hotspots */
.schema-sample {
  position: relative;
  height: 240px;
  background: linear-gradient(180deg, #fff, var(--bg-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.schema-svg { width: 100%; height: 100%; }
.schema-hotspot {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--cyan-bright);
  background: oklch(0.78 0.16 220 / 0.2);
  cursor: none;
  animation: pulse 2s ease-in-out infinite;
}

/* Flashcards */
.flash-stack {
  position: relative;
  height: 240px;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flash-card {
  position: absolute;
  width: 280px;
  height: 180px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border-light-hi);
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-align: center;
  box-shadow: 0 10px 30px -10px rgba(10,12,28,0.15);
  transform-style: preserve-3d;
}
.flash-card:nth-child(1) { transform: translateY(-12px) rotate(-3deg); z-index: 3; }
.flash-card:nth-child(2) { transform: translateY(0) rotate(2deg); z-index: 2; opacity: 0.8; }
.flash-card:nth-child(3) { transform: translateY(12px) rotate(-1deg); z-index: 1; opacity: 0.5; }

/* Texte à trou */
.gap-text {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.7;
}
.gap-text .gap {
  display: inline-block;
  min-width: 110px;
  padding: 2px 10px;
  margin: 0 2px;
  border-bottom: 2px dashed var(--cyan-bright);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan-bright);
  background: oklch(0.78 0.16 220 / 0.08);
  border-radius: 4px;
}

/* Dissertation */
.dissert-sample {
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-light-muted);
}
.dissert-sample .marker {
  background: linear-gradient(120deg, transparent, oklch(0.78 0.16 220 / 0.18) 30%, oklch(0.78 0.16 220 / 0.18) 70%, transparent);
  padding: 0 4px;
  position: relative;
}
.dissert-sample .marker::after {
  content: attr(data-note);
  position: absolute;
  bottom: -22px;
  left: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* QCM sample */
.qcm-sample .qq {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 12px;
}
.qcm-sample .opts { display: flex; flex-direction: column; gap: 6px; }
.qcm-sample .opt {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: #fff;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.qcm-sample .opt .ck {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--border-light-hi);
}
.qcm-sample .opt.correct {
  background: oklch(0.94 0.06 145);
  border-color: oklch(0.7 0.15 145);
}
.qcm-sample .opt.correct .ck {
  background: oklch(0.7 0.15 145);
  border-color: oklch(0.7 0.15 145);
}

/* Coach IA highlight section */
.coach {
  background: linear-gradient(160deg, var(--bg-dark-2), var(--bg-dark));
  color: var(--text-dark);
  position: relative;
  overflow: hidden;
}
.coach::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 30% 30%, oklch(0.55 0.22 270 / 0.25), transparent 70%),
    radial-gradient(ellipse 50% 40% at 70% 70%, oklch(0.78 0.16 220 / 0.2), transparent 70%);
  pointer-events: none;
}
.coach-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) { .coach-inner { grid-template-columns: 1fr; gap: 40px; } }
.coach h2 { font-family: var(--font-display); font-size: clamp(36px, 5vw, 60px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 500; }
.coach h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.coach p { color: var(--text-dark-muted); margin-top: 20px; font-size: 17px; line-height: 1.55; }
.coach ul { list-style: none; margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.coach li { display: flex; gap: 14px; font-size: 15px; line-height: 1.45; }
.coach li::before {
  content: "";
  flex-shrink: 0;
  width: 22px; height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  background: var(--grad-primary-soft);
  border: 1px solid oklch(0.78 0.16 220 / 0.4);
}

/* Coach chat mockup */
.coach-chat {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(10px);
}
.coach-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.coach-msg .av {
  width: 30px; height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.coach-msg.user .av { background: rgba(255,255,255,0.1); }
.coach-msg.ai .av {
  background: conic-gradient(from 0deg, var(--indigo), var(--cyan), var(--violet), var(--indigo));
}
.coach-msg .bubble {
  flex: 1;
  padding: 12px 14px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.coach-msg.user .bubble {
  background: var(--grad-primary-soft);
  border: 1px solid oklch(0.78 0.16 220 / 0.3);
}

/* CTA strip (smaller variant used on persona pages) */
.cta-strip {
  background: linear-gradient(180deg, var(--bg-dark), var(--bg-dark-deep));
  color: var(--text-dark);
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, oklch(0.55 0.22 270 / 0.35), transparent 70%);
  pointer-events: none;
}
.cta-strip-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.cta-strip h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
  max-width: 22ch;
}
.cta-strip h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cta-strip p { color: var(--text-dark-muted); font-size: 17px; line-height: 1.5; max-width: 50ch; }

/* Mockup builders — reusable */
.mk-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 13px;
}
.mk-row { display: flex; align-items: center; gap: 10px; }
.mk-thumb {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--grad-primary);
}
.mk-title { font-weight: 500; }
.mk-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dark-soft); }
.mk-bar {
  margin-top: 10px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}
.mk-bar > span {
  position: absolute; inset: 0 auto 0 0;
  background: var(--grad-primary);
  width: var(--p, 60%);
}

/* Calendar mockup */
.cal {
  font-family: var(--font-mono);
  font-size: 11px;
}
.cal-head {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  color: var(--text-dark-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.cal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.cal-cell {
  padding: 8px 6px;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  min-height: 36px;
  font-size: 10.5px;
  background: rgba(255,255,255,0.02);
}
.cal-cell.busy {
  background: var(--grad-primary-soft);
  border-color: oklch(0.78 0.16 220 / 0.4);
  color: var(--text-dark);
}

/* Admin KPI mockup */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.kpi {
  padding: 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dark);
}
.kpi .lbl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dark-soft);
}
.kpi .val {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-top: 4px;
}
.kpi .delta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: oklch(0.7 0.15 145);
}
.kpi .delta.down { color: oklch(0.65 0.18 25); }

.spark {
  margin-top: 12px;
  height: 60px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-dark);
  padding: 10px;
}

/* =========================================================
   Exercise samples — v2 (extended set)
   ========================================================= */

/* Roomier stage — the new samples are richer */
.exo-stage { min-height: 540px; }

/* ---------- Schéma à légender — v2 ---------- */
.schema-v2 {
  position: relative;
  height: 360px;
  padding: 0;
  background:
    radial-gradient(ellipse at 50% 55%, oklch(0.98 0.015 220) 0%, var(--bg-light) 80%);
  border-radius: 12px;
  overflow: hidden;
}
.schema-v2-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, oklch(0.5 0.05 240 / 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.5 0.05 240 / 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
  pointer-events: none;
}
.schema-v2-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.schema-v2 .lbl-pin {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, -50%);
  z-index: 3;
}
.schema-v2 .lbl-pin .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-dark);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.95), 0 4px 12px -2px rgba(10,12,28,0.18);
  flex-shrink: 0;
}
.schema-v2 .lbl-pin .field {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 11px;
  background: #fff;
  border: 1px solid var(--border-light-hi);
  border-radius: 6px;
  white-space: nowrap;
  color: var(--text-light);
  box-shadow: 0 2px 8px -2px rgba(10,12,28,0.08);
}
.schema-v2 .lbl-pin.correct .field {
  background: oklch(0.96 0.06 145);
  border-color: oklch(0.7 0.15 145);
  color: oklch(0.36 0.12 145);
}
.schema-v2 .lbl-pin.correct .field::after {
  content: "  ✓";
  color: oklch(0.55 0.15 145);
  font-weight: 700;
}
.schema-v2 .lbl-pin.correct .num {
  background: oklch(0.55 0.15 145);
}
.schema-v2 .lbl-pin.typing .num {
  background: var(--cyan);
  animation: schemaPulse 1.8s ease-in-out infinite;
}
.schema-v2 .lbl-pin.typing .field {
  border-color: var(--cyan);
  background: oklch(0.97 0.04 220);
  color: var(--indigo-deep);
  min-width: 64px;
}
.schema-v2 .lbl-pin.typing .field .typed::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  background: var(--indigo-deep);
  margin-left: 2px;
  vertical-align: middle;
  animation: caretBlink 1s steps(2) infinite;
}
.schema-v2 .lbl-pin.empty .field {
  color: var(--text-light-soft);
  font-style: italic;
  background: rgba(255,255,255,0.6);
  border-style: dashed;
}
.schema-v2 .lbl-pin.empty .num {
  background: rgba(10,12,28,0.45);
}
@keyframes schemaPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,0.95), 0 0 0 0 oklch(0.78 0.16 220 / 0.5); }
  50%      { box-shadow: 0 0 0 3px rgba(255,255,255,0.95), 0 0 0 8px oklch(0.78 0.16 220 / 0); }
}
@keyframes caretBlink { 0%,50%{opacity:1} 51%,100%{opacity:0} }
.schema-v2-hud {
  position: absolute;
  bottom: 14px; left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 8px;
  background: rgba(10,12,28,0.85);
  color: #fff;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
  z-index: 4;
}
.schema-v2-hud .hud-pip {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
}
.schema-v2-hud .hud-pip.ok { background: oklch(0.78 0.15 145); }
.schema-v2-hud .hud-pip.dim { background: rgba(255,255,255,0.12); }
.schema-v2-hud .hud-txt { margin-left: 4px; opacity: 0.85; }

/* ---------- Légende à placer (drag inverse) ---------- */
.drag-leg {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}
.dl-canvas {
  position: relative;
  height: 240px;
  background:
    radial-gradient(ellipse at 50% 50%, oklch(0.98 0.015 25) 0%, var(--bg-light) 80%);
  border-radius: 10px;
  overflow: hidden;
}
.dl-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}
.dl-slot {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 3;
}
.dl-slot:not(.filled):not(.dropping) {
  width: 130px; height: 30px;
  border-radius: 8px;
  border: 1.5px dashed var(--border-light-hi);
  background: rgba(255,255,255,0.55);
  display: flex; align-items: center; justify-content: center;
}
.dl-slot-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light-soft);
}
.dl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #fff;
  border: 1px solid var(--border-light-hi);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-light);
  font-family: var(--font-display);
  cursor: grab;
  box-shadow: 0 2px 6px -2px rgba(10,12,28,0.1);
  white-space: nowrap;
  user-select: none;
}
.dl-chip::before {
  content: "";
  width: 4px;
  height: 12px;
  border-radius: 2px;
  background: repeating-linear-gradient(to bottom,
    var(--border-light-hi) 0 2px,
    transparent 2px 4px);
}
.dl-chip.placed {
  background: oklch(0.96 0.06 145);
  border-color: oklch(0.7 0.15 145);
  color: oklch(0.36 0.12 145);
  cursor: default;
}
.dl-chip.placed::before { background: oklch(0.7 0.15 145); }
.dl-chip.placed::after {
  content: "✓";
  margin-left: 2px;
  color: oklch(0.55 0.15 145);
  font-weight: 700;
}
.dl-chip.used {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.dl-chip.used::after {
  content: "↑";
  margin-left: 2px;
  color: var(--text-light-soft);
}

/* Animated flying chip */
.dl-slot.dropping {
  /* the slot still acts as a target visual */
}
.dl-chip.flying {
  position: absolute;
  z-index: 5;
  animation: dlFly 4.5s ease-in-out infinite;
  background: #fff;
  border-color: var(--cyan-bright);
  box-shadow: 0 14px 30px -8px oklch(0.78 0.16 220 / 0.45);
  transform-origin: center;
}
@keyframes dlFly {
  0%   { transform: translate(180px, 110px) scale(1.04) rotate(-3deg); opacity: 0; }
  6%   { opacity: 1; }
  35%  { transform: translate(60px, 40px) scale(1.06) rotate(2deg); }
  70%  { transform: translate(0, 0) scale(1) rotate(0); }
  78%  {
    background: oklch(0.96 0.06 145);
    border-color: oklch(0.7 0.15 145);
    color: oklch(0.36 0.12 145);
  }
  100% {
    transform: translate(0, 0) scale(1) rotate(0);
    background: oklch(0.96 0.06 145);
    border-color: oklch(0.7 0.15 145);
    color: oklch(0.36 0.12 145);
  }
}
/* Ghost chip in bank: fades while its twin is flying */
.dl-chip.flying-ghost {
  animation: dlGhost 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes dlGhost {
  0%, 4%   { opacity: 1; }
  6%, 100% { opacity: 0.15; }
}

.dl-bank {
  padding: 12px 14px;
  background: var(--bg-light);
  border: 1px dashed var(--border-light-hi);
  border-radius: 10px;
}
.dl-bank-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light-soft);
  margin-bottom: 8px;
}
.dl-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Flashcards — animated flip ---------- */
.flash-sample {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 26px 22px;
}
.flash-deck {
  position: relative;
  width: 340px;
  height: 210px;
  perspective: 1400px;
}
.flash-bg {
  position: absolute;
  inset: 0;
  background: #fff;
  border: 1px solid var(--border-light-hi);
  border-radius: 14px;
  box-shadow: 0 10px 30px -14px rgba(10,12,28,0.12);
}
.flash-bg-1 { transform: translate(6px, 8px) rotate(2.4deg); opacity: 0.85; }
.flash-bg-2 { transform: translate(12px, 16px) rotate(4.5deg); opacity: 0.6; }
.flash-bg-3 { transform: translate(18px, 24px) rotate(6.5deg); opacity: 0.35; }

.flash-card-3d {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.flash-card-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: flashFlip 7s ease-in-out infinite;
}
@keyframes flashFlip {
  0%, 42%  { transform: rotateY(0deg); }
  50%, 92% { transform: rotateY(180deg); }
  100%     { transform: rotateY(360deg); }
}
.flash-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background: #fff;
  border: 1px solid var(--border-light-hi);
  border-radius: 14px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 18px 40px -16px rgba(10,12,28,0.2);
}
.flash-front {
  background: linear-gradient(180deg, #fff, oklch(0.98 0.01 220));
}
.flash-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(ellipse at 80% 0%, oklch(0.95 0.07 220) 0%, #fff 70%);
  border-color: oklch(0.78 0.16 220 / 0.5);
}
.flash-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light-soft);
}
.flash-q {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text-light);
}
.flash-a {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-light);
}
.flash-a em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.flash-sub {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-light-muted);
}
.flash-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-light-soft);
  letter-spacing: 0.06em;
}

.flash-eval {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 420px;
}
.fl-btn {
  padding: 9px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--border-light-hi);
  color: var(--text-light-muted);
  transition: transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
}
.fl-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(10,12,28,0.2); }
.fl-again { border-color: oklch(0.78 0.16 25 / 0.5); color: oklch(0.55 0.18 25); }
.fl-hard  { border-color: oklch(0.78 0.14 60 / 0.5); color: oklch(0.55 0.14 60); }
.fl-good  { border-color: oklch(0.7 0.15 220 / 0.5); color: var(--indigo); }
.fl-easy  { border-color: oklch(0.7 0.15 145 / 0.5); color: oklch(0.45 0.13 145); }

.flash-progress {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.flash-progress-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(10,12,28,0.08);
  position: relative;
  overflow: hidden;
}
.flash-progress-bar > span {
  position: absolute; inset: 0 auto 0 0;
  width: var(--p, 60%);
  background: var(--grad-primary);
}
.flash-progress-txt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-light-soft);
  letter-spacing: 0.04em;
}
.flash-progress-txt span { color: var(--text-light); font-weight: 600; }

/* ---------- Mise en ordre ---------- */
.order-sample {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}
.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light-soft);
}
.order-head-status {
  padding: 3px 8px;
  background: oklch(0.96 0.06 145);
  color: oklch(0.4 0.13 145);
  border-radius: 999px;
}
.order-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 12px;
  background: #fff;
  border: 1px solid var(--border-light-hi);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--text-light);
  box-shadow: 0 2px 8px -4px rgba(10,12,28,0.08);
}
.order-grip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 12px;
  flex-shrink: 0;
  cursor: grab;
}
.order-grip i {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--border-light-hi);
  display: block;
}
.order-rank {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--bg-light);
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}
.order-text { flex: 1; line-height: 1.35; }
.order-ok {
  font-family: var(--font-mono);
  font-size: 13px;
  color: oklch(0.55 0.15 145);
  font-weight: 700;
}
.order-card.moving {
  background: linear-gradient(180deg, #fff, oklch(0.97 0.02 220));
  border-color: var(--cyan-bright);
  box-shadow: 0 18px 36px -14px oklch(0.78 0.16 220 / 0.45);
  z-index: 3;
  animation: orderLift 4.5s ease-in-out infinite;
}
.order-card.moving .order-rank {
  background: var(--cyan-bright);
  border-color: var(--cyan-bright);
  color: #fff;
}
.order-card.moving .order-ok {
  color: var(--cyan-bright);
  animation: orderArrow 4.5s ease-in-out infinite;
}
@keyframes orderLift {
  0%, 12% { transform: translateY(0) scale(1); }
  30%     { transform: translateY(-8px) scale(1.015); }
  55%     { transform: translateY(-58px) scale(1.015); }
  82%     { transform: translateY(0) scale(1); }
  100%    { transform: translateY(0) scale(1); }
}
@keyframes orderArrow {
  0%, 12%, 82%, 100% { opacity: 0; }
  30%, 55%           { opacity: 1; }
}
.order-card.slot-shadow {
  background: repeating-linear-gradient(135deg,
    rgba(10,12,28,0.02) 0 6px,
    transparent 6px 12px);
  border-style: dashed;
  color: var(--text-light-muted);
  animation: orderSlotShift 4.5s ease-in-out infinite;
}
.order-card.slot-shadow .order-rank {
  background: transparent;
  border-style: dashed;
  color: var(--text-light-soft);
}
@keyframes orderSlotShift {
  0%, 12%, 82%, 100% { transform: translateY(0); }
  30%, 55%           { transform: translateY(-50px); }
}

/* ---------- Association ---------- */
.match-sample {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
}
.match-heads {
  display: grid;
  grid-template-columns: 1fr 96px 1fr;
  align-items: center;
}
.match-col-head {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-light-soft);
  padding: 0 14px;
}
.match-grid {
  display: grid;
  grid-template-columns: 1fr 96px 1fr;
  align-items: stretch;
  position: relative;
}
.match-col {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 10px;
  min-height: 0;
}
.match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border-light-hi);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.25;
  color: var(--text-light);
  font-weight: 500;
  position: relative;
  z-index: 2;
}
.match-item.right { text-align: right; }
.match-item .match-label { flex: 1; min-width: 0; }
.match-item .match-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--border-light-hi);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border-light-hi);
  flex-shrink: 0;
}
/* Already-matched pairs (3 of 4) get green dots */
.match-left .match-item:nth-child(1) .match-dot,
.match-left .match-item:nth-child(2) .match-dot,
.match-left .match-item:nth-child(3) .match-dot,
.match-right .match-item:nth-child(1) .match-dot,
.match-right .match-item:nth-child(2) .match-dot,
.match-right .match-item:nth-child(3) .match-dot {
  background: oklch(0.7 0.15 145);
  box-shadow: 0 0 0 1px oklch(0.7 0.15 145);
}
/* Active = pair currently being drawn */
.match-item.active {
  border-color: var(--cyan-bright);
  box-shadow: 0 0 0 3px oklch(0.78 0.16 220 / 0.18);
  animation: matchPulse 2.4s ease-in-out infinite;
}
.match-item.active .match-dot {
  background: var(--cyan-bright);
  box-shadow: 0 0 0 1px var(--cyan-bright), 0 0 12px var(--cyan-bright);
}
@keyframes matchPulse {
  0%, 100% { box-shadow: 0 0 0 3px oklch(0.78 0.16 220 / 0.15); }
  50%      { box-shadow: 0 0 0 6px oklch(0.78 0.16 220 / 0.05); }
}
.match-wires {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
.match-wires .wire {
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.match-wires .wire-draw {
  animation: wireDraw 2.4s ease-in-out infinite;
}
@keyframes wireDraw {
  0%   { stroke-dashoffset: 120; opacity: 0; }
  10%  { opacity: 1; }
  60%, 100% { stroke-dashoffset: 0; opacity: 1; }
}
@media (max-width: 700px) {
  .match-heads,
  .match-grid { grid-template-columns: 1fr 48px 1fr; }
}
