/* =========================================================
   LA MACHINE À EXCUSES — Habillage borne d'arcade
   Tout en CSS : ni image, ni police exotique à télécharger.
   ========================================================= */

:root {
  /* Bois & métal du cabinet */
  --or-clair:   #FFE07A;
  --or:         #F5B824;
  --or-fonce:   #B8860B;
  --or-sombre:  #7A5405;

  /* Fond arcade */
  --nuit:       #0A0713;
  --nuit-2:     #16102A;
  --panneau:    #120D22;
  --panneau-2:  #1D1533;

  /* Accents */
  --rouge:      #E11D2E;
  --rouge-vif:  #FF3B45;
  --vert:       #17B86B;
  --cyan:       #22D3EE;
  --magenta:    #E930A0;

  --texte:      #FFF6E0;
  --texte-doux: #B9A9D6;

  --titre: 'Bangers', 'Impact', 'Haettenschweiler', sans-serif;
  --corps: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --r: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--corps);
  color: var(--texte);
  min-height: 100vh;
  padding: 22px 14px 70px;
  background:
    radial-gradient(ellipse at 15% 0%,   rgba(233,48,160,.30), transparent 45%),
    radial-gradient(ellipse at 85% 8%,   rgba(34,211,238,.26),  transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(245,184,36,.18),  transparent 55%),
    linear-gradient(175deg, #17102E 0%, var(--nuit) 60%, #05030B 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Lueurs d'arrière-plan qui pulsent lentement */
body::before {
  content: '';
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    repeating-linear-gradient(115deg, transparent 0 38px, rgba(255,255,255,.016) 38px 76px);
  animation: derive 22s linear infinite;
}
@keyframes derive { to { transform: translateX(76px); } }

.wrap { max-width: 1000px; margin: 0 auto; position: relative; }

/* =========================================================
   LE CABINET
   ========================================================= */

.cabinet {
  position: relative;
  border-radius: 34px;
  padding: 18px;
  background:
    linear-gradient(150deg, var(--or-clair) 0%, var(--or) 18%, var(--or-sombre) 48%,
                    var(--or) 74%, var(--or-clair) 100%);
  box-shadow:
    0 0 0 3px var(--or-sombre),
    0 26px 60px rgba(0,0,0,.75),
    inset 0 2px 3px rgba(255,255,255,.65),
    inset 0 -3px 6px rgba(0,0,0,.45);
}

/* Guirlande d'ampoules sur tout le pourtour */
.cabinet::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 28px;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, #FFF3B0 0 7px, transparent 7px 30px) top    / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, #FFF3B0 0 7px, transparent 7px 30px) bottom / 100% 7px no-repeat,
    repeating-linear-gradient(180deg, #FFF3B0 0 7px, transparent 7px 30px) left  / 7px 100% no-repeat,
    repeating-linear-gradient(180deg, #FFF3B0 0 7px, transparent 7px 30px) right / 7px 100% no-repeat;
  filter: drop-shadow(0 0 5px #FFD86B) drop-shadow(0 0 12px rgba(255,190,60,.75));
  animation: ampoules 1.15s steps(2) infinite;
  opacity: .92;
}
@keyframes ampoules {
  0%   { background-position-x: 0, 0; opacity: .95; }
  100% { background-position-x: 15px, 15px; opacity: .6; }
}

.interieur {
  position: relative;
  border-radius: 22px;
  padding: 20px 18px 24px;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(120,80,200,.30), transparent 60%),
    linear-gradient(180deg, var(--panneau-2), var(--panneau) 45%, #0B0716);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.6), inset 0 14px 36px rgba(0,0,0,.6);
}

/* ---------- Sirène ---------- */

.sirene {
  position: absolute;
  top: -30px; left: 16px;
  width: 46px; height: 54px;
  z-index: 6;
  pointer-events: none;
}
.sirene .dome {
  position: absolute;
  bottom: 11px; left: 3px;
  width: 40px; height: 34px;
  border-radius: 20px 20px 5px 5px;
  background: linear-gradient(160deg, #FF8A8A, var(--rouge) 45%, #7E0A14);
  box-shadow: inset -5px -3px 9px rgba(0,0,0,.5), inset 4px 3px 7px rgba(255,255,255,.45);
}
.sirene .socle {
  position: absolute;
  bottom: 0; left: 0;
  width: 46px; height: 14px;
  border-radius: 5px;
  background: linear-gradient(180deg, #5C5C6B, #23232E);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.sirene .halo {
  position: absolute;
  bottom: 14px; left: -20px;
  width: 86px; height: 66px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,60,70,.75), transparent 68%);
  opacity: 0;
}
.machine-active .sirene .halo { animation: girophare 0.75s ease-in-out infinite; }
@keyframes girophare {
  0%, 100% { opacity: 0; transform: scale(.75); }
  50%      { opacity: 1; transform: scale(1.25); }
}

/* ---------- Levier ---------- */

.levier {
  position: absolute;
  top: 40px; right: -34px;
  width: 66px; height: 190px;
  z-index: 5;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}
.levier .axe {
  position: absolute;
  top: 22px; left: 27px;
  width: 12px; height: 128px;
  border-radius: 6px;
  background: linear-gradient(90deg, #6E6E80, #D8D8E6 35%, #9A9AAD 65%, #4A4A58);
  transform-origin: bottom center;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
.levier .boule {
  position: absolute;
  top: -4px; left: 12px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 28%, #FF9B9B, var(--rouge) 48%, #6E0812);
  box-shadow: 0 5px 14px rgba(0,0,0,.6), inset -4px -5px 10px rgba(0,0,0,.45);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
.levier .base {
  position: absolute;
  bottom: 26px; left: 14px;
  width: 38px; height: 34px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--or-clair), var(--or-fonce));
  box-shadow: inset 0 2px 2px rgba(255,255,255,.6), 0 4px 10px rgba(0,0,0,.5);
}
.levier:hover .boule { transform: translateY(5px); }
.levier.tire .axe    { transform: rotate(30deg) scaleY(.74); }
.levier.tire .boule  { transform: translate(24px, 74px); }

/* =========================================================
   FRONTON & LOGO
   ========================================================= */

.fronton {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.marquee {
  position: relative;
  flex: 1;
  min-width: 250px;
  text-align: center;
  padding: 13px 30px;
  border-radius: 18px;
  background: linear-gradient(180deg, #2B1840, #150B22);
  box-shadow:
    0 0 0 3px var(--or),
    0 0 0 6px #5A3A00,
    0 0 26px rgba(255,180,40,.5),
    inset 0 0 34px rgba(255,150,30,.22);
}
.marquee::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 12px;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, #FFE9A8 0 5px, transparent 5px 22px) top / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, #FFE9A8 0 5px, transparent 5px 22px) bottom / 100% 5px no-repeat;
  filter: drop-shadow(0 0 4px #FFC94D);
  animation: ampoules 1.15s steps(2) infinite reverse;
}

.logo { line-height: .78; }
.logo .l1 {
  display: block;
  font-family: var(--corps);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 2px;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(34,211,238,.9);
}
.logo .l2, .logo .l3 {
  display: block;
  font-family: var(--titre);
  font-size: clamp(34px, 7vw, 58px);
  letter-spacing: 2px;
}
.logo .l2 {
  color: #FFFDF5;
  text-shadow: 0 0 12px rgba(255,255,255,.6), 0 4px 0 #B8860B, 0 6px 14px rgba(0,0,0,.8);
}
.logo .l3 {
  background: linear-gradient(180deg, #FFF0A8 10%, var(--or) 52%, #C97A06 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 #7A4A03) drop-shadow(0 0 16px rgba(255,190,50,.85));
}

.baseline {
  display: inline-block;
  margin-top: 9px;
  padding: 6px 18px;
  border-radius: 30px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--or-clair);
  background: rgba(0,0,0,.55);
  border: 2px solid var(--or-fonce);
}

/* ---------- Compteur LED ---------- */

.compteur-global {
  text-align: center;
  padding: 9px 16px 11px;
  border-radius: 14px;
  background: linear-gradient(180deg, #241A38, #100A1E);
  box-shadow: 0 0 0 3px var(--or-fonce), inset 0 3px 10px rgba(0,0,0,.85);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--texte-doux);
}
.compteur-global strong {
  display: block;
  margin-top: 5px;
  padding: 3px 14px;
  border-radius: 7px;
  background: #16040A;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.95);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 32px;
  font-weight: 700;
  color: #FF4444;
  text-shadow: 0 0 9px #FF2222, 0 0 22px rgba(255,40,40,.8);
}
.compteur-global strong.tic { animation: tic .35s ease; }
@keyframes tic {
  50% { transform: scale(1.28); color: #FFD24D; text-shadow: 0 0 16px #FFB300; }
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.onglets {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 9px;
  border-radius: 16px;
  background: rgba(0,0,0,.42);
  box-shadow: inset 0 0 0 2px rgba(245,184,36,.28);
}

.onglet {
  font-family: var(--corps);
  font-weight: 700;
  font-size: 12.5px;
  padding: 10px 17px;
  border-radius: 30px;
  border: 2px solid rgba(245,184,36,.4);
  background: linear-gradient(180deg, #241B3C, #140E26);
  color: var(--texte-doux);
  cursor: pointer;
  transition: transform .14s, box-shadow .14s, color .14s;
  white-space: nowrap;
}
.onglet:hover {
  transform: translateY(-2px);
  color: var(--texte);
  border-color: var(--or);
  box-shadow: 0 0 14px rgba(245,184,36,.45);
}
.onglet.actif {
  background: linear-gradient(180deg, var(--or-clair), var(--or) 55%, var(--or-fonce));
  border-color: #FFF3C4;
  color: #2B1A00;
  box-shadow: 0 0 20px rgba(255,190,50,.75), inset 0 1px 0 rgba(255,255,255,.8);
}
.onglet-profil {
  margin-left: auto;
  border-color: var(--rouge);
  color: #FFD9DC;
  background: linear-gradient(180deg, #3A1220, #200A12);
}
.onglet-profil:hover { border-color: var(--rouge-vif); box-shadow: 0 0 16px rgba(255,59,69,.6); }

/* =========================================================
   PANNEAUX & CARTES
   ========================================================= */

.panneau { display: none; }
.panneau.actif { display: block; animation: entree .3s ease; }
@keyframes entree {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.carte {
  position: relative;
  border-radius: var(--r);
  padding: 20px 18px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(40,28,68,.95), rgba(18,12,34,.95));
  box-shadow:
    0 0 0 2px var(--or-fonce),
    0 0 0 4px rgba(0,0,0,.55),
    0 10px 26px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.07);
}

.titre-section {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--or-clair);
  margin-bottom: 14px;
  text-shadow: 0 0 10px rgba(255,190,50,.45);
}

/* Pastilles numérotées 1 / 2 / 3 */
.etape::before {
  content: attr(data-etape);
  flex-shrink: 0;
  width: 27px; height: 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--titre);
  font-size: 17px;
  color: #3A2400;
  background: radial-gradient(circle at 34% 30%, #FFF0AE, var(--or) 55%, var(--or-fonce));
  box-shadow: 0 3px 8px rgba(0,0,0,.6), inset 0 -2px 4px rgba(0,0,0,.3);
}

/* =========================================================
   CATÉGORIES
   ========================================================= */

.grille-cat {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.cat {
  --c: #888;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 13px 8px 11px;
  border-radius: 13px;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 12.5px;
  text-align: center;
  color: rgba(255,255,255,.5);
  background: linear-gradient(180deg, #221A38, #140E26);
  border: 2px solid rgba(255,255,255,.09);
  transition: transform .14s, box-shadow .14s, color .14s, border-color .14s;
}
.cat .emo { font-size: 25px; filter: grayscale(.85) opacity(.55); transition: filter .14s; }

.cat:hover {
  transform: translateY(-3px);
  border-color: var(--c);
  color: #fff;
}
.cat:hover .emo { filter: none; }

.cat.on {
  color: #fff;
  border-color: rgba(255,255,255,.9);
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--c) 82%, white 18%),
              var(--c) 55%,
              color-mix(in srgb, var(--c) 72%, black 28%));
  box-shadow:
    0 0 20px color-mix(in srgb, var(--c) 70%, transparent),
    inset 0 2px 0 rgba(255,255,255,.5),
    inset 0 -3px 6px rgba(0,0,0,.3);
  text-shadow: 0 2px 3px rgba(0,0,0,.5);
}
.cat.on .emo { filter: none; transform: scale(1.06); }

.cat.on::after {
  content: '✓';
  position: absolute;
  top: 5px; right: 7px;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}

/* Repli si color-mix n'est pas supporté */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .cat.on { background: var(--c); }
}

.ligne-actions-cat {
  display: flex;
  gap: 7px;
  margin-top: 13px;
  flex-wrap: wrap;
  align-items: center;
}

.mini {
  font-family: var(--corps);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 20px;
  border: 2px solid rgba(245,184,36,.35);
  background: rgba(0,0,0,.45);
  color: var(--texte-doux);
  cursor: pointer;
  transition: all .14s;
}
.mini:hover { border-color: var(--or); color: var(--or-clair); transform: translateY(-2px); }
.mini.on {
  background: linear-gradient(180deg, var(--or-clair), var(--or-fonce));
  color: #2B1A00;
  border-color: #FFF3C4;
}
.mini.muet {
  border: none; background: none; cursor: default;
  color: var(--or-clair); font-weight: 800; letter-spacing: .4px;
}
.mini.muet:hover { transform: none; }

/* =========================================================
   TONS
   ========================================================= */

.tons { display: flex; gap: 8px; flex-wrap: wrap; }

.ton {
  padding: 10px 19px;
  border-radius: 30px;
  border: 2px solid rgba(255,255,255,.13);
  background: linear-gradient(180deg, #221A38, #140E26);
  color: var(--texte-doux);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.ton:hover { transform: translateY(-2px); color: #fff; border-color: var(--cyan); }
.ton.on {
  color: #06281E;
  background: linear-gradient(180deg, #6BF0B4, var(--vert));
  border-color: #C9FFE6;
  box-shadow: 0 0 18px rgba(23,184,107,.65), inset 0 1px 0 rgba(255,255,255,.6);
}

/* =========================================================
   LA MACHINE : ROULEAUX
   ========================================================= */

.machine {
  position: relative;
  border-radius: 20px;
  padding: 22px 18px 20px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #2A1206, #170A04);
  box-shadow:
    0 0 0 3px var(--rouge),
    0 0 0 6px var(--or-fonce),
    0 14px 34px rgba(0,0,0,.65),
    inset 0 0 44px rgba(255,90,0,.14);
}

.rouleaux {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-bottom: 16px;
}

.rouleau {
  position: relative;
  height: 122px;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 26px 11px 12px;
  /* Cylindre métallique */
  background: linear-gradient(180deg,
    #6D6151 0%, #C9BCA4 12%, #FFFDF5 34%, #FFFFFF 50%,
    #F3EBDA 66%, #BDB09A 86%, #655A4B 100%);
  box-shadow:
    0 0 0 3px var(--or),
    0 0 0 5px #5A3A00,
    inset 0 10px 18px rgba(0,0,0,.42),
    inset 0 -10px 18px rgba(0,0,0,.42);
}

.rouleau .etiquette {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  padding: 3px 14px;
  border-radius: 0 0 9px 9px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.1px;
  color: #3A2400;
  background: linear-gradient(180deg, var(--or-clair), var(--or));
  box-shadow: 0 2px 5px rgba(0,0,0,.5);
  z-index: 2;
}

.rouleau .val {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.32;
  text-align: center;
  color: #1A1008;
}

/* Flèches latérales */
.rouleau::before, .rouleau::after {
  content: '';
  position: absolute;
  top: 50%;
  margin-top: -7px;
  border-block: 7px solid transparent;
  z-index: 2;
  filter: drop-shadow(0 0 3px rgba(255,190,50,.8));
}
.rouleau::before { left: 2px;  border-left: 9px solid var(--or); }
.rouleau::after  { right: 2px; border-right: 9px solid var(--or); }

.rouleau.spin .val {
  animation: defile .085s linear infinite;
  opacity: .45;
  filter: blur(.6px);
}
@keyframes defile {
  0%   { transform: translateY(-17px); }
  100% { transform: translateY(17px); }
}

.rouleau.stop { animation: choc .3s cubic-bezier(.36,.07,.19,.97); }
@keyframes choc {
  0%   { transform: translateY(-7px); }
  45%  { transform: translateY(4px); }
  75%  { transform: translateY(-2px); }
  100% { transform: none; }
}

/* ---------- Écran de l'excuse ---------- */

.ecran {
  position: relative;
  border-radius: 13px;
  padding: 20px 22px;
  min-height: 96px;
  display: grid;
  place-items: center;
  text-align: center;
  margin-bottom: 15px;
  background: linear-gradient(180deg, #FFFDF2, #F2E9D2);
  box-shadow:
    0 0 0 3px var(--or),
    0 0 0 5px #5A3A00,
    inset 0 3px 12px rgba(0,0,0,.2);
}
/* Ampoules autour de l'écran */
.ecran::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 9px;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, #FFC94D 0 5px, transparent 5px 20px) top / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, #FFC94D 0 5px, transparent 5px 20px) bottom / 100% 4px no-repeat;
  filter: drop-shadow(0 0 3px #FFB300);
  animation: ampoules 1.15s steps(2) infinite;
}

.excuse {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: #16233A;
}
.excuse.vide { color: #8A7E68; font-weight: 600; font-size: 14.5px; }
.excuse.revele { animation: revele .45s cubic-bezier(.2,.9,.3,1.3); }
@keyframes revele {
  0%   { opacity: 0; transform: scale(.9) rotate(-1.2deg); }
  60%  { opacity: 1; transform: scale(1.03); }
  100% { transform: none; }
}

/* ---------- Jauge de ridiculité ---------- */

.score-ligne {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.score-lbl {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1.3px;
  color: var(--or-clair);
}
.score-val {
  font-family: var(--titre);
  font-size: 34px;
  letter-spacing: 1px;
  color: var(--or);
  text-shadow: 0 0 14px rgba(255,190,50,.8);
  min-width: 52px;
}
.score-val.pop { animation: pop .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes pop { 40% { transform: scale(1.45); color: #FFF0A8; } }

.jauge {
  flex: 1;
  min-width: 160px;
  height: 16px;
  border-radius: 10px;
  background: rgba(0,0,0,.6);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.8), 0 0 0 2px var(--or-fonce);
  overflow: hidden;
}
.jauge span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--vert), var(--or) 55%, var(--rouge-vif));
  box-shadow: 0 0 14px rgba(255,170,40,.9);
  transition: width .65s cubic-bezier(.2,.9,.3,1);
}

.badge-combo {
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(180deg, #8B2FD6, #5B1897);
  box-shadow: 0 0 16px rgba(139,47,214,.7);
}
.badge-combo.jackpot {
  color: #3A2400;
  background: linear-gradient(180deg, #FFF0A8, var(--or) 55%, var(--or-fonce));
  box-shadow: 0 0 24px rgba(255,190,50,.95);
  animation: clignoJackpot .55s ease-in-out infinite alternate;
}
@keyframes clignoJackpot {
  to { box-shadow: 0 0 38px rgba(255,220,90,1); transform: scale(1.05); }
}

/* =========================================================
   BOUTONS
   ========================================================= */

.btn {
  font-family: var(--corps);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: .4px;
  padding: 13px 24px;
  border-radius: 13px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .11s, box-shadow .11s, filter .11s;
  color: #fff;
  background: linear-gradient(180deg, #3A2C58, #211838);
  box-shadow: 0 5px 0 #120C22, 0 8px 16px rgba(0,0,0,.5);
}
.btn:hover:not(:disabled)  { transform: translateY(-2px); box-shadow: 0 7px 0 #120C22, 0 12px 22px rgba(0,0,0,.55); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #120C22; }
.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: 0 5px 0 #120C22; }

/* Bouton principal rouge serti d'or */
.btn-gros {
  width: 100%;
  justify-content: center;
  font-size: clamp(14px, 3.4vw, 19px);
  font-weight: 900;
  letter-spacing: 1.2px;
  padding: 19px 20px;
  border-radius: 15px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,.55);
  background: linear-gradient(180deg, #FF4A54, var(--rouge) 48%, #96101D);
  box-shadow:
    0 0 0 3px var(--or),
    0 0 0 6px #5A3A00,
    0 8px 0 #6E0A14,
    0 14px 28px rgba(0,0,0,.6),
    inset 0 2px 0 rgba(255,255,255,.4);
}
.btn-gros:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px #FFE07A, 0 0 0 6px #5A3A00, 0 10px 0 #6E0A14,
              0 18px 34px rgba(0,0,0,.65), 0 0 34px rgba(255,60,70,.6),
              inset 0 2px 0 rgba(255,255,255,.45);
}
.btn-gros:active:not(:disabled) {
  transform: translateY(6px);
  box-shadow: 0 0 0 3px var(--or), 0 0 0 6px #5A3A00, 0 2px 0 #6E0A14, inset 0 2px 0 rgba(255,255,255,.3);
}
.btn-gros:not(:disabled) { animation: respire 2.3s ease-in-out infinite; }
@keyframes respire {
  50% { filter: brightness(1.12); }
}

.btn-2 { font-size: 12px; padding: 11px 16px; }
.btn-3 {
  background: linear-gradient(180deg, #2BE08C, var(--vert));
  color: #05301E;
  box-shadow: 0 5px 0 #0A6E40, 0 8px 16px rgba(0,0,0,.45);
}
.btn-3:hover:not(:disabled) { box-shadow: 0 7px 0 #0A6E40, 0 12px 22px rgba(0,0,0,.5); }
.btn-2.danger { color: #FF8C93; }

.rangee-btn { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.rangee-btn.gauche { justify-content: flex-start; margin-top: 20px; }
.rangee-btn.droite { justify-content: flex-end; }

.astuce {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,.38);
  margin-top: 11px;
}
.astuce strong { color: var(--or-clair); }

.note {
  text-align: center;
  font-size: 11px;
  line-height: 1.65;
  color: var(--texte-doux);
  margin-top: 13px;
}
.note strong { color: var(--or-clair); }

/* =========================================================
   PLUIE DE PIÈCES
   ========================================================= */

.pieces {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
}
.piece {
  position: absolute;
  top: -40px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #FFF3B0, var(--or) 48%, var(--or-fonce));
  box-shadow: 0 0 12px rgba(255,190,50,.85), inset -3px -3px 6px rgba(0,0,0,.35);
  animation: tombe linear forwards;
}
.piece::after {
  content: '€';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 13px;
  color: rgba(120,75,0,.65);
}
@keyframes tombe {
  0%   { transform: translateY(0) rotate(0) scale(1); opacity: 1; }
  100% { transform: translateY(105vh) rotate(760deg) scale(.7); opacity: 0; }
}

/* =========================================================
   PROFIL / STATS
   ========================================================= */

.profil-tete {
  display: flex;
  align-items: center;
  gap: 17px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.avatar {
  width: 82px; height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 40px;
  flex-shrink: 0;
  background: radial-gradient(circle at 33% 28%, #FFF0AE, var(--or) 55%, var(--or-fonce));
  box-shadow: 0 0 0 4px #5A3A00, 0 0 26px rgba(255,190,50,.6), inset 0 -4px 9px rgba(0,0,0,.3);
}
.profil-tete h2 {
  font-family: var(--titre);
  font-size: 35px;
  letter-spacing: 1.4px;
  color: var(--or-clair);
  text-shadow: 0 0 16px rgba(255,190,50,.6);
}
.rang-txt { font-size: 13px; font-weight: 700; color: var(--texte-doux); }

.grille-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
}
.stat {
  text-align: center;
  padding: 15px 9px;
  border-radius: 13px;
  background: linear-gradient(180deg, #241A3C, #130D24);
  box-shadow: 0 0 0 2px var(--or-fonce), inset 0 2px 9px rgba(0,0,0,.55);
}
.stat .v {
  font-family: var(--titre);
  font-size: 31px;
  letter-spacing: 1px;
  color: var(--or);
  text-shadow: 0 0 12px rgba(255,190,50,.6);
}
.stat .l {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--texte-doux);
}

.niveau-barre {
  height: 18px;
  border-radius: 12px;
  background: rgba(0,0,0,.6);
  box-shadow: inset 0 2px 7px rgba(0,0,0,.85), 0 0 0 2px var(--or-fonce);
  overflow: hidden;
  margin-bottom: 8px;
}
.niveau-barre span {
  display: block; height: 100%; width: 0;
  border-radius: 12px;
  background: repeating-linear-gradient(45deg, var(--or) 0 9px, var(--or-fonce) 9px 18px);
  box-shadow: 0 0 14px rgba(255,190,50,.8);
  transition: width .6s ease;
}
.niveau-reste { font-size: 12px; font-weight: 600; color: var(--texte-doux); margin-bottom: 20px; }

/* =========================================================
   CLASSEMENT
   ========================================================= */

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left;
  padding: 10px 8px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--or-clair);
  border-bottom: 2px solid rgba(245,184,36,.3);
}
td { padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.07); }
th.num, td.num { text-align: right; font-weight: 700; }
tr.moi { background: rgba(245,184,36,.12); }
tr.moi td { color: var(--or-clair); font-weight: 800; }

.rang { font-family: var(--titre); font-size: 21px; width: 52px; letter-spacing: 1px; color: var(--or); }
.joueur { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.pastille {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 16px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #3A2C58, #1B1330);
  box-shadow: 0 0 0 2px var(--or-fonce);
}
.moi-tag { color: var(--texte-doux); font-size: 11px; font-style: normal; }

/* =========================================================
   SUCCÈS
   ========================================================= */

.grille-succes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 11px;
}
.succes {
  text-align: center;
  padding: 16px 11px;
  border-radius: 13px;
  background: linear-gradient(180deg, #2C2050, #16102C);
  box-shadow: 0 0 0 2px var(--or), 0 6px 16px rgba(0,0,0,.45);
  transition: transform .15s;
}
.succes:hover { transform: translateY(-4px); }
.succes .ico { font-size: 33px; margin-bottom: 6px; filter: drop-shadow(0 0 9px rgba(255,190,50,.6)); }
.succes .nom { font-weight: 800; font-size: 12.5px; margin-bottom: 4px; color: var(--or-clair); }
.succes .desc { font-size: 11px; line-height: 1.4; color: var(--texte-doux); }
.succes .pts {
  display: inline-block;
  margin-top: 9px;
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 900;
  color: #3A2400;
  background: linear-gradient(180deg, var(--or-clair), var(--or));
}
.succes.verrouille {
  background: linear-gradient(180deg, #1A1630, #100C20);
  box-shadow: 0 0 0 2px rgba(255,255,255,.09);
  opacity: .55;
}
.succes.verrouille .ico { filter: grayscale(1); }
.succes.verrouille .nom { color: var(--texte-doux); }
.succes.verrouille .pts { background: rgba(255,255,255,.1); color: var(--texte-doux); }

/* =========================================================
   MUR & COLLECTION
   ========================================================= */

.entete-carte {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.entete-carte .titre-section { margin-bottom: 0; }
.filtres { display: flex; gap: 6px; flex-wrap: wrap; }

.item-mur, .item-collec {
  border-radius: 13px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #251B42, #150F2A);
  box-shadow: 0 0 0 2px rgba(245,184,36,.28), 0 5px 14px rgba(0,0,0,.4);
}
.item-mur p, .item-collec p {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 11px;
  color: var(--texte);
}

.mur-tete {
  display: flex; align-items: center; gap: 9px;
  flex-wrap: wrap; margin-bottom: 9px; font-size: 13px;
}
.mur-tete strong { color: var(--or-clair); }
.mur-date { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--texte-doux); }

.meta { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--texte-doux); font-weight: 600; }

.puce {
  padding: 3px 11px;
  border-radius: 20px;
  font-weight: 800;
  background: rgba(0,0,0,.5);
  box-shadow: inset 0 0 0 1px rgba(245,184,36,.3);
  color: var(--texte-doux);
}
.puce.or {
  background: linear-gradient(180deg, var(--or-clair), var(--or));
  color: #3A2400;
  box-shadow: 0 0 12px rgba(255,190,50,.6);
}

.bouton-vote {
  font-family: var(--corps);
  font-weight: 800;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 30px;
  border: 2px solid rgba(245,184,36,.35);
  background: rgba(0,0,0,.45);
  color: var(--texte-doux);
  cursor: pointer;
  transition: all .15s;
}
.bouton-vote:hover { transform: translateY(-2px); border-color: var(--or); color: var(--or-clair); }
.bouton-vote.vote {
  background: linear-gradient(180deg, var(--or-clair), var(--or));
  border-color: #FFF3C4;
  color: #3A2400;
  box-shadow: 0 0 18px rgba(255,190,50,.7);
}

.vide-msg {
  text-align: center;
  padding: 38px 20px;
  font-size: 14px;
  color: var(--texte-doux);
}

/* =========================================================
   MODALES
   ========================================================= */

.modale {
  position: fixed; inset: 0;
  background: rgba(5,3,12,.82);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 120;
}
.modale.on { display: flex; }
.modale.panne { display: none; }

.modale-boite {
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  padding: 26px;
  background: linear-gradient(180deg, #2A1F4C, #140E28);
  box-shadow: 0 0 0 3px var(--or), 0 0 0 6px #5A3A00, 0 24px 60px rgba(0,0,0,.8);
  animation: surgit .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes surgit {
  from { opacity: 0; transform: scale(.9) translateY(-18px); }
  to   { opacity: 1; transform: none; }
}

.modale-boite h3 {
  font-family: var(--titre);
  font-size: 31px;
  letter-spacing: 1.3px;
  color: var(--or-clair);
  text-shadow: 0 0 16px rgba(255,190,50,.6);
  margin-bottom: 5px;
}
.modale-boite p.sous { font-size: 13px; color: var(--texte-doux); margin-bottom: 18px; line-height: 1.5; }

label.champ {
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--or-clair);
  margin-bottom: 6px;
}

input[type=text] {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 2px solid rgba(245,184,36,.35);
  background: rgba(0,0,0,.5);
  color: var(--texte);
  font-family: var(--corps);
  font-size: 15px;
  margin-bottom: 16px;
}
input[type=text]:focus { outline: none; border-color: var(--or); box-shadow: 0 0 16px rgba(255,190,50,.4); }
input[type=text]::placeholder { color: rgba(185,169,214,.45); }

.choix-avatar { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.choix-avatar button {
  width: 44px; height: 44px;
  font-size: 21px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.45);
  cursor: pointer;
  transition: all .14s;
}
.choix-avatar button:hover { transform: scale(1.12); border-color: var(--or); }
.choix-avatar button.on {
  border-color: #FFF3C4;
  background: linear-gradient(180deg, var(--or-clair), var(--or));
  box-shadow: 0 0 18px rgba(255,190,50,.75);
}

.bloc-code {
  border-radius: 11px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--texte-doux);
  background: rgba(0,0,0,.45);
  box-shadow: inset 0 0 0 1px rgba(245,184,36,.25);
}
.bloc-code strong { color: var(--or-clair); }
.bloc-code code {
  padding: 2px 7px;
  border-radius: 5px;
  background: #06040E;
  color: var(--or);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11.5px;
}
.detail-panne { font-size: 12px; font-weight: 700; color: #FF8C93; margin-top: 10px; word-break: break-word; }

/* =========================================================
   TOASTS
   ========================================================= */

.toasts {
  position: fixed;
  bottom: 18px; right: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  z-index: 200;
  max-width: 330px;
}
.toast {
  padding: 13px 17px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #2E2358, #1A1234);
  box-shadow: 0 0 0 2px var(--cyan), 0 10px 26px rgba(0,0,0,.6);
  animation: glisse .3s cubic-bezier(.34,1.56,.64,1);
}
.toast.succes { box-shadow: 0 0 0 2px var(--vert), 0 10px 26px rgba(0,0,0,.6); }
.toast.trophee {
  color: #3A2400;
  background: linear-gradient(180deg, #FFF0A8, var(--or));
  box-shadow: 0 0 0 2px #FFF3C4, 0 0 28px rgba(255,190,50,.8), 0 10px 26px rgba(0,0,0,.5);
}
@keyframes glisse {
  from { opacity: 0; transform: translateX(50px) scale(.9); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================
   PIED
   ========================================================= */

.pied {
  text-align: center;
  font-size: 11.5px;
  line-height: 1.8;
  color: rgba(185,169,214,.55);
  margin-top: 26px;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 720px) {
  body { padding: 16px 9px 50px; }
  .cabinet { padding: 11px; border-radius: 24px; }
  .interieur { padding: 15px 11px 18px; border-radius: 17px; }
  .levier { display: none; }
  .sirene { top: -24px; left: 8px; transform: scale(.8); }
  .fronton { flex-direction: column; }
  .marquee { width: 100%; padding: 11px 16px; }
  .compteur-global { width: 100%; }
  .onglets { gap: 5px; padding: 7px; }
  .onglet { font-size: 11px; padding: 8px 12px; }
  .onglet-profil { margin-left: 0; }
  .rouleaux { grid-template-columns: 1fr; gap: 8px; }
  .rouleau { height: 76px; padding: 24px 10px 9px; }
  .excuse { font-size: 15px; }
  .grille-cat { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .cat { font-size: 11px; padding: 11px 5px 9px; }
  .cat .emo { font-size: 21px; }
  .toasts { left: 10px; right: 10px; max-width: none; bottom: 10px; }
  .mur-date { margin-left: 0; width: 100%; }
  .entete-carte { flex-direction: column; align-items: flex-start; }
  th, td { padding: 9px 5px; font-size: 12.5px; }
  .rang { font-size: 18px; width: 40px; }
}

/* Respect du réglage système « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- Bouton de coupure du son ---------- */

.bloc-compteur { display: flex; align-items: center; gap: 10px; }

.btn-son {
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 19px;
  cursor: pointer;
  border: 2px solid var(--or-fonce);
  background: linear-gradient(180deg, #241A38, #100A1E);
  box-shadow: inset 0 2px 7px rgba(0,0,0,.7);
  transition: all .15s;
}
.btn-son:hover {
  transform: translateY(-2px);
  border-color: var(--or);
  box-shadow: 0 0 16px rgba(255,190,50,.5), inset 0 2px 7px rgba(0,0,0,.7);
}
.btn-son.coupe { opacity: .5; filter: grayscale(1); }

@media (max-width: 720px) {
  .bloc-compteur { width: 100%; }
  .bloc-compteur .compteur-global { flex: 1; }
}

/* ---------- Page de confidentialité ---------- */

.texte p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--texte);
  margin-bottom: 12px;
}
.texte p:last-child { margin-bottom: 0; }
.texte strong { color: var(--or-clair); }

.texte ul {
  margin: 0 0 12px 20px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--texte);
}
.texte li { margin-bottom: 4px; }
.texte li::marker { color: var(--or); }

.texte a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.texte a:hover { color: var(--or-clair); }

.responsable { font-size: 12.5px; color: var(--texte-doux); }

.etat-mesure {
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  margin: 14px 0 4px;
}
.etat-mesure.on {
  color: #C9FFE6;
  background: rgba(23,184,107,.16);
  box-shadow: inset 0 0 0 2px rgba(23,184,107,.5);
}
.etat-mesure.off {
  color: #FFD9DC;
  background: rgba(225,29,46,.16);
  box-shadow: inset 0 0 0 2px rgba(225,29,46,.5);
}

.lien-pied {
  color: var(--or-clair);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.lien-pied:hover { color: var(--or); }

/* Un onglet peut aussi être un lien (retour à l'accueil) */
a.onglet { text-decoration: none; display: inline-block; }
