
/* ============================================================
   VARIABLES & RESET
============================================================ */
:root {
  --blue: #1a3a8f;
  --blue-dark: #0f2460;
  --blue-mid: #2451b3;
  --blue-light: #e8edf8;
  --orange: #e8640a;
  --orange-light: #fff0e6;
  --white: #ffffff;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --green: #16a34a;
  --green-light: #dcfce7;
  --red: #dc2626;
  --red-light: #fee2e2;
  --amber: #d97706;
  --amber-light: #fef3c7;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   APP HEADER / NAV
============================================================ */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  background: var(--blue-dark);
  height: 56px;
  display: flex; align-items: center;
  padding: 0 20px;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.app-logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}

.app-logo img {
  height: 40px; width: 40px;
  border-radius: 50%;
  object-fit: contain;
  background: white;
  padding: 3px;
  border: 2px solid var(--orange);
}

.app-logo-text {
  font-family: 'Bebas Neue', cursive;
  font-size: 18px;
  letter-spacing: 1.5px;
  color: white;
  line-height: 1;
}
.app-logo-text span { color: var(--orange); }

.nav-spacer { flex: 1; }

.nav-tabs {
  display: flex; gap: 2px;
}

.nav-tab {
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  display: flex; align-items: center; gap: 6px;
}
.nav-tab:hover { background: rgba(255,255,255,0.15); color: white; }
.nav-tab.active { background: var(--orange); color: white; }

/* Bell notification */
.notif-bell {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: white;
  margin-left: 8px;
  transition: background 0.2s;
}
.notif-bell:hover { background: rgba(255,255,255,0.18); }

.notif-badge {
  position: absolute; top: 4px; right: 4px;
  width: 16px; height: 16px;
  background: var(--red);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: white;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--blue-dark);
}

/* Notif dropdown */
.notif-dropdown {
  position: fixed; top: 62px; right: 12px;
  width: 340px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  display: none;
  max-height: 420px;
  overflow: hidden;
  flex-direction: column;
}
.notif-dropdown.open { display: flex; }

.notif-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 14px;
  display: flex; justify-content: space-between; align-items: center;
}

.notif-list { overflow-y: auto; flex: 1; }

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; gap: 10px; align-items: flex-start;
  transition: background 0.15s;
}
.notif-item:hover { background: var(--bg); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--blue-light); }

.notif-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.notif-text { flex: 1; }
.notif-title { font-weight: 600; font-size: 13px; }
.notif-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.notif-time { font-size: 10px; color: var(--muted); white-space: nowrap; }

/* ============================================================
   VIEWS
============================================================ */
.view { display: none; padding-top: 56px; min-height: 100vh; }
.view.active { display: block; }

/* ============================================================
   PAGE ACCUEIL — LISTE TOURNOIS (Admin)
============================================================ */
#view-accueil {
  background: var(--bg);
  padding-top: 56px;
}

.accueil-hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  padding: 36px 32px;
  color: white;
  position: relative;
  overflow: hidden;
}

.accueil-hero::after {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.accueil-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 32px;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.accueil-sub { color: rgba(255,255,255,0.7); font-size: 14px; }

.accueil-actions {
  display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap;
}

.tournoi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 24px;
}

.tournoi-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}
.tournoi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.tc-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start;
}

.tc-name {
  font-family: 'Bebas Neue', cursive;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--blue-dark);
  line-height: 1.1;
}

.tc-date { font-size: 12px; color: var(--muted); margin-top: 3px; }

.tc-status {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.ts-prep { background: var(--amber-light); color: var(--amber); }
.ts-live { background: var(--green-light); color: var(--green); }
.ts-done { background: #f1f5f9; color: var(--muted); }

.tc-body { padding: 14px 20px; }

.tc-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 14px;
}

.tc-stat {
  text-align: center;
  background: var(--bg);
  border-radius: 8px;
  padding: 8px;
}
.tc-stat-val {
  font-family: 'Bebas Neue', cursive;
  font-size: 22px;
  color: var(--blue);
  line-height: 1;
}
.tc-stat-lbl { font-size: 10px; color: var(--muted); margin-top: 2px; }

.tc-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
}

/* ============================================================
   INTERFACE ADMIN — LAYOUT
============================================================ */
#view-admin {
  display: none;
  flex-direction: row;
}
#view-admin.active { display: flex; }

.admin-sidebar {
  width: 210px;
  flex-shrink: 0;
  background: white;
  border-right: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.sidebar-logo {
  padding: 8px 16px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.sidebar-logo img { height: 32px; background: white; border-radius: 50%; padding: 2px; object-fit: contain; }
.sidebar-logo-text { font-weight: 700; font-size: 12px; color: var(--blue-dark); line-height: 1.2; }

.sidebar-section {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.sidebar-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 20px;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
  border-left: 3px solid transparent;
  border-radius: 0;
  position: relative;
}
.sidebar-item:hover { color: var(--text); background: var(--bg); }
.sidebar-item.active { color: var(--blue); border-left-color: var(--blue); background: var(--blue-light); font-weight: 600; }
.sidebar-item .si-icon { font-size: 16px; flex-shrink: 0; }

.admin-main { flex: 1; overflow-x: hidden; }
.admin-content { padding: 24px; max-width: 1100px; }

.admin-page { display: none; }
.admin-page.active { display: block; }

/* ============================================================
   COMPOSANTS COMMUNS
============================================================ */
.page-header {
  margin-bottom: 24px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.page-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 26px;
  letter-spacing: 1.5px;
  color: var(--blue-dark);
}
.page-subtitle { font-size: 13px; color: var(--muted); margin-top: 2px; }

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  font-weight: 700;
  font-size: 14px;
}
.card-header .ch-icon {
  width: 32px; height: 32px;
  background: var(--blue-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--blue);
}
.card-body { padding: 20px; }

/* Boutons */
.btn {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s;
  display: inline-flex; align-items: center; gap: 7px;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-orange { background: var(--orange); color: white; }
.btn-orange:hover { background: #c4540a; }
.btn-outline { background: white; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-danger { background: var(--red-light); color: var(--red); border: 1px solid rgba(220,38,38,0.25); }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: var(--green-light); color: var(--green); border: 1px solid rgba(22,163,74,0.25); }
.btn-success:hover { background: #bbf7d0; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Inputs */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--muted);
  display: flex; align-items: center; gap: 5px;
}
.form-input, .form-select, .form-textarea {
  padding: 9px 13px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--blue); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.form-grid.col3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group.full { grid-column: 1/-1; }

/* Toggle */
.toggle-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: 13px; font-weight: 600; color: var(--text); }
.toggle-desc { font-size: 11px; color: var(--muted); margin-top: 1px; }
.toggle {
  position: relative; width: 42px; height: 22px; flex-shrink: 0;
}
.toggle input { display: none; }
.toggle-track {
  position: absolute; inset: 0;
  background: #cbd5e1;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-track { background: var(--blue); }
.toggle input:checked + .toggle-track::after { transform: translateX(20px); }

/* Tags */
.tag {
  padding: 2px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
}
.tag-green { background: var(--green-light); color: var(--green); }
.tag-blue { background: var(--blue-light); color: var(--blue); }
.tag-amber { background: var(--amber-light); color: var(--amber); }
.tag-red { background: var(--red-light); color: var(--red); }
.tag-gray { background: #f1f5f9; color: var(--muted); }
.tag-orange { background: var(--orange-light); color: var(--orange); }

/* Help icon */
.help-icon {
  width: 15px; height: 15px;
  background: var(--blue-light);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px;
  cursor: help;
  color: var(--blue);
  font-weight: 700;
  border: 1px solid rgba(26,58,143,0.2);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat-val {
  font-family: 'Bebas Neue', cursive;
  font-size: 36px;
  line-height: 1;
  color: var(--blue);
}
.stat-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.stat-sub { font-size: 12px; color: var(--text); margin-top: 3px; }

/* Alert card */
.alert-card {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
}
.alert-amber { background: var(--amber-light); border: 1px solid rgba(217,119,6,0.3); color: #92400e; }
.alert-red { background: var(--red-light); border: 1px solid rgba(220,38,38,0.3); color: #991b1b; }
.alert-green { background: var(--green-light); border: 1px solid rgba(22,163,74,0.3); color: #166534; }
.alert-blue { background: var(--blue-light); border: 1px solid rgba(26,58,143,0.2); color: var(--blue-dark); }

/* Live dot */
.live-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.5; transform:scale(1.3); } }

/* Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 9px 14px;
  background: var(--bg);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbfc; }
.data-table tr.forfait td { opacity: 0.5; }

.pin-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 2px;
  background: var(--blue-light);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Ranking table */
.ranking-table { width: 100%; border-collapse: collapse; }
.ranking-table th {
  padding: 8px 12px;
  background: var(--bg);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.ranking-table th:nth-child(2) { text-align: left; }
.ranking-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  text-align: center;
  vertical-align: middle;
}
.ranking-table td:nth-child(2) { text-align: left; }
.ranking-table tr:last-child td { border-bottom: none; }
.ranking-table tr.my-row td { background: rgba(26,58,143,0.04); }

.pos-badge {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  background: var(--bg);
  color: var(--muted);
}
.pos-1 { background: rgba(234,179,8,0.15); color: #854d0e; }
.pos-2 { background: rgba(148,163,184,0.2); color: #475569; }
.pos-3 { background: rgba(194,65,12,0.12); color: #9a3412; }

/* Match cards */
.match-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.match-card:hover { box-shadow: var(--shadow-md); }
.match-card.my-match { border-color: rgba(232,100,10,0.4); border-left: 3px solid var(--orange); }
.match-card.live-card { border-color: rgba(22,163,74,0.4); border-left: 3px solid var(--green); }
.match-card.done-card { opacity: 0.85; }

.match-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.match-meta { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.match-teams { display: flex; align-items: center; gap: 12px; }
.team-name { flex: 1; font-weight: 700; font-size: 15px; }
.team-name.right { text-align: right; }
.team-name.winner { color: var(--green); }
.team-name.loser { color: var(--red); }
.score-big {
  font-family: 'Bebas Neue', cursive;
  font-size: 28px;
  color: var(--blue);
  display: flex; gap: 4px; align-items: center;
  flex-shrink: 0;
}
.score-sep { color: var(--muted); font-size: 18px; }
.match-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted);
}

/* Progress bar */
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue); border-radius: 3px; transition: width 0.5s; }

/* ============================================================
   LIVE MATCHES ADMIN
============================================================ */
.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }

.live-match-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.live-match-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--green);
}
.live-match-card.done::before { background: var(--muted); }
.live-match-card.warning::before { background: var(--amber); }

.lm-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-size: 11px; color: var(--muted);
}
.lm-score-row {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 12px;
}
.lm-team { flex: 1; }
.lm-team-name { font-weight: 700; font-size: 14px; }
.lm-team-name.right { text-align: right; }
.lm-score-num {
  font-family: 'Bebas Neue', cursive;
  font-size: 40px;
  color: var(--blue);
  line-height: 1;
}
.lm-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.lm-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  transition: all 0.15s;
}
.lm-btn:hover { background: #e2e8f0; }
.lm-btn.danger { border-color: rgba(220,38,38,0.3); color: var(--red); background: var(--red-light); }
.lm-btn.danger:hover { background: #fecaca; }

/* ============================================================
   INTERFACE JOUEUR
============================================================ */
#view-joueur { background: var(--bg); }

.joueur-header {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  padding: 20px 20px 18px;
  color: white;
}

.team-badge-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}

.team-avatar {
  width: 44px; height: 44px;
  background: var(--orange);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', cursive;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
}

.team-info h2 { font-family: 'Bebas Neue', cursive; font-size: 20px; letter-spacing: 1px; line-height: 1; }
.team-info p { font-size: 11px; color: rgba(255,255,255,0.65); margin-top: 2px; }

.joueur-tabs {
  display: flex; background: white;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.joueur-tabs::-webkit-scrollbar { display: none; }

.joueur-tab {
  padding: 12px 16px;
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.15s;
}
.joueur-tab:hover { color: var(--text); }
.joueur-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

.joueur-content { padding: 14px; display: none; }
.joueur-content.active { display: block; }

/* Timeline planning */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute;
  left: 11px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}

.timeline-item { position: relative; margin-bottom: 14px; }
.timeline-dot {
  position: absolute; left: -22px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: white;
  z-index: 1;
}
.timeline-dot.live { background: var(--green); border-color: var(--green); }
.timeline-dot.next { background: var(--orange); border-color: var(--orange); }
.timeline-dot.done { background: var(--muted); border-color: var(--muted); }
.timeline-dot.arb { background: var(--blue); border-color: var(--blue); }

.tl-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.tl-card.active-tl { border-color: var(--orange); }
.tl-time { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.tl-title { font-weight: 700; font-size: 14px; }
.tl-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ============================================================
   INTERFACE ARBITRAGE
============================================================ */
#view-arbitrage { background: white; }

.arb-header {
  background: var(--blue-dark);
  color: white;
  padding: 16px 20px;
}
.arb-match-title { font-size: 12px; color: rgba(255,255,255,0.6); margin-bottom: 4px; }
.arb-match-name { font-weight: 700; font-size: 16px; }

.arb-timer-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; gap: 12px;
}

.timer-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 44px;
  font-weight: 600;
  color: white;
  line-height: 1;
}
.timer-display.warning { color: var(--amber-light); }
.timer-display.critical { color: #fca5a5; animation: timerPulse 0.6s infinite; }
@keyframes timerPulse { 0%,100%{opacity:1;} 50%{opacity:0.5;} }

.score-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  padding: 20px 16px;
  background: white;
}

.team-panel {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: all 0.3s;
}
.team-panel.winning {
  border-color: var(--green);
  background: var(--green-light);
}
.team-panel.validated { opacity: 0.7; pointer-events: none; }

.panel-name {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--muted); margin-bottom: 8px;
}

.big-score {
  font-family: 'Bebas Neue', cursive;
  font-size: 84px;
  line-height: 1;
  color: var(--blue-dark);
  transition: all 0.2s;
}
.big-score.scored {
  color: var(--orange);
  transform: scale(1.1);
}

.arb-btn-add {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  background: var(--blue);
  border: none;
  border-radius: 10px;
  color: white;
  font-family: 'Bebas Neue', cursive;
  font-size: 20px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.15s;
}
.arb-btn-add:hover { background: var(--blue-dark); }
.arb-btn-add:active { transform: scale(0.97); }

.arb-btn-undo {
  width: 100%;
  padding: 8px;
  margin-top: 6px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.arb-btn-undo:hover { background: var(--bg); }

.vs-center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vs-text { font-family: 'Bebas Neue', cursive; font-size: 26px; color: var(--muted); }

.swap-btn {
  padding: 7px 14px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--blue);
  transition: all 0.2s;
  white-space: nowrap;
}
.swap-btn:hover { background: var(--blue-light); border-color: var(--blue); }

.arb-actions-bar {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px; padding: 0 16px 12px;
}
.arb-action-btn {
  padding: 10px 8px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  transition: all 0.15s;
}
.arb-action-btn:hover { background: var(--bg); }
.arb-action-btn.danger { border-color: rgba(220,38,38,0.3); color: var(--red); }
.arb-action-btn.warning { border-color: rgba(217,119,6,0.3); color: var(--amber); }
.arb-action-btn.blue { border-color: rgba(26,58,143,0.3); color: var(--blue); }
.arb-action-btn.orange { border-color: rgba(232,100,10,0.3); color: var(--orange); }
.arb-action-btn .ab-icon { font-size: 20px; }

.history-panel {
  margin: 0 16px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  max-height: 140px;
  overflow-y: auto;
}
.history-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 8px; }
.history-item {
  display: flex; justify-content: space-between;
  padding: 5px 0; font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }

.validate-btn {
  margin: 0 16px 16px;
  width: calc(100% - 32px);
  padding: 14px;
  background: var(--green);
  border: none;
  border-radius: 12px;
  color: white;
  font-family: 'Bebas Neue', cursive;
  font-size: 20px;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.validate-btn:hover { background: #15803d; transform: translateY(-1px); }

.validated-banner {
  margin: 0 16px 12px;
  background: var(--green-light);
  border: 1.5px solid rgba(22,163,74,0.4);
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
  font-weight: 700;
  color: var(--green);
  display: none;
}

.signaler-btn {
  margin: 0 16px 16px;
  width: calc(100% - 32px);
  padding: 11px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all 0.2s;
}
.signaler-btn:hover { background: var(--bg); color: var(--text); }

/* ============================================================
   INTERFACE AFFICHAGE PUBLIC
============================================================ */
#view-public { background: #070e1a; min-height: 100vh; color: white; }

.pub-header {
  background: linear-gradient(90deg, #070e1a, #0d1e35);
  padding: 18px 36px;
  border-bottom: 3px solid var(--orange);
  display: flex; align-items: center; justify-content: space-between;
}
.pub-logo { display: flex; align-items: center; gap: 12px; }
.pub-logo img { height: 48px; background: white; border-radius: 50%; padding: 3px; object-fit: contain; }
.pub-logo-text { font-family: 'Bebas Neue', cursive; font-size: 24px; letter-spacing: 3px; color: white; }
.pub-logo-text span { color: var(--orange); }
.pub-clock { font-family: 'JetBrains Mono', monospace; font-size: 22px; color: var(--orange); }
.pub-phase { font-size: 13px; color: rgba(255,255,255,0.5); letter-spacing: 1px; text-transform: uppercase; }

.pub-body { padding: 24px 36px; }

.pub-pools-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; margin-bottom: 24px;
}

.pub-pool {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
}
.pub-pool-header {
  padding: 12px 18px;
  background: rgba(232,100,10,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: 'Bebas Neue', cursive;
  font-size: 17px;
  letter-spacing: 2px;
  color: var(--orange);
  display: flex; justify-content: space-between; align-items: center;
}
.pub-pool-sub { font-size: 11px; color: rgba(255,255,255,0.4); font-family: 'DM Sans', sans-serif; letter-spacing: 0.5px; }

.pub-pool-row {
  display: grid;
  grid-template-columns: 26px 1fr 36px 36px 36px 52px 52px;
  gap: 4px;
  padding: 9px 18px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: center;
}
.pub-pool-row:last-child { border-bottom: none; }
.pub-pool-row.head-row {
  font-size: 9px; color: rgba(255,255,255,0.35);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 7px 18px;
  background: rgba(255,255,255,0.02);
}

.pub-pos { font-family: 'Bebas Neue', cursive; font-size: 16px; color: rgba(255,255,255,0.35); text-align: center; }
.pub-pos.p1 { color: #f59e0b; }
.pub-pos.p2 { color: #94a3b8; }
.pub-pos.p3 { color: #c2410c; }
.pub-team-name { font-weight: 600; font-size: 14px; }
.pub-pts { font-family: 'Bebas Neue', cursive; font-size: 20px; color: var(--orange); text-align: center; }
.pub-val { text-align: center; color: rgba(255,255,255,0.5); font-size: 12px; }
.pub-qb { width: 7px; height: 7px; background: var(--green); border-radius: 50%; display: inline-block; margin-left: 5px; vertical-align: middle; }

.pub-live-section { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.pub-section-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 18px; letter-spacing: 2px;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}

.pub-match {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
}
.pub-match.live-pm { border-color: rgba(22,163,74,0.4); background: rgba(22,163,74,0.06); }

.terrain-pill {
  background: var(--orange);
  border-radius: 8px;
  padding: 6px 8px;
  font-family: 'Bebas Neue', cursive;
  font-size: 12px;
  color: white;
  text-align: center;
  line-height: 1.2;
  flex-shrink: 0;
  min-width: 38px;
}
.pm-teams { flex: 1; display: flex; align-items: center; gap: 8px; }
.pm-team { font-weight: 700; font-size: 14px; flex: 1; }
.pm-team.right { text-align: right; }
.pm-score { font-family: 'Bebas Neue', cursive; font-size: 28px; color: var(--orange); display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.pm-sep { color: rgba(255,255,255,0.3); font-size: 16px; }
.pm-timer { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--amber-light); white-space: nowrap; }
.next-pill { background: rgba(232,100,10,0.2); border: 1px solid rgba(232,100,10,0.4); border-radius: 20px; padding: 3px 10px; font-size: 10px; font-weight: 700; color: var(--orange); white-space: nowrap; }

/* ============================================================
   MODAL SYSTEM
============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15,36,96,0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: white;
  border-radius: 16px;
  padding: 28px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
  transform: scale(0.96) translateY(10px);
  transition: transform 0.22s;
  max-height: 90vh;
  overflow-y: auto;
}
.modal.wide { max-width: 600px; }
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--blue-dark);
  margin-bottom: 6px;
}
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* PUSH NOTIFICATION */
.push-notif-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.push-notif-overlay.open { opacity: 1; pointer-events: all; }

.push-notif {
  background: white;
  border-radius: 20px;
  padding: 28px 28px 22px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0,0,0,0.2);
  transform: translateY(30px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.push-notif-overlay.open .push-notif { transform: translateY(0) scale(1); }

.push-icon {
  font-size: 48px;
  margin-bottom: 12px;
  animation: pushBounce 0.6s ease;
}
@keyframes pushBounce { 0%{transform:scale(0);} 60%{transform:scale(1.2);} 100%{transform:scale(1);} }

.push-title { font-family: 'Bebas Neue', cursive; font-size: 24px; letter-spacing: 1px; color: var(--blue-dark); margin-bottom: 6px; }
.push-body { font-size: 14px; color: var(--muted); margin-bottom: 20px; line-height: 1.6; }
.push-actions { display: flex; gap: 10px; }
.push-actions .btn { flex: 1; justify-content: center; }

/* TOAST */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 4000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  max-width: 320px;
  font-size: 13px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--blue);
  animation: slideInToast 0.3s ease;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--amber); }
@keyframes slideInToast { from{transform:translateX(100%);opacity:0;} to{transform:translateX(0);opacity:1;} }

/* Phase type cards */
.phase-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.phase-type-card {
  padding: 12px;
  border-radius: 10px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
}
.phase-type-card:hover { border-color: var(--blue-mid); }
.phase-type-card.selected { border-color: var(--blue); background: var(--blue-light); }
.phase-type-icon { font-size: 22px; margin-bottom: 5px; }
.phase-type-name { font-size: 12px; font-weight: 600; line-height: 1.3; }

/* Penalty config row */
.pen-row {
  display: grid;
  grid-template-columns: 1fr 70px 130px auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.pen-row:last-child { border-bottom: none; }

/* Messages panel */
.msg-targets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.msg-target {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  background: white;
  color: var(--muted);
}
.msg-target.selected { border-color: var(--blue); background: var(--blue-light); color: var(--blue); }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Responsive */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .live-grid { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .pub-pools-grid { grid-template-columns: 1fr; }
  .pub-live-section { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .arb-actions-bar { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   PATCH v3 — tooltips, matchs admin, phase form
============================================================ */

/* Tooltip ? */
.tooltip-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  background: var(--blue-light); color: var(--blue);
  border-radius: 50%; font-size: 10px; font-weight: 700;
  cursor: pointer; border: 1px solid rgba(26,58,143,0.25);
  position: relative; margin-left: 4px; flex-shrink: 0;
  vertical-align: middle;
}
.tooltip-btn::after {
  content: attr(data-tip);
  position: absolute; bottom: 120%; left: 50%;
  transform: translateX(-50%);
  background: #1e293b; color: white;
  padding: 8px 12px; border-radius: 8px;
  font-size: 11px; font-weight: 400; line-height: 1.5;
  white-space: normal; max-width: 240px; width: max-content;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s; z-index: 9999;
  text-transform: none; letter-spacing: 0;
}
.tooltip-btn:hover::after { opacity: 1; }

/* Ligne match admin */
.match-admin-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px; padding: 10px 14px;
  background: white; border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 6px;
  transition: box-shadow 0.15s;
}
.match-admin-row:hover { box-shadow: var(--shadow-md); }

/* Bouton validate qui pulse */
@keyframes validPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.03)} }

/* Onglets classement */
.classement-tab {
  background: none; border: none; padding: 8px 16px;
  font-family: 'DM Sans', sans-serif; font-size: 13px;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.classement-tab:hover { color: var(--blue); }

/* Section label dans matchs */
.section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 8px 0 4px; }

/* Stat msg start */
#start-msg { animation: fadeIn 0.3s; }
@keyframes fadeIn { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:none} }

/* Push confirm orange — forcer */
.push-confirm-btn {
  display: flex !important; align-items: center !important; justify-content: center !important;
  width: 100% !important; padding: 13px 20px !important;
  background: var(--orange) !important; color: white !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 14px !important; font-weight: 700 !important;
  border: none !important; border-radius: var(--radius-sm) !important;
  cursor: pointer !important; margin-top: 4px !important;
}
.push-confirm-btn:hover { background: #c4540a !important; }

/* Buvette bar */
.buvette-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  padding: 10px 14px; background: white;
  border-top: 1px solid var(--border); box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}
.btn-buvette-full {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 13px 20px;
  background: var(--orange); color: white !important;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700;
  border-radius: var(--radius-sm); text-decoration: none !important;
  border: none; cursor: pointer; transition: background 0.2s;
}
.btn-buvette-full:hover { background: #c4540a; }
.page-joueur { padding-bottom: 72px; }

/* Offline banner */
.offline-banner { display: none; position: fixed; top: 56px; left: 0; right: 0; z-index: 800; background: var(--amber); color: white; text-align: center; padding: 6px 16px; font-size: 13px; font-weight: 600; }
.offline-banner.show { display: block; }

/* Nav */
.app-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 900; background: var(--blue-dark); height: 56px; display: flex; align-items: center; padding: 0 20px; gap: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.app-nav .app-logo { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.app-nav .app-logo img { mix-blend-mode: lighten; background: white; border-radius: 50%; padding: 3px; border: 2px solid var(--orange); }
.app-nav .nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-badge-admin { background: var(--orange); color: white; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.bell-btn { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,0.1); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: white; transition: background 0.2s; position: relative; }
.bell-btn:hover { background: rgba(255,255,255,0.18); }
.notif-wrapper { position: relative; }
.notif-header { padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.notif-empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* Layout fix */
body { padding-top: 56px; }
.view { padding-top: 0 !important; }
#view-accueil { padding-top: 0 !important; }
.admin-layout { display: flex; min-height: calc(100vh - 56px); }
.sidebar { width: 220px; flex-shrink: 0; background: var(--blue-dark); min-height: calc(100vh - 56px); position: fixed; top: 56px; left: 0; bottom: 0; overflow-y: auto; z-index: 100; }
.sidebar-logo { padding: 20px 16px 14px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-nav { padding: 8px 0; }
.sidebar-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; color: rgba(255,255,255,0.6); cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.18s; border-left: 3px solid transparent; }
.sidebar-item:hover { background: rgba(255,255,255,0.08); color: white; }
.sidebar-item.active { background: rgba(232,100,10,0.18); color: white; border-left-color: var(--orange); }
.si-icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; }
.admin-main { margin-left: 220px; flex: 1; padding: 24px; min-width: 0; }
.admin-page { display: none; }
.admin-page.active { display: block; }

/* Accueil */
.page-accueil { min-height: 100vh; }
.hero { background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%); padding: 36px 32px; color: white; }
.hero-title { font-family: 'Bebas Neue', cursive; font-size: 32px; letter-spacing: 2px; margin-bottom: 6px; }
.hero-sub { color: rgba(255,255,255,0.7); font-size: 14px; margin-bottom: 20px; }
.btn-outline-white { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.6); padding: 9px 18px; border-radius: var(--radius-sm); font-family: 'DM Sans',sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; transition: all 0.18s; }
.btn-outline-white:hover { background: rgba(255,255,255,0.12); }
.admin-login-bar { background: white; border-bottom: 1px solid var(--border); padding: 12px 32px; }
.tournois-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 16px; padding: 8px 32px 32px; }
.tournoi-card-new { background: white; border: 2px dashed var(--border); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted); cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 160px; }
.tournoi-card-new:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.tc-nom { font-family: 'Bebas Neue',cursive; font-size: 20px; letter-spacing: 1px; color: var(--blue-dark); }
.tc-date { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.tc-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.tc-progress { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 2px; }
.tc-progress-bar { height: 100%; background: var(--blue); border-radius: 2px; transition: width 0.5s; }
.tc-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
.loading-placeholder { color: var(--muted); padding: 20px; font-size: 13px; }

/* Joueur */
.page-joueur { min-height: 100vh; background: var(--bg); }
.login-card { max-width: 400px; margin: 40px auto; background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-md); }
#joueur-position { font-size: 12px; color: rgba(255,255,255,0.65); margin-top: 3px; min-height: 16px; }
.alerte-match-bar { background: var(--orange); color: white; padding: 10px 16px; font-size: 13px; font-weight: 700; text-align: center; }
.tl-dot { position: absolute; left: -22px; top: 6px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); background: white; z-index: 1; }
.tl-dot.live { background: var(--green); border-color: var(--green); }
.tl-dot.done { background: var(--muted); border-color: var(--muted); }

/* Arbitrage */
.page-arbitrage { background: white; min-height: 100vh; }
.arb-select-match { max-width: 420px; margin: 40px auto; padding: 32px; background: white; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.countdown-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 16px; background: rgba(217,119,6,0.12); border-bottom: 1px solid rgba(217,119,6,0.3); font-size: 13px; font-weight: 600; color: var(--amber); }
.countdown-val { font-family: 'JetBrains Mono',monospace; font-size: 20px; color: var(--amber); }
.score-target-banner { background: var(--blue-light); border-bottom: 1px solid rgba(26,58,143,0.15); padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--blue-dark); display: flex; align-items: center; justify-content: space-between; }
.rules-toggle { background: var(--blue); color: white; border: none; border-radius: 6px; padding: 4px 12px; font-size: 11px; font-weight: 700; cursor: pointer; }
.rules-panel { display: none; background: white; border-bottom: 2px solid var(--blue); padding: 16px; }
.rules-panel.open { display: block; }
.rules-title { font-family: 'Bebas Neue',cursive; font-size: 16px; letter-spacing: 1px; color: var(--blue-dark); margin-bottom: 10px; display: flex; justify-content: space-between; }
.service-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.service-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.service-btns { display: flex; gap: 6px; flex: 1; }
.service-btn { flex: 1; padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 8px; background: white; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s; color: var(--text); }
.service-btn.active-svc { background: var(--orange); color: white; border-color: var(--orange); }
.aab-blue { color: var(--blue) !important; border-color: rgba(26,58,143,0.25) !important; }
.aab-danger { color: var(--red) !important; border-color: rgba(220,38,38,0.25) !important; }
.aab-orange { color: var(--orange) !important; border-color: rgba(232,100,10,0.25) !important; }

/* Vue publique */
.pub-body-full { background: #070e1a !important; }
body.pub-body-full { padding-top: 0 !important; }
.pub-page { min-height: 100vh; }
.pub-body-content { padding: 24px 36px; }
.pub-fullscreen-btn { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; padding: 6px 14px; font-size: 12px; font-weight: 600; cursor: pointer; }
.pub-fullscreen-btn:hover { background: rgba(255,255,255,0.18); }
.pub-phase-label { font-size: 12px; color: rgba(255,255,255,0.45); letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .admin-main { margin-left: 0; padding: 16px; }
  .hero { padding: 24px 16px; }
  .tournois-grid { padding: 8px 16px 100px; grid-template-columns: 1fr; }
  .admin-login-bar { padding: 12px 16px; }
  .pub-body-content { padding: 16px; }
  .pub-pools-grid { grid-template-columns: 1fr; }
  .pub-live-section { grid-template-columns: 1fr; }
}

/* ── PATCH v4 ── */

/* Bouton démarrer bien visible */
.arb-start-btn {
  background: #16a34a !important;
  color: white !important;
  border: 2px solid #15803d !important;
  font-family: 'Bebas Neue', cursive !important;
  font-size: 18px !important;
  letter-spacing: 1px !important;
  padding: 10px 20px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  box-shadow: 0 2px 8px rgba(22,163,74,0.4) !important;
}
.arb-start-btn:hover { background: #15803d !important; transform: scale(1.02) !important; }
.arb-start-btn:disabled { background: rgba(255,255,255,.15) !important; color: rgba(255,255,255,.5) !important; border-color: rgba(255,255,255,.2) !important; box-shadow: none !important; cursor: not-allowed !important; }

/* Bouton valider verrouillé */
.validate-btn-locked {
  background: #94a3b8 !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  box-shadow: none !important;
}
.validate-btn-locked:hover { transform: none !important; }

/* Animation pulse valider */
@keyframes validPulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.03);} }

/* Affichage public — fond blanc */
.pub-page.fond-blanc { background: white; color: var(--text); }
.pub-page.fond-blanc .pub-header {
  background: white;
  border-bottom: 3px solid var(--orange);
  border-top: none;
}
.pub-page.fond-blanc .pub-pool { background: var(--bg); border-color: var(--border); }
.pub-page.fond-blanc .pub-pool-header { background: var(--blue-light); color: var(--blue); border-color: var(--border); }
.pub-page.fond-blanc .pub-logo-text { color: var(--blue-dark); }
.pub-page.fond-blanc .pub-team-name { color: var(--text); }
.pub-page.fond-blanc .pub-clock { color: var(--orange); }
.pub-page.fond-blanc .pub-match { background: var(--bg); border-color: var(--border); }
.pub-page.fond-blanc .pm-team { color: var(--text); }
.pub-page.fond-blanc .pm-sep { color: var(--muted); }
.pub-page.fond-blanc .pub-section-title { color: var(--blue-dark); }
.pub-page.fond-blanc .pub-pool-row { border-color: var(--border); color: var(--text); }

/* Dupliquer phase bouton */
.btn-duplicate { background: var(--blue-light); color: var(--blue); border: 1px solid rgba(26,58,143,0.2); }
.btn-duplicate:hover { background: var(--blue); color: white; }

/* Section label */
.section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 8px 0 4px; }
