/* ==========================================================================
   Grandis avec nous — feuille de style principale
   Direction artistique : « cahier de dessin magique »
   Création et direction artistique : Toni Megha
   ========================================================================== */

/* ---------- 1. Polices (libres, licence SIL OFL, hébergées localement) ---------- */
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-italic.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: italic;
  font-display: swap;
}

/* ---------- 2. Palette et variables ---------- */
:root {
  /* Couleurs relevées sur les logos officiels */
  --bleu: #1e88e5;
  --turquoise: #14b8b0;
  --jaune: #ffc93c;
  --orange: #ff8a1f;
  --rose: #ff4f9a;
  --violet: #8e44d9;
  --vert: #43c04b;
  --marine: #1b2a6b;
  --creme: #fff9ee;
  --blanc: #ffffff;

  /* Variantes foncées : fonds de boutons avec texte blanc (contraste ≥ 4,5:1) */
  --bleu-f: #1460b8;
  --turquoise-f: #0b6f69;
  --orange-f: #a8460a;
  --rose-f: #b8165a;
  --violet-f: #6a2db5;
  --vert-f: #22702a;

  --texte: #1b2a6b;
  --texte-doux: #43507f;

  /* Couleur d'univers (redéfinie par page) */
  --accent: var(--bleu);
  --accent-f: var(--bleu-f);
  --accent-2: var(--jaune);
  --teinte: #eaf4ff;

  --rayon: 28px;
  --rayon-s: 18px;
  --ombre: 0 10px 0 -2px rgba(27, 42, 107, 0.12), 0 18px 40px -18px rgba(27, 42, 107, 0.35);
  --contour: 0 0 0 6px var(--blanc), 0 0 0 9px var(--marine);
  --arc: linear-gradient(90deg, #ef4444, #ff8a1f, #ffc93c, #43c04b, #1e88e5, #8e44d9, #ff4f9a);
  --largeur: 1200px;
  --header-h: 76px;
}

/* Palettes secondaires par univers */
.theme-dessine   { --accent: var(--orange);   --accent-f: var(--orange-f);   --accent-2: var(--jaune);  --teinte: #fff1e2; }
.theme-nature    { --accent: var(--vert);     --accent-f: var(--vert-f);     --accent-2: var(--jaune);  --teinte: #ecf8e2; }
.theme-animaux   { --accent: #c97a2b;         --accent-f: #8a4b10;           --accent-2: #8fc54a;       --teinte: #fbf0e1; }
.theme-ecris     { --accent: var(--bleu);     --accent-f: var(--bleu-f);     --accent-2: var(--jaune);  --teinte: #e8f2ff; }
.theme-halloween { --accent: var(--violet);   --accent-f: var(--violet-f);   --accent-2: var(--orange); --teinte: #f1e8fb; }
.theme-noezoe    { --accent: var(--orange);   --accent-f: var(--orange-f);   --accent-2: var(--rose);   --teinte: #fdeedd; }
.theme-livres    { --accent: var(--rose);     --accent-f: var(--rose-f);     --accent-2: var(--orange); --teinte: #fdebf2; }
.theme-reseaux   { --accent: var(--turquoise);--accent-f: var(--turquoise-f);--accent-2: var(--rose);   --teinte: #e3f7f5; }

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--texte);
  background-color: var(--creme);
  /* papier : léger grain de points */
  background-image:
    radial-gradient(rgba(27, 42, 107, 0.045) 1px, transparent 1.4px),
    radial-gradient(rgba(255, 201, 60, 0.08) 1px, transparent 1.4px);
  background-size: 22px 22px, 37px 37px;
  background-position: 0 0, 11px 7px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-f); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 {
  font-family: "Fredoka", "Nunito", system-ui, sans-serif;
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  color: var(--marine);
}
h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

:focus-visible {
  outline: 4px solid var(--marine);
  outline-offset: 3px;
  border-radius: 12px;
  box-shadow: 0 0 0 7px var(--jaune);
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 1000;
  background: var(--marine); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(100% - 32px, var(--largeur)); margin-inline: auto; }
.section { padding-block: clamp(48px, 8vw, 96px); position: relative; }
.section--teinte { background: var(--teinte); }
.center { text-align: center; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--texte-doux); max-width: 46ch; }
.center .lead { margin-inline: auto; }

/* ---------- 4. Fil conducteur arc-en-ciel ---------- */
.arc-line { display: block; width: min(320px, 70%); height: 26px; margin: 4px 0 18px; overflow: visible; }
.center .arc-line { margin-inline: auto; }
.arc-line path {
  fill: none; stroke: url(#arcGrad); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 420; stroke-dashoffset: 420;
  transition: stroke-dashoffset 1.6s cubic-bezier(.22,.8,.3,1);
}
.arc-line.is-drawn path { stroke-dashoffset: 0; }
.rainbow-bar { height: 8px; background: var(--arc); border-radius: 99px; }

.kicker {
  display: inline-block; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: .95rem;
  letter-spacing: .02em; color: var(--accent-f); background: var(--blanc);
  padding: 6px 16px; border-radius: 99px; box-shadow: 0 0 0 3px var(--accent); margin-bottom: 14px;
}

/* ---------- 5. Boutons ---------- */
.btn {
  --b: var(--accent-f);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 12px 26px;
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.15rem; line-height: 1.1;
  color: #fff; background: var(--b); text-decoration: none; border: 0; cursor: pointer;
  border-radius: 99px;
  box-shadow: 0 6px 0 0 var(--marine);
  transform: translateY(0);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 9px 0 0 var(--marine); filter: saturate(1.15); }
.btn:active, .btn.is-boing { animation: boing .45s cubic-bezier(.3,1.6,.5,1); }
.btn--jaune { --b: var(--jaune); color: var(--marine); }
.btn--blanc { --b: var(--blanc); color: var(--marine); }
.btn--bleu { --b: var(--bleu-f); }
.btn--rose { --b: var(--rose-f); }
.btn--vert { --b: var(--vert-f); }
.btn--violet { --b: var(--violet-f); }
.btn--turquoise { --b: var(--turquoise-f); }
.btn--orange { --b: var(--orange-f); }
.btn--youtube { --b: #c4302b; }
.btn--facebook { --b: #1460b8; }
.btn--tiktok { --b: #111111; }
.btn--sm { min-height: 46px; padding: 8px 18px; font-size: 1rem; box-shadow: 0 4px 0 0 var(--marine); }
.btn[aria-disabled="true"], .btn:disabled {
  --b: #e4e1d9; color: #4f566e; box-shadow: 0 4px 0 0 #b9b4a7; cursor: not-allowed; filter: none; transform: none;
}
.btn svg { width: 24px; height: 24px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px 18px; align-items: center; }
.center .btn-row { justify-content: center; }

@keyframes boing {
  0% { transform: scale(1); } 30% { transform: scale(.92); } 60% { transform: scale(1.06); } 100% { transform: scale(1); }
}

/* ---------- 6. Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 249, 238, 0.94);
  backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 3px solid transparent;
  border-image: var(--arc) 1;
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; flex: none; }
.brand img { width: 64px; height: 64px; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.brand:hover img { transform: rotate(-6deg) scale(1.06); }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  display: block; padding: 9px 13px; border-radius: 99px; text-decoration: none;
  font-family: "Fredoka", sans-serif; font-weight: 500; font-size: 1rem; color: var(--marine);
  transition: background .2s, color .2s, transform .2s;
}
.main-nav a:hover { background: var(--blanc); transform: translateY(-2px); box-shadow: 0 0 0 2px var(--marine); }
.main-nav a[aria-current="page"] { background: var(--marine); color: #fff; }

.menu-toggle {
  display: none; margin-left: auto; align-items: center; gap: 10px;
  min-height: 52px; padding: 8px 18px 8px 14px; border-radius: 99px; border: 0; cursor: pointer;
  background: var(--marine); color: #fff; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.1rem;
}
.menu-toggle .bars { width: 26px; height: 18px; position: relative; }
.menu-toggle .bars span {
  position: absolute; left: 0; width: 100%; height: 3px; border-radius: 3px; background: #fff;
  transition: transform .3s, opacity .3s, top .3s;
}
.menu-toggle .bars span:nth-child(1) { top: 0; }
.menu-toggle .bars span:nth-child(2) { top: 7.5px; }
.menu-toggle .bars span:nth-child(3) { top: 15px; }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(1) { top: 7.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(3) { top: 7.5px; transform: rotate(-45deg); }

@media (max-width: 1099px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    background: var(--creme); overflow-y: auto; padding: 20px 16px 40px;
    visibility: hidden; opacity: 0; transform: translateY(-12px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  .main-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .25s ease, transform .25s ease; }
  .main-nav ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 640px; margin-inline: auto; }
  .main-nav li:first-child { grid-column: 1 / -1; }
  .main-nav a {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 68px; font-size: 1.2rem; font-weight: 600; border-radius: var(--rayon-s);
    color: #fff; background: var(--c, var(--bleu-f)); box-shadow: 0 5px 0 0 var(--marine);
  }
  .main-nav a:hover { box-shadow: 0 7px 0 0 var(--marine); }
  .main-nav a[aria-current="page"] { outline: 4px solid var(--jaune); outline-offset: 2px; background: var(--c, var(--marine)); }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 420px) { .main-nav ul { grid-template-columns: 1fr; } .menu-toggle .label { display: none; } .menu-toggle { padding-right: 14px; } }

/* ---------- 7. Décors flottants ---------- */
.floaties { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.floaty { position: absolute; width: var(--s, 34px); height: var(--s, 34px); opacity: .9;
  animation: flotte var(--d, 9s) ease-in-out var(--del, 0s) infinite alternate; }
.floaty svg { width: 100%; height: 100%; display: block; }
@keyframes flotte {
  0%   { transform: translate(0, 0) rotate(-8deg); }
  50%  { transform: translate(6px, -14px) rotate(6deg); }
  100% { transform: translate(-4px, 8px) rotate(-3deg); }
}
.twinkle { animation: scintille 3.4s ease-in-out infinite; transform-origin: center; }
@keyframes scintille { 0%,100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }

/* ---------- 8. Hero ---------- */
.hero { position: relative; padding-block: clamp(28px, 6vw, 72px) clamp(40px, 7vw, 88px); overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.hero-home .wrap { display: grid; gap: clamp(16px, 4vw, 48px); align-items: center; grid-template-columns: 1fr; text-align: center; }
.hero-home .hero-logo { width: min(520px, 88vw); margin-inline: auto; filter: drop-shadow(0 18px 24px rgba(27,42,107,.18)); }
.hero-home h1 { font-size: clamp(1.9rem, 5vw, 3.3rem); max-width: 18ch; margin-inline: auto; }
.hero-home .btn-row { justify-content: center; }
@media (min-width: 960px) {
  .hero-home .wrap { grid-template-columns: 1.05fr 1fr; text-align: left; }
  .hero-home h1 { margin-inline: 0; }
  .hero-home .btn-row { justify-content: flex-start; }
  .hero-home .hero-visual { order: 2; }
}

.hero-page .wrap { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (min-width: 900px) { .hero-page .wrap { grid-template-columns: 1fr 1.1fr; } }
.hero-page .hero-text { order: 2; }
@media (min-width: 900px) { .hero-page .hero-text { order: 1; } .hero-page .hero-visual { order: 2; } }

/* apparition douce */
.pop-in { animation: popIn .9s cubic-bezier(.3,1.5,.5,1) both; animation-delay: var(--del, 0s); }
@keyframes popIn { from { opacity: 0; transform: translateY(26px) scale(.94); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .8s ease both; animation-delay: var(--del, 0s); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.bob { animation: bob 5.5s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-10px) rotate(.6deg); } }

/* ---------- 9. Cadres « autocollant » ---------- */
.sticker {
  position: relative; background: var(--blanc); border-radius: var(--rayon);
  box-shadow: var(--contour), var(--ombre);
}
.sticker-frame {
  position: relative; border-radius: var(--rayon); overflow: hidden; background: var(--teinte);
  box-shadow: var(--contour), var(--ombre); transform: rotate(var(--rot, -1.2deg));
}
.sticker-frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; }
.sticker-frame.is-scene img { object-fit: cover; }
.sticker-frame--plain { background: transparent; box-shadow: none; overflow: visible; transform: none; }
.sticker-frame--plain img { filter: drop-shadow(0 16px 22px rgba(27,42,107,.2)); }

/* ---------- 10. Cartes univers ---------- */
.cards { display: grid; gap: clamp(26px, 3.5vw, 40px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.card {
  --rot: 0deg;
  position: relative; display: flex; flex-direction: column;
  background: var(--blanc); border-radius: var(--rayon);
  box-shadow: var(--contour), var(--ombre);
  transform: rotate(var(--rot));
  transition: transform .35s cubic-bezier(.3,1.5,.5,1), box-shadow .35s ease;
}
.card:nth-child(4n+1) { --rot: -1.1deg; }
.card:nth-child(4n+2) { --rot: .9deg; }
.card:nth-child(4n+3) { --rot: -.6deg; }
.card:nth-child(4n+4) { --rot: 1.2deg; }
.card:hover, .card:focus-within { transform: rotate(0deg) translateY(-8px) scale(1.02); box-shadow: 0 0 0 6px var(--blanc), 0 0 0 9px var(--c, var(--marine)), 0 26px 40px -16px rgba(27,42,107,.45); }
.card-media {
  position: relative; border-radius: calc(var(--rayon) - 6px) calc(var(--rayon) - 6px) 0 0; overflow: hidden;
  background: var(--t, var(--teinte)); aspect-ratio: 16 / 10; margin: 6px 6px 0;
}
.card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s cubic-bezier(.3,1.4,.5,1); }
.card-media.is-scene img { object-fit: cover; }
.card:hover .card-media img { transform: scale(1.06) rotate(-1deg); }
.card-body { padding: 16px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 1.35rem; margin: 0; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--rayon); z-index: 1; }
.card-text { margin: 0; color: var(--texte-doux); font-size: 1rem; }
.card .btn { margin-top: auto; align-self: flex-start; position: relative; z-index: 2; pointer-events: none; }
.card-tag {
  position: absolute; top: 14px; left: 14px; z-index: 2; background: var(--blanc); color: var(--marine);
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: .85rem; padding: 4px 12px; border-radius: 99px;
  box-shadow: 0 0 0 2px var(--marine);
}
.card-social { display: flex; gap: 12px; align-items: center; justify-content: center; height: 100%; }
.card-social span { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; box-shadow: 0 0 0 4px #fff, 0 6px 14px rgba(0,0,0,.15); }
.card-social svg { width: 34px; height: 34px; }

/* ---------- 11. Emplacements en attente d'un visuel officiel ---------- */
.placeholder {
  position: relative; display: grid; place-items: center; text-align: center; gap: 6px;
  min-height: 160px; padding: 20px; border-radius: var(--rayon-s);
  background:
    repeating-linear-gradient(45deg, rgba(27,42,107,.035) 0 12px, transparent 12px 24px),
    var(--blanc);
  border: 3px dashed #8a93b8; color: #3d4670;
  font-family: "Fredoka", sans-serif; font-weight: 500;
}
.placeholder strong { display: block; font-size: 1.05rem; color: var(--marine); }
.placeholder small { font-family: "Nunito", sans-serif; font-weight: 600; font-size: .85rem; opacity: .9; }
.placeholder .ph-badge {
  display: inline-block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  background: var(--marine); color: #fff; padding: 3px 10px; border-radius: 99px;
}
.card-media .placeholder { position: absolute; inset: 0; min-height: 0; border-radius: inherit; border-width: 0; }
.ph-text { background: #fff4c4; border-radius: 6px; padding: 1px 6px; font-weight: 700; color: #5a4300; }

/* ---------- 12. Étapes ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); counter-reset: etape; }
.step {
  counter-increment: etape; position: relative; background: var(--blanc); border-radius: var(--rayon-s);
  padding: 58px 20px 22px; text-align: center; box-shadow: 0 0 0 3px var(--marine), 0 8px 0 0 rgba(27,42,107,.12);
}
.step::before {
  content: counter(etape); position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.7rem; color: #fff;
  background: var(--sc, var(--accent-f)); box-shadow: 0 0 0 5px #fff, 0 0 0 8px var(--marine);
}
.step:nth-child(5n+1) { --sc: var(--bleu-f); }
.step:nth-child(5n+2) { --sc: var(--orange-f); }
.step:nth-child(5n+3) { --sc: var(--vert-f); }
.step:nth-child(5n+4) { --sc: var(--violet-f); }
.step:nth-child(5n+5) { --sc: var(--rose-f); }
.step h3 { font-size: 1.2rem; margin-bottom: .3em; }
.step p { margin: 0; color: var(--texte-doux); font-size: 1rem; }

/* ---------- 13. Pastilles de sujets ---------- */
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.center .chips { justify-content: center; }
.chip {
  display: inline-flex; align-items: center; min-height: 48px; padding: 8px 20px; border-radius: 99px;
  background: var(--blanc); font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.1rem;
  color: var(--marine); box-shadow: 0 0 0 3px var(--cc, var(--accent)), 0 5px 0 0 var(--cc, var(--accent));
  transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
.chip:hover { transform: translateY(-4px) rotate(-2deg); }
.chip:nth-child(6n+1) { --cc: var(--bleu); }
.chip:nth-child(6n+2) { --cc: var(--orange); }
.chip:nth-child(6n+3) { --cc: var(--vert); }
.chip:nth-child(6n+4) { --cc: var(--violet); }
.chip:nth-child(6n+5) { --cc: var(--rose); }
.chip:nth-child(6n+6) { --cc: var(--turquoise); }

/* ---------- 14. Bloc citation / encart ---------- */
.bubble {
  position: relative; background: var(--blanc); border-radius: 32px; padding: clamp(22px, 4vw, 36px);
  box-shadow: 0 0 0 4px var(--marine), 0 10px 0 0 var(--accent-2); max-width: 760px;
  font-family: "Fredoka", sans-serif; font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 500; line-height: 1.35;
}
.center .bubble { margin-inline: auto; }
.bubble::after {
  content: ""; position: absolute; bottom: -26px; left: 56px; width: 34px; height: 34px; background: var(--blanc);
  border-right: 4px solid var(--marine); border-bottom: 4px solid var(--marine); transform: rotate(45deg);
}

.split { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; } .split--rev > :first-child { order: 2; } }

/* ---------- 15. Vidéos ---------- */
.videos { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.video-card { background: var(--blanc); border-radius: var(--rayon-s); overflow: hidden; box-shadow: 0 0 0 3px var(--marine), 0 8px 0 0 rgba(27,42,107,.12); }
.video-thumb { position: relative; aspect-ratio: 16/9; background: #10163a; border: 0; padding: 0; width: 100%; cursor: pointer; display: block; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb .play {
  position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; border-radius: 50%;
  background: var(--jaune); display: grid; place-items: center; box-shadow: 0 0 0 5px #fff, 0 8px 18px rgba(0,0,0,.3);
  transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
.video-thumb:hover .play { transform: scale(1.12); }
.video-thumb .play svg { width: 30px; height: 30px; margin-left: 5px; }
.video-card iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; }
.video-card .video-title { padding: 12px 16px 16px; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.05rem; margin: 0; }
.video-note { font-size: .9rem; color: var(--texte-doux); }

/* ---------- 16. Carrousel ---------- */
.carousel { position: relative; }
.carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 340px); gap: 26px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px 6px 30px; scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.carousel-track > * { scroll-snap-align: start; }
.carousel-nav { display: flex; gap: 12px; justify-content: flex-end; margin-bottom: 4px; }
.carousel-btn {
  width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer; background: var(--marine); color: #fff;
  display: grid; place-items: center; box-shadow: 0 4px 0 0 var(--accent-2);
}
.carousel-btn svg { width: 24px; height: 24px; }
.carousel-btn:hover { transform: translateY(-2px); }

/* ---------- 17. Écris avec moi : démo ---------- */
.ecris-demo {
  background: #fffdf6; border-radius: var(--rayon); padding: clamp(20px, 4vw, 40px);
  box-shadow: var(--contour), var(--ombre); position: relative; overflow: hidden;
  /* lignes de cahier Seyès */
  background-image:
    linear-gradient(90deg, transparent 54px, rgba(255, 79, 154, .35) 54px, rgba(255, 79, 154, .35) 56px, transparent 56px),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(30, 136, 229, .16) 31px 32px);
}
.demo-stage { min-height: 200px; display: grid; place-items: center; text-align: center; padding: 16px 0; }
.demo-word {
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: clamp(3rem, 12vw, 6rem);
  letter-spacing: .06em; color: var(--marine); line-height: 1;
}
.demo-word.is-hidden-word { color: transparent; text-shadow: none; }
.demo-word .lt { display: inline-block; animation: popIn .5s cubic-bezier(.3,1.6,.5,1) both; }
.demo-timer { width: min(360px, 80%); height: 14px; border-radius: 99px; background: #e6e9f5; overflow: hidden; margin: 18px auto 0; box-shadow: inset 0 0 0 2px var(--marine); }
.demo-timer span { display: block; height: 100%; width: 100%; background: var(--arc); transform-origin: left; }
.demo-msg { font-family: "Fredoka", sans-serif; font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 600; margin: 0 0 12px; }
.demo-form { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; margin-top: 8px; }
.demo-input {
  font-family: "Fredoka", sans-serif; font-size: clamp(1.6rem, 6vw, 2.4rem); text-align: center; letter-spacing: .08em;
  width: min(420px, 100%); min-height: 70px; padding: 8px 16px; border-radius: 20px; border: 0; color: var(--marine);
  background: #fff; box-shadow: 0 0 0 4px var(--marine), 0 6px 0 0 var(--bleu);
}
.demo-input::placeholder { color: #8a93b8; letter-spacing: 0; font-size: 1.2rem; }
.demo-compare { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 6px 0 16px; }
.demo-compare span {
  min-width: 46px; height: 58px; display: grid; place-items: center; border-radius: 12px;
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 2rem;
  background: #fff; box-shadow: 0 0 0 3px var(--ok, var(--marine));
}
.demo-compare span.ok { --ok: var(--vert-f); background: #e7f7e6; }
.demo-compare span.ko { --ok: var(--orange-f); background: #fff1e2; }
.demo-stars { display: flex; gap: 10px; justify-content: center; margin-bottom: 10px; }
.demo-stars svg { width: 48px; height: 48px; animation: popIn .6s cubic-bezier(.3,1.6,.5,1) both; }
.demo-stars svg:nth-child(2) { animation-delay: .12s; }
.demo-stars svg:nth-child(3) { animation-delay: .24s; }
.demo-options { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; font-size: .95rem; }
.demo-options label { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; background: #fff; padding: 6px 14px; border-radius: 99px; box-shadow: 0 0 0 2px #c9cee2; }
.demo-options select { font: inherit; border: 0; background: transparent; color: var(--marine); font-weight: 800; }

.alphabet { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.alpha-btn {
  aspect-ratio: 1; border: 0; cursor: pointer; border-radius: 18px; background: #fff;
  font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.9rem; color: var(--marine);
  box-shadow: 0 0 0 3px var(--ac, var(--bleu)), 0 6px 0 0 var(--ac, var(--bleu));
  transition: transform .2s cubic-bezier(.3,1.6,.5,1);
}
.alpha-btn:hover { transform: translateY(-4px) rotate(-3deg); }
.alpha-btn[aria-pressed="true"] { background: var(--marine); color: #fff; }
.alpha-btn:nth-child(6n+1) { --ac: var(--bleu); } .alpha-btn:nth-child(6n+2) { --ac: var(--orange); }
.alpha-btn:nth-child(6n+3) { --ac: var(--vert); } .alpha-btn:nth-child(6n+4) { --ac: var(--violet); }
.alpha-btn:nth-child(6n+5) { --ac: var(--rose); } .alpha-btn:nth-child(6n+6) { --ac: var(--turquoise); }
.alpha-words { margin-top: 22px; min-height: 60px; }

/* ---------- 18. Personnages ---------- */
.persos { display: grid; gap: 34px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.perso { padding: 22px 22px 28px; }
.perso .placeholder { min-height: 220px; margin-bottom: 18px; }
.perso h3 { font-size: 2rem; }
.perso--noe h3 { color: var(--bleu-f); }
.perso--zoe h3 { color: var(--rose-f); }
.traits { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.traits li { padding: 6px 14px; border-radius: 99px; font-weight: 800; font-size: .95rem; background: var(--teinte); box-shadow: 0 0 0 2px var(--marine); }

/* ---------- 19. Livre premium ---------- */
.book-feature {
  position: relative; border-radius: 36px; padding: clamp(22px, 5vw, 56px);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 201, 60, .35), transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(255, 79, 154, .22), transparent 42%),
    linear-gradient(160deg, #fff7e6, #ffe9d3);
  box-shadow: var(--contour), var(--ombre);
  display: grid; gap: clamp(24px, 4vw, 56px); align-items: center;
}
@media (min-width: 900px) { .book-feature { grid-template-columns: minmax(260px, 400px) 1fr; } }
.book-cover { position: relative; perspective: 1200px; max-width: 400px; margin-inline: auto; width: 100%; }
.book-cover .cover-3d {
  aspect-ratio: 3 / 4; border-radius: 8px 18px 18px 8px; overflow: hidden; position: relative;
  transform: rotateY(-14deg) rotateX(3deg); transform-style: preserve-3d;
  box-shadow: -14px 0 0 -4px #d9cbb6, 18px 24px 40px -12px rgba(27, 42, 107, .45);
  transition: transform .6s cubic-bezier(.3,1.3,.5,1);
}
.book-cover:hover .cover-3d { transform: rotateY(-4deg) rotateX(1deg) translateY(-6px); }
.book-cover .cover-3d .placeholder { position: absolute; inset: 0; border-radius: inherit; }
.book-cover .cover-3d img { width: 100%; height: 100%; object-fit: cover; }
.book-meta { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 20px; }
.book-meta .meta {
  background: #fff; border-radius: 16px; padding: 10px 16px; box-shadow: 0 0 0 3px var(--marine);
  font-weight: 700; font-size: .95rem;
}
.book-meta .meta b { display: block; font-family: "Fredoka", sans-serif; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--rose-f); }
.book-synopsis { font-size: 1.1rem; }
.gallery { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(6, 1fr); } }
.cards > .placeholder { grid-column: 1 / -1; }
.gallery .placeholder { aspect-ratio: 3 / 4; min-height: 0; }
.gallery img { aspect-ratio: 3/4; object-fit: cover; border-radius: var(--rayon-s); box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--marine); }
.soon-note { font-size: .9rem; color: var(--texte-doux); margin-top: 10px; }

/* ---------- 20. Réseaux ---------- */
.socials { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.social { padding: 28px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.social .s-icon { width: 92px; height: 92px; border-radius: 28px; display: grid; place-items: center; box-shadow: 0 0 0 5px #fff, 0 0 0 8px var(--marine); margin-bottom: 6px; }
.social .s-icon svg { width: 52px; height: 52px; }
.social h2, .social h3 { margin: 0; font-size: 1.7rem; }
.social .s-url { font-weight: 800; word-break: break-all; font-size: .95rem; }
.social .placeholder { width: 160px; min-height: 160px; aspect-ratio: 1; margin-top: 6px; }
.bg-youtube { background: #c4302b; } .bg-facebook { background: #1460b8; } .bg-tiktok { background: #111; }

/* ---------- 21. Pour les parents (discret) ---------- */
.parents {
  border-radius: var(--rayon); background: #fff; padding: clamp(20px, 4vw, 36px);
  box-shadow: 0 0 0 3px #d9dcea; max-width: 920px; margin-inline: auto;
}
.parents summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.6rem); color: var(--marine);
  min-height: 48px;
}
.parents summary::-webkit-details-marker { display: none; }
.parents summary::after {
  content: "+"; flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--marine); color: #fff; font-size: 1.6rem; transition: transform .3s;
}
.parents[open] summary::after { transform: rotate(45deg); }
.parents-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-top: 22px; }
.parents-grid div { padding: 16px 18px; border-radius: 18px; background: var(--creme); border-left: 6px solid var(--pc, var(--bleu)); }
.parents-grid div:nth-child(2) { --pc: var(--orange); } .parents-grid div:nth-child(3) { --pc: var(--vert); } .parents-grid div:nth-child(4) { --pc: var(--rose); }
.parents-grid h3 { font-size: 1.15rem; margin-bottom: .25em; }
.parents-grid p { margin: 0; font-size: .98rem; color: var(--texte-doux); }

/* ---------- 22. Pages texte (légal, à propos) ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose-card { background: #fff; border-radius: var(--rayon); padding: clamp(22px, 5vw, 52px); box-shadow: var(--contour), var(--ombre); }
.ia-box {
  border-radius: 22px; padding: 22px 24px; background: #f2f4fb; border: 3px solid var(--marine); margin-top: 18px;
}
.ia-box p:last-child { margin-bottom: 0; }

/* ---------- 23. Footer ---------- */
.site-footer { position: relative; margin-top: clamp(40px, 7vw, 80px); background: var(--marine); color: #e9ecfb; }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -38px; height: 40px;
  background: var(--marine);
  -webkit-mask: radial-gradient(28px 22px at 50% 100%, #000 98%, transparent 101%) 0 0 / 56px 40px repeat-x;
          mask: radial-gradient(28px 22px at 50% 100%, #000 98%, transparent 101%) 0 0 / 56px 40px repeat-x;
}
.site-footer .rainbow-bar { position: absolute; left: 0; right: 0; top: 0; border-radius: 0; height: 6px; }
.footer-grid { display: grid; gap: 32px; padding-block: 56px 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-brand img { width: 120px; height: 120px; background: #fff; border-radius: 30px; padding: 6px; box-shadow: 0 0 0 4px var(--jaune); }
.site-footer h2 { color: #fff; font-size: 1.25rem; margin-bottom: 12px; }
.site-footer a { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer-links a { display: inline-block; padding: 6px 0; text-decoration: none; font-weight: 700; }
.footer-links a:hover { text-decoration: underline; }
.footer-social { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.footer-social a { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; box-shadow: 0 0 0 3px #fff; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.footer-social a:hover { transform: translateY(-4px) rotate(-6deg); }
.footer-social svg { width: 28px; height: 28px; }
.footer-ia { border-top: 1px solid rgba(255,255,255,.18); padding-block: 22px; font-size: .9rem; line-height: 1.6; color: #d6dbf3; }
.footer-ia p { margin: 0 0 .7em; max-width: 110ch; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; padding-bottom: 26px; font-size: .95rem; }
.motion-toggle {
  display: inline-flex; align-items: center; gap: 10px; background: transparent; color: #fff; border: 2px solid #fff;
  border-radius: 99px; padding: 8px 16px; min-height: 44px; font: inherit; font-weight: 800; cursor: pointer;
}
.motion-toggle[aria-pressed="true"] { background: #fff; color: var(--marine); }

/* ---------- 24. Révélation au défilement ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.8,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 25. Réduction des animations (système OU bouton du site) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .floaties { display: none; }
  .reveal { opacity: 1; transform: none; }
  .arc-line path { stroke-dashoffset: 0; }
}
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important;
}
html.reduce-motion .floaties { display: none; }
html.reduce-motion .reveal { opacity: 1; transform: none; }
html.reduce-motion .arc-line path { stroke-dashoffset: 0; }
html.reduce-motion .card, html.reduce-motion .sticker-frame { transform: none; }

/* ---------- 26. Impression ---------- */
@media print {
  .site-header, .floaties, .menu-toggle, .site-footer::before, .carousel-nav { display: none !important; }
  body { background: #fff; }
}

/* ---------- Sélecteur de langue FR | EN ---------- */
.lang-switch { flex: none; display: flex; align-items: center; gap: 2px; margin-left: 6px;
  padding: 3px; border-radius: 99px; background: var(--blanc); box-shadow: 0 0 0 2px var(--marine); font-family: "Fredoka", sans-serif; font-weight: 600; }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 8px;
  border-radius: 99px; text-decoration: none; color: var(--marine); font-size: .95rem; }
.lang-switch a:hover { background: var(--creme); }
.lang-switch a[aria-current="true"] { background: var(--marine); color: #fff; }
.lang-switch .sep { display: none; }
@media (max-width: 1099px) { .lang-switch { margin-left: 4px; } }

/* ---------- Portraits Noé / Zoé ---------- */
.perso-portrait { display: flex; justify-content: center; align-items: center; min-height: 220px; margin-bottom: 18px; }
.perso--noe .perso-portrait { --t: #e8f2ff; }
.perso--zoe .perso-portrait { --t: #fdeaf3; }
.perso-portrait img { width: 230px; height: 230px; border-radius: 50%; object-fit: cover; background: var(--t, #fff1e2);
  border: 4px solid var(--marine); box-shadow: 0 0 0 6px #fff, 0 10px 22px rgba(27,42,107,.18); }

/* ---------- Noé & Zoé : coucou + cœurs ---------- */
.perso-portrait { position: relative; }
.perso-portrait img { transform-origin: 50% 90%; animation: coucou 5s ease-in-out infinite; }
.perso--zoe .perso-portrait img { animation-delay: 2.5s; }
.perso-portrait:hover img { animation-duration: 1.6s; }
@keyframes coucou {
  0%, 60%, 100% { transform: rotate(0) translateY(0); }
  66% { transform: rotate(-5deg) translateY(-4px); }
  74% { transform: rotate(5deg) translateY(-6px); }
  82% { transform: rotate(-4deg) translateY(-3px); }
  90% { transform: rotate(3deg) translateY(0); }
}
.coucou { position: absolute; top: 6px; right: calc(50% - 150px); font-size: 2.6rem; line-height: 1;
  transform-origin: 70% 80%; animation: main-coucou 5s ease-in-out infinite; filter: drop-shadow(0 3px 4px rgba(27,42,107,.2)); }
.perso--zoe .coucou { animation-delay: 2.5s; right: auto; left: calc(50% - 150px); transform: scaleX(-1); animation-name: main-coucou-g; }
@keyframes main-coucou {
  0%, 60%, 100% { transform: rotate(0); } 66% { transform: rotate(22deg); } 74% { transform: rotate(-12deg); } 82% { transform: rotate(20deg); } 90% { transform: rotate(-6deg); }
}
@keyframes main-coucou-g {
  0%, 60%, 100% { transform: scaleX(-1) rotate(0); } 66% { transform: scaleX(-1) rotate(22deg); } 74% { transform: scaleX(-1) rotate(-12deg); } 82% { transform: scaleX(-1) rotate(20deg); } 90% { transform: scaleX(-1) rotate(-6deg); }
}
.coeur-btn { display: flex; align-items: center; gap: 10px; margin: -4px auto 18px; padding: 8px 18px 8px 12px; min-height: 52px;
  border: 3px solid var(--marine); border-radius: 99px; background: #fff; color: var(--marine); cursor: pointer;
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.1rem; box-shadow: 0 4px 0 0 var(--marine);
  transition: transform .15s, box-shadow .15s, background .2s; position: relative; }
.coeur-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 0 var(--marine); }
.coeur-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 0 var(--marine); }
.coeur-btn .coeur { font-size: 1.6rem; color: #b8b8c8; transition: color .2s, transform .2s; line-height: 1; }
.coeur-btn .coeur-n { min-width: 2ch; text-align: center; font-size: 1.3rem; }
.coeur-btn .coeur-txt { font-weight: 500; font-size: 1rem; opacity: .85; }
.coeur-btn.is-aime { background: #fff0f5; }
.coeur-btn.is-aime .coeur { color: #e8336d; }
.coeur-btn.is-pop .coeur { animation: coeur-pop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes coeur-pop { 0% { transform: scale(1); } 40% { transform: scale(1.7); } 100% { transform: scale(1); } }
.coeur-vole { position: absolute; left: 22px; top: 6px; pointer-events: none; color: #e8336d; font-size: 1.4rem; animation: coeur-vole 1s ease-out forwards; }
@keyframes coeur-vole { 0% { opacity: 1; transform: translate(0,0) scale(.8); } 100% { opacity: 0; transform: translate(var(--dx, 0px), -70px) scale(1.4); } }
.coeur-intro { margin: 0 auto 26px; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.15rem; color: var(--marine); max-width: 40ch; }
.coeur-msg { min-height: 1.6em; margin: 14px auto 0; font-weight: 700; color: #b8165a; }
@media (max-width: 420px) { .coucou { right: 8px; } .perso--zoe .coucou { left: 8px; } }
/* Menu un peu plus serré entre 1100 et 1279 px pour garder une seule ligne avec le sélecteur FR | EN */
@media (min-width: 1100px) and (max-width: 1279px) {
  .site-header .wrap { gap: 10px; }
  .main-nav ul { gap: 0; flex-wrap: nowrap; }
  .main-nav a { padding: 8px 9px; font-size: .95rem; }
}

/* ---------- Pastilles cliquables vers les vidéos YouTube ---------- */
.chip--lien { padding: 0; cursor: pointer; }
.chip--lien a { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 18px 8px 20px;
  color: inherit; text-decoration: none; border-radius: 99px; }
.chip--lien a:focus-visible { outline: 3px solid var(--marine); outline-offset: 3px; }
.chip-play { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%;
  background: #c4302b; color: #fff; font-size: .6rem; padding-left: 2px; }

/* ---------- Écris avec moi : les nombres ---------- */
.nb-section { margin-top: clamp(40px, 6vw, 64px); font-size: clamp(1.5rem, 3vw, 2rem); }
.nb-titre { font-family: "Fredoka", sans-serif; font-size: 1.6rem; margin: 18px 0 8px; }
.nb-chiffre { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: 56px; padding: 0 10px;
  border-radius: 16px; background: var(--marine); color: #fff; font-size: 1.8rem; }
.nb-etoiles { display: flex; flex-wrap: wrap; gap: 6px; max-width: 420px; margin: 6px 0 10px; }
.nb-etoile svg { width: 34px; height: 34px; display: block; }
.nb-zero { font-style: italic; opacity: .75; }
