/* KapslockArt : feuille de style commune
   DA : traits noirs épais, aplats, ombres pleines, papier de carnet, post-it, cases de BD.
   Couleurs relevées sur l'image hors live, l'avatar et les overlays de la chaîne. */

@font-face { font-family: "Luckiest Guy"; src: url("../fonts/luckiest-guy.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Gochi Hand"; src: url("../fonts/gochi-hand.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --ciel: #05a8f7;
  --ciel-clair: #6cc9f9;
  --ciel-ombre: #0388d0;
  --nuage-ombre: #cdebf9;
  --herbe: #12ee6b;
  --herbe-ombre: #00bf4a;
  --feuillage: #24a35c;
  --feuillage-sombre: #2b6a4a;
  --tronc: #c9703c;
  --kaps: #b2e2e8;
  --encre: #0b0b0f;
  --papier: #fbfaf5;
  --ligne: #c5ddf3;
  --marge: #f2869a;
  --rouge: #f5003f;
  --rouge-sombre: #a3001d;
  --postit: #fff59a;
  --postit-rose: #ffc4dd;
  --postit-bleu: #c9ecff;
  --postit-vert: #c8f7c5;
  --violet: #6a43e0;
  --lavande: #bdb6fa;
  --tchat: #26c4ec;
  --gris-ombre: rgba(11, 11, 15, 0.28);

  --trait: 4px;
  --ombre: 6px 6px 0 var(--encre);
  --ombre-petite: 4px 4px 0 var(--encre);
  --rayon: 18px;

  --titre: "Luckiest Guy", "Arial Black", sans-serif;
  --main: "Gochi Hand", "Comic Sans MS", cursive;
  --texte: "Nunito", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: normal; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.saut {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--postit); border: var(--trait) solid var(--encre); padding: 8px 14px;
  font-family: var(--main); font-size: 1.2rem; text-decoration: none; border-radius: 10px;
}
.saut:focus { top: 12px; }

:focus-visible { outline: 4px dashed var(--rouge); outline-offset: 4px; }

/* ---------- Le trait qui tremble (comme un dessin animé image par image) ---------- */
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.tremble, .case::before, .bouton::before, .postit::before, .tablette::before { filter: url(#tremble1); }
[data-trait="2"] .tremble, [data-trait="2"] .case::before, [data-trait="2"] .bouton::before,
[data-trait="2"] .postit::before, [data-trait="2"] .tablette::before { filter: url(#tremble2); }
[data-trait="3"] .tremble, [data-trait="3"] .case::before, [data-trait="3"] .bouton::before,
[data-trait="3"] .postit::before, [data-trait="3"] .tablette::before { filter: url(#tremble3); }

/* ---------- Titres façon lettrage dessiné ---------- */
.titre {
  font-family: var(--titre);
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-shadow:
    3px 0 0 var(--encre), -3px 0 0 var(--encre), 0 3px 0 var(--encre), 0 -3px 0 var(--encre),
    2px 2px 0 var(--encre), -2px -2px 0 var(--encre), 2px -2px 0 var(--encre), -2px 2px 0 var(--encre),
    3px 2px 0 var(--encre), -3px 2px 0 var(--encre), 2px 3px 0 var(--encre), -2px 3px 0 var(--encre),
    7px 7px 0 var(--gris-ombre);
}
.titre-section { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: 0.35em; }
.titre-noir {
  font-family: var(--titre);
  color: var(--encre);
  line-height: 1.1;
}
.main { font-family: var(--main); }
.surligne {
  background: linear-gradient(transparent 55%, var(--postit) 55%, var(--postit) 90%, transparent 90%);
  padding: 0 0.15em;
}

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: var(--papier);
  border-bottom: var(--trait) solid var(--encre);
}
.entete-dedans {
  max-width: 1180px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 52px; height: 52px; transition: transform .2s; }
.logo:hover img { transform: rotate(-12deg) scale(1.08); }
.logo span { font-family: var(--titre); font-size: 1.55rem; letter-spacing: 0.02em; padding-top: 4px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.annonce-cri { white-space: nowrap; }
.nav a {
  font-family: var(--main); font-size: 1.3rem; text-decoration: none;
  padding: 4px 12px; border-radius: 10px; border: 3px solid transparent;
}
.nav a:hover { border-color: var(--encre); background: var(--postit); }
.nav a[aria-current="page"] { background: var(--kaps); border-color: var(--encre); }

/* ---------- Boutons ---------- */
.bouton {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--titre); font-size: 1.15rem; letter-spacing: 0.03em;
  color: var(--encre); background: #fff; text-decoration: none;
  padding: 12px 20px 9px; border: 0; border-radius: 14px; cursor: pointer;
  box-shadow: var(--ombre-petite);
  transition: transform .12s, box-shadow .12s;
}
.bouton::before {
  content: ""; position: absolute; inset: 0; border: var(--trait) solid var(--encre);
  border-radius: inherit; pointer-events: none;
}
.bouton:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 6px 6px 0 var(--encre); }
.bouton:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--encre); }
.bouton-twitch { background: var(--violet); color: #fff; }
.bouton-rouge { background: var(--rouge); color: #fff; }
.bouton-jaune { background: var(--postit); }
.bouton-bleu { background: var(--kaps); }
.bouton small { font-family: var(--texte); font-weight: 800; font-size: .8rem; letter-spacing: 0; }
.point-live {
  width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--encre); flex: none;
}
.est-en-live .point-live { background: var(--rouge); animation: pulse 1.1s infinite; }
@keyframes pulse { 50% { transform: scale(1.35); } }
.statut-live { font-family: var(--main); font-size: 1.15rem; }

/* ---------- Papier de carnet ---------- */
.papier {
  background-color: var(--papier);
  background-image:
    linear-gradient(90deg, transparent 54px, var(--marge) 54px, var(--marge) 56px, transparent 56px),
    repeating-linear-gradient(transparent 0 31px, var(--ligne) 31px 32px);
}
.carnet {
  position: relative; background-color: #fff;
  border: var(--trait) solid var(--encre); border-radius: 8px 8px 14px 14px;
  box-shadow: var(--ombre);
  background-image:
    linear-gradient(90deg, transparent 46px, var(--marge) 46px, var(--marge) 48px, transparent 48px),
    repeating-linear-gradient(transparent 0 33px, var(--ligne) 33px 34px);
  background-position: 0 58px;
  padding: 64px clamp(16px, 4vw, 48px) 32px clamp(56px, 7vw, 72px);
}
.carnet::after {
  /* les anneaux de la spirale, comme sur l'overlay de fin de partie */
  content: ""; position: absolute; left: 18px; right: 18px; top: -22px; height: 46px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='46' viewBox='0 0 44 46'%3E%3Cellipse cx='22' cy='34' rx='7' ry='5' fill='%23d6d2ef' stroke='%230b0b0f' stroke-width='3'/%3E%3Cpath d='M22 34 C 10 30, 10 6, 22 4 C 30 3, 33 10, 30 14' fill='none' stroke='%230b0b0f' stroke-width='7' stroke-linecap='round'/%3E%3Cpath d='M22 34 C 10 30, 10 6, 22 4 C 30 3, 33 10, 30 14' fill='none' stroke='%237a6fd8' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  background-size: 44px 46px;
  pointer-events: none;
}

/* ---------- Cases de BD ---------- */
.case {
  position: relative; background: #fff; border-radius: 6px;
  box-shadow: var(--ombre);
}
.case::before {
  content: ""; position: absolute; inset: 0; border: var(--trait) solid var(--encre);
  border-radius: inherit; pointer-events: none; z-index: 2;
}

/* ---------- Post-it ---------- */
.postit {
  position: relative; background: var(--postit); padding: 22px 20px 18px;
  box-shadow: var(--ombre-petite); border-radius: 3px;
  transform: rotate(var(--r, -1.5deg));
}
.postit::before {
  content: ""; position: absolute; inset: 0; border: 3px solid var(--encre); border-radius: inherit; pointer-events: none;
}
.postit::after {
  /* le scotch */
  content: ""; position: absolute; left: 50%; top: -14px; width: 92px; height: 28px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(255, 255, 255, 0.62); border: 2px solid rgba(11, 11, 15, 0.25);
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.postit.rose { background: var(--postit-rose); }
.postit.bleu { background: var(--postit-bleu); }
.postit.vert { background: var(--postit-vert); }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 8vw, 96px) 16px; }
.dedans { max-width: 1180px; margin: 0 auto; }
.intro-section { max-width: 680px; font-size: 1.15rem; }
.note-main {
  font-family: var(--main); font-size: 1.35rem; line-height: 1.3; color: #3a3a46;
}

/* ---------- Héros : le ciel ---------- */
.ciel {
  position: relative; overflow: hidden;
  background: var(--ciel);
  border-bottom: var(--trait) solid var(--encre);
  min-height: min(88vh, 760px);
  display: grid; place-items: center;
  padding: 40px 16px 180px;
}
.ciel-decor { position: absolute; inset: 0; width: 100%; height: 100%; }
.ciel-contenu { position: relative; z-index: 3; text-align: center; max-width: 900px; }
.ciel-titre svg { width: min(92vw, 860px); height: auto; overflow: visible; }
.ciel-titre text { font-family: var(--titre); }
.sous-titre {
  display: inline-block; margin-top: 6px;
  font-family: var(--main); font-size: clamp(1.4rem, 3.2vw, 2.1rem); color: #fff;
  text-shadow: 2px 0 0 var(--encre), -2px 0 0 var(--encre), 0 2px 0 var(--encre), 0 -2px 0 var(--encre),
    2px 2px 0 var(--encre), -2px -2px 0 var(--encre), 2px -2px 0 var(--encre), -2px 2px 0 var(--encre),
    5px 5px 0 var(--gris-ombre);
  transform: rotate(-2deg);
}
.ciel-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.etiquettes { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.etiquette {
  font-family: var(--main); font-size: 1.05rem; background: #fff; border: 3px solid var(--encre);
  border-radius: 999px; padding: 1px 12px; box-shadow: 3px 3px 0 var(--encre);
  transform: rotate(var(--r, 0deg));
}

.perso {
  position: absolute; z-index: 4; left: clamp(8px, 7vw, 120px); bottom: 26px;
  width: clamp(130px, 17vw, 210px);
}
.perso img { width: 100%; animation: respire 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes respire { 50% { transform: translateY(-6px) rotate(-2deg); } }
.bulle {
  position: absolute; left: 82%; top: -8px; white-space: nowrap;
  background: #fff; border: var(--trait) solid var(--encre); border-radius: 22px;
  padding: 4px 16px; font-family: var(--main); font-size: 1.6rem; box-shadow: var(--ombre-petite);
}
.bulle::after {
  content: ""; position: absolute; left: 10px; bottom: -16px; width: 22px; height: 22px;
  background: #fff; border-left: var(--trait) solid var(--encre); border-bottom: var(--trait) solid var(--encre);
  transform: skewY(35deg) rotate(-20deg);
}
.bulle .cri { display: none; }

.sticker {
  position: absolute; z-index: 2; width: clamp(54px, 7vw, 92px);
  filter: drop-shadow(3px 3px 0 var(--encre));
  transform: rotate(var(--r, 0deg));
  animation: flotte 4s ease-in-out infinite; animation-delay: var(--d, 0s);
}
@keyframes flotte { 50% { translate: 0 -10px; } }

/* ---------- La tablette ---------- */
.zone-tablette {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 56px); align-items: center;
}
.tablette-cadre { position: relative; padding: 0 0 46px 34px; }
.tablette {
  position: relative; background: var(--encre); border-radius: 30px; padding: 16px;
  transform: rotate(-2.5deg); box-shadow: 10px 10px 0 var(--gris-ombre);
}
.tablette::before {
  content: ""; position: absolute; inset: -5px; border: 5px solid var(--encre); border-radius: 34px; pointer-events: none;
}
.ecran {
  position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #1b1b22;
}
.ecran img, .ecran iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.ecran-bouton {
  position: absolute; inset: 0; display: grid; place-items: end end; padding: clamp(10px, 2vw, 18px);
  background: transparent; border: 0; cursor: pointer;
}
.ecran-bouton span {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--titre); font-size: clamp(1rem, 2.4vw, 1.4rem); color: var(--encre);
  background: var(--postit); border: var(--trait) solid var(--encre); border-radius: 16px; padding: 12px 20px 9px;
  box-shadow: var(--ombre-petite); transition: transform .15s;
}
.ecran-bouton:hover span { transform: scale(1.06) rotate(-2deg); }
.ecran-bouton svg { width: 22px; height: 22px; }
.main-gant {
  position: absolute; left: -6px; bottom: -4px; width: clamp(120px, 20vw, 200px); z-index: 3; pointer-events: none;
}
.ecran-note { font-family: var(--main); font-size: 1.05rem; color: #555; margin-top: 18px; padding-left: 34px; }

.prochain { padding: 28px 24px 24px; }
.prochain .titre-noir { font-size: 1.6rem; }
.prochain-quand { font-family: var(--titre); font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.1; margin: 10px 0 4px; color: var(--violet); }
.prochain-quoi { font-family: var(--main); font-size: 1.5rem; line-height: 1.2; }
.prochain-dans { margin-top: 10px; font-weight: 800; }

/* ---------- Planning ---------- */
.planning { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 3vw, 30px); margin-top: 26px; }
.planning .postit { min-height: 220px; }
.jour { font-family: var(--titre); font-size: 1.7rem; line-height: 1; }
.heure {
  display: inline-block; margin: 6px 0 10px; font-family: var(--titre); font-size: 1.1rem;
  background: var(--encre); color: #fff; border-radius: 8px; padding: 4px 9px 1px;
}
.emission-nom { font-family: var(--main); font-size: 1.55rem; line-height: 1.1; margin-bottom: 6px; }
.planning p { font-size: .98rem; margin: 0; }
.planning .postit.aujourdhui { outline: 5px solid var(--rouge); outline-offset: 6px; }

/* ---------- Émissions (cases de BD) ---------- */
.planche { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; margin-top: 30px; }
.planche .case { overflow: hidden; display: flex; flex-direction: column; }
.planche .case:nth-child(1) { grid-column: span 3; transform: rotate(-.6deg); }
.planche .case:nth-child(2) { grid-column: span 3; transform: rotate(.5deg); }
.planche .case:nth-child(3) { grid-column: span 2; transform: rotate(.4deg); }
.planche .case:nth-child(4) { grid-column: span 2; transform: rotate(-.5deg); }
.planche .case:nth-child(5) { grid-column: span 2; transform: rotate(.6deg); }
.planche .case:nth-child(6) { grid-column: span 6; }
.case-image { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-bottom: var(--trait) solid var(--encre); }
.case-texte { padding: 16px 20px 18px; }
.case-texte h3 { font-family: var(--titre); font-size: 1.55rem; line-height: 1.1; margin-bottom: 6px; }
.case-texte p { margin: 0; }
.cartouche {
  display: inline-block; font-family: var(--main); font-size: 1.05rem; background: var(--postit); color: var(--encre);
  border: 3px solid var(--encre); padding: 0 10px; border-radius: 6px; margin-bottom: 8px; transform: rotate(-2deg);
}
.case-decouverte { background: var(--lavande); }
.case-decouverte .case-image { display: grid; place-items: center; background: var(--violet); }
.gros-point { font-family: var(--titre); font-size: 6rem; color: #fff; text-shadow: 5px 5px 0 var(--encre); line-height: 1; }
.case-zevent { display: grid !important; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); background: #1d5a33; color: #fff; }
.case-zevent .case-image { height: 100%; aspect-ratio: auto; border-bottom: 0; border-right: var(--trait) solid var(--encre); }
.case-zevent .case-texte { padding: 26px; align-self: center; }
.case-zevent a { color: var(--postit); font-weight: 800; }

/* ---------- Encart de la piste ---------- */
.encart-piste {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center;
  background: var(--violet); color: #fff; padding: clamp(24px, 4vw, 44px);
}
.encart-piste .titre { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.encart-piste p { font-size: 1.15rem; max-width: 640px; }

/* ---------- La touche Verr. Maj ---------- */
.touche-maj {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 84px; height: 76px; padding: 8px 8px 6px; cursor: pointer;
  background: #fff; border: var(--trait) solid var(--encre); border-radius: 14px;
  box-shadow: 0 7px 0 var(--encre); font-family: var(--titre); color: var(--encre);
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  transition: transform .08s, box-shadow .08s;
}
.touche-maj:active, .cri .touche-maj { transform: translateY(5px); box-shadow: 0 2px 0 var(--encre); }
.touche-maj .fleche { font-size: 1.5rem; line-height: 1; }
.touche-maj .mot { font-size: .72rem; line-height: 1; letter-spacing: .02em; }
.touche-maj .led {
  position: absolute; right: 9px; top: 9px; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--encre); background: #d9d9d9;
}
.cri .touche-maj .led { background: var(--herbe); box-shadow: 0 0 10px 3px var(--herbe); }

/* Le mode « cri » : Verr. Maj allumée */
.trace { opacity: 0; transition: opacity .35s; }
.cri .trace { opacity: 1; }
.cri .titre-section, .cri .ciel-titre { animation: crie .28s steps(2) infinite; }
@keyframes crie { 50% { translate: 1px -1px; } }
.cri .bulle .normal { display: none; }
.cri .bulle .cri { display: inline; }
.cri .marque { position: relative; color: var(--rouge-sombre); font-weight: 900; }
.cri .marque::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 1.5em; height: 1.5em;
  border: 3px solid var(--rouge); border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-12deg) scaleX(1.12); pointer-events: none;
}
.annonce-cri {
  position: fixed; left: 50%; top: 84px; z-index: 70; translate: -50% 0;
  font-family: var(--titre); font-size: 1.3rem; background: var(--postit); color: var(--encre);
  border: var(--trait) solid var(--encre); border-radius: 12px; padding: 8px 18px 5px; box-shadow: var(--ombre-petite);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; transform: translateY(-8px) rotate(-2deg);
}
.annonce-cri.visible { opacity: 1; transform: translateY(0) rotate(-2deg); }

/* bulle de secret (clics répétés) */
.secret-bulle {
  position: absolute; z-index: 20; left: 50%; bottom: calc(100% + 10px); translate: -50% 0; white-space: nowrap;
  font-family: var(--main); font-size: 1.3rem; background: #fff; border: var(--trait) solid var(--encre);
  border-radius: 14px; padding: 4px 14px; box-shadow: var(--ombre-petite);
}

/* ---------- Pied de page ---------- */
.pied { background: var(--encre); color: #fff; padding: 46px 16px 110px; }
.pied-dedans { max-width: 1180px; margin: 0 auto; display: flex; gap: 32px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.pied .titre { font-size: 2rem; }
.pied a { color: var(--postit); }
.pied-liens { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--main); font-size: 1.3rem; }
.pied small { display: block; color: #b8b8c4; margin-top: 6px; }

/* ---------- Pages intérieures : bandeau ---------- */
.bandeau {
  position: relative; overflow: hidden; background: var(--ciel); border-bottom: var(--trait) solid var(--encre);
  padding: clamp(46px, 8vw, 86px) 16px clamp(54px, 8vw, 90px); text-align: center;
}
.bandeau.violet { background: var(--violet); }
.bandeau .titre { font-size: clamp(2.8rem, 9vw, 5.4rem); position: relative; z-index: 2; }
.bandeau .sous-titre { position: relative; z-index: 2; }
.bandeau-decor { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Atelier ---------- */
.etapes-dessin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 60px); align-items: center; }
.planche-dessin { padding: 22px; background: #fff; }
.dessin-cadre { position: relative; aspect-ratio: 1; background: #fff; border-radius: 4px; overflow: hidden; }
.dessin-cadre img { width: 100%; height: 100%; object-fit: contain; transition: filter .45s, opacity .45s; }
[data-etape="croquis"] .dessin-cadre img { filter: grayscale(1) contrast(.42) brightness(1.32) sepia(.5) hue-rotate(175deg) saturate(2.2); opacity: .85; }
[data-etape="encrage"] .dessin-cadre img { filter: grayscale(1) contrast(6) brightness(1.15); }
[data-etape="couleur"] .dessin-cadre img { filter: none; }
.dessin-cadre .vide {
  position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--titre); font-size: 8rem; color: #e4e4ea;
}
.choix-etape { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; justify-content: center; }
.choix-etape button { font-size: 1rem; padding: 10px 14px 7px; }
.choix-etape button[aria-pressed="true"] { background: var(--postit); }
.texte-etape h3 { font-family: var(--titre); font-size: 2rem; margin-bottom: 8px; }
.texte-etape .numero {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--encre); color: #fff; font-family: var(--titre); font-size: 1.3rem; padding-top: 4px; margin-right: 10px;
}
.texte-etape [hidden] { display: none; }

.mur-emotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 22px 18px; margin-top: 28px; }
.emote {
  position: relative; background: #fff; border: 3px solid var(--encre); border-radius: 10px; padding: 12px 10px 8px;
  box-shadow: var(--ombre-petite); cursor: pointer; text-align: center; font: inherit;
  transform: rotate(var(--r, 0deg)); transition: transform .15s;
}
.emote:hover { transform: rotate(0deg) scale(1.08); z-index: 2; }
.emote img { width: 80px; height: 80px; margin: 0 auto; image-rendering: auto; }
.emote span { display: block; font-family: var(--main); font-size: 1.1rem; margin-top: 6px; overflow-wrap: anywhere; line-height: 1.15; }
.emote::after {
  content: ""; position: absolute; left: 50%; top: -10px; width: 46px; height: 18px; transform: translateX(-50%) rotate(3deg);
  background: rgba(255,255,255,.65); border: 2px solid rgba(11,11,15,.22);
}
.emote.copie span { color: var(--herbe-ombre); }

.frise-k { display: flex; gap: clamp(8px, 2vw, 18px); align-items: flex-end; flex-wrap: wrap; margin-top: 26px; justify-content: center; }
.frise-k figure { margin: 0; text-align: center; position: relative; }
.frise-k img { width: clamp(52px, 8vw, 72px); height: auto; margin: 0 auto; filter: drop-shadow(3px 3px 0 rgba(11,11,15,.35)); }
.frise-k figcaption { font-family: var(--main); font-size: 1.05rem; }
.frise-k button { background: none; border: 0; padding: 0; cursor: pointer; }

.deux-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 44px); align-items: start; }

/* ---------- Piste ---------- */
.piste-haut { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 56px); align-items: start; }
.compteur { font-family: var(--titre); font-size: 1.4rem; text-align: center; margin-top: 14px; }
.barre { height: 22px; border: 3px solid var(--encre); border-radius: 999px; background: #fff; overflow: hidden; margin-top: 8px; }
.barre div { height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--herbe) 0 12px, var(--herbe-ombre) 12px 24px); transition: width .6s; }
.liste-etapes { display: grid; gap: 30px; margin-top: 34px; }
.etape { padding: 24px clamp(18px, 3vw, 30px) 24px; }
.etape-tete { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.etape-num {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: var(--trait) solid var(--encre); background: var(--kaps); font-family: var(--titre); font-size: 1.5rem; padding-top: 5px;
}
.etape h3 { font-family: var(--titre); font-size: 1.6rem; line-height: 1.1; }
.etape .enonce { font-size: 1.1rem; }
.etape form { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.etape input[type="text"] {
  flex: 1 1 220px; min-width: 0; font: 600 1.15rem var(--texte); padding: 10px 14px;
  border: var(--trait) solid var(--encre); border-radius: 12px; background: #fff;
}
.etape input[type="text"]:focus { outline: none; box-shadow: 0 0 0 4px var(--postit), 0 0 0 7px var(--encre); }
.etape details { margin-top: 14px; font-family: var(--main); font-size: 1.2rem; }
.etape summary { cursor: pointer; }
.retour { min-height: 1.6em; margin-top: 10px; font-family: var(--main); font-size: 1.35rem; }
.retour.non { color: var(--rouge-sombre); }
.retour.oui { color: #0a7a35; }
.etape.verrouillee { background: #ecebf2; color: #77768a; }
.etape.verrouillee .etape-num { background: #d6d5e0; }
.etape.resolue { background: var(--postit-vert); }
.etape.resolue .etape-num { background: var(--herbe); }
.tampon {
  display: inline-block; font-family: var(--titre); font-size: 1.1rem; color: #0a7a35; border: 3px solid #0a7a35;
  border-radius: 8px; padding: 4px 10px 1px; transform: rotate(-6deg); margin-left: auto;
}
.fin-piste { text-align: center; padding: 34px 24px; background: var(--postit); }
.fin-piste .titre { font-size: clamp(2rem, 5vw, 3rem); }
.lien-discret { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; color: #555; }

/* ---------- Écrans moyens et petits ---------- */
@media (max-width: 960px) {
  .zone-tablette, .etapes-dessin, .piste-haut, .deux-col { grid-template-columns: minmax(0, 1fr); }
  .planning { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planche { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .planche .case:nth-child(n) { grid-column: span 1; }
  .planche .case:nth-child(5), .planche .case:nth-child(6) { grid-column: span 2; }
  .case-zevent { grid-template-columns: minmax(0, 1fr); }
  .case-zevent .case-image { border-right: 0; border-bottom: var(--trait) solid var(--encre); aspect-ratio: 16/9; }
}
@media (max-width: 620px) {
  body { font-size: 1rem; }
  .entete-dedans { gap: 8px; padding: 8px 16px; }
  .logo img { width: 42px; height: 42px; }
  .logo span { font-size: 1.25rem; }
  .nav { margin-left: 0; width: 100%; justify-content: space-between; order: 3; gap: 2px; }
  .nav a { font-size: 1.12rem; padding: 0 6px; }
  .bouton-entete { margin-left: auto; padding: 7px 12px 5px; font-size: .95rem; }
  .annonce-cri { top: 112px; font-size: 1.05rem; }
  .sticker.cache-mobile { display: none; }
  .planning { grid-template-columns: minmax(0, 1fr); }
  .planche { grid-template-columns: minmax(0, 1fr); }
  .planche .case:nth-child(n) { grid-column: span 1; }
  .ciel { padding-bottom: 210px; min-height: 0; }
  .perso { left: 16px; bottom: 18px; width: 120px; }
  .bulle { font-size: 1.25rem; }
  .encart-piste { grid-template-columns: minmax(0, 1fr); }
  .carnet { padding-left: 52px; padding-right: 16px; }
  .touche-maj { width: 70px; height: 64px; right: 12px; bottom: 12px; }
  .tablette-cadre { padding-left: 14px; }
  .main-gant { width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Le nuage qui parle fort ---------- */
.nuage-indice {
  position: absolute; z-index: 2; right: 3%; top: 6%; width: clamp(150px, 21vw, 300px);
  animation: flotte 7s ease-in-out infinite;
}
.nuage-indice svg { width: 100%; height: auto; overflow: visible; }
.nuage-indice text { font-family: var(--main); font-size: 50px; fill: var(--ciel-ombre); }
@media (max-width: 620px) {
  .nuage-indice { top: 2%; right: -4%; width: 150px; }
}

.tag-follow {
  position: absolute; right: -8px; top: 8px; font-style: normal; font-family: var(--main); font-size: .9rem;
  background: var(--herbe); border: 2px solid var(--encre); border-radius: 6px; padding: 0 6px; transform: rotate(8deg);
}
.secret-bulle[hidden] { display: none; }
.dessin-cadre .vide[hidden] { display: none; }
