:root {
  --bg: #f6f8fc;
  --card: #ffffff;
  --text: #101828;
  --muted: #667085;
  --primary: #1463ff;
  --primary-dark: #0e45b8;
  --primary-soft: #eaf2ff;
  --green: #00a884;
  --line: #d9e1f2;
  --success: #079455;
  --warning: #dc6803;
  --danger: #d92d20;
  --success-soft: #ecfdf5;
  --danger-soft: #fef2f2;
  --shadow: 0 18px 50px rgba(16, 24, 40, .08);
  --shadow-strong: 0 24px 70px rgba(16, 24, 40, .14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

[hidden],
.is-hidden {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', 'Roboto', 'Arial', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

p {
  margin-top: 0;
}

.main {
  width: min(1180px, 92%);
  margin: 0 auto;
  padding: 34px 0 70px;
}


.social-auth-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin: 18px 0;
}

.full {
  width: 100%;
}

/* ===== HEADER ===== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 5%;
  box-shadow: 0 8px 26px rgba(16, 24, 40, .04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  background: linear-gradient(135deg, var(--primary), var(--green));
  color: #ffffff;
  border-radius: 14px;
  padding: 8px 11px;
  box-shadow: 0 10px 24px rgba(20, 99, 255, .25);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav a {
  color: var(--text);
  font-weight: 700;
  font-size: .95rem;
}

.nav a:hover {
  color: var(--primary);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 1.3rem;
  cursor: pointer;
}

/* ===== BOUTONS ===== */

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #ffffff !important;
  font-weight: 900;
  padding: 12px 18px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(20, 99, 255, .22);
  transition: .2s ease;
}

.btn:hover {
  text-decoration: none;
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(20, 99, 255, .28);
}

.btn-outline {
  background: #ffffff;
  color: var(--primary) !important;
  border: 1px solid var(--primary);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--primary-soft);
  color: var(--primary-dark) !important;
}

.btn-small {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: .9rem;
}

.link {
  color: var(--primary);
  font-weight: 800;
}

/* ===== HERO ===== */

.hero {
  display: flex;
  gap: 24px;
  align-items: stretch;
  margin: 30px 0;
}

.hero-content {
  flex: 1.25;
}

.hero-panel {
  flex: .75;
}

.hero-content,
.hero-panel,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

.hero-content {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #eaf2ff 60%, #e8fff8 100%);
}

.hero-content:after {
  content: '';
  position: absolute;
  width: 240px;
  height: 240px;
  right: -80px;
  bottom: -90px;
  background: radial-gradient(circle, rgba(20, 99, 255, .16), transparent 70%);
  border-radius: 999px;
}

.hero-content > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: -.05em;
  margin: 8px 0 18px;
}

.hero p {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 760px;
}

.hero-panel {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-panel h2 {
  margin-top: 0;
  font-size: 1.55rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 900;
  color: var(--primary);
  margin: 0 0 8px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ===== SECTIONS ===== */

.section {
  margin: 42px 0;
}

.section-title {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 24px;
}

.section-title h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -.03em;
  margin: 0 0 10px;
}

.section-title p {
  color: var(--muted);
}

/* ===== STATS ===== */

.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 24px 0;
}

.stat-card {
  flex: 1 1 calc(33.333% - 18px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.stat-card:before {
  content: '';
  position: absolute;
  right: -35px;
  top: -35px;
  width: 100px;
  height: 100px;
  background: rgba(20, 99, 255, .08);
  border-radius: 50%;
}

.stat-card strong {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--primary);
  margin-bottom: 8px;
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

/* ===== ÉTAPES ===== */

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.steps article {
  flex: 1 1 calc(25% - 18px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: .2s ease;
}

.steps article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}

.steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--green));
  color: #ffffff;
  border-radius: 50%;
  font-weight: 900;
  margin-bottom: 10px;
}

.steps h3 {
  margin: 8px 0;
}

/* ===== LANGUES / BADGES ===== */

.language-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.language-strip span,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 9px 14px;
  background: #edf4ff;
  color: var(--primary);
  font-weight: 800;
  border: 1px solid rgba(20, 99, 255, .12);
}

.language-strip span:hover {
  background: #dbeafe;
}

.badge.success {
  background: #dcfae6;
  color: var(--success);
}

.badge.warning {
  background: #fff4e5;
  color: var(--warning);
}

.language-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.language-card {
  flex: 1 1 calc(33.333% - 18px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.language-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--green));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 900;
}

/* ===== GRILLES ===== */

.grid-2 {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 28px 0;
}

.grid-2 > * {
  flex: 1 1 calc(50% - 22px);
}

.card {
  position: relative;
}

.card h2 {
  margin-top: 0;
  font-size: 1.55rem;
}

.card .eyebrow + h2 {
  margin-top: 4px;
}

/* ===== LISTES ===== */

.nice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 0;
  list-style: none;
}

.nice-list li {
  position: relative;
  background: #f8fafc;
  border: 1px solid #e6edf8;
  border-radius: 14px;
  padding: 13px 14px 13px 38px;
}

.nice-list li:before {
  content: '✓';
  position: absolute;
  left: 14px;
  top: 13px;
  color: var(--success);
  font-weight: 900;
}

.nice-list em {
  color: var(--primary);
  font-style: normal;
  font-weight: 800;
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #f7f9ff;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 14px;
}

.tag-list em {
  color: var(--primary);
  font-style: normal;
  font-weight: 800;
}

/* ===== FORMULAIRES ===== */

.form-card {
  max-width: 860px;
  margin: 0 auto;
}

.form-card.slim {
  max-width: 520px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.grid-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.grid-form > * {
  flex: 1 1 calc(50% - 16px);
}

.grid-form .full,
.full {
  flex: 1 1 100%;
}

label,
fieldset {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 800;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

legend {
  padding: 0 8px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  background: #ffffff;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(20, 99, 255, .14);
  border-color: var(--primary);
}

textarea {
  resize: vertical;
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.check-grid label {
  flex: 1 1 calc(33.333% - 10px);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.check-grid input {
  width: auto;
}

/* ===== MESSAGES ===== */

.flash {
  border-radius: 16px;
  padding: 14px 16px;
  margin: 12px 0;
  font-weight: 800;
}

.flash-success {
  background: #dcfae6;
  color: #05603a;
}

.flash-warning {
  background: #fff4e5;
  color: #93370d;
}

.flash-danger {
  background: #fee4e2;
  color: #912018;
}

.muted {
  color: var(--muted);
}

.notice {
  background: #edf4ff;
  border: 1px solid #b2ccff;
  border-radius: 16px;
  padding: 14px 16px;
  margin: 18px 0;
}

/* ===== QUESTIONS / RÉPONSES ===== */

.question-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.question-list.compact article {
  background: #f7f9ff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.question-list h2 {
  margin: .3rem 0;
}

.meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 800;
}

.split-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.inline-filter {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.lesson-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.lesson-grid > * {
  flex: 1 1 calc(50% - 18px);
}

.lesson-card .badge {
  margin-bottom: 10px;
}

.answer-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.answer-list article {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.answer-list article:last-child {
  border-bottom: 0;
}

.answer-list audio,
.recorder audio {
  width: 100%;
  margin-top: 8px;
}

/* ===== PAGES LÉGALES / ADSENSE ===== */

.content-page {
  max-width: 980px;
  margin: 0 auto;
  line-height: 1.8;
}

.content-page h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: .8rem;
}

.content-page h2 {
  margin-top: 2rem;
}

.content-page .notice {
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  padding: 1rem;
  border-radius: .8rem;
}

.legal-list li {
  margin-bottom: .65rem;
}

.small {
  font-size: .9rem;
}

.compliance-card {
  border: 1px solid rgba(16, 185, 129, .25);
  background: linear-gradient(180deg, #ecfdf5, #ffffff);
}

.danger-card {
  border: 1px solid rgba(239, 68, 68, .25);
  background: linear-gradient(180deg, #fef2f2, #ffffff);
}

.code-block,
code {
  display: block;
  white-space: pre-wrap;
  background: #101828;
  color: #ffffff;
  border-radius: 14px;
  padding: 14px;
  overflow: auto;
  font-family: 'Consolas', 'Monaco', monospace;
}

.free-lesson-item {
  border-left: 4px solid #2563eb;
  padding: 1rem;
  background: #f8fafc;
  border-radius: .8rem;
  margin-bottom: 1rem;
}

.ad-container {
  margin: 2rem auto;
  padding: .5rem;
  min-height: 90px;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, .08);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.ad-container:before {
  content: 'Annonce';
  display: block;
  font-size: .75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .4rem;
}

/* ===== TABLES ===== */

.migration-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
}

.migration-table th,
.migration-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: .75rem;
  text-align: left;
}

.badge-ok {
  background: #dcfce7;
  color: #166534;
  border-radius: 999px;
  padding: .25rem .65rem;
}

.badge-warn {
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  padding: .25rem .65rem;
}

/* ===== FOOTER ===== */

.footer {
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 28px 5%;
  background: #ffffff;
}

.footer-grid {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: .85rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  opacity: .9;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ===== BANDEAU COOKIES ===== */

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  background: #ffffff;
  color: #172033;
  border: 1px solid rgba(20, 37, 63, .18);
  box-shadow: 0 12px 40px rgba(15, 23, 42, .18);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
}

.cookie-banner * {
  pointer-events: auto;
}

.cookie-banner p {
  margin: .25rem 0 0;
}

.cookie-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}

.cookie-actions button,
.cookie-actions a {
  position: relative;
  z-index: 10000;
  cursor: pointer;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 980px) {
  .nav {
    gap: 12px;
  }

  .nav a {
    font-size: .9rem;
  }
}

@media (max-width: 850px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    left: 4%;
    right: 4%;
    top: 68px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 18px;
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav.open {
    display: flex;
  }

  .hero,
  .grid-2,
  .stats-grid,
  .lesson-grid,
  .grid-form {
    flex-direction: column;
  }

  .hero-content,
  .hero-panel,
  .grid-2 > *,
  .stats-grid > *,
  .lesson-grid > *,
  .grid-form > * {
    flex: 1 1 100%;
  }

  .steps article,
  .language-card {
    flex: 1 1 calc(50% - 18px);
  }

  .check-grid label {
    flex: 1 1 100%;
  }

  .split-title {
    display: block;
  }

  .inline-filter {
    flex-direction: column;
  }

  .main {
    width: 94%;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    display: block;
  }

  .footer-links {
    margin-top: 1rem;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .steps article,
  .language-card {
    flex: 1 1 100%;
  }

  .hero-content,
  .hero-panel,
  .card {
    padding: 22px;
  }

  .hero h1 {
    font-size: 2.15rem;
  }

  .topbar {
    padding: 12px 4%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .stat-card strong {
    font-size: 2rem;
  }
}