/* ═══════════════════════════════════════════════════════════
   Flexorama — Static pages shared stylesheet
   Covers: /landing/index.html  +  /q/{slug}.html
   Replicates the Angular app's design system faithfully.
   ═══════════════════════════════════════════════════════════ */

/* ── 1. Variables (réplication exacte de src/styles.scss) ── */
:root,
[data-theme="dark"] {
  --fx-bg:              #09090b;
  --fx-surface:         rgba(18,18,22,0.85);
  --fx-surface-solid:   #121216;
  --fx-soft:            rgba(255,255,255,0.04);
  --fx-soft-solid:      #161619;
  --fx-accent:          #FF8A00;
  --fx-accent-mid:      #FFB347;
  --fx-accent-dark:     #CC6F00;
  --fx-adim:            rgba(255,138,0,0.08);
  --fx-aglow:           rgba(255,138,0,0.20);
  --fx-secondary:       #60A5FA;
  --fx-success:         #34D399;
  --fx-warn:            #FBBF24;
  --fx-danger:          #EF4444;
  --fx-purple:          #A78BFA;
  --fx-text:            #FAFAFA;
  --fx-text-secondary:  #E4E4E7;
  --fx-muted:           #A1A1AA;
  --fx-border:          rgba(255,255,255,0.07);
  --fx-border-hover:    rgba(255,255,255,0.12);
  --fx-shadow-sm:       0 1px 2px rgba(0,0,0,0.30);
  --fx-shadow-md:       0 4px 16px rgba(0,0,0,0.25);
  --fx-shadow-lg:       0 12px 40px rgba(0,0,0,0.35);
  --fx-shadow-glow:     0 0 32px var(--fx-aglow);
  --fx-transition-fast:   150ms cubic-bezier(0.4,0,0.2,1);
  --fx-transition-smooth: 300ms cubic-bezier(0.4,0,0.2,1);
}

[data-theme="light"] {
  --fx-bg:              #FAFAFA;
  --fx-surface:         rgba(255,255,255,0.80);
  --fx-surface-solid:   #FFFFFF;
  --fx-soft:            rgba(0,0,0,0.03);
  --fx-soft-solid:      #F4F4F5;
  --fx-adim:            rgba(255,138,0,0.08);
  --fx-aglow:           rgba(255,138,0,0.15);
  --fx-secondary:       #2563EB;
  --fx-success:         #16A34A;
  --fx-warn:            #B45309;
  --fx-purple:          #6D28D9;
  --fx-danger:          #DC2626;
  --fx-text:            #18181B;
  --fx-text-secondary:  #3F3F46;
  --fx-muted:           #71717A;
  --fx-border:          rgba(0,0,0,0.08);
  --fx-border-hover:    rgba(0,0,0,0.15);
  --fx-shadow-sm:       0 1px 2px rgba(0,0,0,0.06);
  --fx-shadow-md:       0 4px 16px rgba(0,0,0,0.08);
  --fx-shadow-lg:       0 12px 40px rgba(0,0,0,0.12);
}

/* ── 2. Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.6;
  background: var(--fx-bg); color: var(--fx-text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── 3. Navbar (réplication exacte de navbar.component.ts) ── */
.fx-navbar {
  position: sticky; top: 0; z-index: 200;
  background: var(--fx-surface-solid);
  border-bottom: 1px solid var(--fx-border);
}
.fx-navbar__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.fx-navbar__brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: var(--fx-text);
}
.fx-navbar__logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--fx-accent), var(--fx-accent-mid));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.fx-navbar__beta { font-size: 11px; font-weight: 600; color: var(--fx-muted); }
.fx-navbar__actions { display: flex; align-items: center; gap: 8px; }
.fx-navbar__icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--fx-border); background: transparent;
  color: var(--fx-muted); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--fx-transition-fast), border-color var(--fx-transition-fast);
}
.fx-navbar__icon-btn:hover { background: var(--fx-soft); border-color: var(--fx-border-hover); }
.fx-navbar__login {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 20px; border-radius: 18px; border: none;
  background: linear-gradient(180deg, #FF9A21, var(--fx-accent));
  color: #18181B; font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer; text-decoration: none;
  transition: transform 0.18s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.18s cubic-bezier(0.34,1.2,0.64,1);
  box-shadow: 0 3px 0 var(--fx-accent-dark), 0 4px 12px -2px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.3);
}
.fx-navbar__login:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--fx-accent-dark), 0 8px 18px -4px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.35); }

/* ── 4. Hero (réplication exacte de hero.component.ts) ── */
.fx-hero { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; }
.fx-hero__grid {
  display: grid; grid-template-columns: 1.2fr 0.8fr;
  gap: 40px; align-items: center;
  padding: 56px 0 48px;
  min-height: calc(100vh - 64px);
}
.fx-hero__content { animation: fx-fadeIn 0.4s ease-out; }
@keyframes fx-fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fx-hero__badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  background: var(--fx-adim); color: var(--fx-accent);
  border: 1px solid rgba(255,138,0,0.15); margin-bottom: 20px;
}
.fx-hero__title {
  font-size: 44px; font-weight: 900; line-height: 1.1;
  letter-spacing: -0.04em; margin: 0 0 16px; color: var(--fx-text);
}
.fx-hero__accent { color: var(--fx-accent); }
.fx-hero__subtitle {
  font-size: 17px; color: var(--fx-text-secondary); line-height: 1.6;
  margin: 0 0 32px; max-width: 520px;
}
.fx-hero__cta-group { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.fx-hero__btn-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, #FF9A21, var(--fx-accent));
  color: #18181B; border: none;
  padding: 16px 38px; border-radius: 18px;
  font-weight: 800; font-size: 18px; letter-spacing: -0.02em;
  cursor: pointer; font-family: inherit; text-decoration: none;
  transition: transform 0.18s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.18s cubic-bezier(0.34,1.2,0.64,1);
  box-shadow: 0 3px 0 var(--fx-accent-dark), 0 6px 14px -4px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.3);
}
.fx-hero__btn-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--fx-accent-dark), 0 12px 22px -6px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.35); }
.fx-hero__btn-cta:active { transform: translateY(3px); box-shadow: 0 0 0 var(--fx-accent-dark), 0 2px 6px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.25); }
.fx-hero__hint {
  font-size: 12px; color: var(--fx-muted);
  display: flex; align-items: center; gap: 8px;
}
.fx-hero__live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fx-success); animation: fx-pulse 2s infinite; flex-shrink: 0;
}
@keyframes fx-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.fx-hero__scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--fx-border-hover); background: var(--fx-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--fx-muted); text-decoration: none;
  backdrop-filter: blur(4px);
  animation: fx-scroll-bob 2.4s ease-in-out infinite;
  transition: border-color var(--fx-transition-smooth), color var(--fx-transition-smooth), background var(--fx-transition-smooth);
}
.fx-hero__scroll-hint:hover {
  animation-play-state: paused;
  border-color: rgba(255,138,0,0.4); color: var(--fx-accent); background: var(--fx-adim);
}
@keyframes fx-scroll-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ── 5. Signup card (réplication exacte de signup-card.component.ts) ── */
.fx-signup {
  background: var(--fx-surface-solid); border: 1px solid var(--fx-border);
  border-radius: 20px; padding: 32px;
  animation: fx-scaleIn 0.5s ease-out 0.1s both;
}
@keyframes fx-scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.fx-signup__title { font-size: 20px; font-weight: 800; color: var(--fx-text); margin-bottom: 4px; letter-spacing: -0.02em; }
.fx-signup__sub   { font-size: 13px; color: var(--fx-muted); margin-bottom: 24px; }
.fx-signup__features { padding: 0; margin: 0 0 24px; }
.fx-signup__features li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; font-size: 14px; font-weight: 500; color: var(--fx-text-secondary);
}
.fx-signup__check { color: var(--fx-success); font-weight: 800; flex-shrink: 0; }
.fx-signup__btn {
  display: block; width: 100%; padding: 14px; border-radius: 18px;
  font-size: 15px; font-weight: 800; text-align: center;
  background: linear-gradient(180deg, #FF9A21, var(--fx-accent));
  color: #18181B; border: none; cursor: pointer; font-family: inherit;
  text-decoration: none;
  transition: transform 0.18s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.18s cubic-bezier(0.34,1.2,0.64,1);
  box-shadow: 0 3px 0 var(--fx-accent-dark), 0 6px 14px -4px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.3);
}
.fx-signup__btn:hover:not(.fx-signup__btn--disabled) { transform: translateY(-1px); box-shadow: 0 4px 0 var(--fx-accent-dark), 0 12px 22px -6px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.35); }
.fx-signup__btn--disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; pointer-events: none; }
.fx-signup__age-gate {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px; cursor: pointer;
}
.fx-signup__age-checkbox {
  flex-shrink: 0; margin-top: 2px; width: 16px; height: 16px;
  accent-color: var(--fx-accent); cursor: pointer;
}
.fx-signup__age-label { font-size: 12px; color: var(--fx-muted); line-height: 1.4; user-select: none; }
.fx-signup__login-hint { text-align: center; margin-top: 12px; font-size: 13px; color: var(--fx-muted); }
.fx-signup__login-link { color: var(--fx-accent); font-weight: 600; }
.fx-signup__login-link:hover { text-decoration: underline; }
.fx-signup__proof { text-align: center; margin-top: 16px; font-size: 12px; color: var(--fx-muted); }
.fx-signup__notice {
  margin-top: 14px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--fx-soft); border: 1px solid var(--fx-border);
  font-size: 12px; color: var(--fx-muted); line-height: 1.5;
  text-align: left;
}
.fx-signup__notice strong { color: var(--fx-accent); font-weight: 700; }

/* ── 6. Features (réplication exacte de features-showcase.component.ts) ── */
.fx-features {
  padding: 64px 24px;
  background: var(--fx-surface); border-top: 1px solid var(--fx-border);
  border-bottom: 1px solid var(--fx-border);
}
.fx-features__inner { max-width: 1100px; margin: 0 auto; }
.fx-features__header { text-align: center; margin-bottom: 48px; }
.fx-features__badge {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: var(--fx-adim); color: var(--fx-accent);
  border: 1px solid var(--fx-aglow); margin-bottom: 16px;
}
.fx-features__title {
  font-size: clamp(24px, 4vw, 38px); font-weight: 900;
  letter-spacing: -.03em; color: var(--fx-text); margin: 0 0 12px; line-height: 1.15;
}
.fx-features__title-accent { color: var(--fx-accent); display: block; }
.fx-features__subtitle { font-size: 15px; color: var(--fx-muted); margin: 0 auto; max-width: 520px; }
.fx-features__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto; gap: 16px;
}
.fx-feat-card {
  display: flex; flex-direction: column; gap: 16px; padding: 24px;
  background: var(--fx-surface-solid); border: 1px solid var(--fx-border);
  border-radius: 20px; transition: border-color 200ms, transform 200ms; overflow: hidden;
}
.fx-feat-card:hover { border-color: var(--fx-accent); transform: translateY(-2px); }
.fx-feat-card--wide { grid-column: span 2; }
.fx-feat-card__content { display: flex; align-items: flex-start; gap: 14px; }
.fx-feat-card__body { flex: 1; }
.fx-feat-card__title { font-size: 15px; font-weight: 800; color: var(--fx-text); margin: 0 0 5px; }
.fx-feat-card__desc  { font-size: 13px; color: var(--fx-muted); margin: 0; line-height: 1.55; }
.fx-feat-card__icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.fx-feat-card__icon--orange { background: var(--fx-adim); color: var(--fx-accent); }
.fx-feat-card__icon--gold   { background: rgba(234,179,8,.12); color: rgb(234,179,8); }
.fx-feat-card__icon--purple { background: rgba(124,58,237,.12); color: rgb(124,58,237); }
.fx-feat-card__icon--cyan   { background: rgba(6,182,212,.12);  color: rgb(6,182,212); }
.fx-feat-card__icon--green  { background: rgba(5,150,105,.12);  color: rgb(5,150,105); }

/* Leaderboard showcase */
.fx-feat-lb-showcase { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.fx-feat-lb-podium { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.fx-feat-lb-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border-radius: 10px; background: var(--fx-soft); border: 1px solid var(--fx-border);
}
.fx-feat-lb-row--top1 { background: var(--fx-adim); border-color: var(--fx-aglow); box-shadow: 0 0 12px rgba(255,138,0,.12); }
.fx-feat-lb-medal { font-size: 14px; width: 18px; flex-shrink: 0; }
.fx-feat-lb-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #fff;
}
.fx-feat-lb-avatar--you { background: var(--fx-soft); border: 1px dashed var(--fx-accent); color: var(--fx-accent); font-size: 13px; }
.fx-feat-lb-name { font-size: 12px; font-weight: 600; color: var(--fx-muted); flex: 1; white-space: nowrap; }
.fx-feat-lb-name--you { color: var(--fx-accent); font-weight: 800; }
.fx-feat-lb-pts { font-size: 11px; color: var(--fx-muted); flex-shrink: 0; }
.fx-feat-lb-pts--you { color: var(--fx-accent); font-weight: 700; letter-spacing: .05em; }
.fx-feat-lb-types { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fx-lb-type-label { font-size: 11px; font-weight: 700; color: var(--fx-muted); text-transform: uppercase; letter-spacing: .06em; }
.fx-lb-types-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-lb-type { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--fx-soft); color: var(--fx-muted); border: 1px solid var(--fx-border); white-space: nowrap; }
.fx-lb-type--active { background: rgba(234,179,8,.1); border-color: rgba(234,179,8,.35); color: rgb(234,179,8); }

/* Mode chips */
.fx-feat-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-mode-chip { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--fx-border); background: var(--fx-soft); color: var(--fx-muted); }
.fx-mode-chip--solo { border-color: var(--fx-aglow); color: var(--fx-accent); background: var(--fx-adim); }
.fx-mode-chip--duel { border-color: rgba(239,68,68,.3); color: rgb(239,68,68); background: rgba(239,68,68,.08); }
.fx-mode-chip--soon { opacity: .45; }
.fx-mode-chip--soon em { font-style: normal; font-size: 10px; font-weight: 600; margin-left: 4px; opacity: .7; }

/* XP */
.fx-feat-xp { display: flex; align-items: flex-end; gap: 16px; }
.fx-feat-xp__badge { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 14px; background: var(--fx-adim); border: 1px solid var(--fx-aglow); }
.fx-feat-xp__mult  { font-size: 22px; font-weight: 900; color: var(--fx-accent); line-height: 1; }
.fx-feat-xp__label { font-size: 10px; color: var(--fx-muted); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-top: 2px; }
.fx-feat-xp__levels { display: flex; align-items: flex-end; gap: 4px; height: 48px; }
.fx-feat-xp__level { width: 10px; border-radius: 4px 4px 0 0; background: var(--fx-soft); border: 1px solid var(--fx-border); }
.fx-feat-xp__level--active { background: var(--fx-accent); border-color: var(--fx-accent); }

/* Tags catalogue */
.fx-feat-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-feat-tag { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--fx-soft); color: var(--fx-muted); border: 1px solid var(--fx-border); }
.fx-feat-tag--ai { background: var(--fx-adim); color: var(--fx-accent); border-color: var(--fx-aglow); }

/* Communauté avatars */
.fx-feat-community { display: flex; align-items: center; gap: 12px; }
.fx-feat-avatars { display: flex; }
.fx-feat-avatar { width: 30px; height: 30px; border-radius: 50%; font-size: 11px; font-weight: 800; color: #fff; display: flex; align-items: center; justify-content: center; border: 2px solid var(--fx-surface-solid); margin-left: -8px; }
.fx-feat-avatars > .fx-feat-avatar:first-child { margin-left: 0; }
.fx-feat-avatar--more { background: var(--fx-soft); color: var(--fx-muted); font-size: 10px; }
.fx-feat-community__label { font-size: 12px; color: var(--fx-muted); font-weight: 600; }

/* Stats bar */
.fx-features__stats {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0;
  margin-top: 48px; padding: 28px 32px;
  background: var(--fx-surface-solid); border: 1px solid var(--fx-border); border-radius: 20px;
}
.fx-stat { text-align: center; padding: 0 32px; flex: 1; min-width: 100px; }
.fx-stat__value { display: block; font-size: 28px; font-weight: 900; color: var(--fx-accent); letter-spacing: -.02em; }
.fx-stat__label { display: block; font-size: 12px; color: var(--fx-muted); font-weight: 600; margin-top: 2px; }
.fx-stat__sep { width: 1px; height: 40px; background: var(--fx-border); flex-shrink: 0; }

/* ── 7. Quiz grid section ── */
.fx-quizzes { padding: 64px 24px; }
.fx-quizzes__inner { max-width: 1200px; margin: 0 auto; }
.fx-quizzes__header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 8px; }
.fx-quizzes__title { font-size: clamp(20px, 3vw, 28px); font-weight: 900; letter-spacing: -.03em; color: var(--fx-text); }
.fx-quizzes__sub { font-size: 14px; color: var(--fx-muted); }
.fx-quiz-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.fx-quiz-card {
  display: flex; flex-direction: column; gap: 10px; padding: 16px;
  background: var(--fx-surface-solid); border: 1px solid var(--fx-border);
  border-radius: 16px; text-decoration: none;
  transition: border-color var(--fx-transition-fast), transform var(--fx-transition-fast);
}
.fx-quiz-card:hover { border-color: var(--fx-border-hover); transform: translateY(-2px); box-shadow: var(--fx-shadow-md); }
.fx-quiz-card__emoji { font-size: 28px; line-height: 1; }
.fx-quiz-card__title { font-size: 14px; font-weight: 700; color: var(--fx-text); line-height: 1.3; margin: 0; }
.fx-quiz-card__desc { font-size: 12px; color: var(--fx-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fx-quiz-card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }

/* Badges */
.fx-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.fx-badge-easy   { background: rgba(52,211,153,0.12); color: #34D399; border: 1px solid rgba(52,211,153,0.25); }
.fx-badge-medium { background: rgba(96,165,250,0.12); color: #60A5FA; border: 1px solid rgba(96,165,250,0.25); }
.fx-badge-hard   { background: rgba(239,68,68,0.12);  color: #EF4444; border: 1px solid rgba(239,68,68,0.25); }
.fx-badge-expert { background: rgba(167,139,250,0.12); color: #A78BFA; border: 1px solid rgba(167,139,250,0.25); }
[data-theme="light"] .fx-badge-easy   { color: #16A34A; background: rgba(22,163,74,0.08); border-color: rgba(22,163,74,0.25); }
[data-theme="light"] .fx-badge-medium { color: #2563EB; background: rgba(37,99,235,0.08); border-color: rgba(37,99,235,0.25); }
[data-theme="light"] .fx-badge-hard   { color: #DC2626; background: rgba(220,38,38,0.08); border-color: rgba(220,38,38,0.25); }
[data-theme="light"] .fx-badge-expert { color: #6D28D9; background: rgba(109,40,217,0.08); border-color: rgba(109,40,217,0.25); }
/* Boutons secondary (bordure visible) — opacité plus dense en light pour contraste ≥3:1 */
[data-theme="light"] .fx-ob-btn-ghost,
[data-theme="light"] .fx-results-cta-login,
[data-theme="light"] .fx-results-btn-another { box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.50); color: #18181B; }
[data-theme="light"] .fx-ob-btn-ghost:hover,
[data-theme="light"] .fx-results-cta-login:hover,
[data-theme="light"] .fx-results-btn-another:hover { box-shadow: inset 0 0 0 1.5px #FF8A00; }
/* Danger calme en light */
[data-theme="light"] .fx-play-quit-btn { background: rgba(220,38,38,.08); color: #B91C1C; box-shadow: inset 0 0 0 1.5px rgba(220,38,38,.35); }
[data-theme="light"] .fx-play-quit-btn:hover { background: rgba(220,38,38,.16); box-shadow: inset 0 0 0 1.5px rgba(220,38,38,.55); }
.fx-quiz-tag { font-size: 11px; color: var(--fx-muted); padding: 2px 6px; border-radius: 6px; background: var(--fx-soft); }

/* ── 8. Final CTA ── */
.fx-final-cta { padding: 80px 24px; text-align: center; background: var(--fx-surface); border-top: 1px solid var(--fx-border); }
.fx-final-cta__inner { max-width: 540px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.fx-final-cta__title { font-size: clamp(24px, 4vw, 38px); font-weight: 900; letter-spacing: -.035em; color: var(--fx-text); line-height: 1.15; }
.fx-final-cta__sub { font-size: 16px; color: var(--fx-muted); }
.fx-final-cta__proof { font-size: 13px; color: var(--fx-muted); }

/* ── 9. Footer ── */
.fx-footer { background: var(--fx-surface-solid); border-top: 1px solid var(--fx-border); }
.fx-footer__inner { max-width: 1200px; margin: 0 auto; padding: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.fx-footer__brand { font-size: 14px; font-weight: 800; color: var(--fx-muted); display: flex; align-items: center; gap: 8px; }
.fx-footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.fx-footer__link { font-size: 12px; color: var(--fx-muted); transition: color var(--fx-transition-fast); }
.fx-footer__link:hover { color: var(--fx-accent); }
.fx-footer__copy { font-size: 11px; color: var(--fx-muted); }
.fx-footer__logo-mark-sm { width: 20px !important; height: 20px !important; border-radius: 6px !important; }

/* ── 10. Quiz detail page (/q/{slug}) ── */
.fx-quiz-detail { padding: 32px 0 80px; }
.fx-section-inner { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.fx-breadcrumb { margin-bottom: 32px; }
.fx-breadcrumb__list { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--fx-text-secondary); }
.fx-breadcrumb__link { color: var(--fx-text-secondary); font-weight: 600; transition: color var(--fx-transition-fast); }
.fx-breadcrumb__link:hover { color: var(--fx-accent); }
.fx-breadcrumb__sep { color: var(--fx-muted); }
.fx-quiz-header { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 32px; border-radius: 20px; background: var(--fx-surface-solid); border: 1px solid var(--fx-border); margin-bottom: 24px; }
.fx-quiz-hero-emoji { font-size: 48px; line-height: 1; }
.fx-quiz-header h1 { font-size: clamp(24px, 5vw, 36px); font-weight: 900; letter-spacing: -.035em; color: var(--fx-text); line-height: 1.15; }
.fx-quiz-tagline { font-size: 16px; color: var(--fx-muted); max-width: 600px; line-height: 1.6; }
.fx-quiz-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fx-quiz-count, .fx-quiz-duration, .fx-quiz-tag-detail { font-size: 12px; color: var(--fx-muted); }
.fx-quiz-tag { font-size: 11px; color: var(--fx-muted); padding: 2px 8px; border-radius: 6px; background: var(--fx-soft); }
.fx-quiz-play-cta { padding: 40px 32px; border-radius: 16px; background: var(--fx-surface-solid); border: 1px solid var(--fx-border); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-bottom: 24px; }
.fx-quiz-play-cta h2 { font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: var(--fx-text); }
.fx-quiz-play-cta p { font-size: 14px; color: var(--fx-muted); }
.fx-quiz-play-btn {
  display: inline-flex; align-items: center; padding: 14px 40px; border-radius: 18px; border: none;
  background: linear-gradient(180deg, #FF9A21, var(--fx-accent)); color: #18181B;
  font-size: 16px; font-weight: 800; cursor: pointer; font-family: inherit; text-decoration: none;
  transition: transform 0.18s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.18s cubic-bezier(0.34,1.2,0.64,1);
  box-shadow: 0 3px 0 var(--fx-accent-dark), 0 6px 14px -4px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.3);
}
.fx-quiz-play-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--fx-accent-dark), 0 12px 22px -6px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.35); }
.fx-quiz-related h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--fx-text); margin-bottom: 16px; }
.fx-related-grid { display: flex; flex-direction: column; gap: 8px; }
.fx-related-card { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 12px; background: var(--fx-surface-solid); border: 1px solid var(--fx-border); transition: border-color var(--fx-transition-fast), background var(--fx-transition-fast); }
.fx-related-card:hover { border-color: var(--fx-border-hover); background: var(--fx-soft); }
.fx-related-emoji { font-size: 24px; flex-shrink: 0; }
.fx-related-title { font-size: 14px; font-weight: 600; color: var(--fx-text); margin-bottom: 2px; }
.fx-related-meta { font-size: 12px; color: var(--fx-muted); }

/* ── 11. Quiz Play Page ── */
.fx-play-quit-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 18px; border: none;
  background: rgba(239,68,68,.10); color: var(--fx-danger);
  box-shadow: inset 0 0 0 1.5px rgba(239,68,68,.35);
  font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: transform 0.18s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.18s cubic-bezier(0.34,1.2,0.64,1), background 0.18s;
  text-decoration: none;
}
.fx-play-quit-btn:hover { transform: translateY(-1px); background: rgba(239,68,68,.18); box-shadow: inset 0 0 0 1.5px rgba(239,68,68,.55); }

.fx-play-main { max-width: 680px; margin: 0 auto; padding: 24px 16px 80px; }

/* Play screen */
.fx-play-page { display: flex; flex-direction: column; gap: 16px; }

.fx-play-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.fx-play-header__info { display: flex; align-items: center; gap: 8px; }
.fx-play-emoji { font-size: 20px; }
.fx-play-category { font-size: 14px; font-weight: 600; color: var(--fx-muted); }
.fx-play-header__score { display: flex; align-items: baseline; gap: 2px; font-size: 13px; color: var(--fx-muted); }
.fx-score-correct { font-size: 18px; font-weight: 800; color: var(--fx-secondary); }
.fx-score-sep { font-size: 16px; font-weight: 700; margin: 0 1px; }

/* Timer bar (réplique TimerBarComponent) */
.fx-timer-wrap {
  display: flex; align-items: center; gap: 10px; margin-bottom: 4px;
}
.fx-timer-track {
  flex: 1; height: 6px; background: var(--fx-soft);
  border-radius: 999px; overflow: hidden;
}
.fx-timer-fill {
  height: 100%; border-radius: 999px;
  background: var(--fx-accent);
  transition: width 0.9s linear, background 300ms;
  width: 100%;
}
.fx-timer-fill.danger { background: var(--fx-danger); }
.fx-timer-text {
  font-size: 13px; font-weight: 700; color: var(--fx-muted);
  min-width: 28px; text-align: right;
}
.fx-timer-text.danger { color: var(--fx-danger); }

/* Question card */
.fx-question-card {
  padding: 24px; border-radius: 16px;
  background: var(--fx-surface-solid); border: 1px solid var(--fx-border);
}
.fx-question-idx { font-size: 12px; font-weight: 700; color: var(--fx-muted); margin-bottom: 10px; letter-spacing: 0.04em; text-transform: uppercase; }
.fx-question-txt { font-size: 18px; font-weight: 700; color: var(--fx-text); line-height: 1.4; margin: 0; }

/* Answer grid (réplique AnswerGridComponent) */
.fx-answer-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.fx-answer-btn {
  width: 100%; padding: 14px 16px; border-radius: 12px; text-align: left;
  border: 1px solid var(--fx-border); background: var(--fx-surface-solid);
  color: var(--fx-text); font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: border-color var(--fx-transition-fast), background var(--fx-transition-fast), transform 80ms;
  line-height: 1.4;
}
.fx-answer-btn:hover:not(:disabled) { border-color: var(--fx-border-hover); background: var(--fx-soft); transform: translateY(-1px); }
.fx-answer-btn:disabled { cursor: default; }
.fx-answer-btn.fx-answer--correct {
  border-color: var(--fx-success); background: rgba(52,211,153,0.10);
  color: var(--fx-success);
}
.fx-answer-btn.fx-answer--wrong {
  border-color: var(--fx-danger); background: rgba(239,68,68,0.10);
  color: var(--fx-danger);
}

/* Footer : puces de progression (gauche) + bouton « Suivant » (droite) sur une
   même ligne à hauteur fixe — réplique .qsm-footer-bar de la modale de session. */
.fx-footer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
/* Next button */
.fx-next-bar { display: flex; justify-content: flex-end; flex-shrink: 0; }
/* Bouton masqué sans retirer son espace : le footer garde sa hauteur, donc les
   puces de progression ne sautent pas entre question répondue / non répondue. */
.fx-next-bar--hidden .fx-btn-next { visibility: hidden; }
.fx-btn-next {
  display: inline-flex; align-items: center;
  padding: 12px 28px; border-radius: 18px; border: none;
  background: linear-gradient(180deg, #FF9A21, var(--fx-accent)); color: #18181B;
  font-size: 14px; font-weight: 800; cursor: pointer; font-family: inherit;
  transition: transform 0.18s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.18s cubic-bezier(0.34,1.2,0.64,1);
  box-shadow: 0 3px 0 var(--fx-accent-dark), 0 6px 14px -4px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.3);
}
.fx-btn-next:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--fx-accent-dark), 0 10px 20px -6px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.35); }
.fx-btn-next:active { transform: translateY(3px); box-shadow: 0 0 0 var(--fx-accent-dark), 0 2px 6px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.25); }

/* Progress dots (réplique ProgressDotsComponent) */
.fx-progress-dots { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fx-dot {
  width: 10px; height: 10px; border-radius: 50%;
  transition: background var(--fx-transition-fast), transform var(--fx-transition-fast);
}
.fx-dot--pending { background: var(--fx-border-hover); }
.fx-dot--correct { background: var(--fx-success); transform: scale(1.2); }
.fx-dot--wrong   { background: var(--fx-danger); }

/* Results screen */
.fx-results-page {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 32px 0 64px; text-align: center;
  animation: fx-fadeIn 0.35s ease-out;
}
.fx-results-badge { font-size: 56px; line-height: 1; margin-bottom: 4px; }
.fx-results-title { font-size: 28px; font-weight: 900; letter-spacing: -0.04em; color: var(--fx-text); margin: 0; }
.fx-results-quiz  { font-size: 14px; color: var(--fx-accent); font-weight: 600; margin: 0; }
.fx-results-score-block { display: flex; align-items: baseline; gap: 4px; margin: 12px 0 0; }
.fx-results-score-val { font-size: 72px; font-weight: 900; color: var(--fx-accent); line-height: 1; letter-spacing: -0.04em; }
.fx-results-score-sep { font-size: 36px; font-weight: 700; color: var(--fx-muted); }
.fx-results-score-tot { font-size: 36px; font-weight: 700; color: var(--fx-muted); }
.fx-results-msg { font-size: 16px; color: var(--fx-text-secondary); margin: 0 0 8px; }
.fx-results-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 4px; }

/* Teaser inscription */
.fx-results-teaser {
  width: 100%; max-width: 480px; margin: 8px 0;
  padding: 28px 24px; border-radius: 20px;
  background: var(--fx-surface-solid); border: 1px solid var(--fx-border);
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.fx-results-teaser__icon { font-size: 32px; }
.fx-results-teaser__title { font-size: 20px; font-weight: 800; color: var(--fx-text); letter-spacing: -0.03em; margin: 0; }
.fx-results-teaser__body { font-size: 14px; color: var(--fx-muted); line-height: 1.6; margin: 0; max-width: 380px; }
.fx-results-teaser__perks { text-align: left; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.fx-results-teaser__perks li { font-size: 13px; color: var(--fx-text-secondary); display: flex; align-items: center; gap: 8px; }
.fx-results-teaser__perks li span { color: var(--fx-accent); font-weight: 800; flex-shrink: 0; }

.fx-results-cta-signup {
  display: block; width: 100%; padding: 14px; border-radius: 18px; text-align: center;
  background: linear-gradient(180deg, #FF9A21, var(--fx-accent));
  color: #18181B; font-size: 15px; font-weight: 800; font-family: inherit;
  border: none; cursor: pointer; text-decoration: none;
  transition: transform 0.18s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.18s cubic-bezier(0.34,1.2,0.64,1);
  box-shadow: 0 3px 0 var(--fx-accent-dark), 0 6px 14px -4px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.3);
}
.fx-results-cta-signup:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--fx-accent-dark), 0 12px 22px -6px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.35); }
.fx-results-cta-login {
  display: inline-flex; align-items: center; justify-content: center; width: 100%;
  padding: 10px 24px; border-radius: 18px; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--fx-text); text-decoration: none;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45);
  transition: transform 0.18s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.18s cubic-bezier(0.34,1.2,0.64,1);
}
.fx-results-cta-login:hover { transform: translateY(-1px); color: var(--fx-accent); background: rgba(255,138,0,.08); box-shadow: inset 0 0 0 1.5px var(--fx-accent); }

.fx-results-btn-another {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 32px; border-radius: 18px; border: none;
  background: transparent; color: var(--fx-text); font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; text-decoration: none;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45);
  transition: transform 0.18s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.18s cubic-bezier(0.34,1.2,0.64,1);
}
.fx-results-btn-another:hover { transform: translateY(-1px); color: var(--fx-accent); background: rgba(255,138,0,.08); box-shadow: inset 0 0 0 1.5px var(--fx-accent); }

/* ── 12. Responsive ── */
@media (max-width: 1024px) {
  .fx-quiz-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .fx-hero__grid { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; min-height: auto; }
  .fx-hero__title { font-size: 32px; }
  .fx-features__grid { grid-template-columns: repeat(2, 1fr); }
  .fx-feat-card--wide { grid-column: span 2; }
  .fx-quiz-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .fx-features__grid { grid-template-columns: 1fr; }
  .fx-feat-card--wide { grid-column: span 1; }
  .fx-features__stats { gap: 16px; }
  .fx-stat__sep { display: none; }
  .fx-stat { padding: 0 16px; }
  .fx-hero__title { font-size: 26px; }
  .fx-hero__btn-cta { padding: 14px 28px; font-size: 15px; width: 100%; justify-content: center; }
  .fx-quiz-grid { grid-template-columns: 1fr; }
  .fx-navbar__inner { padding: 0 16px; }
  .fx-footer__inner { flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 20px 16px; }
  .fx-footer__links { justify-content: center; gap: 16px; }
  .fx-question-answers { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   13. Onboarding Discovery (/decouvrir/*)
   Parcours immersif pré-auth : welcome → concept → quiz → themes → signup
   ═══════════════════════════════════════════════════════════ */

.fx-ob-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 20% -10%, var(--fx-adim), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, var(--fx-adim), transparent 60%),
    var(--fx-bg);
}

.fx-ob-main {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 760px; margin: 0 auto;
  padding: 24px 24px 48px;
}

/* Progress bar fine, sticky en haut */
.fx-ob-progress {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 0 32px;
}
.fx-ob-progress__dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--fx-border-hover);
  transition: width var(--fx-transition-smooth), background var(--fx-transition-fast);
}
.fx-ob-progress__dot--active { width: 28px; background: var(--fx-accent); }
.fx-ob-progress__dot--done { background: var(--fx-accent-dark); }

/* Skip button (top-right) */
.fx-ob-skip {
  position: absolute; top: 76px; right: 24px;
  font-size: 13px; color: var(--fx-muted);
  text-decoration: none; padding: 6px 14px; border-radius: 999px;
  border: 1px solid transparent;
  transition: border-color var(--fx-transition-fast), color var(--fx-transition-fast);
}
.fx-ob-skip:hover { color: var(--fx-text); border-color: var(--fx-border); }

/* Hero centré commun à toutes les étapes présentationnelles */
.fx-ob-stage {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 24px; width: 100%;
  animation: fx-ob-slide-up 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fx-ob-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fx-ob-title {
  font-size: clamp(28px, 5vw, 44px); font-weight: 900;
  letter-spacing: -0.035em; line-height: 1.1;
  color: var(--fx-text); margin: 0; max-width: 620px;
}
.fx-ob-title__accent { color: var(--fx-accent); }
.fx-ob-subtitle {
  font-size: 17px; color: var(--fx-text-secondary);
  line-height: 1.6; margin: 0; max-width: 540px;
}

/* CTAs */
.fx-ob-cta-group { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.fx-ob-btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, #FF9A21, var(--fx-accent));
  color: #18181B; border: none; cursor: pointer; font-family: inherit;
  padding: 14px 36px; border-radius: 18px;
  font-weight: 800; font-size: 16px; letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--fx-accent-dark), 0 6px 14px -4px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform 0.18s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.18s cubic-bezier(0.34,1.2,0.64,1);
}
.fx-ob-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--fx-accent-dark), 0 12px 22px -6px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.35); }
.fx-ob-btn-primary:active { transform: translateY(3px); box-shadow: 0 0 0 var(--fx-accent-dark), 0 2px 6px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.25); }
.fx-ob-btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--fx-text);
  border: none; cursor: pointer; font-family: inherit;
  padding: 10px 24px; border-radius: 18px;
  font-weight: 600; font-size: 13px;
  text-decoration: none;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45);
  transition: transform 0.18s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.18s cubic-bezier(0.34,1.2,0.64,1);
}
.fx-ob-btn-ghost:hover { transform: translateY(-1px); color: var(--fx-accent); background: rgba(255,138,0,.08); box-shadow: inset 0 0 0 1.5px var(--fx-accent); }

/* Avatar Flexo (mascotte) */
.fx-ob-avatar {
  position: relative;
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
  font-size: 72px; line-height: 1;
  animation: fx-ob-bob 3.4s ease-in-out infinite;
}
.fx-ob-avatar__img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.fx-ob-avatar::before {
  content: ''; position: absolute; inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--fx-aglow), transparent 70%);
  filter: blur(8px);
  z-index: -1;
  animation: fx-ob-glow 2.6s ease-in-out infinite;
}
@keyframes fx-ob-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes fx-ob-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

/* Bubble parlante de Flexo */
.fx-ob-bubble {
  position: relative;
  background: var(--fx-surface-solid); border: 1px solid var(--fx-border);
  border-radius: 18px; padding: 16px 22px;
  font-size: 15px; color: var(--fx-text-secondary);
  max-width: 460px; line-height: 1.5;
  box-shadow: var(--fx-shadow-md);
}
.fx-ob-bubble__sign {
  display: block; margin-top: 8px;
  font-size: 11px; font-weight: 700; color: var(--fx-accent);
  letter-spacing: 0.06em; text-align: right;
}
.fx-ob-bubble::before {
  content: ''; position: absolute; top: -8px; left: 50%;
  width: 16px; height: 16px;
  background: var(--fx-surface-solid);
  border-top: 1px solid var(--fx-border);
  border-left: 1px solid var(--fx-border);
  transform: translateX(-50%) rotate(45deg);
}

/* Étape Concept : 3 cartes process */
.fx-ob-concept-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; width: 100%; margin-top: 16px;
}
.fx-ob-step-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 12px; padding: 28px 20px;
  background: var(--fx-surface-solid); border: 1px solid var(--fx-border);
  border-radius: 20px;
  transition: transform var(--fx-transition-smooth), border-color var(--fx-transition-smooth), box-shadow var(--fx-transition-smooth);
}
.fx-ob-step-card:hover {
  transform: translateY(-4px); border-color: var(--fx-accent);
  box-shadow: var(--fx-shadow-glow);
}
.fx-ob-step-card__icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--fx-adim); color: var(--fx-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.fx-ob-step-card__title { font-size: 16px; font-weight: 800; color: var(--fx-text); margin: 0; }
.fx-ob-step-card__desc { font-size: 13px; color: var(--fx-muted); margin: 0; line-height: 1.5; }
.fx-ob-step-card__num {
  position: absolute;
  font-size: 11px; font-weight: 800; color: var(--fx-accent);
  background: var(--fx-adim); border: 1px solid var(--fx-aglow);
  border-radius: 999px; padding: 2px 10px;
  letter-spacing: 0.08em;
}

/* Étape Score : carte résultat dramatique */
.fx-ob-score-card {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  width: 100%; max-width: 480px;
  padding: 36px 32px; border-radius: 24px;
  background: linear-gradient(135deg, var(--fx-surface-solid), var(--fx-soft-solid));
  border: 1px solid var(--fx-aglow);
  box-shadow: var(--fx-shadow-lg), 0 0 64px var(--fx-aglow);
  text-align: center;
}
.fx-ob-score-emoji { font-size: 64px; line-height: 1; }
.fx-ob-score-value {
  display: flex; align-items: baseline; gap: 4px;
}
.fx-ob-score-value__num {
  font-size: 80px; font-weight: 900; color: var(--fx-accent);
  letter-spacing: -0.04em; line-height: 1;
}
.fx-ob-score-value__sep, .fx-ob-score-value__total {
  font-size: 36px; font-weight: 700; color: var(--fx-muted);
}
.fx-ob-score-rank {
  font-size: 14px; color: var(--fx-text-secondary); font-weight: 600;
}
.fx-ob-score-rank__pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--fx-adim); color: var(--fx-accent);
  border: 1px solid var(--fx-aglow);
  font-weight: 800; margin-left: 4px;
}
.fx-ob-score-msg {
  font-size: 15px; color: var(--fx-text-secondary); line-height: 1.5;
  margin: 0; max-width: 360px;
}

/* Étape Themes : teaser visuel */
.fx-ob-themes-principal {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; width: 100%; margin-top: 8px;
}
.fx-ob-tag-principal {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-radius: 18px;
  background: var(--fx-surface-solid); border: 1px solid var(--fx-border);
  transition: transform var(--fx-transition-fast), border-color var(--fx-transition-fast);
  text-align: left;
}
.fx-ob-tag-principal:hover { transform: translateY(-2px); border-color: var(--fx-accent); }
.fx-ob-tag-principal__emoji {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.fx-ob-tag-principal__body { flex: 1; min-width: 0; }
.fx-ob-tag-principal__label { font-size: 14px; font-weight: 800; color: var(--fx-text); margin: 0 0 2px; }
.fx-ob-tag-principal__desc { font-size: 12px; color: var(--fx-muted); margin: 0; line-height: 1.5; }
.fx-ob-tag--gold   .fx-ob-tag-principal__emoji { background: rgba(234,179,8,0.12); }
.fx-ob-tag--purple .fx-ob-tag-principal__emoji { background: rgba(167,139,250,0.12); }
.fx-ob-tag--orange .fx-ob-tag-principal__emoji { background: var(--fx-adim); }
.fx-ob-tag--cyan   .fx-ob-tag-principal__emoji { background: rgba(6,182,212,0.12); }

.fx-ob-themes-divider {
  display: flex; align-items: center; gap: 12px;
  width: 100%; margin: 12px 0 0;
  font-size: 11px; font-weight: 700; color: var(--fx-muted);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.fx-ob-themes-divider::before, .fx-ob-themes-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--fx-border);
}

.fx-ob-themes-cloud {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  width: 100%; max-width: 640px;
}
.fx-ob-tag-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--fx-surface-solid); border: 1px solid var(--fx-border);
  font-size: 13px; font-weight: 600; color: var(--fx-text-secondary);
  transition: transform var(--fx-transition-fast), border-color var(--fx-transition-fast), color var(--fx-transition-fast);
  cursor: default;
}
.fx-ob-tag-chip:hover { transform: translateY(-2px); border-color: var(--fx-accent); color: var(--fx-text); }
.fx-ob-tag-chip__emoji { font-size: 15px; line-height: 1; }

.fx-ob-themes-count {
  margin-top: 8px;
  font-size: 13px; color: var(--fx-muted);
}
.fx-ob-themes-count strong { color: var(--fx-accent); font-weight: 800; }

/* Étape Signup : récap + CTA final */
.fx-ob-signup-card {
  width: 100%; max-width: 480px;
  padding: 32px; border-radius: 24px;
  background: var(--fx-surface-solid); border: 1px solid var(--fx-border);
  display: flex; flex-direction: column; gap: 20px;
  box-shadow: var(--fx-shadow-md);
  text-align: left;
}
.fx-ob-signup-perks { display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; }
.fx-ob-signup-perks li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--fx-text-secondary); font-weight: 500;
}
.fx-ob-signup-perks li span { color: var(--fx-success); font-weight: 800; flex-shrink: 0; }
.fx-ob-age-gate {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px; border-radius: 12px;
  background: var(--fx-soft); border: 1px solid var(--fx-border);
  cursor: pointer;
}
.fx-ob-age-gate__check {
  flex-shrink: 0; margin-top: 2px; width: 18px; height: 18px;
  accent-color: var(--fx-accent); cursor: pointer;
}
.fx-ob-age-gate__label {
  font-size: 13px; color: var(--fx-text-secondary); line-height: 1.5; user-select: none;
}
.fx-ob-signup-btn--disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; pointer-events: none; }
.fx-ob-signup-hint {
  text-align: center; font-size: 13px; color: var(--fx-muted); margin: 0;
}
.fx-ob-signup-hint a { color: var(--fx-accent); font-weight: 700; }
.fx-ob-signup-hint a:hover { text-decoration: underline; }

/* Caret invisible globalement (corrige les barres clignotantes parasites)
   — les champs de saisie réels gardent leur caret */
.fx-ob-shell, .fx-play-main, .fx-results-page { caret-color: transparent; }
.fx-ob-shell input, .fx-ob-shell textarea, .fx-ob-shell [contenteditable] { caret-color: var(--fx-accent); }

/* ── Étape Themes — layout dense pensé pour tenir en un viewport ── */
.fx-ob-shell--themes { min-height: 100vh; padding-bottom: 24px; }
.fx-ob-shell--themes .fx-ob-progress { padding: 14px 0 20px; }

.fx-ob-themes-page {
  flex: 1;
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding: 0 32px 24px;
  display: flex; flex-direction: column;
  gap: 20px;
  animation: fx-ob-slide-up 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.fx-ob-themes-header { text-align: center; }
.fx-ob-themes-title {
  font-size: clamp(24px, 3.4vw, 34px); font-weight: 900;
  letter-spacing: -0.035em; line-height: 1.1;
  color: var(--fx-text); margin: 0 0 6px;
}
.fx-ob-themes-sub {
  font-size: 15px; color: var(--fx-text-secondary);
  line-height: 1.5; margin: 0;
}
.fx-ob-themes-sub strong { color: var(--fx-accent); font-weight: 800; }

/* Univers principaux : 4 colonnes en row sur desktop, 2x2 sur tablet, stack sur mobile */
.fx-ob-shell--themes .fx-ob-themes-principal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 0;
}
.fx-ob-shell--themes .fx-ob-tag-principal {
  flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 14px 14px;
}
.fx-ob-shell--themes .fx-ob-tag-principal__emoji { width: 40px; height: 40px; font-size: 22px; }
.fx-ob-shell--themes .fx-ob-tag-principal__label { font-size: 13px; }
.fx-ob-shell--themes .fx-ob-tag-principal__desc {
  font-size: 11px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Bloc dramatique "270+ catégories" — toujours visible above-the-fold */
.fx-ob-themes-headline {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 18px 28px; border-radius: 20px;
  background: linear-gradient(135deg, var(--fx-adim), transparent 70%), var(--fx-surface-solid);
  border: 1px solid var(--fx-aglow);
  box-shadow: var(--fx-shadow-md), 0 0 48px var(--fx-aglow);
  max-width: 540px; margin: 0 auto;
}
.fx-ob-themes-headline__count {
  font-size: clamp(48px, 6vw, 64px); font-weight: 900;
  color: var(--fx-accent); letter-spacing: -0.04em; line-height: 1;
  flex-shrink: 0;
}
.fx-ob-themes-headline__count sup { font-size: 0.6em; vertical-align: super; margin-left: 2px; }
.fx-ob-themes-headline__body { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.fx-ob-themes-headline__label {
  font-size: 17px; font-weight: 800; color: var(--fx-text); letter-spacing: -0.02em;
}
.fx-ob-themes-headline__sub {
  font-size: 12px; color: var(--fx-muted); line-height: 1.4;
}

/* Section aperçu en bas — scrollable, secondaire */
.fx-ob-themes-preview {
  margin-top: 12px; padding-top: 20px;
  border-top: 1px solid var(--fx-border);
}
.fx-ob-themes-preview__title {
  font-size: 13px; font-weight: 700; color: var(--fx-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  text-align: center; margin: 0 0 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* Cloud des chips : compact, multi-lignes accepté en bas de page */
.fx-ob-shell--themes .fx-ob-themes-cloud {
  justify-content: center;
  max-width: 920px; margin: 0 auto; gap: 6px;
}
.fx-ob-shell--themes .fx-ob-tag-chip { padding: 6px 12px; font-size: 12px; }
.fx-ob-shell--themes .fx-ob-tag-chip__emoji { font-size: 13px; }
.fx-ob-tag-chip--more {
  background: var(--fx-adim) !important; color: var(--fx-accent) !important;
  border-color: var(--fx-aglow) !important; font-weight: 700 !important;
}

/* CTA group en row (back ghost à gauche, primary à droite) */
.fx-ob-cta-group--row {
  flex-direction: row !important;
  justify-content: center; align-items: center; gap: 16px;
  margin-top: 4px; padding-top: 8px;
  border-top: 1px solid var(--fx-border);
}

/* CTA group solo — un seul bouton centré, maximisé */
.fx-ob-cta-group--solo {
  display: flex; justify-content: center; align-items: center;
  margin-top: 4px; padding-top: 12px;
  border-top: 1px solid var(--fx-border);
}
.fx-ob-btn-primary--hero {
  padding: 18px 56px; font-size: 17px;
  animation: fx-ob-cta-pulse 2.8s ease-in-out infinite;
}
@keyframes fx-ob-cta-pulse {
  0%, 100% { box-shadow: 0 3px 0 var(--fx-accent-dark), 0 6px 28px var(--fx-aglow), inset 0 1px 0 rgba(255,255,255,.3); }
  50%       { box-shadow: 0 3px 0 var(--fx-accent-dark), 0 8px 36px var(--fx-aglow), 0 0 0 6px rgba(255,138,0,0.08), inset 0 1px 0 rgba(255,255,255,.35); }
}

@media (max-width: 900px) {
  .fx-ob-shell--themes .fx-ob-themes-principal { grid-template-columns: repeat(2, 1fr); }
  .fx-ob-themes-page { padding: 0 20px 24px; gap: 16px; }
}
@media (max-width: 520px) {
  .fx-ob-shell--themes .fx-ob-themes-principal { grid-template-columns: 1fr; }
  .fx-ob-themes-title { font-size: 22px; }
  .fx-ob-themes-sub { font-size: 14px; }
  .fx-ob-cta-group--row { flex-direction: column !important; gap: 8px; }
  .fx-ob-cta-group--row .fx-ob-btn-primary { width: 100%; max-width: 320px; justify-content: center; }
}

/* Progress rail (page quiz : strip fin entre la navbar et le main) */
.fx-ob-progress-rail {
  position: sticky; top: 64px; z-index: 90;
  background: var(--fx-bg);
  border-bottom: 1px solid var(--fx-border);
}
.fx-ob-progress-rail .fx-ob-progress { padding: 12px 0; }

/* Variante compacte pour les étapes denses (signup) */
.fx-ob-main--compact { padding-top: 16px; }
.fx-ob-stage--compact { gap: 16px; }
.fx-ob-stage--compact .fx-ob-title { font-size: clamp(24px, 4vw, 34px); }
.fx-ob-stage--compact .fx-ob-subtitle { font-size: 15px; }
.fx-ob-stage--compact .fx-ob-signup-card { padding: 24px; gap: 16px; }
.fx-ob-stage--compact .fx-ob-signup-perks li { font-size: 13px; padding: 0; }
.fx-ob-stage--compact .fx-ob-signup-perks { gap: 8px; }
.fx-ob-stage--compact .fx-ob-age-gate { padding: 12px 14px; }
.fx-ob-stage--compact .fx-ob-age-gate__label { font-size: 12px; }

/* Bulle de citation Flexo (avatar + bulle + signature) */
.fx-ob-flexo-quote {
  display: flex; align-items: flex-start; gap: 12px;
  max-width: 460px; width: 100%; text-align: left;
  animation: fx-ob-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.2s;
}
.fx-ob-flexo-quote__avatar {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; line-height: 1;
  border-radius: 50%; background: var(--fx-adim);
  border: 1px solid var(--fx-aglow);
  overflow: hidden;
}
.fx-ob-flexo-quote__avatar img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.fx-ob-flexo-quote__body { flex: 1; min-width: 0; }
.fx-ob-flexo-quote__bubble {
  position: relative;
  background: var(--fx-surface-solid); border: 1px solid var(--fx-border);
  border-radius: 14px; padding: 12px 16px;
  font-size: 14px; color: var(--fx-text-secondary); line-height: 1.5;
}
.fx-ob-flexo-quote__bubble::before {
  content: ''; position: absolute; left: -7px; top: 16px;
  width: 12px; height: 12px;
  background: var(--fx-surface-solid);
  border-left: 1px solid var(--fx-border);
  border-bottom: 1px solid var(--fx-border);
  transform: rotate(45deg);
}
.fx-ob-flexo-quote__sign {
  display: block; margin-top: 4px; padding-left: 16px;
  font-size: 11px; font-weight: 700; color: var(--fx-accent);
  letter-spacing: 0.06em;
}

/* Override results layout pour qu'il accepte notre avatar Flexo */
#results-screen .fx-ob-avatar {
  width: 88px; height: 88px; font-size: 52px;
  margin-bottom: 8px;
}
#results-screen .fx-results-title { margin-top: 4px; }

/* Responsive onboarding */
@media (max-width: 720px) {
  .fx-ob-concept-grid { grid-template-columns: 1fr; }
  .fx-ob-themes-principal { grid-template-columns: 1fr; }
  .fx-ob-title { font-size: 26px; }
  .fx-ob-subtitle { font-size: 15px; }
  .fx-ob-avatar { width: 96px; height: 96px; font-size: 56px; }
  .fx-ob-score-value__num { font-size: 64px; }
  .fx-ob-skip { top: 72px; right: 16px; }
  .fx-ob-signup-card { padding: 24px; }
}
@media (max-width: 480px) {
  .fx-ob-main { padding: 16px 16px 32px; }
  .fx-ob-progress { padding: 12px 0 24px; }
  .fx-ob-btn-primary { padding: 14px 28px; font-size: 15px; width: 100%; max-width: 320px; justify-content: center; }
}
@media (max-height: 820px) {
  .fx-ob-stage--compact { gap: 12px; }
  .fx-ob-stage--compact .fx-ob-signup-card { padding: 20px; gap: 12px; }
  .fx-ob-stage--compact .fx-ob-signup-perks li { font-size: 12px; }
}
