@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Cinzel+Decorative:wght@700;900&family=EB+Garamond:ital,wght@0,500;0,600;0,700;0,800;1,500;1,600&family=Inter:wght@400;600;800&display=swap');

:root {
  /* Charte « Catherine de MardiSix » — inspirée de l'affiche du lancement des Mardi 6 */
  --primary: #140c0c;     /* noir travaillé (remplace le marine) */
  --secondary: #7d1d26;   /* bordeaux (remplace le rose) */
  --on-secondary: #f3c467;
  --text: #e3a64a;        /* ocre / jaune orangé (remplace le blanc) */
  --gold: #f3c467;        /* ocre clair pour les mises en avant */
  --parchment: #ecd8ae;   /* parchemin des bannières */
  --ink: #2a130f;         /* encre sur parchemin */
  --bg: var(--primary);
  --panel: rgba(227, 166, 74, .07);
  --panel-strong: rgba(227, 166, 74, .14);
  --line: rgba(227, 166, 74, .3);
  --muted: rgba(227, 166, 74, .62);
  --ok: #3f9a4a;
  --ko: #b3262f;
  --radius: 14px;
  --display: 'Cinzel', Georgia, serif;
  --deco: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --body: 'EB Garamond', Georgia, 'Times New Roman', serif;
  /* grain du « noir travaillé » */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .85 0 0 0 0 .55 0 0 0 0 .3 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--body);
  font-weight: 600;
  background-color: var(--primary);
  background-image:
    var(--grain),
    radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0, 0, 0, .7) 100%), /* vignette façon salle aux chandelles */
    radial-gradient(ellipse at 50% -15%, rgba(214, 132, 52, .22), transparent 55%),
    radial-gradient(ellipse at 0% 110%, rgba(125, 29, 38, .32), transparent 50%),
    radial-gradient(ellipse at 100% 110%, rgba(125, 29, 38, .24), transparent 50%),
    linear-gradient(180deg, #1b1010, #0c0707);
  background-attachment: fixed;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; cursor: pointer; border: 0; }
input, select, textarea { font: inherit; }
.hidden { display: none !important; }
.display { font-family: var(--display); letter-spacing: .02em; }
.muted { color: var(--muted); }
h1, h2 { color: var(--gold); text-shadow: 0 0 18px rgba(243, 196, 103, .25), 0 2px 0 rgba(0, 0, 0, .6); }

/* Logo du club : conservé tel quel (rose) */
.logo { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }

/* Catherine de MardiSix, présentatrice du jeu : personnage détouré de l'affiche + bulle parchemin */
.mascot { position: relative; display: flex; flex-direction: column; align-items: center; }
.mascot img {
  display: block; object-fit: contain; min-height: 0;
  filter: drop-shadow(0 0 22px rgba(214, 132, 52, .35)) drop-shadow(0 10px 16px rgba(0, 0, 0, .65));
  animation: mascotIn .7s cubic-bezier(.2,.9,.3,1.3) both;
}
.mascot .bubble {
  position: relative; background: var(--parchment); color: var(--ink); font-weight: 700; font-style: italic;
  padding: .7em 1em; border-radius: .9em; line-height: 1.2; text-align: center;
  border: 2px solid #b98356;
  box-shadow: 0 6px 18px rgba(0,0,0,.5), inset 0 0 14px rgba(120, 70, 30, .25);
  margin-bottom: 1.6em; animation: pop .5s .35s cubic-bezier(.2,.9,.3,1.3) both;
}
.mascot .bubble::after { content: ''; position: absolute; left: 50%; bottom: -.7em; transform: translateX(-50%); border: .8em solid transparent; border-bottom: 0; border-top-color: var(--parchment); }
.mascot .bubble b { color: var(--secondary); font-style: normal; }
@keyframes mascotIn { from { transform: translateY(40px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* Pastilles des 3 dernières réponses */
.dots { display: inline-flex; gap: 4px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ko); box-shadow: inset 0 -2px 0 rgba(0,0,0,.3); }
.dot.ok { background: var(--ok); }

/* Maillot */
.jersey {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px; font-family: Inter, sans-serif; font-weight: 800; font-size: 15px; color: #111;
  background: var(--team, #ddd);
  clip-path: polygon(25% 0, 75% 0, 100% 18%, 88% 34%, 82% 30%, 82% 100%, 18% 100%, 18% 30%, 12% 34%, 0 18%);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 12px; font-weight: 700;
  background: linear-gradient(180deg, #9a2734, var(--secondary));
  color: var(--on-secondary);
  border: 1px solid rgba(243, 196, 103, .45);
  box-shadow: 0 3px 0 #3d0d12, 0 6px 16px rgba(0,0,0,.4);
  transition: transform .1s, filter .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { filter: grayscale(1) opacity(.5); cursor: default; }
.btn.ghost { background: var(--panel-strong); color: var(--text); box-shadow: none; border-color: var(--line); }
.btn.danger { background: var(--ko); color: #fff3dc; }

@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 50% { transform: scale(1.06); } }
@keyframes shake { 10%, 90% { transform: translateX(-2px) rotate(-1deg); } 30%, 70% { transform: translateX(4px) rotate(2deg); } 50% { transform: translateX(-4px) rotate(-2deg); } }
@keyframes eq { 0%, 100% { height: 15%; } 50% { height: 100%; } }
@keyframes flicker { 0%, 100% { opacity: 1; } 45% { opacity: .85; } 50% { opacity: .95; } 70% { opacity: .8; } }
.pop { animation: pop .5s cubic-bezier(.2,.9,.3,1.3) both; }
.slide-up { animation: slideUp .45s ease both; }
