/* Polices jeu : déposez vos fichiers dans fonts/ (voir noms ci-dessous). Sinon repli système. */
@font-face {
  font-family: "AlibiHeadline";
  src:
    url("fonts/Alibi-Headline.woff2") format("woff2"),
    url("fonts/Alibi-Headline.woff") format("woff");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "AlibiBody";
  src:
    url("fonts/Alibi-Body.woff2") format("woff2"),
    url("fonts/Alibi-Body.woff") format("woff");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #fff8f0;
  --sky: #b8e8ff;
  --mint: #7dffb3;
  --coral: #ff6b6b;
  --sun: #ffd93d;
  --grape: #a855f7;
  --ink: #2d1b4e;
  --ink-soft: #5c4d7a;
  --white: #ffffff;
  --panel: rgba(255, 255, 255, 0.92);
  --shadow: rgba(45, 27, 78, 0.12);
  --font-head: "AlibiHeadline", ui-rounded, "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", sans-serif;
  --font-body: "AlibiBody", ui-rounded, "Segoe UI", system-ui, sans-serif;
}

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

:focus-visible {
  outline: 3px solid var(--grape);
  outline-offset: 2px;
}

kbd {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: 2px solid var(--ink);
  background: var(--panel);
  box-shadow: 1px 1px 0 var(--sun);
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  line-height: 1.45;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  background: var(--cream);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 217, 61, 0.35) 0%, transparent 42%),
    radial-gradient(circle at 90% 15%, rgba(168, 85, 247, 0.22) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(184, 232, 255, 0.55) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(125, 255, 179, 0.25) 0%, transparent 35%);
  background-attachment: fixed;
}

/* confettis discrets */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  background-image:
    radial-gradient(circle, var(--coral) 2px, transparent 2px),
    radial-gradient(circle, var(--sun) 2px, transparent 2px),
    radial-gradient(circle, var(--grape) 2px, transparent 2px);
  background-size: 80px 80px, 120px 120px, 100px 100px;
  background-position:
    0 0,
    40px 60px,
    20px 100px;
}

header {
  padding: 0.65rem 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 248, 240, 0.92));
  border-bottom: 4px solid var(--ink);
  box-shadow: 0 4px 0 var(--sun), 0 8px 24px var(--shadow);
}

.header-inner {
  max-width: 38rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-small {
  flex-shrink: 0;
  filter: drop-shadow(2px 2px 0 var(--sun));
}

.header-titles {
  flex: 1;
  min-width: 0;
}

header h1 {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-transform: none;
}

.phase-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--grape);
  margin-top: 0.15rem;
  letter-spacing: 0.03em;
}

main {
  position: relative;
  z-index: 1;
  padding: 1rem;
  max-width: 38rem;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.welcome-hero {
  text-align: center;
  margin-bottom: 1.25rem;
  padding: 1rem 0.5rem 0.25rem;
}

.logo-big {
  display: inline-block;
  margin-bottom: 0.5rem;
  filter: drop-shadow(4px 4px 0 var(--coral)) drop-shadow(-2px -2px 0 var(--sky));
  animation: logo-pop 2.5s ease-in-out infinite;
}

@keyframes logo-pop {
  0%,
  100% {
    transform: rotate(-1deg) scale(1);
  }
  50% {
    transform: rotate(1deg) scale(1.03);
  }
}

.welcome-tagline {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--coral);
  text-shadow: 1px 1px 0 var(--sun);
}

.welcome-sub {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.panel {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 1.15rem;
  margin-bottom: 1rem;
  box-shadow: 6px 6px 0 var(--sun), 12px 12px 32px var(--shadow);
}

.panel h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 3px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-size: 1.05rem;
  font-family: var(--font-body);
  margin-bottom: 0.75rem;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8);
}

input:focus {
  outline: none;
  border-color: var(--grape);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    0 0 0 3px rgba(168, 85, 247, 0.35);
}

.hint-box {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(135deg, rgba(255, 217, 61, 0.35), rgba(125, 255, 179, 0.35));
  border: 2px dashed var(--ink);
  border-radius: 12px;
}

.hint-box strong {
  color: var(--coral);
}

.team-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.55rem 1.15rem;
  border-radius: 14px;
  border: 3px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
}

button:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

button.primary {
  background: linear-gradient(180deg, var(--coral), #e84545);
  color: var(--white);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

button.primary:active:not(:disabled) {
  background: linear-gradient(180deg, #e84545, var(--coral));
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.timer-display {
  font-family: var(--font-head);
  font-variant-numeric: tabular-nums;
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  margin: 0.5rem 0 1rem;
  color: var(--grape);
  text-shadow: 2px 2px 0 var(--sun);
  letter-spacing: 0.06em;
}

.timer-display.warn {
  color: var(--coral);
}

.timer-display.end {
  color: var(--coral);
  animation: pulse-glow 0.7s ease infinite;
}

@keyframes pulse-glow {
  50% {
    transform: scale(1.02);
  }
}

.alibi-context {
  font-size: 1.05rem;
  white-space: pre-wrap;
  font-weight: 600;
  color: var(--ink);
}

.question-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  justify-content: center;
}

.question-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(45, 27, 78, 0.2);
  border: 2px solid var(--ink);
}

.question-dot.done {
  background: var(--mint);
  box-shadow: 0 0 0 2px var(--ink);
}

.question-dot.current {
  background: var(--sun);
  transform: scale(1.25);
  box-shadow: 0 0 0 2px var(--coral);
}

.question-num {
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--grape);
  margin-bottom: 0.4rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
}

.question-text {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.35;
  color: var(--ink);
  text-align: center;
}

.nav-q {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  margin-top: 1rem;
}

.nav-q button {
  flex: 1;
  background: var(--sky);
}

.interro-score-hint {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  background: rgba(184, 232, 255, 0.5);
  border: 2px solid var(--ink);
  border-radius: 12px;
}

.interro-win-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 0.65rem;
  color: var(--coral);
}

.live-score-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0.85rem;
  background: linear-gradient(135deg, rgba(125, 255, 179, 0.45), rgba(255, 217, 61, 0.4));
  border: 3px solid var(--ink);
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 800;
  justify-content: center;
  box-shadow: 4px 4px 0 var(--ink);
}

.live-score-bar span {
  color: var(--ink);
}

.live-score-bar span.sep {
  color: var(--ink-soft);
  font-weight: 700;
}

.interro-team-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.score-pad-card {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 rgba(45, 27, 78, 0.15);
}

.score-pad-name {
  flex: 1;
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  font-family: var(--font-head);
}

.score-pad-btn {
  flex: 0 0 min(46vw, 9rem);
  min-height: 52px !important;
  font-family: var(--font-head) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.02em !important;
  border-width: 3px !important;
  box-shadow: 3px 3px 0 var(--ink) !important;
}

.score-pad-btn.state-none {
  background: linear-gradient(180deg, #eee, #ddd) !important;
  color: var(--ink-soft) !important;
}

.score-pad-btn.state-ok {
  background: linear-gradient(180deg, var(--mint), #4ade80) !important;
  color: var(--ink) !important;
  border-color: var(--ink) !important;
}

.score-pad-btn.state-ko {
  background: linear-gradient(180deg, #fca5a5, var(--coral)) !important;
  color: var(--white) !important;
  border-color: var(--ink) !important;
}

details.hint {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 600;
}

details.hint summary {
  cursor: pointer;
  color: var(--grape);
  font-family: var(--font-head);
  font-weight: 800;
}

.score-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.5rem 0 1rem;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--white);
}

.score-table {
  border-collapse: collapse;
  font-size: 0.72rem;
  min-width: 100%;
  font-weight: 700;
}

.score-table th,
.score-table td {
  border: 2px solid var(--ink);
  padding: 0.4rem;
  text-align: center;
}

.score-table th.team-head {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  max-width: 2.2rem;
  font-size: 0.62rem;
  font-family: var(--font-head);
  background: var(--sun);
}

.score-table th.q {
  min-width: 1.6rem;
  background: var(--sky);
  font-family: var(--font-head);
}

.cell-btn {
  width: 100%;
  min-height: 40px;
  padding: 0.25rem;
  border: none;
  border-radius: 8px;
  font-size: 0.58rem;
  font-weight: 800;
  font-family: var(--font-head);
  cursor: pointer;
  background: #eee;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.cell-btn.ok {
  background: var(--mint);
  color: var(--ink);
}

.cell-btn.ko {
  background: #fecaca;
  color: var(--ink);
}

.results {
  padding: 0.9rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(255, 107, 107, 0.12));
  border: 3px solid var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.85rem;
}

.results strong {
  color: var(--coral);
}

.error-banner {
  background: #fecaca;
  border: 3px solid var(--coral);
  color: var(--ink);
  padding: 0.85rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.drawn-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--grape);
}

.memo-footnote {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 1rem;
}

/* Pages statiques (aide, légal) */
.layout-static {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.layout-static main {
  flex: 1;
}

.header-inner--wide {
  max-width: 44rem;
}

.header-inner--game {
  flex-wrap: wrap;
  max-width: 48rem;
}

.header-volume {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  min-width: 5.5rem;
}

.header-volume-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.header-volume input[type="range"] {
  width: 100%;
  accent-color: var(--grape);
}

.interro-rules {
  margin: 0.75rem 0;
}

.interro-rules-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-weight: 700;
  font-size: 0.88rem;
}

.btn-row--tight {
  margin-top: 0.5rem;
}

.logo-link {
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.header-title-link {
  text-decoration: none;
  color: inherit;
}

.header-title-link h1 {
  transition: color 0.15s ease;
}

.header-title-link:hover h1 {
  color: var(--coral);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.45rem;
  align-items: center;
}

.site-nav a {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--grape);
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--coral);
  color: var(--coral);
}

.site-nav span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.legal-page .panel h1 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}

.legal-page .legal-meta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}

.legal-page h2 {
  font-family: var(--font-head);
  font-size: 1rem;
  margin: 1.35rem 0 0.5rem;
  color: var(--ink);
}

.legal-page p,
.legal-page li {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.65rem;
}

.legal-page ul,
.legal-page ol {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
}

.legal-page li {
  margin-bottom: 0.4rem;
}

.legal-page a {
  color: var(--grape);
  font-weight: 800;
}

.legal-page .placeholder-box {
  padding: 0.75rem 1rem;
  background: rgba(255, 217, 61, 0.35);
  border: 2px dashed var(--ink);
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  margin: 1rem 0;
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 248, 240, 0.95));
  border-top: 4px solid var(--ink);
  box-shadow: 0 -4px 0 var(--sun);
}

.site-footer-inner {
  max-width: 44rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
}

.site-footer-links a {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--grape);
  text-decoration: none;
}

.site-footer-links a:hover {
  color: var(--coral);
  text-decoration: underline;
}

.site-footer-domain {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink-soft);
}

/* Pied de page sur la page jeu (sous le contenu) */
.game-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 3px dashed rgba(45, 27, 78, 0.2);
}

.game-footer .site-footer-inner {
  border-top: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

/* ——— Thème sombre (palette type maquette cyber / L'Alibi) ——— */
html[data-theme="dark"] {
  --cream: #0b011d;
  --sky: rgba(0, 240, 255, 0.2);
  --mint: #00ff88;
  --coral: #ff007a;
  --sun: #f9ff00;
  --grape: #00f0ff;
  --ink: #f0f4ff;
  --ink-soft: #8faec0;
  --white: #130f28;
  --panel: rgba(19, 15, 40, 0.94);
  --shadow: rgba(0, 240, 255, 0.15);
}

html[data-theme="dark"] body {
  background-color: var(--cream);
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.035) 1px, transparent 1px),
    radial-gradient(ellipse 100% 55% at 50% 0%, rgba(255, 0, 122, 0.14), transparent 52%),
    radial-gradient(ellipse 60% 45% at 100% 90%, rgba(0, 240, 255, 0.08), transparent 40%);
  background-size: 22px 22px, 22px 22px, 100% 100%, 100% 100%;
  background-attachment: fixed;
}

html[data-theme="dark"] body::before {
  opacity: 0.14;
  background-image: radial-gradient(circle, rgba(0, 240, 255, 0.4) 1px, transparent 1px);
  background-size: 52px 52px;
}

html[data-theme="dark"] header {
  background: linear-gradient(180deg, rgba(19, 15, 40, 0.98), rgba(11, 1, 29, 0.96));
  border-bottom: 2px solid var(--coral);
  box-shadow:
    0 0 22px rgba(255, 0, 122, 0.22),
    0 1px 0 rgba(0, 240, 255, 0.4);
}

html[data-theme="dark"] header h1 {
  color: var(--grape);
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.5);
}

html[data-theme="dark"] .phase-label {
  color: var(--ink-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

html[data-theme="dark"] .logo-small {
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.55));
}

html[data-theme="dark"] .logo-big {
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4)) drop-shadow(2px 2px 0 rgba(255, 0, 122, 0.35));
}

html[data-theme="dark"] .welcome-tagline {
  color: var(--grape);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

html[data-theme="dark"] .panel {
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.55);
  box-shadow:
    0 0 24px rgba(0, 240, 255, 0.1),
    inset 0 1px 0 rgba(255, 0, 122, 0.06);
}

html[data-theme="dark"] .panel h2 {
  color: var(--sun);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.95rem;
}

html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] select {
  background: #0d0818;
  border-color: rgba(0, 240, 255, 0.5);
  color: var(--ink);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] input:focus {
  border-color: var(--grape);
  box-shadow:
    inset 0 0 12px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(0, 240, 255, 0.35);
}

html[data-theme="dark"] .hint-box {
  background: rgba(255, 0, 122, 0.1);
  border: 1px solid rgba(255, 0, 122, 0.45);
  border-left: 3px solid var(--coral);
}

html[data-theme="dark"] .hint-box strong {
  color: #00ff00;
}

html[data-theme="dark"] button:not(.theme-toggle) {
  background: rgba(13, 8, 24, 0.95);
  border-color: rgba(0, 240, 255, 0.45);
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(0, 240, 255, 0.2);
}

html[data-theme="dark"] button.primary {
  background: linear-gradient(180deg, #ff007a, #c90062);
  border-color: var(--coral);
  color: #0b011d;
  text-shadow: none;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(255, 0, 122, 0.45);
}

html[data-theme="dark"] .timer-display {
  color: var(--grape);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.55);
}

html[data-theme="dark"] .timer-display.warn,
html[data-theme="dark"] .timer-display.end {
  color: var(--coral);
  text-shadow: 0 0 18px rgba(255, 0, 122, 0.45);
}

html[data-theme="dark"] .question-dot {
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.45);
}

html[data-theme="dark"] .question-dot.done {
  background: var(--mint);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

html[data-theme="dark"] .question-dot.current {
  background: var(--sun);
  box-shadow: 0 0 10px rgba(249, 255, 0, 0.45);
}

html[data-theme="dark"] .nav-q button {
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.4);
}

html[data-theme="dark"] .interro-score-hint {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.35);
  color: var(--ink-soft);
}

html[data-theme="dark"] .interro-win-title {
  color: var(--coral);
  text-shadow: 0 0 10px rgba(255, 0, 122, 0.35);
}

html[data-theme="dark"] .live-score-bar {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(255, 0, 122, 0.1));
  border: 1px solid rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.1);
}

html[data-theme="dark"] .score-pad-card {
  background: rgba(13, 8, 24, 0.9);
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.08);
}

html[data-theme="dark"] .score-pad-btn.state-none {
  background: linear-gradient(180deg, #2a2545, #1a1528) !important;
  color: var(--ink-soft) !important;
  border-color: rgba(0, 240, 255, 0.3) !important;
}

html[data-theme="dark"] .score-table-wrap {
  background: rgba(13, 8, 24, 0.85);
  border-color: rgba(0, 240, 255, 0.4);
}

html[data-theme="dark"] .score-table th,
html[data-theme="dark"] .score-table td {
  border-color: rgba(0, 240, 255, 0.25);
}

html[data-theme="dark"] .cell-btn {
  background: #1e1835;
  color: var(--ink-soft);
}

html[data-theme="dark"] .cell-btn.ko {
  background: rgba(255, 0, 122, 0.2);
  color: #ffb3d4;
}

html[data-theme="dark"] .results {
  background: linear-gradient(135deg, rgba(255, 0, 122, 0.12), rgba(0, 240, 255, 0.08));
  border-color: rgba(0, 240, 255, 0.45);
}

html[data-theme="dark"] .results strong {
  color: var(--grape);
}

html[data-theme="dark"] .error-banner {
  background: rgba(255, 0, 122, 0.15);
  border-color: var(--coral);
  color: #ffd0e5;
}

html[data-theme="dark"] .drawn-title {
  color: var(--grape);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

html[data-theme="dark"] .site-nav a {
  color: var(--grape);
}

html[data-theme="dark"] .site-nav a:hover {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

html[data-theme="dark"] .legal-page .placeholder-box {
  background: rgba(249, 255, 0, 0.08);
  border-color: rgba(0, 240, 255, 0.45);
  color: var(--ink-soft);
}

html[data-theme="dark"] .site-footer {
  background: linear-gradient(180deg, rgba(11, 1, 29, 0.92), rgba(19, 15, 40, 0.98));
  border-top: 2px solid var(--coral);
  box-shadow: 0 -1px 0 rgba(0, 240, 255, 0.3);
}

html[data-theme="dark"] .site-footer-links a {
  color: var(--grape);
}

html[data-theme="dark"] .site-footer-domain {
  color: var(--ink-soft);
}

html[data-theme="dark"] .game-footer {
  border-top-color: rgba(0, 240, 255, 0.2);
}

html[data-theme="dark"] .header-title-link:hover h1 {
  color: var(--coral);
}

/* Bouton thème */
.theme-toggle {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  min-height: 42px;
  border-radius: 10px;
  border: 3px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
}

.theme-toggle:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.theme-toggle__icon {
  font-size: 1.05rem;
  line-height: 1;
}

html[data-theme="dark"] .theme-toggle {
  border-color: rgba(0, 240, 255, 0.55);
  background: rgba(19, 15, 40, 0.95);
  color: var(--grape);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25);
}

