/* Police Baloo 2 hébergée sur le site (licence SIL OFL) : aucune requête vers Google. */
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../fonts/baloo2-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../fonts/baloo2-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Mathemakidz — styles */
:root {
  color-scheme: light;
  --bg: #FFF7EA;
  --bg-2: #FFEFD6;
  --card: #FFFFFF;
  --ink: #2B2A4C;
  --muted: #74708F;
  --line: #EADFCB;
  --primary: #FF7A2F;
  --primary-dark: #E2601A;
  --green: #22B573;
  --red: #EF5B5B;
  --blue: #3E8EF7;
  --yellow: #FFC93C;
  --a: #FF6B6B;      /* panier / partie A */
  --a-bg: #FFE9E7;
  --b: #3E8EF7;      /* panier / partie B */
  --b-bg: #E5F0FF;
  --lc: var(--primary);
  --radius: 22px;
  --shadow: 0 4px 0 rgba(43, 42, 76, .08), 0 10px 24px rgba(43, 42, 76, .08);
  --font: 'Baloo 2', 'Nunito', ui-rounded, 'Segoe UI', system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(circle at 10% 0%, #FFE6C4 0, transparent 40%), radial-gradient(circle at 100% 100%, #E4F4EA 0, transparent 35%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.35;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
#app { max-width: 1040px; margin: 0 auto; padding: 16px 16px 40px; }
h1, h2 { line-height: 1.1; margin: 0; font-weight: 800; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; border-radius: 12px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 56px; padding: 8px 24px;
  background: var(--card); border: 3px solid var(--line); border-radius: 999px;
  font-weight: 700; font-size: 20px; text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 var(--line);
  transition: transform .1s ease, box-shadow .1s ease;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn.primary { background: var(--primary); border-color: var(--primary-dark); color: #fff; box-shadow: 0 4px 0 var(--primary-dark); }
.btn.primary:active { box-shadow: 0 1px 0 var(--primary-dark); }
.btn.big { min-height: 68px; font-size: 24px; padding: 10px 34px; }
.btn[hidden] { display: none; }
.icon-btn {
  width: 48px; height: 48px; flex: none; border-radius: 50%;
  border: 3px solid var(--line); background: var(--card); font-size: 22px; cursor: pointer;
}

/* ---------- Parcours ---------- */
.level-panel h2 { font-size: 26px; margin: 0 0 12px; }
.fiches { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 140px;
  padding: 14px 14px 12px; background: var(--card); border-radius: var(--radius);
  border: 3px solid var(--line); text-decoration: none;
}
.tile.playable { border-color: var(--lc); box-shadow: 0 5px 0 color-mix(in srgb, var(--lc) 70%, black); cursor: pointer; transition: transform .15s ease; }
.tile.playable:hover { transform: translateY(-3px) rotate(-.5deg); }
.tile.playable:active { transform: translateY(3px); box-shadow: 0 2px 0 color-mix(in srgb, var(--lc) 70%, black); }
.tile.locked { opacity: .62; }
.tile-num {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--lc) 16%, white); color: color-mix(in srgb, var(--lc) 80%, black); font-weight: 800;
}
.tile-title { font-weight: 800; font-size: 18px; line-height: 1.15; margin-top: 6px; }
.tile-notion { color: var(--muted); font-size: 15px; font-weight: 600; }
.tile-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.tile-stars { color: #F2A900; font-size: 20px; letter-spacing: 1px; }

/* ---------- Fiche : en-tête ---------- */
.fiche { display: flex; flex-direction: column; gap: 12px; min-height: calc(100vh - 56px); }
.fiche-head { display: flex; align-items: center; gap: 10px; }
.head-right { display: flex; align-items: center; gap: 8px; }
.clock { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.steps { flex: 1; display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; min-width: 0; }
.step {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 8px; border-radius: 999px; background: var(--card); border: 3px solid var(--line);
  font-weight: 700; font-size: 15px; color: var(--muted);
}
.step-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.now { border-color: var(--lc); color: var(--ink); background: color-mix(in srgb, var(--lc) 12%, white); }
.step.done { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- Guides (Many et Louk) et la bulle ---------- */
.guide { display: flex; align-items: center; gap: 12px; }
.mascot { flex: none; --pc: var(--primary); }
.mascot.happy { animation: hop .6s ease; }
.avatar {
  display: block; width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--pc); background: #CFE7FF; box-shadow: 0 4px 0 color-mix(in srgb, var(--pc) 60%, black);
  animation: pop .4s ease;
}
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-14px) rotate(-6deg); } 70% { transform: translateY(0) rotate(4deg); } }
.bubble-body { flex: 1; display: flex; flex-direction: column; }
.speaker { font-weight: 800; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; }
.bubble {
  position: relative; flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 3px solid var(--line); border-radius: 22px; padding: 10px 12px 10px 18px;
  min-height: 72px; box-shadow: var(--shadow);
}
.bubble::before {
  content: ''; position: absolute; left: -14px; top: 50%; translate: 0 -50%;
  border: 12px solid transparent; border-right-color: var(--line); border-left: 0;
}
.bubble-text { margin: 0; flex: 1; font-size: clamp(19px, 2.6vw, 24px); font-weight: 700; }
.replay { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--bg-2); font-size: 22px; cursor: pointer; }

.dots { display: flex; justify-content: center; gap: 8px; min-height: 12px; }
.dots span { width: 12px; height: 12px; border-radius: 50%; background: var(--line); transition: background .2s; }
.dots .done { background: var(--green); }
.dots .now { background: var(--lc); transform: scale(1.25); }

/* ---------- Scène ---------- */
.stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 8px 0; }
.card {
  background: var(--card); border-radius: 28px; box-shadow: var(--shadow); padding: 20px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 100%;
}
.scene { display: flex; flex-direction: column; align-items: center; gap: 16px; animation: rise .35s ease; max-width: 100%; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.objs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 320px; }
.obj { font-size: clamp(36px, 7vw, 52px); line-height: 1; display: inline-block; user-select: none; }

.die { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(260px, 70vw); aspect-ratio: 1; padding: 16px; background: #FFFDF8; border: 4px solid var(--line); border-radius: 28px; }
.die-cell { display: grid; place-items: center; font-size: clamp(38px, 9vw, 58px); }

.groups { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.gbox {
  min-width: 120px; padding: 14px 16px 10px; border-radius: 22px;
  background: var(--a-bg); border: 3px dashed var(--a);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.gbox.alt { background: var(--b-bg); border-color: var(--b); }
.gbox.together { background: #FFF3D6; border: 3px solid #E8B04A; }
.glabel { font-weight: 800; font-size: 22px; color: var(--muted); }
.caption {
  font-size: clamp(28px, 5vw, 40px); font-weight: 800; padding: 6px 22px; border-radius: 16px;
  background: #FFF3D6; border: 3px solid var(--yellow);
}

/* ---------- Famille de nombres (number bond) ---------- */
.bond { position: relative; width: min(320px, 78vw); aspect-ratio: 4 / 3; flex: none; }
.bond svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bond line { stroke: var(--ink); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-width: 4; stroke-linecap: round; }
.node {
  position: absolute; width: 30%; aspect-ratio: 1; translate: -50% -50%;
  display: grid; place-items: center; border-radius: 50%;
  font-size: clamp(34px, 7vw, 50px); font-weight: 800; background: var(--card); border: 5px solid var(--ink);
}
.node.whole { left: 50%; top: 24%; background: #FFF3D6; border-color: #E8A33A; }
.node.left { left: 22%; top: 74%; background: var(--a-bg); border-color: var(--a); }
.node.right { left: 78%; top: 74%; background: var(--b-bg); border-color: var(--b); }
.node.missing { border-style: dashed; color: var(--muted); animation: pulse 1.4s ease-in-out infinite; }
.node.found { animation: pop .45s ease; color: var(--green); }
@keyframes pulse { 50% { transform: scale(1.07); } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.bond-label { position: absolute; translate: -50% 0; font-size: 15px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.whole-l { left: 50%; top: -6%; }
.left-l { left: 22%; top: 96%; }
.right-l { left: 78%; top: 96%; }
.bond.mini { width: 108px; }
.bond.mini .node { font-size: 20px; border-width: 3px; }
.bond.mini line { stroke-width: 2.5; }

/* ---------- Choix de réponses ---------- */
.choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.choice {
  width: 84px; height: 84px; border-radius: 24px; cursor: pointer;
  font-size: 44px; font-weight: 800; background: var(--card);
  border: 4px solid var(--line); box-shadow: 0 6px 0 var(--line);
  transition: transform .1s ease, box-shadow .1s ease;
}
.choice:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--line); }
.choice.good { background: var(--green); border-color: #18965D; color: #fff; box-shadow: 0 6px 0 #18965D; animation: pop .4s ease; }
.choice.bad { background: #FFF0F0; border-color: var(--red); color: var(--red); opacity: .55; animation: shake .4s ease; cursor: default; }
.choice.hint { animation: pulse 1s ease-in-out infinite; border-color: var(--yellow); box-shadow: 0 6px 0 #E0A800; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.next-row { display: flex; justify-content: center; }

/* ---------- Cartes d'étape et de fin ---------- */
.phase-card, .end-card {
  text-align: center; background: var(--card); border-radius: 32px; box-shadow: var(--shadow);
  padding: 28px 32px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  max-width: 560px; width: 100%; animation: rise .35s ease;
}
.phase-ico { font-size: 72px; line-height: 1; }
.phase-step { color: var(--muted); font-weight: 700; }
.phase-card h2, .end-card h2 { font-size: 36px; }
.phase-card p { margin: 0; font-size: 20px; font-weight: 600; }
.phase-pause { background: #E4F4EA; border-radius: 16px; padding: 10px 16px; }
.big-stars { display: flex; gap: 10px; }
.big-star { font-size: 84px; line-height: 1; color: var(--line); transform: scale(0); animation: star-in .5s ease forwards; }
.big-star.on { color: #FFC21A; text-shadow: 0 4px 0 #E09A00; }
@keyframes star-in { 0% { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.25) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
.end-recap { margin: 0; font-size: 20px; font-weight: 600; }
.end-meta { margin: 0; color: var(--muted); font-size: 16px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }

/* ---------- Ranger dans les paniers ---------- */
.split { user-select: none; -webkit-user-select: none; width: 100%; display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.zone { border-radius: 24px; padding: 10px 12px 14px; border: 4px dashed var(--line); background: var(--card); transition: transform .15s, border-color .15s; }
.zone.over { transform: scale(1.03); border-style: solid; }
.zhead { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 20px; margin-bottom: 6px; }
.zcount { min-width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card); font-size: 26px; border: 3px solid currentColor; }
.zitems { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 64px; }
.pool { background: #FFFDF8; }
.pool .zhead { color: var(--muted); justify-content: center; }
.baskets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.basket { min-height: 170px; }
.basket.a { background: var(--a-bg); border-color: var(--a); color: #C23B3B; }
.basket.b { background: var(--b-bg); border-color: var(--b); color: #1F62C4; }
.basket.over { box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 20%, transparent); }
.drag { cursor: grab; touch-action: none; padding: 4px; border-radius: 14px; transition: transform .12s; }
.drag:hover { transform: scale(1.08); }
.drag.lifted { opacity: .25; }
.drag.selected { background: #FFF3D6; outline: 4px solid var(--yellow); transform: scale(1.12); }
.ghost { position: fixed; z-index: 50; pointer-events: none; translate: -50% -50%; transform: scale(1.25) rotate(-6deg); filter: drop-shadow(0 8px 10px rgba(0,0,0,.2)); }
.found { background: var(--card); border-radius: 22px; padding: 10px 14px; box-shadow: var(--shadow); }
.found-title { font-weight: 800; color: var(--muted); margin-bottom: 6px; text-align: center; }
.found-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; min-height: 40px; }
.found-item { animation: pop .45s ease; }

/* ---------- Défi des bulles ---------- */
.game { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.game-top { width: 100%; display: flex; align-items: center; gap: 12px; }
.timebar { flex: 1; height: 18px; border-radius: 999px; background: var(--line); overflow: hidden; }
.timefill { height: 100%; width: 100%; background: var(--green); border-radius: 999px; transition: background .3s; }
.timefill.hurry { background: var(--red); }
.score { font-weight: 800; font-size: 26px; background: var(--card); border-radius: 999px; padding: 2px 16px; border: 3px solid var(--yellow); }
.game-bond .bond { width: min(260px, 64vw); }
.field { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; padding: 10px 0 20px; }
.bubble-btn {
  width: 92px; height: 92px; border-radius: 50%; cursor: pointer; font-size: 42px; font-weight: 800; color: #1F4F8F;
  border: 3px solid rgba(62, 142, 247, .45);
  background: radial-gradient(circle at 32% 28%, #fff 0 12%, #DDF0FF 30%, #A9D3FF 75%, #8EC3FA 100%);
  box-shadow: inset -6px -8px 14px rgba(62, 142, 247, .25), 0 8px 16px rgba(62, 142, 247, .2);
  animation: float var(--s, 3s) ease-in-out var(--d, 0s) infinite alternate;
}
.bubble-btn.popped { animation: burst-out .35s ease forwards; }
.bubble-btn.wobble { animation: shake .4s ease; }
@keyframes float { from { transform: translateY(-8px); } to { transform: translateY(10px); } }
@keyframes burst-out { to { transform: scale(1.6); opacity: 0; } }

/* ---------- Retours ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; translate: -50% 40px; z-index: 40;
  padding: 10px 24px; border-radius: 999px; font-size: 24px; font-weight: 800; color: #fff;
  background: var(--ink); opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s;
}
.toast.show { opacity: 1; translate: -50% 0; }
.toast.good { background: var(--green); }
.toast.bad { background: var(--primary); }
.particle { position: fixed; z-index: 60; pointer-events: none; font-size: 26px; translate: -50% -50%; animation: fly .85s ease-out forwards; }
@keyframes fly { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }

.overlay { position: fixed; inset: 0; z-index: 70; background: rgba(43, 42, 76, .45); display: grid; place-items: center; padding: 16px; }
.dialog { background: var(--card); border-radius: 28px; padding: 24px; max-width: 420px; text-align: center; box-shadow: var(--shadow); }
.dialog p { font-size: 22px; font-weight: 700; margin: 0 0 8px; }

/* ---------- Petits écrans ---------- */
@media (max-width: 860px) {
  .step-name { display: none; }
  .step { flex: 0 0 auto; width: 46px; padding: 6px 0; }
  .steps { justify-content: center; }
}
@media (max-width: 560px) {
  #app { padding: 12px 16px 32px; }
  .fiches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { min-height: 128px; }
  .avatar { width: 62px; height: 62px; border-width: 3px; }
  .clock { display: none; }
  .steps { gap: 4px; }
  .step { width: 38px; height: 38px; padding: 0; border-width: 2px; font-size: 16px; }
  .icon-btn { width: 44px; height: 44px; font-size: 20px; }
  .bubble-text { font-size: 18px; }
  .bubble { min-height: 60px; }
  .choice { width: 72px; height: 72px; font-size: 38px; }
  .basket { min-height: 140px; }
  .bubble-btn { width: 76px; height: 76px; font-size: 34px; }
  .phase-card, .end-card { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* =================================================================
   Mathemakidz : marque, comptes, espace parent, nouveaux jeux
   ================================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.center-text { text-align: center; align-items: center; }
.page { display: flex; flex-direction: column; gap: 18px; }
.btn.danger { border-color: #E9A3A3; color: #B42318; box-shadow: 0 4px 0 #E9A3A3; }
.btn.stripe { background: #635BFF; border-color: #4B44D6; color: #fff; box-shadow: 0 4px 0 #4B44D6; }
.btn:disabled { opacity: .7; cursor: progress; }

/* Marque */
.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.top > .btn, .top-actions { margin-left: auto; }
.top-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.top-actions .btn, .top > .btn { min-height: 46px; font-size: 17px; padding: 6px 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
/* Logo officiel : fond blanc fondu dans le fond crème de la page */
.brand-logo { width: 84px; height: 84px; flex: none; mix-blend-mode: multiply; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.wordmark { font-size: clamp(30px, 5vw, 40px); font-weight: 800; letter-spacing: .01em; }
.wordmark span { display: inline-block; color: hsl(calc(var(--k) * 32 + 8) 82% 50%); text-shadow: 0 3px 0 rgba(43, 42, 76, .12); }
.wordmark span:nth-child(odd) { transform: translateY(-2px) rotate(-3deg); }
.wordmark span:nth-child(even) { transform: translateY(1px) rotate(2deg); }
.brand-method { font-size: 15px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; }
.brand.small .brand-logo { width: 64px; height: 64px; }
.brand.small .wordmark { font-size: 28px; }
.brand.small .brand-method { font-size: 12px; }

/* Accueil public */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; background: var(--card); border-radius: 32px; padding: 28px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(30px, 4.6vw, 48px); }
.hero-sub { font-size: 20px; color: var(--muted); font-weight: 600; margin: 12px 0 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.logo-scene { position: relative; width: 100%; max-width: 440px; justify-self: center; padding: 6%; }
.hero-logo { display: block; width: 100%; height: auto; animation: logo-in .6s ease both; }
@keyframes logo-in { from { opacity: 0; transform: scale(.92) rotate(-3deg); } to { opacity: 1; transform: none; } }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature { background: var(--card); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); }
.feature h3 { margin: 6px 0 4px; font-size: 22px; }
.feature p { margin: 0; color: var(--muted); font-weight: 600; font-size: 17px; }
.feature-ico { font-size: 40px; }
.offer { background: #FFF3D6; border: 3px solid var(--yellow); border-radius: 24px; padding: 18px 22px; }
.offer h2 { font-size: 26px; margin-bottom: 6px; }
.offer p { margin: 0; font-weight: 600; }
.mock-banner { margin: 0; text-align: center; font-size: 15px; font-weight: 700; color: #5B4B00; background: #FFF8D6; border: 2px dashed #E8C64A; border-radius: 14px; padding: 8px 12px; }
.foot { text-align: center; color: var(--muted); font-size: 15px; }

/* Formulaires */
.panel { background: var(--card); border-radius: 28px; box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.panel.narrow { max-width: 520px; width: 100%; margin: 0 auto; }
.panel h1 { font-size: clamp(28px, 4vw, 36px); }
.panel h2 { font-size: 24px; margin-top: 6px; }
.panel p { margin: 0; }
.field-row { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 800; }
.field-help { font-size: 15px; color: var(--muted); }
.panel input[type=email], .panel input[type=password], .panel input:not([type]), .panel select {
  font: inherit; font-size: 20px; padding: 10px 14px; min-height: 52px; border-radius: 14px; border: 3px solid var(--line); background: #FFFDF8; color: var(--ink); width: 100%;
}
.panel input:focus, .panel select:focus { outline: none; border-color: var(--blue); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; font-weight: 600; }
.check input { width: 24px; height: 24px; margin-top: 2px; flex: none; }
.form-error { color: #B42318; font-weight: 700; min-height: 1em; }
.form-error:empty { display: none; }

/* Profils enfants */
.who { text-align: center; padding-top: 10px; }
.who h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 20px; }
.kids { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.kid-card {
  width: 200px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 14px 16px;
  background: var(--card); border-radius: 28px; border: 4px solid var(--lc); text-decoration: none;
  box-shadow: 0 6px 0 color-mix(in srgb, var(--lc) 70%, black); transition: transform .15s;
}
.kid-card:hover { transform: translateY(-4px) rotate(-1deg); }
.kid-card strong { font-size: 28px; }
.kid-meta { color: var(--muted); font-weight: 700; font-size: 16px; }
.kid-avatar { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--bg-2); font-size: 34px; flex: none; }
.kid-avatar.big { width: 112px; height: 112px; font-size: 72px; margin-bottom: 6px; }
.kid-head { display: flex; align-items: center; gap: 10px; background: var(--card); border: 3px solid var(--lc); border-radius: 999px; padding: 4px 18px 4px 4px; }
.kid-head strong { display: block; font-size: 22px; line-height: 1; }
.parent-btn { opacity: .9; }

/* Tuiles de modules */
.tile-free { position: absolute; top: 12px; right: 12px; background: #E4F4EA; color: #137A47; border-radius: 999px; padding: 0 10px; font-size: 14px; font-weight: 800; }
.tile.paywall { font: inherit; text-align: left; cursor: pointer; border-style: dashed; border-color: var(--lc); background: color-mix(in srgb, var(--lc) 5%, white); }
.tile-lock { color: color-mix(in srgb, var(--lc) 80%, black); font-size: 14px; }
.level-panel { display: flex; flex-direction: column; gap: 6px; }
.level-panel h2 { margin: 0; }
.level-panel > p { margin: 0 0 8px; font-weight: 600; }

/* Espace parent */
.parent-kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.parent-kid { border: 3px solid var(--lc, var(--line)); border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: color-mix(in srgb, var(--lc, #fff) 4%, white); }
.parent-kid.add { --lc: var(--line); align-items: center; justify-content: center; text-decoration: none; font-weight: 800; font-size: 20px; border-style: dashed; min-height: 200px; color: var(--muted); }
.add-plus { font-size: 54px; line-height: 1; }
.pk-head { display: flex; align-items: center; gap: 12px; }
.pk-head h3 { margin: 0 0 4px; font-size: 26px; }
.pk-head select { font-size: 16px; min-height: 40px; padding: 4px 8px; }
.pk-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-actions .btn, .access .btn { min-height: 46px; font-size: 17px; padding: 6px 16px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.stats div { background: var(--card); border-radius: 14px; padding: 8px; text-align: center; border: 2px solid var(--line); }
.stats dt { font-size: 13px; color: var(--muted); font-weight: 700; }
.stats dd { margin: 0; font-size: 22px; font-weight: 800; }
.access { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.access p { margin: 0; font-weight: 600; }
.access.ok { color: #137A47; font-weight: 800; margin: 0; }
.test-zone { border: 3px dashed #E8C64A; box-shadow: none; background: #FFFCF0; }
.table-wrap { overflow-x: auto; }
.suivi { width: 100%; border-collapse: collapse; font-size: 16px; }
.suivi th, .suivi td { padding: 8px 10px; border-bottom: 2px solid var(--bg-2); text-align: left; vertical-align: top; }
.suivi thead th { color: var(--muted); font-size: 14px; }
.suivi tbody th small { display: block; color: var(--muted); font-weight: 600; }
.suivi tr.soon { opacity: .5; }

/* Le coin des parents */
.coin { border: 3px solid var(--line); border-radius: 18px; padding: 10px 14px; background: #FFFDF8; }
.coin summary { cursor: pointer; font-weight: 800; font-size: 19px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.coin summary .tile-free { position: static; }
.coin-num { background: var(--bg-2); border-radius: 8px; padding: 0 8px; font-size: 15px; }
.coin-body { padding-top: 8px; font-size: 17px; }
.coin-body h4 { margin: 10px 0 2px; }
.coin-body ul { margin: 0; padding-left: 22px; }
.coin-body p { margin: 0; }
.mots { margin-top: 8px !important; }
.coin.mini { text-align: left; width: 100%; margin-top: 6px; }
.coin.mini summary { font-size: 17px; }
.fiche-title { font-size: 30px; color: var(--lc); }
.end-parent { margin: 0; background: #E4F4EA; border-radius: 14px; padding: 8px 14px; font-weight: 600; font-size: 17px; }

/* Paiement (simulation Stripe) */
.checkout { display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.co-summary { padding: 28px; background: #F6F8FB; display: flex; flex-direction: column; gap: 12px; }
.co-summary h1 { font-size: 44px; }
.co-summary p { margin: 0; }
.co-line { display: flex; gap: 12px; align-items: center; }
.co-line strong { display: block; }
.co-list { margin: 0; padding-left: 22px; font-weight: 600; }
.co-pay { padding: 28px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.co-pay h2 { font-size: 24px; }
.co-pay p { margin: 0; }
.test-badge { background: #FFE2B8; color: #8A4B00; font-weight: 800; font-size: 13px; letter-spacing: .08em; border-radius: 8px; padding: 2px 10px; }

/* Jeu « choisir » */
.modele { display: flex; gap: 28px; align-items: center; justify-content: center; min-height: 110px; }
.modele-e { display: inline-block; font-size: clamp(64px, 12vw, 96px); line-height: 1; }
.picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.pick {
  min-width: 110px; min-height: 110px; padding: 10px 14px; border-radius: 26px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--card); border: 4px solid var(--line); box-shadow: 0 6px 0 var(--line);
  transition: transform .1s ease, box-shadow .1s ease;
}
.pick-box { display: grid; place-items: center; width: 72px; height: 72px; }
.pick-e { font-size: 60px; line-height: 1; display: inline-block; }
.pick-l { font-weight: 800; font-size: 20px; }
.pick.word { min-height: 84px; }
.pick.word .pick-l { font-size: 32px; }
.pick:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--line); }
.pick.good { background: #E4F4EA; border-color: var(--green); box-shadow: 0 6px 0 #18965D; animation: pop .4s ease; }
.pick.bad { background: #FFF0F0; border-color: var(--red); opacity: .5; animation: shake .4s ease; cursor: default; }
.pick.hint { animation: pulse 1s ease-in-out infinite; border-color: var(--yellow); box-shadow: 0 6px 0 #E0A800; }
.choice.with-dots { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; height: 96px; }
.mini-dots { font-size: 12px; letter-spacing: 2px; color: var(--muted); margin-top: 4px; }
.choice.good .mini-dots { color: #fff; }

/* Jeu « trier » */
.baskets.n3 { grid-template-columns: repeat(3, 1fr); }
.zone.tri { --zc: var(--lc); border-color: var(--zc); background: color-mix(in srgb, var(--zc) 9%, white); color: color-mix(in srgb, var(--zc) 75%, black); min-height: 170px; }
.zone.tri .zhead { justify-content: center; gap: 8px; }
.zemoji { font-size: 32px; }
.zkey { display: none; }
.zone.tri.over { box-shadow: 0 0 0 6px color-mix(in srgb, var(--zc) 25%, transparent); }
.obj.shake, .link-card.shake { animation: shake .4s ease; }

/* Jeu « relier » */
.link-board { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; width: min(560px, 100%); user-select: none; }
.link-col { display: flex; flex-direction: column; gap: 12px; }
.link-mid { font-size: 36px; color: var(--muted); }
.link-card {
  --pc: var(--line); min-height: 84px; padding: 6px 12px; border-radius: 22px; cursor: pointer;
  font-size: 46px; line-height: 1.1; background: var(--card); border: 4px solid var(--line); box-shadow: 0 5px 0 var(--line); font-weight: 800;
}
.link-card.selected { border-color: var(--yellow); background: #FFF3D6; transform: scale(1.04); }
.link-card.done { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, white); box-shadow: 0 5px 0 var(--pc); cursor: default; animation: pop .4s ease; }

/* Jeu « memory » */
.memo-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 120px)); }
.memo-grid.c4 { grid-template-columns: repeat(4, minmax(0, 120px)); }
.memo { position: relative; aspect-ratio: 1; border-radius: 22px; border: 4px solid var(--lc); cursor: pointer; padding: 0; background: var(--lc); box-shadow: 0 5px 0 color-mix(in srgb, var(--lc) 70%, black); font-size: 54px; }
.memo-back, .memo-front { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 18px; transition: opacity .2s, transform .25s; }
.memo-back { font-size: 36px; color: #fff; }
.memo-front { background: var(--card); opacity: 0; transform: scale(.6); }
.memo.open .memo-front { opacity: 1; transform: none; }
.memo.open .memo-back { opacity: 0; }
.memo.matched { border-color: var(--green); box-shadow: 0 5px 0 #18965D; cursor: default; }
.memo.matched .memo-front { background: #E4F4EA; }

/* Jeu « chasse » */
.cible { flex: 1; font-weight: 800; font-size: 26px; background: var(--card); border-radius: 999px; padding: 4px 18px; border: 3px solid var(--lc); text-align: center; }
.bubble-btn.emoji { font-size: 46px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: 20px; }
  .logo-scene { order: -1; max-width: 360px; margin: 0 auto; }
  .features { grid-template-columns: 1fr; }
  .checkout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand-logo { width: 64px; height: 64px; }
  .wordmark { font-size: 28px; }
  .brand.small .brand-logo { width: 52px; height: 52px; }
  .brand.small .wordmark { font-size: 22px; }
  .brand.small .brand-method { display: none; }
  .top > .btn, .top-actions { margin-left: 0; width: 100%; justify-content: flex-start; }
  .kid-head { order: 3; }
  .kid-card { width: calc(50% - 9px); padding: 14px 8px; }
  .kid-avatar.big { width: 84px; height: 84px; font-size: 54px; }
  .panel { padding: 18px 16px; }
  .pick { min-width: 88px; min-height: 88px; padding: 6px 10px; }
  .pick-box { width: 56px; height: 56px; }
  .pick-e { font-size: 46px; }
  .modele-e { font-size: 64px; }
  .baskets.n3 { gap: 8px; }
  .baskets.n3 .zone { padding: 8px 6px 10px; }
  .baskets.n3 .zhead span:last-child { font-size: 16px; }
  .link-card { font-size: 34px; min-height: 68px; }
  .memo-grid, .memo-grid.c4 { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .stats dd { font-size: 18px; }
  .cible { font-size: 20px; }
}

/* Tarifs dégressifs et promesse « à vie » */
.tarifs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tarif { background: var(--card); border: 3px solid var(--line); border-radius: 18px; padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.tarif.on { border-color: #635BFF; box-shadow: 0 0 0 4px rgba(99, 91, 255, .15); }
.tarif-qui { font-weight: 700; color: var(--muted); font-size: 15px; }
.tarif-prix { font-size: 28px; line-height: 1.1; }
.tarif-vie { font-weight: 800; color: #137A47; font-size: 15px; }
.promise { margin: 8px 0 0 !important; font-weight: 800; color: #137A47; background: #E4F4EA; border-radius: 14px; padding: 8px 12px; }
.co-once { font-size: 20px; color: var(--muted); font-weight: 700; }
@media (max-width: 560px) { .tarif-prix { font-size: 22px; } .tarif { padding: 8px 4px; } }

/* Ruban « Version de test » */
.test-ribbon { position: fixed; z-index: 30; bottom: 10px; left: 10px; pointer-events: none; background: #FFE2B8; color: #8A4B00; font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 2px 12px; opacity: .9; }
@media print { .test-ribbon { display: none; } }

/* Accueil : méthode de Singapour et moment de partage */
.eyebrow { display: inline-block; margin: 0 0 10px; padding: 4px 14px; border-radius: 999px; background: #FDE8EC; color: #B4233C; font-weight: 800; font-size: 16px; }
.band { background: var(--card); border-radius: 32px; padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.band h2 { font-size: clamp(26px, 3.6vw, 34px); }
.band-lead { margin: 0; font-size: 19px; font-weight: 600; }
.band-note { margin: 0; color: var(--muted); font-weight: 600; }
.band .features { grid-template-columns: repeat(3, 1fr); }
.band .feature { box-shadow: none; border: 3px solid var(--bg-2); }
.partage { background: linear-gradient(180deg, #FFF7EA, #FFFFFF 40%); }
.cpa { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: none; }
.cpa-step { position: relative; border-radius: 22px; padding: 16px; background: #F3F8FF; border: 3px solid #CFE2FF; }
.cpa-step:nth-child(2) { background: #F3FBF6; border-color: #C8EBD6; }
.cpa-step:nth-child(3) { background: #FFF5EC; border-color: #FFD9B8; }
.cpa-step h3 { margin: 6px 0 4px; font-size: 22px; }
.cpa-step p { margin: 0; font-weight: 600; color: var(--muted); font-size: 17px; }
.cpa-ico { font-size: 38px; }
.cpa-step:not(:last-child)::after { content: '➜'; position: absolute; right: -16px; top: 50%; translate: 0 -50%; font-size: 22px; color: var(--muted); z-index: 1; }
.foot p { margin: 2px 0; }
@media (max-width: 760px) {
  .band .features, .cpa { grid-template-columns: 1fr; }
  .cpa-step:not(:last-child)::after { content: '⬇'; right: 50%; top: auto; bottom: -20px; translate: 50% 0; }
  .band { padding: 20px 16px; }
}


/* Chiffres et signes qui flottent autour du logo */
.deco { position: absolute; z-index: 1; translate: -50% -50%; font-weight: 800; line-height: 1; color: var(--c); text-shadow: 0 3px 0 rgba(43, 42, 76, .15); animation: bob 3.2s ease-in-out var(--d) infinite alternate; pointer-events: none; }
.deco.n { font-size: clamp(28px, 4.2vw, 44px); }
.deco.s { font-size: clamp(32px, 4.8vw, 50px); }
.deco.st { font-size: clamp(20px, 2.8vw, 30px); }
@keyframes bob { from { transform: translateY(-6px) rotate(-8deg); } to { transform: translateY(7px) rotate(8deg); } }

/* Mot de passe */
.pwd-block { display: flex; flex-direction: column; gap: 6px; }
.pwd-wrap { position: relative; display: block; }
.pwd-wrap input { padding-right: 56px !important; }
.pwd-toggle { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 44px; height: 40px; border: 0; background: transparent; font-size: 20px; cursor: pointer; border-radius: 10px; }
.pwd-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 14px; font-weight: 700; color: var(--muted); }
.pwd-rules li::before { content: '○ '; }
.pwd-rules li.ok { color: #137A47; }
.pwd-rules li.ok::before { content: '✓ '; }
.sim-mail { width: 100%; border: 2px dashed #E8C64A; background: #FFFCF0; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* Panier famille */
.co-kids { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.co-kid label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 16px; border: 3px solid var(--line); background: #fff; cursor: pointer; }
.co-kid.on label { border-color: #635BFF; }
.co-kid input { width: 22px; height: 22px; flex: none; }
.co-kid-name { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.co-kid-prix { font-weight: 800; font-size: 20px; }
.co-recap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.co-recap li { display: flex; gap: 8px; align-items: baseline; padding: 6px 12px; border-radius: 12px; background: #FFFDF8; border: 2px solid var(--bg-2); }
.co-recap li strong { margin-left: auto; }
.famille-total { font-weight: 800; font-size: 20px; }

/* Textes légaux */
.legal { max-width: 760px; margin-inline: auto; line-height: 1.6; }
.legal h2 { font-size: 20px; margin: 26px 0 6px; }
.legal p { margin: 6px 0; }
.legal .legal-puce { padding-left: 22px; position: relative; }
.legal .legal-puce::before { content: '•'; position: absolute; left: 6px; color: var(--muted); }
.legal-links a { color: inherit; }
.check.renonce { font-size: 14px; font-weight: 500; margin: 12px 0; text-align: left; }
.check a { color: inherit; text-decoration: underline; }
