/* ════════════════════════════════════════════════════════
   HOCKEY.CSS — PhysEdBoard
   ────────────────────────────────────────────────────────
   MODIFIEZ ICI → tout s'adapte à toutes les résolutions
   Responsive: mobile 320px → tablette → desktop → TV
════════════════════════════════════════════════════════ */


/* ════════════════════════════════════════
   VARIABLES & RESET
════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { touch-action: manipulation; }

:root {
  /* ── Couleurs ── */
  --ice:        #d6eaf8;
  --ice-dim:    #8fb8d4;
  --red:        #c0392b;
  --red-bright: #e74c3c;
  --gold:       #f0c040;
  --gold-dim:   #c9961a;
  --dark:       #080c14;
  --dark-2:     #0d1524;
  --dark-3:     #111d30;
  --panel:      rgba(10,18,34,0.82);
  --border:     rgba(214,234,248,0.10);
  --border-hi:  rgba(214,234,248,0.22);
  --text-hi:    #e8f4fd;
  --text-mid:   #8fb8d4;
  --text-dim:   #4a7090;
  --radius:     12px;
  --radius-lg:  20px;
  --shadow-glow:0 0 40px rgba(0,140,255,0.18);
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);

  /* ══════════════════════════════════════════
     VALEURS DE RÉFÉRENCE (desktop ≥ 1200px)
     Modifiez ces valeurs → tout suit
  ══════════════════════════════════════════ */

  /* ── Arena layout ── */
  --arena-cols:        1fr auto 1fr;
  --arena-rows:        1fr;
  --center-w:          clamp(240px, 32vw, 476px);

  /* ── Clock ── */
  --clock-h:           200px;
  --clock-digits-fs:   clamp(36px, 8vw, 136px);
  --nudge-btn-fs:      clamp(28px, 4vw, 60px);

  /* ── Scores ── */
  --score-digit-fs:    clamp(73px, 10vw, 125px);

  /* ── Logo ── */
  --logo-size:         clamp(96px, 18vw, 288px);

  /* ── Team name ── */
  --team-name-fs:      clamp(16px, 2.6vw, 42px);

  /* ── Clock controls ── */
  --ctrl-btn-dir:      row;
}


/* ════════════════════════════════════════
   FOND
════════════════════════════════════════ */
html, body { height: 100%; overflow: hidden; }

body {
  font-family: 'Rajdhani', 'Barlow Condensed', sans-serif;
  background: var(--dark);
  color: var(--text-hi);
  position: relative;
}

.bg-layer { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.bg-ice {
  background:
    radial-gradient(ellipse 120% 80% at 50% 110%, rgba(0,80,160,0.30) 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 20% 0%,   rgba(0,50,110,0.20) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 80% 0%,   rgba(0,50,110,0.20) 0%, transparent 60%),
    linear-gradient(180deg, #060a13 0%, #0a1526 40%, #0d1d38 100%);
}
.bg-vignette {
  background: radial-gradient(ellipse 100% 100% at 50% 50%,
    transparent 40%, rgba(0,0,0,0.60) 100%);
}
.bg-scanlines {
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.06) 2px, rgba(0,0,0,0.06) 4px);
  opacity: 0.4;
}

/* ════════════════════════════════════════
   SCOREBOARD
════════════════════════════════════════ */
.scoreboard {
  position: relative; z-index: 2;
  width: 100%; height: 100dvh;
  display: flex; flex-direction: column;
}


/* ════════════════════════════════════════
   HEADER
════════════════════════════════════════ */
.sb-header {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(8px, 1.5vw, 16px);
  padding: clamp(8px, 1.4vh, 16px) clamp(16px, 2vw, 24px);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 100%);
  position: relative;
}
.header-badge {
  width: clamp(26px, 3vw, 38px); height: clamp(26px, 3vw, 38px);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(12px, 1.4vw, 16px); flex-shrink: 0;
}
.header-title {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(13px, 2vw, 30px); letter-spacing: 0.18em;
  color: var(--text-hi);
  text-shadow: 0 0 30px rgba(214,234,248,0.3);
  white-space: nowrap;
}
.menu-btn {
  position: absolute; left: clamp(12px, 2vw, 20px); top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.06); border: 1px solid var(--border-hi);
  color: var(--text-mid);
  width: clamp(32px, 3.5vw, 40px); height: clamp(32px, 3.5vw, 40px);
  border-radius: 8px; cursor: pointer;
  font-size: clamp(12px, 1.4vw, 15px);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.menu-btn:hover { background: rgba(255,255,255,0.12); color: var(--text-hi); }


/* ════════════════════════════════════════
   ARENA
════════════════════════════════════════ */
.arena {
  flex: 1;
  display: grid;
  grid-template-columns: var(--arena-cols);
  grid-template-rows: var(--arena-rows);
  min-height: 0; overflow: hidden;
}


/* ════════════════════════════════════════
   TEAM PANELS
════════════════════════════════════════ */
.team-panel {
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: clamp(10px, 1.8vh, 24px) clamp(8px, 1.5vw, 20px) clamp(12px, 2.2vh, 28px);
  position: relative; min-width: 0;
}

/* Ligne décorative gauche */
.team-panel--left::before {
  content: '';
  position: absolute; left: 0; top: 20%; bottom: 20%; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(214,234,248,0.12), transparent);
}

/* ── Sélecteur équipe (dans le modal) ── */
.team-select-row {
  display: flex; gap: 12px; justify-content: space-between;
}
.team-select-row .team-select-wrap { flex: 1; text-align: center; }
.team-select-wrap { width: 100%; text-align: center; flex-shrink: 0; }
.select-label {
  display: block;
  font-size: clamp(9px, 0.85vw, 11px); letter-spacing: 0.18em;
  color: var(--text-dim); margin-bottom: clamp(4px, 0.6vh, 8px);
  font-family: 'Rajdhani', sans-serif; font-weight: 600;
}
.select-shell {
  position: relative; display: block;
  width: clamp(160px, 40%, 220px);
  font-size: 16px;
}
.team-select {
  appearance: none; width: 100%;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-hi);
  color: var(--text-hi); font-family: 'Rajdhani', sans-serif;
  font-size: 16px; font-weight: 600; letter-spacing: 0.06em;
  padding: clamp(6px, 0.8vh, 9px) 32px clamp(6px, 0.8vh, 9px) clamp(8px, 1vw, 14px);
  border-radius: 8px; cursor: pointer; outline: none;
  transition: var(--transition);
}
.team-select:hover, .team-select:focus {
  background: rgba(255,255,255,0.09); border-color: rgba(214,234,248,0.35);
}
.team-select option { background: #0d1524; color: #e8f4fd; }
.select-arrow {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 15px; pointer-events: none;
}

/* ── Carte équipe ── */
.team-card {
  position: relative; display: flex; flex-direction: column;
  align-items: center; gap: clamp(4px, 0.9vh, 14px);
  flex: 1; justify-content: center; min-height: 0; width: 100%;
}
.logo-glow {
  position: absolute;
  width: clamp(80px, 12vw, 180px); height: clamp(80px, 12vw, 180px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,100,255,0.18) 0%, transparent 70%);
  pointer-events: none; transition: background 0.6s ease;
}
.logo-wrap {
  width: var(--logo-size); height: var(--logo-size);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1; flex-shrink: 0;
}
.team-logo {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.7));
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
}
.team-logo.logo-pop { animation: logoPop 0.6s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes logoPop {
  0%   { transform: scale(0.5) rotate(-6deg); opacity: 0; }
  60%  { transform: scale(1.12) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg);    opacity: 1; }
}
.team-name {
  font-family: 'Bebas Neue', cursive;
  font-size: var(--team-name-fs);
  letter-spacing: 0.14em; color: var(--text-hi);
  text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,0.6);
  margin: clamp(2px, 0.5vh, 10px) 0; flex-shrink: 0;
}

/* ── Score ── */
.score-block {
  display: flex; align-items: center;
  gap: clamp(6px, 1vw, 16px); width: 100%;
  justify-content: center; flex-shrink: 0;
}
.score-display {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; min-width: clamp(50px, 7vw, 120px);
}
.score-digit {
  font-family: 'Bebas Neue', cursive;
  font-size: var(--score-digit-fs);
  line-height: 1; color: var(--text-hi);
  text-shadow: 0 0 30px rgba(214,234,248,0.5), 0 4px 20px rgba(0,0,0,0.5);
  transition: transform 0.15s ease, color 0.3s ease;
  display: block; width: 120px; text-align: center;
}
.score-digit.score-bump { animation: scoreBump 0.3s ease; color: var(--gold); }
@keyframes scoreBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.score-label {
  font-size: clamp(12px, 1.4vw, 20px);
  letter-spacing: 0.2em; color: var(--text-dim); font-weight: 700;
}
.score-btn {
  width: 60px; height: 60px;
  border-radius: 8px; border: none !important; background: transparent;
  color: var(--text-mid); font-size: 60px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: none !important; transition: var(--transition); flex-shrink: 0;
}


/* ════════════════════════════════════════
   CENTER PANEL
════════════════════════════════════════ */
.center-panel {
  width: var(--center-w);
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: clamp(10px, 1.8vh, 24px) clamp(8px, 1.2vw, 16px) clamp(10px, 1.8vh, 22px);
  flex-shrink: 0;
}

/* ── Période ── */
.period-display {
  display: flex; flex-direction: column;
  align-items: center; gap: clamp(4px, 0.6vh, 8px); flex-shrink: 0;
}
.period-label {
  font-size: clamp(9px, 0.85vw, 11px); letter-spacing: 0.2em;
  color: var(--text-dim); font-weight: 700;
}
.period-controls {
  display: flex; align-items: center;
  gap: clamp(8px, 1vw, 12px); height: clamp(40px, 6vh, 60px);
}
.period-num {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(26px, 3.2vw, 42px); line-height: 1;
  color: var(--text-hi); min-width: 30px; text-align: center;
  text-shadow: 0 0 20px rgba(214,234,248,0.4);
  display: flex; align-items: center; justify-content: center; height: 100%;
}
.period-btn {
  background: transparent; border: 1px solid var(--border-hi);
  color: var(--text-dim);
  width: clamp(22px, 2.2vw, 28px); height: clamp(22px, 2.2vw, 28px);
  border-radius: 6px; cursor: pointer;
  font-size: clamp(9px, 0.9vw, 11px);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.period-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-hi); }

/* ── Horloge ── */
.clock-shell {
  width: 100%; flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: clamp(8px, 1.2vh, 12px);
  padding: clamp(8px, 1.2vh, 18px) 0;
  margin-top: clamp(-10px, -1.5vh, -4px);
}
.clock-nudge {
  display: flex; flex-direction: row;
  align-items: center; justify-content: center;
  gap: 0; width: 100%;
}
.clock-inner {
  position: relative;
  background: linear-gradient(160deg, rgba(255,255,255,0.04) 0%, rgba(0,0,0,0.3) 100%);
  border: 1px solid var(--border-hi); border-radius: var(--radius-lg);
  padding: clamp(8px, 1.5vh, 20px) clamp(4px, 1vw, 28px);
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 40px rgba(0,0,0,0.5), var(--shadow-glow);
  min-height: var(--clock-h);
  display: flex; flex-direction: row; align-items: center; justify-content: center;
}
.clock-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(0,120,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.clock-digits {
  font-family: 'Bebas Neue', cursive;
  font-size: var(--clock-digits-fs);
  letter-spacing: 0.05em; color: var(--ice);
  text-shadow:
    0 0 20px rgba(100,180,255,0.7),
    0 0 60px rgba(100,180,255,0.3),
    0 4px 16px rgba(0,0,0,0.5);
  line-height: 1; position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  margin: 0 clamp(4px, 1vw, 16px);
  flex-shrink: 1; min-width: 0; white-space: nowrap;
}
.clock-shell.is-running .clock-digits { animation: clockPulse 1s ease-in-out infinite; }
@keyframes clockPulse {
  0%, 100% { text-shadow: 0 0 20px rgba(100,180,255,0.7), 0 0 60px rgba(100,180,255,0.3), 0 4px 16px rgba(0,0,0,0.5); }
  50%       { text-shadow: 0 0 30px rgba(100,180,255,0.9), 0 0 80px rgba(100,180,255,0.5), 0 4px 16px rgba(0,0,0,0.5); }
}
.clock-shell.blink .clock-digits {
  animation: clockBlink 0.6s step-start infinite;
  color: var(--red-bright);
  text-shadow: 0 0 30px rgba(231,76,60,0.8), 0 0 60px rgba(231,76,60,0.4);
}
@keyframes clockBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.15; }
}
.nudge-btn {
  background: transparent; color: var(--text-mid);
  font-family: 'Rajdhani', sans-serif;
  font-size: var(--nudge-btn-fs); font-weight: 700;
  padding: 5px clamp(4px, 1vw, 14px);
  cursor: pointer; border: none !important;
  flex-shrink: 1; min-width: 24px;
}

/* ── Contrôles chrono ── */
.clock-controls {
  display: flex; flex-direction: var(--ctrl-btn-dir);
  gap: clamp(4px, 0.6vw, 10px);
  width: 100%; max-width: 100%;
  justify-content: center; flex-shrink: 1;
}
.ctrl-btn {
  display: flex; align-items: center; gap: clamp(4px, 0.6vw, 8px);
  padding: clamp(8px, 1.2vh, 14px) clamp(8px, 1.5vw, 24px);
  border-radius: 9px; border: none;
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(12px, 1.3vw, 16px); font-weight: 700; letter-spacing: 0.08em;
  cursor: pointer; transition: var(--transition);
  flex: 1; justify-content: center; min-width: 0;
}
.ctrl-btn--primary {
  background: linear-gradient(135deg, #1a6fd4 0%, #0d4fa0 100%);
  color: #fff; box-shadow: 0 4px 20px rgba(26,111,212,0.35);
}
.ctrl-btn--primary:hover {
  background: linear-gradient(135deg, #2280e8 0%, #1460c0 100%);
  box-shadow: 0 6px 28px rgba(26,111,212,0.5); transform: translateY(-1px);
}
.ctrl-btn--primary.active {
  background: linear-gradient(135deg, #c0392b 0%, #922b21 100%);
  box-shadow: 0 4px 20px rgba(192,57,43,0.4);
}
.ctrl-btn--secondary {
  background: rgba(255,255,255,0.06); color: var(--text-mid);
  border: 1px solid var(--border-hi);
}
.ctrl-btn--secondary:hover { background: rgba(255,255,255,0.11); color: var(--text-hi); }

/* Boutons principaux du chrono (Démarrer / Reset) un peu plus grands */
#startPauseButton,
#resetButton {
  padding: clamp(10px, 1.5vh, 16px) clamp(10px, 1.7vw, 28px);
  font-size: clamp(13px, 1.45vw, 18px);
  min-height: clamp(44px, 5.5vh, 58px);
}

/* ── Barre musique ── */
.music-bar {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6.8px;
  background: rgba(0,0,0,0.3); border: 1px solid var(--border);
  border-radius: 44px; padding: 9.35px 17.85px;
}
.music-btn {
  background: transparent; border: none; color: var(--text-dim);
  font-size: 14.5px; cursor: pointer;
  width: 33.15px; height: 33.15px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.music-btn:hover { color: var(--text-hi); background: rgba(255,255,255,0.08); }
.music-btn--play { background: rgba(255,255,255,0.10); color: var(--text-mid); }
.music-btn--play:hover { background: rgba(26,111,212,0.25); color: #7cc0ff; }
.music-btn.is-muted { color: var(--red-bright) !important; }


/* ════════════════════════════════════════
   GOAL BANNER
════════════════════════════════════════ */
.goal-banner {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%; z-index: 100;
  pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  .goal-bg {
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg,
      transparent 0%, rgba(8,12,20,0.92) 6%,
      rgba(8,12,20,0.96) 50%, rgba(8,12,20,0.92) 94%, transparent 100%);
    padding: clamp(14px, 2.5vh, 28px) 0;
    box-shadow: 0 0 80px rgba(240,192,64,0.25), inset 0 0 40px rgba(240,192,64,0.06);
  }
  overflow: hidden; opacity: 0; visibility: hidden;
}

.goal-banner.show { opacity: 1; visibility: visible; }

.goal-line {
  width: 100vw;
  height: 3px;
  background: var(--gold);
  box-shadow: 0 0 40px rgba(240,192,64,0.25);
  margin: 0;
}


@keyframes goalScroll {
  0%   { transform: translateX(110vw); }
  100% { transform: translateX(-110vw); }
}
.goal-banner.show .goal-text {
  animation: goalScroll 5s cubic-bezier(0.25,0.46,0.45,0.94) forwards;
}
  
.goal-text {
  display: inline-flex; align-items: center;
  gap: clamp(32px, 5vw, 80px); white-space: nowrap;
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(52px, 9vw, 140px); letter-spacing: 0.18em;
  color: var(--gold);
  text-shadow:
    0 0 60px rgba(240,192,64,1),
    0 0 120px rgba(240,192,64,0.6),
    0 4px 30px rgba(0,0,0,0.8);
  padding: 0 clamp(48px, 8vw, 120px);
  transform: translateX(110vw);
}
/* Éclairs décoratifs */
.goal-text::before, .goal-text::after { content: '⚡'; font-size: 0.6em; opacity: 0.8; }


/* ════════════════════════════════════════
   MODAL PARAMÈTRES
════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal-panel {
  background: linear-gradient(160deg, #111d30 0%, #0a1220 100%);
  border: 1px solid var(--border-hi); border-radius: 18px;
  width: clamp(340px, 94vw, 520px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  max-height: 90dvh; overflow-y: auto;
}
.modal-overlay.show .modal-panel { transform: translateY(0) scale(1); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(14px, 2vh, 20px) clamp(16px, 2vw, 24px);
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(18px, 2.2vw, 24px); letter-spacing: 0.12em;
  color: var(--text-hi); display: flex; align-items: center; gap: 10px;
}
.modal-title i { color: var(--text-dim); font-size: clamp(14px, 1.5vw, 18px); }
.modal-close {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-dim); width: 32px; height: 32px;
  border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); font-size: 13px;
}
.modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text-hi); }

.modal-body {
  padding: clamp(14px, 2vh, 20px) clamp(16px, 2vw, 24px);
  display: flex; flex-direction: column; gap: 0;
}
.setting-group {
  display: flex; flex-direction: row; align-items: center;
  justify-content: space-between; gap: 16px;
  min-height: 52px; border-bottom: 1px solid var(--border);
  padding: 6px 0;
}
.setting-group:last-child { border-bottom: none; }
.setting-group--row { flex-direction: column; align-items: stretch; min-height: auto; padding: 4px 0; }
.setting-subgroup {
  display: flex; flex-direction: row; align-items: center;
  justify-content: space-between; gap: 16px;
  min-height: 44px; flex: 1;
}
.setting-label {
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-hi); flex: 1;
}
.setting-select {
  appearance: none; background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-hi); color: var(--text-hi);
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px; font-weight: 600;
  padding: clamp(8px, 1vh, 10px) 16px; border-radius: 8px;
  cursor: pointer; outline: none; transition: var(--transition);
  width: 160px;
}
.setting-select:hover, .setting-select:focus {
  background: rgba(255,255,255,0.08); border-color: rgba(214,234,248,0.3);
}
.setting-select option { background: #0d1524; }

.time-inputs { display: flex; align-items: center; gap: 6px; }
.input-spin {
  position: relative;
  width: 80px;
}
.time-field {
  width: 100%;
  font-family: 'Bebas Neue', cursive; font-size: 28px;
  text-align: center; line-height: 1;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-hi);
  border-radius: 8px; color: var(--text-hi);
  padding: 4px 36px 4px 4px;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
.time-field::-webkit-outer-spin-button,
.time-field::-webkit-inner-spin-button { -webkit-appearance: none; }
.time-field:focus { border-color: rgba(214,234,248,0.4); }
.time-spin-btns {
  position: absolute; top: 2px; right: 4px; bottom: 2px;
  display: flex; flex-direction: column;
  justify-content: center; gap: 1px;
}
.time-spin-btn {
  background: none; border: none; cursor: pointer; padding: 0; margin: 0;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 15px; border-radius: 5px;
  transition: color 0.15s, background 0.15s; line-height: 1;
}
.time-spin-btn:hover  { color: var(--text-hi); background: rgba(214,234,248,0.08); }
.time-spin-btn:active { color: var(--text-hi); background: rgba(214,234,248,0.18); }
.time-sep { font-family: 'Bebas Neue', cursive; font-size: 30px; color: var(--text-dim); }

.modal-footer {
  display: flex; gap: 10px;
  padding: clamp(12px, 1.5vh, 16px) clamp(16px, 2vw, 24px) clamp(14px, 2vh, 20px);
  border-top: 1px solid var(--border);
}
.btn {
  flex: 1; padding: clamp(9px, 1.2vh, 11px); border-radius: 8px; border: none;
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(12px, 1.3vw, 14px); font-weight: 700; letter-spacing: 0.08em;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 7px; transition: var(--transition);
}
.btn--save {
  background: linear-gradient(135deg, #1a6fd4, #0d4fa0); color: #fff;
  box-shadow: 0 4px 20px rgba(26,111,212,0.3);
}
.btn--save:hover { background: linear-gradient(135deg, #2280e8, #1460c0); transform: translateY(-1px); }
.btn--cancel { background: rgba(255,255,255,0.05); color: var(--text-mid); border: 1px solid var(--border-hi); }
.btn--cancel:hover { background: rgba(255,255,255,0.09); color: var(--text-hi); }


/* ════════════════════════════════════════
   OVERRIDE settings-panel — bouton engrenage dans le header
   (position relative au header, pas fixed)
════════════════════════════════════════ */
.sb-header .settings-btn {
  position: absolute; right: clamp(8px, 1vw, 20px); top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.06); border: 1px solid var(--border-hi);
  color: var(--text-mid);
  width: clamp(32px, 3.5vw, 40px); height: clamp(32px, 3.5vw, 40px);
  border-radius: 8px; font-size: clamp(12px, 1.4vw, 15px);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); z-index: auto; backdrop-filter: none;
}
.sb-header .settings-btn:hover {
  background: rgba(255,255,255,0.12); color: var(--text-hi);
  border-color: var(--border-hi);
}
.sb-header .settings-btn .fa-cog      { transition: transform 0.3s ease; }
.sb-header .settings-btn.open .fa-cog { transform: rotate(60deg); }


/* ════════════════════════════════════════
   RESPONSIVE
   ──────────────────────────────────────
   Seul le :root est modifié par breakpoint
   → les règles consomment les variables
════════════════════════════════════════ */

/* ── Tablette portrait (≤ 1024px) ── */
@media (max-width: 1024px) and (orientation: portrait) {
  :root {
    --arena-cols:      1fr 1fr;
    --arena-rows:      1fr auto;
    --center-w:        100%;
    --clock-h:         clamp(80px, 13vh, 130px);
    --clock-digits-fs: clamp(44px, 9vw, 84px);
    --nudge-btn-fs:    clamp(28px, 5vw, 44px);
    --ctrl-btn-dir:    column;
  }
  /* Layout spécifique portrait — positionnement de grille non exprimable en variable */
  .team-panel--left  { grid-column: 1; grid-row: 1; border-bottom: 1px solid var(--border); }
  .team-panel--right { grid-column: 2; grid-row: 1; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .center-panel {
    grid-column: 1 / -1; grid-row: 2;
    flex-direction: row; flex-wrap: wrap;
    justify-content: space-evenly; align-items: center;
    border-top: 1px solid var(--border);
    padding: 14px 20px; gap: 12px;
  }
  .clock-shell  { width: clamp(260px, 50vw, 420px); padding: 0; }
  .clock-controls { width: clamp(200px, 36vw, 320px); }
}

/* ── Tablette paysage (≤ 1200px) ── */
@media (max-width: 1200px) and (orientation: landscape) {
  :root {
    --center-w:        clamp(220px, 28vw, 380px);
    --clock-h:         clamp(90px, 15vh, 160px);
    --clock-digits-fs: clamp(44px, 8vw, 110px);
    --nudge-btn-fs:    clamp(28px, 4vw, 48px);
    --score-digit-fs:  clamp(40px, 7vw, 100px);
    --logo-size:       clamp(70px, 12vw, 180px);
    --team-name-fs:    clamp(14px, 2.2vw, 36px);
  }
}

/* ── Mobile (≤ 680px) ── */
@media (max-width: 680px) {
  :root {
    --arena-cols:      1fr;
    --arena-rows:      auto auto auto;
    --clock-h:         100px;
    --clock-digits-fs: 58px;
    --center-w:        100%;
  }
  html, body { overflow: auto; }
  .scoreboard { height: auto; min-height: 100dvh; }
  .team-panel { border-bottom: 1px solid var(--border); padding: 14px 16px; }
  .team-panel--right { border-left: none; }
  .header-badge { display: none; }
  .header-title { font-size: 13px; letter-spacing: 0.12em; }
}