/* =========================
   BASE
   ========================= */
*{
  box-sizing:border-box;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

html, body{
  max-width:100%;
}

body{
  margin:0;
  background:#f4f9fc;
  color:#0f172a;
}

/* Liens */
a{ color:inherit; }

/* =========================
   BOUTONS (globaux)
   ========================= */
.btn-primary{
  background:#2563eb;
  color:#fff;
  padding:12px 18px;
  border-radius:12px;
  text-decoration:none;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:2px solid transparent;
}
.btn-primary:hover{ background:#1d4ed8; }

.btn-outline{
  border:2px solid #2563eb;
  color:#2563eb;
  padding:10px 16px;
  border-radius:12px;
  text-decoration:none;
  font-weight:800;
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  cursor:pointer;
}
.btn-outline:hover{ background:#eff6ff; }
.btn-outline.small{ padding:8px 12px; border-radius:10px; }

.btn-clear{
  border:none;
  border-radius:10px;
  padding:12px 18px;
  background:#fee2e2;
  color:#991b1b;
  font-weight:900;
  cursor:pointer;
}
.btn-clear:hover{ background:#fecaca; }
.btn-clear:disabled{ opacity:0.6; cursor:not-allowed; }

/* Edit button */
.btn-edit{
  border:none;
  background:#fff;
  cursor:pointer;
  font-size:16px;
  width:36px;
  height:36px;
  border-radius:10px;
}
.btn-edit:hover{ background:#f1f5f9; }

/* =========================
   FORMULAIRES (uniquement dans form)
   ========================= */
form{ width:100%; }

form input,
form button{
  width:100%;
  padding:10px;
  margin:10px 0;
}

input{
  border:2px solid #cbd5e1;
  border-radius:10px;
  outline:none;
}
input:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 4px rgba(37,99,235,0.14);
}

#message{ margin-top:10px; font-weight:700; }

/* Barre force mdp */
#strength-bar{
  width:100%;
  height:8px;
  background:#ddd;
  border-radius:4px;
  margin-top:5px;
  overflow:hidden;
}
#strength-fill{
  height:100%;
  width:0%;
  background:#22c55e;
  border-radius:4px;
  transition:0.3s;
}

/* =========================
   AUTH (login/register)
   ========================= */
.auth-container{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:#f4f9fc;
}

.auth-card{
  width:100%;
  max-width:460px;
  background:#fff;
  border-radius:16px;
  padding:32px;
  box-shadow:0 20px 50px rgba(0,0,0,0.10);
}

.auth-card h2{
  text-align:center;
  margin:0 0 20px;
}

/* Champ mot de passe + oeil */
.password-wrapper{
  position:relative;
  margin-bottom:15px;
}
.password-wrapper input{
  width:100%;
  padding-right:45px;
  height:44px;
}
.password-wrapper .toggle-password{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  width:30px;
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:18px;
}

/* =========================
   NAVBAR + TABS (INDEX + PAGES)
   ========================= */
.navbar{
  background:#fff;
  border-bottom:1px solid #e2e8f0;
  padding:14px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.logo{
  font-weight:900;
  font-size:18px;
  display:flex;
  align-items:center;
  gap:10px;
}

.nav-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.nav-actions a,
.nav-actions button{
  width:auto !important;
  min-width:unset !important;
}

.tabs{
  background:#fff;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 18px;
  border-bottom:2px solid #2563eb;
  overflow-x:auto;
}

.tab{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  text-decoration:none;
  font-weight:900;
  color:#0f172a;
  border-radius:12px;
  white-space:nowrap;
}
.tab:hover{ background:#f1f5f9; }
.tab.active{ background:#2563eb; color:#fff; }

.tab-ic{
  font-size:16px;
  display:inline-flex;
  width:18px;
  height:18px;
  align-items:center;
  justify-content:center;
}

/* =========================
   INDEX HERO + RULES
   ========================= */
.hero{
  text-align:center;
  padding:80px 20px;
  background:linear-gradient(135deg,#2563eb,#22c55e);
  color:#fff;
  border-radius:0 0 28px 28px;
  display:flex;
  flex-direction:column;
  align-items:center;
}
.hero h1{ margin:0 0 10px; font-size:38px; }
.hero p{ margin:0; opacity:0.95; font-weight:600; }

#heroCtas{
  margin-top:20px;
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}

.rules{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px,1fr));
  gap:24px;
  padding:40px 22px;
  max-width:1200px;
  margin:0 auto;
}

.card{
  background:#fff;
  padding:24px;
  border-radius:16px;
  box-shadow:0 12px 30px rgba(0,0,0,0.08);
}
.card.blue{ background:#eff6ff; }
.card.green{ background:#ecfdf5; }

.footer{
  text-align:center;
  padding:24px 12px;
  color:#64748b;
}

.footer-links {
  margin-top: 6px;
  font-size: 14px;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  margin: 0 5px;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* =========================
   PRONOS / PAGES (container)
   ========================= */
.topbar{
  background:#fff;
  border-bottom:2px solid #2563eb;
  padding:14px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.topbar-left{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand-icon{ font-size:28px; line-height:1; }
.brand-title{ font-weight:900; font-size:20px; color:#0f172a; }
.brand-sub{ font-size:13px; color:#64748b; margin-top:2px; }

/* IMPORTANT: page reste full width, mais contenu centré via max-width sur les sections */
.page{
  padding:28px 16px 60px;
  background:linear-gradient(180deg,#eef6ff 0%,#f4f9fc 40%,#f4f9fc 100%);
  min-height:calc(100vh - 110px);
}

.page-head{
  max-width:1050px;
  margin:0 auto 18px;
}
.page-head h1{ margin:0 0 8px; font-size:36px; color:#0f172a; }
.page-head p{ margin:0; color:#64748b; }

/* =========================
   MATCH CARDS
   ========================= */
.match-list{
  max-width:1050px;
  margin:0 auto;
  display:grid;
  gap:18px;
}

.match-card{
  background:#fff;
  border-radius:14px;
  box-shadow:0 14px 35px rgba(0,0,0,0.08);
  overflow:hidden;
  border-left:4px solid #2563eb;
}

.match-card-top{
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:18px 18px 14px;
}

.match-meta{ min-width:0; }

.match-phase{ color:#2563eb; font-weight:900; font-size:14px; }
.match-city{ margin-top:4px; color:#64748b; font-size:13px; }

.match-datetime{
  display:flex;
  gap:14px;
  align-items:center;
  color:#0f172a;
}

.dt{
  display:flex;
  gap:8px;
  align-items:center;
  color:#334155;
  font-size:13px;
}

.match-divider{ height:1px; background:#e5e7eb; }

.match-main{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:14px;
  padding:18px;
}

.team{
  display:flex;
  flex-direction:column;
  align-items:center;
}

.team-left{ align-items:flex-start; }
.team-right{ align-items:flex-end; }

.team-name{ margin-top:4px; font-weight:800; color:#0f172a; }
.team-name-big{ font-size:26px; font-weight:900; line-height:1.1; }

.score-box{
  display:flex;
  align-items:center;
  gap:12px;
}

.score-input{
  width:62px;
  height:56px;
  line-height:56px;
  border-radius:10px;
  border:2px solid #cbd5e1;
  background:#fff;
  font-size:20px;
  font-weight:900;
  text-align:center;
  color:#0f172a;
  padding:0;
  font-variant-numeric:tabular-nums;
}
.score-input:disabled{ opacity:0.6; background:#f1f5f9; }

.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.score-input{ appearance:textfield; }

.score-sep{ font-weight:900; font-size:22px; color:#64748b; }

.match-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:14px;
  padding:0 18px 18px;
}

.btn-save{
  border:none;
  border-radius:12px;
  padding:12px 18px;
  background:#e5e7eb;
  color:#475569;
  font-weight:900;
  cursor:pointer;
}
.btn-save:hover{ background:#dbeafe; color:#1d4ed8; }
.btn-save:disabled{ opacity:0.6; cursor:not-allowed; }

.save-note{ color:#64748b; font-size:13px; min-width:120px; text-align:right; }
.lock-note{ color:#ef4444; font-size:13px; font-weight:800; }

.loading,.error{
  background:#fff;
  border-radius:14px;
  padding:16px;
  box-shadow:0 14px 35px rgba(0,0,0,0.08);
}
.error{ border-left:4px solid #ef4444; }

/* =========================
   BADGES + PRONOS INFOS
   ========================= */
.badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
  border:1px solid transparent;
}
.badge-gold{ background:#fff7cc; color:#b45309; border-color:#fde68a; }
.badge-green{ background:#dcfce7; color:#166534; border-color:#86efac; }
.badge-red{ background:#fee2e2; color:#991b1b; border-color:#fecaca; }
.badge-gray{ background:#f1f5f9; color:#334155; border-color:#e2e8f0; }

.myline{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 18px 0;
  flex-wrap:wrap;
}
.muted{ color:#64748b; font-weight:800; }
.myprono{ font-weight:900; color:#0f172a; }

.score-display-big{
  font-size:26px;
  font-weight:1000;
  padding:0 18px;
  min-width:80px;
  text-align:center;
}

/* Coloration */
.result-exact{ border:2px solid #fbbf24; background:#fff7ed; }
.result-good{ border:2px solid #22c55e; background:#f0fdf4; }
.result-bad{ border:2px solid #ef4444; background:#fef2f2; }

/* =========================
   CLASSEMENT
   ========================= */
.podium-card{
  max-width:1050px;
  margin:0 auto 18px;
  background:#fff;
  border-radius:16px;
  box-shadow:0 14px 35px rgba(0,0,0,0.08);
  padding:26px 22px;
}

.podium-grid{
  display:grid;
  grid-template-columns:1fr 1.2fr 1fr;
  gap:18px;
  align-items:end;
}

.podium-grid.podium-one{ grid-template-columns:1fr; justify-items:center; }
.podium-grid.podium-two{ grid-template-columns:1fr 1.2fr; justify-items:center; }

.podium-item{ text-align:center; padding:10px 8px; }
.podium-item.empty{ opacity:0.25; }

.podium-medal{ font-size:40px; margin-bottom:10px; }
.podium-name{ font-weight:900; color:#0f172a; font-size:18px; }
.podium-points-num{ font-size:38px; font-weight:1000; margin-top:10px; }
.podium-points-label{ font-size:12px; color:#64748b; margin-top:2px; }

.podium-block{
  border-radius:12px;
  margin-top:18px;
  height:110px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:34px;
  font-weight:1000;
  color:#0f172a;
}
.podium-item.r2 .podium-block{ background:#cbd5e1; }
.podium-item.r1 .podium-block{ background:#fbbf24; height:140px; }
.podium-item.r3 .podium-block{ background:#fb7a18; color:#fff; }

.podium-empty{ text-align:center; padding:22px 10px; }
.podium-empty-title{ font-weight:1000; font-size:18px; color:#0f172a; }
.podium-empty-sub{ margin-top:6px; color:#64748b; font-weight:700; }

.leaderboard-card{
  max-width:1050px;
  margin:0 auto;
  background:#fff;
  border-radius:16px;
  box-shadow:0 14px 35px rgba(0,0,0,0.08);
  overflow:hidden;
}

.leaderboard-header{
  background:linear-gradient(90deg,#2563eb,#22c55e);
  padding:14px 18px;
  color:#fff;
  font-weight:1000;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.lb-title{ display:flex; align-items:center; gap:10px; }
.lb-ic{ font-size:18px; }

.lb-tools{ display:flex; gap:10px; align-items:center; }

.lb-search{
  border:none;
  outline:none;
  padding:10px 12px;
  border-radius:12px;
  width:240px;
  font-weight:800;
}

.lb-btn{
  border:none;
  padding:10px 12px;
  border-radius:12px;
  font-weight:1000;
  cursor:pointer;
  background:rgba(255,255,255,0.22);
  color:#fff;
}
.lb-btn:hover{ background:rgba(255,255,255,0.30); }

.leaderboard-table-wrap{ overflow-x:auto; }

.leaderboard-table{
  width:100%;
  border-collapse:collapse;
}

.leaderboard-table th,
.leaderboard-table td{
  padding:14px 12px;
  border-bottom:1px solid #e5e7eb;
  text-align:left;
  font-size:14px;
}

.leaderboard-table thead th{
  background:#f8fafc;
  color:#0f172a;
  font-weight:900;
}

.rank-badge{
  width:38px;
  height:38px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:1000;
  color:#0f172a;
  background:#e5e7eb;
}
.rank-badge.r1{ background:#fbbf24; }
.rank-badge.r2{ background:#cbd5e1; }
.rank-badge.r3{ background:#fb7a18; color:#fff; }

.player-name{ font-weight:1000; color:#0f172a; }

.player-tag{
  font-size:12px;
  font-weight:900;
  padding:4px 8px;
  border-radius:999px;
  background:#fff7ed;
  color:#f59e0b;
  border:1px solid #fed7aa;
}

.me-tag{
  font-size:12px;
  font-weight:1000;
  padding:4px 8px;
  border-radius:999px;
  background:#dbeafe;
  color:#1d4ed8;
  border:1px solid #bfdbfe;
}

.pts-cell{ font-weight:1000; color:#2563eb; font-size:18px; }

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-weight:900;
  font-size:13px;
}
.pill.green{ background:#dcfce7; color:#16a34a; }
.pill.purple{ background:#f3e8ff; color:#7c3aed; }

.prec-cell{ display:flex; align-items:center; gap:10px; }

.prec-bar{
  width:110px;
  height:10px;
  background:#e5e7eb;
  border-radius:999px;
  overflow:hidden;
}
.prec-fill{
  height:100%;
  background:#22c55e;
  border-radius:999px;
}
.prec-txt{ font-weight:900; color:#0f172a; }

.me-row{ background:#eff6ff; }
.me-flash{ animation: meflash 0.9s ease; }
@keyframes meflash{
  0%{ box-shadow: inset 0 0 0 9999px rgba(37,99,235,0.18); }
  100%{ box-shadow: inset 0 0 0 9999px rgba(37,99,235,0); }
}

/* =========================
   MODAL
   ========================= */
.modal{ position:fixed; inset:0; z-index:9999; display:none; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(15,23,42,0.45); }
.modal-card{
  position:relative;
  max-width:520px;
  width:calc(100% - 24px);
  margin:80px auto;
  background:#fff;
  border-radius:16px;
  padding:18px;
  box-shadow:0 20px 60px rgba(0,0,0,0.2);
}
.modal-card h3{ margin:0 0 12px; }
.modal-card label{
  display:block;
  margin-top:10px;
  font-weight:900;
  font-size:13px;
  color:#0f172a;
}
.modal-card input{
  width:100%;
  height:44px;
  border-radius:10px;
  border:2px solid #cbd5e1;
  padding:0 12px;
}
.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:14px;
}

/* =========================
   LIVE DOT + HISTORY
   ========================= */
.live-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:#94a3b8;
  display:inline-block;
}
.live-dot.on{
  background:#22c55e;
  box-shadow:0 0 0 6px rgba(34,197,94,0.18);
}

.history-wrap{ padding:12px 14px; }
.history-list{ display:flex; flex-direction:column; gap:10px; }

.history-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:12px;
}
.history-when{
  color:#64748b;
  font-weight:900;
  font-size:12px;
  white-space:nowrap;
}
.history-body{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.history-pill{
  font-weight:1000;
  padding:6px 10px;
  border-radius:999px;
  background:#f1f5f9;
  color:#0f172a;
}
.history-match{ color:#334155; font-weight:900; }

/* =========================
   PROFIL - AVATAR UPLOAD
   ========================= */
.avatar-wrap{
  display:flex;
  align-items:center;
  gap:20px;
  flex-wrap:wrap;
  margin:14px 0 18px;
}

.avatar-preview{
  width:90px;
  height:90px;
  border-radius:999px;
  object-fit:cover;
  border:3px solid #e2e8f0;
  background:#fff;
  box-shadow:0 8px 20px rgba(0,0,0,0.08);
  transition:all 0.3s ease;
}
.avatar-preview:hover{ transform:scale(1.05); }

.avatar-upload{ flex:1; min-width:220px; }

.avatar-upload input[type="file"]{
  width:100%;
  padding:12px;
  border-radius:12px;
  border:2px dashed #cbd5e1;
  background:#f8fafc;
  cursor:pointer;
  font-weight:700;
}
.avatar-upload input[type="file"]:hover{
  border-color:#2563eb;
  background:#eef6ff;
}

.avatar-note{
  margin-top:6px;
  font-size:13px;
  color:#64748b;
  font-weight:600;
}

/* ===== AVATAR SYSTEM (unique) ===== */
.avatar{
  width:44px;
  height:44px;
  border-radius:999px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  font-size:18px;
  background:#e2e8f0;
  flex:0 0 auto;
}
.avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.avatar-fallback{
  background:#2563eb;
  color:#fff;
}

/* podium borders */
.avatar-gold{ border:3px solid #fbbf24; }
.avatar-silver{ border:3px solid #cbd5e1; }
.avatar-bronze{ border:3px solid #fb923c; }

/* Avatar "connecté" */
.avatar-green{
  border:3px solid #22c55e !important;
  background:#2563eb;
}

.player-cell{
  display:flex;
  align-items:center;
  gap:10px;
}

.player-info{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.player-sub{
  font-size:12px;
  font-weight:800;
  color:#64748b;
}

/* ===== NAVBAR PROFILE CHIP (unique) ===== */
.nav-profile{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.nav-profile-txt{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.nav-profile-name{
  font-weight:900;
  color:#0f172a;
  font-size:14px;
  white-space:nowrap;
}

.nav-profile-sub{
  font-size:12px;
  font-weight:800;
  color:#64748b;
}

/* Navbar avatar */
.nav-avatar{
  width:36px !important;
  height:36px !important;
  min-width:36px !important;
  min-height:36px !important;
  max-width:36px !important;
  max-height:36px !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  border-radius:999px !important;
  overflow:hidden !important;

  padding:0 !important;
  line-height:0 !important;
  flex:0 0 36px !important;

  background:#e2e8f0;
  text-decoration:none;
  transition:transform 0.2s ease;
}
.nav-avatar:hover{ transform:scale(1.08); }
.nav-avatar.online{ border:3px solid #22c55e; }

.nav-avatar img,
.nav-avatar-img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}

.nav-avatar-fallback{ font-weight:900; color:#0f172a; }

@media (max-width: 720px){
  .navbar{ flex-direction:column; align-items:flex-start; }
  .nav-actions{ width:100%; justify-content:flex-start; }
  .hero h1{ font-size:28px; }
  .nav-profile{ width:100%; justify-content:flex-start; }
}

/* =========================
   Switch Résultats / Classements
   ========================= */
.view-switch{
  margin-top:14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.vs-btn{
  border:2px solid #2563eb;
  background:#fff;
  color:#2563eb;
  padding:10px 14px;
  border-radius:12px;
  font-weight:900;
  cursor:pointer;
}
.vs-btn.active{ background:#2563eb; color:#fff; }

/* =========================
   Classements par groupe
   ========================= */
.standings-card{
  max-width:1050px;
  margin:0 auto 18px;
  background:#fff;
  border-radius:16px;
  box-shadow:0 14px 35px rgba(0,0,0,0.08);
  overflow:hidden;
}

.standings-head{
  padding:14px 18px;
  background:linear-gradient(90deg,#2563eb,#22c55e);
  color:#fff;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.standings-title{ font-weight:1000; }
.standings-sub{ opacity:0.9; font-weight:800; font-size:12px; }

.standings-table-wrap{ overflow-x:auto; }
.standings-table{ width:100%; border-collapse:collapse; }

.standings-table th,
.standings-table td{
  padding:12px 10px;
  border-bottom:1px solid #e5e7eb;
  text-align:left;
  font-size:14px;
}
.standings-table thead th{
  background:#f8fafc;
  font-weight:900;
  color:#0f172a;
}

.st-rank{ font-weight:1000; width:36px; }
.st-team{ font-weight:900; }
.st-gd{ font-weight:900; color:#334155; }
.st-pts{ font-weight:1000; color:#2563eb; }

.standings-empty{
  max-width:1050px;
  margin:0 auto;
  background:#fff;
  border-radius:16px;
  box-shadow:0 14px 35px rgba(0,0,0,0.08);
  padding:22px;
}

/* =========================
   Cotes
   ========================= */
.odds-row{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  margin:10px 0 2px;
  flex-wrap:wrap;
}

.odd-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.45);
  background:rgba(248,250,252,.75);
  font-weight:800;
  line-height:1;
  position:relative;
  transition:all 0.2s ease;
}

.odd-k{ opacity:.75; font-size:12px; }
.odd-v{ font-size:13px; }

@media (max-width: 520px){
  .odd-pill{ padding:6px 9px; }
}

.odd-pill.odd-fav{
  border-color: rgba(34,197,94,.7);
  background: rgba(34,197,94,.12);
  box-shadow: 0 0 8px rgba(34,197,94,.25);
}
.odd-pill.odd-fav .odd-v{
  color: rgb(22,163,74);
  font-weight:700;
}
.odd-star{ font-size:12px; margin-left:6px; opacity:0.9; }

/* =========================
   BRACKET (PHASES FINALES) - UNIQUE
   ========================= */

/* scroll uniquement sur le bracket */
.bracket-scroll{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  padding:6px 0 12px;
}

/* si ça tient : centré, sinon scroll */
.bracket-grid{
  display:flex;
  gap:18px;
  align-items:flex-start;
  width:max-content;
  margin:0 auto;
  padding:0 12px;
}

.bracket-col{
  width:320px;
  flex:0 0 320px;
}

.bracket-col-title{
  font-weight:900;
  margin:0 0 10px;
  font-size:14px;
  color:#0f172a;
  opacity:.9;
}

.bracket-match{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:10px;
  box-shadow:0 6px 18px rgba(2,6,23,.06);
  margin-bottom:12px;
}

.bracket-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:10px;
  margin-bottom:10px;
}

.bracket-meta{
  font-size:12px;
  color:#64748b;
  line-height:1.2;
}

.bracket-fifa{
  font-size:12px;
  color:#94a3b8;
  font-weight:900;
  white-space:nowrap;
}

/* IMPORTANT : équipe - score - équipe sans wrap */
.bracket-row{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  gap:10px;
  align-items:center;
}

.bracket-team{
  font-weight:900;
  font-size:13px;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.bracket-team.right{ text-align:right; }

.bracket-scorebox{
  display:flex;
  align-items:center;
  gap:8px;
}

.bracket-score{
  width:54px;
  height:42px;
  border-radius:10px;
  border:2px solid #cbd5e1;
  text-align:center;
  font-weight:1000;
  font-size:18px;
  padding:0;
  background:#fff;
}

.bracket-score:disabled{
  opacity:.65;
  background:#f1f5f9;
}

.bracket-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:10px;
}

.bracket-note{
  font-size:12px;
  color:#64748b;
}

@media (max-width: 720px){
  .match-main{ grid-template-columns:1fr; text-align:center; }
  .team-left, .team-right{ align-items:center; }
  .match-actions{ justify-content:center; }
  .save-note{ text-align:center; min-width:unset; }
  .bracket-grid{ margin:0; } /* scroll mode */
}

@media (max-width: 768px) {
  /* Topbar */
  .topbar{
    padding:12px 14px;
    align-items:flex-start;
    gap:12px;
    flex-wrap:wrap;
  }

  .topbar-left{
    min-width:0;
    flex:1 1 100%;
  }

  .topbar-right{
    width:100%;
    display:flex;
    justify-content:flex-start;
  }

  .brand-title{
    font-size:16px;
    line-height:1.15;
  }

  .brand-sub{
    font-size:12px;
  }

  /* Onglets */
  .tabs{
    padding:10px 12px;
    gap:8px;
  }

  .tab{
    padding:10px 12px;
    font-size:15px;
  }

  /* Pages */
  .page{
    padding:22px 12px 56px;
  }

  .page-head h1{
    font-size:28px;
    line-height:1.1;
  }

  /* Cartes match */
  .match-card-top{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }

  .match-datetime{
    width:100%;
    justify-content:flex-start;
    flex-wrap:wrap;
    gap:10px;
  }

  .match-main{
    grid-template-columns:1fr;
    gap:16px;
    padding:16px;
    text-align:center;
  }

  .team-left,
  .team-right,
  .team{
    align-items:center;
  }

  .team-name-big{
    font-size:24px;
  }

  .score-box{
    justify-content:center;
  }

  .score-input{
    width:72px;
    height:58px;
    line-height:58px;
    font-size:22px;
  }

  .match-actions{
    justify-content:center;
    flex-wrap:wrap;
    gap:10px;
    padding:0 16px 16px;
  }

  .save-note{
    min-width:0;
    text-align:center;
    width:100%;
  }

  .myline{
    justify-content:center;
  }

  /* Résultats / classement */
  .leaderboard-header{
    align-items:flex-start;
  }

  .lb-tools{
    width:100%;
    justify-content:flex-start;
    flex-wrap:wrap;
  }

  .leaderboard-table th,
  .leaderboard-table td{
    padding:12px 8px;
    font-size:13px;
  }

  .prec-bar{
    width:72px;
  }

  /* Footer */
  .footer{
    padding:20px 12px 34px;
  }
}

@media (max-width: 480px) {
  .brand-title{
    font-size:15px;
  }

  .page-head h1{
    font-size:24px;
  }

  .match-phase{
    font-size:13px;
  }

  .match-city,
  .dt{
    font-size:12px;
  }

  .team-name-big{
    font-size:21px;
  }

  .score-input{
    width:64px;
    height:54px;
    line-height:54px;
    font-size:20px;
  }

  .btn-primary,
  .btn-outline{
    padding:10px 14px;
  }
}

/* =========================
   IPHONE TUNING
   ========================= */
@media screen and (max-width: 430px) {
  body{
    -webkit-text-size-adjust: 100%;
  }

  .topbar{
    padding: 10px 12px;
    gap: 10px;
  }

  .topbar-left{
    align-items: flex-start;
  }

  .brand-icon{
    font-size: 24px;
  }

  .brand-title{
    font-size: 15px;
  }

  .brand-sub{
    font-size: 11px;
  }

  .nav-profile{
    gap: 8px;
    width: 100%;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .nav-profile-txt{
    min-width: 0;
  }

  .nav-profile-name{
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 110px;
  }

  .nav-avatar{
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    flex: 0 0 34px !important;
  }

  .tabs{
    padding: 8px 10px;
    gap: 6px;
  }

  .tab{
    padding: 9px 10px;
    font-size: 13px;
    gap: 8px;
    border-radius: 10px;
  }

  .tab-ic{
    font-size: 14px;
    width: 16px;
    height: 16px;
  }

  .page{
    padding: 18px 10px 48px;
  }

  .page-head{
    margin-bottom: 14px;
  }

  .page-head h1{
    font-size: 22px;
  }

  .page-head p{
    font-size: 13px;
  }

  .match-card{
    border-radius: 12px;
  }

  .match-card-top{
    padding: 14px 14px 10px;
  }

  .match-main{
    padding: 14px;
    gap: 12px;
  }

  .team-name{
    font-size: 13px;
  }

  .team-name-big{
    font-size: 19px;
  }

  .score-box{
    gap: 10px;
  }

  .score-input{
    width: 56px;
    height: 50px;
    line-height: 50px;
    font-size: 19px;
    border-radius: 9px;
  }

  .score-sep{
    font-size: 18px;
  }

  .myline{
    gap: 8px;
    padding: 8px 14px 0;
  }

  .badge{
    font-size: 11px;
    padding: 5px 8px;
  }

  .match-actions{
    padding: 0 14px 14px;
  }

  .btn-primary,
  .btn-outline,
  .btn-save{
    min-height: 42px;
  }

  .leaderboard-header{
    padding: 12px 14px;
  }

  .lb-title{
    font-size: 15px;
  }

  .leaderboard-table th,
  .leaderboard-table td{
    font-size: 12px;
    padding: 10px 7px;
  }

  .rank-badge{
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .avatar{
    width: 38px;
    height: 38px;
  }

  .footer{
    padding-left: 10px;
    padding-right: 10px;
  }

  .footer-links{
    line-height: 1.6;
  }
}

/* iPhone avec encoche / safe area */
@supports (padding: max(0px)) {
  @media screen and (max-width: 430px) {
    body{
      padding-bottom: env(safe-area-inset-bottom);
    }

    .topbar{
      padding-top: max(10px, env(safe-area-inset-top));
    }

    .footer{
      padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
  }
}

@media (max-width: 768px) {
  #resultsList{
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  #resultsList > * {
    margin-bottom: 22px !important;
  }

  #resultsList > *:last-child {
    margin-bottom: 0 !important;
  }
}

.forgot-password {
  margin-top: 10px;
  text-align: center;
}

.forgot-password a {
  color: #3b82f6;
  text-decoration: none;
  font-size: 14px;
}

.forgot-password a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .podium-item{
    min-width: 0;
    overflow: hidden;
  }

  .podium-name{
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .podium-grid{
    gap: 10px;
  }

  .podium-item{
    min-width: 0;
    padding: 8px 4px;
  }

  .podium-name{
    font-size: 14px;
    max-width: 90px;
    margin: 0 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .podium-points-num{
    font-size: 28px;
  }

  .podium-block{
    font-size: 28px;
  }
}

@media (max-width: 768px) {

  .table td:nth-child(2),
  .table th:nth-child(2){
    max-width: 120px;
  }

  .player{
    min-width: 0;
    overflow: hidden;
  }

  .player-name{
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

}

@media (max-width: 480px) {

  .table{
    font-size: 12px;
  }

  .table td,
  .table th{
    padding: 6px 4px;
  }

  .player-name{
    max-width: 90px;
  }

}

@media (max-width: 768px) {
  .podium-card{
    overflow: hidden;
  }

  .podium-grid{
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: end;
  }

  .podium-item{
    min-width: 0;
    overflow: hidden;
    padding: 8px 4px;
  }

  .podium-item .podium-identity{
    min-width: 0;
  }

  .podium-name,
  .podium-sub{
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .podium-name{
    font-size: 14px;
    margin-top: 6px;
  }

  .podium-sub{
    font-size: 11px;
  }

  .podium-points-num{
    font-size: 24px;
  }

  .podium-points-label{
    font-size: 11px;
  }

  .podium-block{
    width: 100%;
    min-width: 0;
    height: 92px;
    font-size: 28px;
    margin-top: 12px;
  }

  .podium-item.r1 .podium-block{
    height: 112px;
  }

  .avatar{
    width: 46px !important;
    height: 46px !important;
  }
}

@media (max-width: 480px) {
  .podium-card{
    padding: 18px 12px;
  }

  .podium-grid{
    gap: 8px;
  }

  .podium-name{
    font-size: 13px;
  }

  .podium-sub{
    font-size: 10px;
  }

  .podium-points-num{
    font-size: 20px;
  }

  .podium-block{
    height: 80px;
    font-size: 24px;
  }

  .podium-item.r1 .podium-block{
    height: 100px;
  }

  .avatar{
    width: 40px !important;
    height: 40px !important;
  }
}

/* ===== BRACKET: couleurs résultat (doit être APRÈS .bracket-match) ===== */
.bracket-match.result-exact{
  border:2px solid #fbbf24 !important;
  background:#fff7ed !important;
}
.bracket-match.result-good{
  border:2px solid #22c55e !important;
  background:#f0fdf4 !important;
}
.bracket-match.result-bad{
  border:2px solid #ef4444 !important;
  background:#fef2f2 !important;
}

/* ===== BRACKET: container plein écran, pas limité à 1050px ===== */
.match-list.bracket-mode{
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  display: block !important;
}

/* Le scroll horizontal doit être ici (et seulement ici) */
.bracket-scroll{
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 0 12px;
}

/* La grille prend la largeur nécessaire */
.bracket-grid{
  width: max-content;
  margin: 0 auto;
}

/* ===== FIX podium cassé (bloc jaune tout fin) ===== */

/* 1) On annule le display:flex sur .podium-item (sinon la largeur se casse) */
.podium-item{
  display:block !important;
  text-align:center;
}

/* 2) On force le podium-block à prendre une vraie largeur */
.podium-block{
  width:100% !important;
  max-width:360px;
  margin-left:auto;
  margin-right:auto;
}

/* 3) On centre seulement l'identité (médaille/avatar/nom) */
.podium-identity{
  display:flex;
  flex-direction:column;
  align-items:center !important;
  justify-content:center;
  text-align:center;
}

/* 4) Avatar fixé proprement (évite tout décalage) */
.podium-identity .avatar{
  width:58px !important;
  height:58px !important;
  flex:0 0 58px !important;
  border-radius:999px !important;
  overflow:hidden !important;
  margin:0 auto !important;
}

.podium-identity .avatar img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}

@media (max-width: 768px) {

  .podium-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .podium-item {
    min-width: 0 !important;
    overflow: hidden;
  }

  .podium-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .podium-block {
    width: 100% !important;   /* 🔥 IMPORTANT */
    max-width: 100% !important;
    min-width: 0 !important;
  }

}

.podium-card {
  overflow: hidden;
}

/* Espacement cartes résultats - desktop + mobile */
#resultsList{
  display:flex;
  flex-direction:column;
  gap:18px;
}

#resultsList > *{
  margin:0 !important;
}

@media (min-width: 769px){
  #resultsList{
    gap:22px;
  }
}
