/* Le site comptamania.com : direction R « Net » de l'application (src/theme.ts).
   Fond blanc, surfaces gris très clair, traits fins, un seul accent jaune, boutons encre. Pas de mode sombre. */

@font-face { font-family: "Jakarta"; src: url("/assets/fonts/PlusJakartaSans_500Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("/assets/fonts/PlusJakartaSans_700Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("/assets/fonts/PlusJakartaSans_800ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --bg: #FFFFFF;
  --surface: #F5F4F0;
  --line: #E7E5DE;
  --ink: #17181C;
  --muted: #666A73;
  --yellow: #FFD23E;
  --yellow-pale: #FFF6D1;
  --yellow-ink: #5D5026;
  --radius: 16px;
  --radius-sm: 12px;
  --wrap: 1120px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Jakarta", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--yellow); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(34px, 6vw, 56px); }
h2 { font-size: clamp(26px, 3.6vw, 38px); }
h3 { font-size: 21px; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.todo { background: var(--yellow-pale); color: var(--yellow-ink); padding: 0 6px; border-radius: 6px; }

/* ---------- Barre du haut ---------- */
.topbar { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { flex: none; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav-link { text-decoration: none; font-weight: 700; font-size: 15px; color: var(--muted); }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 14px;
  font: inherit; font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color 0.2s ease; text-align: center; line-height: 1.25;
}
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #2C2E35; }
.btn-ghost { background: var(--bg); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Les boutons des magasins, pas encore actifs. */
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.store {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 16px 6px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--muted);
}
.store svg { flex: none; }
.store-text { display: flex; flex-direction: column; line-height: 1.2; }
.store-text small { font-size: 12px; font-weight: 700; }
.store-text b { font-size: 15px; color: var(--ink); font-weight: 800; }
.soon { margin-left: 4px; font-size: 12px; font-weight: 800; background: var(--yellow); color: var(--ink); padding: 2px 8px; border-radius: 999px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.lead { font-size: 19px; color: var(--muted); max-width: 40em; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* L'ouverture de l'accueil. */
.hero { padding: 56px 0 40px; }
.hero-in { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.hero h1 { max-width: 12em; }
.hero .lead { margin-bottom: 28px; }
.code-jump { margin: 14px 0 0; font-size: 15px; font-weight: 700; }
.code-jump a { text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
@media (min-width: 900px) { .code-jump { display: none; } }
.diplomas-line { font-size: 14px; font-weight: 700; color: var(--muted); margin: 18px 0 0; }
@media (min-width: 900px) {
  .hero { padding: 80px 0 64px; }
  .hero-in { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
}

/* Le cadre de téléphone, sobre : un bord fin, des coins arrondis. */
.phone {
  width: 100%; max-width: 300px; margin: 0 auto; padding: 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 40px;
  box-shadow: 0 24px 48px -28px rgba(23, 24, 28, 0.35);
}
.phone img { border-radius: 30px; width: 100%; aspect-ratio: 375 / 812; object-fit: cover; background: var(--surface); }
.phone-fig { margin: 0; }
.phone-fig figcaption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 14px; }

/* ---------- Le champ du code d'invitation ---------- */
.code-band { padding: 0 0 24px; }
.code-card {
  background: var(--yellow-pale); border-radius: 20px; padding: 24px;
  display: grid; grid-template-columns: 1fr; gap: 16px; align-items: center;
}
.code-card > * { min-width: 0; }
.code-card h2 { font-size: 22px; margin: 0 0 4px; }
.code-card p { margin: 0; color: var(--yellow-ink); font-size: 15px; }
.code-form { display: flex; gap: 10px; flex-wrap: wrap; }
.code-input {
  flex: 1 1 150px; min-width: 0; max-width: 220px; height: 56px; padding: 0 16px;
  border: 1.5px solid var(--ink); border-radius: 14px; background: var(--bg); color: var(--ink);
  font: inherit; font-weight: 800; font-size: 24px; letter-spacing: 0.35em; text-transform: uppercase; text-align: center;
}
.code-input::placeholder { color: #B9B6AC; letter-spacing: 0.35em; }
.code-input:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
.code-form .btn { height: 56px; }
.code-error { flex-basis: 100%; min-height: 1.4em; margin: 0; font-size: 14px; font-weight: 700; color: #9A3412; }
@media (min-width: 760px) {
  .code-card { grid-template-columns: 1fr auto; padding: 28px 32px; gap: 32px; }
  .code-form { flex-wrap: nowrap; }
  .code-error { position: absolute; }
  .code-form-wrap { position: relative; }
}

/* ---------- Les trois temps ---------- */
.steps { display: grid; gap: 64px; margin-top: 48px; }
.step { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--yellow); font-weight: 800; margin-bottom: 14px;
}
.step h3 { font-size: clamp(24px, 3vw, 30px); }
.step p { color: var(--muted); max-width: 30em; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 4px; border-radius: 50%;
  background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.2l3 3 6-6.4' fill='none' stroke='%2317181C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
@media (min-width: 900px) {
  .step { grid-template-columns: 1fr 1fr; gap: 72px; }
  .step:nth-child(even) .step-media { order: -1; }
}

/* ---------- Cartes ---------- */
.surface { background: var(--surface); }
.cards { display: grid; grid-template-columns: 1fr; gap: 14px; list-style: none; padding: 0; margin: 32px 0 0; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .cards-4 { grid-template-columns: repeat(4, 1fr); } .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.surface .card { border-color: transparent; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 16px; }
.diploma { background: var(--bg); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.diploma strong { font-weight: 800; font-size: 17px; line-height: 1.3; }
.diploma span { color: var(--muted); font-size: 15px; }

/* Le bloc « Enseignants » de l'accueil. */
.teach-card {
  border: 1px solid var(--line); border-radius: 24px; padding: 32px 24px;
  display: grid; gap: 24px; align-items: center;
}
.teach-card h2 { margin-bottom: 10px; }
.teach-card p { color: var(--muted); margin: 0; max-width: 34em; }
@media (min-width: 900px) { .teach-card { grid-template-columns: 1fr auto; padding: 44px 48px; } }

/* ---------- La page Enseignants ---------- */
.how { counter-reset: how; list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
@media (min-width: 900px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how li { counter-increment: how; background: var(--bg); border-radius: var(--radius); padding: 22px; }
.how li::before {
  content: counter(how); display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); font-weight: 800; margin-bottom: 12px;
}
.how b { display: block; font-weight: 800; margin-bottom: 4px; }
.how span { color: var(--muted); font-size: 16px; }

.price-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .price-grid { grid-template-columns: 1fr 420px; gap: 56px; } }
.price-card { border: 1.5px solid var(--ink); border-radius: 24px; padding: 28px; }
.price { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 4px 0 6px; }
.price small { font-size: 18px; font-weight: 800; letter-spacing: 0; }
.price-per { color: var(--muted); margin-bottom: 20px; }
.price-card .ticks { margin: 0 0 24px; font-size: 16px; }
.price-card .btn { width: 100%; }
.price-card .btn + .btn { margin-top: 10px; }
.price-foot { font-size: 14px; color: var(--muted); margin: 16px 0 0; text-align: center; }
.price-foot a { font-weight: 700; color: var(--ink); }

/* ---------- Licences : tableau et calcul ---------- */
.price-grid > * { min-width: 0; }
@media (max-width: 899px) { .price-grid .calc { order: -1; } }
.tiers-wrap { overflow-x: auto; margin-top: 28px; }
@media (max-width: 520px) { .tiers th, .tiers td { padding: 12px 6px; } }
.tiers { width: 100%; border-collapse: collapse; font-size: 15px; }
.tiers th, .tiers td { padding: 12px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tiers th:first-child { text-align: left; }
.tiers thead th { font-size: 13px; color: var(--muted); font-weight: 700; }
.tiers tbody th { font-weight: 800; }
.calc-code { margin: 0 0 18px; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.code-applied { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--yellow-pale); font-size: 15px; }
.calc-code-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.calc-code-form[hidden], .code-applied[hidden], .link-btn[hidden], [data-discount-row][hidden] { display: none; }
.code-input-sm { flex: 1 1 120px; max-width: none; height: 44px; font-size: 18px; border-width: 1px; border-color: var(--line); }
.calc-code-form .btn { height: 44px; min-height: 44px; }
.calc-code-form .code-error { min-height: 0; }
.calc-label { display: block; font-weight: 800; margin-bottom: 10px; }
.stepper { display: flex; align-items: stretch; gap: 8px; margin-bottom: 22px; }
.stepper input {
  flex: 1; min-width: 0; height: 52px; border: 1px solid var(--line); border-radius: 14px;
  font: inherit; font-size: 22px; font-weight: 800; text-align: center; color: var(--ink); background: var(--bg);
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: 2px solid var(--yellow); outline-offset: 1px; }
.stepper-btn {
  width: 52px; height: 52px; flex: none; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  font: inherit; font-size: 24px; font-weight: 800; color: var(--ink); cursor: pointer;
}
.stepper-btn:hover { background: var(--line); }
.calc-lines { display: grid; grid-template-columns: 1fr auto; gap: 8px 0; margin: 0 0 6px; }
.calc-lines dt { padding-right: 16px; }
.calc-lines dt { color: var(--muted); }
.calc-lines dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.calc-lines .calc-total { color: var(--ink); font-weight: 800; font-size: 22px; padding-top: 10px; border-top: 1px solid var(--line); }

/* Le sélecteur de diplôme et les listes de chapitres. */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 24px; }
.tab {
  font: inherit; font-weight: 800; font-size: 15px; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chapter-list { margin-bottom: 40px; }
.list-title { font-size: 22px; margin-bottom: 4px; }
.list-note { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.list-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.block { break-inside: avoid; margin-bottom: 26px; }
.block-title { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.chapters { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.chapter { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.num {
  flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.surface .num { background: var(--bg); }
.surface .chapter.is-out .num { background: #FAF9F6; }
.ch-title { flex: 1; font-weight: 700; font-size: 16px; line-height: 1.35; }
.tag { flex: none; font-size: 12px; font-weight: 800; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.chapter.is-out .ch-title, .chapter.is-out .num { color: #A2A5AC; }
.chapter.is-out .num { background: #FAF9F6; }
@media (min-width: 900px) { .blocks { columns: 2; column-gap: 48px; } }

/* ---------- La page du professeur invité ---------- */
.invite { max-width: 640px; margin: 0 auto; text-align: center; }
.invite-code {
  display: inline-flex; gap: 8px; margin: 8px 0 28px; padding: 0; list-style: none;
}
.invite-code li {
  width: 54px; height: 64px; border-radius: 14px; background: var(--yellow);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 30px;
}
.offer { background: var(--yellow-pale); border-radius: 24px; padding: 28px 24px; margin: 0 0 24px; }
.offer h1 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 12px; }
.offer p { color: var(--yellow-ink); margin: 0; }
.invite .btn { width: 100%; max-width: 360px; }
.invite .ticks { text-align: left; max-width: 420px; margin: 28px auto; }
.fine { font-size: 13px; color: var(--muted); margin-top: 20px; }
.invite-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.invite-form .code-error { text-align: center; }

/* ---------- Pages de texte ---------- */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(32px, 5vw, 44px); }
.prose h2 { font-size: 23px; margin-top: 2em; }
.prose p, .prose li { color: #33353B; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose dl { display: grid; grid-template-columns: 1fr; gap: 4px 24px; margin: 0 0 1em; }
.prose dt { font-weight: 800; }
.prose dd { margin: 0 0 10px; color: #33353B; }
@media (min-width: 640px) { .prose dl { grid-template-columns: 220px 1fr; } .prose dd { margin: 0; } }
.prose .stores { flex-direction: column; align-items: flex-start; padding: 0; margin: 28px 0; }
.prose .stores li { margin: 0; color: var(--muted); }
.note-card { background: var(--surface); border-radius: var(--radius); padding: 22px 24px; margin: 24px 0; }
.note-card p:last-child { margin: 0; }
.big-mail { font-size: 22px; font-weight: 800; word-break: break-word; }

/* ---------- Pied de page ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; margin-top: 24px; }
.footer-in { display: grid; gap: 24px; }
.footer-brand p { color: var(--muted); margin: 4px 0 0; font-size: 15px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; font-weight: 700; }
.footer-nav a { text-decoration: none; color: var(--muted); }
.footer-nav a:hover, .footer-nav a[aria-current="page"] { color: var(--ink); }
@media (min-width: 900px) { .footer-in { grid-template-columns: 1fr auto; align-items: center; } }

/* ---------- Petits écrans ---------- */
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 56px 0; }
  .nav { gap: 12px; }
  .brand-name { font-size: 16px; }
  .lead { font-size: 17px; }
  .code-card { padding: 20px; }
  .price-card { padding: 22px; }
  .code-input { max-width: none; flex: 1 1 100%; width: 100%; }
  .code-form .btn { flex: 1 1 100%; }
}
@media (max-width: 520px) { .nav-link { font-size: 14px; color: var(--ink); } .nav .btn-sm { padding: 0 10px; font-size: 13px; min-height: 36px; } .nav { gap: 8px; } .brand { gap: 7px; } .brand-mark { width: 33px; height: 28px; } .brand-name { font-size: 15px; } .topbar-in { gap: 8px; } }

/* Une apparition lente des blocs, et rien du tout pour qui réduit les animations. */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .rise-2 { animation-delay: 0.15s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
