/* ==========================================================
   Ta Niya : direction artistique « rayures vertes »
   Vert, violet, touche de rose. Poppins pour les titres et le texte.
   ========================================================== */


/* Poppins, servie depuis le site (pas d'appel à Google) */
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --vert-fonce: #1F4D3A;   /* texte courant et titres */
  --vert: #4E8C6A;         /* boutons, WhatsApp */
  --raie-a: #CFE6D6;
  --raie-b: #B9D9C4;
  --violet: #6E4FA3;       /* titres de sections, interactifs */
  --violet-fonce: #4F3680;
  --lilas: #E3D7F3;        /* fonds de blocs */
  --rose: #F07FAA;         /* touche seulement */
  --rose-texte: #B8336A;
  --vert-sommaire: #4F8A2A; /* vert du logo, assez foncé pour un contraste AA */   /* rose foncé pour du texte : contraste AA sur le fond */
  --blanc: #FFFFFF;
  --voile: rgba(250, 253, 251, .55);

  --f-titre: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-texte: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  --entete: 64px;
  --logo-h: 44px;
  --logo-ratio: 3.0299;    /* 1624 / 536 : proportions du logo (avec sa marge) */
  --gouttiere: 16px;
  --rayon: 22px;
  --ombre: 0 28px 48px -30px rgba(31, 77, 58, .45);
}
@media (min-width: 960px) {
  :root { --entete: 84px; --logo-h: 56px; --gouttiere: clamp(24px, 4vw, 56px); }
}

/* ---------- Fond : rayures fixes + voile flouté ---------- */

html {
  background: var(--raie-a);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--vert-fonce);
  font-family: var(--f-texte);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;          /* les chats arrivent depuis le bord sans élargir la page */
}
main { overflow-x: clip; }
/* Les rayures et le voile sont deux calques fixes : le flou du voile s'applique bien aux rayures */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body::before {
  z-index: -2;
  background: repeating-linear-gradient(90deg, var(--raie-a) 0 40px, var(--raie-b) 40px 80px);
}
body::after {
  z-index: -1;
  background: var(--voile);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
/* Sans backdrop-filter : un voile plus couvrant pour garder la lecture facile */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body::after { background: rgba(250, 253, 251, .82); }
}

*, *::before, *::after { box-sizing: border-box; }
img, svg, video { display: block; max-width: 100%; }
p { margin: 0 0 1em; max-width: 60ch; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

h1, h2, h3 {
  margin: 0 0 .4em;
  font-family: var(--f-titre);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h1, h2 { text-transform: uppercase; letter-spacing: .01em; }
h1 { font-size: clamp(36px, 5.6vw, 76px); color: var(--vert-fonce); }
h2 { font-size: clamp(32px, 4.2vw, 56px); color: var(--violet); }
h3 { font-size: clamp(22px, 2vw, 26px); font-weight: 700; color: var(--vert-fonce); }

a { color: inherit; }
:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 8px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.lien-evitement {
  position: fixed; left: 12px; top: -80px; z-index: 300;
  padding: 10px 16px; border-radius: 12px;
  background: var(--blanc); font-weight: 600;
}
.lien-evitement:focus { top: 12px; }

.conteneur {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

/* ---------- Liens et boutons ---------- */

.lien {
  font-weight: 600;
  color: var(--vert-fonce);
  text-decoration: underline;
  text-decoration-color: var(--rose);
  text-decoration-thickness: 3px;
  text-underline-offset: 7px;
  transition: color .2s, text-decoration-color .2s;
}
.lien:hover { color: var(--violet); text-decoration-color: var(--violet); }

.btn-wa,
.btn-ligne {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--f-texte);
  font-size: 19px;          /* 19 px en gras : texte large au sens WCAG, contraste AA sur le vert moyen */
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s;
}
.btn-wa {
  border: 0;
  background: var(--vert);
  color: var(--blanc);
  box-shadow: 0 14px 26px -16px rgba(31, 77, 58, .9);
}
.btn-wa:hover { background: var(--vert-fonce); }
.btn-wa:active, .btn-ligne:active { transform: translateY(1px); }
.btn-wa svg { width: 22px; height: 22px; flex: none; }
.btn-ligne {
  border: 2px solid var(--violet);
  background: transparent;
  color: var(--violet);
}
.btn-ligne:hover { background: var(--violet); color: var(--blanc); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-top: 28px;
}

/* Mot important : souligné rose épais, posé sous le texte */
.marque-rose {
  font-weight: 600;
  background: linear-gradient(transparent 66%, color-mix(in srgb, var(--rose) 55%, transparent) 66% 92%, transparent 92%);
  padding: 0 .08em;
}

/* ==========================================================
   En-tête
   ========================================================== */

.entete {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--entete);
  display: flex;
  align-items: center;
  gap: 20px;
  padding-inline: var(--gouttiere);
}
.entete::before {           /* fond de l'en-tête, séparé pour pouvoir le faire apparaître après l'intro */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(250, 253, 251, .78);
  box-shadow: 0 1px 0 rgba(31, 77, 58, .08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: opacity .6s ease;
}
.marque {
  flex: none;
  display: block;
  width: calc(var(--logo-h) * var(--logo-ratio));
  height: var(--logo-h);
  border-radius: 10px;
}
.logo-flip {
  display: block;
  width: 100%;
  height: auto;
}
.nav-liens {
  display: none;
  margin-left: auto;
  gap: 30px;
}
.nav-liens a {
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 0;
  background: linear-gradient(var(--rose), var(--rose)) left 100% / 0 3px no-repeat;
  transition: background-size .25s ease, color .2s;
}
.nav-liens a:hover,
.nav-liens a[aria-current="page"] { background-size: 100% 3px; }
.nav-liens a:hover { color: var(--violet); }
.entete .btn-wa { display: none; min-height: 48px; padding: 0 22px; }

.btn-menu {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--violet);
  border-radius: 999px;
  background: transparent;
  color: var(--violet);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.btn-menu svg { width: 20px; height: 20px; }
.menu-mobile {
  position: absolute;
  top: calc(var(--entete) + 6px);
  right: var(--gouttiere);
  left: var(--gouttiere);
  padding: 10px;
  border-radius: var(--rayon);
  background: var(--lilas);
  box-shadow: var(--ombre);
}
.menu-mobile a {
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
}
.menu-mobile a:hover { background: rgba(255, 255, 255, .6); }
.menu-mobile a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--rose); }

@media (min-width: 960px) {
  .entete .btn-wa { display: inline-flex; }
  .btn-menu { min-height: 48px; padding: 0 22px; font-size: 17px; }
}
.btn-menu:hover { background: var(--violet); color: var(--blanc); }

/* Barre WhatsApp en bas de l'écran (téléphone) */
.wa-barre {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 50;
}
@media (min-width: 960px) { .wa-barre { display: none; } }

/* ==========================================================
   Accueil, écran 1 : la vidéo du logo à chaque arrivée
   ========================================================== */

.c0 { justify-items: center; }
.logo-scene {
  position: relative;
  width: min(92vw, 1000px, calc((100svh - 330px) * 2.0282));
  aspect-ratio: 1728 / 852;
}
.logo-scene video { width: 100%; height: 100%; }
/* le logo net, posé exactement sur la dernière image de la vidéo */
.logo-fixe {
  position: absolute;
  left: .694%;
  top: 34.272%;
  width: 93.981%;
  height: auto;
  opacity: 0;
}
.logo-scene.fini .logo-fixe {
  opacity: 1;
  animation: logo-flotte 6s ease-in-out infinite;
}
@keyframes logo-flotte {
  0%, 100% { transform: translateY(0) rotate(-.4deg); }
  50%      { transform: translateY(-14px) rotate(.4deg); }
}
.logo-scene.fini video { visibility: hidden; }
/* Au-dessus du logo : trois bulles, qui arrivent à la fin de la vidéo puis flottent */
.bulles {
  position: absolute;
  left: 0; right: 0;
  top: 8%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(8px, 2vw, 22px);
}
.bulles li {
  padding: .45em 1.1em;
  border-radius: 999px;
  background: var(--lilas);
  color: var(--violet);
  font-size: clamp(14px, 1.6vw, 21px);
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 10px 20px -14px rgba(110, 79, 163, .8), inset 0 0 0 2px rgba(255, 255, 255, .7);
  opacity: 0;
  transform: translateY(12px) scale(.8) rotate(var(--r));
  transition: opacity .5s ease var(--d), transform .6s cubic-bezier(.3, 1.4, .5, 1) var(--d);
}
@media (max-width: 959px) { .bulles { top: -6%; } }
.logo-scene.fini .bulles li {
  opacity: 1;
  transform: rotate(var(--r));
  animation: bulle-flotte 5s ease-in-out calc(var(--d) * 4 + .8s) infinite;
}
@keyframes bulle-flotte {
  0%, 100% { transform: translateY(0) rotate(var(--r)); }
  50%      { transform: translateY(-8px) rotate(var(--r)); }
}

/* Sous le logo : la mention et le bouton, qui arrivent à la fin de la vidéo */
.c0 .cadre-grille, .c0 { align-content: center; }
.c0-suite {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin-top: clamp(8px, 2svh, 22px);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .7s ease, transform .7s ease, visibility .7s;
}
.c0.fini .c0-suite { opacity: 1; visibility: visible; transform: none; }
.mention {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rose-texte);
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 600;
  letter-spacing: .01em;
}

.c0-actions {
  display: grid;
  justify-items: center;
  gap: 12px;
}
.age {
  font-size: 16px;
  font-weight: 600;
  color: var(--vert-fonce);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.age::before {               /* petite perle rose */
  content: "";
  width: 18px; height: 9px;
  clip-path: polygon(0 50%, 21% 0, 79% 0, 100% 50%, 79% 100%, 21% 100%);
  background: var(--rose);
}

/* Écran 1 épuré : seulement le logo. Le menu, la barre WhatsApp et le repère
   apparaissent dès qu'on quitte cet écran. */
.entete::before,
.entete > *,
.nav-cadres,
.wa-barre { transition: opacity .5s ease, visibility .5s; }
/* L'accueil n'a qu'un écran : le grand logo est déjà là, donc on cache
   seulement le petit logo et le fond de l'en-tête. Menu et WhatsApp restent. */
html.logo-en-grand .entete::before,
html.logo-en-grand .entete .marque {
  opacity: 0;
  visibility: hidden;
}

/* ==========================================================
   Le classeur : sommaire du site
   ========================================================== */

html.classeur-ouvert { overflow: hidden; }
.classeur {
  width: min(96vw, 900px);
  max-width: none;
  max-height: 100svh;
  padding: 24px 14px 64px;
  border: 0;
  background: transparent;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--vert-fonce);
}
.classeur::backdrop {
  background: rgba(31, 77, 58, .38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.classeur-corps {                /* le dos du classeur, vert foncé */
  position: relative;
  padding: 16px 16px 16px 30px;
  border-radius: 22px;
  filter: drop-shadow(0 30px 34px rgba(21, 55, 42, .55));
  perspective: 1600px;
  transform: rotate(-1deg);
}
/* Les fonds sont sur des calques à part, passés au filtre « trait à la main » :
   les bords tremblent, le texte reste net */
.classeur-corps::before,
.classeur-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}
.classeur-corps::before {
  background: linear-gradient(155deg, #2E6E53, var(--vert-fonce) 45%, #15372A);
  filter: url(#trait-main);
}
.classeur-page::before {
  background: var(--blanc);
  border: 2.5px solid var(--vert-fonce);
  box-shadow: inset 14px 0 18px -14px rgba(31, 77, 58, .25);
  filter: url(#trait-fin);
}
.classeur-page {
  position: relative;
  --pd: clamp(46px, 7vw, 88px);   /* marge droite : les intercalaires y sont posés */
  padding: clamp(26px, 5vw, 48px) var(--pd) clamp(26px, 5vw, 44px) clamp(52px, 7vw, 78px);
  border-radius: 6px 14px 14px 6px;
  isolation: isolate;
}
/* Le sommaire : Poppins en majuscules, dans le vert du logo (assombri pour rester lisible) */
.classeur-page h2,
.sommaire .num,
.sommaire .titre {
  font-family: "Poppins", var(--f-texte);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--vert-sommaire);
}
.classeur-page h2 { margin-bottom: 14px; font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; line-height: 1.05; }

/* Les anneaux sur la marge gauche */
.anneaux {
  position: absolute;
  left: -22px;
  top: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  pointer-events: none;
}
.anneaux span {
  position: relative;
  width: 50px;
  height: 20px;
  border-radius: 999px;
  border: 5px solid #B7C4BD;
  border-left-color: #8A9A92;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 3px 4px rgba(21, 55, 42, .35);
}
.anneaux span::after {           /* le trou dans la feuille */
  content: "";
  position: absolute;
  right: 4px; top: 50%;
  width: 12px; height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--raie-a);
  box-shadow: inset 0 1px 2px rgba(31, 77, 58, .35);
  z-index: -1;
}

.classeur-fermer {
  position: absolute;
  top: 14px; right: 18px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--violet);
  text-decoration: underline;
  text-decoration-color: var(--rose);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  cursor: pointer;
}

/* Le sommaire, avec un intercalaire de couleur par ligne */
.sommaire { display: grid; }
.sommaire li { position: relative; }
.sommaire li::after {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px;
  right: calc(-1 * var(--pd));
  width: 26px;
  border-radius: 10px 0 0 10px;
  background: var(--t);
  box-shadow: inset -3px 0 0 rgba(0, 0, 0, .06);
  filter: url(#trait-fin);
  transition: transform .25s ease;
}
.sommaire li:hover::after,
.sommaire li:focus-within::after { transform: translateX(-8px); }
.sommaire a {
  display: grid;
  grid-template-columns: 2.2ch 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 2px dashed rgba(31, 77, 58, .16);
  text-decoration: none;
}
.sommaire li:last-child a { border-bottom: 0; }
.sommaire .num {
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--violet);
}
.sommaire .titre {
  font-size: clamp(20px, 2.5vw, 30px);
  line-height: 1.2;
  background: linear-gradient(var(--rose), var(--rose)) left 100% / 0 4px no-repeat;
  transition: background-size .3s ease, color .2s;
  justify-self: start;
}
.sommaire a:hover .titre,
.sommaire a:focus-visible .titre { color: var(--vert-fonce); background-size: 100% 4px; }

/* La couverture, qui s'ouvre à l'arrivée */
.classeur-couverture {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 30% 20%, #8C6DC4, var(--violet) 55%, var(--violet-fonce));
  transform-origin: left center;
  filter: url(#trait-main);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: none;
}
.couverture-etiquette {
  width: min(60%, 360px);
  padding: 22px 26px;
  border-radius: 14px;
  background: var(--lilas);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .5);
}
.couverture-etiquette img { width: 100%; height: auto; }

@media (max-width: 559px) {
  .classeur-corps { padding: 12px 10px 12px 22px; }
  .anneaux { left: -18px; }
  .anneaux span { width: 40px; height: 16px; border-width: 4px; }
  .classeur-page { --pd: 34px; padding-top: 58px; }
  .classeur-page h2 { font-size: 32px; }
  .sommaire .titre { font-size: 19px; letter-spacing: .01em; }
  .sommaire .num { font-size: 18px; }
  .sommaire a { gap: 10px; }
  .sommaire li::after { width: 16px; }
}

/* ==========================================================
   Rideau des changements de page (sous le menu : le logo ne bouge pas)
   ========================================================== */

.rideau {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--vert);
  transform: translateY(100%);
  pointer-events: none;
}
.rideau::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: var(--violet);
}
html.rideau-arrive .rideau { transform: translateY(0); }

/* ==========================================================
   Accueil : un cadre par écran, défilement cadre par cadre
   ========================================================== */

html.album { scroll-snap-type: y mandatory; }
@media (max-height: 640px) { html.album { scroll-snap-type: none; } }

.cadre {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: calc(var(--entete) + 20px) var(--gouttiere) 96px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
@media (min-width: 960px) {
  .cadre { padding: calc(var(--entete) + 24px) calc(var(--gouttiere) + 56px) 48px var(--gouttiere); }
}
.cadre-grille {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  display: grid;
  gap: 28px;
  align-items: center;
}
.cadre-texte p { font-size: clamp(18px, 1.5vw, 21px); }
@media (min-width: 960px) {
  .cadre-grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 96px); }
  .cadre-grille.inverse > .cadre-texte { order: 2; }
}
/* Sur téléphone : l'objet interactif d'abord */
@media (max-width: 959px) {
  .cadre-grille .interactif { order: -1; }
  .c3 .cadre-texte { padding-top: 58px; }
  .c3 .cadre-texte .chat-bleu { left: auto; right: 4px; bottom: auto; top: 0; width: 64px; margin: 0; }
}
@media (min-width: 960px) {
  .sj { font-size: clamp(11px, min(1.25vw, 1.6svh), 17px); }
}

/* ---------- Cadre 1 : le soroban qui flotte ---------- */

.c1 .cadre-grille {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 0;
}
.c1 h1 { margin: clamp(18px, 4svh, 44px) 0 14px; }
.c1 .sous-titre { margin-inline: auto; font-size: clamp(18px, 1.6vw, 22px); max-width: 40ch; }
.c1 .actions { justify-content: center; margin-top: 22px; }
.session {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 22px auto 0;
  font-size: 16px;
  font-weight: 500;
}
.session::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 4px rgba(240, 127, 170, .25);
}

.sf {
  --bh: 1.72em;              /* hauteur d'une perle (pas compris) */
  font-size: clamp(9px, min(2.9vw, 1.9svh), 18px);
  perspective: 70em;
  user-select: none;
  -webkit-user-select: none;
}
.sf-flotte {
  position: relative;
  animation: sf-flotte 6.5s ease-in-out infinite;
}
.sf-cadre {
  position: relative;
  display: flex;
  gap: .55em;
  padding: 0 1.1em;
  border: .85em solid transparent;
  border-radius: 1.2em;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(227, 215, 243, .55)) padding-box,
    linear-gradient(155deg, #2E6E53, var(--vert-fonce) 45%, #15372A) border-box;
  box-shadow:
    inset 0 .3em .6em rgba(31, 77, 58, .18),
    0 3em 3.6em -2.2em rgba(31, 77, 58, .6);
  transform: rotateX(var(--rx, 12deg)) rotateY(var(--ry, -10deg));
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.sf-barre {
  position: absolute;
  left: 0; right: 0;
  top: 3.62em;
  height: .82em;
  background: linear-gradient(180deg, #2E6E53, var(--vert-fonce) 60%, #15372A);
  z-index: 2;
}
.sf-point {                  /* les points des unités sur la barre, comme sur un vrai soroban */
  position: absolute;
  top: 50%;
  width: .34em; height: .34em;
  margin: -.17em 0 0 -.17em;
  border-radius: 50%;
  background: var(--rose);
}
.sf-tige {
  position: relative;
  width: 3.3em;
  height: 13.5em;
  filter: drop-shadow(0 .28em .18em rgba(31, 77, 58, .28));   /* relief des perles */
}
.sf-tige::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: .26em;
  margin-left: -.13em;
  background: linear-gradient(90deg, #9DB7A8, #E9F3EC, #9DB7A8);
}
.perle {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: 1.66em;
  clip-path: polygon(0 50%, 21% 0, 79% 0, 100% 50%, 79% 100%, 21% 100%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .38) 0 12%, transparent 30% 70%, rgba(0, 0, 0, .14) 100%),
    linear-gradient(180deg, #8C6DC4 0%, var(--violet) 49%, var(--violet-fonce) 51%, #5F4396 100%);
  transform: translateY(var(--y, 0));
  transition: transform .42s cubic-bezier(.3, 1.35, .5, 1), filter .3s;
  z-index: 3;
}
.perle.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .45) 0 12%, transparent 30% 70%, rgba(0, 0, 0, .12) 100%),
    linear-gradient(180deg, #F9A9C7 0%, var(--rose) 49%, #D9628F 51%, #E5739E 100%);
}
.sf-ombre {
  width: 70%;
  height: 1.6em;
  margin: 2.4em auto 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(31, 77, 58, .32), transparent);
  animation: sf-ombre 6.5s ease-in-out infinite;
}
@keyframes sf-flotte {
  0%, 100% { transform: translateY(0) rotate(-.6deg); }
  50%      { transform: translateY(-1.3em) rotate(.6deg); }
}
@keyframes sf-ombre {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(.82); opacity: .6; }
}

/* ---------- Cadre 2 : le soroban à jouer ---------- */

.sj {
  font-size: clamp(9.5px, min(3.1vw, 1.25svh), 17px);
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: .7em;
  padding: 1.8em 2em 1.6em;
  border-radius: 2.2em 2.2em 2.2em .6em;
  background: var(--lilas);
  box-shadow: var(--ombre);
  user-select: none;
  -webkit-user-select: none;
}
.sj-tete {
  margin: 0;
  max-width: none;
  text-align: center;
  font-size: 1.2em;
  font-weight: 500;
  line-height: 1.35;
}
.sj-tete strong { color: var(--violet); font-weight: 700; }
.sj-nombre {
  display: block;
  font-family: var(--f-titre);
  font-size: 3.4em;
  line-height: 1.15;
  color: var(--violet);
}
.sj-cadre {
  position: relative;
  display: flex;
  gap: 1.3em;
  padding: 0 1.5em;
  height: 20em;
  border: .95em solid var(--vert-fonce);
  border-radius: 1.1em;
  background: rgba(255, 255, 255, .7);
}
.sj-barre {
  position: absolute;
  left: 0; right: 0;
  top: 5.2em;
  height: .75em;
  background: var(--vert-fonce);
  z-index: 2;
}
.sj-tige {
  position: relative;
  width: 4.8em;
  height: 100%;
}
.sj-tige::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: .32em;
  margin-left: -.16em;
  background: linear-gradient(90deg, #9DB7A8, #E9F3EC, #9DB7A8);
}
.sj-perle {
  position: absolute;
  left: 0; top: 0;
  width: 4.8em;
  height: 2.25em;
  padding: 0;
  border: 0;
  font-size: inherit;
  clip-path: polygon(0 50%, 21% 0, 79% 0, 100% 50%, 79% 100%, 21% 100%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .38) 0 12%, transparent 30% 70%, rgba(0, 0, 0, .14) 100%),
    linear-gradient(180deg, #8C6DC4 0%, var(--violet) 49%, var(--violet-fonce) 51%, #5F4396 100%);
  transform: translateY(var(--y));
  transition: transform .3s cubic-bezier(.3, 1.25, .5, 1);
  cursor: pointer;
  touch-action: none;
  z-index: 3;
}
.sj-perle[aria-pressed="true"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .45) 0 12%, transparent 30% 70%, rgba(0, 0, 0, .12) 100%),
    linear-gradient(180deg, #F9A9C7 0%, var(--rose) 49%, #D9628F 51%, #E5739E 100%);
}
/* le contour de focus suit la forme de la perle (clip-path cache l'outline) */
.sj-perle:focus-visible { outline: none; filter: drop-shadow(0 0 0 transparent); }
.sj-tige:has(.sj-perle:focus-visible) { outline: .2em solid var(--violet); outline-offset: .2em; border-radius: .6em; }
.sj-noms {
  display: flex;
  gap: 1.3em;
  padding: 0 2.45em;
  font-size: .95em;
  font-weight: 500;
}
.sj-noms span { width: 4.8em; text-align: center; }
.sj-etat { margin: 0; min-height: 1.6em; font-size: 1.15em; font-weight: 600; text-align: center; }
.sj-autre {
  margin-left: .4em;
  padding: 0;
  border: 0;
  background: none;
  font-size: 1em;
  cursor: pointer;
}

/* ---------- Cadre 3 : le livre et le chat bleu ---------- */

.c3 .livre-zone { position: relative; width: min(560px, 100%); justify-self: center; }
.c3 .cadre-texte { position: relative; }
.c3 .chat-bleu {             /* debout sur le titre */
  position: absolute;
  width: clamp(72px, 7vw, 100px);
  left: 6px;
  bottom: 100%;
  margin-bottom: -6px;
  z-index: 4;
}

/* ---------- Cadre 4 : le tableau blanc ---------- */

.tb {
  position: relative;
  justify-self: center;
  width: min(540px, 100%);
  aspect-ratio: 16 / 10;
  margin-bottom: 30px;      /* place pour le rebord des feutres */
  border: 14px solid var(--vert-fonce);
  border-radius: 18px;
  background: #FCFEFD;
  box-shadow: var(--ombre);
}
.tb::after {                 /* le rebord avec les feutres violet et rose */
  content: "";
  position: absolute;
  left: 14%; right: 14%;
  bottom: -26px;
  height: 12px;
  border-radius: 0 0 8px 8px;
  background:
    linear-gradient(90deg, transparent 8%, var(--violet) 8% 24%, transparent 24% 32%, var(--rose) 32% 44%, transparent 44%),
    var(--vert-fonce);
}
.tb-ecrit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3em;
  font-family: var(--f-titre);
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  line-height: 1.3;
  white-space: nowrap;
}
.tb-calc { color: var(--vert-fonce); }
.tb-rep { color: var(--violet); }
.tb-brosse {
  position: absolute;
  top: 30%;
  left: -20%;
  width: 18%;
  height: 40%;
  border-radius: 10px;
  background: linear-gradient(var(--violet) 0 40%, #EEE9F6 40%);
  box-shadow: 0 8px 12px -8px rgba(31, 77, 58, .6);
  opacity: 0;
}

/* ---------- Cadre 5 : Tatiana ---------- */

.c5 .cadre-grille { grid-template-columns: 1fr; max-width: 980px; }
.citation {
  margin: 0 0 32px;
  padding: 0 0 0 26px;
  border-left: 5px solid var(--rose);
  font-size: clamp(21px, 2.3vw, 30px);
  font-weight: 500;
  line-height: 1.4;
  max-width: 40ch;
}
.parcours {
  display: grid;
  gap: 0;
  max-width: 62ch;
  border-top: 2px solid rgba(31, 77, 58, .14);
}
.parcours li {
  padding: 14px 0 14px 34px;
  border-bottom: 2px solid rgba(31, 77, 58, .14);
  position: relative;
}
.parcours li::before {        /* une petite perle violette par ligne */
  content: "";
  position: absolute;
  left: 2px; top: 50%;
  width: 18px; height: 10px;
  margin-top: -5px;
  clip-path: polygon(0 50%, 21% 0, 79% 0, 100% 50%, 79% 100%, 21% 100%);
  background: var(--violet);
}

/* ---------- Cadre 6 : inscription ---------- */

.c6 { min-height: auto; scroll-snap-align: start; }
.c6 .cadre-grille { grid-template-columns: 1fr; max-width: 980px; }
.etapes {
  display: grid;
  gap: 18px;
  margin-top: 10px;
  counter-reset: etape;
}
.etapes li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: baseline;
}
.etape-num {
  font-family: var(--f-titre);
  font-size: 54px;
  line-height: 1;
  color: var(--violet);
  min-width: 1ch;
}
.etapes p { font-size: clamp(18px, 1.5vw, 21px); }
.note { margin-top: 22px; font-size: 16px; }

.pied {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 2px solid rgba(31, 77, 58, .14);
  font-size: 15px;
}
.pied ul { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-bottom: 8px; }
.pied a { font-weight: 600; text-decoration-color: var(--rose); text-underline-offset: 4px; }
.pied p { max-width: none; }
.page .pied { margin-top: 40px; padding-bottom: 110px; }
@media (min-width: 960px) { .page .pied { padding-bottom: 40px; } }

/* ---------- Le repère de navigation (bord droit) ---------- */

.nav-cadres {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 40;
  transform: translateY(-50%);
  display: none;
  transition: opacity .6s ease;
}
@media (min-width: 960px) { .nav-cadres { display: block; } }
.nav-cadres ol {
  position: relative;
  display: grid;
  gap: 6px;
}
.nav-cadres ol::before {      /* la tige */
  content: "";
  position: absolute;
  top: 8px; bottom: 8px;
  right: 20px;
  width: 3px;
  margin-right: -1.5px;
  border-radius: 2px;
  background: rgba(31, 77, 58, .25);
}
.ns-tige {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  height: 34px;
  text-decoration: none;
}
.ns-perle {
  flex: none;
  width: 40px;
  height: 18px;
  clip-path: polygon(0 50%, 21% 0, 79% 0, 100% 50%, 79% 100%, 21% 100%);
  background: linear-gradient(180deg, #8C6DC4, var(--violet) 49%, var(--violet-fonce) 51%, #5F4396);
  transition: transform .35s cubic-bezier(.3, 1.35, .5, 1);
}
.ns-tige[aria-current="true"] .ns-perle {
  background: linear-gradient(180deg, #F9A9C7, var(--rose) 49%, #D9628F 51%, #E5739E);
  transform: translateX(-8px) scale(1.12);
}
.ns-nom {
  order: -1;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--blanc);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.ns-tige:hover .ns-nom,
.ns-tige:focus-visible .ns-nom { opacity: 1; transform: none; }

/* ==========================================================
   Livre à feuilleter
   ========================================================== */

.livre-bloc { width: 100%; text-align: center; }
.livre {
  position: relative;
  width: min(640px, 100%);
  aspect-ratio: 2 / 1.3;
  margin: 0 auto;
  perspective: 2000px;
  transition: transform .8s cubic-bezier(.45, .05, .3, 1);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.livre.ferme { transform: translateX(-25%); }
.livre.fin   { transform: translateX(25%); }
.feuille {
  position: absolute;
  top: 0; left: 50%;
  width: 50%; height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.45, .05, .3, 1);
  cursor: pointer;
}
.feuille.tournee { transform: rotateY(-180deg); }
.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: #FFFFFF;
  border-radius: 4px 18px 18px 4px;
  box-shadow:
    inset 18px 0 22px -18px rgba(31, 77, 58, .28),
    0 18px 30px -20px rgba(31, 77, 58, .55);
}
.face.dos {
  transform: rotateY(180deg);
  border-radius: 18px 4px 4px 18px;
  box-shadow:
    inset -18px 0 22px -18px rgba(31, 77, 58, .28),
    0 18px 30px -20px rgba(31, 77, 58, .55);
}
.face.couverture { background: var(--violet); color: var(--blanc); }
.couverture-titre {
  font-family: var(--f-titre);
  font-size: clamp(1.2rem, 3.6vw, 1.9rem);
  line-height: 1.1;
}
.couverture img { width: 36%; }
.indice { font-size: .875rem; font-weight: 600; }
.syl-ligne { display: flex; gap: clamp(6px, 2vw, 14px); align-items: flex-end; }
.syl {
  font-weight: 600;
  font-size: clamp(2.4rem, 9vw, 4.6rem);
  line-height: 1;
  padding: 0 6px 10px;
  border-bottom: 5px solid var(--rose);
}
.syl.petite { font-size: clamp(1.8rem, 6.4vw, 3.3rem); }
.syl b { font-weight: 600; color: var(--violet); }
.decompo { font-size: clamp(.95rem, 2.4vw, 1.15rem); }
.decompo b { color: var(--violet); font-weight: 700; }
.face-consigne { font-size: clamp(.8rem, 2.1vw, .95rem); font-weight: 600; color: var(--violet); }
.face.fin-livre { background: var(--lilas); }
.fin-livre p {
  font-family: var(--f-titre);
  font-size: clamp(1rem, 2.8vw, 1.4rem);
  line-height: 1.15;
  max-width: 13ch;
  margin: 0;
}
.fin-livre .btn-wa { min-height: 44px; padding: 0 16px; font-size: 15px; }
.livre-commandes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}
.btn-rond {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--violet);
  background: var(--blanc);
  color: var(--violet);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.btn-rond:hover:not(:disabled) { background: var(--violet); color: var(--blanc); }
.btn-rond:disabled { opacity: .4; cursor: default; }
.btn-rond svg { width: 24px; height: 24px; }
.livre-page { min-width: 9ch; font-weight: 600; }

/* ==========================================================
   Les chats
   ========================================================== */

.chat {
  position: absolute;
  z-index: 2;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chat img { display: block; width: 100%; height: auto; pointer-events: none; }
.chat-bleu { animation: bleu-entre 2.8s cubic-bezier(.35, .1, .3, 1) .5s both; }
.chat-jaune { animation: jaune-entre 2.2s cubic-bezier(.35, .1, .3, 1) 1.9s both; }
.c3 .chat-bleu { animation: none; transform: translateX(120vw); }
.c3.actif .chat-bleu { animation: bleu-entre 2.8s cubic-bezier(.35, .1, .3, 1) .3s both; transform: none; }
@keyframes bleu-entre {
  0%   { transform: translateX(110vw) rotate(0); }
  12%  { transform: translateX(92vw) translateY(-6px) rotate(-3deg); }
  24%  { transform: translateX(76vw) translateY(0) rotate(2deg); }
  36%  { transform: translateX(60vw) translateY(-6px) rotate(-3deg); }
  48%  { transform: translateX(44vw) translateY(0) rotate(2deg); }
  58%  { transform: translateX(30vw) translateY(-70px) rotate(-8deg); }
  68%  { transform: translateX(16vw) translateY(0) rotate(3deg); }
  80%  { transform: translateX(6vw) translateY(-5px) rotate(-2deg); }
  90%  { transform: translateX(0) translateY(-14px) rotate(-4deg); }
  100% { transform: none; }
}
@keyframes jaune-entre {
  0%   { transform: translateX(-80vw); }
  20%  { transform: translateX(-60vw) translateY(-5px); }
  40%  { transform: translateX(-40vw) translateY(0); }
  60%  { transform: translateX(-20vw) translateY(-5px); }
  78%  { transform: translateX(-4vw) translateY(-46px); }
  90%  { transform: translateX(0) translateY(0) scaleY(.94); }
  100% { transform: none; }
}
.chat.balade { animation: chat-saute .8s cubic-bezier(.3, .2, .3, 1) !important; }
@keyframes chat-saute {
  0%   { transform: none; }
  25%  { transform: translateY(4px) scaleY(.94); }
  55%  { transform: translateY(-34px) rotate(-6deg); }
  80%  { transform: translateY(0) scaleY(.96); }
  100% { transform: none; }
}

/* ==========================================================
   Pages de cours (défilement normal)
   ========================================================== */

.page main { padding-top: var(--entete); }
.section { padding-block: clamp(48px, 8vw, 104px); }

.cours-hero {
  padding-top: clamp(56px, 9vw, 120px);
  text-align: center;
}
.cours-hero .scene-titre {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 clamp(72px, 14vw, 170px);
}
.cours-hero h1 { margin-bottom: 18px; }
.cours-hero p { margin-inline: auto; font-size: clamp(18px, 1.6vw, 22px); }
.cours-hero .actions { justify-content: center; }
.cours-hero .chat-jaune { width: clamp(64px, 11vw, 132px); left: 0; bottom: 0; }
.cours-hero .chat-bleu { width: clamp(80px, 14vw, 170px); right: 0; bottom: -6px; }

/* Le cours en bref : bloc lilas, définitions en deux colonnes */
.bref {
  padding: clamp(28px, 5vw, 64px);
  border-radius: 40px 40px 40px 8px;
  background: var(--lilas);
}
.bref h2 { margin-bottom: 26px; }
.bref dl { display: grid; gap: 0; margin: 0; }
.bref dt {
  font-family: var(--f-titre);
  font-size: 26px;
  line-height: 1.1;
  color: var(--violet);
  padding-top: 20px;
}
.bref dd { margin: 6px 0 0; padding-bottom: 20px; border-bottom: 2px solid rgba(110, 79, 163, .2); max-width: 62ch; }
.bref dd:last-child { border-bottom: 0; padding-bottom: 0; }
@media (min-width: 760px) {
  .bref dl { grid-template-columns: 220px 1fr; column-gap: 40px; }
  .bref dt, .bref dd { padding-block: 22px; margin: 0; border-bottom: 2px solid rgba(110, 79, 163, .2); }
  .bref dt:last-of-type, .bref dd:last-child { border-bottom: 0; }
}

.titre-centre { text-align: center; }
.titre-centre p { margin-inline: auto; }

/* Tarifs : un seul tableau Duo / Solo */
.grille-tarifs {
  width: 100%;
  max-width: 860px;
  margin: 32px auto 0;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--blanc);
  border-radius: var(--rayon);
  overflow: hidden;
  box-shadow: var(--ombre);
  text-align: left;
}
.grille-tarifs caption { text-align: left; }
.grille-tarifs th,
.grille-tarifs td { padding: 18px clamp(14px, 3vw, 28px); vertical-align: top; }
.grille-tarifs thead th {
  background: var(--lilas);
  font-weight: 400;
}
.grille-tarifs thead th h3 { margin: 0 0 4px; color: var(--violet); }
.grille-tarifs thead th span { display: block; font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--vert-fonce); }
.grille-tarifs tbody th { font-weight: 600; font-size: 17px; }
.grille-tarifs tbody tr + tr > * { border-top: 2px solid rgba(31, 77, 58, .1); }
.prix {
  font-family: var(--f-titre);
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1;
  color: var(--vert-fonce);
}
.prix small { display: block; font-family: var(--f-texte); font-size: 14px; }
@media (max-width: 559px) {
  .grille-tarifs, .grille-tarifs thead, .grille-tarifs tbody { display: block; }
  .grille-tarifs thead tr, .grille-tarifs tbody tr { display: grid; grid-template-columns: 1fr 1fr; }
  .grille-tarifs thead td { display: none; }
  .grille-tarifs tbody th { grid-column: 1 / -1; padding-bottom: 0; }
  .grille-tarifs tbody tr + tr > td { border-top: 0; }
}
.tarifs-note { max-width: 860px; margin: 22px auto 0; text-align: center; }
.tarifs-note p { margin-inline: auto; }

/* Questions */
.faq { max-width: 860px; margin-inline: auto; }
.faq details { border-bottom: 2px solid rgba(31, 77, 58, .14); }
.faq details:first-of-type { border-top: 2px solid rgba(31, 77, 58, .14); }
.faq summary {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 14px 4px;
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {        /* une perle : violette fermée, rose ouverte */
  content: "";
  flex: none;
  width: 26px; height: 13px;
  clip-path: polygon(0 50%, 21% 0, 79% 0, 100% 50%, 79% 100%, 21% 100%);
  background: var(--violet);
  transition: transform .25s;
}
.faq details[open] summary::before { background: var(--rose); transform: rotate(90deg); }
.faq summary:hover { color: var(--violet); }
.faq details p { padding: 0 4px 22px 46px; }

/* Appel final */
.appel {
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(32px, 6vw, 72px);
  border-radius: 8px 40px 40px 40px;
  background: var(--violet);
  color: var(--blanc);
  text-align: center;
}
.appel h2 { color: var(--blanc); }
.appel p { margin-inline: auto; font-size: clamp(18px, 1.6vw, 21px); }
.appel .actions { justify-content: center; }
.appel .btn-wa { box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.appel :focus-visible { outline-color: var(--blanc); }

/* Page « bientôt » */
.bientot { min-height: 100svh; display: grid; place-content: center; text-align: center; }
.bientot p { margin-inline: auto; }
.bientot .actions { justify-content: center; }

/* ==========================================================
   Mouvement réduit : rien ne bouge tout seul
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .sf-flotte, .sf-ombre, .logo-fixe, .bulles li { animation: none !important; }
  .chat-bleu, .chat-jaune, .c3 .chat-bleu { animation: none !important; transform: none !important; }
  html.album { scroll-snap-type: none; }
}

/* Poppins partout : les éléments en police de titre passent en extra-gras */
.sj-nombre, .tb-ecrit, .etape-num, .prix, .bref dt, .couverture-titre, .fin-livre p { font-weight: 800; }
.tb-ecrit { font-size: clamp(2.2rem, 8vw, 4rem); letter-spacing: -.02em; }
.bref dt { font-size: 22px; }

/* ==========================================================
   Page « Qui suis-je ? » : épurée, parcours + formations
   ========================================================== */

.moi-hero {
  padding-top: clamp(64px, 11vw, 140px);
  text-align: center;
}
.moi-hero .mention {
  margin: 0 auto 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rose-texte);
  font-weight: 600;
  font-size: clamp(14px, 1.3vw, 17px);
}
.moi-intro { margin-inline: auto; font-size: clamp(18px, 1.7vw, 22px); max-width: 58ch; }
.moi-accroche {
  margin: 18px auto 0;
  font-weight: 700;
  color: var(--violet);
  font-size: clamp(19px, 1.8vw, 23px);
}
.moi-valeurs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 22px auto 0;
  padding: 10px 20px;
  border-radius: 22px;
  background: var(--lilas);
  font-size: 16px;
  text-align: left;
  font-weight: 600;
  color: var(--violet-fonce);
  max-width: none;
}
.moi-valeurs::before {
  content: "";
  flex: none;
  width: 18px; height: 9px;
  clip-path: polygon(0 50%, 21% 0, 79% 0, 100% 50%, 79% 100%, 21% 100%);
  background: var(--rose);
}
h2.titre-centre { text-align: center; margin-bottom: clamp(28px, 4vw, 48px); }

/* --- La frise : une tige qui se remplit au défilement (--p de 0 à 1) --- */
.frise-anim {
  --p: 0;
  position: relative;
  display: grid;
  gap: 34px;
  max-width: 1100px;
  margin-inline: auto;
  padding-left: 46px;
}
.frise-anim::before,
.frise-anim::after {             /* la tige vide, puis la tige remplie */
  content: "";
  position: absolute;
  left: 13px; top: 14px; bottom: 14px;
  width: 4px;
  border-radius: 2px;
  background: rgba(31, 77, 58, .16);
}
.frise-anim::after {
  background: var(--violet);
  transform-origin: top;
  transform: scaleY(var(--p));
}
.frise-anim li { position: relative; }
.fa-perle {
  position: absolute;
  left: -46px; top: 4px;
  width: 30px; height: 16px;
  clip-path: polygon(0 50%, 21% 0, 79% 0, 100% 50%, 79% 100%, 21% 100%);
  background: var(--lilas);
  transform: scale(.75);
  transition: transform .45s cubic-bezier(.3, 1.5, .5, 1), background-color .3s;
  z-index: 1;
}
.fa-an {
  display: block;
  font-weight: 800;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.2;
  color: var(--violet);
}
.frise-anim p { margin: 4px 0 0; }
.frise-anim .fa-an,
.frise-anim p {
  opacity: .25;
  transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease;
}
.frise-anim li.atteint .fa-perle { background: var(--violet); transform: scale(1); }
.frise-anim li.atteint:last-child .fa-perle { background: var(--rose); }
.frise-anim li.atteint .fa-an,
.frise-anim li.atteint p { opacity: 1; transform: none; }

@media (min-width: 900px) {        /* frise horizontale */
  .frise-anim {
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    padding: 0;
    text-align: center;
  }
  .frise-anim::before,
  .frise-anim::after {
    left: 10%; right: 10%;
    top: 52px; bottom: auto;
    width: auto; height: 4px;
  }
  .frise-anim::after { transform-origin: left; transform: scaleX(var(--p)); }
  .frise-anim li { padding-top: 0; }
  .fa-an { height: 40px; }
  .fa-perle { position: relative; left: auto; top: auto; display: block; margin: 0 auto 18px; width: 40px; height: 22px; }
  .frise-anim p { max-width: 20ch; margin-inline: auto; }
}

/* « Voir plus » sous chaque étape */
.fa-plus { margin-top: 8px; }
.fa-plus summary {
  display: inline-block;
  list-style: none;
  padding: 6px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--violet);
  text-decoration: underline;
  text-decoration-color: var(--rose);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  cursor: pointer;
}
.fa-plus summary::-webkit-details-marker { display: none; }
.fa-plus .vp-moins,
.fa-plus[open] .vp-plus { display: none; }
.fa-plus[open] .vp-moins { display: inline; }
.fa-plus ul {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--lilas);
  font-size: 15px;
  line-height: 1.45;
  text-align: left;
}
.fa-plus li { position: relative; padding-left: 16px; }
.fa-plus li::before {
  content: "";
  position: absolute;
  left: 0; top: .6em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--violet);
}
.frise-anim li:not(.atteint) .fa-plus { visibility: hidden; }
@media (min-width: 900px) { .frise-anim { align-items: start; } }

/* --- Les formations : une liste qui se coche au défilement --- */
.formations {
  display: grid;
  gap: 0;
  max-width: 720px;
  margin-inline: auto;
}
.formations li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 2px solid rgba(31, 77, 58, .1);
}
.case {
  width: 32px; height: 32px;
  border-radius: 9px;
  border: 2.5px solid var(--violet);
  background: transparent;
  transition: background-color .3s ease;
}
.case path {
  fill: none;
  stroke: var(--blanc);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  transition: stroke-dashoffset .4s ease .1s;
}
.formations li.coche .case { background: var(--violet); }
.formations li.coche .case path { stroke-dashoffset: 0; }
.fo-texte { display: grid; gap: 2px; }
.fo-texte strong { font-weight: 600; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.35; }
.fo-an { font-size: 15px; font-weight: 600; color: var(--rose-texte); }
.fo-encours .case { border-style: dashed; border-color: var(--rose); }
.formations li.fo-encours.coche .case { background: transparent; }
.formations li.fo-encours.coche .case path { stroke-dashoffset: 22; }

@media (prefers-reduced-motion: reduce) {
  .frise-anim::after { transform: none; }
}

/* Bulles (langues) et citation de la page « Qui suis-je ? » */
.section-courte { padding-block: clamp(32px, 5vw, 64px) 0; }
.bulles-moi {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 18px;
}
.bulles-moi li {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: .6em 1.3em;
  border-radius: 999px;
  background: var(--lilas);
  color: var(--violet);
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 700;
  transform: rotate(var(--r, 0deg));
  box-shadow: 0 10px 20px -14px rgba(110, 79, 163, .8), inset 0 0 0 2px rgba(255, 255, 255, .7);
}
.bulles-moi li span {
  font-size: .78em;
  font-weight: 600;
  color: var(--rose-texte);
}
.citation-grande {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(24px, 6vw, 72px);
  border-radius: 40px 8px 40px 40px;
  background: var(--lilas);
  text-align: center;
}
.citation-grande p {
  margin: 0 auto;
  max-width: 34ch;
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--violet-fonce);
  text-wrap: balance;
}

/* Niveau de langue : 5 petites étoiles */
.etoiles { display: inline-flex; gap: 3px; align-self: center; margin-left: 4px; }
.etoiles i {
  width: 15px; height: 15px;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background: rgba(110, 79, 163, .25);
}
.etoiles i.pleine { background: var(--rose); }

/* Compétences clés : un bouton qui ouvre les bulles */
.competences-zone { text-align: center; }
.competences summary { list-style: none; }
.competences summary::-webkit-details-marker { display: none; }
.competences .vp-moins,
.competences[open] .vp-plus { display: none; }
.competences[open] .vp-moins { display: inline; }
.competences[open] summary { background: var(--violet); color: var(--blanc); }
.competences .bulles-moi { margin-top: 28px; max-width: 900px; margin-inline: auto; }
.competences[open] .bulles-moi li { animation: bulle-arrive .45s cubic-bezier(.3, 1.4, .5, 1) both; }
.competences[open] .bulles-moi li:nth-child(2) { animation-delay: .06s; }
.competences[open] .bulles-moi li:nth-child(3) { animation-delay: .12s; }
.competences[open] .bulles-moi li:nth-child(4) { animation-delay: .18s; }
.competences[open] .bulles-moi li:nth-child(5) { animation-delay: .24s; }
@keyframes bulle-arrive {
  from { opacity: 0; transform: translateY(12px) scale(.85) rotate(var(--r, 0deg)); }
  to   { opacity: 1; transform: rotate(var(--r, 0deg)); }
}
@media (max-width: 559px) {
  .bulles-moi li { border-radius: 20px; font-size: 16px; text-align: center; justify-content: center; }
  .competences summary { font-size: 17px; }
}

/* Bouton « Retour » en haut des pages intérieures */
.retour {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-bottom: 18px;
  padding: 0 16px 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: var(--violet);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset 0 0 0 2px var(--lilas);
}
.retour svg { width: 20px; height: 20px; }
.retour:hover { background: var(--lilas); }

/* La page affichée, signalée dans le sommaire */
.sommaire a[aria-current="page"] .titre { background-size: 100% 4px; }
.sommaire a[aria-current="page"] .num { color: var(--rose-texte); }

/* ==========================================================
   Page « Méthode Soroban »
   ========================================================== */

.sorob-hero { padding-top: clamp(56px, 9vw, 110px); text-align: center; }
.sorob-hero .mention {
  margin: 0 auto 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rose-texte);
  font-weight: 600;
  font-size: clamp(14px, 1.3vw, 17px);
}
.sorob-hero .sf { margin: clamp(26px, 4vw, 44px) auto 0; width: max-content; max-width: 100%; }
.sf-aide { margin: 6px auto 0; font-size: 15px; font-weight: 500; color: var(--violet); }
.sorob-hero .session { display: flex; width: max-content; }
.sorob-hero .actions { justify-content: center; }

/* La case explicative */
.explication {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: clamp(26px, 5vw, 56px);
  border-radius: 40px 40px 40px 8px;
  background: var(--lilas);
}
.explication h2 { margin-bottom: 18px; }
.explication p { max-width: 54ch; }
.explication .sj { background: var(--blanc); }
.legende { display: grid; gap: 10px; margin: 4px 0 18px; }
.legende li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.legende strong { color: var(--violet); font-size: 1.15em; }
.legende-perle {
  flex: none;
  width: 40px; height: 20px;
  clip-path: polygon(0 50%, 21% 0, 79% 0, 100% 50%, 79% 100%, 21% 100%);
  background: linear-gradient(180deg, #8C6DC4, var(--violet) 49%, var(--violet-fonce) 51%, #5F4396);
}
.legende-perle.haut { background: linear-gradient(180deg, #F9A9C7, var(--rose) 49%, #D9628F 51%, #E5739E); }
@media (min-width: 960px) {
  .explication { grid-template-columns: 1.1fr .9fr; }
  .explication .sj { font-size: clamp(11px, min(1.1vw, 1.5svh), 15px); }
}

/* Frise de l'origine : 4 étapes */
@media (min-width: 900px) {
  .frise-anim.frise-4 { grid-template-columns: repeat(4, 1fr); }
  .frise-anim.frise-4::before,
  .frise-anim.frise-4::after { left: 12.5%; right: 12.5%; }
  .frise-4 p { max-width: 24ch; }
}

/* Les deux niveaux, comme deux marches */
.titre-centre-texte { text-align: center; margin: -18px auto 30px; }
.niveaux {
  display: grid;
  gap: 18px;
  max-width: 820px;
  margin-inline: auto;
}
.niveaux li {
  position: relative;
  padding: 26px 28px 26px 96px;
  border-radius: 24px;
  background: var(--blanc);
  box-shadow: var(--ombre);
}
.niveaux li + li { background: var(--lilas); }
.niveau-num {
  position: absolute;
  left: 26px; top: 50%;
  transform: translateY(-50%);
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
  color: var(--violet);
}
.niveaux h3 { margin-bottom: 4px; }
.niveaux p { margin: 0; }
@media (min-width: 760px) {
  .niveaux { grid-template-columns: 1fr 1fr; align-items: end; }
  .niveaux li + li { transform: translateY(-22px); }   /* la 2e marche est plus haute */
}

.sorob-prof { text-align: center; margin: 0 auto 10px; font-size: clamp(18px, 1.6vw, 21px); max-width: 52ch; }

/* Case explicative : chapo court et 3 preuves chiffrées */
.explication-chapo { font-size: clamp(18px, 1.6vw, 21px); font-weight: 500; }
.preuves {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
}
.preuves li {
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .75);
}
.preuves strong {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--violet);
}
.preuves span { font-size: 16px; line-height: 1.45; }
.preuves small { font-size: 13px; color: #4A6A5B; }
.preuves cite { font-style: italic; }
@media (min-width: 700px) {
  .preuves { grid-template-columns: repeat(3, 1fr); }
}

/* Page Soroban, version regroupée */
body[data-page="soroban"] .section { padding-block: clamp(36px, 5vw, 72px); }
.vrai-soroban { margin: 18px 0 0; }
.vrai-soroban img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 16px 30px -20px rgba(31, 77, 58, .7);
}
.vrai-soroban figcaption { display: grid; gap: 6px; margin-top: 12px; }
.legende-ligne { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.legende-ligne strong { color: var(--violet); }
.vrai-soroban small { font-size: 12px; color: #4A6A5B; }
.vrai-soroban small a { color: inherit; }

.cours-deux {
  display: grid;
  gap: 32px;
  margin-top: 36px;
}
.cours-deux h3 { color: var(--violet); text-transform: uppercase; font-size: 22px; }
.petit-texte { font-size: 16px; margin-bottom: 14px; }
.cours-deux .niveaux { grid-template-columns: 1fr; gap: 12px; max-width: none; }
.cours-deux .niveaux li { padding: 16px 18px 16px 70px; transform: none; }
.cours-deux .niveau-num { left: 20px; font-size: 38px; }
.niveaux h4 { margin: 0 0 2px; font-size: 18px; font-weight: 700; }
.cours-deux .formations { max-width: none; }
.cours-deux .formations li { padding: 12px 0; }
@media (min-width: 900px) {
  .cours-deux { grid-template-columns: 1fr 1fr; gap: 56px; }
}

.tarif-teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 24px;
  margin-top: 36px;
  padding: 22px;
  border-radius: 22px;
  background: var(--lilas);
  text-align: center;
}
.tarif-teaser p { margin: 0; font-size: 19px; }
.tarif-teaser strong { color: var(--violet); font-weight: 800; }

/* Sur téléphone, le soroban qui flotte en haut suffit pour jouer : la page reste courte */
@media (max-width: 959px) {
  body[data-page="soroban"] .explication .sj { display: none; }
}

/* « la méthode Soroban » mis en avant dans les phrases */
strong.ms { font-weight: 700; color: var(--violet); background: linear-gradient(transparent 70%, rgba(240, 127, 170, .35) 70% 94%, transparent 94%); }
.preuves strong.ms { font-size: inherit; line-height: inherit; }

/* Soroban : la photo à droite de l'explication, le soroban qui flotte en exemple à la fin */
.explication .vrai-soroban { margin: 0; align-self: center; }
.essai .sf { margin: 10px auto 0; width: max-content; max-width: 100%; }
.essai .titre-centre-texte { margin-top: -14px; }

.bulles-hero { margin: 8px auto 4px; }

/* Preuves en petits carrés alignés */
.preuves { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preuves li {
  aspect-ratio: 1;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 10px;
  border-radius: 16px;
}
.preuves strong { font-size: clamp(16px, 1.8vw, 24px); }
.preuves span { font-size: clamp(11px, 1vw, 14px); line-height: 1.35; }
.preuves small { font-size: clamp(9px, .8vw, 11px); line-height: 1.3; margin-top: 4px; }
@media (min-width: 960px) {
  .preuves { max-width: 640px; justify-self: start; }
}

/* Le jeu sous le soroban d'essai */
.jeu-question { text-align: center; font-size: clamp(19px, 1.8vw, 23px); font-weight: 600; margin: -6px auto 4px; }
.jeu-consigne { text-align: center; font-size: 15px; margin: 0 auto 28px; color: var(--violet); font-weight: 500; }
.jeu-question strong { font-size: 1.5em; font-weight: 800; color: var(--violet); }
.jeu-etat { text-align: center; margin: 4px auto 0; font-weight: 600; min-height: 1.6em; }
.jeu-etat.gagne { color: var(--rose-texte); }
.jeu-autre { border: 0; background: none; padding: 0; cursor: pointer; font-size: inherit; }
.jeu-legende {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin-top: 18px;
}
.explication { grid-template-columns: minmax(0, 1fr); }
.explication > * { min-width: 0; }
.preuves li { min-width: 0; }
@media (min-width: 960px) {
  .explication { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
}
@media (max-width: 559px) {
  .preuves { gap: 6px; }
  .preuves li { aspect-ratio: auto; padding: 12px 6px; }
  .preuves strong { font-size: 15px; }
  .preuves span { font-size: 11px; }
}

/* Noms des tiges sous le soroban qui flotte */
.sf-noms {
  position: absolute;
  left: -.85em; right: -.85em;
  top: calc(100% + 1.25em);
  display: flex;
  gap: .55em;
  padding: 0 1.95em;
}
.sf-noms span { width: 3.3em; flex: none; text-align: center; }
.sf-noms b { font-size: .6em; font-weight: 600; color: var(--violet); white-space: nowrap; }
.essai .sf-ombre { margin-top: 3.6em; }
.jeu-regle { text-align: center; margin: 14px auto 0; font-size: 16px; max-width: 46ch; }
.jeu-regle strong { color: var(--violet); }
.jeu-indice { border: 0; background: none; padding: 6px 0; cursor: pointer; font-size: 16px; }
.jeu-astuce {
  max-width: 46ch;
  margin: 8px auto 0;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--lilas);
  text-align: center;
  font-weight: 500;
}

/* Mode jeu : on vise les perles au clic */
.sf-jeu .perle { cursor: pointer; }
.sf-jeu .perle:hover { filter: brightness(1.15); }
.sf-noms b { font-size: .72em; }
.sf-jeu .sf-flotte { animation-name: sf-flotte-doux; }
@keyframes sf-flotte-doux {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-.35em); }
}

/* ==========================================================
   Page « Tables de multiplication »
   ========================================================== */
.explication .tb { justify-self: center; background: #FCFEFD; }
.formule {
  padding: 24px;
  border-radius: 24px;
  background: var(--blanc);
  box-shadow: var(--ombre);
}
.formule-solo { background: var(--lilas); }
.formule .formations li { border-bottom-color: rgba(110, 79, 163, .15); }
.groupes { display: grid; gap: 8px; margin: 4px 0 16px; }
.groupes li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.groupe-qui {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--lilas);
  color: var(--violet);
  font-weight: 700;
  font-size: 15px;
}
.defi {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 24px;
  border-radius: 28px;
  background: var(--blanc);
  box-shadow: var(--ombre);
  text-align: center;
}
.defi-question { margin: 0 auto 18px; font-size: clamp(34px, 5vw, 52px); font-weight: 800; color: var(--vert-fonce); }
.defi-trou { color: var(--rose-texte); }
.defi-trou.trouve { color: var(--violet); }
.defi-choix { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.defi-btn {
  min-width: 84px;
  min-height: 56px;
  border: 2px solid var(--violet);
  border-radius: 18px;
  background: var(--blanc);
  color: var(--violet);
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
}
.defi-btn:hover:not(:disabled) { background: var(--lilas); }
.defi-btn.juste { background: var(--violet); color: var(--blanc); }
.defi-btn.faux { border-color: var(--rose); color: var(--rose-texte); opacity: .6; }
.defi .jeu-etat { margin-top: 16px; }
.citation-courte {
  margin: 28px auto 0;
  text-align: center;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 700;
  color: var(--violet);
}
.valeurs-note { margin-top: 26px; font-weight: 500; }

/* Tableau blanc : un nuage de multiplications */
.tb { overflow: hidden; }
.tb-nuage { position: absolute; inset: 0; }
.tb-mult {
  position: absolute;
  white-space: nowrap;
  font-weight: 800;
  font-size: calc(clamp(12px, 1.6vw, 20px) * var(--taille, 1));
  transform: rotate(var(--rot, 0deg));
  transform-origin: left center;
  letter-spacing: -.01em;
}
.tb-mult.c1 { color: var(--vert-fonce); }
.tb-mult.c2 { color: var(--violet); }
.tb-mult.c3 { color: var(--rose-texte); }
.tb-brosse { z-index: 2; }
@media (max-width: 559px) { .tb-mult { font-size: calc(3.2vw * var(--taille, 1)); } }

/* La pastille « valeurs », centrée partout */
.moi-valeurs { display: flex; width: fit-content; max-width: 100%; margin-inline: auto; }

/* Livre Paf et Lila : les étapes de la lecture */
.etape {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--lilas);
  color: var(--violet);
  font-size: clamp(.65rem, 1.8vw, .85rem);
  font-weight: 700;
}
.son { font-size: clamp(3.4rem, 12vw, 6rem); font-weight: 800; line-height: 1; color: var(--violet); }
.lettre { font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 700; }
.lettre.voy { color: var(--violet); }
.plus { font-size: clamp(1.2rem, 4vw, 2rem); color: var(--rose-texte); font-weight: 700; align-self: center; }
.syl-grille {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  font-size: clamp(1.6rem, 5.4vw, 2.8rem);
  font-weight: 700;
}
.syl-grille span {
  padding: 2px 12px;
  border-bottom: 4px solid var(--rose);
  text-align: center;
}
.syl-grille b, .phrase-livre b, .mot b { color: var(--violet); font-weight: 700; }
.mot { font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 800; color: var(--vert-fonce); }
.phrase-livre { font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 700; }
.page-chat { width: 26%; height: auto; }

/* La vraie couverture du livre Paf et Lila */
.face.couverture-vraie { padding: 0; overflow: hidden; background: #fff; }
.couverture-vraie img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.couverture-vraie .indice {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--violet);
  color: var(--blanc);
  white-space: nowrap;
}

/* Vignette « Dès 5 ans » collée près du titre */
.scene-titre { position: relative; }
.vignette-age {
  position: absolute;
  right: clamp(56px, 12vw, 150px);
  top: -18px;
  display: grid;
  place-items: center;
  width: clamp(62px, 7vw, 84px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2.5px dashed var(--violet);
  background: var(--lilas);
  color: var(--violet);
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  transform: rotate(12deg);
  box-shadow: 0 8px 16px -10px rgba(110, 79, 163, .8);
  z-index: 3;
}
@media (max-width: 559px) { .vignette-age { right: 4px; top: -34px; } }
@media (min-width: 560px) { .vignette-age { top: -72px; right: 22%; } }
.formule-lien { margin: 14px 0 0; }
.faq details p + p { margin-top: -10px; }

/* Page Cours particuliers */
.particulier-bloc { margin-bottom: 26px; }
.particulier-bloc h2 { font-size: clamp(26px, 3vw, 36px); }
.cours-liens { display: grid; gap: 12px; }
.cours-liens a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--blanc);
  font-weight: 700;
  text-decoration: none;
  color: var(--violet);
}
.cours-liens a::before {
  content: "";
  flex: none;
  width: 22px; height: 11px;
  clip-path: polygon(0 50%, 21% 0, 79% 0, 100% 50%, 79% 100%, 21% 100%);
  background: var(--rose);
}
.cours-liens a:hover { background: var(--violet); color: var(--blanc); }
@media (min-width: 960px) { .particulier-bloc { grid-template-columns: 1fr 1fr; } }
.tarif-teaser strong { white-space: nowrap; }

/* ==========================================================
   Page « Tarifs »
   ========================================================== */
.raccourcis {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.raccourcis a {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--lilas);
  color: var(--violet);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.raccourcis a:hover { background: var(--violet); color: var(--blanc); }
html { scroll-padding-top: calc(var(--entete) + 16px); }

.section-tarif { padding-block: clamp(36px, 5vw, 64px) 0; }
.section-tarif h2 { text-align: center; font-size: clamp(28px, 3.4vw, 44px); margin-bottom: 6px; }
.tarif-sous-titre { text-align: center; margin: 0 auto; max-width: 52ch; }
.section-tarif .grille-tarifs { margin-top: 22px; }
.tarif-note { text-align: center; margin: 18px auto 0; }
.tarif-note strong { color: var(--violet); }
.tarif-lien { text-align: center; margin: 14px auto 0; }

.tarif-unique {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 40px;
  max-width: 860px;
  margin: 22px auto 0;
  padding: 24px;
  border-radius: var(--rayon);
  background: var(--blanc);
  box-shadow: var(--ombre);
}
.tarif-unique ul { display: grid; gap: 6px; font-weight: 500; }
.tarif-unique li { padding-left: 18px; position: relative; }
.tarif-unique li::before {
  content: "";
  position: absolute;
  left: 0; top: .6em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--rose);
}

/* ==========================================================
   Page « Contacter »
   ========================================================== */
.contact-bloc { align-items: start; }
.contact-bloc h2 { font-size: clamp(26px, 3vw, 36px); }
.form-contact {
  display: grid;
  gap: 8px;
  padding: 22px;
  border-radius: 22px;
  background: var(--blanc);
  box-shadow: var(--ombre);
}
.form-contact label { font-weight: 600; font-size: 16px; margin-top: 6px; }
.facultatif { font-weight: 400; color: #4A6A5B; }
.form-contact input,
.form-contact select,
.form-contact textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid rgba(110, 79, 163, .3);
  border-radius: 14px;
  background: #FCFEFD;
  font: inherit;
  font-size: 17px;
  color: var(--vert-fonce);
}
.form-contact textarea { resize: vertical; }
.form-contact :is(input, select, textarea):focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(110, 79, 163, .2); }
.form-contact [aria-invalid="true"] { border-color: var(--rose-texte); }
.form-erreur { margin: 6px 0 0; color: var(--rose-texte); font-weight: 600; }
.form-contact .btn-wa { margin-top: 12px; justify-self: start; }
.etapes-contact { max-width: 760px; margin-inline: auto; margin-bottom: 30px; }
@media (min-width: 960px) { .contact-bloc { grid-template-columns: .9fr 1.1fr; } }

/* ==========================================================
   Version PDF / impression
   ========================================================== */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { background: #fff !important; }
  body::before, body::after { display: none !important; }
  .entete, .wa-barre, .rideau, .classeur, .retour, .outil-pdf, .lien-evitement,
  .essai, .livre-commandes, .raccourcis, .competences summary, .fa-plus summary,
  .tarif-teaser .btn-ligne, svg.sr-only { display: none !important; }
  .page main { padding-top: 0; }
  .sorob-hero, .moi-hero, .cours-hero { padding-top: 0 !important; }
  .section, .section-courte, .section-tarif { padding-block: 18px !important; }
  h1 { font-size: 34px !important; }
  h2 { font-size: 24px !important; }
  .grille-tarifs, .tarif-unique, .preuves li, .vrai-soroban,
  .frise-anim li, .formations li, .faq details, .niveaux li { break-inside: avoid; }
  *, *::before, *::after { box-shadow: none !important; filter: none !important; }
  h2, h3 { break-after: avoid; }
  .bulles-moi li, .vignette-age { box-shadow: none; }
  .frise-anim .fa-an, .frise-anim p { opacity: 1 !important; transform: none !important; }
  .fa-plus ul { display: grid !important; }
  .competences .bulles-moi { display: flex !important; }
  .appel { padding: 22px !important; }
  .pied { padding-bottom: 0 !important; }
  .chat { animation: none !important; transform: none !important; }
}

/* Retour + Télécharger en PDF, en haut des pages */
.outils-page {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.outils-page .retour { margin-bottom: 0; }
.outil-pdf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  box-shadow: inset 0 0 0 2px var(--lilas);
  color: var(--violet);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.outil-pdf svg { width: 18px; height: 18px; }
.outil-pdf:hover { background: var(--lilas); }
@media print { .outils-page { display: none !important; } }

/* Mentions légales */
.legal { max-width: 760px; }
.legal h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 34px 0 10px; }
.legal p, .legal li { font-size: 17px; }
.legal ul { display: grid; gap: 6px; margin: 0 0 1em; padding-left: 20px; list-style: disc; }
.a-remplir { background: rgba(240, 127, 170, .25); color: var(--rose-texte); padding: 0 4px; border-radius: 4px; font-weight: 600; }

/* Crédit « Site créé par DA KOM » */
.credit { margin: 4px 0 0; font-size: 13px; color: #4A6A5B; }
.credit a { color: inherit; font-weight: 600; text-decoration-color: var(--rose); text-underline-offset: 3px; }
.credit-accueil {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(14px + env(safe-area-inset-bottom));
  text-align: center;
  max-width: none;
}
@media (max-width: 959px) { .credit-accueil { bottom: calc(80px + env(safe-area-inset-bottom)); } }
