/* ===== Nideye · 16 jours d'activisme ===== */
:root {
  --ink: #2b1d17;
  --ink-2: #4a352b;
  --paper: #fbf3e7;
  --paper-2: #f3e3cd;
  --orange: #f0641e;
  --orange-deep: #c44516;
  --orange-soft: #fcd6ba;
  --sun: #f2a33a;
  --green: #4d8757;
  --green-soft: #dbe9d6;
  --amber-soft: #fde3c2;
  --red: #b8322a;
  --red-soft: #f6d3cc;
  --display: "Bricolage Grotesque", "Atkinson Hyperlegible", sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --radius: 14px;
  --shadow: 5px 5px 0 var(--ink);
  --pad: clamp(1.1rem, 4vw, 3.5rem);
}
body[data-mode="kids"] {
  --display: "Fredoka", "Atkinson Hyperlegible", sans-serif;
  --paper: #fff5e8;
  --radius: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.06rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before { /* grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .32; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .11 0 0 0 0 .09 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body[data-mode="adult"] .only-kids, body[data-mode="kids"] .only-adult { display: none !important; }

h1, h2, h3 { font-family: var(--display); line-height: 1.02; margin: 0; letter-spacing: -.02em; }
body[data-mode="kids"] h1, body[data-mode="kids"] h2 { letter-spacing: 0; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 200; background: var(--ink); color: var(--paper); padding: .5rem 1rem; border-radius: 8px; }

/* ---------- Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.35em; border-radius: 999px; border: 2.5px solid var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 1.02rem; text-decoration: none;
  background: var(--paper); color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: .45; }
.btn-primary { background: var(--orange); color: var(--paper); }
.btn-ink { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--orange-deep); }
.btn-paper { background: var(--paper); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 40px; padding: .45em 1em; font-size: .92rem; }
.btn.loading { opacity: .7; pointer-events: none; }

/* ---------- Sortie rapide */
.quick-exit {
  position: fixed; right: clamp(.7rem, 2vw, 1.4rem); bottom: clamp(.7rem, 2vw, 1.4rem); z-index: 90;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .7rem 1.1rem; border-radius: 999px; border: 2.5px solid var(--paper);
  background: var(--ink); color: var(--paper); font-weight: 700; font-size: .95rem;
  box-shadow: 0 8px 26px rgba(43, 29, 23, .35);
}
.quick-exit svg { width: 20px; height: 20px; }
.quick-exit:hover { background: var(--red); }

/* ---------- Barre du haut */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
  padding: .7rem var(--pad);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}
/* Logo NIDÉYÉ.ORG — identique à celui des autres pages de nideye.org */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(/orange/fonts/archivo-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; }
.brand { display: inline-flex; align-items: center; gap: .7rem; min-width: 0; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #000; flex: 0 0 auto; font-family: "Archivo", Arial, Helvetica, sans-serif; }
.logo img { width: 36px; height: 36px; display: block; }
.logo b { font-stretch: 125%; font-weight: 900; font-size: 19px; letter-spacing: .01em; line-height: 1; }
.brand-tag { font-size: .8rem; font-weight: 700; color: var(--orange-deep); text-decoration: none; border: 2px solid currentColor; border-radius: 999px; padding: 1px 8px; line-height: 1.3; }
.foot .foot-logo { color: var(--paper); margin-bottom: .6rem; justify-self: start; }
.nav { display: flex; gap: 1.3rem; justify-content: center; font-weight: 700; font-size: .95rem; }
.nav a { text-decoration: none; padding: .3rem 0; background: linear-gradient(var(--orange), var(--orange)) 0 100% / 0 3px no-repeat; transition: background-size .25s; }
.nav a:hover { background-size: 100% 3px; }
.controls { display: flex; gap: .6rem; align-items: center; justify-self: end; }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; padding: 3px; background: var(--paper); }
.seg button { border: 0; background: transparent; padding: .38rem .8rem; border-radius: 999px; font-weight: 700; font-size: .88rem; min-height: 36px; transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.mode-seg button[aria-pressed="true"] { background: var(--orange); color: var(--paper); }
@media (max-width: 1020px) {
  .topbar { grid-template-columns: auto auto; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; gap: 1rem; padding-bottom: .1rem; scrollbar-width: none; }
}
@media (max-width: 640px) {
  /* Le logo NIDÉYÉ.ORG garde toute sa ligne ; les boutons passent dessous */
  .topbar { grid-template-columns: 1fr; gap: .5rem; padding-top: .55rem; padding-bottom: .55rem; }
  .controls { grid-row: 2; justify-self: start; }
  .nav { grid-row: 3; min-width: 0; }
  .nav a { white-space: nowrap; flex: 0 0 auto; }
}
@media (max-width: 560px) {
  .brand-tag { display: none; }
  .seg button { padding: .34rem .55rem; font-size: .8rem; }
  .controls { gap: .35rem; }
  .logo b { font-size: 16px; }
}

/* ---------- Hero */
.hero {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center;
  padding: clamp(2.5rem, 7vw, 6rem) var(--pad) clamp(3rem, 7vw, 6rem);
  overflow: hidden; isolation: isolate;
}
.hero::after {
  content: ""; position: absolute; right: -12vw; top: -10vw; width: 52vw; height: 52vw; border-radius: 50%; z-index: -1;
  background: repeating-linear-gradient(-45deg, var(--orange-soft) 0 14px, transparent 14px 28px);
  opacity: .75;
}
.kicker { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .82rem; margin-bottom: 1.2rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.35); } }
.hero h1 { font-weight: 800; }
.hero-a { display: block; font-size: clamp(4.2rem, 14vw, 11.5rem); color: var(--orange); line-height: .85; letter-spacing: -.05em; animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.hero-b { display: block; font-size: clamp(1.9rem, 4.6vw, 3.6rem); margin-top: .4rem; animation: rise .8s .12s cubic-bezier(.2, .8, .2, 1) both; }
.lead { max-width: 36em; margin-top: 1.4rem; font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--ink-2); animation: rise .8s .24s both; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; animation: rise .8s .36s both; }
.hero-kids .btn { margin-top: 1.8rem; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.hero-art { justify-self: center; width: min(100%, 420px); }
.hero-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; transform: rotate(-6deg); }
.hg {
  aspect-ratio: 1; display: grid; place-items: center; border: 2.5px solid var(--ink); border-radius: 10px;
  font-family: var(--display); font-weight: 800; font-size: clamp(1rem, 2.6vw, 1.6rem); background: var(--paper);
  animation: pop .5s calc(var(--i) * 45ms + .3s) cubic-bezier(.3, 1.6, .5, 1) both;
}
.hg.on { background: var(--orange); color: var(--paper); }
.hg:nth-child(3n).on { background: var(--orange-deep); }
.hg.today { box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--orange); position: relative; }
@keyframes pop { from { opacity: 0; transform: scale(.4) rotate(12deg); } }
.hero-status { margin-top: 2rem; text-align: center; font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { width: min(80%, 320px); }
}

/* ---------- Blocs adultes */
.block { padding: clamp(3rem, 7vw, 6rem) var(--pad); border-top: 2px solid var(--ink); position: relative; }
.block-dark { background: var(--ink); color: var(--paper); }
.block-orange { background: var(--orange); color: var(--ink); }
.block-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.2rem 2rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3rem); }
.block-head h2 { font-size: clamp(2.2rem, 5.5vw, 4.4rem); font-weight: 800; }
.block-head p { margin-top: .7rem; max-width: 40em; font-size: 1.1rem; opacity: .85; }
.num { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 8vw, 6rem); line-height: .8; color: transparent; -webkit-text-stroke: 2px currentColor; }
.block-dark .num { -webkit-text-stroke-color: var(--orange); }
.pill { align-self: center; border: 2px solid var(--ink); border-radius: 999px; padding: .4rem 1rem; font-weight: 700; background: var(--orange-soft); white-space: nowrap; }
@media (max-width: 700px) { .block-head { grid-template-columns: auto 1fr; } .pill { grid-column: 1 / -1; justify-self: start; } }

/* Calendrier */
.cal { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.cal li { animation: rise .5s calc(var(--i) * 30ms) both; }
.cal-cell {
  position: relative; width: 100%; height: 100%; min-height: 168px; text-align: left;
  display: grid; grid-template-rows: auto auto 1fr; padding: 1rem 1rem 1.1rem; gap: .1rem;
  border: 2.5px solid var(--ink); border-radius: var(--radius); background: var(--paper-2);
  box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s, background .3s;
  overflow: hidden;
}
.cal-cell::before { /* volet */
  content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(43, 29, 23, .05) 10px 20px); pointer-events: none;
}
.cal-cell:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: 8px 8px 0 var(--ink); }
.cal-num { font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: .9; }
.cal-month { font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; }
.cal-title { align-self: end; font-weight: 700; font-size: .95rem; line-height: 1.25; margin-top: .6rem; }
.cal-day { position: absolute; top: .7rem; right: .8rem; font-family: var(--display); font-weight: 700; font-size: .85rem; opacity: .5; }
.cal-today { position: absolute; top: .65rem; right: .7rem; background: var(--ink); color: var(--paper); font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; z-index: 1; }
.cal-cell.is-today .cal-day { display: none; }
.cal-cell.is-today { outline: 3px dashed var(--orange); outline-offset: 5px; }
.cal-cell.opened { background: var(--orange); color: var(--paper); }
.cal li:nth-child(3n) .cal-cell.opened { background: var(--orange-deep); }
.cal-cell.opened .cal-day { opacity: .8; }
@media (max-width: 480px) { .cal { grid-template-columns: 1fr 1fr; gap: 10px; } .cal-cell { min-height: 150px; padding: .8rem; } .cal-num { font-size: 2rem; } .cal-title { font-size: .86rem; } }

/* Dialogue jour */
.day-dialog { border: 3px solid var(--ink); border-radius: 22px; padding: 0; max-width: min(560px, 92vw); width: 100%; background: var(--paper); color: var(--ink); box-shadow: 10px 10px 0 var(--orange); }
.day-dialog[open] { animation: dlg .35s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes dlg { from { opacity: 0; transform: translateY(30px) scale(.96); } }
.day-dialog::backdrop { background: rgba(43, 29, 23, .62); backdrop-filter: blur(3px); }
.dd-inner { padding: clamp(1.4rem, 4vw, 2.2rem); display: grid; gap: .55rem; }
.dd-date { display: flex; align-items: baseline; gap: .5rem; font-family: var(--display); }
.dd-date strong { font-size: 3.4rem; color: var(--orange); line-height: .9; }
.dd-date span { font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.dd-date em { margin-left: auto; font-style: normal; font-size: .85rem; font-weight: 700; border: 2px solid var(--ink); padding: .1rem .6rem; border-radius: 999px; }
.day-dialog h3 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: .6rem; }
.dd-label { margin-top: .6rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--orange-deep); }
.dd-action { background: var(--orange-soft); border-left: 5px solid var(--orange); padding: .8rem 1rem; border-radius: 0 10px 10px 0; font-weight: 700; }
.dd-nav { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1.2rem; flex-wrap: wrap; }

/* Quiz */
.quiz { max-width: 820px; }
.quiz-dots { display: flex; gap: 8px; margin-bottom: 1.2rem; }
.quiz-dots span { flex: 1; height: 6px; border-radius: 3px; background: rgba(251, 243, 231, .18); transition: background .3s; }
.quiz-dots .done { background: var(--orange); }
.quiz-dots .cur { background: var(--paper); }
.quiz-card { background: var(--paper); color: var(--ink); border-radius: 22px; padding: clamp(1.5rem, 4vw, 2.6rem); box-shadow: 8px 8px 0 var(--orange); animation: flip .45s cubic-bezier(.2, .9, .3, 1.2); display: grid; gap: 1.1rem; justify-items: start; }
@keyframes flip { from { opacity: 0; transform: perspective(900px) rotateX(-14deg) translateY(16px); } }
.quiz-meta { font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--orange-deep); }
.quiz-q { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3.6vw, 2.4rem); line-height: 1.12; }
.quiz-btns { display: flex; gap: 1rem; flex-wrap: wrap; width: 100%; }
.qb { flex: 1; min-width: 140px; min-height: 64px; font-size: 1.25rem; }
.qb-true { background: var(--green-soft); }
.qb-false { background: var(--red-soft); }
.quiz-verdict { font-family: var(--display); font-weight: 800; font-size: 1.6rem; display: inline-flex; padding: .1rem .8rem; border-radius: 10px; }
.quiz-verdict.ok { background: var(--green-soft); color: var(--green); }
.quiz-verdict.ko { background: var(--red-soft); color: var(--red); }
.quiz-exp { font-size: 1.1rem; max-width: 42em; }
.quiz-end { justify-items: center; text-align: center; }
.quiz-ring { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--orange) calc(var(--p) * 360deg), var(--paper-2) 0); border: 3px solid var(--ink); }
.quiz-ring span { width: 108px; height: 108px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 2rem; border: 3px solid var(--ink); }
.quiz-score { font-family: var(--display); font-weight: 700; font-size: 1.4rem; }
.quiz-msg { max-width: 30em; }

/* Violentomètre */
.meter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.meter-panel { display: grid; gap: 1rem; position: sticky; top: 100px; }
.meter-left { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--orange-deep); }
.meter-card { border: 2.5px solid var(--ink); border-radius: 20px; padding: 1.5rem; background: var(--paper-2); box-shadow: var(--shadow); animation: flip .4s; }
.meter-prompt { font-weight: 700; color: var(--ink-2); }
.meter-text { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.15; margin-top: .3rem; }
.meter-done p { font-size: 1.1rem; font-weight: 700; }
.meter-btns { display: grid; gap: .6rem; }
.mbtn { display: flex; align-items: center; gap: .8rem; text-align: left; min-height: 56px; padding: .6rem 1rem; border: 2.5px solid var(--ink); border-radius: 14px; font-weight: 700; font-size: 1.02rem; background: var(--paper); transition: transform .15s, background .2s; }
.mbtn:hover { transform: translateX(6px); }
.mbtn-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }
.mbtn-g .mbtn-dot { background: var(--green); } .mbtn-g:hover { background: var(--green-soft); }
.mbtn-o .mbtn-dot { background: var(--sun); } .mbtn-o:hover { background: var(--amber-soft); }
.mbtn-r .mbtn-dot { background: var(--red); } .mbtn-r:hover { background: var(--red-soft); }
.meter-fb { font-weight: 700; padding: .7rem 1rem; border-radius: 12px; animation: rise .3s; }
.meter-fb.ok { background: var(--green-soft); color: var(--green); }
.meter-fb.ko { background: var(--red-soft); color: var(--red); }
.ruler { border: 2.5px solid var(--ink); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.zone { padding: 1.1rem 1.2rem 1.1rem 1.6rem; min-height: 130px; position: relative; }
.zone + .zone { border-top: 2px solid var(--ink); }
.zone::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; }
.zone-g { background: var(--green-soft); } .zone-g::before { background: var(--green); }
.zone-o { background: var(--amber-soft); } .zone-o::before { background: var(--sun); }
.zone-r { background: var(--red-soft); } .zone-r::before { background: var(--red); }
.zone-head { display: flex; flex-wrap: wrap; gap: .2rem .8rem; align-items: baseline; }
.zone-head strong { font-family: var(--display); font-size: 1.3rem; }
.zone-head span { font-size: .92rem; opacity: .8; }
.zone-items { list-style: none; padding: 0; margin: .7rem 0 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.zone-items li { display: inline-flex; align-items: center; gap: .35rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: .3rem .8rem .3rem .45rem; font-size: .9rem; font-weight: 700; animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }
.ico { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 50%; flex: none; }
.ico svg { width: 14px; height: 14px; }
.zone-items .ok .ico { background: var(--green); color: var(--paper); }
.zone-items .ko .ico { background: var(--red); color: var(--paper); }
@media (max-width: 820px) { .meter { grid-template-columns: 1fr; } .meter-panel { position: static; } }

/* Mur */
.wall { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.wall-form { display: grid; gap: 1rem; justify-items: start; }
.wall-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .6rem; width: 100%; }
.pledge { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .85rem 1rem; border: 2.5px solid var(--ink); border-radius: 14px; background: color-mix(in srgb, var(--paper) 88%, var(--orange)); cursor: pointer; font-weight: 700; transition: transform .15s, background .2s, box-shadow .15s; }
.pledge:hover { transform: translateX(4px); }
.pledge.sel { background: var(--paper); box-shadow: 4px 4px 0 var(--ink); }
.pledge input { appearance: none; width: 24px; height: 24px; border: 2.5px solid var(--ink); border-radius: 50%; margin: 0; display: grid; place-items: center; background: var(--paper); }
.pledge input:checked { background: var(--ink); box-shadow: inset 0 0 0 4px var(--paper); }
.pledge input:disabled { opacity: .4; }
.pledge-n { font-family: var(--display); font-size: .9rem; background: var(--ink); color: var(--paper); border-radius: 999px; padding: .1rem .6rem; min-width: 2.2em; text-align: center; }
.pledge-n:empty { display: none; }
.wall-msg { font-weight: 700; min-height: 1.5em; }
.wall-board { background: var(--ink); color: var(--paper); border-radius: 22px; padding: clamp(1.3rem, 3vw, 2rem); display: grid; gap: 1.2rem; box-shadow: 8px 8px 0 var(--orange-deep); }
.wall-total { font-family: var(--display); font-size: 1.2rem; font-weight: 700; }
.wall-total strong { display: block; font-size: clamp(3.4rem, 9vw, 6rem); line-height: .9; color: var(--orange); letter-spacing: -.03em; }
.wall-grid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; }
.wall-grid span { aspect-ratio: 1; border-radius: 3px; background: rgba(251, 243, 231, .1); transition: background .5s calc(var(--i) * 6ms); }
.wall-grid span.lit { background: var(--orange); }
.wall-grid span.lit:nth-child(5n) { background: var(--sun); }
.wall-grid span.fresh { background: var(--paper); animation: fresh 1.2s ease-in-out 3; }
@keyframes fresh { 50% { transform: scale(1.8); border-radius: 50%; } }
.wall-board .btn { justify-self: start; }
@media (max-width: 820px) { .wall { grid-template-columns: 1fr; } }

/* ---------- Aide */
.help { padding: clamp(3rem, 7vw, 5.5rem) var(--pad); border-top: 2px solid var(--ink); background: var(--paper-2); }
.help-head h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
.help-head p { margin-top: .6rem; font-size: 1.15rem; }
.help-nums { list-style: none; padding: 0; margin: 2rem 0 .8rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.help-nums a { display: grid; gap: .2rem; padding: 1.1rem 1.2rem; border: 2.5px solid var(--ink); border-radius: var(--radius); background: var(--paper); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; height: 100%; }
.help-nums a:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); }
.help-nums strong { font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--orange-deep); }
.help-nums span { font-weight: 700; }
.help-note { font-size: .92rem; opacity: .8; }
.help-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem 3rem; margin-top: 2.5rem; }
.help-tips h3 { font-size: 1.35rem; margin-bottom: .5rem; }

/* ---------- Pied */
.foot { padding: 2.5rem var(--pad) 5.5rem; background: var(--ink); color: var(--paper); display: grid; gap: .5rem; }
.foot-small { font-size: .86rem; opacity: .7; max-width: 52em; }
.foot-url { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 6vw, 3.6rem); color: var(--orange); letter-spacing: -.03em; margin-top: 1rem; }

/* ---------- Toast & confettis */
.toast { position: fixed; left: 50%; bottom: 5.2rem; transform: translate(-50%, 30px); opacity: 0; z-index: 120; pointer-events: none; background: var(--ink); color: var(--paper); font-weight: 700; padding: .8rem 1.3rem; border-radius: 999px; border: 2px solid var(--orange); transition: opacity .25s, transform .25s; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 130; overflow: hidden; }
.confetti span { position: absolute; top: -20px; border-radius: 2px; animation: fall 2.6s cubic-bezier(.3, .6, .5, 1) forwards; }
@keyframes fall { to { transform: translate(var(--dx), 108vh) rotate(var(--r)); } }

/* =====================================================================
   ENFANTS
   ===================================================================== */
body[data-mode="kids"] { background-image: radial-gradient(var(--orange-soft) 2px, transparent 2.5px); background-size: 26px 26px; }
body[data-mode="kids"] .btn { border-radius: 999px; font-size: 1.1rem; min-height: 54px; }
.hero-kids .hero-a { font-size: clamp(2.8rem, 8vw, 6.2rem); line-height: .95; letter-spacing: -.01em; }
.hero-kids .hero-b { font-size: clamp(2.8rem, 8vw, 6.2rem); color: var(--orange); line-height: .95; margin-top: 0; }
.hero-kids::after { background: radial-gradient(circle, var(--orange-soft) 0 30%, transparent 30.5%) 0 0 / 60px 60px; border-radius: 40%; opacity: .9; }
.badges { background: var(--paper); border: 3px solid var(--ink); border-radius: 30px; padding: 1.5rem; box-shadow: 8px 8px 0 var(--orange); transform: rotate(2deg); }
.badges-title { font-family: var(--display); font-weight: 700; font-size: 1.4rem; margin-bottom: 1rem; }
.badge-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.badge { display: grid; justify-items: center; gap: .4rem; text-decoration: none; text-align: center; }
.badge-ico { width: clamp(52px, 9vw, 72px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; border: 3px dashed var(--ink); color: rgba(43, 29, 23, .25); background: var(--paper-2); transition: transform .3s; }
.badge-ico svg { width: 58%; height: 58%; }
.badge-t { font-size: .72rem; font-weight: 700; line-height: 1.15; }
.badge.won .badge-ico { border-style: solid; background: var(--orange); color: var(--paper); animation: pop .6s cubic-bezier(.3, 1.6, .5, 1); }
.badge:hover .badge-ico { transform: rotate(-10deg) scale(1.06); }

.kblock { margin: 0 var(--pad) clamp(1.5rem, 3vw, 2.5rem); padding: clamp(1.5rem, 4vw, 3rem); background: var(--paper); border: 3px solid var(--ink); border-radius: 34px; box-shadow: 8px 8px 0 var(--ink); }
.kblock-alt { background: #ffe7cf; }
.khead { display: flex; gap: 1.2rem; align-items: flex-start; margin-bottom: 1.8rem; }
.knum { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: var(--paper); font-family: var(--display); font-weight: 700; font-size: 2rem; border: 3px solid var(--ink); transform: rotate(-8deg); }
.khead h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 700; }
.khead p { margin-top: .5rem; font-size: 1.12rem; max-width: 40em; }
.kcard, .scard { background: var(--paper); border: 3px solid var(--ink); border-radius: 26px; padding: 1.5rem; display: grid; gap: 1rem; justify-items: start; align-content: start; animation: flip .4s; }
.kblock-alt .kcard, .kblock-alt .scard { background: #fffaf3; }
.kmeta { font-weight: 700; font-size: .9rem; color: var(--orange-deep); }
.kq { font-family: var(--display); font-weight: 600; font-size: clamp(1.35rem, 3vw, 1.9rem); line-height: 1.2; }
.kbig { font-family: var(--display); font-weight: 700; font-size: 2.4rem; color: var(--orange); }
.kfb { font-size: 1.1rem; padding: .8rem 1rem; border-radius: 16px; animation: rise .3s; }
.kfb.ok { background: var(--green-soft); }
.kfb.ko { background: var(--amber-soft); }
.kdone { font-family: var(--display); font-weight: 600; font-size: 1.25rem; color: var(--orange-deep); margin-top: 1rem; }
.kdone:empty { display: none; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px) rotate(-1deg); } 40%, 80% { transform: translateX(8px) rotate(1deg); } }

/* Feu */
.klight { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.2rem, 4vw, 3rem); align-items: start; }
.tower { background: var(--ink); border-radius: 40px; padding: 14px; display: grid; gap: 12px; border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--orange); }
.lamp { display: flex; align-items: center; gap: .8rem; border: 0; background: rgba(251, 243, 231, .06); color: var(--paper); border-radius: 30px; padding: 8px 18px 8px 8px; text-align: left; font-weight: 700; font-size: 1.05rem; transition: background .2s, transform .15s; min-width: 210px; }
.lamp:hover:not(:disabled) { background: rgba(251, 243, 231, .16); transform: scale(1.03); }
.lamp-bulb { width: 62px; height: 62px; border-radius: 50%; flex: none; border: 3px solid rgba(251, 243, 231, .5); opacity: .55; transition: opacity .2s, transform .3s; }
.lamp-g .lamp-bulb { background: #7fb07a; } .lamp-o .lamp-bulb { background: var(--sun); } .lamp-r .lamp-bulb { background: #d8452e; }
.lamp:hover:not(:disabled) .lamp-bulb, .lamp.lit .lamp-bulb { opacity: 1; transform: scale(1.06); }
.lamp.lit { background: rgba(251, 243, 231, .2); }
.lamp:disabled:not(.lit) { opacity: .5; }
@media (max-width: 720px) {
  .klight { grid-template-columns: 1fr; }
  .tower { grid-template-columns: repeat(3, 1fr); border-radius: 30px; }
  .lamp { min-width: 0; flex-direction: column; padding: 10px 6px; text-align: center; font-size: .9rem; gap: .4rem; }
  .lamp-bulb { width: 52px; height: 52px; }
}

/* Secrets */
.ksecret { display: grid; grid-template-columns: 1fr minmax(0, 1.6fr) 1fr; gap: 1rem; align-items: stretch; }
.sbox { border: 3px solid var(--ink); border-radius: 26px; padding: 1.2rem .8rem; display: grid; justify-items: center; align-content: center; gap: .5rem; font-family: var(--display); font-weight: 600; font-size: 1.15rem; text-align: center; transition: transform .15s, box-shadow .15s; box-shadow: 5px 5px 0 var(--ink); min-height: 180px; }
.sbox:hover:not(:disabled) { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 8px 8px 0 var(--ink); }
.sbox:disabled { opacity: .7; }
.sbox-keep { background: var(--green-soft); color: var(--ink); }
.sbox-keep .sbox-ico { color: var(--green); }
.sbox-tell { background: var(--orange); color: var(--paper); }
.sbox-tell .sbox-ico { color: var(--paper); }
.sbox-tell .sbox-ico svg circle { fill: var(--orange); }
.sbox-ico svg { width: 56px; height: 56px; }
.sbox-n { font-size: 1.6rem; font-weight: 700; background: var(--paper); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 999px; min-width: 2.2em; }
@media (max-width: 760px) {
  .ksecret { grid-template-columns: 1fr 1fr; }
  .scard { grid-column: 1 / -1; grid-row: 1; }
  .sbox { min-height: 140px; font-size: 1rem; }
}

/* Mots magiques */
.kmagic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.magic { position: relative; display: grid; gap: .6rem; align-content: start; justify-items: center; text-align: center; padding: 1.6rem 1rem 1.4rem; border: 3px solid var(--ink); border-radius: 30px; background: var(--paper-2); box-shadow: 6px 6px 0 var(--ink); transform: rotate(calc((var(--i) - 1) * 2deg)); transition: transform .2s, background .3s, color .3s; min-height: 210px; }
.magic:hover { transform: rotate(0) translateY(-4px); }
.magic-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--display); font-weight: 700; }
.magic-w { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1; }
.magic-d { font-size: 1rem; opacity: 0; max-height: 0; transition: opacity .3s, max-height .4s; overflow: hidden; }
.magic.on { background: var(--orange); color: var(--paper); }
.magic.on .magic-n { background: var(--paper); color: var(--orange-deep); }
.magic.on .magic-d { opacity: 1; max-height: 12em; }
.magic.pop { animation: magicpop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes magicpop { 40% { transform: scale(1.1) rotate(-3deg); } }
@media (max-width: 760px) { .kmagic { grid-template-columns: 1fr; } .magic { min-height: 0; } }

/* Main */
.khand { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.2rem, 4vw, 3rem); align-items: center; }
.hand-art { display: grid; place-items: center; }
.hand-svg { width: min(100%, 380px); height: auto; overflow: visible; }
.hand-svg rect { transition: fill .3s; }
.hand-name { font-family: var(--display); font-weight: 700; font-size: 17px; fill: var(--ink); }
.hand-palm { font-family: var(--display); font-weight: 700; font-size: 17px; fill: var(--ink); }
.hand-116 { font-family: var(--display); font-weight: 700; font-size: 22px; fill: var(--orange-deep); }
.hand-form { display: grid; gap: .7rem; }
.hand-field { display: flex; align-items: center; gap: .7rem; }
.hand-dot { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--paper); font-family: var(--display); font-weight: 700; border: 2.5px solid var(--ink); }
.hand-field input { flex: 1; min-width: 0; font: inherit; font-size: 1.15rem; font-weight: 700; padding: .7rem 1rem; border: 2.5px solid var(--ink); border-radius: 16px; background: var(--paper); color: var(--ink); }
.hand-field input:focus { outline: 3px solid var(--orange); outline-offset: 2px; }
.hand-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: .5rem; }
@media (max-width: 760px) { .khand { grid-template-columns: 1fr; } }

/* Fleur */
.kflower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.2rem, 4vw, 3rem); align-items: center; }
.flower-art { display: grid; place-items: center; }
.flower-svg { width: min(100%, 440px); height: auto; overflow: visible; }
.petal { cursor: pointer; outline: none; }
.petal path { fill: var(--paper); stroke: var(--ink); stroke-width: 3; transition: fill .35s, transform .25s; transform-origin: 0 -42px; }
.petal text { font-family: var(--display); font-weight: 700; font-size: 18px; fill: var(--ink); pointer-events: none; }
.petal:hover path, .petal:focus-visible path { transform: scale(1.07); fill: var(--orange-soft); }
.petal:focus-visible path { stroke: var(--orange-deep); stroke-width: 4; }
.petal.on path { fill: var(--orange); }
.petal.on:nth-of-type(even) path { fill: var(--sun); }
.petal.on text { fill: var(--paper); }
.petal.last path { animation: petalpop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes petalpop { 40% { transform: scale(1.16); } }
.flower-core { fill: var(--ink); stroke: var(--ink); }
.flower-count { font-family: var(--display); font-weight: 700; font-size: 40px; fill: var(--orange); }
.flower-of { font-family: var(--display); font-weight: 600; font-size: 16px; fill: var(--paper); }
.flower-msg { display: grid; gap: 1rem; align-content: start; }
.flower-text { font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.15; min-height: 2.4em; }
.flower-list { margin: 0; padding-left: 1.6rem; display: grid; gap: .25rem; font-size: .98rem; columns: 1; }
.flower-list li::marker { font-family: var(--display); font-weight: 700; color: var(--orange-deep); }
@media (max-width: 760px) { .kflower { grid-template-columns: 1fr; } }

.kblock-note { background: var(--ink); color: var(--paper); box-shadow: 8px 8px 0 var(--orange); }
.kblock-note h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); color: var(--orange); margin-bottom: 1rem; }
.kblock-note ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .6rem; max-width: 52em; }
body[data-mode="kids"] .help { margin-top: 1rem; }

/* ---------- Impression : main de confiance */
@media print {
  body::before, .topbar, .quick-exit, .foot, .toast, .confetti { display: none !important; }
  body.print-hand main > *:not(#k-hand) { display: none !important; }
  body.print-hand #k-hand { box-shadow: none; border: 0; margin: 0; }
  body.print-hand .hand-form input, body.print-hand .hand-actions, body.print-hand .hand-field .hand-dot { display: none; }
  body.print-hand .khand { grid-template-columns: 1fr; }
  body.print-hand .hand-svg { width: 90%; }
  body { background: #fff !important; }
}
