/* ============================================================
   IGNITE — Feuille de styles principale
   Mobile-first | Dark premium theme
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --bg-primary:    #0B0F2A;
  --bg-secondary:  #141830;
  --bg-card:       #1A1F3E;
  --bg-elevated:   #222747;
  --bg-input:      #111528;

  --color-primary:   #5B5EFF;
  --color-secondary: #7A5CFF;
  --color-pink:      #FF4D6D;
  --color-orange:    #FF7A3D;
  --color-yellow:    #FFB347;
  --color-muted:     #3A4060;

  --text-primary:   #FFFFFF;
  --text-secondary: #8892B0;
  --text-muted:     #4A5568;

  --border-color:   rgba(255,255,255,0.07);
  --border-active:  rgba(91,94,255,0.4);

  --gradient-warm:  linear-gradient(135deg, #FF4D6D, #FF7A3D, #FFB347);
  --gradient-cool:  linear-gradient(135deg, #5B5EFF, #7A5CFF);
  --gradient-fire:  linear-gradient(135deg, #FF4D6D 0%, #7A5CFF 100%);
  --gradient-glow:  linear-gradient(135deg, #FF4D6D, #FF7A3D);

  --glow-primary:   0 0 24px rgba(91,94,255,0.25);
  --glow-warm:      0 0 24px rgba(255,77,109,0.25);
  --glow-card:      0 4px 32px rgba(0,0,0,0.4);

  --radius-xs: 6px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --nav-height:    64px;
  --topbar-height: 60px;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

/* ---------- Scrollbar (desktop) ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--color-muted); border-radius: var(--radius-full); }

/* ---------- Layout ---------- */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.main-content {
  flex: 1;
  padding: calc(var(--topbar-height) + 16px) 16px calc(var(--nav-height) + 24px);
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

/* Pages sans nav (login, register, landing) */
.main-content--full {
  padding: 0;
  max-width: 100%;
}

/* ---------- Top Bar ---------- */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-height);
  background: rgba(11,15,42,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

.top-bar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar__logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.top-bar__brand {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.top-bar__actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Bottom Nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(20,24,48,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  padding: 8px 4px;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bottom-nav__item i { font-size: 1.2rem; }

.bottom-nav__item.active {
  color: var(--color-primary);
}

.bottom-nav__item.active i {
  filter: drop-shadow(0 0 8px rgba(91,94,255,0.6));
}

.bottom-nav__item .badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  background: var(--color-pink);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ---------- Avatar ---------- */
.avatar-initials {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--gradient-cool);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
}

/* ---------- Typography ---------- */
.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--glow-card);
}

.card--glow {
  border-color: var(--border-active);
  box-shadow: var(--glow-card), var(--glow-primary);
}

.card--warm {
  border-color: rgba(255,77,109,0.2);
  box-shadow: var(--glow-card), var(--glow-warm);
}

.card + .card { margin-top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary {
  background: var(--gradient-cool);
  color: white;
  box-shadow: 0 4px 20px rgba(91,94,255,0.3);
}
.btn--primary:hover { box-shadow: 0 4px 28px rgba(91,94,255,0.5); }

.btn--warm {
  background: var(--gradient-warm);
  color: white;
  box-shadow: 0 4px 20px rgba(255,77,109,0.3);
}
.btn--warm:hover { box-shadow: 0 4px 28px rgba(255,77,109,0.5); }

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.btn--ghost:hover { border-color: var(--border-active); color: white; }

.btn--danger {
  background: rgba(255,77,109,0.15);
  color: var(--color-pink);
  border: 1px solid rgba(255,77,109,0.3);
}

.btn--block { width: 100%; }

.btn--lg { padding: 16px 32px; font-size: 1.05rem; }
.btn--sm { padding: 10px 18px; font-size: 0.85rem; }
.btn--xs { padding: 7px 14px; font-size: 0.8rem; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 14px 16px;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(91,94,255,0.15);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control select { color: var(--text-primary); }

select.form-control option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-error {
  color: var(--color-pink);
  font-size: 0.82rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Alert / Flash ---------- */
.alert {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid transparent;
}

.alert--success {
  background: rgba(91,94,255,0.12);
  border-color: rgba(91,94,255,0.3);
  color: #A0A4FF;
}

.alert--error {
  background: rgba(255,77,109,0.1);
  border-color: rgba(255,77,109,0.3);
  color: #FF8099;
}

.alert--info {
  background: rgba(122,92,255,0.1);
  border-color: rgba(122,92,255,0.3);
  color: #B09DFF;
}

/* ---------- Landing Page ---------- */
.landing {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(91,94,255,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(255,77,109,0.1) 0%, transparent 50%),
              var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.landing::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,77,109,0.06) 0%, transparent 70%);
  top: -200px; right: -200px;
  pointer-events: none;
}

.landing__logo {
  width: 100px;
  margin: 0 auto 24px;
  filter: drop-shadow(0 0 30px rgba(255,77,109,0.4));
}

.landing__title {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
}

.landing__tagline {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 320px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.landing__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
}

/* ---------- Auth Pages ---------- */
.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
  background: radial-gradient(ellipse at 50% -20%, rgba(91,94,255,0.12) 0%, transparent 60%),
              var(--bg-primary);
}

.auth-page__back {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 40px;
  width: fit-content;
}

.auth-page__logo {
  width: 52px;
  margin-bottom: 24px;
}

.auth-page__title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.auth-page__subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 36px;
  line-height: 1.5;
}

.auth-page__footer {
  margin-top: 28px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-page__footer a {
  color: var(--color-primary);
  font-weight: 600;
}

/* ---------- Dashboard ---------- */
.greeting {
  margin-bottom: 28px;
}

.greeting__hello {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.greeting__name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.greeting__name span {
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
}

.stat-card__value {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card__label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Partner Card */
.partner-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  box-shadow: var(--glow-card);
}

.partner-card__avatar {
  width: 52px; height: 52px;
  border-radius: var(--radius-full);
  background: var(--gradient-fire);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(255,77,109,0.3);
}

.partner-card__info { flex: 1; }

.partner-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.partner-card__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.partner-card__label i { color: var(--color-pink); font-size: 0.7rem; }

/* Pairing banner */
.pairing-banner {
  background: var(--bg-card);
  border: 1px dashed var(--border-active);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  margin-bottom: 24px;
}

.pairing-banner__icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.pairing-banner__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pairing-banner__text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ---------- Swipe / Explorer ---------- */
.swipe-container {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--topbar-height) - var(--nav-height));
  padding: 0 4px;
}

.swipe-progress {
  margin-bottom: 20px;
}

.swipe-progress__info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.progress-bar {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--gradient-warm);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Card de proposition */
.proposition-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  box-shadow: var(--glow-card);
  min-height: 280px;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.35s ease;
  /* Swipe gestuel */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;   /* laisse le scroll vertical au navigateur, JS gère l'horizontal */
  -webkit-user-drag: none;
}

.proposition-card.slide-left {
  transform: translateX(-110%) rotate(-8deg);
  opacity: 0;
}

.proposition-card.slide-right {
  transform: translateX(110%) rotate(8deg);
  opacity: 0;
}

.proposition-card.slide-up {
  transform: translateY(-60%) scale(0.9);
  opacity: 0;
}

.proposition-card.entering {
  transform: translateX(0) rotate(0deg) scale(1);
  opacity: 1;
}

/* Curseur grabbing pendant le glisser */
.proposition-card:active {
  cursor: grabbing;
}

/* Hint swipe sous la carte (flèches discrètes) */
.swipe-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  margin-top: 10px;
  opacity: 0.35;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  pointer-events: none;
  user-select: none;
}

.swipe-hint__left  { color: var(--color-muted); }
.swipe-hint__right { color: var(--color-pink);  }

.proposition-card__level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(91,94,255,0.12);
  border: 1px solid rgba(91,94,255,0.25);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.proposition-card__text {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Boutons de réponse */
.answer-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
  padding: 0 4px;
}

.answer-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 8px;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.answer-btn i { font-size: 1.4rem; }

.answer-btn:active { transform: scale(0.92); }

.answer-btn--yes {
  background: rgba(255,77,109,0.1);
  border-color: rgba(255,77,109,0.3);
  color: var(--color-pink);
}
.answer-btn--yes:hover, .answer-btn--yes.selected {
  background: var(--gradient-warm);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 20px rgba(255,77,109,0.4);
}

.answer-btn--maybe {
  background: rgba(122,92,255,0.1);
  border-color: rgba(122,92,255,0.25);
  color: var(--color-secondary);
}
.answer-btn--maybe:hover, .answer-btn--maybe.selected {
  background: var(--gradient-cool);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 20px rgba(122,92,255,0.3);
}

.answer-btn--no {
  background: rgba(74,80,104,0.2);
  border-color: rgba(74,80,104,0.3);
  color: var(--text-muted);
}
.answer-btn--no:hover, .answer-btn--no.selected {
  background: rgba(74,80,104,0.5);
  border-color: rgba(74,80,104,0.6);
  color: var(--text-secondary);
}

/* Écran de fin de swipe */
.swipe-done {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 24px;
}

.swipe-done__icon {
  font-size: 4rem;
  margin-bottom: 8px;
}

/* ---------- Matchs ---------- */
.matches-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.match-count-badge {
  background: var(--gradient-warm);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.match-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color var(--transition);
}

.match-item + .match-item { margin-top: 10px; }

.match-item.new {
  border-color: rgba(255,77,109,0.3);
  box-shadow: 0 0 16px rgba(255,77,109,0.1);
}

.match-item__icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gradient-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  color: white;
}

.match-item.new .match-item__icon {
  box-shadow: 0 0 12px rgba(255,77,109,0.5);
}

.match-item__content { flex: 1; min-width: 0; }

.match-item__text {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
}

.match-item__meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-item__new-badge {
  background: var(--color-pink);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 12px;
}

.empty-state__icon {
  font-size: 3.5rem;
  opacity: 0.5;
  margin-bottom: 4px;
}

.empty-state__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.empty-state__text {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 260px;
  line-height: 1.5;
}

/* ---------- Niveaux ---------- */
.level-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.level-card.unlocked {
  border-color: rgba(91,94,255,0.25);
}

.level-card.current {
  border-color: rgba(255,77,109,0.4);
  box-shadow: var(--glow-warm);
}

.level-card.locked {
  opacity: 0.55;
}

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

.level-card__badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.level-card__number {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--gradient-cool);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.level-card.current .level-card__number {
  background: var(--gradient-warm);
}

.level-card.locked .level-card__number {
  background: var(--bg-elevated);
}

.level-card__name {
  font-size: 1rem;
  font-weight: 700;
}

.level-card__lock-icon {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.level-card__description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.level-card__requirements {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.req-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.73rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.req-chip.met { border-color: rgba(91,94,255,0.3); color: var(--color-primary); }
.req-chip i { font-size: 0.7rem; }

.current-chip {
  background: rgba(255,77,109,0.12);
  border: 1px solid rgba(255,77,109,0.3);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.73rem;
  color: var(--color-pink);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Couplage ---------- */
.pairing-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pairing-code-display {
  text-align: center;
}

.pairing-code {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 16px 0;
  line-height: 1;
}

.pairing-separator {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 4px 0;
}

.pairing-separator::before,
.pairing-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* ---------- Histoire ---------- */
.story-container {
  max-width: 560px;
  margin: 0 auto;
}

.story-card {
  background: linear-gradient(180deg, #1A1F3E 0%, #141830 100%);
  border: 1px solid rgba(91,94,255,0.15);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

.story-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,77,109,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.story-card__ornament {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 12px rgba(255,77,109,0.4));
}

.story-card__title {
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 28px;
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.story-card__content {
  font-size: 0.97rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.88);
  font-weight: 300;
}

.story-card__content p { margin-bottom: 20px; }
.story-card__content p:last-child { margin-bottom: 0; }

.story-locked {
  text-align: center;
  padding: 48px 24px;
}

.story-locked__icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  opacity: 0.7;
}

/* ---------- Profil ---------- */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 80px; height: 80px;
  border-radius: var(--radius-full);
  background: var(--gradient-fire);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 0 30px rgba(255,77,109,0.3);
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.profile-email {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.profile-section { margin-bottom: 28px; }

.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}

.profile-item:last-child { border-bottom: none; }

.profile-item__label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.profile-item__value {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- Utilitaires ---------- */
.text-gradient-warm {
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-cool {
  background: var(--gradient-cool);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* Divider */
.divider {
  height: 1px;
  background: var(--border-color);
  margin: 20px 0;
}

/* Toast / notifications */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--glow-card);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast--match {
  background: linear-gradient(135deg, rgba(255,77,109,0.2), rgba(255,122,61,0.2));
  border-color: rgba(255,77,109,0.5);
  color: var(--text-primary);
}

/* Match animation overlay */
.match-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,15,42,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  flex-direction: column;
  text-align: center;
  gap: 16px;
  padding: 40px;
}

.match-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.match-overlay__flames {
  font-size: 3rem;
  animation: pulse-flames 1s infinite alternate;
}

@keyframes pulse-flames {
  from { transform: scale(1); filter: drop-shadow(0 0 12px rgba(255,77,109,0.5)); }
  to   { transform: scale(1.1); filter: drop-shadow(0 0 20px rgba(255,77,109,0.8)); }
}

.match-overlay__title {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.match-overlay__text {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 280px;
  line-height: 1.5;
}

.match-overlay__proposition {
  font-size: 1rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid rgba(255,77,109,0.3);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  max-width: 300px;
  color: var(--text-primary);
  line-height: 1.4;
}

/* ---------- Responsive desktop ---------- */
@media (min-width: 768px) {
  .main-content {
    padding-top: calc(var(--topbar-height) + 40px);
    padding-bottom: calc(var(--nav-height) + 40px);
    padding-left: 32px;
    padding-right: 32px;
  }

  .landing__title { font-size: 4rem; }
  .landing__logo { width: 130px; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }

  .answer-buttons { gap: 14px; }
  .answer-btn { padding: 20px 12px; font-size: 0.88rem; }
}

/* ---------- Loader ---------- */
.spinner {
  width: 24px; height: 24px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Page transitions ---------- */
.fade-in {
  animation: fadeIn 0.4s ease both;
}

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