/* ═══════════════════════════════════════════════════════════════
   ScoreKeeper — Thème partagé
   Pour changer les couleurs : modifie les variables :root
   ═══════════════════════════════════════════════════════════════ */

:root {
  --accent:        #c8f135;
  --accent-dim:    rgba(200,241,53,0.1);
  --accent-border: rgba(200,241,53,0.2);
  --accent-bg:     rgba(200,241,53,0.06);

  --live:          #50ff90;
  --live-dim:      rgba(80,255,144,0.1);

  --warn:          #ffa032;
  --warn-dim:      rgba(255,160,50,0.1);

  --blue:          #50a0ff;
  --blue-dim:      rgba(80,160,255,0.1);

  --danger:        #ff5050;
  --danger-dim:    rgba(255,80,80,0.1);

  --pts-exact:     #c8f135;
  --pts-good:      #50a0ff;
  --pts-ok:        #ffa032;
  --pts-zero:      #333;

  --bg:            #0d0d0d;
  --surface:       #161616;
  --surface-2:     #1e1e1e;
  --border:        #2a2a2a;
  --border-2:      #1a1a1a;

  --text:          #f0ede6;
  --text-muted:    #666;
  --text-dim:      #444;

  --radius:        10px;
  --radius-sm:     8px;
  --radius-pill:   100px;
}

/* ── Reset ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'DM Sans', sans-serif;
  padding-top: 70px; padding-bottom: 90px;
}

/* ── Topnav ── */
#topnav {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 999; gap: 0.75rem;
}
.logo { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: 0.05em; color: var(--text); }
.logo span { color: var(--accent); }
.logo-link {
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
}
.logo-link:visited,
.logo-link:hover,
.logo-link:active {
  color: var(--text);
}
.nav-ligue-btn {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm); padding: 0.3rem 0.75rem;
  font-size: 0.8rem; color: var(--accent); font-weight: 600;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo-btn {
  padding: 0.25rem 0.45rem;
  justify-content: center;
}
.nav-logo-img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}
#nav-nom {
  font-size: 0.78rem; color: var(--text-muted);
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-logout {
  background: none; border: 1px solid var(--border); color: var(--text-muted);
  padding: 0.3rem 0.6rem; border-radius: var(--radius-sm);
  font-size: 0.75rem; cursor: pointer; font-family: 'DM Sans', sans-serif; flex-shrink: 0;
}
.btn-logout:hover { color: var(--danger); border-color: var(--danger); }

/* ── Botnav ── */
#botnav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; z-index: 999;
}
#botnav a {
  flex: 1; padding: 0.9rem 0.25rem; text-align: center;
  text-decoration: none; color: var(--text-muted);
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em;
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
}
#botnav a.active { color: var(--accent); }

/* ── App container ── */
#app { max-width: 600px; margin: 0 auto; padding: 1rem; }
.ligue-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.ligue-hero img {
  width: min(190px, 58vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.28));
}

/* ── Ligue selector ── */
.ligue-sel { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; margin-bottom: 0.75rem; }
.ligue-btn {
  flex-shrink: 0; padding: 0.4rem 1rem; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: none; color: var(--text-muted);
  font-family: 'DM Sans', sans-serif; font-size: 0.82rem; cursor: pointer;
}
.ligue-btn.active { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }

/* ── Tabs ── */
.tabs-main { display: flex; background: var(--surface-2); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 1rem; }
.tab-main {
  flex: 1; padding: 0.6rem; border: none; border-radius: 6px;
  background: none; color: var(--text-muted);
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.tab-main.active { background: var(--accent); color: var(--bg); }

/* ── Journée header ── */
.journee-header { display: flex; align-items: center; gap: 0.75rem; margin: 1.5rem 0 0.75rem; }
.journee-line { flex: 1; height: 1px; background: var(--border); }
.journee-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.2rem; letter-spacing: 0.1em; white-space: nowrap; }
.journee-count { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }

/* ── Match card ── */
.match-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 0.75rem; }
.match-card.clickable { cursor: pointer; transition: border-color 0.15s; }
.match-card.clickable:hover { border-color: #444; }
.match-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.match-date { font-size: 0.72rem; color: var(--text-muted); }
.match-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.team { text-align: center; }
.team-name { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; letter-spacing: 0.05em; }
.score-reel { font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; color: var(--accent); text-align: center; }
.vs { font-family: 'Bebas Neue', sans-serif; font-size: 0.9rem; color: var(--text-muted); text-align: center; }

/* ── Badges ── */
.badge { font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: var(--radius-pill); font-weight: 600; }
.badge-avenir  { background: var(--accent-dim); color: var(--accent); }
.badge-fige    { background: var(--warn-dim);   color: var(--warn); }
.badge-encours { background: var(--live-dim);   color: var(--live); }
.badge-termine { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* ── Pari section ── */
.pari-section { border-top: 1px solid var(--border); padding-top: 0.75rem; }
.pari-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.pari-inputs { display: flex; align-items: center; gap: 0.5rem; }
.score-input {
  flex: 1; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem;
  text-align: center; padding: 0.4rem; -moz-appearance: textfield;
}
.score-input::-webkit-inner-spin-button { display: none; }
.score-input:focus { outline: none; border-color: var(--accent); }
.score-sep { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; color: var(--text-muted); }
.btn-pari {
  width: 100%; margin-top: 0.5rem; padding: 0.65rem;
  background: var(--accent); color: var(--bg); border: none;
  border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.btn-pari:hover { filter: brightness(0.9); }
.pari-existant {
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  border-radius: 6px; padding: 0.5rem 0.75rem;
  font-size: 0.8rem; color: var(--accent); margin-top: 0.5rem; text-align: center;
}
.pari-none {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.5rem 0.75rem;
  font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; text-align: center;
}
.voir-paris { font-size: 0.72rem; color: var(--text-muted); text-align: center; margin-top: 0.5rem; }

/* ── Cotes / outsider ── */
.cotes-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.72rem; }
.cote-badge { flex: 1; text-align: center; background: var(--surface-2); border-radius: 6px; padding: 0.3rem 0.4rem; }
.cote-badge.outsider { border: 1px solid rgba(255,160,50,0.4); color: var(--warn); }
.cote-badge .cote-label { color: var(--text-muted); display: block; font-size: 0.65rem; }
.cote-badge .cote-val { font-family: 'Bebas Neue', sans-serif; font-size: 0.95rem; }
.bonus-outsider { text-align: center; font-size: 0.72rem; color: var(--warn); margin-top: 0.4rem; }

/* ── Doublette ── */
.doublette-row {
  display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; padding: 0.5rem;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm); cursor: pointer;
}
.doublette-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.doublette-label { flex: 1; font-size: 0.82rem; font-weight: 600; }
.doublette-count { font-size: 0.7rem; color: var(--text-muted); }
.doublette-row.used { opacity: 0.5; cursor: not-allowed; }

/* ── Countdown ── */
.countdown { font-size: 0.72rem; text-align: center; margin-top: 0.4rem; font-weight: 600; }
.countdown.urgent { color: var(--danger); }
.countdown.normal { color: var(--warn); }
.countdown.ok     { color: var(--text-muted); }

/* ── Classement / podium ── */
.podium { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 0.6rem; margin-bottom: 1.5rem; align-items: end; }
.podium-item {
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.08)), var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.95rem 0.7rem 0.85rem; text-align: center; cursor: pointer;
  min-height: 172px;
}
.podium-item:hover { border-color: #444; }
.podium-item.first  { border-color: var(--accent); background: var(--accent-bg); }
.podium-item.second { border-color: #888; }
.podium-item.third  { border-color: #cd7f32; }
.podium-item.me {
  border-color: var(--accent) !important;
  background: linear-gradient(180deg, rgba(200,241,53,0.28), rgba(200,241,53,0.12)) !important;
  box-shadow: 0 10px 28px rgba(200,241,53,0.14), inset 0 0 0 1px rgba(200,241,53,0.28);
}
.podium-item.first { min-height: 218px; padding: 1.2rem 0.8rem 0.95rem; }
.podium-item.second { min-height: 190px; padding: 1rem 0.72rem 0.85rem; }
.podium-item.third { min-height: 166px; padding: 0.85rem 0.62rem 0.78rem; }
.podium-item.first .podium-medal { font-size: 1.8rem; }
.podium-item.second .podium-medal { font-size: 1.6rem; }
.podium-item.third .podium-medal { font-size: 1.4rem; }
.podium-item.first .podium-rank { font-size: 1rem; }
.podium-item.second .podium-rank { font-size: 0.92rem; }
.podium-item.third .podium-rank { font-size: 0.86rem; }
.podium-item.first .podium-nom { font-size: 1.02rem; min-height: 3.2rem; }
.podium-item.second .podium-nom { font-size: 0.94rem; min-height: 3rem; }
.podium-item.third .podium-nom { font-size: 0.88rem; min-height: 2.8rem; }
.podium-item.first .podium-pts { font-size: 1.8rem; }
.podium-item.second .podium-pts { font-size: 1.55rem; }
.podium-item.third .podium-pts { font-size: 1.35rem; }
.podium-medal { font-size: 1.5rem; margin-bottom: 0.35rem; line-height: 1; }
.podium-rank { font-family: 'Bebas Neue', sans-serif; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.podium-nom {
  min-height: 3.2rem; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 0.25rem; flex-wrap: wrap;
  font-family: 'Bebas Neue', sans-serif; font-size: 0.95rem; letter-spacing: 0.05em;
  margin-bottom: 0.35rem; word-break: break-word; line-height: 1.05;
}
.podium-pts { font-family: 'Bebas Neue', sans-serif; font-size: 1.55rem; line-height: 1; color: var(--accent); margin-top: auto; }
.podium-pts-label { font-size: 0.65rem; color: var(--text-muted); }
.podium-live { font-size: 0.65rem; color: var(--live); margin-top: 0.2rem; }

@media (max-width: 640px) {
  .podium { gap: 0.45rem; }
  .podium-item { min-height: 156px; padding: 0.8rem 0.45rem 0.7rem; }
.podium-item.first { min-height: 194px; padding: 1rem 0.6rem 0.8rem; }
.podium-item.second { min-height: 174px; padding: 0.86rem 0.52rem 0.72rem; }
.podium-item.third { min-height: 154px; padding: 0.74rem 0.45rem 0.66rem; }
.podium-item.first .podium-nom { min-height: 3rem; font-size: 0.94rem; }
.podium-item.second .podium-nom { min-height: 2.75rem; font-size: 0.88rem; }
.podium-item.third .podium-nom { min-height: 2.55rem; font-size: 0.82rem; }
.podium-item.first .podium-pts { font-size: 1.55rem; }
.podium-item.second .podium-pts { font-size: 1.38rem; }
.podium-item.third .podium-pts { font-size: 1.24rem; }
}

.classement-list { display: flex; flex-direction: column; gap: 0.5rem; }
.classement-row {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem; cursor: pointer;
}
.classement-row:hover { border-color: #444; }
.classement-row.me {
  border-color: var(--accent) !important;
  background: linear-gradient(180deg, rgba(200,241,53,0.24), rgba(200,241,53,0.1)) !important;
  box-shadow: inset 0 0 0 1px rgba(200,241,53,0.22);
}
.rank { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; color: var(--text-muted); width: 24px; text-align: center; flex-shrink: 0; }
.player-nom { flex: 1; font-weight: 600; font-size: 0.9rem; }
.player-sub { font-size: 0.72rem; color: var(--text-muted); }
.player-pts { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; color: var(--accent); text-align: right; }
.player-pts-live { font-size: 0.65rem; color: var(--live); text-align: right; }

/* ── Search bar ── */
.search-bar {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; margin-bottom: 1rem;
}
.search-bar input { flex: 1; background: none; border: none; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.9rem; outline: none; }
.search-bar input::placeholder { color: var(--text-dim); }
.search-bar .clear-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 0; }

/* ── Drawer profil / matchs ── */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1000; display: none; }
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0; z-index: 1001;
  max-height: 85vh; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform 0.3s ease;
}
.drawer.open { transform: translateY(0); }
.drawer-handle-zone { padding: 0.75rem; flex-shrink: 0; cursor: pointer; display: flex; justify-content: center; }
.drawer-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; }
.drawer-content { padding: 0 1rem 2rem; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.drawer-nom { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: 0.05em; }
.drawer-pts { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; color: var(--accent); }
.drawer-stats { display: flex; gap: 1.5rem; margin-bottom: 1.25rem; }
.drawer-stat { text-align: center; }
.drawer-stat-val { font-family: 'Bebas Neue', sans-serif; font-size: 1.2rem; color: var(--accent); }
.drawer-stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.drawer-match-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.drawer-score { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; color: var(--accent); margin-bottom: 1rem; }

/* ── Pari rows (dans drawers) ── */
.pari-row { padding: 0.75rem 0; border-bottom: 1px solid var(--border-2); display: flex; align-items: center; gap: 0.75rem; }
.pari-row:last-child { border-bottom: none; }
.pari-match { flex: 1; }
.pari-match-nom { font-size: 0.82rem; font-weight: 600; }
.pari-match-date { font-size: 0.7rem; color: var(--text-muted); }
.pari-pronostic { text-align: center; min-width: 60px; }
.pari-pronostic-val { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; }
.pari-pronostic-reel { font-size: 0.65rem; color: var(--text-muted); }
.pari-pts { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; width: 42px; text-align: right; }
.pas-parie { color: var(--text-dim); font-style: italic; font-size: 0.75rem; }

/* Paris list rows (scores tab) */
.paris-list-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border-2); }
.paris-list-row:last-child { border-bottom: none; }
.paris-rank { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; color: var(--text-muted); width: 20px; flex-shrink: 0; }
.paris-nom { flex: 1; font-weight: 600; font-size: 0.85rem; }
.paris-pronostic { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; min-width: 50px; text-align: center; }
.paris-pts { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; width: 42px; text-align: right; }
.pas-parie-badge { font-size: 0.7rem; color: var(--text-dim); font-style: italic; }

/* ── Points colors ── */
.pts-5 { color: var(--pts-exact); }
.pts-2 { color: var(--pts-good); }
.pts-1 { color: var(--pts-ok); }
.pts-0 { color: var(--pts-zero); }

/* ── Live badge ── */
.live-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--live-dim); border: 1px solid rgba(80,255,144,0.3);
  color: var(--live); font-size: 0.72rem; font-weight: 600;
  padding: 0.2rem 0.6rem; border-radius: var(--radius-pill); margin-bottom: 1rem;
}
.live-dot { width: 6px; height: 6px; background: var(--live); border-radius: 50%; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* ── Buttons ── */
.btn {
  width: 100%; padding: 0.875rem; background: var(--accent); color: var(--bg);
  border: none; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif;
  font-size: 1rem; font-weight: 600; cursor: pointer; margin-bottom: 0.5rem;
}
.btn:hover { filter: brightness(0.9); }
.btn-sm { padding: 0.4rem 0.9rem; background: var(--accent); color: var(--bg); border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 0.82rem; }
.btn-outline { padding: 0.4rem 0.9rem; background: none; color: var(--text-muted); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 0.82rem; }
.btn-danger { padding: 0.4rem 0.9rem; background: none; color: var(--danger); border: 1px solid var(--danger-dim); border-radius: 6px; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 0.82rem; }

/* ── Inputs ── */
.input { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 1rem; padding: 0.75rem 1rem; margin-bottom: 1rem; }
.input:focus { outline: none; border-color: var(--accent); }
select.input { appearance: none; cursor: pointer; }
.label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.5rem; }

/* ── Toggle ── */
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--surface-2); border-radius: 24px; cursor: pointer; transition: 0.2s; }
.toggle-slider:before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: var(--text-muted); border-radius: 50%; transition: 0.2s; }
.toggle input:checked + .toggle-slider { background: var(--accent-dim); }
.toggle input:checked + .toggle-slider:before { background: var(--accent); transform: translateX(20px); }

/* ── Section header (saison/stats) ── */
.section-header { display: flex; align-items: center; gap: 0.75rem; margin: 1.75rem 0 1rem; }
.section-line { flex: 1; height: 1px; background: var(--border); }
.section-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; letter-spacing: 0.1em; white-space: nowrap; }

/* ── Classements bonus (stats) ── */
.cl-rank { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; color: var(--text-muted); width: 28px; text-align: center; flex-shrink: 0; }
.cl-nom { flex: 1; font-size: 0.85rem; font-weight: 600; }
.cl-equipe { font-size: 0.72rem; color: var(--text-muted); }
.cl-valeur { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; color: var(--accent); }
.cl-unite { font-size: 0.65rem; color: var(--text-muted); margin-left: 0.2rem; }
.classement-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.classement-titre { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; margin-bottom: 0.75rem; }

/* ── Paris spéciaux ── */
.pari-special-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 0.75rem; }
.pari-special-card.clickable { cursor: pointer; transition: border-color 0.15s; }
.pari-special-card.clickable:hover { border-color: #444; }
.ps-titre { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.ps-desc { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.ps-points-badge { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.ps-pts { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-border); border-radius: var(--radius-pill); font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.6rem; }
.ps-status { font-size: 0.78rem; padding: 0.5rem 0.75rem; border-radius: 6px; margin-bottom: 0.5rem; }
.ps-status.ouvert   { background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent); }
.ps-status.attente  { background: var(--warn-dim);   border: 1px solid rgba(255,160,50,0.2); color: var(--warn); }
.ps-status.valide-ok{ background: var(--live-dim);   border: 1px solid rgba(80,255,144,0.2); color: var(--live); }
.ps-status.valide-ko{ background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text-muted); }
.ps-deadline { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.ps-deadline.urgent { color: var(--danger); }
.ps-deadline.normal { color: var(--warn); }
.ps-reponse-group { margin-bottom: 0.5rem; }
.ps-reponse-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.3rem; }
select.ps-select,
input.ps-select { width: 100%; background: var(--surface-2) !important; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text) !important; font-family: 'DM Sans', sans-serif; font-size: 0.9rem; padding: 0.6rem 1rem; margin-bottom: 0.5rem; appearance: none; -webkit-appearance: none; box-shadow: none; background-clip: padding-box; }
select.ps-select { cursor: pointer; }
select.ps-select:focus,
input.ps-select:focus { outline: none; border-color: var(--accent); }
input.ps-select::placeholder { color: var(--text-muted); opacity: 1; }
.ps-search-wrap input.ps-select,
.ps-search-wrap input.ps-select:hover,
.ps-search-wrap input.ps-select:focus,
.ps-search-wrap input.ps-select:active { background: var(--surface-2) !important; color: var(--text) !important; }
.ps-search-wrap input.ps-select:-webkit-autofill,
.ps-search-wrap input.ps-select:-webkit-autofill:hover,
.ps-search-wrap input.ps-select:-webkit-autofill:focus { -webkit-text-fill-color: var(--text) !important; -webkit-box-shadow: 0 0 0 1000px var(--surface-2) inset !important; transition: background-color 9999s ease-in-out 0s; caret-color: var(--text); }
.ps-search-wrap { position: relative; margin-bottom: 0.5rem; }
.ps-search-wrap input.ps-select { margin-bottom: 0; padding-right: 2.6rem; }
.ps-search-toggle { position: absolute; top: 50%; right: 0.35rem; transform: translateY(-50%); width: 1.9rem; height: 1.9rem; border: none; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); font-size: 1rem; cursor: pointer; padding: 0; line-height: 1; display: inline-flex; align-items: center; justify-content: center; appearance: none; -webkit-appearance: none; box-shadow: none; }
.ps-search-toggle:hover,
.ps-search-toggle:focus,
.ps-search-toggle:active { background: var(--surface-2); color: var(--text); outline: none; }
.ps-search-results { position: absolute; left: 0; right: 0; top: calc(100% + 0.3rem); z-index: 80; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 12px 24px rgba(0,0,0,0.25); overflow-y: auto; max-height: 260px; }
.ps-search-results.open-up { top: auto; bottom: calc(100% + 0.3rem); }
.ps-search-option { width: 100%; border: none; background: transparent; color: var(--text); text-align: left; padding: 0.7rem 0.85rem; cursor: pointer; display: flex; flex-direction: column; gap: 0.1rem; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; }
.ps-search-option:hover { background: rgba(255,255,255,0.05); }
.ps-search-option small { color: var(--text-muted); font-size: 0.74rem; }
.ps-search-empty { padding: 0.75rem 0.85rem; color: var(--text-muted); font-size: 0.82rem; }
input.ps-number { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; padding: 0.5rem 1rem; text-align: center; margin-bottom: 0.5rem; }
input.ps-number:focus { outline: none; border-color: var(--accent); }
.btn-ps { width: 100%; padding: 0.65rem; background: var(--accent); color: var(--bg); border: none; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600; cursor: pointer; margin-top: 0.25rem; }
.btn-ps:hover { filter: brightness(0.9); }
.voir-reponses { font-size: 0.72rem; color: var(--blue); text-align: center; margin-top: 0.5rem; }
.ps-reponse-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; padding: 0.2rem 0; }
.ps-reponse-rank { font-family: 'Bebas Neue', sans-serif; font-size: 0.9rem; color: var(--text-muted); width: 20px; }

/* ── Drawer réponses saison ── */
.rep-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border-2); }
.rep-row:last-child { border-bottom: none; }
.rep-row.me { background: var(--accent-bg); border-radius: 6px; padding: 0.5rem; }
.rep-nom { flex: 1; font-weight: 600; font-size: 0.85rem; }
.rep-reponses { font-size: 0.82rem; color: var(--text); }
.rep-pts { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; width: 42px; text-align: right; }
.pts-ok { color: var(--accent); }
.pts-ko { color: var(--text-dim); }
.pts-wait { color: var(--text-muted); font-size: 0.75rem; }

@media (max-width: 640px) {
  .ps-search-wrap input.ps-select {
    font-size: 16px;
    padding-right: 1rem;
  }
  .ps-search-toggle {
    display: none;
  }
  .ps-search-results {
    top: calc(100% + 0.2rem);
    border-radius: 12px;
    max-height: 220px;
    overflow-y: auto;
  }
  .ps-search-results.open-up {
    top: auto;
    bottom: calc(100% + 0.2rem);
  }
  .ps-search-option {
    padding: 0.85rem 0.9rem;
    font-size: 0.95rem;
  }
  .ps-search-option small {
    font-size: 0.78rem;
  }
}

/* ── Ligue admin panel ── */
.ligue-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 0.75rem; }
.ligue-card.active-ligue { border-color: var(--accent); }
.ligue-nom { font-weight: 600; margin-bottom: 0.2rem; }
.ligue-sub { font-size: 0.75rem; color: var(--text-muted); }
.badge-admin { font-size: 0.65rem; background: var(--accent-dim); color: var(--accent); padding: 0.1rem 0.4rem; border-radius: 4px; margin-left: 0.4rem; }
.badge-demande { font-size: 0.7rem; background: var(--warn-dim); color: var(--warn); border: 1px solid rgba(255,160,50,0.3); padding: 0.15rem 0.5rem; border-radius: var(--radius-pill); font-weight: 600; }
.ligue-code { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; color: var(--accent); background: var(--accent-dim); padding: 0.3rem 0.75rem; border-radius: 6px; cursor: pointer; margin-top: 0.5rem; display: inline-block; }
.admin-panel { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; display: none; }
.admin-panel.open { display: block; }
.admin-section { margin-bottom: 1.25rem; }
.admin-section-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.75rem; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.toggle-label { font-size: 0.85rem; }
.toggle-desc { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }
.deadline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 0.75rem; }
.deadline-option { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.65rem; cursor: pointer; text-align: center; }
.deadline-option:hover { border-color: #444; }
.deadline-option.selected { border-color: var(--accent); background: var(--accent-bg); }
.deadline-option .icon { font-size: 1.25rem; margin-bottom: 0.2rem; }
.deadline-option .title { font-weight: 600; font-size: 0.82rem; }
.deadline-option .desc { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.15rem; }
.minutes-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.minutes-row label { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }
.minutes-input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 1rem; padding: 0.5rem 0.75rem; text-align: center; }
.minutes-input:focus { outline: none; border-color: var(--accent); }
.preview-list { margin-top: 0.5rem; }
.preview-item { display: flex; justify-content: space-between; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid var(--border-2); font-size: 0.78rem; }
.preview-item:last-child { border-bottom: none; }
.preview-badge { font-size: 0.65rem; padding: 0.15rem 0.4rem; border-radius: 4px; font-weight: 600; }
.preview-badge.ouvert { background: var(--accent-dim); color: var(--accent); }
.preview-badge.ferme  { background: var(--danger-dim); color: var(--danger); }
.demande-card { background: var(--warn-dim); border: 1px solid rgba(255,160,50,0.2); border-radius: var(--radius-sm); padding: 0.75rem; margin-bottom: 0.5rem; }
.demande-nom { font-weight: 600; font-size: 0.85rem; margin-bottom: 0.2rem; }
.demande-msg { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.demande-actions { display: flex; gap: 0.5rem; }

/* ── Index / login page ── */
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; max-width: 400px; margin: 2rem auto; }
.login-title { font-family: 'Bebas Neue', sans-serif; font-size: 2.5rem; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 0.5rem; text-align: center; }
.login-sub { color: var(--text-muted); font-size: 0.9rem; text-align: center; margin-bottom: 2rem; }
.divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-muted); font-size: 0.8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 0.75rem; width: 100%; padding: 0.875rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.95rem; font-weight: 600; cursor: pointer; margin-bottom: 1rem; }
.btn-google:hover { border-color: #444; }
.error-msg { color: var(--danger); font-size: 0.82rem; text-align: center; margin-top: 0.5rem; }

/* ── Install banner PWA ── */
.install-banner {
  position: fixed; bottom: 70px; left: 0; right: 0;
  background: var(--surface); border-top: 2px solid var(--accent);
  padding: 1rem 1.5rem; z-index: 9998; animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.install-banner h3 { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; color: var(--accent); margin-bottom: 0.3rem; }
.install-banner p { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.75rem; line-height: 1.5; }
.install-row { display: flex; gap: 0.75rem; }
.btn-install { flex: 1; padding: 0.65rem; background: var(--accent); color: var(--bg); border: none; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.btn-dismiss { padding: 0.65rem 1rem; background: none; color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 0.82rem; cursor: pointer; }
.ios-steps { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.75rem; }
.ios-step { display: flex; align-items: center; gap: 0.6rem; font-size: 0.8rem; }
.ios-step-num { width: 22px; height: 22px; background: var(--accent); color: var(--bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.72rem; flex-shrink: 0; }

/* ── Toast ── */
#toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.75rem 1.5rem;
  font-size: 0.85rem; opacity: 0; transition: opacity 0.3s;
  z-index: 9999; white-space: nowrap; pointer-events: none;
}
#toast.show { opacity: 1; }
#toast.ok  { border-color: var(--accent); color: var(--accent); }
#toast.err { border-color: var(--danger); color: var(--danger); }

/* ── Empty state ── */
.empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty h3 { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; margin-bottom: 0.5rem; }

/* ── Tabs ligue (rejoindre/créer) ── */
.tabs { display: flex; background: var(--surface-2); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 1.5rem; }
.tab { flex: 1; padding: 0.6rem; border: none; border-radius: 6px; background: none; color: var(--text-muted); font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.tab.active { background: var(--accent); color: var(--bg); }
.panel { display: none; }
.panel.active { display: block; }

/* ── Score input spinners ── */
.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button { display: none; }
.score-input { -moz-appearance: textfield; }

/* ── Index page (login) ── */
body.page-index {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; padding: 2rem 1rem;
  padding-top: 2rem; padding-bottom: 2rem;
}
.index-logo {
  width: min(160px, 42vw);
  height: auto;
  object-fit: contain;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.3));
}
.tagline { color: var(--text-muted); font-size: 0.9rem; text-align: center; margin-bottom: 2rem; }
.card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.card h2 { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 0.75rem; width: 100%; padding: 0.875rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.95rem; font-weight: 600; cursor: pointer; margin-bottom: 1rem; }
.btn-google:hover { border-color: #444; }
.btn-google svg { width: 20px; height: 20px; flex-shrink: 0; }
.sep { display: flex; align-items: center; gap: 0.75rem; margin: 1rem 0; color: var(--text-muted); font-size: 0.8rem; }
.sep-line { flex: 1; height: 1px; background: var(--border); }
.btn-email { width: 100%; padding: 0.75rem; background: var(--accent); color: var(--bg); border: none; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 0.95rem; font-weight: 600; cursor: pointer; margin-bottom: 0.5rem; }
.btn-email:hover { filter: brightness(0.9); }
.btn-register { width: 100%; padding: 0.65rem; background: none; color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 0.85rem; cursor: pointer; margin-bottom: 0.5rem; }
.btn-register:hover { border-color: #444; }
.error { color: var(--danger); font-size: 0.82rem; text-align: center; margin-top: 0.5rem; min-height: 1.2rem; }
.loading { display: none; align-items: center; justify-content: center; gap: 0.75rem; color: var(--text-muted); font-size: 0.85rem; margin-top: 0.75rem; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .index-logo { width: 92px; margin-bottom: 0.4rem; }
  .tagline { font-size: 0.82rem; margin-bottom: 1.4rem; }
  .card { padding: 1.35rem; }
}

/* ── Saison classement rows ── */
.classement-row-saison { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border-2); }
.classement-row-saison:last-child { border-bottom: none; }
