/* =========================
   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;
  }
}

/* =========================
   CLASSEMENT / LIGUES
   ========================= */

.page-head-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.page-head-btn,
.head-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}

.page-head-btn:hover,
.head-link-btn:hover {
  transform: translateY(-1px);
  opacity: .96;
}

.page-head-btn.secondary,
.head-link-btn.secondary {
  background: linear-gradient(135deg, #2f6fed, #6c63ff);
}

.league-switcher-wrap {
  margin-top: 14px;
}

.league-switcher-label {
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
}

.league-switcher-select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d0d7de;
  min-width: 240px;
  max-width: 100%;
  background: #fff;
  font-size: 1rem;
  outline: none;
}

.league-switcher-select:focus {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

/* =========================
   PAGE LIGUES
   ========================= */

.league-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.league-card {
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.league-card h2 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
}

.league-card p {
  margin: 0 0 14px 0;
  color: #667085;
}

.league-form {
  display: grid;
  gap: 12px;
}

.league-input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d0d7de;
  border-radius: 14px;
  font-size: 1rem;
  outline: none;
  background: #fff;
  box-sizing: border-box;
}

.league-input:focus {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.league-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #2f6fed, #6c63ff);
  color: #fff;
  transition: transform .12s ease, opacity .12s ease;
}

.league-btn:hover {
  transform: translateY(-1px);
  opacity: .96;
}

.league-btn.secondary {
  background: #111827;
}

.league-msg {
  min-height: 22px;
  font-weight: 700;
  font-size: 0.95rem;
}

.league-msg.success {
  color: #157347;
}

.league-msg.error {
  color: #c62828;
}

.league-list {
  display: grid;
  gap: 12px;
}

.league-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e7eaf0;
  border-radius: 18px;
  background: #fafbfd;
}

.league-left {
  min-width: 0;
}

.league-name {
  font-weight: 900;
  font-size: 1rem;
  color: #101828;
  margin-bottom: 4px;
}

.league-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #667085;
  font-size: 0.92rem;
}

.league-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3949ab;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.league-empty {
  color: #667085;
  font-weight: 700;
  padding: 8px 0;
}

.league-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.league-small-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  background: #111827;
  color: #fff;
  transition: transform .12s ease, opacity .12s ease;
}

.league-small-btn:hover {
  transform: translateY(-1px);
  opacity: .96;
}

.league-small-btn.copy {
  background: #2f6fed;
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 900px) {
  .league-switcher-select {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .page-head-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-head-btn,
  .head-link-btn {
    width: 100%;
  }

  .league-card {
    padding: 16px;
    border-radius: 18px;
  }

  .league-item {
    flex-direction: column;
    align-items: stretch;
  }

  .league-actions {
    width: 100%;
    flex-direction: column;
  }

  .league-small-btn,
  .league-btn {
    width: 100%;
  }

  .league-meta {
    flex-direction: column;
    gap: 6px;
  }

  .league-code {
    width: fit-content;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .page-head h1 {
    font-size: 1.6rem;
    line-height: 1.15;
  }

  .page-head p {
    font-size: 0.98rem;
  }

  .league-switcher-label {
    font-size: 0.95rem;
  }

  .league-switcher-select,
  .league-input,
  .league-btn,
  .league-small-btn,
  .page-head-btn,
  .head-link-btn {
    font-size: 0.96rem;
  }

  .league-name {
    font-size: 0.98rem;
  }

  .league-meta {
    font-size: 0.9rem;
  }
}

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

  .leaderboard-header {
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .lb-tools {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .lb-btn {
    width: 100%;
  }

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

  .leaderboard-table {
    min-width: 760px;
  }

  .podium-grid {
    gap: 10px;
  }
}

/* =========================
   LIGUES / GESTION LIGUE
   ========================= */

.page-head-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.page-head-btn,
.head-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}

.page-head-btn:hover,
.head-link-btn:hover {
  transform: translateY(-1px);
  opacity: .96;
}

.page-head-btn.secondary,
.head-link-btn.secondary {
  background: linear-gradient(135deg, #2f6fed, #6c63ff);
}

.league-switcher-wrap {
  margin-top: 14px;
}

.league-switcher-label {
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
}

.league-switcher-select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d0d7de;
  min-width: 240px;
  max-width: 100%;
  background: #fff;
  font-size: 1rem;
  outline: none;
}

.league-switcher-select:focus {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.league-badge-wrap {
  margin-top: 12px;
}

.league-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3949ab;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.league-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.league-card {
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.league-card h2 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
}

.league-card p {
  margin: 0 0 14px 0;
  color: #667085;
}

.league-form {
  display: grid;
  gap: 12px;
}

.league-input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d0d7de;
  border-radius: 14px;
  font-size: 1rem;
  outline: none;
  background: #fff;
  box-sizing: border-box;
}

.league-input:focus {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.league-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #2f6fed, #6c63ff);
  color: #fff;
  transition: transform .12s ease, opacity .12s ease;
}

.league-btn:hover {
  transform: translateY(-1px);
  opacity: .96;
}

.league-btn.secondary {
  background: #111827;
}

.league-btn.danger,
.league-small-btn.danger {
  background: #c62828;
}

.league-msg {
  min-height: 22px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 10px;
}

.league-msg.success {
  color: #157347;
}

.league-msg.error {
  color: #c62828;
}

.league-list {
  display: grid;
  gap: 12px;
}

.league-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e7eaf0;
  border-radius: 18px;
  background: #fafbfd;
}

.league-left {
  min-width: 0;
}

.league-name {
  font-weight: 900;
  font-size: 1rem;
  color: #101828;
  margin-bottom: 4px;
}

.league-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #667085;
  font-size: 0.92rem;
}

.league-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3949ab;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.league-empty {
  color: #667085;
  font-weight: 700;
  padding: 8px 0;
}

.league-actions,
.league-owner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.league-small-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  background: #111827;
  color: #fff;
  transition: transform .12s ease, opacity .12s ease;
}

.league-small-btn:hover {
  transform: translateY(-1px);
  opacity: .96;
}

.league-small-btn.copy {
  background: #2f6fed;
}

.league-info-stack {
  display: grid;
  gap: 12px;
}

.league-info-line {
  display: grid;
  gap: 6px;
}

.league-info-label {
  font-size: 0.92rem;
  font-weight: 800;
  color: #667085;
}

.league-info-value {
  font-size: 1.05rem;
  font-weight: 900;
  color: #111827;
  word-break: break-word;
}

.members-list {
  display: grid;
  gap: 12px;
}

.member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e7eaf0;
  border-radius: 18px;
  background: #fafbfd;
}

.member-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.member-avatar-wrap {
  flex: 0 0 auto;
}

.member-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.member-avatar-fallback {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.member-info {
  min-width: 0;
}

.member-name {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-weight: 900;
  color: #111827;
}

.member-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.member-badge.owner {
  background: #fff3cd;
  color: #8a6d3b;
}

.member-badge.me {
  background: #e8f5e9;
  color: #157347;
}

.member-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .league-switcher-select {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .page-head-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-head-btn,
  .head-link-btn {
    width: 100%;
  }

  .league-card {
    padding: 16px;
    border-radius: 18px;
  }

  .league-item,
  .member-item {
    flex-direction: column;
    align-items: stretch;
  }

  .league-actions,
  .league-owner-actions,
  .member-actions {
    width: 100%;
    flex-direction: column;
  }

  .league-small-btn,
  .league-btn {
    width: 100%;
  }

  .league-meta {
    flex-direction: column;
    gap: 6px;
  }

  .league-code {
    width: fit-content;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .page-head h1 {
    font-size: 1.6rem;
    line-height: 1.15;
  }

  .page-head p {
    font-size: 0.98rem;
  }

  .league-switcher-label {
    font-size: 0.95rem;
  }

  .league-switcher-select,
  .league-input,
  .league-btn,
  .league-small-btn,
  .page-head-btn,
  .head-link-btn {
    font-size: 0.96rem;
  }

  .league-name {
    font-size: 0.98rem;
  }

  .league-meta {
    font-size: 0.9rem;
  }
}

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

  .leaderboard-header {
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .lb-tools {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .lb-btn {
    width: 100%;
  }

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

  .leaderboard-table {
    min-width: 760px;
  }

  .podium-grid {
    gap: 10px;
  }
}

/* =========================
   LIGUES / GESTION LIGUE
   ========================= */

.page-head-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.page-head-btn,
.head-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}

.page-head-btn:hover,
.head-link-btn:hover {
  transform: translateY(-1px);
  opacity: .96;
}

.page-head-btn.secondary,
.head-link-btn.secondary {
  background: linear-gradient(135deg, #2f6fed, #6c63ff);
}

.league-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.league-card {
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.league-card h2 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
}

.league-card p {
  margin: 0 0 14px 0;
  color: #667085;
}

.league-form {
  display: grid;
  gap: 12px;
}

.league-input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d0d7de;
  border-radius: 14px;
  font-size: 1rem;
  outline: none;
  background: #fff;
  box-sizing: border-box;
}

.league-input:focus {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.league-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #2f6fed, #6c63ff);
  color: #fff;
  transition: transform .12s ease, opacity .12s ease;
}

.league-btn:hover {
  transform: translateY(-1px);
  opacity: .96;
}

.league-btn.secondary {
  background: #111827;
}

.league-btn.danger,
.league-small-btn.danger {
  background: #c62828;
}

.league-msg {
  min-height: 22px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 10px;
}

.league-msg.success {
  color: #157347;
}

.league-msg.error {
  color: #c62828;
}

.league-list {
  display: grid;
  gap: 12px;
}

.league-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e7eaf0;
  border-radius: 18px;
  background: #fafbfd;
}

.league-left {
  min-width: 0;
}

.league-name-link {
  text-decoration: none;
  color: inherit;
}

.league-name-link:hover .league-name {
  opacity: .9;
}

.league-name {
  font-weight: 900;
  font-size: 1rem;
  color: #101828;
  margin-bottom: 4px;
}

.league-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #667085;
  font-size: 0.92rem;
}

.league-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3949ab;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.league-empty {
  color: #667085;
  font-weight: 700;
  padding: 8px 0;
}

.league-actions,
.league-owner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.league-small-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  background: #111827;
  color: #fff;
  transition: transform .12s ease, opacity .12s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.league-small-btn:hover {
  transform: translateY(-1px);
  opacity: .96;
  text-decoration: none;
}

.league-small-btn.manage {
  background: #2f6fed;
}

.league-small-btn.copy {
  background: #2f6fed;
}

.league-small-btn.copy-link {
  background: #5b5ce6;
}

.league-info-stack {
  display: grid;
  gap: 12px;
}

.league-info-line {
  display: grid;
  gap: 6px;
}

.league-info-label {
  font-size: 0.92rem;
  font-weight: 800;
  color: #667085;
}

.league-info-value {
  font-size: 1.05rem;
  font-weight: 900;
  color: #111827;
  word-break: break-word;
}

.members-list {
  display: grid;
  gap: 12px;
}

.member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e7eaf0;
  border-radius: 18px;
  background: #fafbfd;
}

.member-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.member-avatar-wrap {
  flex: 0 0 auto;
}

.member-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.member-avatar-fallback {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.member-info {
  min-width: 0;
}

.member-name {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-weight: 900;
  color: #111827;
}

.member-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.member-badge.owner {
  background: #fff3cd;
  color: #8a6d3b;
}

.member-badge.me {
  background: #e8f5e9;
  color: #157347;
}

.member-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .page-head-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-head-btn,
  .head-link-btn {
    width: 100%;
  }

  .league-card {
    padding: 16px;
    border-radius: 18px;
  }

  .league-item,
  .member-item {
    flex-direction: column;
    align-items: stretch;
  }

  .league-actions,
  .league-owner-actions,
  .member-actions {
    width: 100%;
    flex-direction: column;
  }

  .league-small-btn,
  .league-btn {
    width: 100%;
  }

  .league-meta {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .page-head h1 {
    font-size: 1.6rem;
    line-height: 1.15;
  }

  .page-head p {
    font-size: 0.98rem;
  }

  .league-input,
  .league-btn,
  .league-small-btn,
  .page-head-btn,
  .head-link-btn {
    font-size: 0.96rem;
  }

  .league-name {
    font-size: 0.98rem;
  }

  .league-meta {
    font-size: 0.9rem;
  }
}

.member-badge.owner {
  background: #fff3cd;
  color: #b7791f;
  font-weight: 900;
  font-size: 0.9rem;
  padding: 6px 10px;
}

.league-meta span:last-child {
  font-weight: 700;
  color: #475569;
}

.member-badge.owner{
  min-width: 40px;
  justify-content: center;
  font-size: 0.95rem;
  padding: 4px 10px;
}

.league-topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  flex-wrap:wrap;
}

.league-topbar-left{
  min-width:0;
  flex:1 1 420px;
}

.league-topbar-actions{
  margin-top:0;
  flex:0 0 auto;
  justify-content:flex-end;
}

@media (max-width: 720px){
  .league-topbar{
    flex-direction:column;
    align-items:stretch;
  }

  .league-topbar-actions{
    width:100%;
    justify-content:stretch;
  }
}

.league-topbar{
  display:grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items:center;
  gap:20px;
}

.league-topbar-title{
  margin:0;
}

.league-topbar-subtitle{
  display:none;
}

.league-topbar-actions{
  margin-top:0;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.member-badge.owner{
  min-width:40px;
  justify-content:center;
  font-size:0.95rem;
  padding:4px 10px;
}

@media (max-width: 720px){
  .league-topbar{
    grid-template-columns: 1fr;
    align-items:start;
  }

  .league-topbar-actions{
    width:100%;
    justify-content:stretch;
  }
}

#ownerPanel .league-form,
#ownerPanel .league-owner-actions{
  width: 620px !important;
  max-width: 100% !important;
}

#ownerPanel .league-form .league-btn{
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

#ownerPanel .league-owner-actions{
  display: flex !important;
  gap: 12px !important;
}

#ownerPanel .league-owner-actions .league-btn{
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

@media (max-width: 720px){
  #ownerPanel .league-form,
  #ownerPanel .league-owner-actions{
    width: 100% !important;
  }

  #ownerPanel .league-owner-actions{
    flex-direction: column !important;
  }

  #ownerPanel .league-owner-actions .league-btn,
  #ownerPanel .league-form .league-btn{
    width: 100% !important;
  }
}

.danger-zone{
  margin-top:20px;
  padding:16px;
  border:2px dashed #ef4444;
  border-radius:16px;
  background:rgba(239,68,68,0.05);
}

.danger-zone-title{
  font-weight:800;
  color:#dc2626;
  margin-bottom:6px;
}

.danger-zone-text{
  font-size:0.9rem;
  color:#991b1b;
  margin-bottom:12px;
}

.league-danger-row{
  display:flex;
  justify-content:center;
  gap:14px;
  margin-top:16px;
}

.league-danger-row .league-btn{
  flex:1;
  max-width:220px;
}

/* bouton supprimer plus clean */
.league-btn.danger{
  background:#dc2626;
  transition:all 0.2s ease;
}

.league-btn.danger:hover{
  background:#b91c1c;
  transform:translateY(-1px);
}

/* petit texte discret */
.league-danger-hint{
  margin-top:8px;
  font-size:0.8rem;
  color:#64748b;
}

/* mobile */
@media (max-width: 720px){
  .league-danger-row{
    flex-direction:column;
  }
}

/* =========================
   LIGUE.HTML — centrage intérieur + animations
   ========================= */

.league-topbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:20px;
}

.league-topbar-title{
  margin:0;
  text-align:left;
}

.league-topbar-subtitle{
  display:none;
}

.league-topbar-actions{
  margin-top:0;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.league-card-inner{
  width:100%;
  max-width:720px;
  margin:0 auto;
  text-align:left;
}

.league-card-inner-wide{
  max-width:100%;
}

.league-actions-centered{
  justify-content:flex-start;
}

#ownerPanel .league-card-inner{
  max-width:720px;
}

#ownerPanel .league-form,
#ownerPanel .league-danger-row,
#ownerPanel .league-danger-hint,
#ownerPanel #ownerMessage{
  max-width:560px;
  margin-left:auto;
  margin-right:auto;
}

#ownerPanel .league-form .league-btn{
  width:100%;
  min-width:0;
}

.league-danger-row{
  display:flex;
  justify-content:center;
  gap:14px;
  margin-top:16px;
}

.league-danger-row .league-btn{
  flex:1;
  max-width:220px;
}

.league-danger-hint{
  margin-top:10px;
  font-size:.85rem;
  color:#64748b;
  text-align:center;
}

.member-badge.owner{
  min-width:40px;
  justify-content:center;
  font-size:.95rem;
  padding:4px 10px;
}

/* Animations */
.league-card{
  transition:transform .18s ease, box-shadow .18s ease;
}

.league-card:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 34px rgba(15,23,42,0.10);
}

.league-btn,
.league-small-btn,
.head-link-btn{
  transition:transform .16s ease, box-shadow .16s ease, opacity .16s ease, background .16s ease;
}

.league-btn:hover,
.league-small-btn:hover,
.head-link-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(15,23,42,0.12);
}

.league-btn.danger{
  background:#dc2626 !important;
}

.league-btn.danger:hover{
  background:#b91c1c !important;
}

.member-item{
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.member-item:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 20px rgba(15,23,42,0.08);
  background:#ffffff;
}

@media (max-width: 720px){
  .league-topbar{
    grid-template-columns:1fr;
    align-items:start;
  }

  .league-topbar-actions{
    width:100%;
    justify-content:stretch;
  }

  .league-card-inner,
  #ownerPanel .league-card-inner{
    max-width:none;
  }

  #ownerPanel .league-form,
  #ownerPanel .league-danger-row,
  #ownerPanel .league-danger-hint,
  #ownerPanel #ownerMessage{
    max-width:none;
  }

  .league-danger-row{
    flex-direction:column;
  }
}

.members-list{
  display:flex;
  justify-content:center;
}

.member-item{
  max-width:500px;
  width:100%;
  margin:0 auto;

  display:flex;
  justify-content:center;   /* 🔥 centre horizontal */
  align-items:center;
  text-align:center;
}

.member-left{
  display:flex;
  align-items:center;
  gap:12px;
  justify-content:center;
}

.member-info{
  text-align:left; /* garde le texte lisible */
}

.league-card-inner{
  width:100%;
  max-width:600px;
  margin:0 auto;
  text-align:center; /* 🔥 centre tout */
}

.league-info-line{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}

.league-actions-centered{
  justify-content:center;
}

.league-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.league-meta span:last-child{
  display:inline-flex;
  align-items:center;
  gap:6px;
  line-height:1;
}

.league-meta .league-owner-line{
  display:inline-flex;
  align-items:center;
  gap:6px;
  line-height:1;
}

/* =========================
   NAVBAR NOTIFICATIONS
   ========================= */

.nav-profile{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.nav-bell-wrap{
  position:relative;
  display:flex;
  align-items:center;
}

.nav-bell-btn{
  position:relative;
  width:38px !important;
  height:38px !important;
  min-width:38px !important;
  min-height:38px !important;
  border:none;
  background:#fff;
  border-radius:12px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 4px 12px rgba(15,23,42,0.08);
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.nav-bell-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,23,42,0.12);
  background:#f8fbff;
}

.nav-bell-ic{
  font-size:18px;
  line-height:1;
}

.notif-badge{
  position:absolute;
  top:-6px;
  right:-6px;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:11px;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 4px 10px rgba(239,68,68,0.35);
}

.notif-dropdown{
  position:absolute;
  top:46px;
  left:0;
  width:320px;
  max-width:min(92vw, 320px);
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:16px;
  box-shadow:0 20px 40px rgba(15,23,42,0.15);
  overflow:hidden;
  display:none;
  z-index:9999;
}

.notif-dropdown.open{
  display:block;
  animation:notifDropIn .16s ease;
}

@keyframes notifDropIn{
  from{ opacity:0; transform:translateY(6px); }
  to{ opacity:1; transform:translateY(0); }
}

.notif-dropdown-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border-bottom:1px solid #eef2f7;
  background:#f8fbff;
}

.notif-dropdown-title{
  font-weight:900;
  color:#0f172a;
}

.notif-mark-read-btn{
  border:none;
  background:transparent;
  color:#2563eb;
  font-weight:800;
  cursor:pointer;
  padding:0;
}

.notif-list{
  max-height:340px;
  overflow:auto;
}

.notif-item{
  padding:12px 14px;
  border-bottom:1px solid #f1f5f9;
  transition:background .14s ease;
}

.notif-item:hover{
  background:#f8fbff;
}

.notif-item.unread{
  background:#eef4ff;
}

.notif-item-title{
  font-weight:900;
  color:#0f172a;
  margin-bottom:4px;
}

.notif-item-body{
  color:#475569;
  font-size:14px;
  line-height:1.4;
}

.notif-item-date{
  margin-top:6px;
  color:#94a3b8;
  font-size:12px;
  font-weight:800;
}

.notif-empty{
  padding:18px 14px;
  text-align:center;
  color:#64748b;
  font-weight:700;
}

/* Petit fix esthétique ligues.html */
.league-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.league-owner-line{
  display:inline-flex;
  align-items:center;
  gap:6px;
  line-height:1;
}

@media (max-width: 720px){
  .notif-dropdown{
    left:auto;
    right:0;
  }
}

/* =========================
   NOTIFICATIONS NAVBAR FIX
   ========================= */

html, body{
  overflow-x: hidden;
}

.nav-profile{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-bell-wrap{
  position: relative;
  display: flex;
  align-items: center;
}

.nav-bell-btn{
  position: relative;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  border: none;
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15,23,42,0.08);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.nav-bell-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15,23,42,0.12);
  background: #f8fbff;
}

.nav-bell-ic{
  font-size: 18px;
  line-height: 1;
}

.notif-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(239,68,68,0.35);
}

.notif-dropdown{
  position: absolute;
  top: 46px;
  right: 0;
  left: auto;
  width: 320px;
  max-width: min(92vw, 320px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15,23,42,0.15);
  overflow: hidden;
  display: none;
  z-index: 9999;
}

.notif-dropdown.open{
  display: block;
  animation: notifDropIn .16s ease;
}

@keyframes notifDropIn{
  from{ opacity:0; transform:translateY(6px); }
  to{ opacity:1; transform:translateY(0); }
}

.notif-dropdown-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  background: #f8fbff;
}

.notif-dropdown-title{
  font-weight: 900;
  color: #0f172a;
}

.notif-mark-read-btn{
  border: none;
  background: transparent;
  color: #2563eb;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.notif-list{
  max-height: 340px;
  overflow: auto;
}

.notif-item{
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  transition: background .14s ease;
}

.notif-item:hover{
  background: #f8fbff;
}

.notif-item.unread{
  background: #eef4ff;
}

.notif-item-title{
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 4px;
}

.notif-item-body{
  color: #475569;
  font-size: 14px;
  line-height: 1.4;
}

.notif-item-date{
  margin-top: 6px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.notif-empty{
  padding: 18px 14px;
  text-align: center;
  color: #64748b;
  font-weight: 700;
}

/* Fix alignement couronne dans ligues.html */
.league-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.league-owner-line{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

@media (max-width: 720px){
  .notif-dropdown{
    right: 0;
    left: auto;
    width: min(92vw, 320px);
  }
}

/* =========================
   NOTIFS + MOBILE FIXES
   ========================= */

html, body{
  overflow-x: hidden;
}

.nav-profile{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-bell-wrap{
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.nav-bell-btn{
  position: relative;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  border: none;
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15,23,42,0.08);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  padding: 0 !important;
}

.nav-bell-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15,23,42,0.12);
  background: #f8fbff;
}

.nav-bell-ic{
  font-size: 18px;
  line-height: 1;
}

.notif-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(239,68,68,0.35);
}

.notif-dropdown{
  position: absolute;
  top: 46px;
  right: 0;
  left: auto;
  width: 320px;
  max-width: min(92vw, 320px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15,23,42,0.15);
  overflow: hidden;
  display: none;
  z-index: 9999;
}

.notif-dropdown.open{
  display: block;
  animation: notifDropIn .16s ease;
}

@keyframes notifDropIn{
  from{ opacity:0; transform:translateY(6px); }
  to{ opacity:1; transform:translateY(0); }
}

.notif-dropdown-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  background: #f8fbff;
}

.notif-dropdown-title{
  font-weight: 900;
  color: #0f172a;
}

.notif-mark-read-btn{
  border: none;
  background: transparent;
  color: #2563eb;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.notif-list{
  max-height: 340px;
  overflow: auto;
}

.notif-item{
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  transition: background .14s ease;
}

.notif-item:hover{
  background: #f8fbff;
}

.notif-item.unread{
  background: #eef4ff;
}

.notif-item-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.notif-item-title{
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 4px;
}

.notif-item-body{
  color: #475569;
  font-size: 14px;
  line-height: 1.4;
  margin-top: 2px;
}

.notif-item-date{
  margin-top: 6px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.notif-delete-btn{
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.notif-delete-btn:hover{
  color: #ef4444;
}

.notif-empty{
  padding: 18px 14px;
  text-align: center;
  color: #64748b;
  font-weight: 700;
}

/* Alignement couronne ligues */
.league-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.league-owner-line{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

/* Mobile : boutons gestion ligue bien alignés */
@media (max-width: 720px){
  .notif-dropdown{
    position: fixed;
    top: 86px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(92vw, 360px);
    max-width: min(92vw, 360px);
  }

  .league-danger-row{
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .league-danger-row .league-btn{
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  #ownerPanel .league-form .league-btn{
    width: 100% !important;
  }

  .nav-bell-btn{
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    border-radius: 10px;
  }
}

/* Mobile : équipes à gauche / droite des cases */
@media (max-width: 768px){
  .match-main{
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    text-align: center !important;
    gap: 12px !important;
  }

  .team-left{
    align-items: flex-end !important;
    text-align: right !important;
  }

  .team-right{
    align-items: flex-start !important;
    text-align: left !important;
  }

  .team{
    justify-content: center !important;
  }

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

  .team-name-big{
    font-size: 18px !important;
    line-height: 1.15 !important;
  }
}

.password-wrapper{
  position: relative;
}

.password-wrapper input{
  height: 48px;
  padding-right: 52px;
}

.password-wrapper .toggle-password{
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
}

.password-wrapper .toggle-password span,
.password-wrapper .toggle-password i,
.password-wrapper .toggle-password svg{
  display: block;
  line-height: 1;
}

/* Desktop uniquement : rapprocher les noms d'équipes du score */
@media (min-width: 769px){
  .match-main{
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    gap: 36px;
  }

  .team-left{
    align-items: flex-end;
    text-align: right;
    padding-right: 10px;
  }

  .team-right{
    align-items: flex-start;
    text-align: left;
    padding-left: 10px;
  }

  .team-name-big{
    max-width: 260px;
    line-height: 1.15;
  }
}

/* =========================
   INVITE PAGE PREMIUM
   ========================= */

.invite-body{
  margin:0;
  background:linear-gradient(135deg,#0f172a 0%,#1e293b 50%,#0f3460 100%);
  min-height:100vh;
  color:#fff;
}

.invite-page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:24px 16px 48px;
  position:relative;
  overflow:hidden;
}

.invite-page::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(37,99,235,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 35% at 80% 80%, rgba(34,197,94,0.12) 0%, transparent 70%);
  pointer-events:none;
}

.open-browser-banner{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:99999;
  background:#1d4ed8;
  color:#fff;
  padding:12px 16px;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  box-shadow:0 4px 20px rgba(0,0,0,0.3);
}

.banner-text{
  font-size:13px;
  font-weight:700;
  line-height:1.4;
  flex:1;
}

.banner-text strong{
  display:block;
  font-size:14px;
  margin-bottom:2px;
}

#openInBrowserBtn{
  background:#fff;
  color:#1d4ed8;
  border:none;
  border-radius:10px;
  padding:9px 14px;
  font-weight:900;
  font-size:13px;
  cursor:pointer;
  white-space:nowrap;
  flex-shrink:0;
}

#openInBrowserBtn:hover{
  background:#eff6ff;
}

.invite-logo{
  position:relative;
  z-index:1;
  margin-bottom:28px;
  display:flex;
  align-items:center;
  gap:10px;
  color:rgba(255,255,255,0.5);
  font-size:14px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.invite-logo-icon{
  width:36px;
  height:36px;
  background:linear-gradient(135deg,#2563eb,#22c55e);
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
}

.invite-state-card,
.invite-card{
  position:relative;
  z-index:1;
  width:100%;
  max-width:420px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:24px;
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  overflow:hidden;
  box-shadow:0 32px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06) inset;
}

.invite-state-card{
  padding:28px;
  text-align:center;
}

.invite-error-card h1{
  margin:0 0 10px;
  font-size:24px;
}

.invite-error-card p{
  margin:0 0 18px;
  color:rgba(255,255,255,0.75);
}

.invite-card-banner{
  height:6px;
  background:linear-gradient(90deg,#2563eb 0%,#22c55e 100%);
}

.invite-card-body{
  padding:28px 28px 32px;
}

.invite-label{
  font-size:11px;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:rgba(255,255,255,0.4);
  margin-bottom:14px;
}

.invite-league-name{
  font-size:26px;
  font-weight:900;
  color:#fff;
  margin:0 0 6px;
  line-height:1.15;
  word-break:break-word;
}

.invite-owner{
  font-size:13px;
  color:rgba(255,255,255,0.5);
  margin-bottom:20px;
  font-weight:600;
}

.invite-owner strong{
  color:rgba(255,255,255,0.75);
}

.invite-divider{
  height:1px;
  background:rgba(255,255,255,0.08);
  margin:0 0 20px;
}

.invite-members-row{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:24px;
}

.invite-avatars{
  display:flex;
  align-items:center;
}

.invite-avatar{
  width:34px;
  height:34px;
  border-radius:50%;
  border:2px solid rgba(15,23,42,0.8);
  object-fit:cover;
  margin-left:-10px;
  flex-shrink:0;
}

.invite-avatars .invite-avatar:first-child{
  margin-left:0;
}

.invite-avatar-fallback{
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  color:#fff;
  font-size:13px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
}

.invite-avatar-extra{
  background:rgba(255,255,255,0.12);
  color:rgba(255,255,255,0.7);
  font-size:11px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
}

.invite-members-info{
  flex:1;
}

.invite-member-count{
  font-size:15px;
  font-weight:800;
  color:#fff;
  display:flex;
  align-items:center;
  gap:7px;
}

.invite-member-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 6px rgba(34,197,94,0.6);
  display:inline-block;
  flex-shrink:0;
}

.invite-status{
  min-height:22px;
  margin-bottom:14px;
  font-weight:800;
  font-size:14px;
}

.invite-status.success{ color:#86efac; }
.invite-status.error{ color:#fca5a5; }

.invite-join-btn{
  width:100%;
  padding:16px;
  border:none;
  border-radius:14px;
  background:linear-gradient(135deg,#2563eb 0%,#3b82f6 100%);
  color:#fff;
  font-size:15px;
  font-weight:900;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  box-shadow:0 14px 30px rgba(37,99,235,0.3);
}

.invite-join-btn:hover{
  transform:translateY(-1px);
  opacity:.98;
}

.invite-join-btn:disabled{
  opacity:.7;
  cursor:not-allowed;
  transform:none;
}

.invite-login-hint{
  margin:14px 0 0;
  font-size:13px;
  color:rgba(255,255,255,0.55);
  text-align:center;
}

.invite-secondary-link{
  display:inline-block;
  margin-top:18px;
  color:rgba(255,255,255,0.7);
  font-weight:700;
  text-decoration:none;
}

.invite-secondary-link:hover{
  text-decoration:underline;
}

.invite-spinner{
  width:36px;
  height:36px;
  margin:0 auto 14px;
  border:3px solid rgba(255,255,255,0.18);
  border-top-color:#60a5fa;
  border-radius:50%;
  animation:inviteSpin .9s linear infinite;
}

@keyframes inviteSpin{
  to{ transform:rotate(360deg); }
}

@media (max-width: 520px){
  .invite-card-body{
    padding:22px 20px 26px;
  }

  .invite-league-name{
    font-size:22px;
  }

  .invite-members-row{
    gap:10px;
  }
}

/* ===== FIX MEMBERS LIST ===== */

.members-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  width: 100%;
}

.member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px 14px;
  min-width: 0;
}

/* LEFT */
.member-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.member-avatar-wrap {
  flex-shrink: 0;
}

.member-avatar {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  object-fit: cover;
}

.member-avatar-fallback {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  background: #2563eb;
  color: #fff;
}

/* INFO */
.member-info {
  flex: 1;
  min-width: 0;
}

.member-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

/* NAME */
.member-name {
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* BADGES */
.member-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.member-badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.member-badge.me {
  background: #dcfce7;
  color: #166534;
}

.member-badge.owner {
  background: #fef3c7;
  color: #92400e;
}

/* ACTIONS */
.member-actions {
  flex-shrink: 0;
}

/* ===== MOBILE FIX ===== */

@media (max-width: 768px) {

  .members-list {
    grid-template-columns: 1fr;
  }

  .member-top {
    align-items: flex-start;
  }

  .member-badges {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

}

/* ===== FIX LIGUE MEMBERS ===== */

.members-list{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:14px;
  justify-content:stretch !important;
  align-items:stretch;
}

.member-item{
  max-width:none !important;
  width:100%;
  margin:0 !important;
  display:flex !important;
  justify-content:space-between !important;
  align-items:center !important;
  text-align:left !important;
  gap:12px;
  min-width:0;
}

.member-left{
  display:flex !important;
  align-items:center;
  justify-content:flex-start !important;
  gap:12px;
  min-width:0;
  flex:1 1 auto;
}

.member-avatar-wrap{
  flex:0 0 auto;
}

.member-info{
  text-align:left !important;
  min-width:0;
  flex:1 1 auto;
}

.member-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}

.member-name-text{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:900;
  color:#0f172a;
}

.member-badges{
  display:flex;
  align-items:center;
  gap:6px;
  flex-shrink:0;
  white-space:nowrap;
}

.member-actions{
  flex:0 0 auto;
}

@media (max-width: 768px){
  .members-list{
    grid-template-columns:1fr !important;
  }

  .member-item{
    align-items:center !important;
  }

  .member-top{
    gap:8px;
  }

  .member-name-text{
    max-width:100%;
  }

  .member-badges{
    flex-wrap:wrap;
    justify-content:flex-end;
  }
}

@media (max-width: 480px){
  .member-item{
    padding:12px;
  }

  .member-left{
    gap:10px;
  }

  .member-name-text{
    font-size:14px;
  }

  .member-badge{
    font-size:11px;
    padding:4px 7px;
  }

  .member-actions .league-small-btn{
    padding:8px 10px;
  }
}

/* ===== INVITE UX FIX ===== */

.invite-secondary-link-center{
  display:block;
  width:100%;
  text-align:center;
  margin-top:18px;
}

.invite-guest-actions{
  margin-top:14px;
}

.invite-login-hint{
  text-align:center;
  margin:0 0 14px 0;
}

.invite-auth-links{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.invite-auth-link{
  color:#cbd5e1;
  text-decoration:none;
  font-weight:800;
}

.invite-auth-link:hover{
  text-decoration:underline;
}

.invite-auth-link.muted{
  opacity:.9;
}

@media (max-width: 480px){
  .invite-auth-links{
    flex-direction:column;
    gap:10px;
  }
}

.invite-auth-text{
  color:#94a3b8;
  font-weight:600;
}

/* ===== INVITE UX PREMIUM ===== */

.invite-secondary-link-center{
  display:block;
  width:100%;
  text-align:center;
  margin-top:18px;
}

.invite-guest-actions{
  margin-top:14px;
}

.invite-login-hint{
  text-align:center;
  margin:0 0 14px 0;
}

.invite-auth-links{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.invite-auth-text{
  color:#94a3b8;
  font-weight:600;
}

.invite-auth-link{
  color:#cbd5e1;
  text-decoration:none;
  font-weight:800;
  transition:opacity .16s ease, transform .16s ease, color .16s ease;
}

.invite-auth-link:hover{
  text-decoration:underline;
  opacity:1;
  transform:translateY(-1px);
  color:#ffffff;
}

.invite-card-enter{
  animation:inviteCardIn .34s ease;
}

@keyframes inviteCardIn{
  from{
    opacity:0;
    transform:translateY(10px) scale(.985);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

.invite-join-btn{
  transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.invite-join-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 30px rgba(37,99,235,.28);
}

.invite-secondary-link{
  transition:opacity .16s ease, transform .16s ease;
}

.invite-secondary-link:hover{
  opacity:1;
  transform:translateY(-1px);
}

@media (max-width: 480px){
  .invite-auth-links{
    flex-direction:column;
    gap:10px;
  }
}

/* ===== LIGUE MEMBERS UPGRADE ===== */

.members-list{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:14px;
  justify-content:stretch !important;
  align-items:stretch;
}

.member-item{
  max-width:none !important;
  width:100%;
  margin:0 !important;
  display:flex !important;
  justify-content:space-between !important;
  align-items:center !important;
  text-align:left !important;
  gap:12px;
  min-width:0;
}

.member-item-owner{
  border:1px solid rgba(251,191,36,.35);
  box-shadow:0 8px 24px rgba(251,191,36,.08);
}

.member-left{
  display:flex !important;
  align-items:center;
  justify-content:flex-start !important;
  gap:12px;
  min-width:0;
  flex:1 1 auto;
}

.member-avatar-wrap{
  flex:0 0 auto;
}

.member-info{
  text-align:left !important;
  min-width:0;
  flex:1 1 auto;
}

.member-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}

.member-name-text{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:900;
  color:#0f172a;
}

.member-badges{
  display:flex;
  align-items:center;
  gap:6px;
  flex-shrink:0;
  white-space:nowrap;
}

.member-badge.owner{
  background:#fef3c7;
  color:#92400e;
  border:1px solid #fde68a;
  font-weight:900;
}

.member-actions{
  flex:0 0 auto;
}

@media (max-width: 768px){
  .members-list{
    grid-template-columns:1fr !important;
  }

  .member-item{
    align-items:center !important;
  }

  .member-top{
    gap:8px;
  }

  .member-name-text{
    max-width:100%;
  }

  .member-badges{
    flex-wrap:wrap;
    justify-content:flex-end;
  }
}

@media (max-width: 480px){
  .member-item{
    padding:12px;
  }

  .member-left{
    gap:10px;
  }

  .member-name-text{
    font-size:14px;
  }

  .member-badge{
    font-size:11px;
    padding:4px 7px;
  }

  .member-actions .league-small-btn{
    padding:8px 10px;
  }
}

/* ===== FIX pseudo tronqué carte créateur sur PC ===== */

.member-item-owner .member-top{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:flex-start;
  gap:6px;
}

.member-item-owner .member-name-text{
  flex:1 1 100%;
  max-width:100%;
  overflow:visible;
  text-overflow:unset;
  white-space:nowrap;
}

.member-item-owner .member-badges{
  width:100%;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:6px;
}

/* optionnel : un peu plus de place aux cartes sur desktop */
@media (min-width: 769px){
  .members-list{
    grid-template-columns:repeat(auto-fit, minmax(320px, 1fr)) !important;
  }
}

/* ===== UNIFORMISATION BADGES + CARTES MEMBRES ===== */

.member-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:4px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}

.member-badge.owner{
  background:#fef3c7;
  color:#92400e;
  border:1px solid #fde68a;
}

.member-badge.me{
  background:#dcfce7;
  color:#166534;
  border:1px solid #bbf7d0;
}

/* structure identique pour toutes les cartes */
.member-item{
  display:flex !important;
  flex-direction:row;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px;
}

.member-left{
  display:flex !important;
  align-items:center;
  gap:12px;
  min-width:0;
  flex:1 1 auto;
}

.member-info{
  min-width:0;
  flex:1 1 auto;
}

.member-top{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:6px;
  min-width:0;
}

.member-name-text{
  display:block;
  font-weight:900;
  color:#0f172a;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.member-badges{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.member-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

/* carte créateur : on garde juste une légère mise en avant */
.member-item-owner{
  border:1px solid rgba(251,191,36,.45);
  box-shadow:0 8px 24px rgba(251,191,36,.08);
}

/* ===== MOBILE ===== */
@media (max-width: 768px){
  .members-list{
    grid-template-columns:1fr !important;
  }

  .member-item{
    flex-direction:column !important;
    align-items:stretch !important;
    gap:12px;
  }

  .member-left{
    width:100%;
  }

  .member-top{
    width:100%;
    align-items:flex-start;
  }

  .member-name-text{
    max-width:100%;
  }

  .member-badges{
    width:100%;
    justify-content:flex-start;
  }

  .member-actions{
    width:100%;
    justify-content:stretch;
  }

  .member-actions .league-small-btn{
    width:100%;
  }
}

/* ===== PETIT MOBILE ===== */
@media (max-width: 480px){
  .member-badge{
    min-height:28px;
    padding:4px 9px;
    font-size:12px;
  }

  .member-left{
    gap:10px;
  }

  .member-name-text{
    font-size:14px;
  }
}

/* ===== PATCH bouton Exclure mobile plus petit et centré ===== */
@media (max-width: 768px){
  .member-actions{
    width:100%;
    display:flex;
    justify-content:center !important;
  }

  .member-actions .league-small-btn{
    width:auto !important;
    min-width:140px;
    padding:10px 16px;
    border-radius:999px;
  }
}

.league-small-btn.copy-link:active{
  transform:scale(0.96);
}

/* ===== SEO PAGES FIX (SCOPÉ) ===== */

body.seo-page .hero{
  max-width:1100px;
  margin:40px auto 20px auto;
  padding:0 16px;
  text-align:center;
}

body.seo-page .hero h1{
  font-size:28px;
  line-height:1.25;
}

body.seo-page .hero h2{
  font-size:22px;
  margin-top:10px;
}

body.seo-page .hero p{
  margin-top:10px;
  color:#64748b;
}

body.seo-page .rules{
  max-width:1100px;
  margin:20px auto;
  padding:0 16px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));
  gap:16px;
}

body.seo-page .rules .card{
  height:100%;
}

body.seo-page .rules h2{
  font-size:18px;
  margin-bottom:8px;
}

body.seo-page .rules p{
  color:#475569;
  line-height:1.5;
}

body.seo-page .rules ul{
  margin-top:8px;
  padding-left:18px;
}

body.seo-page .rules li{
  margin-bottom:6px;
}

body.seo-page .rules a{
  color:#2563eb;
  font-weight:700;
  text-decoration:none;
}

body.seo-page .rules a:hover{
  text-decoration:underline;
}

body.seo-page .rules .btn-primary{
  display:inline-block;
  margin-top:10px;
}

body.seo-page .tabs{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
  padding:10px 12px;
}

body.seo-page .tab{
  padding:8px 12px;
  font-size:14px;
}

body.seo-page .footer{
  margin-top:40px;
}

@media (max-width:768px){
  body.seo-page .hero{
    margin-top:20px;
  }

  body.seo-page .hero h1{
    font-size:22px;
  }

  body.seo-page .hero h2{
    font-size:18px;
  }

  body.seo-page .rules{
    grid-template-columns:1fr;
  }
}

@media (max-width:480px){
  body.seo-page .hero{
    padding:0 12px;
  }

  body.seo-page .rules{
    padding:0 12px;
  }
}

/* ===== MODALE INVITATION JOUEUR ===== */

.invite-user-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:99999;
  background:rgba(15,23,42,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.invite-user-modal{
  width:100%;
  max-width:440px;
  background:#ffffff;
  border-radius:22px;
  padding:22px;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
  animation:inviteModalIn .18s ease;
}

.invite-user-modal h3{
  margin:0 0 8px 0;
  font-size:22px;
  font-weight:900;
  color:#0f172a;
  text-align:center;
}

.invite-user-modal p{
  margin:0 0 18px 0;
  color:#64748b;
  text-align:center;
  font-weight:600;
}

.invite-user-input{
  width:100%;
  border:1px solid #cbd5e1;
  border-radius:14px;
  padding:13px 14px;
  font-size:15px;
  font-weight:700;
  outline:none;
}

.invite-user-input:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 4px rgba(37,99,235,.14);
}

.invite-user-actions{
  display:flex;
  gap:10px;
  margin-top:18px;
}

.invite-user-actions button{
  flex:1;
  border:0;
  border-radius:14px;
  padding:12px 14px;
  font-weight:900;
  cursor:pointer;
}

.invite-user-cancel{
  background:#111827;
  color:#fff;
}

.invite-user-confirm{
  background:linear-gradient(135deg,#2563eb,#6366f1);
  color:#fff;
}

@keyframes inviteModalIn{
  from{
    opacity:0;
    transform:translateY(8px) scale(.98);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

/* ===== Mes ligues : carte cliquable ===== */
.clickable-league-item{
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.clickable-league-item:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 30px rgba(15,23,42,.08);
  border-color:#bfdbfe;
}

.clickable-league-name{
  color:#2563eb;
  font-weight:900;
}

.clickable-league-name:hover{
  text-decoration:underline;
}

/* Zone danger (suppression compte) */
.danger-zone{
  border:1px solid #fecaca;
  background:#fff5f5;
  border-radius:16px;
  padding:18px;

  box-shadow:0 6px 18px rgba(0,0,0,0.04);
}

/* Titre */
.danger-zone h3{
  display:flex;
  align-items:center;
  gap:8px;

  margin:0;
  font-size:18px;
  font-weight:700;

  color:#dc2626;
}

/* Texte */
.danger-zone p{
  margin-top:8px;
  font-size:14px;
  color:#6b7280; /* gris propre */
  line-height:1.5;
}

/* Bouton */
.danger-zone .league-small-btn.danger{
  margin-top:12px;

  background:#ef4444;
  color:white;

  border-radius:10px;
  padding:10px 16px;

  font-weight:600;

  transition:all 0.15s ease;
}

.danger-zone .league-small-btn.danger:hover{
  background:#dc2626;
  transform:translateY(-1px);
}

/* Wrapper avatar pour gérer le hover */
.avatar-wrap > div{
  position:relative;
}

/* Avatar */
.avatar-preview{
  border-radius:50%;
  transition:opacity 0.2s ease;
}

/* ===== PATCH FINAL AVATAR DEFAULT / PROFIL / NAVBAR / CLASSEMENT / LIGUES ===== */

/* Image avatar toujours bien cadrée */
.avatar img,
.nav-avatar-img,
.member-avatar,
.avatar-preview{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}

/* Avatar profil */
.avatar-preview{
  width:90px !important;
  height:90px !important;
  border-radius:999px !important;
  overflow:hidden !important;
}

/* Nouveau wrapper profil.html */
.profile-avatar-box{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  position:relative;
}

.profile-avatar-holder{
  position:relative;
  width:90px;
  height:90px;
}

.profile-pseudo-display{
  font-weight:900;
  margin:0;
}

/* Croix style Discord */
.remove-avatar-btn,
#removeAvatarBtn{
  position:absolute !important;
  top:-4px !important;
  right:-4px !important;
  width:22px !important;
  height:22px !important;
  padding:0 !important;
  margin:0 !important;
  border:none !important;
  border-radius:999px !important;
  background:rgba(15,23,42,.88) !important;
  color:#fff !important;
  font-size:14px !important;
  font-weight:700 !important;
  line-height:1 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  cursor:pointer !important;
  opacity:0 !important;
  transform:scale(.85) !important;
  transition:opacity .18s ease, transform .18s ease, background .18s ease !important;
  box-shadow:0 6px 14px rgba(15,23,42,.25) !important;
}

.profile-avatar-holder:hover #removeAvatarBtn,
.profile-avatar-holder:hover .remove-avatar-btn,
#removeAvatarBtn:hover{
  opacity:1 !important;
  transform:scale(1) !important;
}

#removeAvatarBtn:hover,
.remove-avatar-btn:hover{
  background:#ef4444 !important;
}

.profile-avatar-holder:hover .avatar-preview{
  opacity:.86;
}

/* Navbar avatar */
.nav-avatar{
  overflow:hidden !important;
}

.nav-avatar-img{
  border-radius:999px !important;
}

/* Membres ligue */
.member-avatar{
  width:46px !important;
  height:46px !important;
  border-radius:999px !important;
  overflow:hidden !important;
}

/* Classement */
.avatar{
  overflow:hidden !important;
}

.avatar img{
  border-radius:999px !important;
}

/* ===== FIX AFFICHAGE SCORE RESULTATS JOUEURS ===== */

.score-display-big{
  min-width:120px !important;
  height:56px !important;

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

  padding:0 18px !important;
  margin:0 auto !important;

  font-size:28px !important;
  font-weight:1000 !important;
  color:#0f172a !important;
  line-height:1 !important;
  white-space:nowrap !important;
}

/* Sur la page résultats, garde les équipes bien centrées */
.match-main .score-display-big{
  grid-column:auto !important;
}

/* Mobile */
@media (max-width:720px){
  .score-display-big{
    min-width:110px !important;
    height:52px !important;
    font-size:24px !important;
  }
}

/* ===== RESULTATS JOUEUR : SCORE + EQUIPES PROPREMENT CENTRÉS ===== */

#resultsList .match-card .match-main{
  display:grid !important;
  grid-template-columns: minmax(180px,1fr) 120px minmax(180px,1fr) !important;
  align-items:center !important;
  justify-content:center !important;
  gap:26px !important;
  padding:34px 18px !important;
}

#resultsList .match-card .team-left{
  align-items:flex-end !important;
  text-align:right !important;
}

#resultsList .match-card .team-right{
  align-items:flex-start !important;
  text-align:left !important;
}

#resultsList .match-card .score-display-big{
  width:120px !important;
  min-width:120px !important;
  max-width:120px !important;
  height:auto !important;
  padding:0 !important;
  margin:0 !important;

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

  font-size:28px !important;
  font-weight:1000 !important;
  line-height:1 !important;
  white-space:nowrap !important;
}

/* évite que "Mon prono" colle trop en bas */
#resultsList .match-card .myline{
  padding:0 18px 14px !important;
}

/* Mobile */
@media (max-width:720px){
  #resultsList .match-card .match-main{
    grid-template-columns:1fr !important;
    gap:14px !important;
    padding:22px 14px !important;
    text-align:center !important;
  }

  #resultsList .match-card .team-left,
  #resultsList .match-card .team-right{
    align-items:center !important;
    text-align:center !important;
  }

  #resultsList .match-card .score-display-big{
    width:auto !important;
    min-width:110px !important;
    max-width:none !important;
    margin:0 auto !important;
    font-size:26px !important;
  }
}

/* ===== RESULTATS : STYLE SCORE COMME INPUT (READ-ONLY) ===== */

#resultsList .score-display-big{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
}

/* chaque score (1 et 0) */
#resultsList .score-display-big::before,
#resultsList .score-display-big::after{
  content:none;
}

/* on transforme "1 - 0" en 3 blocs visuels */
#resultsList .score-display-big{
  font-size:0 !important; /* cache texte brut */
}

#resultsList .score-display-big{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

/* wrapper dynamique via span */
#resultsList .score-display-big span{
  font-size:20px !important;
  font-weight:900 !important;

  width:46px;
  height:46px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:10px;
  border:2px solid #cbd5e1;
  background:#fff;
}

/* séparateur */
#resultsList .score-display-big .sep{
  border:none !important;
  width:auto !important;
  height:auto !important;
  font-size:22px !important;
  color:#64748b;
  background:none !important;
}

/* ===== FIX DEFINITIF RESULTATS : ADMIN + JOUEUR ===== */

#resultsList .match-card .match-main{
  display:grid !important;
  grid-template-columns:minmax(220px,1fr) auto minmax(220px,1fr) !important;
  align-items:center !important;
  justify-content:center !important;
  gap:28px !important;
  padding:34px 20px !important;
}

#resultsList .match-card .team-left{
  text-align:right !important;
}

#resultsList .match-card .team-right{
  text-align:left !important;
}

#resultsList .match-card .team-name-big{
  white-space:nowrap !important;
}

/* ADMIN : inputs */
#resultsList .match-card .score-box{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:14px !important;
  width:190px !important;
  min-width:190px !important;
  max-width:190px !important;
  font-size:20px !important;
}

#resultsList .match-card .score-box .score-input{
  width:62px !important;
  height:56px !important;
  box-sizing:border-box !important;
  text-align:center !important;
  font-size:20px !important;
  font-weight:900 !important;
  line-height:56px !important;
  padding:0 !important;
}

#resultsList .match-card .score-box .score-sep{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:18px !important;
  min-width:18px !important;
  height:56px !important;
  font-size:22px !important;
  font-weight:900 !important;
  color:#64748b !important;
  background:transparent !important;
  border:0 !important;
}

/* JOUEUR : score officiel */
#resultsList .match-card .score-display-big{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:14px !important;
  width:190px !important;
  min-width:190px !important;
  max-width:190px !important;
  padding:0 !important;
  margin:0 !important;
  font-size:20px !important;
}

#resultsList .match-card .score-display-big span:not(.sep){
  width:62px !important;
  height:56px !important;
  box-sizing:border-box !important;

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

  border:2px solid #cbd5e1 !important;
  border-radius:10px !important;
  background:#fff !important;

  font-size:20px !important;
  font-weight:900 !important;
  line-height:1 !important;
}

#resultsList .match-card .score-display-big .sep{
  width:18px !important;
  min-width:18px !important;
  height:56px !important;

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

  border:0 !important;
  background:transparent !important;
  color:#64748b !important;

  font-size:22px !important;
  font-weight:900 !important;
}

/* Mobile */
@media (max-width:720px){
  #resultsList .match-card .match-main{
    grid-template-columns:1fr !important;
    gap:14px !important;
    padding:24px 14px !important;
    text-align:center !important;
  }

  #resultsList .match-card .team-left,
  #resultsList .match-card .team-right{
    text-align:center !important;
  }

  #resultsList .match-card .score-box,
  #resultsList .match-card .score-display-big{
    margin:0 auto !important;
  }
}

/* ===== FIX MOBILE RESULTATS : RESTER EN LIGNE ===== */
@media (max-width:720px){

  #resultsList .match-card .match-main{
    display:grid !important;
    grid-template-columns:1fr auto 1fr !important; /* 👈 clé du fix */
    align-items:center !important;
    gap:12px !important;
    padding:20px 10px !important;
    text-align:center !important;
  }

  #resultsList .match-card .team-left{
    text-align:right !important;
    justify-self:end !important;
  }

  #resultsList .match-card .team-right{
    text-align:left !important;
    justify-self:start !important;
  }

  /* score centré */
  #resultsList .match-card .score-box,
  #resultsList .match-card .score-display-big{
    margin:0 auto !important;
  }

  /* taille un peu réduite mobile */
  #resultsList .match-card .score-box .score-input,
  #resultsList .match-card .score-display-big span:not(.sep){
    width:50px !important;
    height:48px !important;
    font-size:18px !important;
  }

  #resultsList .match-card .score-display-big .sep,
  #resultsList .match-card .score-box .score-sep{
    height:48px !important;
    font-size:20px !important;
  }

  /* empêche les noms d'équipes de casser la ligne */
  #resultsList .match-card .team-name-big{
    font-size:16px !important;
    white-space:nowrap !important;
  }
}

@media (max-width:720px){

  /* autorise retour à la ligne */
  #resultsList .match-card .team-name-big{
    white-space:normal !important;
    line-height:1.2 !important;
    max-width:120px !important;
    font-size:15px !important;
  }

  /* centrer visuellement les blocs équipes */
  #resultsList .match-card .team{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
  }

  /* équilibrage gauche/droite */
  #resultsList .match-card .team-left{
    justify-content:flex-end !important;
  }

  #resultsList .match-card .team-right{
    justify-content:flex-start !important;
  }
}

/* ===== FIX MOBILE MATCH CARD : équipes qui sortent ===== */
@media (max-width:720px){

  #matches .match-card .match-main,
  #resultsList .match-card .match-main{
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;
    gap:8px !important;
    overflow:hidden !important;
    padding:26px 10px !important;
  }

  #matches .match-card .team,
  #resultsList .match-card .team{
    min-width:0 !important;
    max-width:100% !important;
    overflow:hidden !important;
  }

  #matches .match-card .team-left,
  #resultsList .match-card .team-left{
    justify-self:stretch !important;
    text-align:center !important;
  }

  #matches .match-card .team-right,
  #resultsList .match-card .team-right{
    justify-self:stretch !important;
    text-align:center !important;
  }

  #matches .match-card .team-name-big,
  #resultsList .match-card .team-name-big{
    white-space:normal !important;
    overflow-wrap:anywhere !important;
    word-break:normal !important;
    font-size:18px !important;
    line-height:1.15 !important;
  }

  #matches .match-card .score-box,
  #resultsList .match-card .score-box,
  #matches .match-card .score-display-big,
  #resultsList .match-card .score-display-big{
    width:116px !important;
    min-width:116px !important;
    max-width:116px !important;
    gap:6px !important;
  }

  #matches .match-card .score-input,
  #resultsList .match-card .score-input,
  #matches .match-card .score-display-big span:not(.sep),
  #resultsList .match-card .score-display-big span:not(.sep){
    width:46px !important;
    height:46px !important;
    font-size:18px !important;
  }

  #matches .match-card .score-sep,
  #resultsList .match-card .score-sep,
  #matches .match-card .score-display-big .sep,
  #resultsList .match-card .score-display-big .sep{
    width:10px !important;
    min-width:10px !important;
    height:46px !important;
  }

  #matches .match-card .match-actions,
  #resultsList .match-card .match-actions{
    justify-content:center !important;
  }
}

/* ===== MES PRONOS MOBILE : layout plus propre ===== */
@media (max-width:720px){

  #matches .match-card .match-main{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;
    align-items:center !important;
    gap:10px !important;
    padding:24px 12px 18px !important;
  }

  #matches .match-card .team{
    min-width:0 !important;
    width:100% !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    overflow:hidden !important;
  }

  #matches .match-card .team-left{
    justify-content:flex-end !important;
    text-align:right !important;
  }

  #matches .match-card .team-right{
    justify-content:flex-start !important;
    text-align:left !important;
  }

  #matches .match-card .team-name-big{
    white-space:normal !important;
    overflow-wrap:anywhere !important;
    word-break:normal !important;
    max-width:110px !important;
    font-size:16px !important;
    line-height:1.15 !important;
  }

  #matches .match-card .score-box{
    width:116px !important;
    min-width:116px !important;
    max-width:116px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:7px !important;
  }

  #matches .match-card .score-input{
    width:46px !important;
    height:46px !important;
    font-size:18px !important;
    padding:0 !important;
    text-align:center !important;
  }

  #matches .match-card .score-sep{
    width:10px !important;
    min-width:10px !important;
    text-align:center !important;
  }
}

/* ===== MES PRONOS MOBILE : garder le bouton sous les scores ===== */
@media (max-width:720px){

  #matches .match-card .match-actions{
    grid-column:1 / -1 !important;
    width:100% !important;
    display:flex !important;
    justify-content:center !important;
    margin-top:12px !important;
  }

  #matches .match-card .btn-clear{
    width:auto !important;
    min-width:118px !important;
    max-width:180px !important;
    padding:11px 18px !important;
    align-self:center !important;
  }

  #matches .match-card .myline{
    grid-column:1 / -1 !important;
    justify-content:center !important;
    text-align:center !important;
  }
}

/* ===== FIX FINAL MES PRONOS MOBILE : bouton supprimer centré sous le score ===== */
@media (max-width:720px){

  #matches.match-list{
    width:100% !important;
    max-width:1050px !important;
    margin:0 auto !important;
  }

  #matches .match-card{
    overflow:hidden !important;
  }

  #matches .match-card .match-main{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;
    align-items:center !important;
    gap:10px !important;
    padding:22px 12px 10px !important;
  }

  #matches .match-card .team{
    min-width:0 !important;
    width:100% !important;
    overflow:hidden !important;
    display:flex !important;
    align-items:center !important;
  }

  #matches .match-card .team-left{
    justify-content:flex-end !important;
    text-align:right !important;
  }

  #matches .match-card .team-right{
    justify-content:flex-start !important;
    text-align:left !important;
  }

  #matches .match-card .team-name-big{
    max-width:105px !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
    line-height:1.15 !important;
    font-size:16px !important;
  }

  #matches .match-card .score-box{
    width:116px !important;
    min-width:116px !important;
    max-width:116px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:7px !important;
    margin:0 auto !important;
  }

  #matches .match-card .score-input{
    width:46px !important;
    height:46px !important;
    line-height:46px !important;
    font-size:18px !important;
    padding:0 !important;
    text-align:center !important;
  }

  #matches .match-card .score-sep{
    width:10px !important;
    min-width:10px !important;
    height:46px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
  }

  #matches .match-card .match-actions{
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    width:100% !important;
    padding:10px 12px 18px !important;
    margin:0 !important;
  }

  #matches .match-card .match-actions:empty{
    display:none !important;
  }

  #matches .match-card .match-actions .btn-clear{
    width:auto !important;
    min-width:118px !important;
    max-width:170px !important;
    padding:11px 18px !important;
    margin:0 auto !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
  }

  #matches .match-card .match-actions .save-note{
    width:100% !important;
    min-width:0 !important;
    text-align:center !important;
  }

  #matches .match-card .myline{
    justify-content:center !important;
    text-align:center !important;
    padding:10px 12px 0 !important;
  }
}
/* ===== RESULTATS MOBILE : alignement équipe droite comme Mes Pronos ===== */
@media (max-width:720px){

  #resultsList .match-card .team-right{
    justify-content:flex-start !important;
    align-items:flex-start !important;
    text-align:center !important;
  }

  #resultsList .match-card .team-right .team-name-big{
    display:block !important;
    width:105px !important;
    max-width:105px !important;
    text-align:center !important;
    white-space:normal !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
    line-height:1.15 !important;
  }

  #resultsList .match-card .team-left{
    justify-content:flex-end !important;
    align-items:flex-end !important;
    text-align:center !important;
  }

  #resultsList .match-card .team-left .team-name-big{
    display:block !important;
    width:105px !important;
    max-width:105px !important;
    text-align:center !important;
    white-space:normal !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
    line-height:1.15 !important;
  }
}

/* ===== FIX RESULTATS MOBILE : espace équipe droite ===== */
@media (max-width:720px){

  #resultsList .match-card .match-main{
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;
    gap:14px !important;
    padding:22px 14px 10px !important;
  }

  #resultsList .match-card .team-left{
    justify-self:end !important;
    padding-right:4px !important;
  }

  #resultsList .match-card .team-right{
    justify-self:start !important;
    padding-left:4px !important;
  }

  #resultsList .match-card .team-left .team-name-big,
  #resultsList .match-card .team-right .team-name-big{
    width:88px !important;
    max-width:88px !important;
    text-align:center !important;
    white-space:normal !important;
    line-height:1.15 !important;
    font-size:15px !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
  }

  #resultsList .match-card .score-box,
  #resultsList .match-card .score-display-big{
    width:108px !important;
    min-width:108px !important;
    max-width:108px !important;
    gap:6px !important;
  }

  #resultsList .match-card .score-box .score-input,
  #resultsList .match-card .score-display-big span:not(.sep){
    width:44px !important;
    height:44px !important;
    font-size:17px !important;
  }
}

/* ===== RESET FINAL RESULTATS MOBILE - ALIGNEMENT COMME MES PRONOS ===== */
@media (max-width:720px){

  #resultsList .match-card .match-main{
    display:grid !important;
    grid-template-columns:minmax(92px,1fr) auto minmax(92px,1fr) !important;
    align-items:center !important;
    column-gap:12px !important;
    row-gap:0 !important;
    padding:22px 14px 8px !important;
    overflow:visible !important;
  }

  #resultsList .match-card .team{
    min-width:0 !important;
    width:100% !important;
    max-width:none !important;
    overflow:visible !important;
    display:flex !important;
    align-items:center !important;
  }

  #resultsList .match-card .team-left{
    justify-content:flex-end !important;
    justify-self:stretch !important;
    text-align:right !important;
    padding:0 !important;
  }

  #resultsList .match-card .team-right{
    justify-content:flex-start !important;
    justify-self:stretch !important;
    text-align:left !important;
    padding:0 !important;
  }

  #resultsList .match-card .team-left .team-name-big,
  #resultsList .match-card .team-right .team-name-big{
    display:block !important;
    width:auto !important;
    max-width:112px !important;
    min-width:0 !important;
    font-size:16px !important;
    line-height:1.12 !important;
    white-space:normal !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
    hyphens:none !important;
  }

  #resultsList .match-card .team-left .team-name-big{
    text-align:right !important;
  }

  #resultsList .match-card .team-right .team-name-big{
    text-align:left !important;
  }

  #resultsList .match-card .score-box,
  #resultsList .match-card .score-display-big{
    width:104px !important;
    min-width:104px !important;
    max-width:104px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:6px !important;
    margin:0 !important;
    padding:0 !important;
  }

  #resultsList .match-card .score-input,
  #resultsList .match-card .score-box .score-input,
  #resultsList .match-card .score-display-big span:not(.sep){
    width:44px !important;
    height:44px !important;
    line-height:44px !important;
    font-size:17px !important;
    padding:0 !important;
    text-align:center !important;
  }

  #resultsList .match-card .score-sep,
  #resultsList .match-card .score-box .score-sep,
  #resultsList .match-card .score-display-big .sep{
    width:8px !important;
    min-width:8px !important;
    height:44px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    font-size:18px !important;
  }

  #resultsList .match-card .match-actions{
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    width:100% !important;
    padding:12px 12px 18px !important;
    margin:0 !important;
  }

  #resultsList .match-card .btn-clear{
    width:auto !important;
    min-width:118px !important;
    max-width:170px !important;
    margin:0 auto !important;
  }
}

/* ===== RESULTATS MOBILE : équilibrage visuel équipes courtes/longues ===== */
@media (max-width:720px){

  #resultsList .match-card .team-left{
    justify-content:flex-end !important;
    padding-right:10px !important;
  }

  #resultsList .match-card .team-right{
    justify-content:flex-start !important;
    padding-left:10px !important;
  }

  #resultsList .match-card .team-left .team-name-big,
  #resultsList .match-card .team-right .team-name-big{
    min-width:86px !important;
  }

  #resultsList .match-card .team-left .team-name-big{
    text-align:right !important;
  }

  #resultsList .match-card .team-right .team-name-big{
    text-align:left !important;
  }
}

/* NOTIFICATIONS */
.notif-item{
  padding:10px;
  border-bottom:1px solid #e5e7eb;
}

#notifDropdown{
  display:none;
}

#notifDropdown.active{
  display:block;
}

#notifBadge{
  background:red;
  color:white;
  border-radius:50%;
  padding:2px 6px;
  font-size:12px;
}

.bonus-pronos-card {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: end;

  width: 100%;
  max-width: 1050px;
  margin: 16px auto 22px;

  background: white;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  border-left: 4px solid #2563eb;
}

.bonus-prono-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bonus-prono-box label {
  font-weight: 800;
  color: #0f172a;
  font-size: 14px;
}

.bonus-prono-box input {
  height: 42px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  padding: 0 12px;
  font-weight: 700;
  outline: none;
}

.bonus-prono-box input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.bonus-save-btn {
  height: 42px;
  white-space: nowrap;
}

.bonus-msg {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

@media (max-width: 800px) {
  .bonus-pronos-card {
    grid-template-columns: 1fr;
  }

  .bonus-save-btn {
    width: 100%;
  }
}

.bonus-select-wrap {
  position: relative;
  width: 100%;
}

.bonus-select-wrap input {
  width: 100%;
  padding-right: 38px;
  cursor: pointer;
  background: #fff;
  font-weight: 600;
}

.bonus-select-toggle {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.bonus-select-toggle:hover {
  background: #e2e8f0;
  color: #334155;
}

.bonus-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  max-height: 230px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
  padding: 6px;
}

.bonus-dropdown.open {
  display: block;
}

.bonus-dropdown-item {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  padding: 9px 12px;
  text-align: left;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
}

.bonus-dropdown-item:hover {
  background: #f1f5f9;
  color: #1d4ed8;
}

.bonus-dropdown-empty {
  padding: 10px 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

/* =========================
   PRONOS DES MEMBRES - PAGE LIGUE
   fond large + contenu centré
   ========================= */

.league-predictions-card {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  background: #fff !important;
  border-radius: 22px !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  overflow: hidden !important;
}

.league-predictions-head {
  max-width: 600px !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 18px !important;
  text-align: center !important;
  border-bottom: 0 !important;
}

.league-predictions-head h2 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

.league-predictions-head p {
  margin: 0 !important;
  color: #64748b !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}

.league-predictions-btn {
  border: 0 !important;
  border-radius: 12px !important;
  background: #2563eb !important;
  color: #fff !important;
  padding: 10px 16px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

.league-predictions-btn:hover {
  background: #1d4ed8 !important;
}

.league-predictions-panel {
  display: none !important;
  max-width: 760px !important;
  margin: 0 auto !important;
  padding: 0 18px 18px !important;
}

.league-predictions-panel.open {
  display: block !important;
}

.league-predictions-msg {
  margin: 0 0 12px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-align: center !important;
}

.league-pred-section {
  margin-top: 12px !important;
}

.league-pred-section h3 {
  margin: 0 0 8px !important;
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

.bonus-pred-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}

.bonus-pred-item {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
}

.bonus-pred-name {
  font-weight: 900 !important;
  color: #0f172a !important;
  margin-bottom: 5px !important;
  font-size: 13px !important;
}

.bonus-pred-line {
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  margin: 2px 0 !important;
}

.match-pred-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  margin-bottom: 10px !important;
  background: #fff !important;
}

.match-pred-title {
  padding: 9px 12px !important;
  background: #f8fafc !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  border-bottom: 1px solid #e2e8f0 !important;
  font-size: 13px !important;
}

.match-pred-row {
  display: flex !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 8px 12px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  font-weight: 700 !important;
  color: #334155 !important;
  font-size: 12px !important;
}

.match-pred-row:last-child {
  border-bottom: 0 !important;
}

.match-pred-score {
  font-weight: 900 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
}

@media (max-width: 700px) {
  .league-predictions-head {
    max-width: 100% !important;
  }

  .league-predictions-btn {
    width: 100% !important;
  }

  .match-pred-row {
    flex-direction: column !important;
  }
}

/* =========================
   PRONOS DES MEMBRES - HARMONISATION
   ========================= */

.league-predictions-panel {
  padding: 6px 18px 26px !important;
}

.league-predictions-msg {
  max-width: 720px !important;
  margin: 0 auto 22px !important;
  padding: 12px 14px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.league-pred-section {
  max-width: 720px !important;
  margin: 0 auto 24px !important;
}

.league-pred-section:last-child {
  margin-bottom: 0 !important;
}

.league-pred-section h3 {
  margin: 0 0 14px !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  font-weight: 900 !important;
}

.league-pred-section .league-empty {
  padding: 12px 0 18px !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  font-weight: 700 !important;
  color: #64748b !important;
}

.bonus-pred-item {
  padding: 14px 16px !important;
}

.bonus-pred-name {
  font-size: 15px !important;
  line-height: 1.4 !important;
  margin-bottom: 8px !important;
}

.bonus-pred-line {
  font-size: 15px !important;
  line-height: 1.5 !important;
  margin: 4px 0 !important;
}

.match-pred-title {
  font-size: 15px !important;
  line-height: 1.4 !important;
  padding: 12px 14px !important;
}

.match-pred-row {
  font-size: 15px !important;
  line-height: 1.5 !important;
  padding: 11px 14px !important;
}

/* Correction mobile : garder le score à droite dans les pronos de ligue */
@media (max-width: 700px) {
  .match-pred-row {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .match-pred-row span:first-child {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .match-pred-score {
    flex: 0 0 auto !important;
    text-align: right !important;
    white-space: nowrap !important;
  }
}

/* =========================
   PDF RECAP - MES PRONOS
   ========================= */

.pdf-recap-wrap {
  max-width: 1050px;
  margin: 18px auto 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pdf-recap-btn {
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #6c63ff);
  color: #fff;
  padding: 14px 22px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.pdf-recap-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.pdf-recap-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.pdf-recap-msg {
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  text-align: center;
}

@media (max-width: 700px) {
  .pdf-recap-wrap {
    padding: 0 12px;
  }

  .pdf-recap-btn {
    width: 100%;
  }
}

/* === SEO PAGES / COMPTE À REBOURS === */

.seo-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 18px;
}

.seo-hero {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: white;
  border-radius: 22px;
  padding: 35px 25px;
  margin-bottom: 25px;
  text-align: center;
}

.seo-hero h1 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.seo-hero p {
  max-width: 850px;
  margin: 0 auto;
  line-height: 1.7;
}

.seo-card {
  background: white;
  border-radius: 18px;
  padding: 25px;
  margin-bottom: 22px;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
}

.seo-card h2 {
  margin-bottom: 12px;
  color: #0f172a;
}

.seo-card h3 {
  margin-top: 20px;
  margin-bottom: 10px;
}

.seo-card p {
  line-height: 1.7;
  margin-bottom: 12px;
}

.seo-card ul {
  padding-left: 22px;
  line-height: 1.8;
}

.seo-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.seo-link-box {
  display: block;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seo-link-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

/* === COMPTE À REBOURS SOBRE / ACCUEIL === */

.worldcup-countdown {
  background: #f8fafc;
  padding: 38px 18px 24px;
  color: #0f172a;
  text-align: center;
}

.countdown-inner {
  max-width: 760px;
  margin: 0 auto;
  background: transparent;
  border-radius: 0;
  padding: 20px 10px;
  box-shadow: none;
}

.countdown-label {
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}

.countdown-unit {
  min-width: 105px;
  padding: 16px 14px;
  border-radius: 16px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
}

.countdown-unit strong {
  display: block;
  font-size: 2rem;
  color: #2563eb;
  line-height: 1;
}

.countdown-unit span {
  display: block;
  margin-top: 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  font-weight: 700;
}

.count-separator {
  display: none;
}

.opening-match {
  display: inline-block;
  margin-top: 20px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.9rem;
}

/* === STATS SOBRE === */

.worldcup-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #f8fafc;
  color: #0f172a;
  padding: 10px 18px 45px;
  gap: 16px;
}

.stat-item {
  text-align: center;
  background: white;
  border-radius: 18px;
  padding: 22px 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e8f0;
}

.stat-icon {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.stat-item strong {
  display: block;
  color: #2563eb;
  font-size: 2rem;
  margin-bottom: 6px;
}

.stat-item p {
  text-transform: uppercase;
  color: #64748b;
  font-size: 0.75rem;
  letter-spacing: 1px;
  font-weight: 700;
}

@media (max-width: 850px) {
  .worldcup-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .countdown-unit {
    min-width: 120px;
  }

  .worldcup-stats {
    grid-template-columns: 1fr;
  }
}

/* === CARTES ÉQUIPES === */

.team-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.team-card {
  display: block;
  padding: 16px;
  border-radius: 16px;
  background: white;
  text-decoration: none;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}

.team-card span {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 8px;
}

.team-card strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.team-card small {
  color: #64748b;
  line-height: 1.4;
}

@media (max-width: 650px) {
  .team-card-grid {
    grid-template-columns: 1fr;
  }
}

/* === MINI FAQ ACCUEIL - VERSION CLAIRE === */

.home-faq {
  background: #f8fafc;
  color: #0f172a;
  padding: 55px 18px;
}

.faq-header {
  max-width: 900px;
  margin: 0 auto 30px;
  text-align: center;
}

.faq-header span {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255,196,0,0.18);
  border: 1px solid rgba(255,196,0,0.55);
  color: #b45309;
  font-weight: 800;
  font-size: 0.8rem;
}

.faq-header h2 {
  font-size: 2.4rem;
  margin-top: 14px;
  color: #0f172a;
}

.faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.faq-list details {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0;
  margin-bottom: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.faq-list details[open] {
  border-color: #facc15;
}

.faq-list summary {
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 800;
  list-style: none;
  color: #0f172a;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "⌄";
  float: right;
  color: #2563eb;
}

.faq-list details[open] summary::after {
  content: "⌃";
  color: #d97706;
}

.faq-list p {
  padding: 0 24px 22px;
  color: #334155;
  line-height: 1.7;
}

/* === GROS BLOC SEO ACCUEIL === */

.seo-long-section {
  background: #f8fafc;
  padding: 55px 18px;
}

.seo-long-container {
  max-width: 950px;
  margin: 0 auto;
  background: white;
  border-radius: 22px;
  padding: 34px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.seo-long-container h2 {
  font-size: 2rem;
  margin-bottom: 18px;
  color: #0f172a;
}

.seo-long-container h3 {
  margin-top: 28px;
  margin-bottom: 10px;
  color: #0f172a;
}

.seo-long-container p {
  line-height: 1.8;
  color: #334155;
  margin-bottom: 14px;
}

.seo-long-container ul {
  padding-left: 22px;
  line-height: 1.8;
  color: #334155;
}

@media (max-width: 650px) {
  .seo-long-container {
    padding: 24px;
  }

  .seo-long-container h2 {
    font-size: 1.55rem;
  }
}

.rules .card {
  height: auto !important;
  min-height: unset !important;
}

/* Corrections accueil */
.hero {
  border-radius: 0 !important;
}

/* Aligner les cartes stats avec la largeur des blocs en dessous */
.worldcup-stats {
  max-width: 950px !important;
  margin: 0 auto !important;
  grid-template-columns: repeat(5, 1fr) !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
}

@media (max-width: 900px) {
  .worldcup-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 520px) {
  .worldcup-stats {
    grid-template-columns: 1fr !important;
  }
}

/* Correction vide dans les cartes de l'accueil */
.rules {
  align-items: flex-start !important;
}

.rules .card {
  align-self: flex-start !important;
  height: auto !important;
  min-height: 0 !important;
}

/* La carte équipes peut rester un peu plus haute sans étirer la carte guide */
.team-card-grid {
  align-items: stretch;
}

/* Largeur propre pour le bloc SEO + FAQ */
.seo-long-section,
.home-faq {
  padding-left: 18px !important;
  padding-right: 18px !important;
}

.seo-long-container,
.faq-header,
.faq-list {
  max-width: 1100px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Corrige le décalage vertical des cartes */
.rules {
  display: flex !important;
  align-items: stretch !important;
  gap: 24px !important;
}

.rules .card {
  flex: 1 !important;
  align-self: stretch !important;
  height: auto !important;
}

/* Sauf pour la ligne Guide + équipes : on évite que la carte guide s'étire trop */
.rules:nth-of-type(6) {
  align-items: flex-start !important;
}

@media (max-width: 800px) {
  .rules {
    flex-direction: column !important;
  }

  .rules .card {
    width: 100% !important;
  }
}

/* Page calendrier Coupe du Monde 2026 */
.calendar-image-card {
  text-align: center;
}

.calendar-full-image {
  width: 100%;
  max-width: 1050px;
  height: auto;
  display: block;
  margin: 22px auto;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

.image-credit {
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
}

/* Calendrier HTML Coupe du Monde 2026 */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.calendar-day {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
}

.calendar-day h3 {
  margin: 0 0 12px;
  color: #2563eb;
  font-size: 1rem;
}

.calendar-day p {
  margin: 8px 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

.knockout-grid .calendar-day {
  background: #eff6ff;
}

.final-day {
  background: #dbeafe !important;
  border-color: #2563eb;
}

.calendar-image-card {
  text-align: center;
}

.calendar-full-image {
  width: 100%;
  max-width: 1050px;
  height: auto;
  display: block;
  margin: 22px auto;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

.image-credit {
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
}

/* Correction affichage calendrier */
.calendar-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 18px !important;
}

.calendar-day {
  background: #f8fafc !important;
  border: 1px solid #dbeafe !important;
  border-radius: 16px !important;
  padding: 18px !important;
}

.calendar-day h3 {
  color: #2563eb !important;
  font-size: 1rem !important;
  margin-bottom: 14px !important;
}

.calendar-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.92rem;
}

.calendar-match:last-child {
  border-bottom: none;
}

.calendar-team {
  flex: 1;
  color: #0f172a;
}

.calendar-time {
  font-weight: 800;
  color: #2563eb;
  white-space: nowrap;
}

.calendar-image-card img {
  display: none !important;
}

.calendar-image-card {
  display: none !important;
}

.calendar-day p {
  font-family: "Segoe UI", Arial, sans-serif !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
}

.calendar-day strong {
  color: #2563eb !important;
}

/* Meilleur espacement des matchs du calendrier */
.calendar-match {
  display: grid !important;
  grid-template-columns: minmax(90px, 1fr) 70px minmax(90px, 1fr) !important;
  column-gap: 18px !important;
  align-items: center !important;
}

.calendar-team {
  min-width: 0 !important;
}

.calendar-team:first-child {
  text-align: left !important;
}

.calendar-team:last-child {
  text-align: right !important;
  padding-left: 10px !important;
}

.calendar-time {
  text-align: center !important;
  white-space: nowrap !important;
}

/* Correction calendrier : affichage matchs + image */
.seo-page .calendar-grid {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)) !important;
  gap: 18px !important;
}

.seo-page .calendar-day .calendar-match {
  display: grid !important;
  grid-template-columns: minmax(100px, 1fr) 70px minmax(120px, 1fr) !important;
  column-gap: 18px !important;
  align-items: center !important;
  padding: 9px 0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.seo-page .calendar-day .calendar-match:last-child {
  border-bottom: none !important;
}

.seo-page .calendar-team {
  font-size: 0.92rem !important;
  color: #0f172a !important;
  min-width: 0 !important;
}

.seo-page .calendar-team:first-child {
  text-align: left !important;
}

.seo-page .calendar-team:last-child {
  text-align: left !important;
  padding-left: 8px !important;
}

.seo-page .calendar-time {
  text-align: center !important;
  font-weight: 800 !important;
  color: #2563eb !important;
  white-space: nowrap !important;
}

/* Réafficher l'image calendrier */
.calendar-image-card {
  display: block !important;
  text-align: center !important;
}

.calendar-image-card img,
.calendar-full-image {
  display: block !important;
  width: 100% !important;
  max-width: 1050px !important;
  height: auto !important;
  margin: 22px auto !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16) !important;
}

/* Correction largeur noms d'équipes calendrier */
.seo-page .calendar-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) !important;
}

.seo-page .calendar-day .calendar-match {
  grid-template-columns: minmax(125px, 1fr) 70px minmax(135px, 1fr) !important;
  column-gap: 20px !important;
}

.seo-page .calendar-team {
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  line-height: 1.35 !important;
}

/* Calendrier : équipes à distance égale de l'horaire */
.calendar-day .calendar-match {
  display: grid !important;
  grid-template-columns: 1fr 72px 1fr !important;
  align-items: center !important;
  gap: 0 !important;
  width: 100% !important;
  min-height: 54px !important;
}

.calendar-day .calendar-team:first-child {
  text-align: right !important;
  padding-right: 18px !important;
  padding-left: 0 !important;
}

.calendar-day .calendar-time {
  text-align: center !important;
  font-weight: 800 !important;
  color: #2563eb !important;
  width: 72px !important;
}

.calendar-day .calendar-team:last-child {
  text-align: left !important;
  padding-left: 18px !important;
}

/* FIX centrage réel équipe gauche / horaire / équipe droite */
.calendar-day .calendar-match {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 22px !important;
  width: 100% !important;
  min-height: 54px !important;
}

.calendar-day .calendar-team {
  flex: 0 0 110px !important;
  width: 110px !important;
  min-width: 110px !important;
}

.calendar-day .calendar-team:first-child {
  text-align: right !important;
  padding: 0 !important;
}

.calendar-day .calendar-time {
  flex: 0 0 70px !important;
  width: 70px !important;
  text-align: center !important;
  font-weight: 800 !important;
  color: #2563eb !important;
}

.calendar-day .calendar-team:last-child {
  text-align: left !important;
  padding: 0 !important;
}

/* === FIX FINAL CALENDRIER === */

body main.seo-page .calendar-grid article.calendar-day div.calendar-match {
  display: grid !important;
  grid-template-columns: 1fr 76px 1fr !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 42px !important;
  gap: 0 !important;
}

body main.seo-page .calendar-grid article.calendar-day div.calendar-match span.calendar-team:nth-child(1) {
  text-align: right !important;
  padding-right: 18px !important;
  padding-left: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  flex: none !important;
}

body main.seo-page .calendar-grid article.calendar-day div.calendar-match span.calendar-time {
  text-align: center !important;
  width: 76px !important;
  min-width: 76px !important;
  color: #2563eb !important;
  font-weight: 900 !important;
  flex: none !important;
}

body main.seo-page .calendar-grid article.calendar-day div.calendar-match span.calendar-team:nth-child(3) {
  text-align: left !important;
  padding-left: 18px !important;
  padding-right: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  flex: none !important;
}

/* Réafficher l'image calendrier */
body main.seo-page .calendar-image-card {
  display: block !important;
  text-align: center !important;
}

body main.seo-page .calendar-image-card img.calendar-full-image {
  display: block !important;
  width: 100% !important;
  max-width: 1050px !important;
  height: auto !important;
  margin: 22px auto !important;
}

/* Pages SEO */
.seo-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 280px;
  gap:40px;
  align-items:start;
}

.seo-content{
  background:#fff;
  border-radius:24px;
  padding:40px;
  box-shadow:0 10px 30px rgba(15,23,42,.08);
}

.seo-sidebar{
  position:sticky;
  top:110px;
}

.seo-summary{
  background:#fff;
  border-radius:20px;
  padding:24px;
  box-shadow:0 10px 30px rgba(15,23,42,.08);
}

.seo-summary h3{
  margin-bottom:18px;
}

.seo-summary a{
  display:block;
  padding:10px 0;
  color:#2563eb;
  font-weight:600;
  text-decoration:none;
}

.seo-summary a:hover{
  opacity:.8;
}

@media(max-width:1000px){

  .seo-layout{
    grid-template-columns:1fr;
  }

  .seo-sidebar{
    display:none;
  }

}

/* Tableau cotes bookmakers */
.seo-odds-box{
  background:#f8fbff;
  border:1px solid #dbeafe;
  border-radius:22px;
  padding:28px;
  margin:40px 0;
}

.odds-table{
  margin-top:24px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.odds-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#ffffff;
  border-radius:14px;
  padding:14px 18px;
  border:1px solid #e2e8f0;
}

.odds-row span{
  font-weight:700;
  color:#0f172a;
}

.odds-row strong{
  color:#2563eb;
  font-size:1.05rem;
}

.odds-note{
  margin-top:18px;
  font-size:.9rem;
  opacity:.75;
}

/* FIX page format : sommaire sticky + bloc CTA */
.format-layout {
  align-items: start !important;
}

.format-summary-sidebar {
  position: sticky !important;
  top: 90px !important;
  align-self: start !important;
  height: fit-content !important;
  z-index: 10 !important;
}

.format-cta {
  background: #0f172a !important;
  color: white !important;
  border-radius: 22px !important;
  padding: 28px !important;
  margin-top: 34px !important;
}

.format-cta h2 {
  color: white !important;
  border-top: none !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.format-cta p {
  color: #dbeafe !important;
}

.format-cta::before,
.format-cta h2::before,
.format-cta h2::after {
  display: none !important;
  content: none !important;
}

@media (max-width: 1000px) {
  .format-summary-sidebar {
    display: none !important;
  }
}

/* FIX sommaire page format */
@media (min-width: 1001px) {
  .format-layout {
    position: relative !important;
    align-items: flex-start !important;
  }

  .format-summary-sidebar {
    position: sticky !important;
    top: 24px !important;
    align-self: flex-start !important;
    height: fit-content !important;
  }
}

/* FIX tableau format */
.format-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.format-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: auto !important;
}

.format-table th,
.format-table td {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

/* Sur téléphone : tableau transformé en blocs propres */
@media (max-width: 700px) {
  .format-table {
    min-width: 0 !important;
    border: 0 !important;
  }

  .format-table thead {
    display: none !important;
  }

  .format-table,
  .format-table tbody,
  .format-table tr,
  .format-table td {
    display: block !important;
    width: 100% !important;
  }

  .format-table tr {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    margin-bottom: 12px !important;
    padding: 10px !important;
  }

  .format-table td {
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 10px !important;
  }

  .format-table td:last-child {
    border-bottom: none !important;
  }

  .format-table td:nth-child(1)::before {
    content: "Élément : ";
    font-weight: 900;
  }

  .format-table td:nth-child(2)::before {
    content: "Ancien format : ";
    font-weight: 900;
  }

  .format-table td:nth-child(3)::before {
    content: "Format 2026 : ";
    font-weight: 900;
  }
}

@media (min-width: 1001px) {
  .format-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 34px !important;
    align-items: start !important;
  }

  .format-summary-sidebar {
    position: sticky !important;
    top: 24px !important;
    align-self: start !important;
    height: fit-content !important;
  }
}

/* === SOMMAIRE FIXE PAGES SEO === */

@media (min-width: 1001px) {
  .format-summary-sidebar,
  .seo-sidebar {
    position: fixed !important;
    top: 120px !important;
    right: 32px !important;
    width: 300px !important;
    height: fit-content !important;
    max-height: calc(100vh - 150px) !important;
    overflow-y: auto !important;
    z-index: 50 !important;
  }

  .format-layout,
  .seo-layout {
    grid-template-columns: minmax(0, 1fr) 300px !important;
    padding-right: 0 !important;
  }

  .format-summary,
  .seo-summary {
    width: 100% !important;
  }
}

@media (max-width: 1000px) {
  .format-summary-sidebar,
  .seo-sidebar {
    display: none !important;
  }
}

@media (min-width: 1001px) {
  .format-article,
  .seo-content {
    margin-right: 0 !important;
  }
}

/* Correction affichage des cotes sous les scores */
.match-card .odds-row {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 14px auto 0 !important;
  padding: 0 !important;
}

.match-card .odd-pill {
  flex: 0 0 auto !important;
}

@media (max-width: 700px) {
  .match-card .odds-row {
    justify-content: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }
}

/* FIX PRONOS : enlever les barres autour des cotes */
.match-card > .odds-row {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;

  width: auto !important;
  max-width: none !important;

  margin: 12px auto 2px !important;
  padding: 0 !important;

  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.match-card > .odds-row .odd-pill {
  flex: 0 0 auto !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
}

@media (max-width: 700px) {
  .match-card > .odds-row {
    gap: 8px !important;
  }
}

/* =========================
   ACCUEIL MOBILE - CTA NAVBAR
   ========================= */
@media (max-width: 600px) {
  body.home-page .navbar .nav-actions {
    display: none !important;
  }

  body.home-page .hero {
    padding-top: 64px;
  }
}