/*
  Page de vente de la formation « La méthode démontrée mathématiquement
  pour devenir gagnant au blackjack » — CELIA PRESTIGE.
  Aucune dépendance externe : polices système, aucun CDN, aucune image distante.
*/

/* ---------- Jetons de couleur ---------- */
:root {
  color-scheme: light dark;

  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-2: #edf1ec;
  --text: #1b1f1c;
  --muted: #4a524d;
  --border: #d3d8d0;
  --felt: #1d5640;
  --felt-deep: #143f2f;
  --felt-ink: #ffffff;
  --link: #1a5a41;
  --link-hover: #0f3a2a;
  --red: #9a2a2a;
  --focus: #7a5600;
  --accent-case: #1d5640;
  --todo-bg: #fff1b8;
  --todo-ink: #4f3b00;
  --todo-border: #a07d00;
  --warn-bg: #ffd600;
  --warn-ink: #111111;
  --shadow: 0 1px 2px rgb(20 30 25 / 0.06), 0 6px 24px rgb(20 30 25 / 0.06);

  --font-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --radius: 12px;
  --gutter: 16px;
  --max: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1512;
    --surface: #141d19;
    --surface-2: #1a2621;
    --text: #e7ebe7;
    --muted: #aab4ae;
    --border: #2d3b34;
    --felt: #1f5240;
    --felt-deep: #173f31;
    --felt-ink: #f3f7f4;
    --link: #8fd3b0;
    --link-hover: #b5e6cc;
    --red: #f19a9a;
    --focus: #f2c14e;
    --accent-case: #8fd3b0;
    --todo-bg: #3f3300;
    --todo-ink: #ffe995;
    --todo-border: #c9a400;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 28px rgb(0 0 0 / 0.35);
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin-top: 0; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-family: var(--font-text); font-weight: 700; }

p, ul, ol, dl, table, blockquote, details { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: 0.3em; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

strong { font-weight: 700; }
small { font-size: 0.875rem; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  background: var(--felt);
  color: var(--felt-ink);
  padding: 0.6em 1em;
  border-radius: 8px;
}
.skip:focus { top: 8px; color: var(--felt-ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Champ laissé à compléter : visible à l'écran comme à l'impression */
.a-completer {
  background: var(--todo-bg);
  color: var(--todo-ink);
  border: 1px dashed var(--todo-border);
  border-radius: 4px;
  padding: 0 0.3em;
  font-weight: 600;
  font-size: 0.95em;
  font-family: var(--font-text);
}

/* ---------- En-tête ---------- */
.site-header {
  background: var(--felt);
  color: var(--felt-ink);
  border-bottom: 3px solid var(--felt-deep);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 0.85rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--felt-ink);
  text-decoration: none;
  min-width: 0;
}
.brand:hover { color: var(--felt-ink); }
.brand-mark { flex: none; width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-title { font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; }
.brand-sub { font-size: 0.85rem; opacity: 0.92; }
.brand-org { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.92; margin-top: 0.15rem; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: inline-block;
  color: var(--felt-ink);
  text-decoration: none;
  padding: 0.45em 0.7em;
  border-radius: 999px;
  font-size: 0.95rem;
  min-height: 44px;
  line-height: 1.6;
  padding-block: 0.55em;
}
.site-nav a:hover { background: rgb(255 255 255 / 0.12); color: var(--felt-ink); }
.site-nav a[aria-current="page"] { background: rgb(255 255 255 / 0.18); font-weight: 600; }
.site-nav a.nav-cta { border: 1px solid rgb(255 255 255 / 0.55); }
.site-header :focus-visible,
.hero :focus-visible,
.skip:focus-visible { outline-color: #ffd96b; }

/* ---------- Héros ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 85% 10%, rgb(255 255 255 / 0.07), transparent 60%),
    var(--felt);
  color: var(--felt-ink);
  padding-block: clamp(2rem, 1.2rem + 4vw, 4.5rem);
}
.hero a:not(.btn) { color: var(--felt-ink); }
.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.92;
  margin-bottom: 0.8rem;
}
.lead { font-size: 1.15rem; max-width: 40em; }
.hero .lead { color: var(--felt-ink); }
.hero-note {
  border-left: 4px solid #f2c14e;
  background: rgb(0 0 0 / 0.18);
  padding: 0.8rem 1rem;
  border-radius: 0 8px 8px 0;
  max-width: 40em;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.5rem;
}
.hero-facts li {
  margin: 0;
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: 999px;
  padding: 0.25em 0.8em;
  font-size: 0.95rem;
}
.hero-art { justify-self: center; width: min(100%, 340px); }
.hero-art svg { display: block; width: 100%; height: auto; }

/* ---------- Boutons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.7em 1.3em;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn-primary { background: var(--felt); color: var(--felt-ink); border-color: var(--felt-deep); }
.btn-primary:hover { background: var(--felt-deep); color: var(--felt-ink); }
.hero .btn-primary { background: #ffffff; color: #143f2f; border-color: #ffffff; }
.hero .btn-primary:hover { background: #e9f2ed; color: #0f3a2a; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.hero .btn-ghost { color: var(--felt-ink); }
.btn-ghost:hover { background: rgb(127 127 127 / 0.12); }

/* Bouton de paiement : désactivé tant qu'il n'a pas de href (ventes non ouvertes,
   cases obligatoires non cochées ou JavaScript désactivé) */
.btn-pay:not([href]),
.btn-pay[aria-disabled="true"] {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
  border-style: dashed;
  cursor: not-allowed;
}
.btn-pay:not([href]):hover { background: var(--surface-2); color: var(--muted); }
.pay-note { margin-top: 0.75rem; color: var(--muted); font-size: 0.95rem; }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding-block: clamp(2.25rem, 1.6rem + 2.5vw, 4rem); }
.section + .section { border-top: 1px solid var(--border); }
.section-alt { background: var(--surface-2); }
.section-intro { color: var(--muted); max-width: 46em; font-size: 1.05rem; }
.prose { max-width: 46em; }

.grid-2, .grid-3 { display: grid; gap: 1rem; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: 0.5em; }

.suit {
  font-family: var(--font-display);
  font-size: 1.1em;
  margin-right: 0.35em;
}
.suit-red { color: var(--red); }
.suit-black { color: var(--text); }

/* Encadré de référence « démontré mathématiquement » */
.encadre {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--felt);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.25rem 1.4rem;
  margin: 0 0 1.5rem;
  box-shadow: var(--shadow);
  max-width: 50em;
}
.encadre p { margin: 0; }

/* Liste des étapes et modules */
.etapes { display: grid; gap: 1rem; }
@media (min-width: 900px) {
  .etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .etapes > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.etape-tete {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}
.etape-tete h3 { margin: 0; }
.etape-duree { color: var(--muted); white-space: nowrap; font-size: 0.95rem; }
.etape-question { color: var(--muted); font-size: 0.97rem; }
.modules { list-style: none; padding: 0; margin: 0; }
.modules li {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: baseline;
  padding-block: 0.35rem;
  margin: 0;
}
.modules li + li { border-top: 1px dashed var(--border); }
.mod-code {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--felt-ink);
  background: var(--felt);
  border-radius: 6px;
  text-align: center;
  padding: 0.1em 0;
}
.mod-duree { color: var(--muted); white-space: nowrap; font-size: 0.95rem; }

/* Tableaux */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1rem; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.97rem;
}
caption { text-align: left; color: var(--muted); padding-bottom: 0.5rem; font-size: 0.95rem; caption-side: top; }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface-2); font-size: 0.9rem; }
tbody tr:last-child > * { border-bottom: 0; }
td.num { white-space: nowrap; font-weight: 700; }
@media (max-width: 599px) {
  td.num { white-space: normal; }
  th, td { padding: 0.55rem 0.5rem; }
  td .etiquette { margin-bottom: 0.2rem; }
}
.table-wrap:focus-visible { outline-offset: 2px; }

.etiquette {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 0.55em;
  white-space: nowrap;
  color: var(--muted);
}

/* Accès en deux niveaux */
.acces-niveaux { display: grid; gap: 1rem; }
@media (min-width: 720px) { .acces-niveaux { grid-template-columns: 1fr 1fr; } }
.niveau-duree { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; margin-bottom: 0.25rem; }

/* Prix */
.prix-bloc {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
@media (min-width: 720px) { .prix-bloc { grid-template-columns: auto minmax(0, 1fr); } }
.prix {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 2rem + 2vw, 3.2rem);
  font-weight: 600;
  line-height: 1;
  margin: 0;
}
.prix small { font-family: var(--font-text); font-size: 1rem; font-weight: 600; margin-left: 0.2em; }
.prix-details { margin: 0; }

/* Questions fréquentes */
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 1rem;
  margin-bottom: 0.6rem;
}
summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.85rem 0;
  min-height: 44px;
  list-style-position: outside;
}
details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 0.75rem; }
details > :last-child { padding-bottom: 0.9rem; margin-bottom: 0; }

/* Mise en garde sur le jeu (cartouche jaune, capitales noires) */
.cartouche {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-top: 2px solid #111;
  border-bottom: 2px solid #111;
}
.cartouche p { margin: 0; padding-block: 0.8rem; font-weight: 700; text-align: center; }
.cartouche .maj { text-transform: uppercase; letter-spacing: 0.02em; }
.cartouche a { color: var(--warn-ink); text-decoration-thickness: 2px; white-space: nowrap; }
.cartouche a:hover { color: #000; }
.cartouche :focus-visible { outline-color: #111; }

.jeu-bloc {
  border: 2px solid var(--warn-ink);
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.jeu-bloc a { color: var(--warn-ink); }
.jeu-bloc :focus-visible { outline-color: #111; }
.jeu-bloc > :last-child { margin-bottom: 0; }

/* Formulaire d'achat */
.recap { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.recap > div { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.recap > div:last-child { border-bottom: 0; }
.recap dt { font-weight: 700; }
.recap dd { margin: 0.15rem 0 0; }
@media (min-width: 720px) {
  .recap > div { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1rem; }
  .recap dd { margin: 0; }
}

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.1rem 0.5rem;
  margin: 0 0 1.25rem;
}
legend { font-weight: 700; padding: 0 0.4rem; font-size: 1.05rem; }
.fieldset-aide { color: var(--muted); font-size: 0.95rem; }
.case {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.6rem 0;
}
.case + .case { border-top: 1px dashed var(--border); }
.case input[type="checkbox"] {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.1rem 0 0;
  accent-color: var(--accent-case);
}
.case label { cursor: pointer; }
.obligatoire { color: var(--red); font-weight: 700; }
.pay-zone {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.pay-zone > :last-child { margin-bottom: 0; }
.pay-zone .btn { width: 100%; }
@media (min-width: 560px) { .pay-zone .btn { width: auto; } }
.message-etat {
  margin: 0.9rem 0 0;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 0.97rem;
}
.message-etat:empty { display: none; }

/* Pages légales */
.page-tete { padding-block: clamp(1.75rem, 1.2rem + 2vw, 3rem) 1rem; }
.page-tete p { color: var(--muted); }
.legal { padding-bottom: 3rem; }
.legal > * { max-width: 48em; }
.legal h2 {
  font-size: 1.35rem;
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 1rem;
}
.legal > h2:first-of-type { margin-top: 0.5rem; }
.legal h3 { font-size: 1.1rem; margin-top: 1.4rem; scroll-margin-top: 1rem; }
.sommaire {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.sommaire h2 { font-size: 1.05rem; margin: 0 0 0.5rem; padding: 0; border: 0; font-family: var(--font-text); }
.sommaire ol { margin: 0; columns: 1; }
@media (min-width: 720px) { .sommaire ol { columns: 2; column-gap: 2rem; } }
.formulaire-type {
  background: var(--surface);
  border: 1px dashed var(--muted);
  border-radius: var(--radius);
  padding: 1.25rem;
  font-size: 0.98rem;
}
.formulaire-type > :last-child { margin-bottom: 0; }
.encadre-garantie { border-left-color: var(--muted); font-size: 0.97rem; }
.encadre-garantie p + p { margin-top: 0.6em; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 0; }
.footer-grid {
  display: grid;
  gap: 1.5rem;
  padding-block: 2rem 1rem;
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1.2fr; } }
.site-footer h2 {
  font-family: var(--font-text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.site-footer p, .site-footer li { font-size: 0.95rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: 0.15rem; }
.footer-links a { display: inline-block; padding-block: 0.2rem; }
.footer-note {
  color: var(--muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 0;
}

/* ---------- Mouvement et impression ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .site-nav, .skip, .actions, .pay-zone { display: none !important; }
  .site-header, .hero { background: none; color: #000; border: 0; }
  .hero a, .brand { color: #000; }
  body { background: #fff; color: #000; }
  .card, .encadre, table, details { box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
