/* Thème commun : pull moche de Noël, guirlandes, neige et paillettes. */

@font-face {
  font-family: 'Mountains of Christmas';
  src: url('/fonts/mountains-of-christmas-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Mountains of Christmas';
  src: url('/fonts/mountains-of-christmas-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Great Vibes';
  src: url('/fonts/great-vibes-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-latin-800-normal.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-latin-900-normal.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

:root {
  --rouge: #d91c2f;
  --rouge-fonce: #a80f20;
  --rouge-nuit: #6d0a16;
  --vert: #17914a;
  --vert-fonce: #0c6a35;
  --vert-nuit: #07401f;
  --or: #ffcf3f;
  --or-fonce: #e0a11a;
  --papier: #fffdf6;
  --creme: #fff3d6;
  --encre: #3b1408;
  --encre-douce: #7a5244;

  --titre: 'Mountains of Christmas', 'Comic Sans MS', cursive;
  --texte: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --script: 'Great Vibes', 'Brush Script MT', cursive;

  --bandeau: 30px; /* hauteur du bandeau défilant fixé en haut */
  --sol: 30px; /* hauteur du tapis de neige fixé en bas */
}

@media (min-width: 700px) {
  :root {
    --sol: 46px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--vert-fonce);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  /* Rien ne doit élargir la page : sur mobile, cela décale tout ce qui est en position fixe. */
  overflow-x: hidden;
  overflow-x: clip;
  font-family: var(--texte);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--encre);
  background-color: var(--vert-fonce);
  background-image: var(--tricot, none);
  background-size: var(--tricot-taille, auto);
  -webkit-tap-highlight-color: transparent;
}

body.sans-bandeau {
  --bandeau: 0px;
}

/* Voile sombre pour que le tricot reste un fond et pas un sujet. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 28%, rgba(7, 64, 31, 0.35), rgba(3, 30, 15, 0.82) 88%);
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--vert-nuit);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Calques du décor ---------- */

.decor {
  display: contents;
}

.calque {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.neige {
  z-index: 1;
}
.ciel {
  z-index: 2;
  overflow: hidden;
}
.chute {
  overflow: hidden;
}
.chute.arriere {
  z-index: 3;
}
.page {
  position: relative;
  z-index: 5;
  padding: calc(var(--bandeau) + 40px) 12px calc(var(--sol) + 26px);
}
.chute.avant {
  z-index: 7;
}
.etincelles {
  z-index: 10;
}

/* ---------- Bonhommes qui tombent ---------- */

.tombeur {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.bulle-cri {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}
.bulle-cri span {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 2px 13px 5px;
  border: 3px solid var(--encre);
  border-radius: 18px;
  background: #fff;
  color: var(--rouge);
  font-family: var(--titre);
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  animation: cri 1.5s both;
}
.bulle-cri span::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: #fff;
  border: solid var(--encre);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
@keyframes cri {
  0% {
    transform: translateX(-50%) scale(0.2) rotate(-12deg);
    opacity: 0;
  }
  14% {
    transform: translateX(-50%) scale(1.15) rotate(4deg);
    opacity: 1;
  }
  24%,
  80% {
    transform: translateX(-50%) scale(1) rotate(-2deg);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scale(0.6) translateY(-14px);
    opacity: 0;
  }
}

/* ---------- Bandeau défilant ---------- */

.bandeau {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 8;
  height: var(--bandeau);
  display: flex;
  align-items: center;
  overflow: hidden;
  pointer-events: none;
  background: var(--rouge);
  border-bottom: 3px solid var(--or);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}
.bandeau-piste {
  display: flex;
  align-items: center;
  flex: none;
  white-space: nowrap;
  font-family: var(--titre);
  font-weight: 700;
  font-size: 1.08rem;
  color: #fff6d0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
  animation: defile 52s linear infinite;
}
.bandeau-piste > * {
  margin-right: 16px;
}
.bandeau-piste img {
  height: 19px;
  width: auto;
}
@keyframes defile {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Guirlande lumineuse ---------- */

.guirlande {
  position: fixed;
  inset: calc(var(--bandeau) - 2px) 0 auto 0;
  z-index: 8;
  height: 60px;
  pointer-events: none;
}
.guirlande .fil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.guirlande .fil path {
  fill: none;
  stroke: #062e17;
  stroke-width: 2.5;
}
.ampoule {
  position: absolute;
  width: 10px;
  height: 15px;
  margin: 4px 0 0 -5px;
  border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%;
  background: var(--c);
  box-shadow:
    0 0 11px 3px var(--c),
    inset -2px -2px 3px rgba(0, 0, 0, 0.25),
    inset 2px 2px 3px rgba(255, 255, 255, 0.55);
  transform: rotate(var(--tilt));
  transform-origin: 50% -4px;
  animation: clignote 1.8s steps(1) infinite;
  animation-delay: var(--d);
}
.ampoule::before {
  content: '';
  position: absolute;
  left: 2px;
  top: -5px;
  width: 6px;
  height: 6px;
  border-radius: 1.5px;
  background: #062e17;
}
@keyframes clignote {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.32;
    box-shadow: none;
  }
}
/* En musique, une ampoule sur deux s'allume à chaque temps. */
.guirlande.en-rythme .ampoule {
  animation: none;
}
.guirlande.en-rythme.tic .ampoule.a,
.guirlande.en-rythme:not(.tic) .ampoule.b {
  opacity: 0.3;
  box-shadow: none;
}

/* ---------- Traîneau ---------- */

.traineau-vol {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}
.traineau-vol svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.attelage .patte {
  transform-box: fill-box;
  animation: galop 0.34s ease-in-out infinite alternate;
}
.attelage .patte-avant {
  transform-origin: 0% 0%;
}
.attelage .patte-arriere {
  transform-origin: 100% 0%;
  --sens: -1;
}
.attelage .patte-b {
  animation-delay: -0.17s;
}
@keyframes galop {
  from {
    transform: rotate(calc(var(--sens, 1) * -18deg));
  }
  to {
    transform: rotate(calc(var(--sens, 1) * 14deg));
  }
}
.attelage .banderole {
  transform-box: fill-box;
  transform-origin: 100% 50%;
  animation: flotte 0.9s ease-in-out infinite alternate;
}
@keyframes flotte {
  from {
    transform: skewY(-5deg);
  }
  to {
    transform: skewY(5deg);
  }
}
.attelage .truffe {
  animation: truffe 0.5s steps(1) infinite;
}
@keyframes truffe {
  50% {
    fill: #ffd9d9;
  }
}

/* ---------- Sapin ---------- */

.sapin .boule {
  animation: boule 1.5s steps(1) infinite;
}
.sapin .boule-1 {
  animation-delay: -0.375s;
}
.sapin .boule-2 {
  animation-delay: -0.75s;
}
.sapin .boule-3 {
  animation-delay: -1.125s;
}
@keyframes boule {
  50% {
    opacity: 0.3;
  }
}
.sapin .cime {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: cime 1.8s ease-in-out infinite;
}
@keyframes cime {
  0%,
  100% {
    transform: scale(1) rotate(-8deg);
  }
  50% {
    transform: scale(1.25) rotate(8deg);
  }
}

/* ---------- Tapis de neige et décor des côtés ---------- */

.sol {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 6;
  height: var(--sol);
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 60' preserveAspectRatio='none'%3E%3Cpath d='M0 60V30Q60 4 130 22Q200 40 270 18Q340 -2 410 20Q470 36 520 30V60Z' fill='%23d9e9f5'/%3E%3Cpath d='M0 60V38Q70 14 140 30Q210 46 280 26Q350 8 420 28Q480 42 520 38V60Z' fill='%23fff'/%3E%3C/svg%3E")
    repeat-x bottom / 520px 100%;
  filter: drop-shadow(0 -3px 6px rgba(0, 0, 0, 0.25));
}

.decor-cote {
  position: fixed;
  bottom: calc(var(--sol) - 20px);
  z-index: 4;
  display: none;
  align-items: flex-end;
  pointer-events: none;
}
.decor-cote.gauche {
  left: max(10px, calc(50% - 640px));
}
.decor-cote.droite {
  right: max(10px, calc(50% - 640px));
}
.decor-cote .sapin {
  width: 210px;
  height: auto;
  overflow: visible;
}
.decor-cote .bonhomme {
  width: 150px;
  transform-origin: 50% 100%;
  animation: dandine 2.2s ease-in-out infinite;
}
.decor-cote .paquet {
  width: 62px;
  margin-left: -34px;
}
.decor-cote .paquet.p2 {
  width: 46px;
  margin-left: -8px;
}
.decor-cote.droite .paquet.p1 {
  order: -1;
  margin: 0 -26px 0 0;
}
.decor-cote.droite .paquet.p2 {
  order: -2;
  margin: 0 -6px 0 0;
}
@media (min-width: 1140px) {
  .decor-cote {
    display: flex;
  }
}
@keyframes dandine {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(4deg);
  }
}

/* ---------- Boutons son / mode calme ---------- */

.commandes {
  position: fixed;
  top: calc(var(--bandeau) + 44px);
  right: 8px;
  z-index: 9;
  display: flex;
  gap: 8px;
}
.commande {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--rouge);
  box-shadow:
    0 4px 0 var(--rouge-nuit),
    0 6px 10px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.commande img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transform-origin: 50% 10%;
}
.commande:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--rouge-nuit);
}
.commande.coupe {
  background: #6f6a66;
  box-shadow:
    0 4px 0 #3d3936,
    0 6px 10px rgba(0, 0, 0, 0.35);
}
.commande.coupe img {
  opacity: 0.55;
  filter: grayscale(1);
}
.commande.coupe::after {
  content: '';
  position: absolute;
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 0 1.5px #3d3936;
  transform: rotate(-45deg);
}
.commande.ding img {
  animation: ding 0.3s ease-out;
}
@keyframes ding {
  0% {
    transform: rotate(-22deg);
  }
  50% {
    transform: rotate(16deg);
  }
  100% {
    transform: rotate(0);
  }
}

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

.entete {
  position: relative;
  text-align: center;
  padding-top: 44px;
}
@media (min-width: 1000px) {
  .entete {
    padding-top: 8px;
  }
}

.macaron {
  position: absolute;
  left: 4px;
  top: -6px;
  width: 70px;
  height: 70px;
  display: grid;
  place-content: center;
  color: var(--rouge-fonce);
  font-family: var(--titre);
  font-weight: 700;
  line-height: 0.9;
  text-align: center;
  transform: rotate(-12deg);
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35));
  animation: macaron 1.6s ease-in-out infinite;
}
.macaron::before,
.macaron::after,
.macaron span::before {
  content: '';
  position: absolute;
  inset: 7px;
  z-index: -1;
  border-radius: 6px;
  background: var(--or);
}
.macaron::after {
  transform: rotate(30deg);
}
.macaron span::before {
  transform: rotate(60deg);
}
.macaron strong {
  font-size: 1.55rem;
}
.macaron small {
  font-family: var(--texte);
  font-weight: 900;
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@keyframes macaron {
  0%,
  100% {
    transform: rotate(-12deg) scale(1);
  }
  50% {
    transform: rotate(-6deg) scale(1.1);
  }
}
@media (min-width: 1000px) {
  .macaron {
    left: calc(50% - 450px);
    top: 4px;
    width: 92px;
    height: 92px;
  }
  .macaron strong {
    font-size: 2.05rem;
  }
  .macaron small {
    font-size: 0.62rem;
  }
}

.script {
  display: inline-block;
  margin: 0 0 -0.1em;
  font-family: var(--script);
  font-size: clamp(2rem, 7.5vw, 3rem);
  line-height: 1;
  color: #fff;
  text-shadow:
    0 2px 0 var(--rouge-fonce),
    0 0 14px rgba(255, 255, 255, 0.45);
  transform: rotate(-5deg);
}

.titre {
  position: relative;
  margin: 0;
  font-family: var(--titre);
  font-weight: 700;
  font-size: clamp(2.7rem, 12vw, 5.4rem);
  line-height: 1;
}
.titre .mot {
  display: inline-block;
  white-space: nowrap;
  margin: 0 0.1em;
}
.lettre {
  position: relative;
  display: inline-block;
  animation: vague 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.14s);
}
/* Couche du dessous : contour et épaisseur rouge sombre. */
.lettre i {
  position: absolute;
  inset: 0;
  font-style: normal;
  color: var(--rouge-nuit);
  text-shadow:
    0.045em 0 0 var(--rouge-nuit),
    -0.045em 0 0 var(--rouge-nuit),
    0 -0.045em 0 var(--rouge-nuit),
    0.032em 0.032em 0 var(--rouge-nuit),
    -0.032em 0.032em 0 var(--rouge-nuit),
    0.032em -0.032em 0 var(--rouge-nuit),
    -0.032em -0.032em 0 var(--rouge-nuit),
    0 0.05em 0 var(--rouge-nuit),
    0 0.1em 0 #3d050c,
    0 0.16em 0.12em rgba(0, 0, 0, 0.5);
}
/* Couche du dessus : dégradé doré. */
.lettre b {
  position: relative;
  font-weight: inherit;
  background: linear-gradient(180deg, #fffbe0 0%, #ffe066 30%, #ffb627 58%, #fff1a8 78%, #f5a30f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
@keyframes vague {
  0%,
  100% {
    transform: translateY(0.03em) rotate(-3deg);
  }
  50% {
    transform: translateY(-0.07em) rotate(3deg);
  }
}

.scintille {
  position: absolute;
  width: 0.34em;
  height: 0.34em;
  pointer-events: none;
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: scintille 1.9s ease-in-out infinite;
}
@keyframes scintille {
  0%,
  100% {
    transform: scale(0) rotate(0);
    opacity: 0;
  }
  50% {
    transform: scale(1) rotate(90deg);
    opacity: 1;
  }
}

.ruban {
  position: relative;
  display: inline-block;
  margin: 16px 0 0;
  padding: 5px 20px 6px;
  background: var(--rouge);
  color: #fff;
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
}
.ruban::before,
.ruban::after {
  content: '';
  position: absolute;
  top: 7px;
  z-index: -1;
  width: 26px;
  height: 100%;
  background: var(--rouge-fonce);
}
.ruban::before {
  left: -16px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 38% 50%);
}
.ruban::after {
  right: -16px;
  clip-path: polygon(0 0, 100% 0, 62% 50%, 100% 100%, 0 100%);
}

/* ---------- Carte (la lettre au Père Noël) ---------- */

.carte {
  position: relative;
  max-width: 600px;
  margin: 92px auto 0;
  padding: 26px 18px 22px;
  border: 10px solid transparent;
  border-radius: 26px;
  background:
    linear-gradient(var(--papier), var(--papier)) padding-box,
    repeating-linear-gradient(-45deg, #fff 0 11px, var(--rouge) 11px 22px) border-box;
  box-shadow:
    0 0 0 3px var(--rouge-nuit),
    0 16px 30px rgba(0, 0, 0, 0.5);
}
@media (min-width: 700px) {
  .carte {
    padding: 34px 34px 28px;
  }
}
/* Neige accumulée sur le haut de la carte (en ::after pour passer devant le Père Noël curieux). */
.carte::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: -27px;
  height: 46px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 46'%3E%3Cpath d='M0 22Q12 4 32 9Q48 -2 72 8Q92 1 112 7Q132 -2 152 8Q170 3 180 22V26Q172 36 162 26Q152 18 142 28Q131 46 119 28Q109 18 97 26Q87 36 77 26Q65 14 53 26Q42 42 31 26Q21 16 11 26Q4 31 0 26Z' fill='%23fff'/%3E%3C/svg%3E")
    repeat-x center top / 180px 46px;
  filter: drop-shadow(0 2px 0 rgba(150, 185, 215, 0.75));
}

.carte.apparait {
  animation: apparait 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes apparait {
  from {
    transform: scale(0.3) rotate(-8deg);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

/* Le Père Noël qui dépasse du haut de la carte. */
.curieux-zone {
  position: absolute;
  right: 12px;
  top: -84px;
  width: 132px;
  pointer-events: none;
}
.curieux-zone svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  animation: curieux 3.2s ease-in-out infinite;
}
@keyframes curieux {
  0%,
  100% {
    transform: translateY(10px);
  }
  50% {
    transform: translateY(0);
  }
}
.curieux .coucou {
  transform-box: fill-box;
  transform-origin: 30% 100%;
  animation: coucou 0.5s ease-in-out infinite alternate;
}
@keyframes coucou {
  from {
    transform: rotate(-14deg);
  }
  to {
    transform: rotate(16deg);
  }
}
.curieux-bulle {
  position: absolute;
  right: 118px;
  top: 12px;
  width: max-content;
  max-width: min(46vw, 250px);
  padding: 5px 12px 7px;
  border: 3px solid var(--encre);
  border-radius: 16px 16px 4px 16px;
  background: #fff;
  font-family: var(--titre);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.1;
  color: var(--vert-fonce);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  animation: bulle 0.45s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}
@keyframes bulle {
  from {
    transform: scale(0.2);
    opacity: 0;
    transform-origin: 100% 100%;
  }
  to {
    transform: none;
    opacity: 1;
    transform-origin: 100% 100%;
  }
}

/* ---------- Textes et champs ---------- */

.question {
  margin: 0;
  padding: 0;
  width: 100%;
  font-family: var(--titre);
  font-weight: 700;
  font-size: clamp(1.75rem, 7vw, 2.4rem);
  line-height: 1.05;
  text-align: center;
  color: var(--rouge);
  text-shadow: 0 2px 0 #ffd3d8;
}
.aide {
  margin: 6px 0 18px;
  text-align: center;
  font-weight: 700;
  color: var(--encre-douce);
}

.champ {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 3px solid var(--encre);
  border-radius: 14px;
  background: #fff;
  color: var(--encre);
  font: 800 1.1rem var(--texte);
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.07);
}
.champ::placeholder {
  color: #b59c90;
  font-weight: 700;
}
.champ:focus {
  outline: none;
  border-color: var(--vert);
  box-shadow: 0 0 0 4px rgba(23, 145, 74, 0.28);
}
textarea.champ {
  min-height: 96px;
  resize: vertical;
}
.etiquette {
  display: block;
  margin: 14px 0 6px;
  font-weight: 900;
}

/* ---------- Boutons ---------- */

.bouton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 24px 12px;
  border: 3px solid var(--or);
  border-radius: 999px;
  background: linear-gradient(180deg, #f4455a, var(--rouge) 52%, var(--rouge-fonce));
  color: #fff;
  font-family: var(--titre);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.1;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
  box-shadow:
    0 5px 0 var(--rouge-nuit),
    0 10px 14px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition:
    transform 0.1s,
    box-shadow 0.1s;
}
@media (hover: hover) {
  .bouton:hover:not(:disabled) {
    animation: gigote 0.45s ease-in-out;
  }
}
.bouton:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--rouge-nuit);
}
.bouton:disabled {
  opacity: 0.55;
  filter: grayscale(0.6);
  cursor: not-allowed;
}
.bouton.vert {
  background: linear-gradient(180deg, #2fc06c, var(--vert) 52%, var(--vert-fonce));
  box-shadow:
    0 5px 0 var(--vert-nuit),
    0 10px 14px rgba(0, 0, 0, 0.3);
}
.bouton.vert:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--vert-nuit);
}
.bouton.discret {
  padding: 8px 16px 9px;
  border: 2px dashed currentColor;
  background: none;
  color: var(--encre-douce);
  font: 900 0.95rem var(--texte);
  text-shadow: none;
  box-shadow: none;
}
.bouton.discret.clair {
  color: #fff;
}
.bouton.petit {
  padding: 5px 14px 7px;
  border-width: 2px;
  font-size: 1.1rem;
  box-shadow: 0 3px 0 var(--rouge-nuit);
}
.bouton.petit.vert {
  box-shadow: 0 3px 0 var(--vert-nuit);
}
@keyframes gigote {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-3deg) scale(1.04);
  }
  75% {
    transform: rotate(3deg) scale(1.04);
  }
}

/* ---------- Blocs partagés entre les pages ---------- */

.message {
  text-align: center;
}
.message-image {
  width: 120px;
  transform-origin: 50% 100%;
  animation: dandine 2.2s ease-in-out infinite;
}

.erreur {
  margin: 16px 0 0;
  padding: 8px 12px;
  border: 2px solid var(--rouge);
  border-radius: 12px;
  background: #ffe9ec;
  color: var(--rouge-fonce);
  font-weight: 800;
  text-align: center;
}

.navigation {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.navigation .bouton:last-child {
  margin-left: auto;
}
.navigation.centre {
  justify-content: center;
}
.navigation.centre .bouton:last-child {
  margin-left: 0;
}

.astuce {
  margin: 16px 0 0;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--vert-fonce);
}

/* ---------- Pied de page ---------- */

.pied {
  margin-top: 34px;
  text-align: center;
  color: #e9f6ee;
  font-weight: 700;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.pied-scene {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 8px;
}
.pied-scene .sapin {
  width: 120px;
  height: auto;
  overflow: visible;
}
.pied-scene img {
  width: 54px;
}
.pied-scene img.grand {
  width: 92px;
  transform-origin: 50% 100%;
  animation: dandine 2.2s ease-in-out infinite;
}
@media (min-width: 1140px) {
  .pied-scene {
    display: none;
  }
}
.pied a {
  color: inherit;
}

/* ---------- Messages éphémères ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sol) + 18px);
  z-index: 20;
  max-width: calc(100vw - 24px);
  padding: 9px 20px 11px;
  border: 3px solid var(--or);
  border-radius: 999px;
  background: var(--vert-fonce);
  color: #fff;
  font-family: var(--titre);
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  animation: toast 3.2s both;
}
@keyframes toast {
  0% {
    transform: translate(-50%, 70px) scale(0.6);
    opacity: 0;
  }
  9%,
  88% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, 30px) scale(0.9);
    opacity: 0;
  }
}

/* ---------- Mode calme : plus rien ne bouge ---------- */

html.calme *,
html.calme *::before,
html.calme *::after {
  animation-duration: 0.001s !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}
html.calme .bandeau-piste {
  animation: none !important;
}
html.calme .toast {
  animation-duration: 3.2s !important;
}
