/* Thème Crypto Trading Academy — porté du POC Vue v0.
   CSS pur, mobile-first, sans préprocesseur ni framework. */

:root {
  color-scheme: dark;

  --night: #070b14;
  --night-2: #0c1322;
  --surface: #111a2c;
  --surface-2: #182338;
  --line: #223049;
  --brand: #22d3ee;
  --brand-2: #8b5cf6;
  --xp: #fbbf24;
  --flame: #fb923c;

  --emerald-200: #a7f3d0;
  --emerald-300: #6ee7b7;
  --emerald-400: #34d399;
  --emerald-600: #059669;
  --cyan-200: #a5f3fc;
  --cyan-300: #67e8f9;
  --cyan-400: #22d3ee;
  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --rose-200: #fecdd3;
  --rose-400: #fb7185;
  --orange-300: #fdba74;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--night);
  color: var(--slate-100);
}

/* <main> de base.html.twig : coquille mobile-first centrée */
main {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Landing existante : contenu simple centré */
main > h1,
main > p,
main > a {
  padding: 0 1.25rem;
}

main > h1 {
  margin-top: 3rem;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p {
  margin: 0;
}

/* --- Composants de base --- */

.card {
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 1rem;
  background: linear-gradient(to right, var(--cyan-400), var(--violet-500));
  padding: 0.875rem 1.5rem;
  font-weight: 700;
  color: var(--night);
  box-shadow: 0 10px 15px -3px rgb(34 211 238 / 0.2);
  transition: transform 0.15s;
}

.btn-primary:active {
  transform: scale(0.95);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary.btn-amber {
  background: linear-gradient(to right, var(--amber-300), var(--amber-500));
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  color: var(--slate-200);
  transition: transform 0.15s;
}

.btn-ghost:active {
  transform: scale(0.95);
}

.btn-block {
  width: 100%;
}

.btn-close {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  width: 2.25rem;
  flex: none;
  border-radius: 9999px;
  background: var(--surface);
  color: var(--slate-400);
}

.progress-track {
  overflow: hidden;
  border-radius: 9999px;
  background: var(--surface-2);
}

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--cyan-400), var(--violet-500));
  transition: width 0.3s;
}

.progress-fill.fill-emerald {
  background: var(--emerald-400);
}

.text-gradient {
  background: linear-gradient(to right, var(--cyan-300), var(--violet-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-amber {
  background: linear-gradient(to right, var(--amber-300), var(--amber-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Barre supérieure (Parcours) --- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgb(7 11 20 / 0.95);
  padding: 0.75rem 1.25rem;
  backdrop-filter: blur(8px);
}

.topbar .brand {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.topbar .stats {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.stat-flame { color: var(--flame); }
.stat-xp { color: var(--xp); }
.stat-freeze { color: var(--cyan-300); }

.stat-level {
  border-radius: 9999px;
  background: var(--surface-2);
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  color: var(--cyan-300);
}

/* --- Page Parcours (chemin serpentin) --- */

.path-page {
  padding-bottom: 6rem;
}

.path-content {
  padding: 0 1.25rem;
}

.parcours-header {
  margin: 2rem 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.parcours-header .emoji {
  font-size: 1.5rem;
}

.parcours-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

.parcours-novice h2 { color: var(--emerald-300); }
.parcours-initie h2 { color: var(--cyan-300); }
.parcours-avance h2 { color: var(--violet-400); }
.parcours-expert h2 { color: var(--amber-300); }

.parcours-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.parcours-progress .progress-track {
  flex: 1;
  height: 0.5rem;
}

.parcours-progress .count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-400);
  white-space: nowrap;
}

.module-block {
  margin-top: 1.5rem;
}

.module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.module-head .module-id {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.module-head h3 {
  font-size: 1rem;
  font-weight: 700;
}

.module-head .count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-400);
}

.module-cards {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* Décalage horizontal en serpentin, façon chemin Duolingo */
.card-slot[data-offset="1"] { margin-left: 3rem; }
.card-slot[data-offset="2"] { margin-left: 6rem; }
.card-slot[data-offset="-1"] { margin-right: 3rem; }
.card-slot[data-offset="-2"] { margin-right: 6rem; }

.path-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

.path-node:disabled {
  cursor: not-allowed;
}

.node-circle {
  display: flex;
  height: 4rem;
  width: 4rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 1.5rem;
  transition: transform 0.15s;
}

.path-node:not(:disabled):active .node-circle {
  transform: scale(0.9);
}

.path-node[data-status="done"] .node-circle {
  background: linear-gradient(to bottom, var(--emerald-400), var(--emerald-600));
  color: var(--night);
  box-shadow: 0 10px 15px -3px rgb(16 185 129 / 0.3);
}

.path-node[data-status="current"] .node-circle {
  background: linear-gradient(to bottom, var(--cyan-300), var(--violet-500));
  color: var(--night);
  box-shadow: 0 10px 15px -3px rgb(34 211 238 / 0.4), 0 0 0 4px rgb(103 232 249 / 0.3);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.path-node[data-status="premium-locked"] .node-circle {
  background: var(--surface-2);
  color: var(--amber-300);
  border: 2px solid rgb(251 191 36 / 0.6);
}

.path-node[data-status="locked"] .node-circle,
.path-node[data-status="soon"] .node-circle {
  background: var(--surface-2);
  color: var(--slate-600);
  border: 1px solid var(--line);
}

.node-title {
  max-width: 9rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--slate-300);
}

.path-node[data-status="locked"] .node-title,
.path-node[data-status="soon"] .node-title {
  color: var(--slate-600);
}

.node-xp {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--xp);
}

.path-footnote {
  margin: 2.5rem 0 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--slate-600);
}

/* --- Navigation basse --- */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  border-top: 1px solid var(--line);
  background: rgb(12 19 34 / 0.95);
  backdrop-filter: blur(8px);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav .tabs {
  margin: 0 auto;
  display: flex;
  max-width: 28rem;
}

.bottom-nav a {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 0.625rem 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-500);
  transition: color 0.15s;
}

.bottom-nav a.active {
  color: var(--cyan-300);
}

.bottom-nav svg {
  height: 1.5rem;
  width: 1.5rem;
  fill: currentColor;
}

/* --- Page Leçon --- */

.lesson-page,
.quiz-page,
.premium-page {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 1.25rem 2rem;
}

.lesson-header,
.quiz-header {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 -1.25rem;
  background: rgb(7 11 20 / 0.95);
  padding: 1rem 1.25rem 0.75rem;
  backdrop-filter: blur(8px);
}

.lesson-header .row,
.quiz-header .row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.story-bars {
  display: flex;
  flex: 1;
  gap: 0.375rem;
}

.story-bars span {
  height: 0.375rem;
  flex: 1;
  border-radius: 9999px;
  background: var(--surface-2);
  transition: background-color 0.2s;
}

.story-bars span.on {
  background: var(--cyan-400);
}

.lesson-header .crumb {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.lesson-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 0;
  cursor: pointer;
}

.lesson-screen h1 {
  font-size: 1.5rem;
  font-weight: 800;
}

.lesson-screen[hidden] {
  display: none;
}

.prose-lesson {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.625;
  color: var(--slate-300);
}

.prose-lesson p,
.prose-lesson ul,
.prose-lesson ol {
  margin: 0 0 1rem;
}

.prose-lesson > :last-child {
  margin-bottom: 0;
}

.prose-lesson ul,
.prose-lesson ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.prose-lesson strong {
  color: var(--cyan-300);
  font-weight: 600;
}

.lesson-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lesson-footer .btn-ghost {
  flex: 1;
}

.lesson-footer .btn-primary {
  flex: 2;
}

/* --- Page Quiz --- */

.quiz-header .progress-track {
  height: 0.625rem;
  flex: 1;
}

.quiz-header .counter {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--slate-400);
}

.quiz-body {
  flex: 1;
  padding: 1.5rem 0;
}

.quiz-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cyan-300);
}

.quiz-question h1 {
  margin-top: 0.5rem;
  font-size: 1.25rem;
  line-height: 1.375;
  font-weight: 800;
}

.quiz-question[hidden] {
  display: none;
}

.choices {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.choice {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  transition: transform 0.15s, border-color 0.15s, background-color 0.15s;
}

.choice:not(:disabled):active {
  transform: scale(0.98);
}

.choice.selected {
  border-color: var(--cyan-400);
  background: rgb(34 211 238 / 0.12);
  color: var(--cyan-200);
}

.choice.correct {
  border-color: var(--emerald-400);
  background: rgb(52 211 153 / 0.15);
  color: var(--emerald-200);
}

.choice.wrong {
  border-color: var(--rose-400);
  background: rgb(251 113 133 / 0.15);
  color: var(--rose-200);
  animation: shake 0.3s ease-in-out 2;
}

.choice.dimmed {
  opacity: 0.5;
}

.quiz-footer {
  position: sticky;
  bottom: 0;
  margin: 0 -1.25rem;
  padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgb(7 11 20 / 0.95);
  backdrop-filter: blur(8px);
}

/* Feedback / correction d'une question (écran de résultats) */
.feedback {
  margin-top: 1.25rem;
  border-radius: 1rem;
  border: 1px solid;
  padding: 1rem;
  font-size: 0.875rem;
}

.feedback.good {
  border-color: rgb(52 211 153 / 0.4);
  background: rgb(52 211 153 / 0.1);
  color: #d1fae5;
}

.feedback.bad {
  border-color: rgb(251 113 133 / 0.4);
  background: rgb(251 113 133 / 0.1);
  color: #ffe4e6;
}

.feedback .head {
  font-weight: 700;
}

.feedback .body {
  margin-top: 0.375rem;
  line-height: 1.625;
  opacity: 0.9;
}

/* --- Écran de résultats du quiz --- */

.quiz-result {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  text-align: center;
}

.quiz-result .big-emoji {
  font-size: 4.5rem;
  line-height: 1;
}

.quiz-result h1 {
  margin-top: 1.25rem;
  font-size: 1.875rem;
  font-weight: 800;
}

.quiz-result .subtitle {
  margin-top: 0.5rem;
  color: var(--slate-400);
}

.result-chips {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.result-chips .chip {
  border-radius: 1rem;
  background: var(--surface);
  padding: 0.75rem 1.25rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.chip.chip-xp { color: var(--xp); }
.chip.chip-flame { color: var(--flame); }

.result-note {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--slate-500);
}

.new-badges {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.new-badges .label {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate-400);
}

.badge-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  border-color: rgb(251 191 36 / 0.4);
}

.badge-card .icon {
  font-size: 2.25rem;
}

.badge-card .name {
  font-weight: 700;
}

.badge-card .detail {
  font-size: 0.75rem;
  color: var(--slate-400);
}

.result-corrections {
  margin-top: 2rem;
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-corrections h2 {
  font-size: 1.125rem;
  font-weight: 700;
}

.correction .question {
  font-size: 0.875rem;
  font-weight: 700;
}

.correction .answer {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--emerald-300);
}

.correction .explanation {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--slate-400);
}

.result-actions {
  margin-top: 2rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Erreur API (401/402/403/422/réseau) */
.quiz-error {
  margin-top: 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgb(251 113 133 / 0.4);
  background: rgb(251 113 133 / 0.1);
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--rose-200);
}

.quiz-error a {
  font-weight: 700;
  text-decoration: underline;
}

/* --- Page Profil --- */

.profile-page {
  padding: 0 1.25rem 6rem;
}

.profile-header {
  padding: 2rem 0 0.5rem;
  text-align: center;
}

.avatar {
  margin: 0 auto;
  display: flex;
  height: 5rem;
  width: 5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: linear-gradient(to bottom, var(--cyan-400), var(--violet-500));
  font-size: 2.25rem;
}

.profile-header h1 {
  margin-top: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.premium-tag {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--amber-300);
}

.stats-grid {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.stats-grid .card {
  text-align: center;
}

.stats-grid .value {
  font-size: 1.4rem;
  font-weight: 800;
}

.stats-grid .label {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--slate-400);
}

.level-card {
  margin-top: 0.75rem;
}

.level-card .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.level-card .name {
  font-weight: 700;
}

.level-card .detail {
  font-size: 0.75rem;
  color: var(--slate-400);
}

.level-card .progress-track {
  margin-top: 0.5rem;
  height: 0.625rem;
}

.profile-section {
  margin-top: 1.5rem;
}

.profile-section > h2 {
  font-size: 1.125rem;
  font-weight: 700;
}

.profile-section .section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.profile-section .section-head .count {
  font-size: 0.75rem;
  color: var(--slate-400);
}

.parcours-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.parcours-list .card {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.parcours-list .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.875rem;
}

.parcours-list .name {
  font-weight: 600;
}

.parcours-list .detail {
  font-size: 0.75rem;
  color: var(--slate-400);
}

.parcours-list .progress-track {
  margin-top: 0.5rem;
  height: 0.5rem;
}

.badge-group {
  margin-top: 1rem;
}

.badge-group h3 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.badge-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.badge-tile {
  border-radius: 1rem;
  border: 1px solid var(--line);
  padding: 0.75rem;
}

.badge-tile .icon {
  font-size: 1.25rem;
}

.badge-tile .name {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.25;
  font-weight: 700;
}

.badge-tile .condition {
  margin-top: 0.25rem;
  font-size: 0.625rem;
  line-height: 1.25;
  color: var(--slate-400);
}

.badge-tile .rarity {
  margin-top: 0.25rem;
  font-size: 0.625rem;
  font-weight: 600;
}

.badge-tile.locked {
  background: var(--night-2);
  opacity: 0.4;
}

.badge-tile.locked .rarity {
  color: var(--slate-500);
}

.badge-tile.earned {
  background: var(--surface);
}

.badge-tile.earned[data-rarity="Bronze"] {
  border-color: rgb(251 146 60 / 0.4);
  color: var(--orange-300);
}

.badge-tile.earned[data-rarity="Argent"] {
  border-color: rgb(203 213 225 / 0.4);
  color: var(--slate-200);
}

.badge-tile.earned[data-rarity="Or"] {
  border-color: rgb(251 191 36 / 0.5);
  color: var(--amber-300);
}

.badge-tile.earned[data-rarity="Platine"] {
  border-color: rgb(103 232 249 / 0.5);
  color: var(--cyan-200);
}

/* --- Page Premium --- */

.premium-page {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.premium-page > header {
  padding-top: 1rem;
}

.premium-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
  text-align: center;
}

.premium-body .big-emoji {
  font-size: 3.75rem;
  line-height: 1;
}

.premium-body h1 {
  margin-top: 1rem;
  font-size: 1.875rem;
  font-weight: 800;
}

.premium-body .pitch {
  margin-top: 0.75rem;
  color: var(--slate-400);
}

.perks {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.perks li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.perks .check {
  color: var(--amber-300);
}

.price-card {
  margin-top: 2rem;
  border-color: rgb(251 191 36 / 0.4);
}

.price-card .price {
  font-size: 1.875rem;
  font-weight: 800;
}

.price-card .per {
  font-size: 1rem;
  font-weight: 500;
  color: var(--slate-400);
}

.price-card .detail {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--slate-500);
}

.premium-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.premium-footer .note {
  text-align: center;
  font-size: 0.6875rem;
  color: var(--slate-600);
}

/* --- Animations --- */

@keyframes pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-pop {
  animation: pop 0.4s cubic-bezier(0.2, 0.8, 0.3, 1.2) both;
}

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

.animate-shake {
  animation: shake 0.3s ease-in-out 2;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.35rem);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* --- Formulaires d'authentification (templates/auth/) ------------------- */

.auth-card {
  background: #0d1526;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.auth-card h1 {
  margin-top: 0;
  font-size: 1.4rem;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.form-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.form-field small {
  color: #94a3b8;
  font-weight: normal;
}

.form-field input {
  padding: 0.6rem 0.75rem;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #070b14;
  color: inherit;
  font-size: 1rem;
}

.form-field input:focus {
  outline: 2px solid #38bdf8;
  outline-offset: 1px;
  border-color: transparent;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn--primary {
  background: #0ea5e9;
  color: #05131c;
  font-weight: 600;
}

.btn--primary:hover {
  background: #38bdf8;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.alert--error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid #7f1d1d;
  color: #fca5a5;
}

.alert--success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid #14532d;
  color: #86efac;
}

.auth-links {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.auth-links a {
  color: #38bdf8;
}

/* Déconnexion (page profil) */
.logout-form {
  margin: 24px 0 8px;
  text-align: center;
}

/* ── Landing ─────────────────────────────────────────────────────────── */

.landing {
  display: flex;
  flex-direction: column;
  gap: 7rem;
  padding: 1.25rem 1.5rem 0;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.landing-nav .btn-ghost {
  padding: 0.5rem 1rem;
}

.landing-logo {
  font-weight: 800;
  background: linear-gradient(to right, var(--cyan-300), var(--violet-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  padding-top: 2.5rem;
}

.landing-pill {
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--surface);
  padding: 0.375rem 0.875rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--emerald-300);
}

.landing-hero h1 {
  font-size: 2.3rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.landing-hero .grad {
  background: linear-gradient(to right, var(--cyan-300), var(--violet-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-sub {
  color: var(--slate-300);
  line-height: 1.7;
  font-size: 1.05rem;
  max-width: 22rem;
}

.landing-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
}

.landing-cta-alt {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cyan-300);
}

.landing-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  color: var(--slate-400);
}

.landing-stats li {
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--surface);
  padding: 0.375rem 0.75rem;
}

.landing-stats strong {
  color: var(--slate-100);
}

.landing-section {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.landing-section h2 {
  font-size: 1.7rem;
  line-height: 1.25;
  text-align: center;
  letter-spacing: -0.015em;
  background: linear-gradient(to right, var(--cyan-300), var(--violet-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  align-self: center;
  max-width: 20rem;
}

.landing-section-sub {
  margin-top: -1rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--slate-400);
  align-self: center;
  max-width: 22rem;
}

.landing-pains {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 0.25rem;
}

.landing-pains .pain {
  display: flex;
  align-items: center;
  gap: 1.125rem;
}

.landing-pains .pain span {
  font-size: 1.9rem;
  flex: none;
}

.landing-pains .pain p {
  font-size: 1rem;
  color: var(--slate-200);
  line-height: 1.6;
}

.landing-truth {
  border-radius: 1.5rem;
  background: linear-gradient(180deg, var(--night-2), var(--surface));
  padding: 2.5rem 1.5rem;
}

.landing-truth ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  color: var(--slate-300);
  line-height: 1.6;
  font-size: 0.95rem;
}

.landing-truth-punch {
  text-align: center;
  line-height: 1.6;
  color: var(--slate-300);
  font-size: 0.95rem;
}

.landing-truth-punch strong {
  color: var(--emerald-300);
}

.landing-method {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.landing-method .method {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.625rem;
}

.landing-method .icon {
  font-size: 2.75rem;
}

.landing-method h3 {
  font-size: 1.2rem;
}

.landing-method p {
  font-size: 1rem;
  color: var(--slate-400);
  line-height: 1.65;
  max-width: 20rem;
}

.landing-parcours {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.landing-parcours .parcours {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem 1.375rem;
  border: none;
  border-left: 4px solid var(--line);
  border-radius: 0.5rem 1.25rem 1.25rem 0.5rem;
  background: var(--night-2);
}

.landing-parcours .parcours-novice  { border-left-color: var(--emerald-400); }
.landing-parcours .parcours-initie  { border-left-color: var(--cyan-400); }
.landing-parcours .parcours-avance  { border-left-color: var(--violet-400); }
.landing-parcours .parcours-expert  { border-left-color: var(--amber-400); }

.landing-parcours h3 {
  font-size: 1.05rem;
}

.landing-parcours p {
  font-size: 0.95rem;
  color: var(--slate-400);
  line-height: 1.6;
}

.landing-final {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--surface), var(--night-2));
}

.landing-final p {
  color: var(--slate-300);
  line-height: 1.6;
}

.landing-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  border-top: 1px solid var(--line);
  padding: 2.75rem 1.5rem 3rem;
  margin: 0 -1.5rem;
  text-align: center;
}

.landing-footer .brand {
  font-weight: 700;
}

.landing-footer .links {
  font-size: 0.9rem;
  color: var(--cyan-300);
}

.landing-footer .disclaimer {
  font-size: 0.75rem;
  color: var(--slate-500);
  line-height: 1.5;
  max-width: 24rem;
}

.landing-footer .version {
  font-size: 0.7rem;
  color: var(--slate-600);
}

/* ── Landing v2 : Whaly, micro-choix, crédibilité, motivation, premium ── */

.whaly {
  display: block;
  height: auto;
}

.whaly-hero {
  width: 13rem;
  margin: 0 auto;
}

.whaly-inline {
  width: 7rem;
  flex: none;
}

.landing-profiles {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.profile-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  row-gap: 0.125rem;
  align-items: center;
  padding: 1.25rem 1.375rem;
  border-radius: 1.25rem;
  transition: border-color 0.15s, transform 0.15s;
}

.profile-chip:active {
  transform: scale(0.98);
  border-color: var(--brand);
}

.profile-chip > span {
  grid-row: 1 / 3;
  font-size: 1.9rem;
}

.profile-chip > strong {
  font-size: 1rem;
}

.profile-chip > p {
  grid-column: 2;
  font-size: 0.875rem;
  color: var(--slate-400);
  line-height: 1.5;
}

.landing-truth-close {
  display: flex;
  align-items: center;
  gap: 1.125rem;
  margin-top: 1.75rem;
}

.landing-truth-close .landing-truth-punch {
  text-align: left;
  margin: 0;
}

.landing-credible {
  border-radius: 1.5rem;
  background: linear-gradient(180deg, var(--night-2), var(--surface));
  padding: 2.5rem 1.5rem;
}

.landing-credible ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  color: var(--slate-300);
  line-height: 1.6;
  font-size: 0.95rem;
}

.landing-credible-punch {
  text-align: center;
  font-weight: 700;
  color: var(--cyan-300);
}

.landing-motivation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.landing-motivation .whaly-inline {
  width: 9.5rem;
}

.landing-motivation-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  padding: 0 0.25rem;
}

.landing-motivation .motiv {
  display: flex;
  align-items: center;
  gap: 1.125rem;
}

.landing-motivation .motiv > span {
  font-size: 1.9rem;
  flex: none;
}

.landing-motivation .motiv p {
  font-size: 1rem;
  color: var(--slate-300);
  line-height: 1.6;
}

.landing-premium {
  align-items: center;
  text-align: center;
  border-radius: 1.5rem;
  border: 1px solid var(--amber-400);
  background: linear-gradient(180deg, var(--night-2), var(--surface));
  padding: 2.5rem 1.5rem;
}

.landing-premium p {
  color: var(--slate-300);
  line-height: 1.7;
  font-size: 0.95rem;
  max-width: 21rem;
}

.grad-amber {
  background: linear-gradient(to right, var(--amber-300), var(--amber-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Landing — entrées hero, reveal scroll, idle léger */

.landing-hero-in > * {
  animation: rise-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.landing-hero-in > *:nth-child(1) { animation-delay: 0.05s; }
.landing-hero-in > *:nth-child(2) { animation-delay: 0.14s; }
.landing-hero-in > *:nth-child(3) { animation-delay: 0.23s; }
.landing-hero-in > *:nth-child(4) { animation-delay: 0.32s; }
.landing-hero-in > *:nth-child(5) { animation-delay: 0.42s; }

[data-reveal] {
  opacity: 0;
  transform: translateY(0.85rem);
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-float {
  display: inline-block;
  animation: float-y 3.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero-in > *,
  .anim-float {
    animation: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
