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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #0a1628 0%, #102a43 50%, #1e3a8a 100%);
  min-height: 100vh;
  color: white;
  display: flex;
  justify-content: center;
}

/* ÉCRANS */
.ecran {
  display: none;
  width: 100%;
  max-width: 800px;
  padding: 24px 16px;
  flex-direction: column;
  align-items: center;
}
.ecran.actif {
  display: flex;
}

/* ACCUEIL */
.logo {
  font-size: 70px;
  animation: rebondir 2s ease-in-out infinite;
}
@keyframes rebondir {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

h1 {
  font-size: 38px;
  font-weight: 900;
  background: linear-gradient(90deg, #fbbf24, #ef4444, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin: 8px 0;
  letter-spacing: 2px;
}

.sous-titre {
  font-size: 16px;
  color: #a0aec0;
  margin-bottom: 24px;
  text-align: center;
}

/* BANDEAU ÉQUIPE */
.equipe-bandeau {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(251,191,36,0.3);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 28px;
}
.poste {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
}
.poste .ico { font-size: 24px; }
.poste .nom { font-weight: 700; font-size: 14px; margin-top: 4px; }
.poste .pos { font-size: 11px; color: #94a3b8; }

/* TITRE TOURNOI */
.titre-tournoi {
  font-size: 22px;
  margin-bottom: 16px;
  color: #fbbf24;
}

/* NIVEAUX */
.niveaux {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.btn-niveau {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  background: rgba(255,255,255,0.08);
  color: white;
  border: 2px solid rgba(255,255,255,0.15);
  text-align: left;
}
.btn-niveau .num {
  font-size: 20px;
  font-weight: 900;
  min-width: 32px;
  color: #fbbf24;
}
.btn-niveau .ico-equipe { font-size: 26px; }
.btn-niveau .txt { flex: 1; }
.btn-niveau .difficulte {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
}
.btn-niveau .etoiles { font-size: 16px; letter-spacing: 2px; min-width: 60px; text-align: right; }

.btn-niveau.actif {
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  border-color: #fbbf24;
  box-shadow: 0 0 20px rgba(251,191,36,0.3);
}
.btn-niveau.actif:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(251,191,36,0.5);
}
.btn-niveau.verrouille {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-niveau.termine {
  background: linear-gradient(135deg, #047857, #10b981);
  border-color: #34d399;
  cursor: pointer;
}
.btn-niveau.termine:hover {
  transform: scale(1.02);
}

.btn-reset {
  background: rgba(239,68,68,0.2);
  border: 1px solid rgba(239,68,68,0.4);
  color: #fca5a5;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}
.btn-reset:hover { background: rgba(239,68,68,0.4); }

/* VESTIAIRE */
.vestiaire-contenu {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.vs-bloc {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  margin-top: 20px;
}
.equipe-vs {
  flex: 1;
  text-align: center;
  padding: 20px;
  background: rgba(59,130,246,0.15);
  border: 2px solid #3b82f6;
  border-radius: 16px;
}
.equipe-vs.adversaire {
  background: rgba(239,68,68,0.15);
  border-color: #ef4444;
}
.logo-equipe { font-size: 48px; margin-bottom: 8px; }
.nom-equipe { font-size: 18px; font-weight: 700; }
.vs {
  font-size: 32px;
  font-weight: 900;
  color: #fbbf24;
}

.coach-bulle {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 100%;
  background: rgba(251,191,36,0.1);
  border: 2px solid rgba(251,191,36,0.4);
  border-radius: 16px;
  padding: 20px;
}
.coach-emoji { font-size: 48px; }
.coach-texte { flex: 1; line-height: 1.5; }
.coach-texte strong { color: #fbbf24; display: block; margin-bottom: 8px; }
.coach-texte p { font-size: 15px; color: #e2e8f0; }

.btn-suivant.gros {
  font-size: 18px;
  padding: 16px 40px;
}

/* HAUT DU MATCH */
.haut-jeu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 16px;
  gap: 8px;
}
.btn-retour {
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}
.btn-retour:hover { background: rgba(255,255,255,0.2); }

.titre-niveau {
  font-size: 16px;
  font-weight: 700;
  color: #fbbf24;
  text-align: center;
  flex: 1;
}
.periode {
  font-size: 13px;
  font-weight: 700;
  background: rgba(255,255,255,0.1);
  padding: 6px 12px;
  border-radius: 16px;
}

/* TABLEAU DE BORD */
.tableau-bord {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid #334155;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}
.bord-equipe { text-align: center; flex: 1; }
.bord-nom { font-size: 14px; font-weight: 600; color: #cbd5e1; margin-bottom: 4px; }
.bord-score {
  font-size: 48px;
  font-weight: 900;
  color: #fbbf24;
  font-family: 'Courier New', monospace;
}
.bord-score.but-marque {
  animation: but 0.6s ease;
}
@keyframes but {
  0% { transform: scale(1); color: #fbbf24; }
  50% { transform: scale(1.5); color: #10b981; }
  100% { transform: scale(1); color: #fbbf24; }
}
.bord-vs { font-size: 24px; font-weight: 900; color: #475569; }

#zone-jeu { width: 100%; }

/* CARTE DE QUESTION */
.carte {
  background: rgba(255,255,255,0.07);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
}

.robot-parlant {
  font-size: 50px;
  margin-bottom: 12px;
}

.bulle {
  background: rgba(0,212,255,0.1);
  border: 2px solid rgba(0,212,255,0.3);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #e2e8f0;
}

.question-texte {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.4;
}

/* CHOIX */
.choix {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-choix {
  padding: 14px 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: white;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.btn-choix:hover:not(:disabled) {
  background: rgba(59,130,246,0.3);
  border-color: #3b82f6;
  transform: translateX(4px);
}
.btn-choix.correct {
  background: rgba(16,185,129,0.25);
  border-color: #10b981;
}
.btn-choix.mauvais {
  background: rgba(239,68,68,0.25);
  border-color: #ef4444;
}

/* FEEDBACK */
.feedback {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  animation: apparaitre 0.3s ease;
  text-align: left;
}
.feedback.ok {
  background: rgba(16,185,129,0.15);
  border: 2px solid #10b981;
}
.feedback.nok {
  background: rgba(239,68,68,0.15);
  border: 2px solid #ef4444;
}
.feedback strong { display: block; margin-bottom: 6px; font-size: 16px; }

@keyframes apparaitre {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.btn-suivant {
  margin-top: 14px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s;
}
.btn-suivant:hover { transform: scale(1.05); }

/* RÉSULTAT */
.resultat-contenu {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
}
.resultat-emoji { font-size: 80px; }
#resultat-titre { font-size: 32px; font-weight: 900; }
.resultat-score {
  font-size: 28px;
  font-weight: 900;
  color: #fbbf24;
  font-family: 'Courier New', monospace;
  background: rgba(0,0,0,0.3);
  padding: 10px 24px;
  border-radius: 14px;
}
#resultat-message { font-size: 16px; color: #cbd5e1; max-width: 500px; line-height: 1.5; }
.grande-etoiles { font-size: 44px; letter-spacing: 8px; }

.btns-resultat {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-vert, .btn-bleu, .btn-orange {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s;
}
.btn-vert { background: linear-gradient(135deg, #047857, #10b981); color: white; }
.btn-bleu { background: linear-gradient(135deg, #1e40af, #3b82f6); color: white; }
.btn-orange { background: linear-gradient(135deg, #dc2626, #f59e0b); color: white; }
.btn-vert:hover, .btn-bleu:hover, .btn-orange:hover { transform: scale(1.05); }

/* APERÇU DES ANIMATIONS */
.apercu-bloc {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(123,47,247,0.4);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
  text-align: center;
}
.apercu-titre {
  display: block;
  font-size: 14px;
  color: #c4b5fd;
  margin-bottom: 10px;
  font-weight: 600;
}
.apercu-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-apercu {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  transition: transform 0.2s;
}
.btn-apercu:hover { transform: scale(1.05); }
.btn-apercu.but    { background: linear-gradient(135deg, #fbbf24, #ef4444); }
.btn-apercu.arret  { background: linear-gradient(135deg, #7f1d1d, #ef4444); }
.btn-apercu.periode { background: linear-gradient(135deg, #4f46e5, #06b6d4); }

/* ======= ANIMATION BUT! ======= */
.but-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.but-patinoire {
  display: flex;
  align-items: flex-end;
  gap: 0;
  width: 90%;
  max-width: 500px;
  justify-content: center;
  position: relative;
  height: 80px;
  background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 100%);
  border-radius: 12px;
  border: 3px solid #93c5fd;
  overflow: hidden;
}

.but-joueur {
  font-size: 48px;
  position: absolute;
  left: 5%;
  bottom: 4px;
  animation: joueurCourt 0.5s ease-out forwards;
}
@keyframes joueurCourt {
  from { left: 5%; }
  to   { left: 38%; }
}

.but-rondelle {
  font-size: 22px;
  position: absolute;
  bottom: 18px;
  left: 20%;
  animation: rondelleTire 0.45s 0.45s ease-in forwards;
}
@keyframes rondelleTire {
  from { left: 20%; bottom: 18px; }
  to   { left: 73%; bottom: 30px; }
}

.but-filet {
  font-size: 52px;
  position: absolute;
  right: 4%;
  bottom: 2px;
  animation: filetSecoue 0.15s 0.88s ease-in-out 4 alternate;
}
@keyframes filetSecoue {
  from { transform: translateX(0); }
  to   { transform: translateX(6px); }
}

.but-lampe {
  font-size: 48px;
  opacity: 0;
  animation: lampeClignote 0.25s 0.9s ease-in-out 6 alternate forwards;
}
@keyframes lampeClignote {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1.2); }
}

.but-texte-grand {
  font-size: clamp(60px, 16vw, 130px);
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 30px #ef4444, 4px 4px 0 #dc2626;
  letter-spacing: 6px;
  opacity: 0;
  transform: scale(0.3);
  animation: butExplose 0.5s 1s cubic-bezier(.2, 1.6, .4, 1) forwards;
}
@keyframes butExplose {
  to { opacity: 1; transform: scale(1); }
}

.but-confettis {
  display: flex;
  gap: 8px;
  opacity: 0;
  animation: confettisApparait 0.4s 1.3s ease forwards;
}
@keyframes confettisApparait {
  to { opacity: 1; }
}
.but-confettis span {
  font-size: clamp(18px, 4vw, 32px);
  display: inline-block;
  animation: confettiSaute 0.4s ease-in-out infinite alternate;
}
.but-confettis span:nth-child(1) { animation-delay: 0s; }
.but-confettis span:nth-child(2) { animation-delay: 0.05s; }
.but-confettis span:nth-child(3) { animation-delay: 0.1s; }
.but-confettis span:nth-child(4) { animation-delay: 0.15s; }
.but-confettis span:nth-child(5) { animation-delay: 0.2s; }
.but-confettis span:nth-child(6) { animation-delay: 0.25s; }
.but-confettis span:nth-child(7) { animation-delay: 0.3s; }
.but-confettis span:nth-child(8) { animation-delay: 0.35s; }
@keyframes confettiSaute {
  to { transform: translateY(-16px) rotate(15deg); }
}

.but-equipe {
  font-size: clamp(28px, 7vw, 52px);
  opacity: 0;
  letter-spacing: 10px;
  animation: equipeCelebre 0.5s 1.5s cubic-bezier(.2,1.8,.4,1) forwards;
}
@keyframes equipeCelebre {
  to { opacity: 1; transform: translateY(-8px); }
}
.but-equipe span {
  display: inline-block;
  animation: equipeSaut 0.35s ease-in-out infinite alternate;
}
.but-equipe span:nth-child(1) { animation-delay: 0s; }
.but-equipe span:nth-child(2) { animation-delay: 0.12s; }
.but-equipe span:nth-child(3) { animation-delay: 0.24s; }
@keyframes equipeSaut {
  to { transform: translateY(-14px); }
}

.but-cri {
  font-size: clamp(14px, 3.5vw, 24px);
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 3px;
  opacity: 0;
  animation: criApparait 0.4s 1.8s ease forwards;
}
@keyframes criApparait {
  to { opacity: 1; }
}

/* ======= ANIMATION ARRÊT ======= */
.arr-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.arr-patinoire {
  display: flex;
  align-items: flex-end;
  width: 90%;
  max-width: 500px;
  justify-content: center;
  position: relative;
  height: 80px;
  background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 100%);
  border-radius: 12px;
  border: 3px solid #93c5fd;
  overflow: hidden;
}
.arr-adversaire {
  font-size: 44px;
  position: absolute;
  right: 5%;
  bottom: 4px;
  transform: scaleX(-1);
  animation: advGlisse 0.5s ease-out forwards;
}
@keyframes advGlisse {
  from { right: 5%; }
  to   { right: 40%; }
}
.arr-rondelle {
  font-size: 20px;
  position: absolute;
  bottom: 18px;
  right: 22%;
  animation: rondelleTireAdv 0.45s 0.45s ease-in forwards;
}
@keyframes rondelleTireAdv {
  from { right: 22%; bottom: 18px; }
  to   { right: 72%; bottom: 28px; }
}
.arr-gardien {
  font-size: 40px;
  position: absolute;
  left: 7%;
  bottom: 4px;
  animation: gardienPlonge 0.4s 0.5s ease-in forwards;
}
@keyframes gardienPlonge {
  to { transform: rotate(-40deg) translateY(10px); }
}
.arr-filet {
  font-size: 48px;
  position: absolute;
  left: 1%;
  bottom: 2px;
  animation: filetSecoueAdv 0.15s 0.9s ease-in-out 3 alternate;
}
@keyframes filetSecoueAdv {
  from { transform: translateX(0); }
  to   { transform: translateX(-5px); }
}

.arr-texte {
  font-size: clamp(30px, 8vw, 72px);
  font-weight: 900;
  color: #fca5a5;
  text-shadow: 0 0 20px #ef4444;
  opacity: 0;
  animation: arrTexteApparait 0.5s 0.9s ease forwards;
}
@keyframes arrTexteApparait {
  to { opacity: 1; }
}

/* OVERLAY BUT! — célébration quand on marque */
.overlay-but {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1100;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  overflow: hidden;
  background: rgba(4, 8, 28, 0.92);
}
.overlay-but.actif { display: flex; }

.but-fond {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle, rgba(251,191,36,0.4) 0%, rgba(239,68,68,0.3) 50%, rgba(0,0,0,0.5) 100%);
  animation: pulseBut 0.4s ease 4 alternate;
}
.overlay-but.adverse .but-fond {
  background: radial-gradient(circle, rgba(239,68,68,0.4) 0%, rgba(0,0,0,0.6) 100%);
  animation: none;
}
@keyframes pulseBut {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* SCÈNE DU BUT — la mini-vidéo animée */
.scene-but {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 600px;
  height: 180px;
  margin-bottom: 20px;
}
.patinoire-but {
  position: absolute;
  bottom: 30px;
  left: 0; right: 0;
  height: 8px;
  background: linear-gradient(180deg, #e0f2fe, #bae6fd);
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(59,130,246,0.6);
}
.joueur-tireur {
  position: absolute;
  bottom: 38px;
  left: 8%;
  font-size: 60px;
  transform-origin: bottom center;
  animation: joueurTire 2.5s ease-out forwards;
}
.baton {
  position: absolute;
  bottom: 60px;
  left: 14%;
  font-size: 40px;
  transform-origin: bottom left;
  animation: batonFrappe 0.5s 0.2s ease-out forwards;
}
.puck-tir {
  position: absolute;
  bottom: 42px;
  left: 18%;
  font-size: 28px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
  animation: puckVole 1.2s 0.5s cubic-bezier(.4,0,.6,1) forwards;
}
.filet {
  position: absolute;
  bottom: 38px;
  right: 10%;
  font-size: 80px;
  animation: filetSecoue 0.6s 1.6s ease-in-out;
}
.lampe-but {
  position: absolute;
  top: 0;
  right: 12%;
  font-size: 50px;
  opacity: 0;
  animation: lampeFlash 0.6s 1.6s steps(2, end) 4 alternate forwards;
}
.onde-but {
  position: absolute;
  bottom: 60px;
  right: 12%;
  width: 20px;
  height: 20px;
  border: 3px solid #fbbf24;
  border-radius: 50%;
  opacity: 0;
  animation: ondeChoc 1s 1.6s ease-out forwards;
}

@keyframes joueurTire {
  0%   { transform: translateX(0) scaleX(1); }
  20%  { transform: translateX(-10px) scaleX(1); }
  30%  { transform: translateX(20px) scaleX(1); }
  100% { transform: translateX(20px) scaleX(1); }
}
@keyframes batonFrappe {
  0%   { transform: rotate(-30deg); }
  50%  { transform: rotate(40deg); }
  100% { transform: rotate(20deg); }
}
@keyframes puckVole {
  0%   { left: 18%;  bottom: 42px; transform: rotate(0); }
  50%  { left: 55%;  bottom: 90px; transform: rotate(720deg); }
  90%  { left: 80%;  bottom: 50px; transform: rotate(1500deg) scale(1.4); }
  100% { left: 82%;  bottom: 45px; transform: rotate(1700deg) scale(0.8); opacity: 0; }
}
@keyframes filetSecoue {
  0%   { transform: translateX(0) scale(1); }
  20%  { transform: translateX(8px) scale(1.15); }
  40%  { transform: translateX(-6px) scale(1.1); }
  60%  { transform: translateX(4px) scale(1.05); }
  80%  { transform: translateX(-2px) scale(1.02); }
  100% { transform: translateX(0) scale(1); }
}
@keyframes lampeFlash {
  0%   { opacity: 0; filter: drop-shadow(0 0 0 transparent); }
  100% { opacity: 1; filter: drop-shadow(0 0 30px #ef4444) drop-shadow(0 0 50px #fbbf24); }
}
@keyframes ondeChoc {
  0%   { opacity: 1; transform: scale(0); }
  100% { opacity: 0; transform: scale(15); border-width: 1px; }
}

.but-texte {
  position: relative;
  z-index: 2;
  font-size: 120px;
  font-weight: 900;
  color: #fef3c7;
  text-shadow:
    0 0 20px #fbbf24,
    0 0 40px #ef4444,
    0 0 60px #fbbf24;
  letter-spacing: 8px;
  animation: butExplose 0.8s 1.7s cubic-bezier(.5,1.7,.5,1) forwards;
  opacity: 0;
}
.overlay-but.adverse .but-texte {
  font-size: 80px;
  color: #fca5a5;
  text-shadow: 0 0 20px #ef4444;
  letter-spacing: 4px;
  animation: butAdvers 0.8s ease forwards;
}
@keyframes butExplose {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  40% { transform: scale(1.4) rotate(5deg); opacity: 1; }
  60% { transform: scale(1) rotate(-3deg); }
  80% { transform: scale(1.1) rotate(2deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes butAdvers {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.but-confettis {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}
.but-confettis span {
  position: absolute;
  font-size: 40px;
  top: 50%;
  left: 50%;
  animation: confetti 1.6s ease-out forwards;
}
.but-confettis span:nth-child(1)  { animation-delay: 1.65s; --tx:  -300px; --ty: -250px; --rot: -180deg; }
.but-confettis span:nth-child(2)  { animation-delay: 1.70s; --tx:   280px; --ty: -300px; --rot:  280deg; }
.but-confettis span:nth-child(3)  { animation-delay: 1.75s; --tx:  -250px; --ty:  280px; --rot:  120deg; }
.but-confettis span:nth-child(4)  { animation-delay: 1.80s; --tx:   320px; --ty:  250px; --rot: -240deg; }
.but-confettis span:nth-child(5)  { animation-delay: 1.65s; --tx:   -50px; --ty: -380px; --rot:  360deg; }
.but-confettis span:nth-child(6)  { animation-delay: 1.70s; --tx:    50px; --ty:  380px; --rot: -360deg; }
.but-confettis span:nth-child(7)  { animation-delay: 1.75s; --tx:  -380px; --ty:  -50px; --rot:  200deg; }
.but-confettis span:nth-child(8)  { animation-delay: 1.80s; --tx:   380px; --ty:   50px; --rot: -200deg; }
.but-confettis span:nth-child(9)  { animation-delay: 1.85s; --tx:  -200px; --ty: -150px; --rot:  450deg; }
.but-confettis span:nth-child(10) { animation-delay: 1.90s; --tx:   200px; --ty:  150px; --rot: -450deg; }

@keyframes confetti {
  0%   { transform: translate(-50%, -50%) scale(0) rotate(0); opacity: 1; }
  20%  { transform: translate(-50%, -50%) scale(1.2) rotate(calc(var(--rot) * 0.3)); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.6) rotate(var(--rot)); opacity: 0; }
}

/* OVERLAY PÉRIODE — animation entre les périodes */
.overlay-periode {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 22, 40, 0.95);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}
.overlay-periode.actif { display: flex; }

.overlay-contenu {
  width: 100%;
  max-width: 600px;
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.overlay-titre {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 2px;
}
.overlay-titre.fin {
  color: #ef4444;
  animation: glissementGauche 0.8s ease forwards;
}
.overlay-titre.debut {
  color: #fbbf24;
  background: linear-gradient(90deg, #fbbf24, #ef4444, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 56px;
  animation: zoomEntree 0.8s 1.2s ease forwards;
  opacity: 0;
}
@keyframes glissementGauche {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-200%); opacity: 0; }
}
@keyframes zoomEntree {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.patinoire {
  width: 100%;
  height: 60px;
  background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
  border: 3px solid #1e40af;
  border-radius: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(59,130,246,0.5);
}
.rondelle {
  position: absolute;
  top: 50%;
  left: -40px;
  font-size: 32px;
  transform: translateY(-50%);
  animation: glissePuck 1.5s 0.4s ease-out forwards;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}
@keyframes glissePuck {
  0% { left: -40px; transform: translateY(-50%) rotate(0deg); }
  60% { left: 50%; transform: translateY(-50%) rotate(720deg); }
  80% { left: 50%; transform: translateY(-50%) rotate(720deg) scale(1.5); }
  100% { left: 110%; transform: translateY(-50%) rotate(1440deg); }
}

.overlay-citation {
  font-size: 18px;
  color: #cbd5e1;
  font-style: italic;
  margin-top: 12px;
  animation: fadeUp 0.6s 1.8s ease forwards;
  opacity: 0;
}
@keyframes fadeUp {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* CRÉDIT CRÉATEUR */
.credit {
  margin-top: 30px;
  padding: 16px 24px;
  background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(239,68,68,0.15));
  border: 2px solid rgba(251,191,36,0.4);
  border-radius: 14px;
  text-align: center;
  font-size: 16px;
  color: #fef3c7;
}
.credit strong {
  color: #fbbf24;
  font-size: 22px;
  background: linear-gradient(90deg, #fbbf24, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.credit-petit {
  font-size: 12px;
  color: #94a3b8;
}

/* ---- NARRATION CINÉMA (BUT) ---- */
.cin-narr {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  font-weight: 900;
  color: #fef3c7;
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
  letter-spacing: 2px;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
}
.cin-n1 { animation: narrFade 0.7s 0.15s ease forwards, narrFadeOut 0.4s 0.9s ease forwards; }
.cin-n2 { animation: narrFade 0.5s 1.0s ease forwards, narrFadeOut 0.4s 1.55s ease forwards; }
.cin-n3 {
  font-size: 32px;
  color: #fbbf24;
  text-shadow: 0 0 20px #ef4444, 0 2px 12px rgba(0,0,0,0.9);
  animation: narrFade 0.6s 1.7s ease forwards;
}
@keyframes narrFade    { 0% { opacity:0; transform: translateX(-50%) translateY(10px); } 100% { opacity:1; transform: translateX(-50%) translateY(0); } }
@keyframes narrFadeOut { 0% { opacity:1; } 100% { opacity:0; } }

/* ---- CÉLÉBRATION D'ÉQUIPE ---- */
.cin-equipe {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  animation: equipeApparait 0.6s 2.3s cubic-bezier(.3,1.6,.5,1) forwards;
  z-index: 4;
}
@keyframes equipeApparait {
  0%   { opacity: 0; transform: translateX(-50%) scale(0.5) translateY(30px); }
  100% { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}
.cin-cel {
  font-size: 44px;
  display: inline-block;
}
.cin-cel1 { animation: sautCel 0.5s 2.4s ease infinite alternate; }
.cin-cel2 { animation: sautCel 0.5s 2.5s ease infinite alternate; font-size: 52px; }
.cin-cel3 { animation: sautCel 0.5s 2.6s ease infinite alternate; }
.cin-equipe .cin-cel { display: inline-block; margin: 0 6px; }
.cin-equipe { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.cin-cri {
  width: 100%;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 2px;
  animation: narrFade 0.4s 2.6s ease forwards;
  opacity: 0;
}
@keyframes sautCel {
  0%   { transform: translateY(0) rotate(-5deg); }
  100% { transform: translateY(-14px) rotate(5deg); }
}

/* ---- OVERLAY ARRÊT (scène adverse) ---- */
.overlay-arret-scene {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1100;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  overflow: hidden;
  flex-direction: column;
  background: rgba(28, 4, 4, 0.92);
}
.overlay-arret-scene.actif { display: flex; }

.adv-fond {
  background: radial-gradient(circle, rgba(239,68,68,0.45) 0%, rgba(0,0,0,0.75) 100%) !important;
  animation: none !important;
}

/* Narration ARRÊT */
.arr-narr {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  font-weight: 700;
  color: #fca5a5;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
}
.arr-n1 { animation: narrFade 0.4s 0.05s ease forwards, narrFadeOut 0.3s 0.45s ease forwards; }
.arr-n2 { animation: narrFade 0.3s 0.5s  ease forwards, narrFadeOut 0.3s 0.85s ease forwards; }
.arr-n3 { animation: narrFade 0.4s 0.9s  ease forwards; color: #ef4444; font-size: 24px; }

/* Scène ARRÊT */
.scene-arret {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 600px;
  height: 160px;
}
.arr-joueur {
  position: absolute;
  bottom: 40px; right: 8%;
  font-size: 56px;
  transform: scaleX(-1); /* il va vers la gauche */
  animation: arrJoueurGlisse 0.5s 0.0s ease-out forwards;
}
.arr-baton {
  position: absolute;
  bottom: 62px; right: 12%;
  font-size: 36px;
  transform: scaleX(-1) rotate(0deg);
  animation: arrBatonFrappe 0.3s 0.45s ease-out forwards;
}
.arr-puck {
  position: absolute;
  bottom: 44px; right: 20%;
  font-size: 24px;
  opacity: 0;
  animation: arrPuckVole 0.6s 0.5s ease-in forwards;
}
.arr-gardien {
  position: absolute;
  bottom: 36px; left: 10%;
  font-size: 52px;
  animation: arr-gardien-plonge 0.5s 0.7s ease-out forwards;
}
.arr-filet {
  position: absolute;
  bottom: 38px; left: 5%;
  font-size: 70px;
  animation: filetSecoue 0.5s 0.95s ease-in-out;
}
@keyframes arrJoueurGlisse {
  0%   { right: -10%; opacity: 0; }
  100% { right: 8%;   opacity: 1; }
}
@keyframes arrBatonFrappe {
  0%   { transform: scaleX(-1) rotate(0deg); }
  50%  { transform: scaleX(-1) rotate(35deg); }
  100% { transform: scaleX(-1) rotate(20deg); }
}
@keyframes arrPuckVole {
  0%   { right: 20%; opacity: 1; transform: rotate(0); }
  100% { right: 88%; opacity: 1; transform: rotate(-900deg); }
}
@keyframes arr-gardien-plonge {
  0%   { transform: translateX(0) rotate(0); }
  100% { transform: translateX(20px) rotate(-25deg); }
}

.arret-texte {
  position: relative;
  z-index: 3;
  font-size: 70px;
  font-weight: 900;
  color: #fca5a5;
  text-shadow: 0 0 20px #ef4444;
  letter-spacing: 4px;
  opacity: 0;
  animation: butAdvers 0.5s 0.9s ease forwards;
}

/* TROPHÉES */
.trophees-section {
  width: 100%;
  margin: 20px 0 8px;
}
.titre-trophees {
  font-size: 20px;
  color: #fbbf24;
  margin-bottom: 12px;
  text-align: center;
}
.liste-trophees {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trophee-carte {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(234,179,8,0.08));
  border: 2px solid rgba(251,191,36,0.35);
  border-radius: 12px;
}
.trophee-ico {
  font-size: 32px;
  min-width: 40px;
  text-align: center;
}
.trophee-info { flex: 1; }
.trophee-nom {
  font-weight: 700;
  font-size: 15px;
  color: #fef3c7;
}
.trophee-desc {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

/* NOTIFICATION TROPHÉE */
.overlay-trophee {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-200px);
  z-index: 3000;
  background: linear-gradient(135deg, #1e3a8a, #1e40af);
  border: 3px solid #fbbf24;
  border-radius: 20px;
  padding: 20px 32px;
  text-align: center;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 8px 40px rgba(251,191,36,0.4);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.overlay-trophee.actif {
  transform: translateX(-50%) translateY(0);
}
.trophee-notif-titre {
  font-size: 14px;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.trophee-notif-ico {
  font-size: 52px;
  margin: 6px 0;
}
.trophee-notif-nom {
  font-size: 20px;
  font-weight: 900;
  color: #fef3c7;
  margin-bottom: 4px;
}
.trophee-notif-desc {
  font-size: 13px;
  color: #94a3b8;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  h1 { font-size: 28px; }
  .vs-bloc { gap: 12px; }
  .logo-equipe { font-size: 36px; }
  .bord-score { font-size: 36px; }
}
