/* ============================================
   La Patrouille des Champions — thème enfants
   ============================================ */

:root {
  --bleu-ciel: #7ec8f2;
  --bleu-fonce: #2a6fb0;
  --vert-pelouse: #6fca5f;
  --vert-fonce: #3f9a3a;
  --jaune-etoile: #ffd23f;
  --rouge-corail: #ff6b6b;
  --rose-lapine: #ff9ecb;
  --violet: #9b6dd6;
  --blanc: #ffffff;
  --encre: #2b3a4a;
  --ombre: 0 6px 0 rgba(0, 0, 0, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "Comic Sans MS", "Segoe UI", "Baloo 2", sans-serif;
  color: var(--encre);
  background: linear-gradient(180deg, #8fd3f4 0%, #b8e6ff 45%, #a8e6a0 45.2%, #7ecf6e 100%);
  background-attachment: fixed;
  min-height: 100%;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- écrans ---------- */
.screen { display: none; flex: 1; flex-direction: column; gap: 16px; animation: pouf .25s ease; }
.screen.actif { display: flex; }

@keyframes pouf {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------- logo / titres ---------- */
.logo {
  text-align: center;
  font-size: 1.7rem;
  color: var(--blanc);
  text-shadow: 0 3px 0 rgba(0,0,0,.18);
  margin-top: 12px;
  line-height: 1.25;
}

.sous-titre {
  text-align: center;
  font-size: 1rem;
  color: var(--bleu-fonce);
  background: rgba(255,255,255,.75);
  border-radius: 999px;
  padding: 6px 14px;
  align-self: center;
}

h2 { font-size: 1.25rem; color: var(--encre); }

/* ---------- cartes / panneaux ---------- */
.panneau {
  background: var(--blanc);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--ombre);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.note {
  font-size: .8rem;
  text-align: center;
  color: #5b6b7b;
  background: rgba(255,255,255,.7);
  border-radius: 12px;
  padding: 8px 12px;
}

/* ---------- boutons ---------- */
.btn {
  border: none;
  border-radius: 16px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: bold;
  padding: 13px 18px;
  cursor: pointer;
  color: var(--blanc);
  background: var(--bleu-fonce);
  box-shadow: 0 4px 0 rgba(0,0,0,.2);
  transition: transform .08s ease;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.2); }
.btn-grand { font-size: 1.15rem; padding: 16px 20px; }
.btn-vert { background: var(--vert-fonce); }
.btn-rouge { background: #d63838; }              /* rouge plus foncé = texte blanc lisible */
.btn-jaune { background: #e2a800; color: #3d2f00; text-shadow: none; } /* texte foncé sur jaune */
.btn-discret {
  background: transparent;
  color: var(--bleu-fonce);
  box-shadow: none;
  text-decoration: underline;
  font-size: .9rem;
  padding: 8px;
}

/* ---------- champs ---------- */
label { font-weight: bold; font-size: .95rem; }

input[type="text"], input[type="password"] {
  width: 100%;
  border: 3px solid var(--bleu-ciel);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 1.1rem;
  font-family: inherit;
  outline: none;
}
input:focus { border-color: var(--bleu-fonce); }

.erreur {
  color: #c0392b;   /* rouge foncé lisible (contraste AA sur fond blanc) */
  font-size: .9rem;
  font-weight: bold;
  min-height: 1.2em;
  text-align: center;
}

/* ---------- liste des comptes ---------- */
.liste-comptes { display: flex; flex-direction: column; gap: 10px; }

.compte-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--blanc);
  border: 3px solid transparent;
  border-radius: 18px;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: var(--ombre);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--encre);
  text-align: left;
}
.compte-chip.choisi { border-color: var(--jaune-etoile); }
.compte-chip .avatar { width: 52px; height: 52px; flex: none; }

/* ---------- choix du personnage ---------- */
.grille-persos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.perso-carte {
  background: var(--blanc);
  border: 4px solid transparent;
  border-radius: 18px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--ombre);
  font-family: inherit;
}
.perso-carte.choisi { border-color: var(--jaune-etoile); background: #fff8dd; }
.perso-carte svg { width: 100%; max-width: 92px; height: auto; }
.perso-nom { font-weight: bold; font-size: .9rem; display: block; margin-top: 4px; }
.perso-role { font-size: .72rem; color: #52606f; display: block; }

/* ---------- accueil (maison) ---------- */
.entete-joueur {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--blanc);
  border-radius: 20px;
  padding: 12px 16px;
  box-shadow: var(--ombre);
}
.entete-joueur .avatar { width: 64px; height: 64px; flex: none; }
.entete-joueur .infos { flex: 1; }
.entete-joueur .pseudo { font-size: 1.2rem; font-weight: bold; }
.entete-joueur .etoiles { color: #b8860b; font-weight: bold; }

.section-titre {
  color: var(--blanc);
  text-shadow: 0 1px 3px rgba(0,0,0,.45);
  font-size: 1.1rem;
  margin: 6px 4px 0;
}

.grille-jeux {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.jeu-carte {
  position: relative;
  background: var(--blanc);
  border-radius: 18px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--ombre);
  border: none;
  font-family: inherit;
  cursor: pointer;
  color: var(--encre);
}
.jeu-carte .jeu-icone { font-size: 2.1rem; display: block; }
.jeu-carte .jeu-nom { font-weight: bold; font-size: .95rem; display: block; margin-top: 6px; }
.jeu-carte .jeu-detail { font-size: .72rem; color: #52606f; display: block; margin-top: 2px; }

.jeu-carte.verrouille { filter: grayscale(.35); opacity: .85; }
.badge-bientot {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--jaune-etoile);
  color: #7a5b00;
  font-size: .62rem;
  font-weight: bold;
  border-radius: 999px;
  padding: 3px 8px;
}

.pied {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 14px 0 6px;
}

.avatar svg { width: 100%; height: 100%; display: block; }

/* ============================================
   ⚽ Penalty des Maths
   ============================================ */

.jeu-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.jeu-info {
  background: var(--blanc);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: bold;
  box-shadow: var(--ombre);
}

.btn-niveau small { font-weight: normal; opacity: .9; }

/* choix de la longueur de partie (5 / 10 / 15 / 20) */
.choix-longueur {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn.btn-longueur {
  min-width: 48px;
  font-size: 1.1rem;   /* .btn.btn-longueur > .btn-mini : la taille n'est plus écrasée */
}

.penalty-colonne { display: flex; flex-direction: column; gap: 14px; }

#penalty-terrain {
  position: relative;
  height: 250px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #9adcff 0%, #b9e8ff 38%, #63b955 38.2%, #7ecf6e 100%);
  box-shadow: var(--ombre);
}

/* le but */
.penalty-but {
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 78%; height: 110px;
}
.poteau {
  position: absolute; top: 0; width: 7px; height: 100%;
  background: #fff; border-radius: 4px; box-shadow: 0 2px 3px rgba(0,0,0,.15);
}
.poteau.gauche { left: 0; }
.poteau.droit { right: 0; }
.barre {
  position: absolute; top: 0; left: 0; right: 0; height: 7px;
  background: #fff; border-radius: 4px; box-shadow: 0 2px 3px rgba(0,0,0,.15);
}
.filet {
  position: absolute; inset: 7px 7px 0 7px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.55) 0 2px, transparent 2px 14px);
}

/* le gardien (Gogo) */
.penalty-gardien {
  position: absolute;
  top: 52px; left: 50%;
  width: 74px; height: 74px;
  transform: translateX(-50%);
  transition: left .55s ease, transform .55s ease;
  z-index: 2;
}
.penalty-gardien svg { width: 100%; height: 100%; }
.penalty-gardien.plonge-g { left: 26%; transform: translateX(-50%) rotate(-45deg); }
.penalty-gardien.plonge-d { left: 74%; transform: translateX(-50%) rotate(45deg); }

/* le ballon */
.penalty-ballon {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  font-size: 42px;
  line-height: 1;
  transition: all .65s ease-in;
  z-index: 3;
}
/* but marqué : le ballon file dans un coin du filet */
.penalty-ballon.tir-g { bottom: 150px; left: 27%; font-size: 26px; transform: translateX(-50%) rotate(-360deg); }
.penalty-ballon.tir-d { bottom: 150px; left: 73%; font-size: 26px; transform: translateX(-50%) rotate(360deg); }
/* arrêt : le ballon finit dans les pattes du gardien */
.penalty-ballon.arret-g { bottom: 118px; left: 30%; font-size: 28px; transform: translateX(-50%) rotate(-300deg); }
.penalty-ballon.arret-d { bottom: 118px; left: 70%; font-size: 28px; transform: translateX(-50%) rotate(300deg); }

/* message BUT / arrêt */
.penalty-message {
  position: absolute;
  left: 50%; bottom: 34px;
  transform: translateX(-50%) scale(0);
  background: var(--blanc);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: bold;
  font-size: 1rem;
  white-space: nowrap;
  box-shadow: var(--ombre);
  transition: transform .25s ease;
  z-index: 4;
}
.penalty-message.visible { transform: translateX(-50%) scale(1); }
.penalty-message.gagne { color: var(--vert-fonce); }
.penalty-message.perdu { color: var(--rouge-corail); }

/* question + réponses */
.penalty-enonce { font-size: 1.3rem; font-weight: bold; text-align: center; }
.penalty-visuel {
  font-size: 1.7rem;
  text-align: center;
  letter-spacing: 6px;
  line-height: 1.5;
  word-break: break-all;
}
.penalty-reponses {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.btn-reponse { font-size: 1.35rem; padding: 15px 8px; }
.btn-reponse.bonne { background: var(--vert-fonce); animation: sautille .4s ease 2; }
.btn-reponse.mauvaise { background: var(--rouge-corail); opacity: .8; }
.btn-reponse:disabled { cursor: default; }

@keyframes sautille {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.penalty-score-final {
  display: block;
  font-size: 2.4rem;
  font-weight: bold;
  color: var(--bleu-fonce);
}

/* ============================================
   👫 Social : amis, salons, invitations
   ============================================ */

.btn-mini { font-size: .85rem; padding: 9px 12px; min-height: 38px; }

.salon-code {
  font-size: 3rem;
  font-weight: bold;
  letter-spacing: 14px;
  color: var(--bleu-fonce);
  background: #eaf6ff;
  border-radius: 16px;
  padding: 8px 4px 8px 18px;
}

.banniere-invitation {
  position: fixed;
  left: 50%;
  top: calc(12px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  z-index: 60;
  width: min(500px, 92vw);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #fff8dd;
  border: 3px solid var(--jaune-etoile);
  border-radius: 18px;
  padding: 12px 14px;
  font-weight: bold;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  animation: pouf .25s ease;
}
.banniere-invitation span { flex: 1; min-width: 120px; }

/* préférences de l'accueil : cibles tactiles confortables */
.prefs-accueil { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; align-items: flex-start; }
.btn-pref {
  background: rgba(255,255,255,.85);
  color: var(--bleu-fonce);
  box-shadow: 0 2px 0 rgba(0,0,0,.12);
  font-size: .85rem;
  font-weight: bold;
  padding: 9px 14px;
  min-height: 40px;
  border-radius: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(120px);
  background: var(--encre);
  color: var(--blanc);
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: bold;
  font-size: .95rem;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: transform .3s ease;
  z-index: 50;
}
.toast.visible { transform: translateX(-50%) translateY(0); }

/* ============================================
   🏆 Quiz Champion en famille
   ============================================ */

.quiz-barre {
  height: 14px;
  background: var(--blanc);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--ombre);
}
#quiz-barre-remplissage {
  height: 100%;
  width: 100%;
  background: var(--vert-fonce);
  border-radius: 999px;
  transition: width .15s linear, background .3s ease;
}

/* champ mot de passe avec œil 👁 */
.champ-mdp { position: relative; }
.champ-mdp input { padding-right: 52px; }
.btn-oeil {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.35rem;
  cursor: pointer;
  padding: 4px;
}

.quiz-ligne { cursor: default; }
.quiz-ligne.moi { border-color: var(--jaune-etoile); background: #fff8dd; }
.quiz-medaille { font-size: 1.4rem; width: 38px; text-align: center; }

/* ============================================
   🁢 Dominos
   ============================================ */

.dominos-joueurs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.dominos-joueur {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--blanc);
  border: 3px solid transparent;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: .9rem;
  font-weight: bold;
  box-shadow: var(--ombre);
}
.dominos-joueur.son-tour { border-color: var(--jaune-etoile); background: #fff8dd; }
.avatar-mini { width: 30px; height: 30px; display: inline-block; }
.avatar-mini svg { width: 100%; height: 100%; }

.dominos-tour {
  text-align: center;
  font-weight: bold;
  color: var(--blanc);
  text-shadow: 0 2px 0 rgba(0,0,0,.15);
}

#dominos-chaine-zone {
  background: #2e7d32;
  border: 6px solid #8d5a2b;
  border-radius: 18px;
  padding: 14px 10px;
  overflow-x: auto;
  box-shadow: var(--ombre);
  min-height: 88px;
}
#dominos-chaine {
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  margin: 0 auto;
}

.domino {
  display: inline-flex;
  align-items: center;
  background: #fffef5;
  border: 2px solid #3b3b3b;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  cursor: default;
  flex: none;
}
button.domino { cursor: pointer; opacity: .55; }
button.domino.jouable {
  opacity: 1;
  border-color: var(--vert-fonce);
  box-shadow: 0 0 0 3px rgba(63, 154, 58, .45);
  animation: sautille .8s ease infinite;
}
.moitie {
  display: grid;
  grid-template-columns: repeat(3, 8px);
  grid-template-rows: repeat(3, 8px);
  gap: 2px;
  padding: 2px;
}
.pip { width: 8px; height: 8px; border-radius: 50%; }
.pip.on { background: #2b2420; }
.ligne-milieu { width: 2px; height: 30px; background: #8a8a8a; border-radius: 2px; }

.dominos-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  background: rgba(255,255,255,.6);
  border-radius: 16px;
  padding: 12px;
  min-height: 64px;
}

/* ============================================
   🃏 Cartes Foli'Foot
   ============================================ */

.foli-table {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.foli-tas { display: flex; gap: 18px; align-items: center; }

.carte-foli {
  position: relative;
  width: 64px;
  height: 92px;
  border: 3px solid #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 6px rgba(0,0,0,.25);
  cursor: default;
  flex: none;
  background: none;
  padding: 0;
  font-family: inherit;
}
button.carte-foli { cursor: pointer; opacity: .55; }
button.carte-foli.jouable {
  opacity: 1;
  border-color: var(--jaune-etoile);
  box-shadow: 0 0 0 3px rgba(255, 210, 63, .6);
  animation: sautille .8s ease infinite;
}
button.carte-foli.dos { opacity: 1; }
button.carte-foli.dos:disabled { opacity: .5; cursor: default; animation: none; }
.carte-foli.posee { cursor: default; }

.carte-fond { position: absolute; inset: 0; }
.carte-fond.arcenciel {
  background: conic-gradient(#ff6b6b 0 25%, #2a6fb0 25% 50%, #3f9a3a 50% 75%, #e2a800 75% 100%);
}
.carte-symbole {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 2px rgba(0,0,0,.35);
}
.carte-mascotte {
  position: absolute;
  bottom: 3px;
  right: 5px;
  font-size: .85rem;
}
.foli-pioche-compte {
  position: absolute;
  bottom: 3px;
  left: 0; right: 0;
  text-align: center;
  font-size: .7rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}

.foli-couleur-badge { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); }

.foli-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  background: rgba(255,255,255,.6);
  border-radius: 16px;
  padding: 12px;
  min-height: 100px;
}

/* ============================================
   🧠 Memory des Chiots
   ============================================ */

.memory-grille {
  display: grid;
  gap: 10px;
}
.memory-carte {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 3px solid #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--bleu-fonce), var(--bleu-ciel));
  cursor: pointer;
  padding: 0;
  box-shadow: var(--ombre);
  overflow: hidden;
}
.memory-dos, .memory-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .25s ease, transform .25s ease;
}
.memory-dos { font-size: 1.8rem; opacity: 1; }
.memory-face { background: #fff; opacity: 0; transform: scale(.6); padding: 6px; }
.memory-face svg { width: 100%; height: 100%; }
.memory-emoji { font-size: 2rem; }
.memory-carte.retournee .memory-dos, .memory-carte.trouvee .memory-dos { opacity: 0; }
.memory-carte.retournee .memory-face, .memory-carte.trouvee .memory-face { opacity: 1; transform: scale(1); }
.memory-carte.trouvee { border-color: var(--jaune-etoile); cursor: default; animation: sautille .4s ease; }

/* ============================================
   🛠️ Espace Papa (admin)
   ============================================ */

.admin-liste {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}
.admin-ligne {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--blanc);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: .85rem;
  box-shadow: 0 2px 0 rgba(0,0,0,.08);
}
.admin-ligne small { color: #52606f; white-space: nowrap; }

/* ============================================
   🎨 Atelier Mascotte
   ============================================ */

.atelier-apercu {
  display: inline-block;
  width: 170px;
  height: 170px;
  background: #fff8dd;
  border: 4px solid var(--jaune-etoile);
  border-radius: 50%;
  padding: 12px;
}
.atelier-apercu svg { width: 100%; height: 100%; }

.atelier-groupe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.atelier-pastille {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid #fff;
  cursor: pointer;
  box-shadow: var(--ombre);
}
.atelier-pastille.choisie {
  border-color: var(--jaune-etoile);
  transform: scale(1.12);
}

/* ============================================
   📝 Dribble des Mots
   ============================================ */

#dribble-terrain {
  position: relative;
  height: 90px;
  border-radius: 18px;
  background: linear-gradient(180deg, #63b955 0%, #7ecf6e 100%);
  box-shadow: var(--ombre);
  overflow: hidden;
}
.dribble-moi {
  position: absolute;
  left: 2%;
  bottom: 8px;
  width: 64px;
  height: 64px;
  transition: left .8s ease;
  z-index: 2;
}
.dribble-moi svg { width: 100%; height: 100%; }
.dribble-defenseurs {
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 2rem;
}
.dribble-defenseur { transition: transform .5s ease, opacity .5s ease; }
.dribble-defenseur.dribble { transform: rotate(120deg) translateY(10px); opacity: .35; }
.dribble-but {
  position: absolute;
  right: 6px;
  bottom: 12px;
  font-size: 2.4rem;
}
.dribble-mot-ligne {
  text-align: center;
  font-size: 1.9rem;
  font-weight: bold;
  letter-spacing: 5px;
}

/* ============================================
   ⭐ Parade des Étoiles
   ============================================ */

.parade-scene { text-align: center; }
.parade-caline {
  display: inline-block;
  width: 110px;
  height: 110px;
  animation: danse 1.6s ease-in-out infinite;
}
.parade-caline svg { width: 100%; height: 100%; }

@keyframes danse {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg) translateY(-4px); }
}

.parade-pompons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 340px;
  margin: 0 auto;
  width: 100%;
}
.parade-pompon {
  aspect-ratio: 1;
  border: 5px solid #fff;
  border-radius: 50%;
  font-size: 2.4rem;
  cursor: pointer;
  box-shadow: var(--ombre);
  transition: transform .12s ease, filter .12s ease;
  filter: brightness(.85);
}
.parade-pompon.allume {
  transform: scale(1.12);
  filter: brightness(1.25);
  box-shadow: 0 0 24px rgba(255, 255, 255, .9);
}
.parade-pompon:active { transform: scale(.95); }

/* ============================================
   🧩 Puzzle en Famille
   ============================================ */

.puzzle-apercu { text-align: center; }
.puzzle-apercu img {
  max-width: 100%;
  width: 240px;
  border-radius: 12px;
  box-shadow: var(--ombre);
}

.puzzle-plateau {
  display: grid;
  gap: 2px;
  background: #8d5a2b;
  border: 6px solid #8d5a2b;
  border-radius: 14px;
  aspect-ratio: 4 / 3;
  box-shadow: var(--ombre);
  overflow: hidden;
}
.puzzle-cellule {
  border: none;
  background: #e8dcc8;
  cursor: pointer;
  padding: 0;
  background-repeat: no-repeat;
}
.puzzle-cellule:not(.remplie):active { background-color: #d4c5a8; }
.puzzle-cellule.remplie { cursor: default; }
.puzzle-cellule.pouf { animation: pouf .3s ease; }

.puzzle-bac {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  background: rgba(255,255,255,.6);
  border-radius: 16px;
  padding: 12px;
  min-height: 76px;
}
.puzzle-piece {
  width: 64px;
  height: 48px;
  flex: none;
  border: 3px solid #fff;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
  background-repeat: no-repeat;
}
.puzzle-piece.choisie {
  border-color: var(--jaune-etoile);
  box-shadow: 0 0 0 3px rgba(255, 210, 63, .6);
  transform: scale(1.12);
}
