/* ============================================================
   Darts — Modes de jeu (Cricket + Around the Clock)
   ============================================================ */

.game-head { margin-bottom: 6px; }
.game-head h1 {
  margin: 0 0 4px;
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  font-weight: 800;
}
.game-head p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.5; }

.game-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.game-toolbar .status { margin-left: auto; }

.game-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 880px) {
  .game-main { grid-template-columns: 1.3fr 1fr; align-items: start; }
}

/* ---------- CRICKET ---------- */
.cricket-board {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cricket-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
:root[data-theme="light"] .cricket-row { background: rgba(15, 23, 42, .03); }

.cricket-row.closed {
  border-color: rgba(52, 211, 153, .5);
  background: radial-gradient(circle at left, rgba(52, 211, 153, .12), rgba(255, 255, 255, .02));
}
.cricket-row.justhit { transform: scale(1.015); }

.cricket-num {
  font-size: 1.5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.cricket-marks {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mark-slot {
  position: relative;
  width: 30px;
  height: 30px;
}
.mark-slot svg { width: 100%; height: 100%; overflow: visible; }
.mark-slot .mk {
  stroke: var(--cyan);
  stroke-width: 3.5;
  stroke-linecap: round;
  fill: none;
  opacity: 0;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  transition: stroke-dashoffset .25s var(--ease), opacity .12s var(--ease);
}
.mark-slot .mk.on { opacity: 1; stroke-dashoffset: 0; }
.mark-slot .ring { stroke: var(--green); }

.cricket-status-chip {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.cricket-row.closed .cricket-status-chip { color: var(--green); }

.cricket-score {
  text-align: center;
  padding: 18px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(500px 240px at 50% -30%, rgba(34, 211, 238, .16), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.cricket-score .lbl {
  font-size: .72rem; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted);
}
.cricket-score .val {
  font-size: clamp(3rem, 18vw, 5rem);
  font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums;
  color: #f8fbff;
  text-shadow: 0 6px 40px rgba(34, 211, 238, .25);
}
:root[data-theme="light"] .cricket-score .val { color: var(--text); }

.cricket-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.cricket-meta .m {
  padding: 10px;
  border-radius: var(--r-sm);
  background: rgba(7, 11, 22, .45);
  border: 1px solid var(--border);
}
:root[data-theme="light"] .cricket-meta .m { background: rgba(15,23,42,.04); }
.cricket-meta .m .mv { font-size: 1.2rem; font-weight: 800; }
.cricket-meta .m .ml { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- AROUND THE CLOCK ---------- */
.clock-target-big {
  text-align: center;
  padding: 24px 18px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(500px 240px at 50% -20%, rgba(168, 85, 247, .18), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.clock-target-big .lbl {
  font-size: .72rem; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted);
}
.clock-next {
  font-size: clamp(4.5rem, 30vw, 9rem);
  font-weight: 900; line-height: .9; font-variant-numeric: tabular-nums;
  background: var(--accent);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 6px 0;
}
.clock-next.pop { animation: scorePop .4s var(--ease); }
.clock-hint { color: var(--muted); font-size: .9rem; }

.clock-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.clock-meta .m {
  padding: 12px;
  border-radius: var(--r-sm);
  background: rgba(7, 11, 22, .45);
  border: 1px solid var(--border);
}
:root[data-theme="light"] .clock-meta .m { background: rgba(15,23,42,.04); }
.clock-meta .mv { font-size: 1.4rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.clock-meta .ml { font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.clock-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 8px;
}
.clock-cell {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  font-weight: 800;
  font-size: 1rem;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all var(--t-fast);
}
:root[data-theme="light"] .clock-cell { background: rgba(15,23,42,.03); }
.clock-cell.done {
  background: var(--accent-soft);
  border-color: rgba(52, 211, 153, .5);
  color: var(--green);
}
.clock-cell.current {
  border-color: var(--cyan);
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, .35), 0 0 18px rgba(34, 211, 238, .3);
  transform: scale(1.06);
}

.clock-modes {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: var(--pill);
  background: rgba(11, 19, 38, .6);
  border: 1px solid var(--border);
}
:root[data-theme="light"] .clock-modes { background: rgba(15,23,42,.04); }
.clock-modes button {
  flex: 1;
  min-height: 40px;
  border: 0;
  cursor: pointer;
  border-radius: var(--pill);
  font-weight: 700;
  font-size: .85rem;
  color: var(--muted);
  background: transparent;
  transition: color var(--t-fast), background var(--t-fast);
}
.clock-modes button.active { color: #06121f; background: var(--accent); }
:root[data-theme="light"] .clock-modes button.active { color: #f4f9ff; }

/* Liste d'événements de jeu */
.game-log {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.game-log li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  font-size: .85rem;
  animation: throwIn .25s var(--ease);
}
:root[data-theme="light"] .game-log li { background: rgba(15,23,42,.03); }
.game-log .gl-main { font-weight: 700; }
.game-log .gl-ts { color: var(--faint); font-size: .76rem; }
.log-empty { color: var(--faint); font-size: .85rem; text-align: center; padding: 16px 0; }
