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

:root {
  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;

  /* Surfaces */
  --color-bg:      #FBF3E6;
  --color-surface: #FFFFFF;
  --color-border:  #ECE2D2;

  /* Text */
  --color-text:       #3A2A20;
  --color-text-muted: #8A7A6E;
  --color-muted:      #8A7A6E;

  /* Brand */
  --color-primary:    #E8623D;
  --color-on-primary: #FFFFFF;
  --color-success:    #1FA98B;
  --color-accent:     #F2B705;
  --color-danger:     #D9483B;
  --color-score:      #3A2A20;

  /* Outcome colours */
  --color-win:  #1FA98B;
  --color-draw: #F2B705;
  --color-loss: #8A7A6E;

  --radius:         12px;
  --radius-control: 10px;
  --space: 1rem;
}

[data-theme="game"] {
  --color-bg:         #17120E;
  --color-surface:    #241B14;
  --color-border:     #2E241C;
  --color-text:       #F5EDE0;
  --color-text-muted: #B8A693;
  --color-muted:      #B8A693;
  --color-primary:    #F2734B;
  --color-on-primary: #17120E;
  --color-success:    #2BC8A0;
  --color-accent:     #FFD27A;
  --color-score:      #FFD27A;
  --color-win:        #2BC8A0;
  --color-draw:       #FFD27A;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  background: var(--color-bg);
  color: var(--color-text);
}

/* Prevent iOS Safari auto-zoom on focus (requires font-size >= 16px) */
input, select, textarea { font-size: max(16px, 1rem); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .75rem;
  color: var(--color-text);
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space);
  background: color-mix(in srgb, var(--color-bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.site-logo { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
.ticon {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: #17120E;
  display: flex; align-items: center; justify-content: center; gap: 2px;
}
[data-theme="game"] .ticon { background: var(--color-border); }
.ticon-t { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1; color: #FFD27A; }
.ticon-dots { display: flex; flex-direction: column; gap: 2px; }
.ticon-dots span { width: 3px; height: 3px; border-radius: 1px; display: block; }
.ticon-dots span:nth-child(1) { background: #F2734B; }
.ticon-dots span:nth-child(2) { background: #FFD27A; }
.ticon-dots span:nth-child(3) { background: #2BC8A0; }
.wordmark { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.wordmark-tri { color: #3A2A20; }
[data-theme="game"] .wordmark-tri { color: var(--color-text); }
.wordmark-llay { color: var(--color-primary); }
.site-nav { display: flex; gap: 1rem; align-items: center; }
.site-nav a { color: var(--color-primary); text-decoration: none; font-weight: 600; }
.nav-user { color: var(--color-text-muted); font-weight: 400 !important; }

/* Main */
.site-main { max-width: 720px; margin: 0 auto; padding: var(--space); }
.has-tabbar .site-main { padding-bottom: 90px; }

/* Tab bar (navigation basse, univers "gens" uniquement — pas sur l'écran de jeu) */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: color-mix(in srgb, var(--color-bg) 97%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--color-border);
  padding: .5rem 1.5rem .9rem;
  display: flex; align-items: flex-end; justify-content: space-between;
  max-width: 720px; margin: 0 auto;
}
.tab-bar-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  flex: 1; min-width: 0; background: none; border: none; cursor: pointer;
  font-family: var(--font-body); text-decoration: none;
  color: var(--color-text-muted);
}
.tab-bar-item span { font-weight: 700; font-size: .7rem; }
.tab-bar-item svg { display: block; stroke: currentColor; }
.tab-bar-item--active { color: var(--color-primary); }

/* Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(58, 42, 32, .04);
  padding: var(--space);
  margin-bottom: var(--space);
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .5rem 1.25rem;
  border-radius: var(--radius-control);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn:active { opacity: .75; }
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); box-shadow: 0 3px 0 #c94f2f; }
.btn-block { width: 100%; padding: .9rem; font-size: 1.05rem; font-weight: 800; }
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-sm { padding: .3rem .85rem; font-size: .875rem; min-width: 44px; }
.select-inline {
  min-height: 36px;
  padding: .2rem .4rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-control);
  font-size: .85rem;
  font-family: var(--font-body);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  max-width: 130px;
}
.btn-link {
  background: none; border: none; cursor: pointer;
  color: var(--color-primary); font-weight: 600;
  font-family: var(--font-body); font-size: 1rem;
  padding: 0; text-decoration: none;
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .4rem;
  color: var(--color-text);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 44px;
  padding: .6rem .75rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-control);
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent);
}
.form-group .errorlist { color: var(--color-danger); margin: .3rem 0 0; padding: 0; list-style: none; font-size: .875rem; }
.form-error { color: var(--color-danger); font-size: .875rem; margin: .3rem 0; }
.form-help  { color: var(--color-text-muted); font-size: .875rem; margin: .3rem 0 0; }
.form-actions { display: flex; gap: .75rem; margin-top: 1.25rem; flex-wrap: wrap; }

/* Auth (connexion/inscription) */
.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 8px 24px -16px rgba(58, 42, 32, .3);
  max-width: 420px;
  margin: 2rem auto 0;
}
.auth-card h1 { font-size: 1.9rem; margin-bottom: .25rem; }
.auth-card-sub { color: var(--color-text-muted); font-size: .92rem; margin-bottom: 1.4rem; }
.auth-switch { text-align: center; color: var(--color-text-muted); font-size: .92rem; margin-top: 1.1rem; max-width: 420px; margin-left: auto; margin-right: auto; }
.auth-switch a { font-weight: 800; }

.auth-benefits {
  background: rgba(31, 169, 139, .08);
  border: 1.5px solid rgba(31, 169, 139, .32);
  border-radius: 18px;
  padding: 1.25rem 1.1rem;
  margin: 1.4rem auto 0;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.auth-benefit { display: flex; align-items: flex-start; gap: .75rem; }
.auth-benefit-check {
  width: 26px; height: 26px; border-radius: 50%; background: var(--color-success);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: .1rem;
}
.auth-benefit-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--color-success); line-height: 1.15; }
.auth-benefit-sub { color: var(--color-text-muted); font-size: .86rem; margin-top: .1rem; }

/* Team buckets (game setup) */
.bucket { margin-top: 1rem; }
.bucket-header {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-text-muted);
  padding: .3rem 0;
  border-bottom: 1.5px solid var(--color-border);
  margin-bottom: .15rem;
}
.bucket-list { min-height: 2.75rem; }
.bucket-list:not(:has(.draggable-item)) {
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius);
}
.dnd-hint {
  font-size: .78rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin: .25rem 0 .75rem;
}
.dnd-icon {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-right: .4rem;
  flex-shrink: 0;
  user-select: none;
}
.draggable-item { cursor: grab; touch-action: none; }
.draggable-item:active { cursor: grabbing; }
.sortable-ghost  { opacity: .35; background: var(--color-border); border-radius: var(--radius); }
.sortable-chosen { background: var(--color-bg, #fff); box-shadow: 0 2px 8px rgba(0,0,0,.12); cursor: grabbing; }

/* Alerts */
.alert { padding: .875rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid transparent; }
.alert-warning { background: #fefce8; border-color: #fde047; color: #854d0e; }

/* Lists */
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--color-border);
}
.list-item:last-child { border-bottom: none; }

/* Target score progression (pétanque-style) */
@keyframes liquid-shimmer {
  0%   { background-position: 0% 30%; }
  33%  { background-position: 100% 68%; }
  66%  { background-position: 52% 12%; }
  100% { background-position: 0% 30%; }
}
@keyframes bar-bounce {
  0%, 100% { transform: translateY(0); }
  40%      { transform: translateY(-3px); }
  65%      { transform: translateY(2px); }
}
@keyframes bar-fever {
  0%, 100% { transform: translateY(0); }
  20%      { transform: translateY(-5px); }
  40%      { transform: translateY(4px); }
  60%      { transform: translateY(-4px); }
  80%      { transform: translateY(3px); }
}
@keyframes score-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
.target-scoreboard {
  display: flex;
  gap: .75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.target-card {
  flex: 1;
  min-width: 6rem;
  text-align: center;
  padding: .75rem .5rem .6rem;
  background: var(--color-bg);
  border-radius: var(--radius-card);
}
.target-card-name {
  font-size: .72rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.target-card-score {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-score);
  margin-bottom: .5rem;
}
.target-track {
  height: 10px;
  background: var(--color-border);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: .4rem;
}
.target-fill {
  height: 100%;
  border-radius: 5px;
  min-width: 4px;
  transition: width .4s ease;
  background: linear-gradient(
    108deg,
    color-mix(in srgb, var(--color-primary) 88%, #000) 0%,
    var(--color-primary) 20%,
    color-mix(in srgb, var(--color-primary) 68%, #fff) 36%,
    color-mix(in srgb, var(--color-primary) 83%, #fff) 45%,
    var(--color-primary) 58%,
    color-mix(in srgb, var(--color-primary) 75%, #fff) 72%,
    var(--color-primary) 85%,
    color-mix(in srgb, var(--color-primary) 91%, #000) 100%
  );
  background-size: 360% 230%;
  animation: liquid-shimmer 5.5s ease-in-out infinite;
}
.target-hint {
  font-size: .75rem;
  color: var(--color-text-muted);
}
/* niveau 1 — tension qui monte */
.target-card--shake-1 .target-track {
  animation: bar-bounce 1.6s ease-in-out infinite;
}
/* niveau 2 — extreme fever */
.target-card--shake-2 .target-track {
  animation: bar-fever .55s ease-in-out infinite;
  box-shadow: 0 0 8px color-mix(in srgb, var(--color-primary) 60%, transparent);
}
.target-card--shake-2 .target-card-score {
  animation: score-pulse 1.1s ease-in-out infinite;
  display: inline-block;
}
.target-card--done .target-card-score { color: var(--color-win); }
.target-card--done .target-fill {
  background: var(--color-win);
  animation: none;
}
.target-card--done .target-hint,
.target-hint--win { color: var(--color-win); font-weight: 700; }
.target-hint { font-size: .8rem; margin-top: .25rem; }

/* Leaderboard (group ranking) */
.leaderboard { list-style: none; margin: 0; padding: 0; }
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--color-border);
}
.leaderboard-row:last-child { border-bottom: none; }
.leaderboard-row--me {
  background: rgba(232, 98, 61, .07);
  border-radius: var(--radius);
  padding-left: .5rem;
  padding-right: .5rem;
  margin-left: -.5rem;
  margin-right: -.5rem;
}
.ldb-rank {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.ldb-rank--1    { background: var(--color-primary); color: var(--color-on-primary); }
.ldb-rank--2    { background: var(--color-win);     color: #fff; }
.ldb-rank--3    { background: var(--color-accent);  color: var(--color-text); }
.ldb-rank--none { font-size: .8rem; }
.ldb-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.ldb-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leaderboard-row--me .ldb-name { font-weight: 700; }
.ldb-stats { font-size: .82rem; color: var(--color-text-muted); }
.ldb-bar { display: block; height: 5px; border-radius: 3px; background: var(--color-border); margin-top: .4rem; overflow: hidden; max-width: 140px; }
.ldb-bar-fill { display: block; height: 100%; background: var(--color-win); border-radius: 3px; }
.ldb-wins-col { text-align: right; flex-shrink: 0; }
.ldb-wins-num {
  display: block;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  font-size: 1.85rem;
  line-height: .9;
  color: var(--color-win);
}
.ldb-wins-label { display: block; color: var(--color-text-muted); font-size: .66rem; font-weight: 700; text-transform: lowercase; margin-top: .25rem; }
.leaderboard-row--top { background: #FDECE4; border-radius: var(--radius); padding-left: .5rem; padding-right: .5rem; margin-left: -.5rem; margin-right: -.5rem; }
.ldb-detail { font-size: .72rem; color: var(--color-text-muted); opacity: .6; }
.unranked-header {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-text-muted);
  padding: .3rem 0;
  border-bottom: 1.5px solid var(--color-border);
  margin: 1.25rem 0 .15rem;
}

/* Ranking table */
.ranking-table { width: 100%; border-collapse: collapse; }
.ranking-table th,
.ranking-table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.ranking-table th {
  font-weight: 600;
  font-size: .8rem;
  color: var(--color-text-muted);
  background: var(--color-bg);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.ranking-table td.rank-win,
.ranking-table td.rank-draw,
.ranking-table td.rank-loss {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}
.rank-win  { color: var(--color-win);  font-weight: 700; }
.rank-draw { color: var(--color-draw); font-weight: 700; }
.rank-loss { color: var(--color-loss); }

/* Score grid (round entry) */
.score-grid { display: grid; gap: 1rem; }
.score-row { display: flex; align-items: center; gap: .75rem; }
.score-row label { flex: 1; font-weight: 600; font-size: 1.05rem; }
.score-row input {
  width: 100px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  min-height: 52px;
  color: var(--color-score);
}

/* Heading row */
.heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: var(--space);
}
.heading-row h1,
.heading-row h2 { margin: 0; }

/* Status badge */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  font-family: var(--font-body);
  white-space: nowrap;
}
.badge-setup       { background: #EDE9FE; color: #5B21B6; }
.badge-in_progress { background: #D1FAE5; color: #065F46; }
.badge-finished    { background: var(--color-border); color: var(--color-text-muted); }

/* Stats grid (profil) — toujours 4 colonnes sur une seule ligne, même sur
   petit mobile : auto-fit/minmax les faisait passer en 2x2 dès que l'écran
   était trop étroit pour 4 x 130px. */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  margin-bottom: var(--space);
}
.stat-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: .7rem .35rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(58, 42, 32, .04);
}
.stat-card--win  { border-color: var(--color-win); }
.stat-card--draw { border-color: var(--color-draw); }
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 6vw, 2rem);
  font-weight: 600;
  line-height: 1;
  color: var(--color-score);
}
.stat-label { font-size: .68rem; font-weight: 700; color: var(--color-text-muted); margin-top: .35rem; }

/* Profil — héros, taux de victoire, série, fétiche/bête noire */
.profile-hero { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.profile-hero-avatar { box-shadow: 0 6px 16px -6px rgba(58, 42, 32, .35); }
.profile-hero h1 { font-size: clamp(1.6rem, 6.5vw, 2.1rem); letter-spacing: -.01em; }
.profile-hero-handle { color: var(--color-text-muted); font-weight: 600; font-size: .92rem; margin-top: .1rem; }

.group-hero { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.1rem; }
.group-hero-avatar { box-shadow: 0 6px 16px -6px rgba(58, 42, 32, .35); }
.group-hero h1 { font-size: clamp(1.55rem, 6.5vw, 2.05rem); letter-spacing: -.01em; line-height: 1.08; }
.group-hero-meta { color: var(--color-text-muted); font-weight: 600; font-size: .9rem; margin-top: .2rem; }

.cta-card {
  text-align: center;
  border: 2px solid var(--color-primary);
  box-shadow: 0 10px 24px -14px rgba(232, 98, 61, .4);
}

/* Mes groupes — liste de cartes */
.group-list-item { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: inherit; }
.group-list-name-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.group-list-name { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; color: var(--color-text); }
.rank-pill { font-weight: 800; font-size: .68rem; padding: .15rem .6rem; border-radius: 100px; flex-shrink: 0; }
.rank-pill--1 { background: rgba(242, 183, 5, .18); color: #B98900; }
.rank-pill--other { background: var(--color-border); color: var(--color-text-muted); }
.group-list-meta { color: var(--color-text-muted); font-size: .82rem; margin-top: .2rem; }
.group-list-last { color: var(--color-text-muted); opacity: .75; font-size: .8rem; margin-top: .1rem; }
.group-list-chevron { flex-shrink: 0; stroke: #C9B79E; }

.winrate-card { display: flex; align-items: center; gap: 1.25rem; }
.winrate-ring {
  width: 96px; height: 96px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--color-primary) var(--winrate-deg, 0deg), var(--color-border) 0);
}
.winrate-ring-inner {
  width: 74px; height: 74px; border-radius: 50%; background: var(--color-surface);
  display: flex; align-items: center; justify-content: center;
}
.winrate-ring-inner span { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; color: var(--color-primary); }
.winrate-title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -.01em; line-height: 1.1; }
.winrate-sub { color: var(--color-text-muted); font-size: .9rem; margin-top: .3rem; }

.streak-card { display: flex; align-items: center; gap: .9rem; }
.streak-icon {
  width: 54px; height: 54px; border-radius: 15px; flex-shrink: 0;
  background: rgba(242, 183, 5, .16);
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
}
.streak-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -.01em; line-height: 1.1; }
.streak-sub { color: var(--color-text-muted); font-size: .86rem; margin-top: .1rem; }
.streak-numbers { display: flex; gap: 1rem; flex-shrink: 0; text-align: center; }
.streak-numbers .divider { width: 1px; background: var(--color-border); align-self: stretch; }
.streak-num { font-family: var(--font-display); font-weight: 600; font-size: 2.1rem; line-height: .9; }
.streak-num-label { color: var(--color-text-muted); font-size: .62rem; font-weight: 700; margin-top: .2rem; }

/* Jeu fétiche / Bête noire — toujours côte à côte sur une seule ligne,
   même sur petit mobile : auto-fit/minmax(210px) les empilait dès que
   l'écran était trop étroit pour 2 x 210px. */
.highlight-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.highlight-grid .card { padding: .8rem .65rem; }
.highlight-label { font-weight: 800; font-size: .62rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .6rem; }
.highlight-body { display: flex; align-items: center; gap: .5rem; }
.highlight-icon {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.highlight-name {
  font-family: var(--font-display); font-weight: 500; font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.highlight-tag { color: var(--color-text-muted); font-size: .72rem; }
.highlight-pct { text-align: right; flex-shrink: 0; }
.highlight-pct-num { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1; }
.highlight-pct-label { color: var(--color-text-muted); font-size: .58rem; font-weight: 700; margin-top: .1rem; }

/* Lignes jeu / partie (profil : "Par jeu", "Parties récentes") */
.game-row { display: flex; align-items: center; gap: .75rem; padding: .75rem .25rem; border-top: 1px solid var(--color-border); text-decoration: none; color: inherit; }
.game-row:first-child { border-top: none; }
.game-row-icon {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; background: var(--color-bg);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.game-row-body { flex: 1; min-width: 0; }
.game-row-name { font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; color: var(--color-text); }
.game-row-sub { color: var(--color-text-muted); font-size: .8rem; margin-top: .1rem; }
.game-row-vnd { display: flex; gap: .75rem; text-align: center; flex-shrink: 0; }
.game-row-vnd-num { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1; }
.game-row-vnd-label { color: var(--color-text-muted); font-size: .62rem; font-weight: 700; margin-top: .15rem; }
.game-row-result {
  display: inline-block; font-weight: 800; font-size: .78rem; padding: .3rem .75rem;
  border-radius: 100px; flex-shrink: 0;
}
.game-row-result--win  { background: rgba(31, 169, 139, .12); color: var(--color-success); }
.game-row-result--loss { background: var(--color-border); color: var(--color-text-muted); }
.game-row-result--draw { background: rgba(242, 183, 5, .16); color: #B98900; }

/* Face à face (rivalités) */
.rival-row { display: flex; align-items: center; gap: .75rem; padding: .75rem .25rem; border-top: 1px solid var(--color-border); }
.rival-row:first-child { border-top: none; }
.rival-status { font-weight: 700; font-size: .78rem; margin-top: .1rem; }
.rival-score { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1; flex-shrink: 0; }

/* Summary banner (partie terminée) */
.summary-banner {
  background: var(--color-surface);
  border: 2px solid var(--color-win);
  border-radius: var(--radius);
  padding: 1.5rem var(--space);
  margin-bottom: var(--space);
  text-align: center;
}
.summary-winner {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-text);
}
.summary-sub { color: var(--color-text-muted); font-size: .9rem; margin-top: .4rem; }

/* Live badge */
.live-badge {
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-success);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* Messages */
.messages { list-style: none; padding: 0; margin: 0 0 var(--space); }
.message { padding: .75rem var(--space); border-radius: var(--radius); margin-bottom: .5rem; font-weight: 500; }
.message--success { background: #D1FAE5; color: #065F46; }
.message--error   { background: #FEE2E2; color: #991B1B; }

/* Empty state */
.empty-state {
  color: var(--color-text-muted);
  font-size: .95rem;
  padding: 1.25rem 0;
  text-align: center;
}

/* Chips (member selection) */
.chip-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .4rem 1.1rem;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}
.chip:active { background: var(--color-bg); border-color: var(--color-primary); }

/* Join code display */
.join-code {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: .3em;
  color: var(--color-primary);
  margin: .25rem 0;
}

/* Checkbox row — prevents full-width stretch on tablet/desktop */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  flex-wrap: nowrap;
}
.checkbox-row input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.checkbox-row label {
  display: inline;
  margin: 0;
  cursor: pointer;
}

/* Alert info */
.alert-info { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }

/* Game gallery (template selection) */
.game-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .65rem;
  margin-bottom: 1.25rem;
}
.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: 1rem .75rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  cursor: pointer;
  font-family: var(--font-body);
  text-align: center;
  height: 128px;
  width: 100%;
  transition: border-color .12s, background .12s;
  overflow: hidden;
}
.game-card:hover { border-color: var(--color-primary); }
.game-card.selected {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface));
}
.game-card-icon { font-size: 1.75rem; line-height: 1; }
.game-card-name {
  font-weight: 700;
  font-size: .9rem;
  color: var(--color-text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-card-sub {
  font-size: .75rem;
  color: var(--color-text-muted);
  line-height: 1.3;
  margin-top: .1rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Hauteur fixe (voir .game-card ci-dessus) : les cartes d'une même grille
   restent toutes identiques quelle que soit la longueur du nom/du sous-titre.
   align-self: start évite qu'une grille CSS n'étire le wrap au-delà de cette
   hauteur (comportement par défaut de align-items: stretch), ce qui garderait
   l'étoile — positionnée en absolu par rapport au wrap — alignée avec le coin
   de la carte quel que soit son contenu. */
.game-card-wrap { position: relative; align-self: start; }
.game-card-star {
  position: absolute;
  top: .3rem;
  right: .3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  color: #E8A400;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
.game-card-star--off { color: var(--color-text-muted); }
.game-card-star:hover { background: var(--color-bg); }

/* Excluded player row */
.player-excluded { opacity: .45; }
.player-excluded span { text-decoration: line-through; }

/* Saisir screen */
.mini-scores {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: .25rem 0 1rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1rem;
}
.mini-score-item { display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.mini-score-name { font-size: .72rem; color: var(--color-text-muted); text-align: center; max-width: 5rem; }
.mini-score-val  { font-size: 1.15rem; font-weight: 700; color: var(--color-score); }
.saisir-list { display: flex; flex-direction: column; }
.saisir-row {
  padding: .9rem 0;
  border-bottom: 1px solid var(--color-border);
}
.saisir-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .55rem;
}
.saisir-name    { font-weight: 700; font-size: 1.05rem; font-family: var(--font-display); }
.saisir-current { font-size: 1.3rem; font-weight: 600; font-family: var(--font-display); color: var(--color-score); }
.saisir-controls { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.saisir-btn {
  min-width: 56px;
  min-height: 56px;
  padding: 0 .75rem;
  border-radius: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: 0 3px 0 #c94f2f;
  border: none;
}
[data-theme="game"] .saisir-btn { box-shadow: 0 3px 0 #c9552f; }
.saisir-input {
  width: 5.5rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  padding: .4rem .5rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text);
}
.saisir-input:focus { outline: none; border-color: var(--color-primary); }
.saisir-btn:disabled,
.saisir-input:disabled { opacity: .4; cursor: default; }

/* Composant de saisie commun (pétanque, foot, parties libres) —
   le classement lui-même sert de sélecteur (gain de place, pas de liste
   de participants dupliquée) : voir .score-select-target ci-dessous. */
.score-entry-hint {
  font-size: .8rem;
  color: var(--color-text-muted);
  margin: -.25rem 0 .75rem;
}
.score-select-target {
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.target-card.score-select-target {
  border: 2px solid transparent;
}
.target-card.score-select-target.selected {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 12%, var(--color-bg));
}
tr.score-select-target.selected {
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
}
.score-entry-increments {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.score-entry-manual {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.score-entry-manual .saisir-input { flex: 1; }
.score-entry-manual .btn { flex-shrink: 0; }

/* Barre d'outils écran de jeu (chrono, garder allumé) */
.game-toolbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chrono-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--color-border); color: var(--color-accent);
  font-family: var(--font-display); font-weight: 600; font-size: .85rem;
  padding: .5rem .75rem; border-radius: 100px;
}
.wakelock-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 700; font-size: .84rem; padding: .5rem .8rem; border-radius: 100px;
  border: none; cursor: pointer; background: var(--color-border); color: var(--color-text-muted);
  font-family: var(--font-body);
}
.wakelock-btn.active { background: rgba(43, 200, 160, .12); color: var(--color-win); }
.wakelock-btn:disabled { opacity: .5; cursor: default; }

.history-link {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 14px; padding: .95rem 1rem; color: var(--color-text);
  font-weight: 700; font-size: .98rem; text-decoration: none; flex: 1;
}

/* Radio option (game create) */
.radio-option {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .8rem .9rem;
  border-radius: 12px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  font-weight: 700;
  font-size: .96rem;
  margin-bottom: .6rem;
}
.radio-option:has(input:checked) { background: #FDECE4; border-color: var(--color-primary); }
.radio-option input[type="radio"] {
  width: 20px;
  height: 20px;
  min-height: auto;
  flex-shrink: 0;
  margin-top: 0;
  cursor: pointer;
  accent-color: var(--color-primary);
}
.radio-option span { line-height: 1.4; }

/* Sélecteur de jeu — "Partie libre" épinglée + recherche */
.game-search { position: relative; margin-bottom: 1rem; }
.game-search input {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--color-text);
  background: var(--color-surface); border: 1.5px solid var(--color-border);
  border-radius: 12px; padding: .75rem .9rem .75rem 2.4rem; outline: none;
}
.game-search input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(232, 98, 61, .15); }
.game-search-icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); pointer-events: none; }
.game-freeplay {
  display: flex; align-items: center; gap: .75rem;
  background: #FDECE4; border: 2px solid var(--color-primary); border-radius: 16px;
  padding: .875rem; margin-bottom: 1.25rem; cursor: pointer; width: 100%; text-align: left;
  font-family: var(--font-body);
}
.game-freeplay-icon { width: 46px; height: 46px; border-radius: 13px; background: var(--color-surface); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.game-freeplay-name { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; color: var(--color-text); }
.game-freeplay-sub { color: var(--color-text-muted); font-size: .82rem; margin-top: .1rem; }
.game-freeplay-check {
  width: 24px; height: 24px; border-radius: 50%; background: var(--color-primary);
  display: none; align-items: center; justify-content: center; flex-shrink: 0; margin-left: auto;
}
.game-freeplay.selected .game-freeplay-check { display: flex; }
.game-freeplay:not(.selected) { background: var(--color-surface); border-color: var(--color-border); }

/* Colonnes secondaires masquées sur petit écran */
.hide-mobile { display: none; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Responsive — tablet & up */
@media (min-width: 540px) {
  .game-gallery { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .hide-mobile { display: table-cell; }
}
@media (min-width: 640px) {
  .site-main { padding: 1.5rem 2rem; }
  .card { padding: 1.5rem; }
}
@media (min-width: 1024px) {
  .site-main { max-width: 900px; }
  .game-gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ── Module X01 · Fléchettes ─────────────────────────────────────────────── */

/* Bust banner */
.x01-bust-banner {
  background: #c0392b;
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .08em;
  padding: .6rem 1rem;
  border-radius: var(--radius-card);
  margin-bottom: 1rem;
  transition: opacity .4s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
}
.x01-bust-close { font-size: 1.3rem; line-height: 1; opacity: .8; }
.x01-bust-banner--hidden { opacity: 0; pointer-events: none; height: 0; margin: 0; padding: 0; overflow: hidden; }

/* Hero — active player score */
.x01-hero {
  text-align: center;
  padding: 1.25rem 0 .75rem;
}
.x01-active-team {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: .04em;
  margin-bottom: .1rem;
}
.x01-active-label {
  font-size: .9rem;
  color: var(--color-text-muted);
  margin-bottom: .2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.x01-score-main {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(4rem, 18vw, 6.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--color-score);
}
.x01-cfg-hint {
  font-size: .75rem;
  color: var(--color-text-muted);
  margin-top: .3rem;
  letter-spacing: .04em;
}

/* Other players */
.x01-others {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
}
.x01-other-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: .5rem .9rem;
  text-align: center;
  min-width: 72px;
}
.x01-other-name {
  font-size: .72rem;
  color: var(--color-text-muted);
  margin-bottom: .1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 7rem;
}
.x01-other-score {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

/* Scoreboard — always-visible compact scores */
.x01-scoreboard {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin: 0 auto .75rem;
  max-width: 320px;
}
.x01-scoreboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .3rem .6rem;
  border-radius: var(--radius-control);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  font-size: .9rem;
}
.x01-scoreboard-row--active {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface));
  font-weight: 600;
}
.x01-scoreboard-name { color: var(--color-text); }
.x01-scoreboard-score {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Team roster collapsible */
.x01-roster {
  max-width: 400px;
  margin: .5rem auto .75rem;
  font-size: .85rem;
}
.x01-roster-summary {
  cursor: pointer;
  color: var(--color-text-muted);
  padding: .3rem 0;
  list-style: none;
  user-select: none;
}
.x01-roster-summary::-webkit-details-marker { display: none; }
.x01-roster-body {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .5rem 0;
}
.x01-roster-team strong { display: block; margin-bottom: .25rem; }
.x01-roster-list {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--color-text-muted);
}
.x01-roster-list li::before { content: "· "; }

/* Current visit darts */
.x01-visit {
  display: flex;
  align-items: center;
  gap: .6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  min-height: 2.5rem;
}
.x01-visit-darts {
  display: flex;
  gap: .45rem;
}
.x01-dart {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.2rem;
  padding: .3rem .5rem;
  border-radius: var(--radius-control);
  font-size: .85rem;
  font-weight: 700;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
}
.x01-dart--thrown {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}
.x01-dart--empty {
  color: var(--color-text-muted);
  opacity: .4;
}
.x01-dart-val {
  font-size: .7rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: .05rem;
}
.x01-undo-btn { flex-shrink: 0; }

/* Multiplier row */
.x01-multiplier-row {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-bottom: .85rem;
}
.x01-mult-btn {
  min-width: 3.5rem;
  padding: .55rem .75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .04em;
  transition: border-color .15s, background .15s, color .15s;
}
.x01-mult-btn--active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

/* Target grid */
.x01-target-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .4rem;
  max-width: 340px;
  margin: 0 auto 1.5rem;
}
.x01-target-btn {
  min-height: 52px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  touch-action: manipulation;
}
.x01-target-btn:active:not(:disabled) {
  background: color-mix(in srgb, var(--color-primary) 20%, var(--color-surface));
  border-color: var(--color-primary);
}
.x01-target-btn:disabled {
  opacity: .3;
  cursor: default;
}
.x01-target-btn--bull {
  grid-column: span 2;
  background: color-mix(in srgb, var(--color-win) 15%, var(--color-surface));
  border-color: var(--color-win);
  color: var(--color-win);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .05rem;
}
.x01-target-btn--miss {
  grid-column: span 3;
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-muted);
  font-size: .85rem;
}
.x01-bull-val {
  font-size: .68rem;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1;
}

/* Checkout hint */
.x01-checkout-hint {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--color-primary) 40%, transparent);
  border-radius: var(--radius-control);
  padding: .25rem .75rem;
  margin-top: .45rem;
  letter-spacing: .04em;
}

/* Visit history */
.x01-history {
  max-width: 400px;
  margin: .5rem auto 1.5rem;
}
.x01-history-title {
  font-size: .72rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .4rem;
}
.x01-history-list {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.x01-history-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .82rem;
  padding: .28rem .5rem;
  border-radius: var(--radius-control);
  background: var(--color-surface);
}
.x01-history-row--bust {
  opacity: .55;
}
.x01-history-name {
  font-weight: 700;
  min-width: 5rem;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-muted);
}
.x01-history-darts {
  flex: 1;
  color: var(--color-text);
}
.x01-history-total {
  font-weight: 700;
  min-width: 3rem;
  text-align: right;
  flex-shrink: 0;
}
.x01-history-row--bust .x01-history-total {
  color: var(--color-danger);
}

/* Summary / finish screen */
.x01-summary { max-width: 640px; margin: 0 auto; }
.x01-winner-banner {
  background: var(--color-win);
  color: #fff;
  text-align: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  border-radius: var(--radius-card);
  padding: 1rem 1.5rem;
}
.x01-winner-row { background: color-mix(in srgb, var(--color-win) 8%, transparent); font-weight: 700; }

/* Stats table */
.x01-stats-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: .75rem; }
.x01-stats-table th,
.x01-stats-table td {
  text-align: left;
  padding: .5rem .6rem;
  border-bottom: 1px solid var(--color-border);
}
.x01-stats-table th { font-size: .78rem; color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
/* Add player mid-game */
.x01-add-player { max-width: 400px; margin: 1rem auto 2rem; }
.x01-add-player-toggle {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: .82rem;
  cursor: pointer;
  padding: .3rem 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.x01-add-player-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: .75rem;
  margin-top: .5rem;
  background: var(--color-surface);
}

/* X01 team slot numbers in setup */
/* Numéro d'ordre de passage. .x01-slot-num est le nom d'origine (X01 en
   équipes) ; .turn-slot-num est l'alias neutre, l'ordre concerne tous les jeux. */
.x01-slot-num, .turn-slot-num {
  font-size: .7rem;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 1.2rem;
  text-align: center;
  flex-shrink: 0;
}

/* ── Cricket Cut-Throat board ─────────────────────────────────────────────── */

/* Outer wrapper — constrains to phone width on PC, centered */
.cr-board {
  max-width: 480px;
  margin: 0 auto;
}

/* Table */
.cr-table-wrap {
  overflow-x: hidden;
  /* Le pavé de saisie est en position:fixed : il ne prend aucune place dans le
     flux. Réserver cette place par un height:calc() codé en dur échouait de deux
     façons — le calcul ignorait tout ce qui est rendu au-dessus du tableau
     (badge « non qualifiante », barre ⚙, bannière de feedback après chaque
     lancer), et min-height reprenait le dessus sous ~484px de hauteur utile.
     Dans les deux cas la dernière ligne — le BULL — passait sous le pavé et
     devenait intappable : la partie ne pouvait plus se terminer, puisque fermer
     le bull est obligatoire pour gagner. On laisse donc la hauteur libre et on
     réserve la place du pavé par une marge basse. */
  padding-bottom: calc(160px + env(safe-area-inset-bottom));
}
.cr-table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* Target column header (top-left empty cell) */
.cr-th-target {
  width: 52px;
  min-width: 52px;
}

/* Player/team column header */
.cr-th-player {
  text-align: center;
  padding: .6rem .25rem .4rem;
  border-bottom: 2px solid var(--color-border);
  vertical-align: top;
  transition: background .15s;
}
.cr-th-player.cr-col-active {
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  border-bottom-color: var(--color-primary);
}
.cr-subject-name {
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
  margin: 0 auto;
}
.cr-subject-score {
  font-size: 1.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin: .15rem 0 .1rem;
  color: var(--color-text);
}
.cr-subject-score.cr-score-low {
  color: var(--color-win);
}
.cr-subject-mpr {
  font-size: .68rem;
  color: var(--color-text-muted);
  margin-bottom: .2rem;
}

/* Visit darts chips */
.cr-visit {
  display: flex;
  gap: .2rem;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 1.4rem;
  padding: .1rem 0;
}
.cr-vd {
  font-size: .65rem;
  background: var(--color-border);
  border-radius: 3px;
  padding: .1rem .3rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cr-vd--miss { opacity: .45; }

/* Target label cells */
.cr-td-target {
  font-size: .9rem;
  font-weight: 700;
  padding: .65rem .5rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

/* Mark cells */
.cr-td-marks {
  text-align: center;
  font-size: 1.05rem;
  padding: .65rem .25rem;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background .1s;
  min-width: 44px;
  vertical-align: middle;
}
.cr-td-marks.cr-col-active {
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
}
.cr-td-marks.cr-td-closed {
  color: var(--color-win);
  font-weight: 700;
}

/* Target row tap feedback */
/* Les lignes ne sont plus étirées par une table à hauteur fixe : sans plancher,
   elles retombent à ~40px en hauteur naturelle. Sur un <tr>, height agit comme
   un minimum — on garde des cibles tactiles d'au moins 44px. */
.cr-target-row { cursor: pointer; height: 2.75rem; }
.cr-target-row:active .cr-td-marks.cr-col-active,
.cr-target-row:hover  .cr-td-marks.cr-col-active {
  background: color-mix(in srgb, var(--color-primary) 18%, transparent);
}

/* All-closed row: dimmed */
.cr-row-done .cr-td-target { opacity: .4; }
.cr-row-done .cr-td-marks   { opacity: .5; }

/* ── Bottom pad ───────────────────────────────────────────────── */
.cr-pad {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: .6rem .75rem .75rem;
  z-index: 20;
}
.cr-mult-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .4rem;
  margin-bottom: .4rem;
}
.cr-mult-btn {
  padding: .6rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: background .1s, border-color .1s;
}
.cr-mult-btn--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
}
.cr-mult-btn:active:not(.cr-mult-btn--active) {
  background: var(--color-border);
}
.cr-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
  margin-bottom: .35rem;
}
.cr-action-btn {
  padding: .65rem 0;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-control);
  background: var(--color-primary);
  color: var(--color-on-primary);
  cursor: pointer;
  transition: opacity .1s;
}
.cr-action-btn:active { opacity: .75; }
.cr-action-btn--undo {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.cr-action-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

/* Abandon (très discret) */
.cr-abandon-wrap { text-align: center; }
.cr-abandon-btn {
  background: none;
  border: none;
  font-size: .72rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: .2rem .5rem;
  opacity: .7;
}
.cr-abandon-btn:hover { opacity: 1; color: var(--color-danger); }

/* ── Feedback banner ──────────────────────────────────────────── */
.cr-feedback {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--color-accent);
  color: #17120E;
  text-align: center;
  font-size: .9rem;
  font-weight: 600;
  padding: .65rem 1rem;
  z-index: 30;
  cursor: pointer;
  transition: opacity .4s, transform .4s;
}
.cr-feedback--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-100%);
}

/* ── Landscape: compact pad ──────────────────────────────────── */
@media (orientation: landscape) and (max-height: 500px) {
  /* Pad is ~85px in landscape (2-column grid); adjust fill height */
  .cr-table-wrap { height: calc(100dvh - 56px - 85px); }
  .cr-pad {
    padding: .2rem .5rem .2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    column-gap: .4rem;
    row-gap: .2rem;
  }
  .cr-mult-row {
    grid-column: 1;
    grid-row: 1 / 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-content: start;
    margin-bottom: 0;
  }
  .cr-action-row {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0;
  }
  .cr-abandon-wrap {
    grid-column: 2;
    grid-row: 2;
    text-align: left;
  }
  .cr-mult-btn, .cr-action-btn {
    padding: .28rem 0;
    font-size: .88rem;
  }
  .cr-abandon-btn { font-size: .62rem; }
}

/* ── Summary screen ───────────────────────────────────────────── */
.cr-summary { max-width: 480px; margin: 0 auto; }
.cr-winner-banner {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius-card);
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
}
.cr-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.cr-results-table th,
.cr-results-table td {
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
.cr-results-table th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-text-muted);
  font-weight: 600;
}
.cr-result-win {
  background: color-mix(in srgb, var(--color-win) 8%, transparent);
  font-weight: 700;
}

/* ── 321 Zap board ─────────────────────────────────────────────────────────── */
.zap-board {
  max-width: 480px;
  margin: 0 auto;
}

/* Feedback banner (fixed, slides in/out) */
.zap-feedback {
  position: fixed;
  top: 56px; /* below navbar */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  text-align: center;
  padding: .6rem 1rem;
  z-index: 200;
  transition: transform .3s ease;
  pointer-events: none;
}
.zap-feedback--hidden {
  transform: translateX(-50%) translateY(-100%);
}

/* Hero */
.zap-hero {
  text-align: center;
  padding: 1.25rem 0 .5rem;
}
.zap-target-label {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-top: .1rem;
  font-family: 'Fredoka', sans-serif;
}
.zap-win-hint {
  font-size: .85rem;
  color: var(--color-primary);
  font-weight: 700;
  margin-top: .4rem;
}
.zap-round-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--color-accent) 20%, transparent);
  color: var(--color-accent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 40%, transparent);
  border-radius: 6px;
  padding: .1rem .45rem;
  margin-left: .5rem;
  vertical-align: middle;
  letter-spacing: .04em;
}

/* Scoreboard — réutilise x01-scoreboard, extensions Zap */
.zap-row-zappable {
  border-color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 7%, var(--color-surface));
}
.zap-zap-hint {
  font-size: .7rem;
  color: var(--color-danger);
  font-weight: 700;
  margin-left: .3rem;
  white-space: nowrap;
}

/* Abandon */
.zap-abandon-wrap {
  text-align: center;
  margin-top: .75rem;
  padding-bottom: 1rem;
}
.zap-abandon-btn {
  font-size: .78rem;
  color: var(--color-text-muted);
  opacity: .6;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.zap-abandon-btn:hover { opacity: 1; color: var(--color-danger); }

/* Summary screen */
.zap-summary {
  text-align: center;
  padding: 2rem 1rem 1rem;
}
.zap-winner-banner {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.8rem, 8vw, 2.8rem);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: .5rem;
}
.zap-result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
.zap-result-table th,
.zap-result-table td {
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
.zap-result-table th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-text-muted);
  font-weight: 600;
}
.zap-result-row--winner {
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
  font-weight: 700;
}



/* ── Skull King ── */
.sk-board {
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 56px);
}

/* Header */
.sk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem .5rem;
  flex-shrink: 0;
}
.sk-header-round {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-text);
}
.sk-header-total { font-size: .75rem; font-weight: 600; color: var(--color-text-muted); }
.sk-header-label { font-size: .65rem; font-weight: 700; letter-spacing: .06em; color: var(--color-text-muted); text-transform: uppercase; }

/* Status strips (sticky-ish) */
.sk-status-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .45rem 1rem;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.sk-status-strip.ok   { background: rgba(43,200,160,.12); color: #2BC8A0; }
.sk-status-strip.warn { background: rgba(255,210,122,.12); color: var(--color-accent); }
.sk-status-strip.over { background: rgba(220,60,60,.13); color: #E07070; }
.sk-kraken-strip {
  background: rgba(255,180,0,.11);
  border: 1px solid rgba(255,210,122,.25);
  border-radius: 12px;
  margin: .5rem .875rem;
  padding: .7rem .875rem;
  font-size: .78rem;
  color: var(--color-accent);
  flex-shrink: 0;
}
.sk-kraken-strip strong { display: block; font-size: .9rem; margin-bottom: .1rem; }
.sk-kraken-strip label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-weight: 700; }
.sk-kraken-strip input[type=checkbox] { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--color-accent); }
.sk-error-strip {
  background: rgba(220,60,60,.12);
  padding: .45rem 1rem;
  font-size: .78rem;
  color: #E07070;
  flex-shrink: 0;
}

/* Scrollable content */
.sk-content { flex: 1; overflow-y: auto; padding: .25rem .875rem .875rem; }
.sk-section-label {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: .875rem 0 .4rem;
}

/* Player block */
.sk-pblock {
  padding: .625rem 0 .5rem;
  border-bottom: 1px solid rgba(251,243,230,.07);
}
.sk-pblock:last-of-type { border-bottom: none; }
.sk-pblock-head {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .4rem;
}
.sk-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sk-pname { font-weight: 800; font-size: .875rem; flex: 1; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Score preview */
.sk-preview { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: .9rem; }
.sk-preview.pos { color: var(--color-success); }
.sk-preview.neg { color: var(--color-primary); }
.sk-preview.neu { color: var(--color-text-muted); }

/* Pill rows — libellé au-dessus, grille 5 colonnes qui s'enroule */
.sk-pills-row {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  margin-bottom: .4rem;
}
.sk-plabel {
  font-size: .625rem;
  font-weight: 800;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sk-pill-track {
  display: grid;
  gap: 4px;
  width: 100%;
}
.sk-pill {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #C9B8A6;
  cursor: pointer;
  user-select: none;
  border: none;
  background: #241B14;
  transition: background .12s, color .12s;
}
.sk-pill:active { transform: scale(.88); }
.sk-pill.sk-pill--active { background: #E8623D; color: #17120E; }

/* Bonus volet dépliable par joueur */
.sk-bonus-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .35rem;
  padding: .35rem .5rem;
  border-radius: 9px;
  border: 1px solid rgba(251,243,230,.10);
  background: #2C2117;
  color: var(--color-text-muted);
  font-family: 'Nunito', sans-serif;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
  text-align: left;
}
.sk-bonus-toggle > span:first-child { flex: 1; }
.sk-bonus-lbl {
  font-size: .72rem;
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  color: var(--color-text-muted);
  text-transform: none;
  letter-spacing: 0;
}
.sk-bonus-lbl.on { color: var(--color-primary); }
.sk-bonus-arrow {
  font-size: .8rem;
  transition: transform .2s;
  line-height: 1;
}
.sk-bonus-panel {
  border: 1px solid rgba(251,243,230,.08);
  border-radius: 9px;
  background: #211810;
  margin-top: .25rem;
  overflow: hidden;
}
.sk-bonus-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .55rem;
  border-bottom: 1px solid rgba(251,243,230,.06);
}
.sk-bonus-row:last-child { border-bottom: none; }
.sk-bonus-info {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex: 1;
  min-width: 0;
}
.sk-bonus-ico { font-size: .9rem; flex-shrink: 0; }
.sk-bonus-name {
  font-size: .74rem;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sk-bonus-pts {
  font-size: .63rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.sk-counter {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-shrink: 0;
}
.sk-cnt-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(251,243,230,.14);
  background: #2C2117;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  transition: background .1s;
}
.sk-cnt-btn:active { background: rgba(242,115,75,.2); }
.sk-cnt-val {
  width: 20px;
  text-align: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: .88rem;
  color: var(--color-text);
}

/* Butin — volet dépliable en bas */
.sk-butin-section {
  margin-top: .75rem;
  padding-top: .625rem;
  border-top: 1px solid rgba(251,243,230,.07);
}
.sk-butin-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .5rem;
  border-radius: 9px;
  border: 1px solid rgba(251,243,230,.10);
  background: #2C2117;
  color: var(--color-text-muted);
  font-family: 'Nunito', sans-serif;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
  text-align: left;
}
.sk-butin-toggle > span:first-child { flex: 1; }
.sk-butin-panel {
  padding: .5rem .5rem .25rem;
  border: 1px solid rgba(251,243,230,.08);
  border-radius: 9px;
  background: #211810;
  margin-top: .25rem;
}
.sk-butin-row { display: flex; align-items: center; gap: .4rem; margin-bottom: .3rem; }
.sk-butin-sel {
  flex: 1;
  min-width: 0;
  padding: .35rem .4rem;
  border-radius: 8px;
  border: 1px solid rgba(251,243,230,.12);
  background: #2C2117;
  color: var(--color-text);
  font-size: .78rem;
  font-family: var(--font-body);
}
.sk-butin-et { font-size: .75rem; color: var(--color-text-muted); flex-shrink: 0; }

/* Correction banner */
.sk-correction-banner {
  margin: .5rem .875rem 0;
  padding: .45rem .75rem;
  border-radius: 8px;
  background: rgba(232,98,61,.18);
  color: #E8A07A;
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
}

/* CTA — correction layout: cancel + submit side by side */
.sk-cta { flex-shrink: 0; padding: .625rem .875rem .75rem; }
.sk-cta--correction { display: flex; gap: .5rem; }
.sk-cta--correction .sk-cta-btn { flex: 1; }
.sk-cta-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .875rem .875rem;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: .875rem;
  text-decoration: none;
  white-space: nowrap;
}
.sk-cta-btn {
  width: 100%;
  padding: .875rem;
  border-radius: 14px;
  border: none;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  background: var(--color-primary);
  color: #17120E;
}
.sk-cta-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Tab bar */
.sk-tabs {
  flex-shrink: 0;
  display: flex;
  border-top: 1px solid var(--color-border);
}
.sk-tab {
  flex: 1;
  padding: .8rem 0 .9rem;
  text-align: center;
  font-weight: 800;
  font-size: .78rem;
  color: var(--color-text-muted);
  text-decoration: none;
  display: block;
}
.sk-tab.active { color: var(--color-text); background: rgba(251,243,230,.04); }

/* Score tab — classement */
.sk-rank-cards { display: flex; flex-wrap: wrap; gap: .4rem; }
.sk-rank-card {
  display: flex; align-items: center; gap: .35rem;
  background: var(--color-surface); border-radius: 10px;
  padding: .3rem .55rem;
  border: 1px solid transparent;
}
.sk-rank-card.top { border-color: rgba(255,210,122,.28); }
.sk-rank-num { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: .7rem; color: var(--color-text-muted); }
.sk-rank-name { font-weight: 800; font-size: .8rem; color: var(--color-text); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-rank-total { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: .9rem; color: var(--color-text); margin-left: .15rem; }

/* Score table */
.sk-table-wrap { overflow-x: auto; border-radius: 12px; background: var(--color-surface); }
.sk-table { min-width: 220px; width: 100%; border-collapse: collapse; font-size: .78rem; }
.sk-table th {
  padding: .4rem .25rem;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: .6rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid rgba(251,243,230,.1);
  text-align: center; white-space: nowrap;
}
.sk-table th.col-m { text-align: left; padding-left: .55rem; min-width: 26px; }
.sk-table td {
  padding: .27rem .25rem; text-align: center;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: .82rem;
  color: var(--color-text);
}
.sk-table td.col-m { text-align: left; padding-left: .55rem; font-family: 'Nunito', sans-serif; font-size: .68rem; color: var(--color-text-muted); }
.sk-table td.pos { color: var(--color-success); }
.sk-table td.neg { color: var(--color-primary); }
.sk-table td.empty { color: var(--color-border); }
.sk-table tr.sk-total td { border-top: 1px solid rgba(251,243,230,.1); font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: .92rem; color: var(--color-accent); }
.sk-table tr.sk-row-tappable { cursor: pointer; }
.sk-table tr.sk-row-tappable:hover td { background: rgba(251,243,230,.04); }
.sk-table-legend { display: flex; flex-wrap: wrap; gap: .3rem .65rem; margin-top: .45rem; }
.sk-legend-item { display: flex; align-items: center; gap: .3rem; font-size: .72rem; color: var(--color-text-muted); }

/* Chart */
.sk-chart-svg { width: 100%; border-radius: 10px; background: var(--color-surface); display: block; overflow: visible; }
.sk-chart-rounds { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin: .4rem 0 0; padding: 0 2.5% 0 12.5%; }
.sk-chart-round-btn {
  padding: 0; height: 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: .72rem;
  cursor: pointer;
  touch-action: manipulation;
}
.sk-chart-round-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 700;
}
.sk-chart-detail {
  margin: .3rem 0 0;
  padding: .35rem .6rem;
  border-radius: 8px;
  background: #2C2117;
  font-size: .72rem;
  color: var(--color-text-muted);
  min-height: 1.6em;
  line-height: 1.5;
}

/* Stats fin de partie — liste dépliable */
.sk-stat-list { display: flex; flex-direction: column; gap: .3rem; }
.sk-stat-details {
  background: var(--color-surface);
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid transparent;
}
.sk-stat-details[open] { border-color: rgba(251,243,230,.08); }
.sk-stat-summary {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .65rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.sk-stat-summary::-webkit-details-marker { display: none; }
.sk-stat-sumname { font-weight: 800; font-size: .8rem; color: var(--color-text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-stat-sumpct { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: .8rem; color: var(--color-text-muted); flex-shrink: 0; }
.sk-stat-sumpct.pos { color: var(--color-success); }
.sk-stat-sumpct.neg { color: var(--color-primary); }
.sk-stat-sumtot { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: .85rem; color: var(--color-accent); flex-shrink: 0; }
.sk-stat-sumchev { font-size: .75rem; color: var(--color-text-muted); flex-shrink: 0; transition: transform .2s; }
.sk-stat-details[open] .sk-stat-sumchev { transform: rotate(90deg); }
.sk-stat-body {
  padding: .2rem .65rem .5rem;
  border-top: 1px solid rgba(251,243,230,.06);
  display: flex;
  flex-direction: column;
  gap: .18rem;
}
.sk-stat-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .75rem; color: var(--color-text-muted);
}
.sk-stat-row strong { font-family: 'Fredoka', sans-serif; font-size: .82rem; color: var(--color-text); }
.sk-stat-row strong.pos { color: var(--color-success); }
.sk-stat-row strong.neg { color: var(--color-primary); }

/* Finished banner */
.sk-finished-banner {
  background: rgba(43,200,160,.10);
  border: 1px solid rgba(43,200,160,.22);
  border-radius: 14px; padding: .875rem 1rem;
  text-align: center; margin-bottom: .75rem;
}
.sk-finished-title { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--color-success); margin: 0 0 .2rem; }
.sk-finished-sub { font-size: .75rem; color: var(--color-text-muted); margin: 0; }

/* Rename form — finished game */
.sk-rename-section { margin-top: .875rem; }
.sk-rename-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); margin: 0 0 .35rem; font-weight: 700; }
.sk-rename-form { display: flex; gap: .4rem; }
.sk-rename-input { flex: 1; background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text); border-radius: 8px; padding: .3rem .6rem; font-family: var(--font-body); }
.sk-rename-btn { background: var(--color-primary); border: none; color: var(--color-on-primary); border-radius: 8px; padding: .3rem .9rem; font-size: .85rem; font-weight: 700; cursor: pointer; flex-shrink: 0; }

/* ── Pages légales (mentions, confidentialité, CGU) ─────────────────────────
   Gabarit de LECTURE (pas d'UI d'app) : largeur de ligne confortable,
   hiérarchie de titres nette, interligne généreux. Thème clair uniquement. */
.legal { max-width: 44rem; margin: 0 auto; padding: .5rem 0 1rem; }
.legal h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.15; letter-spacing: -.01em;
  color: var(--color-text); margin: 0 0 1.25rem;
}
.legal h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.2rem, 4vw, 1.4rem); line-height: 1.25;
  color: var(--color-text); margin: 2rem 0 .6rem;
}
.legal p {
  font-size: 1.02rem; line-height: 1.75; color: var(--color-text);
  margin: 0 0 1rem; max-width: 68ch;
}
.legal a { color: var(--color-primary); font-weight: 700; }
.legal a:hover { color: #c94f2f; }
.legal address { font-style: normal; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: .92rem; }
.legal th, .legal td { padding: .6rem .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.legal th {
  font-family: var(--font-display); font-weight: 600; font-size: .78rem;
  color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap;
}
.legal-updated {
  margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--color-border);
  font-size: .85rem; color: var(--color-text-muted);
}

/* Pied de page légal discret (landing, pages d'auth) */
.legal-footer {
  margin-top: 2rem; padding-top: 1.25rem;
  text-align: center; font-size: .85rem;
}
.legal-footer a { color: var(--color-text-muted); font-weight: 600; }
.legal-footer a:hover { color: var(--color-primary); }
.legal-footer .sep { color: var(--color-border); margin: 0 .5rem; }
