/* =========================================================
   Ma Box Aventure — feuille de style
   Direction artistique : carnet d'explorateur, plein soleil.
   Site volontairement LUMINEUX en toutes circonstances :
   aucune bascule automatique en thème sombre.
   ========================================================= */

:root {
  /* --- Verts : la forêt, la marque --- */
  --forest: #14794f;        /* vert feuille profond — couleur principale */
  --forest-dark: #0d5a3b;   /* survol + arête basse des boutons */
  --moss: #35b06e;          /* vert vif, décoratif */
  --moss-ink: #14734a;      /* même vert, assez foncé pour du petit texte */
  --leaf-soft: #dcf5e4;     /* fond vert très clair */

  /* --- Eau et ciel --- */
  --lake: #1f92cc;          /* bleu lac, décoratif */
  --lake-ink: #0e6f9e;      /* bleu lisible sur fond clair */
  --lake-soft: #ddf1fc;     /* fond bleu très clair */

  /* --- Soleil --- */
  --sun: #ffc233;           /* jaune franc */
  --sun-deep: #e5a012;      /* arête basse du bouton soleil */
  --sun-ink: #8a5510;       /* ambre lisible sur fond clair */
  --sun-soft: #ffeec9;      /* fond ambre très clair */
  --gold-ink: #a25c05;      /* étoiles, notes dorées */

  /* --- Terre et feu --- */
  --clay: #e2562b;          /* terre cuite, décoratif */
  --clay-ink: #b23c14;      /* terre cuite lisible sur fond clair */
  --clay-soft: #ffe6dd;     /* fond terre très clair */

  /* --- Papiers et encres --- */
  --cream: #fff8ef;         /* papier kraft très clair, fond général */
  --paper: #ffffff;
  --ink: #1f2d26;
  --ink-soft: #5a6b61;
  --line: #ead9c2;          /* trait chaud, décoratif */
  --line-soft: #f4e9da;
  --line-strong: #9b8a72;   /* trait des champs de formulaire (contraste ≥ 3:1) */

  /* --- Formes --- */
  --radius: 18px;
  --radius-lg: 30px;
  --radius-pill: 999px;

  /* --- Ombres colorées plutôt que grises --- */
  --shadow-sm: 0 2px 0 rgba(20, 121, 79, .07), 0 6px 14px -8px rgba(13, 90, 59, .35);
  --shadow: 0 4px 0 rgba(20, 121, 79, .09), 0 18px 34px -20px rgba(13, 90, 59, .5);
  --shadow-lg: 0 8px 0 rgba(20, 121, 79, .1), 0 34px 60px -30px rgba(13, 90, 59, .5);

  /* --- Typographie : piles 100 % système --- */
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Candara, "Avenir Next", "Trebuchet MS", "Segoe UI", var(--font);
  --wrap: 1140px;

  /* --- Motifs SVG auto-portés (aucune ressource externe) --- */
  --motif-feuilles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%2314794f' stroke-opacity='.09' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M12 26c6-10 17-10 23 0-6 10-17 10-23 0z'/%3E%3Cpath d='M12 26h23'/%3E%3Cpath d='M52 62c5-8 14-8 19 0-5 8-14 8-19 0z'/%3E%3Cpath d='M52 62h19'/%3E%3Ccircle cx='68' cy='20' r='2.4'/%3E%3Ccircle cx='22' cy='70' r='2.4'/%3E%3C/g%3E%3C/svg%3E");
  --motif-vague-blanche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='18' viewBox='0 0 120 18' preserveAspectRatio='none'%3E%3Cpath d='M0 18V9Q15 0 30 9T60 9T90 9T120 9V18Z' fill='%23ffffff'/%3E%3C/svg%3E");
  --motif-vague-creme: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='18' viewBox='0 0 120 18' preserveAspectRatio='none'%3E%3Cpath d='M0 18V9Q15 0 30 9T60 9T90 9T120 9V18Z' fill='%23fff8ef'/%3E%3C/svg%3E");
  /* masque de découpe : partie haute pleine, bord bas ondulé */
  --motif-masque-vague: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='18' viewBox='0 0 120 18' preserveAspectRatio='none'%3E%3Cpath d='M0 0V9Q15 18 30 9T60 9T90 9T120 9V0Z' fill='%23ffffff'/%3E%3C/svg%3E");
  --motif-dents: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='16' viewBox='0 0 44 16' preserveAspectRatio='none'%3E%3Cpath d='M0 16v-3l11-10 11 10 11-10 11 10v3z' fill='%23ffffff'/%3E%3C/svg%3E");
  --motif-piste: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='170' viewBox='0 0 340 170'%3E%3Cpath d='M14 150Q90 62 168 116T326 34' fill='none' stroke='%23b23c14' stroke-opacity='.32' stroke-width='4.5' stroke-linecap='round' stroke-dasharray='1 15'/%3E%3C/svg%3E");
  --motif-etoiles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23ffffff' fill-opacity='.14'%3E%3Ccircle cx='18' cy='24' r='2.6'/%3E%3Ccircle cx='94' cy='16' r='1.8'/%3E%3Ccircle cx='62' cy='58' r='2.2'/%3E%3Ccircle cx='30' cy='92' r='1.8'/%3E%3Ccircle cx='104' cy='86' r='2.6'/%3E%3C/g%3E%3Cg fill='%23ffc233' fill-opacity='.22'%3E%3Ccircle cx='46' cy='30' r='2'/%3E%3Ccircle cx='80' cy='104' r='2'/%3E%3C/g%3E%3C/svg%3E");
  --motif-pointilles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Ccircle cx='4' cy='4' r='1.5' fill='%23ffffff' fill-opacity='.16'/%3E%3Ccircle cx='17' cy='15' r='1.5' fill='%23ffffff' fill-opacity='.1'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

/* L'attribut hidden doit toujours l'emporter sur les display: flex/grid déclarés plus bas */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--cream);
  background-image: var(--motif-feuilles);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.14; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.05rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.24rem; }
p { margin: 0 0 1rem; }
a { color: var(--forest); text-decoration-color: color-mix(in srgb, var(--forest) 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
img { max-width: 100%; }
hr { border: 0; border-top: 2px dashed var(--line); margin: 2.5rem 0; }
small, .small { font-size: .86rem; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--forest); color: #fff;
  padding: .7rem 1.2rem; border-radius: 0 0 14px 0; z-index: 100; font-weight: 700;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--lake-ink); outline-offset: 2px; border-radius: 8px; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 0;
}
/* Ruban d'aventure : une bande de couleurs sous l'en-tête */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; pointer-events: none;
  background: linear-gradient(90deg, var(--forest) 0 25%, var(--sun) 25% 50%, var(--clay) 50% 75%, var(--lake) 75% 100%);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 800; }
.brand-mark { font-size: 1.55rem; display: inline-block; transition: transform .25s ease; }
.brand:hover .brand-mark { transform: rotate(-14deg) scale(1.08); }
.brand-text { font-size: 1.2rem; letter-spacing: -.015em; }
.brand-text strong { color: var(--forest); }

/* Le macaron officiel remplace le pictogramme dans l'en-tête et le pied de
   page. Il porte déjà le nom de la marque : le texte à côté est donc masqué
   visuellement, mais conservé pour les lecteurs d'écran et le référencement. */
.brand-logo { display: block; width: auto; height: 52px; transition: transform .25s ease; }
.brand:hover .brand-logo { transform: rotate(-4deg) scale(1.04); }
.brand-badge .brand-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (max-width: 480px) { .brand-logo { height: 44px; } }

.footer-brand .brand-logo { height: 84px; }

/* ---------- Scènes illustrées ----------
   Illustrations vectorielles maison, dans le style du macaron. Les familles
   y sont toujours vues de dos : aucun visage d'enfant n'est représenté,
   ce qui évite toute question de droit à l'image. */
.scene {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 3px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: var(--cream);
}
.scene-figure { margin: 0; }
.scene-figure figcaption {
  margin-top: .7rem;
  font-size: .88rem;
  color: var(--ink-soft);
  text-align: center;
}
/* Bandeau large, pour une scène en pleine largeur de section. */
.scene-band {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid var(--line);
  box-shadow: var(--shadow);
  line-height: 0;
}
.scene-band .scene { border: 0; border-radius: 0; box-shadow: none; }

/* Accroche du logo : « EXPLORE. DÉCOUVRE. AMUSE-TOI. » */
.tagline {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--moss-ink);
  font-size: .82rem;
  margin: .5rem 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo, .brand:hover .brand-logo { transition: none; transform: none; }
}

.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: .96rem; font-weight: 600; }
.site-nav a:hover, .site-nav a.is-active { color: var(--forest); }
.site-nav a.is-active { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--sun); }
.site-nav .btn { color: #fff; }
.inline-form { display: inline; }

.nav-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: .5rem; }
.nav-burger span { display: block; width: 24px; height: 3px; background: var(--forest); border-radius: 3px; }

@media (max-width: 900px) {
  .nav-burger { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 2px solid var(--line);
    padding: .5rem 1.25rem 1.25rem; box-shadow: var(--shadow); display: none;
  }
  .site-nav > * { padding: .7rem 0; border-bottom: 1px solid var(--line-soft); }
  .site-nav .btn { margin-top: .8rem; text-align: center; border-bottom: 0; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
}

/* ---------- Boutons ---------- */
/* Boutons « en relief » : une arête colorée en dessous, qui s'écrase au clic. */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: var(--radius-pill); border: 2px solid transparent;
  font: inherit; font-family: var(--font-display); font-weight: 700; font-size: 1rem; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--forest); color: #fff; box-shadow: 0 4px 0 var(--forest-dark), 0 12px 22px -12px rgba(13, 90, 59, .8); }
.btn-primary:hover { background: #16855a; box-shadow: 0 6px 0 var(--forest-dark), 0 18px 28px -14px rgba(13, 90, 59, .8); }
.btn-primary:active { box-shadow: 0 2px 0 var(--forest-dark); }

.btn-sun { background: var(--sun); color: #40290a; box-shadow: 0 4px 0 var(--sun-deep), 0 12px 22px -12px rgba(229, 160, 18, .9); }
.btn-sun:hover { background: #ffcd52; box-shadow: 0 6px 0 var(--sun-deep), 0 18px 28px -14px rgba(229, 160, 18, .9); }
.btn-sun:active { box-shadow: 0 2px 0 var(--sun-deep); }

.btn-outline { border-color: var(--forest); color: var(--forest); background: var(--paper); box-shadow: 0 4px 0 color-mix(in srgb, var(--forest) 22%, transparent); }
.btn-outline:hover { background: var(--leaf-soft); box-shadow: 0 6px 0 color-mix(in srgb, var(--forest) 28%, transparent); }
.btn-outline:active { box-shadow: 0 2px 0 color-mix(in srgb, var(--forest) 22%, transparent); }

.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-soft); background: var(--paper); }

.btn-danger { background: var(--paper); border-color: var(--clay-ink); color: var(--clay-ink); }
.btn-danger:hover { background: var(--clay-soft); }

.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.btn-lg { padding: 1.05rem 2rem; font-size: 1.08rem; }
.btn-block { width: 100%; }

/* ---------- Messages ---------- */
.flash {
  display: flex; gap: .7rem; align-items: flex-start;
  margin: 1.2rem 0 0; padding: .9rem 1.2rem; border-radius: var(--radius);
  border: 2px solid var(--line); background: var(--paper); box-shadow: var(--shadow-sm);
}
.flash p { margin: 0; }
.flash-success { border-left: 8px solid var(--moss); background: color-mix(in srgb, var(--leaf-soft) 55%, var(--paper)); }
.flash-error { border-left: 8px solid var(--clay); background: color-mix(in srgb, var(--clay-soft) 55%, var(--paper)); }
.flash-info { border-left: 8px solid var(--lake); background: color-mix(in srgb, var(--lake-soft) 55%, var(--paper)); }

.errors { background: var(--clay-soft); border: 2px solid color-mix(in srgb, var(--clay) 45%, transparent); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.5rem; }
.errors ul { margin: 0; padding-left: 1.2rem; }
.errors li { margin: .2rem 0; }

/* ---------- Héros ---------- */
.hero {
  position: relative; overflow: hidden;
  background-color: var(--cream);
  background-image:
    var(--motif-piste),
    radial-gradient(900px 460px at 84% -12%, color-mix(in srgb, var(--sun) 48%, transparent), transparent 62%),
    radial-gradient(760px 420px at 4% 4%, color-mix(in srgb, var(--lake) 32%, transparent), transparent 62%),
    linear-gradient(180deg, var(--lake-soft), var(--cream) 72%);
  background-repeat: no-repeat;
  background-position: 4% 88%, 0 0, 0 0, 0 0;
  background-size: 340px 170px, auto, auto, auto;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 6vw, 5.5rem);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { background-position: 50% 98%, 0 0, 0 0, 0 0; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--sun-soft); border: 2px dashed var(--sun-deep); border-radius: var(--radius-pill);
  padding: .4rem 1.1rem; font-size: .86rem; font-weight: 700; color: var(--sun-ink);
  box-shadow: var(--shadow-sm); margin-bottom: 1.2rem; transform: rotate(-1.4deg);
}
.hero h1 { margin-bottom: 1rem; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.24rem); color: var(--ink-soft); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.8rem 0 1.2rem; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; margin-top: 1.6rem; }
.hero-proof div strong { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--forest); }
.hero-proof div span { font-size: .87rem; color: var(--ink-soft); }

/* Carte « box » illustrée — un autocollant posé de travers */
.box-card {
  background: var(--paper); border: 3px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 1.7rem; transform: rotate(-1.6deg);
}
.box-card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.box-stamp {
  font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--clay-ink); border: 2px dashed var(--clay-ink); border-radius: 10px; padding: .25rem .6rem; transform: rotate(5deg);
  background: var(--clay-soft); flex: none;
}
.box-mission { background: var(--sun-soft); border-radius: var(--radius); padding: 1.1rem 1.2rem; border: 2px dashed var(--sun-deep); }
.box-mission h3 { margin-bottom: .3rem; font-size: 1.06rem; }
.box-checklist { list-style: none; padding: 0; margin: .8rem 0 0; }
.box-checklist li { display: flex; gap: .6rem; align-items: center; padding: .35rem 0; font-size: .93rem; }
.box-checklist li::before { content: "☐"; color: var(--moss-ink); font-size: 1.1rem; }
.box-checklist li.checked::before { content: "☑"; }
.box-checklist li.checked { color: var(--ink-soft); text-decoration: line-through; }
.box-items { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.box-items span { background: var(--lake-soft); color: var(--lake-ink); border: 1.5px solid color-mix(in srgb, var(--lake) 30%, transparent); border-radius: var(--radius-pill); padding: .3rem .8rem; font-size: .8rem; font-weight: 700; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }

/* Sections claires séparées par des vagues plutôt que par un filet */
.section-alt { position: relative; background: var(--paper); border-block: 0; }
.section-alt::before, .section-alt::after {
  content: ""; position: absolute; left: 0; right: 0; height: 18px; pointer-events: none;
  background: var(--motif-vague-blanche) repeat-x center bottom;
  background-size: 120px 18px;
}
.section-alt::before { top: -17px; }
.section-alt::after { bottom: -17px; transform: scaleY(-1); }

.section-head { max-width: 42rem; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.06rem; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 800; color: var(--clay-ink); margin-bottom: .6rem; }

.grid { display: grid; gap: 1.6rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Cartes « autocollant » : bord franc, ombre colorée */
.card {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.7rem; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
}
.card-hover:hover { transform: translateY(-5px) rotate(-.7deg); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--moss) 45%, var(--line)); }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  font-size: 1.9rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  width: 3.4rem; height: 3.4rem; margin-bottom: .9rem; border-radius: 20px;
  background: var(--sun-soft); border: 2px solid color-mix(in srgb, var(--sun-deep) 45%, transparent);
  transform: rotate(-4deg); transition: transform .2s ease;
}
.card-hover:hover .card-icon { transform: rotate(6deg) scale(1.06); }

.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.8rem; height: 2.8rem; border-radius: 50%;
  background: var(--forest); color: #fff; font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 800; margin-bottom: .9rem;
  box-shadow: 0 0 0 4px var(--leaf-soft), 0 6px 14px -8px rgba(13, 90, 59, .9);
  transform: rotate(-3deg);
}

/* ---------- Cartes aventures ---------- */
.adventure-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: color-mix(in srgb, var(--cover, #14794f) 5%, var(--paper));
  border: 2px solid color-mix(in srgb, var(--cover, #14794f) 28%, var(--line));
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--cover, #14794f) 16%, transparent), 0 14px 28px -18px color-mix(in srgb, var(--cover, #14794f) 85%, transparent);
  text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.adventure-card:hover { transform: translateY(-5px) rotate(-.5deg); box-shadow: 0 8px 0 color-mix(in srgb, var(--cover, #14794f) 20%, transparent), 0 24px 40px -20px color-mix(in srgb, var(--cover, #14794f) 90%, transparent); }
.adventure-cover {
  position: relative; padding: 1.4rem 1.4rem 2.2rem; color: #fff;
  background-color: color-mix(in srgb, var(--cover, #14794f) 62%, #0c241a);
  background-image:
    var(--motif-pointilles),
    linear-gradient(145deg, color-mix(in srgb, var(--cover, #14794f) 62%, #0c241a), color-mix(in srgb, var(--cover, #14794f) 44%, #08170f));
  /* bord inférieur festonné : le fond clair de la carte remonte en vaguelettes */
  -webkit-mask-image: linear-gradient(#000, #000), var(--motif-masque-vague);
  -webkit-mask-size: 100% calc(100% - 14px), 60px 14px;
  -webkit-mask-position: top left, bottom left;
  -webkit-mask-repeat: no-repeat, repeat-x;
  mask-image: linear-gradient(#000, #000), var(--motif-masque-vague);
  mask-size: 100% calc(100% - 14px), 60px 14px;
  mask-position: top left, bottom left;
  mask-repeat: no-repeat, repeat-x;
}
.adventure-cover .month { font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; color: #fff; }
.adventure-cover .emoji { font-size: 2.7rem; display: block; line-height: 1; margin: .3rem 0 .5rem; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .3)); }
.adventure-cover h3 { color: #fff; margin: 0; font-size: 1.24rem; }
.adventure-body { padding: .9rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.adventure-body p { margin: 0; font-size: .93rem; color: var(--ink-soft); }
.adventure-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.tag {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius-pill);
  padding: .22rem .75rem; font-size: .78rem; font-weight: 700; color: var(--ink-soft);
}
.tag-free { background: var(--sun-soft); border-color: color-mix(in srgb, var(--sun-deep) 55%, transparent); color: var(--sun-ink); }
.tag-done { background: var(--leaf-soft); border-color: color-mix(in srgb, var(--moss) 55%, transparent); color: var(--moss-ink); }
.lock-badge { position: absolute; top: 1rem; right: 1.2rem; font-size: 1.1rem; }

/* ---------- Page aventure ---------- */
.adventure-hero {
  position: relative; color: #fff; padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 5vw, 4.5rem);
  background-color: color-mix(in srgb, var(--cover, #14794f) 46%, #0c241a);
  background-image:
    var(--motif-etoiles),
    linear-gradient(145deg, color-mix(in srgb, var(--cover, #14794f) 46%, #0c241a), color-mix(in srgb, var(--cover, #14794f) 28%, #07150e));
}
/* vague crème pour rejoindre le contenu clair */
.adventure-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 18px; pointer-events: none;
  background: var(--motif-vague-creme) repeat-x center bottom; background-size: 120px 18px; transform: scaleY(-1);
}
.adventure-hero h1 { color: #fff; }
.adventure-hero .lead { color: rgba(255, 255, 255, .92); font-size: 1.12rem; max-width: 46rem; }
/* voile volontairement discret : le texte blanc reste à ≥ 4.5:1 même sur les couvertures claires */
.adventure-hero .tag { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .55); color: #fff; }
.adventure-hero .breadcrumb a { color: rgba(255, 255, 255, .95); }

.breadcrumb { font-size: .87rem; margin-bottom: 1rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb span { opacity: .7; margin: 0 .4rem; }

/* Le parchemin de l'histoire */
.story-scroll {
  background: var(--sun-soft); border: 3px dashed color-mix(in srgb, var(--clay) 55%, transparent);
  border-radius: var(--radius-lg); padding: 1.9rem 1.8rem 1.6rem; font-size: 1.05rem; position: relative;
  box-shadow: var(--shadow-sm);
}
.story-scroll::before {
  content: "📜"; position: absolute; top: -1.2rem; left: 1.4rem; font-size: 1.5rem; line-height: 1;
  background: var(--paper); border: 2px solid color-mix(in srgb, var(--clay) 45%, transparent);
  border-radius: 50%; width: 2.6rem; height: 2.6rem; display: flex; align-items: center; justify-content: center;
  transform: rotate(-8deg);
}

.mission {
  background: var(--paper); border: 2px solid var(--line); border-left: 8px solid var(--cover, var(--moss));
  border-radius: var(--radius-lg); padding: 1.6rem 1.8rem; margin-bottom: 1.2rem; box-shadow: var(--shadow-sm);
}
.mission-head { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.mission-num {
  font-family: var(--font-display); font-weight: 800; color: var(--ink); font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--cover, var(--moss)) 14%, #fff);
  border: 1.5px solid color-mix(in srgb, var(--cover, var(--moss)) 40%, transparent);
  padding: .18rem .8rem; transform: rotate(-1.5deg);
}
.mission h3 { margin: .5rem 0 .5rem; }
.mission .goal { color: var(--ink-soft); }

.checklist { list-style: none; padding: 0; margin: .9rem 0 0; }
.checklist li { margin: 0; }
.checklist label { display: flex; gap: .7rem; align-items: flex-start; padding: .45rem .7rem; border-radius: 12px; cursor: pointer; transition: background .15s ease; }
.checklist label:hover { background: var(--leaf-soft); }
.checklist input { width: 1.2rem; height: 1.2rem; accent-color: var(--forest); margin-top: .25rem; flex: none; }
.checklist input:checked + span { text-decoration: line-through; color: var(--ink-soft); }

.quiz { margin-top: 1rem; }
.quiz-q { border-top: 2px dashed var(--line); padding-top: 1rem; margin-top: 1rem; }
.quiz-q:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.quiz-q > p { font-weight: 700; }
.quiz-options { display: grid; gap: .55rem; margin: .7rem 0; }
.quiz-option {
  display: flex; gap: .7rem; align-items: center; width: 100%; text-align: left;
  background: var(--cream); border: 2px solid var(--line); border-radius: 14px;
  padding: .7rem 1rem; font: inherit; font-size: .95rem; color: inherit; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.quiz-option:hover { border-color: var(--moss); background: var(--paper); transform: translateX(3px); }
.quiz-option .letter {
  font-weight: 800; color: var(--ink); flex: none; font-family: var(--font-display);
  background: var(--sun-soft); border-radius: 50%; width: 1.7rem; height: 1.7rem;
  display: inline-flex; align-items: center; justify-content: center; font-size: .9rem;
}
.quiz-option.correct { background: var(--leaf-soft); border-color: var(--moss-ink); }
.quiz-option.correct .letter { background: var(--moss-ink); color: #fff; }
.quiz-option.wrong { background: var(--clay-soft); border-color: var(--clay-ink); }
.quiz-option.wrong .letter { background: var(--clay-ink); color: #fff; }
.quiz-explain {
  display: none; background: var(--lake-soft); border-radius: 14px; padding: .85rem 1.1rem;
  font-size: .93rem; border-left: 6px solid var(--lake-ink);
}
.quiz-explain.show { display: block; }

.clue-chip {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.1rem;
  background: var(--forest); color: #fff; border-radius: var(--radius-pill); padding: .45rem 1.1rem;
  font-weight: 700; font-size: .9rem; box-shadow: 0 3px 0 var(--forest-dark);
  transform: rotate(-1deg);
}
.bonus {
  background: var(--sun-soft); border-radius: 14px; padding: .85rem 1.1rem; font-size: .93rem;
  margin-top: .9rem; border: 2px dashed color-mix(in srgb, var(--sun-deep) 55%, transparent);
}

/* Le coffre final */
.chest {
  background-color: var(--forest);
  background-image: var(--motif-etoiles), linear-gradient(145deg, #17855a, var(--forest-dark));
  color: #fff; border-radius: var(--radius-lg); padding: 2.2rem 2.2rem;
  box-shadow: var(--shadow), inset 0 0 0 3px rgba(255, 194, 51, .35);
}
.chest h2, .chest h3 { color: #fff; }
.chest .code {
  font-family: "Courier New", monospace; font-size: 2rem; font-weight: 700; letter-spacing: .35em;
  background: rgba(0, 0, 0, .25); border: 2px dashed rgba(255, 194, 51, .7); color: var(--sun);
  border-radius: 14px; padding: .6rem 1.2rem; display: inline-block;
}
.chest details { margin-top: 1rem; }
.chest summary { cursor: pointer; font-weight: 700; }

.notice { border-radius: var(--radius-lg); padding: 1.3rem 1.5rem; border: 2px solid var(--line); background: var(--paper); }
.notice-warn { background: var(--clay-soft); border-color: color-mix(in srgb, var(--clay) 45%, transparent); }
.notice ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.notice li { margin: .35rem 0; }

.locked-panel {
  text-align: center; background: var(--sun-soft); border: 3px dashed color-mix(in srgb, var(--sun-deep) 65%, transparent);
  border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.5rem);
}
.locked-panel .lock { font-size: 3.2rem; display: block; margin-bottom: .5rem; }

/* ---------- Tarifs ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.8rem; align-items: start; }
.plan {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-lg);
  padding: 2.1rem 1.8rem; box-shadow: var(--shadow-sm); position: relative; display: flex; flex-direction: column; height: 100%;
}
.plan-featured { border: 3px solid var(--forest); box-shadow: var(--shadow); }
.plan-badge {
  position: absolute; top: -1rem; left: 50%; transform: translateX(-50%) rotate(-2.5deg);
  background: var(--sun); color: #40290a; border-radius: var(--radius-pill); padding: .35rem 1.1rem;
  font-size: .8rem; font-weight: 800; letter-spacing: .04em; white-space: nowrap;
  box-shadow: 0 3px 0 var(--sun-deep);
}
.plan h3 { margin-bottom: .2rem; }
.plan .tagline { color: var(--ink-soft); font-size: .93rem; margin-bottom: 1.2rem; }
.plan .price { font-family: var(--font-display); font-weight: 800; font-size: 2.9rem; line-height: 1; color: var(--forest); }
.plan .period { color: var(--ink-soft); font-size: .93rem; }
.plan .sub { color: var(--ink-soft); font-size: .85rem; margin-top: .3rem; }
.plan ul { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: .6rem; }
.plan li { display: flex; gap: .6rem; font-size: .94rem; align-items: flex-start; }
.plan li::before { content: "✓"; color: var(--moss-ink); font-weight: 800; flex: none; }
.plan form, .plan .btn { margin-top: auto; }

.guarantees { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2.2rem; margin-top: 2.5rem; }
.guarantees div { display: flex; gap: .5rem; align-items: center; font-size: .92rem; color: var(--ink-soft); }

/* ---------- Formulaires ---------- */
.form-card { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--shadow); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .35rem; }
.field .hint { color: var(--ink-soft); font-size: .84rem; margin: .3rem 0 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; padding: .8rem 1rem; font: inherit; font-size: .97rem; color: var(--ink);
  background: var(--cream); border: 2px solid var(--line-strong); border-radius: 14px;
}
input:focus, select:focus, textarea:focus { border-color: var(--forest); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--moss) 30%, transparent); }
textarea { min-height: 150px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.checkbox { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; margin-bottom: 1rem; }
.checkbox input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--forest); flex: none; }

/* ---------- Compte ---------- */
.account-layout { display: grid; grid-template-columns: 250px 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .account-layout { grid-template-columns: 1fr; } }
.account-nav { display: grid; gap: .25rem; position: sticky; top: 96px; }
.account-nav a {
  display: flex; gap: .6rem; align-items: center; padding: .7rem 1rem; border-radius: 14px;
  text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 600;
}
.account-nav a:hover { background: var(--paper); box-shadow: var(--shadow-sm); }
.account-nav a.is-active { background: var(--forest); color: #fff; box-shadow: 0 3px 0 var(--forest-dark); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem 1.4rem; box-shadow: var(--shadow-sm); }
.stat strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; color: var(--forest); line-height: 1.1; }
.stat span { font-size: .85rem; color: var(--ink-soft); }

.status-pill { display: inline-flex; align-items: center; gap: .4rem; border-radius: var(--radius-pill); padding: .25rem .85rem; font-size: .82rem; font-weight: 800; border: 1.5px solid transparent; }
.status-active { background: var(--leaf-soft); border-color: color-mix(in srgb, var(--moss) 50%, transparent); color: var(--moss-ink); }
.status-canceled { background: var(--clay-soft); border-color: color-mix(in srgb, var(--clay) 45%, transparent); color: var(--clay-ink); }
.status-pending { background: var(--sun-soft); border-color: color-mix(in srgb, var(--sun-deep) 55%, transparent); color: var(--sun-ink); }
.status-past_due { background: var(--clay-soft); border-color: color-mix(in srgb, var(--clay) 45%, transparent); color: var(--clay-ink); }

.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.table-wrap { overflow-x: auto; background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-lg); }

.progress-bar { height: 14px; background: var(--line-soft); border: 2px solid var(--line); border-radius: var(--radius-pill); overflow: hidden; margin: .7rem 0; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--moss), var(--sun) 60%, var(--lake)); border-radius: var(--radius-pill); }

/* ---------- FAQ ---------- */
.faq-item { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); margin-bottom: .8rem; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 1.1rem 1.4rem; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--forest); font-size: 1.5rem; font-weight: 800; line-height: 1; flex: none; }
.faq-item[open] { border-color: color-mix(in srgb, var(--moss) 45%, var(--line)); }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-body { padding: 0 1.4rem 1.3rem; color: var(--ink-soft); }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Témoignages ---------- */
.quote { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 1.7rem; box-shadow: var(--shadow-sm); }
.quote:nth-child(odd) { transform: rotate(-.7deg); }
.quote:nth-child(even) { transform: rotate(.7deg); }
.quote p { font-size: 1rem; font-style: italic; }
.quote footer { font-size: .87rem; color: var(--ink-soft); font-style: normal; }
.stars { color: var(--gold-ink); letter-spacing: .1em; font-style: normal; }

/* ---------- Bandeau CTA ---------- */
.cta-band {
  position: relative; overflow: hidden;
  background-color: var(--forest);
  background-image: var(--motif-etoiles), linear-gradient(145deg, #17855a, var(--forest-dark));
  color: #fff; border-radius: var(--radius-lg); padding: clamp(2.4rem, 5vw, 3.6rem);
  text-align: center; box-shadow: var(--shadow), inset 0 0 0 3px rgba(255, 194, 51, .3);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .92); max-width: 40rem; margin-inline: auto; }
/* boutons secondaires posés sur le bandeau foncé */
.cta-band .btn-outline { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; box-shadow: none; }
.cta-band .btn-outline:hover { background: rgba(255, 255, 255, .16); box-shadow: none; }

/* ---------- Légal ---------- */
.legal { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 3rem); }
.legal h2 { font-size: 1.4rem; margin-top: 2.2rem; padding-top: 1.2rem; border-top: 2px dashed var(--line); }
.legal h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1rem; }
.legal h3 { font-size: 1.06rem; margin-top: 1.5rem; }
.legal ul { padding-left: 1.3rem; }
.legal li { margin: .4rem 0; }
.legal-toc { background: var(--sun-soft); border: 2px dashed color-mix(in srgb, var(--sun-deep) 45%, transparent); border-radius: var(--radius); padding: 1.2rem 1.5rem; margin-bottom: 2rem; }
.legal-toc ol { margin: .5rem 0 0; padding-left: 1.3rem; columns: 2; column-gap: 2rem; }
@media (max-width: 640px) { .legal-toc ol { columns: 1; } }

/* ---------- Facture ---------- */
.invoice { background: #fff; color: #1f2d26; max-width: 820px; margin: 2rem auto; padding: 3rem; border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.invoice-head { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.invoice-total { text-align: right; font-size: 1.3rem; font-weight: 700; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff; background-image: none; }
  .invoice { box-shadow: none; border: 0; margin: 0; padding: 0; }
}

/* ---------- Pied de page ---------- */
.site-footer {
  position: relative; background: var(--paper); border-top: 0; padding: 3.8rem 0 1.5rem; margin-top: 4rem;
  background-image: var(--motif-feuilles);
}
/* dents de scie au-dessus du pied de page */
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 16px; pointer-events: none;
  background: var(--motif-dents) repeat-x center bottom; background-size: 44px 16px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--clay-ink); margin-bottom: .9rem; }
.site-footer nav a { display: block; color: var(--ink); text-decoration: none; font-size: .93rem; padding: .25rem 0; }
.site-footer nav a:hover { color: var(--forest); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 2px dashed var(--line); margin-top: 2.5rem; padding-top: 1.2rem; }
.footer-bottom p { margin: 0; }

/* ---------- Bandeau cookies ---------- */
.cookie-banner {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  width: min(100% - 2rem, 720px); background: var(--paper); border: 2px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1rem 1.3rem;
  display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; z-index: 60;
}
.cookie-banner p { margin: 0; font-size: .89rem; }

/* ---------- Divers ---------- */
.page-head {
  padding: clamp(2.5rem, 5vw, 4rem) 0 1rem;
  background-image: linear-gradient(180deg, var(--lake-soft), color-mix(in srgb, var(--cream) 92%, transparent) 55%, transparent);
}
.demo-ribbon {
  background: var(--sun-soft); border: 2px dashed var(--sun-deep); border-radius: var(--radius);
  padding: .85rem 1.2rem; font-size: .9rem; margin-bottom: 1.5rem;
}
.spacer-sm { height: 1.5rem; }
.stack > * + * { margin-top: 1.2rem; }

/* ---------- Confort de lecture / mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .btn:hover, .card-hover:hover, .adventure-card:hover, .quiz-option:hover,
  .offline-save:hover, .brand:hover .brand-mark { transform: none; }
}
