/* =========================================================
   1. VARIABLES GLOBALES & RESET
   (communes à toutes les pages HexPred.gg)
   ========================================================= */
:root {
  --bg: #0f172a;
  --bg-panel: rgba(15, 23, 42, 0.35);
  --bg-panel-strong: rgba(15, 23, 42, 0.55); /* utilisé sur l'accueil (Live OTP) */
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --radius-lg: 1rem;
  --radius-md: .7rem;
  --border: rgba(148, 163, 184, .06);
  --header-h: 58px;
}

* {
  box-sizing: border-box;
}

/* =========================================================
   bannière de construction
   ========================================================= */

.construction-banner {
  width: 100%;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  color: #020617;
  text-align: center;
  padding: .55rem .8rem;
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .02em;
  border-bottom: 1px solid rgba(0,0,0,0.3);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  top: 0;
  z-index: 9999;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.banner-close {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,.25);
  color: white;
  width: 24px;
  height: 24px;
  font-size: .8rem;
  border-radius: .45rem;
  cursor: pointer;
  transition: .15s;
}

.banner-close:hover {
  background: rgba(0,0,0,0.4);
  transform: scale(1.08);
}

.banner-close:active {
  transform: scale(0.95);
}



body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Dégradé animé de fond (commun à tout le site) */
  background:
    radial-gradient(circle at 18% 25%, #0b1230 0%,  #172442 35%, transparent 60%),
    radial-gradient(circle at 82% 75%, #061133 0%,  #081225 40%, transparent 65%),
    radial-gradient(1200px 900px at 50% 50%, #0a0f24 0%, #0f172a 45%, #020617 85%);
  background-size: 220% 220%, 220% 220%, 200% 200%;
  background-position: 0% 0%, 100% 100%, 50% 50%;
  animation: bgMove 18s ease-in-out infinite alternate;
  color: var(--text);
  min-height: 100vh;
}

/* Animation du fond */
@keyframes bgMove {
  0% {
    background-position: 0% 0%, 100% 100%, 48% 52%;
  }
  50% {
    background-position: 100% 30%, 0% 70%, 52% 48%;
  }
  100% {
    background-position: 0% 100%, 100% 0%, 50% 50%;
  }
}

/* =========================================================
   2. HEADER / NAV (commun aux trois pages)
   ========================================================= */
header.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--header-h);
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
}
.brand-badge {
  width: 28px;
  height: 28px;
  border-radius: .7rem;
  background: radial-gradient(circle, #38bdf8 0%, #0f172a 70%);
  display: grid;
  place-items: center;
  font-size: .7rem;
}

.nav {
  display: flex;
  gap: .5rem;
}

.nav button {
  background: transparent;
  border: none;
  color: var(--text);
  padding: .4rem .8rem;
  border-radius: .5rem;
  cursor: pointer;
  font-size: .8rem;
  white-space: nowrap;
  transition: all .15s ease-out;
}

.nav button:hover,
.nav button.active {
  background: rgba(148, 163, 184, 0.16);
}

/* boutons désactivés (Questions bonus, Classement, etc.) */
.nav button.disabled {
  color: rgba(148, 163, 184, 0.45);
  cursor: not-allowed;
  opacity: 0.6;
}
.nav button.disabled:hover {
  background: transparent;
}

/* Burger mobile */
.menu-toggle {
  display: none;
}
.burger {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: .6rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(15, 23, 42, 0.2);
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 6px 7px;
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  background: #e2e8f0;
  border-radius: 99px;
}

/* Nav responsive */
@media (max-width: 700px) {
  header.topbar {
    padding: 0 1rem;
  }

  .nav {
    position: fixed;
    top: calc(var(--header-h) + 4px);
    right: 1rem;
    background: rgba(2,6,23,.97);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: .9rem;
    padding: .4rem;
    display: none;
    flex-direction: column;
    gap: .25rem;
    min-width: 150px;
  }

  .nav button {
    width: 100%;
    text-align: left;
  }

  .burger {
    display: flex;
  }

  .menu-toggle:checked ~ .nav {
    display: flex;
  }
}

/* ============================
   DROPDOWN PROFIL (menu nav)
   ============================ */

.nav-profile-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-profile-btn {
  background: transparent;
  border: 1px solid rgba(148,163,184,0.18);
  padding: .4rem .8rem;
  border-radius: .55rem;
  cursor: pointer;
  color: var(--text);
  font-size: .8rem;
  transition: .15s;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.nav-profile-btn:hover,
.nav-profile-btn.active {
  background: rgba(148,163,184,0.16);
}

.profile-caret {
  font-size: .7rem;
  opacity: .75;
}

/* Dropdown */
.nav-profile-dropdown {
  position: absolute;
  top: calc(100% + .35rem);
  right: 0;
  background: rgba(15,23,42,0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56,189,248,0.25);
  border-radius: .7rem;
  padding: .35rem 0;
  min-width: 150px;
  display: none;
  flex-direction: column;
  box-shadow: 0 12px 25px rgba(0,0,0,0.35);
  animation: fadeDropdown .18s ease-out;
}

/* Animation */
@keyframes fadeDropdown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-profile-wrapper.open .nav-profile-dropdown {
  display: flex;
}

.dropdown-item {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  padding: .55rem .9rem;
  font-size: .8rem;
  color: var(--text);
  cursor: pointer;
  transition: .15s;
}

.dropdown-item:hover {
  background: rgba(56,189,248,0.15);
}

.dropdown-item.logout:hover {
  background: rgba(244,63,94,0.18);
  color: #fecaca;
}


/* =========================================================
   3. LAYOUT GÉNÉRAL (Accueil & Matchs)
   ========================================================= */
.page {
  max-width: 1240px;
  margin: 1.2rem auto 2.5rem;
  padding: 0 1.2rem;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: flex-start;
}

/* panneau de base (utilisé partout : sidebar, cartes, blocs…) */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(9px);
}

/* Sidebar collée à gauche (Accueil & Matchs) */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Responsive : page en une colonne */
@media (max-width: 1100px) {
  .page {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
}

/* =========================================================
   4. ACCUEIL — Colonne gauche
   4.1 Live OTP (widget Twitch)
   ========================================================= */
.widget-stream {
  padding: .9rem .9rem 1rem;
  background: var(--bg-panel-strong);
  border: 1px solid rgba(56,189,248,.25);
  position: relative;
  overflow: hidden;
}
.widget-stream::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(56,189,248,0.08), transparent 60%);
  pointer-events: none;
}
.widget-stream-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
  font-size: .8rem;
}
.widget-stream-title {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.widget-stream-title span:first-child {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.widget-stream-title span:last-child {
  font-size: .8rem;
}
.live-badge {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  border-radius: 999px;
  padding: .16rem .55rem;
  background: rgba(220, 38, 38, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.7);
  color: #fecaca;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #f97373;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.35);
}
.stream-thumb {
  position: relative;
  border-radius: .7rem;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.3);
  margin-top: .3rem;
}
.stream-thumb iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: none;
}
.stream-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: .45rem;
  font-size: .7rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}
.stream-footer a {
  font-size: .7rem;
  color: #bfdbfe;
  text-decoration: none;
}

/* =========================================================
   4.2 Comment fonctionne HexPred ? (bloc “how to”)
   ========================================================= */
.widget-how {
  padding: .9rem .95rem;
  font-size: .75rem;
}
.widget-title {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: 0 0 .45rem;
}
.how-steps {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.how-step {
  display: flex;
  gap: .45rem;
  align-items: flex-start;
}
.how-step-index {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(56,189,248,.15);
  border: 1px solid rgba(56,189,248,.45);
  display: grid;
  place-items: center;
  font-size: .6rem;
  flex-shrink: 0;
}
.how-step-text {
  font-size: .72rem;
  color: var(--text-muted);
}

/* =========================================================
   4.3 Mini classement joueurs (sidebar Accueil)
   ========================================================= */
.widget-ladder {
  padding: .9rem .95rem 1rem;
  font-size: .75rem;
}
.widget-ladder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .4rem;
}
.widget-ladder-header span {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.widget-ladder-header a {
  font-size: .7rem;
  color: #bfdbfe;
  text-decoration: none;
}
.ladder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .72rem;
}
.ladder-table th,
.ladder-table td {
  padding: .32rem .2rem;
  text-align: left;
}
.ladder-table thead {
  color: var(--text-muted);
}
.ladder-table tr {
  border-bottom: 1px solid rgba(15,23,42,.9);
}
.ladder-table tr:last-child {
  border-bottom: none;
}
.ladder-pos {
  font-size: .7rem;
  color: var(--text-muted);
  width: 24px;
}
.ladder-player {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.ladder-avatar {
  width: 20px;
  height: 20px;
  border-radius: .6rem;
  background: rgba(15,23,42,.9);
  border: 1px solid rgba(148,163,184,.4);
  display: grid;
  place-items: center;
  font-size: .6rem;
  flex-shrink: 0;
}
.ladder-name {
  font-size: .74rem;
}
.ladder-rank {
  font-size: .65rem;
  color: var(--text-muted);
}
.ladder-lp {
  font-weight: 600;
  font-size: .73rem;
  white-space: nowrap;
}

/* =========================================================
   5. ACCUEIL — Colonne droite
   5.1 Bloc “Prochain match à pronostiquer”
   ========================================================= */
.home-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-main {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}
.hero-title {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.hero-title h1 {
  font-size: 1.15rem;
  margin: 0;
}
.hero-subtitle {
  font-size: .8rem;
  color: var(--text-muted);
}
.hero-badge {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  border-radius: 999px;
  padding: .2rem .7rem;
  border: 1px solid rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.12);
}

/* Carte centrale du prochain match */
.hero-match {
  display: grid;
  grid-template-columns: 1.4fr auto 1.4fr;
  gap: .6rem;
  align-items: center;
  padding: .75rem .8rem;
  border-radius: .9rem;
  background: radial-gradient(circle at top, rgba(15,23,42,.9), rgba(15,23,42,.75));
  border: 1px solid rgba(148, 163, 184, .22);
}
.hero-team {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.hero-logo {
  width: 40px;
  height: 40px;
  border-radius: .9rem;
  background: rgba(15,23,42,1);
  border: 1px solid rgba(148,163,184,.35);
  display: grid;
  place-items: center;
  font-size: .8rem;
  font-weight: 700;
}
.hero-team-meta {
  display: flex;
  flex-direction: column;
  gap: .18rem;
}
.hero-team-name {
  font-size: .85rem;
  font-weight: 600;
}
.hero-team-region {
  font-size: .65rem;
  color: var(--text-muted);
}
.hero-vs {
  text-align: center;
  font-size: .75rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: .3rem;
  align-items: center;
  justify-content: center;
}
.hero-vs span {
  font-size: .9rem;
  font-weight: 700;
  color: #f9fafb;
}
.hero-match-meta {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  font-size: .7rem;
  color: var(--text-muted);
}

/* Boutons & stats sous le match */
.hero-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  margin-top: .3rem;
  font-size: .75rem;
}
.hero-actions-left {
  display: flex;
  gap: .5rem;
  align-items: center;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.pill {
  border-radius: 999px;
  padding: .15rem .6rem;
  border: 1px solid rgba(148,163,184,.4);
  font-size: .65rem;
}
.btn-primary {
  border: none;
  border-radius: .6rem;
  background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 40%, #22c55e 100%);
  padding: .45rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  color: #020617;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(8, 47, 73, 0.8);
}
.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 6px 18px rgba(8, 47, 73, 0.7);
}
.btn-ghost {
  border-radius: .6rem;
  border: 1px solid rgba(148,163,184,.5);
  background: rgba(15,23,42,.7);
  padding: .4rem .75rem;
  font-size: .75rem;
  color: var(--text);
  cursor: pointer;
}

/* Petits compteurs (précision, parfaits, LP semaine) */
.hero-bottom-metrics {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .7rem;
  margin-top: .4rem;
  font-size: .7rem;
}
.metric {
  border-radius: .7rem;
  padding: .4rem .55rem;
  background: rgba(15,23,42,.85);
  border: 1px solid rgba(148,163,184,.18);
}
.metric small {
  display: block;
  color: var(--text-muted);
  margin-bottom: .15rem;
}
.metric strong {
  font-size: .85rem;
}

/* =========================================================
   5.2 Résultats récents (liste de matchs terminés)
   ========================================================= */
.panel-header {
  padding: .7rem 1rem .4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
}
.panel-title {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.panel-header a {
  font-size: .72rem;
  color: #bfdbfe;
  text-decoration: none;
}

.results-wrapper {
  padding: .4rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  font-size: .75rem;
}
.result-row {
  display: grid;
  grid-template-columns: 110px 1fr 80px;
  gap: .4rem;
  align-items: center;
  background: rgba(15,23,42,.9);
  border-radius: .7rem;
  padding: .45rem .55rem;
  border: 1px solid rgba(15,23,42,1);
}
.result-meta {
  font-size: .7rem;
  color: var(--text-muted);
}
.result-teams {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .3rem;
}
.result-name {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.result-tag {
  font-size: .65rem;
  color: var(--text-muted);
}
.result-score {
  font-weight: 600;
  font-size: .8rem;
}
.result-status {
  text-align: right;
  font-size: .68rem;
  color: var(--text-muted);
}

/* =========================================================
   5.3 Classement des équipes (table)
   ========================================================= */
.teams-wrapper {
  padding: .4rem 1rem 1rem;
  font-size: .75rem;
}
.league-select {
  background: rgba(15,23,42,.95);
  border-radius: .6rem;
  border: 1px solid rgba(148,163,184,.45);
  padding: .25rem .6rem;
  font-size: .72rem;
  color: var(--text);
  outline: none;
}
.teams-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: .65rem;
}
.teams-table th,
.teams-table td {
  padding: .4rem .25rem;
  text-align: left;
}
.teams-table thead {
  color: var(--text-muted);
  font-size: .72rem;
}
.teams-table tr {
  border-bottom: 1px solid rgba(15,23,42,.9);
}
.teams-table tr:last-child {
  border-bottom: none;
}
.team-cell {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.team-logo-sm {
  width: 20px;
  height: 20px;
  border-radius: .5rem;
  background: rgba(15,23,42,.9);
  border: 1px solid rgba(148,163,184,.4);
  display: grid;
  place-items: center;
  font-size: .6rem;
}
.team-name {
  font-size: .75rem;
}
.record {
  font-variant-numeric: tabular-nums;
}
.winrate {
  font-size: .7rem;
  color: var(--text-muted);
}

/* Responsive Accueil */
@media (max-width: 880px) {
  .hero-match {
    grid-template-columns: 1fr 1fr;
	  grid-template-rows: auto auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
	}
  .hero-vs {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: center;
  }
  .hero-bottom-metrics {
    grid-template-columns: 1fr;
  }
 .profile-header {
    gap: .2rem;
    margin-bottom: none;
  }

}
@media (max-width: 580px) {
  .page {
    padding: 0 .85rem;
  }
  .result-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   6. MATCHS — Sidebar profil joueur & historique
   (colonne gauche de la page “Pronostics Esport”)
   ========================================================= */
.profile-card {
  padding: 1rem;
}
.profile-header {
  display: flex;
  gap: .7rem;
  align-items: center;
  margin-bottom: 1rem;
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: .9rem;
  background: radial-gradient(circle, #38bdf8 0%, #020617 65%);
  display: grid;
  place-items: center;
  font-weight: 700;
}
.rank-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(248, 250, 252, 0.03);
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 999px;
  padding: .2rem .55rem;
  font-size: .65rem;
  text-transform: uppercase;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
  margin-bottom: 1rem;
}
.stat {
  background: rgba(2, 6, 23, .25);
  border: 1px solid rgba(148, 163, 184, 0.04);
  border-radius: .6rem;
  padding: .35rem .5rem;
}
.stat small {
  display: block;
  font-size: .6rem;
  color: var(--text-muted);
}
.stat strong {
  font-size: .9rem;
}

.progress-block {
  background: rgba(2, 6, 23, .2);
  border: 1px solid rgba(148, 163, 184, 0.02);
  border-radius: .6rem;
  padding: .5rem .6rem .7rem;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: .65rem;
  color: var(--text-muted);
  margin-bottom: .35rem;
}
.progress-track {
  width: 100%;
  height: .4rem;
  border-radius: 99px;
  background: rgba(148, 163, 184, .15);
  overflow: hidden;
}
.progress-bar {
  width: 68%;
  height: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #38bdf8 100%);
}

.season-history {
  padding: 1rem;
}
.season-history h3 {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.season-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.season-row {
  display: flex;
  justify-content: space-between;
  background: rgba(15,23,42,.2);
  border-radius: .55rem;
  padding: .4rem .6rem;
  font-size: .7rem;
}

/* =========================================================
   7. MATCHS — Liste des matchs à pronostiquer (colonne droite)
   ========================================================= */
.matches {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Header + filtres */
.matches-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 1rem .3rem;
}
.matches-header h2 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.filters {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}
.filter-chip {
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: .6rem;
  padding: .2rem .5rem;
  font-size: .62rem;
  cursor: pointer;
}
.filter-chip.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.5);
}

/* Liste + lignes de match */
.match-list {
  padding: .6rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

/* =========================================================
   MATCHS — VERSION DESKTOP HARMONISÉE AVEC MOBILE
   ========================================================= */

.match-block {
  position: relative;
  display: grid;
  grid-template-columns:
    145px
    minmax(0, 1fr)
    58px
    minmax(0, 1fr)
    150px;
  gap: .75rem;
  align-items: center;
  padding: .8rem .85rem 2.2rem;
  border-radius: .85rem;
  background: rgba(2, 6, 23, .34);
  border: 1px solid rgba(148, 163, 184, .06);
}

/* Date / heure / compétition */
.match-time {
  display: flex;
  flex-direction: column;
  gap: .18rem;
  min-width: 0;
}

.match-date {
  font-size: .72rem;
  font-weight: 700;
}

.match-hour {
  font-size: .66rem;
  color: var(--text-muted);
}

.match-tag {
  width: fit-content;
  margin-top: .12rem;
  padding: .12rem .4rem;
  border-radius: .4rem;
  background: rgba(56, 189, 248, .10);
  border: 1px solid rgba(56, 189, 248, .28);
  font-size: .56rem;
  text-transform: uppercase;
}

/* Équipes */
.team-block {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  padding: .55rem .65rem;
  border-radius: .7rem;
  background: rgba(15, 23, 42, .38);
  border: 1px solid rgba(148, 163, 184, .05);
}

.team-logo {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: .65rem;
  background: rgba(15, 23, 42, .85);
  border: 1px solid rgba(148, 163, 184, .10);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: .65rem;
  font-weight: 600;
}

.team-meta {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}

.team-name {
  min-width: 0;
  font-size: .74rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Input prono */
.team-prono-input {
  width: 64px;
  height: 34px;
  padding: .25rem .4rem;
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  border-radius: .55rem;
  background: rgba(2, 6, 23, .52);
  border: 1px solid rgba(148, 163, 184, .14);
  color: var(--text);
  outline: none;
}

.team-prono-input:focus {
  border-color: rgba(56, 189, 248, .60);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, .07);
}

/* VS */
.vs-col {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  color: rgba(148, 163, 184, .7);
  font-size: .62rem;
  font-weight: 800;
}

.vs-col::before,
.vs-col::after {
  content: "";
  width: 10px;
  height: 1px;
  background: rgba(148, 163, 184, .12);
}

/* Actions */
.match-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: .45rem;
}

.status-pill {
  font-size: .56rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .4);
  border-radius: 999px;
  padding: .2rem .5rem;
}

.status-pill.closed {
  background: rgba(244, 63, 94, .05);
  border-color: rgba(244, 63, 94, .45);
}

.save-btn {
  min-height: 32px;
  padding: .34rem .75rem;
  border: 0;
  border-radius: .55rem;
  background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 100%);
  color: #020617;
  font-size: .64rem;
  font-weight: 600;
  cursor: pointer;
}

/* Toggle d’extension */
.match-toggle {
  display: none;
}

.expand-btn {
  position: absolute;
  right: .65rem;
  bottom: .55rem;
  width: 28px;
  height: 28px;
  border-radius: .55rem;
  background: rgba(15, 23, 42, .9);
  border: 1px solid rgba(148, 163, 184, .14);
  display: grid;
  place-items: center;
  font-size: .8rem;
  cursor: pointer;
  transition: .15s;
}

.match-toggle:checked + .expand-btn {
  transform: rotate(180deg);
  background: rgba(56, 189, 248, .25);
}

.match-extra {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: .3rem;
  padding: .55rem .6rem;
  border-radius: .6rem;
  background: rgba(2, 6, 23, .30);
  border: 1px solid rgba(148, 163, 184, .02);
  display: none;
}

.match-toggle:checked ~ .match-extra {
  display: block;
}

.vote-list {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  font-size: .62rem;
}

.vote-pill {
  background: rgba(148, 163, 184, .08);
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: .45rem;
  padding: .18rem .45rem;
}

/* =========================================================
   MATCHS — TABLETTE
   ========================================================= */

@media (max-width: 880px) {

  .match-block {
    grid-template-columns:
      minmax(0, 1fr)
      48px
      minmax(0, 1fr);
    gap: .6rem;
  }

  .match-time {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem .6rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(148, 163, 184, .08);
  }

  .match-tag {
    margin-top: 0;
  }

  .match-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: .45rem;
    border-top: 1px solid rgba(148, 163, 184, .08);
  }

  .match-extra {
    grid-column: 1 / -1;
  }
}

/* =========================================================
   MATCHS — VERSION MOBILE MODERNE
   ========================================================= */

@media (max-width: 580px) {

  .match-list {
    padding: .5rem;
    gap: .65rem;
  }

  .match-block {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: .45rem;
    padding: .75rem .75rem 2.5rem;
    border-radius: .85rem;
    background: rgba(2, 6, 23, .42);
    border: 1px solid rgba(148, 163, 184, .08);
    min-width: 0;
  }

  .match-time {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: .15rem .5rem;
    padding-bottom: .55rem;
    margin-bottom: .1rem;
    border-bottom: 1px solid rgba(148, 163, 184, .08);
  }

  .match-date {
    font-size: .72rem;
    font-weight: 700;
    grid-column: 1;
    grid-row: 1;
  }

  .match-hour {
    font-size: .65rem;
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }

  .match-tag {
    grid-column: 1 / -1;
    margin-top: .15rem;
    font-size: .55rem;
    padding: .12rem .4rem;
    border-radius: .4rem;
  }

  .team-block {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .55rem;
    border-radius: .65rem;
    background: rgba(15, 23, 42, .48);
    border: 1px solid rgba(148, 163, 184, .06);
    min-width: 0;
  }

  .team-logo {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: .65rem;
    flex-shrink: 0;
  }

  .team-meta {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .5rem;
  }

  .team-name {
    font-size: .76rem;
    font-weight: 650;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .team-prono-input {
    width: 58px;
    height: 34px;
    padding: .25rem .35rem;
    text-align: center;
    font-size: .72rem;
    font-weight: 700;
    border-radius: .55rem;
    background: rgba(2, 6, 23, .55);
    border: 1px solid rgba(148, 163, 184, .15);
  }

  .team-prono-input:focus {
    outline: none;
    border-color: rgba(56, 189, 248, .65);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, .08);
  }

  .vs-col {
    width: 100%;
    height: 18px;
    font-size: .62rem;
    color: rgba(148, 163, 184, .65);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .vs-col::before,
  .vs-col::after {
    content: "";
    height: 1px;
    flex: 1;
    width: auto;
    background: rgba(148, 163, 184, .08);
  }

  .vs-col::before {
    margin-right: .5rem;
  }

  .vs-col::after {
    margin-left: .5rem;
  }

  .match-actions {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .15rem;
    padding-top: .5rem;
    border-top: 1px solid rgba(148, 163, 184, .08);
  }

  .status-pill {
    font-size: .55rem;
    padding: .2rem .5rem;
    border-radius: 999px;
  }

  .save-btn {
    min-height: 34px;
    padding: .35rem .8rem;
    border-radius: .55rem;
    font-size: .65rem;
  }

  .expand-btn {
    right: .65rem;
    bottom: .55rem;
    width: 28px;
    height: 28px;
    border-radius: .55rem;
    background: rgba(15, 23, 42, .95);
    border: 1px solid rgba(148, 163, 184, .15);
  }

  .match-extra {
    width: 100%;
    margin-top: .25rem;
    padding: .55rem;
    border-radius: .6rem;
    background: rgba(2, 6, 23, .35);
  }

  .vote-list {
    gap: .35rem;
    font-size: .6rem;
  }

  .vote-pill {
    padding: .22rem .4rem;
    border-radius: .4rem;
  }
}


/* =========================================================
   8. PAGE AUTH — Layout global (Connexion / Inscription)
   ========================================================= */
main.auth-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
}

.auth-wrapper {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .9fr);
  gap: 1.5rem;
  align-items: stretch;
}

/* Carte principale (formulaire) */
.auth-card {
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Colonne droite “marketing” */
.auth-side {
  padding: 1.5rem 1.6rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Responsive Auth layout */
@media (max-width: 720px) {
  .auth-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }
  .two-cols {
    grid-template-columns: minmax(0, 1fr);
  }
  main.auth-page {
    padding: 1.4rem 1rem 2rem;
  }
}

/* =========================================================
   9. PAGE AUTH — Formulaires & Inputs (login / register)
   ========================================================= */
/* Onglets Connexion / Inscription */
.auth-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border-radius: .8rem;
  padding: .18rem;
  border: 1px solid rgba(148, 163, 184, .18);
  gap: .15rem;
}
.auth-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: .45rem .6rem;
  border-radius: .65rem;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: .15s;
}
.auth-tab-btn.active {
  background: radial-gradient(circle at 0 0, rgba(56,189,248,.3), rgba(15,23,42,1));
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(56,189,248,.6);
}

/* Titres & textes d’intro */
.auth-header {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.auth-header h1 {
  font-size: 1.2rem;
  margin: 0;
}
.auth-header p {
  margin: 0;
  font-size: .8rem;
  color: var(--text-muted);
}

.auth-body {
  margin-top: .5rem;
}

/* Panels d’onglet */
.tab-panel {
  display: none;
  animation: fadeIn .25s ease-out;
}
.tab-panel.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Formulaires */
form.auth-form {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.field-label {
  font-size: .78rem;
  color: var(--text-muted);
}
.field-label span {
  color: #38bdf8;
}

/* Input de base réutilisable */
.input-base {
  width: 100%;
  border-radius: .55rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.7);
  padding: .5rem .65rem;
  color: var(--text);
  font-size: .8rem;
  outline: none;
  transition: .15s;
}
.input-base:focus {
  border-color: rgba(56,189,248,.8);
  box-shadow: 0 0 0 1px rgba(56,189,248,.4);
}

/* Grille 2 colonnes (pseudo + email, etc.) */
.two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
}

/* Ligne mot de passe oublié */
.forgot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: .15rem;
}
.forgot-link {
  font-size: .75rem;
  color: #38bdf8;
  text-decoration: none;
}
.forgot-link:hover {
  text-decoration: underline;
}

/* Bloc bouton + aide */
.auth-submit {
  margin-top: .4rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.helper-text {
  font-size: .7rem;
  color: var(--text-muted);
}

/* Bouton principal (réutilisé ailleurs aussi) */
/* (déjà défini plus haut sur .btn-primary, on garde le même) */

/* Input file stylé pour l’avatar */
.file-wrapper {
  position: relative;
}
.file-display {
  width: 100%;
  border-radius: .55rem;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.5);
  padding: .5rem .65rem;
  font-size: .75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}
.file-display span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-btn {
  font-size: .7rem;
  border-radius: .45rem;
  padding: .25rem .55rem;
  border: 1px solid rgba(56,189,248,.7);
  background: rgba(8,47,73,.6);
  color: var(--text);
  cursor: pointer;
}
input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* =========================================================
   10. PAGE AUTH — Colonne “marketing” à droite
   ========================================================= */
.auth-pill {
  font-size: .7rem;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: .1em;
  border-radius: 999px;
  padding: .18rem .7rem;
  border: 1px solid rgba(56,189,248,.5);
  background: rgba(15,23,42,.6);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.auth-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
}

.auth-side h2 {
  margin: 0;
  font-size: 1.05rem;
}
.auth-side p {
  margin: .25rem 0 0;
  font-size: .8rem;
  color: var(--text-muted);
}

.auth-benefits {
  margin-top: .7rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: .78rem;
}
.benefit-row {
  display: flex;
  gap: .45rem;
  align-items: flex-start;
}
.benefit-icon {
  width: 20px;
  height: 20px;
  border-radius: .5rem;
  border: 1px solid rgba(56,189,248,.5);
  display: grid;
  place-items: center;
  font-size: .8rem;
}
.gradient-orb {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(56,189,248,.15), transparent 65%);
  right: -40px;
  bottom: -80px;
  pointer-events: none;
}
.small-note {
  margin-top: auto;
  font-size: .7rem;
  color: var(--text-muted);
  opacity: .85;
}

/* =========================================================
   11. PAGE AUTH — Stepper quiz League of Legends
   (questions de placement à l’inscription)
   ========================================================= */
.quiz-stepper {
  margin-top: 1rem;
  padding: .9rem .9rem 1rem;
  border-radius: .9rem;
  background: radial-gradient(circle at 0 0, rgba(56,189,248,.12), rgba(15,23,42,.9));
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.quiz-stepper-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .7rem;
  margin-bottom: .75rem;
}
.quiz-title {
  margin: 0;
  font-size: .9rem;
  font-weight: 600;
}
.quiz-subtitle {
  margin: .15rem 0 0;
  font-size: .72rem;
  color: var(--text-muted);
}
.quiz-counter {
  font-size: .72rem;
  color: var(--text-muted);
  padding: .15rem .5rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.45);
  background: rgba(15,23,42,.75);
}

/* Pastilles 1 à 6 + lignes progress */
.quiz-steps {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .75rem;
}
.quiz-step {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.45);
  background: rgba(15,23,42,.9);
  display: grid;
  place-items: center;
  font-size: .7rem;
  color: var(--text-muted);
  position: relative;
  transition: .15s;
}
.quiz-step.active {
  border-color: rgba(56,189,248,.9);
  color: #e5f3ff;
  box-shadow: 0 0 0 1px rgba(56,189,248,.6);
  background: radial-gradient(circle at 30% 0, rgba(56,189,248,.5), rgba(15,23,42,1));
}
.quiz-step.completed {
  border-color: rgba(34,197,94,.8);
  background: radial-gradient(circle at 30% 0, rgba(34,197,94,.45), rgba(15,23,42,1));
  color: #bbf7d0;
}
.quiz-step-line {
  flex: 1;
  height: 2px;
  border-radius: 999px;
  background: rgba(51,65,85,.9);
  position: relative;
  overflow: hidden;
}
.quiz-step-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(56,189,248,.9), rgba(34,197,94,.9));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .2s ease-out;
}
.quiz-step-line.completed::after {
  transform: scaleX(1);
}

/* Contenu des questions */
.quiz-panels {
  border-radius: .7rem;
  background: rgba(15,23,42,.9);
  border: 1px solid rgba(15,23,42,1);
  padding: .7rem .7rem .6rem;
  margin-bottom: .7rem;
}
.quiz-panel {
  display: none;
  animation: quizFade .2s ease-out;
}
.quiz-panel.active {
  display: block;
}
@keyframes quizFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-question {
  font-size: .8rem;
  margin-bottom: .5rem;
}
.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem;
}
@media (max-width: 520px) {
  .quiz-options {
    grid-template-columns: minmax(0, 1fr);
  }
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .45rem;
  border-radius: .55rem;
  border: 1px solid rgba(51,65,85,.9);
  background: rgba(15,23,42,.95);
  font-size: .78rem;
  cursor: pointer;
  transition: .15s;
}
.quiz-option input {
  accent-color: #38bdf8;
}
.quiz-option:hover {
  border-color: rgba(56,189,248,.6);
  background: rgba(15,23,42,.95);
}
.quiz-option input:checked + span {
  color: #e0f2fe;
  font-weight: 500;
}

/* Navigation du stepper */
.quiz-nav {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .72rem;
}
.quiz-nav-btn {
  border-radius: .6rem;
  padding: .35rem .75rem;
  border: 1px solid rgba(148,163,184,.5);
  background: rgba(15,23,42,.9);
  color: var(--text);
  font-size: .75rem;
  cursor: pointer;
  transition: .15s;
}
.quiz-nav-btn:hover:not(:disabled) {
  border-color: rgba(56,189,248,.8);
  box-shadow: 0 0 0 1px rgba(56,189,248,.35);
}
.quiz-nav-btn:disabled {
  opacity: .45;
  cursor: default;
}
.quiz-hint {
  flex: 1;
  text-align: center;
  color: var(--text-muted);
}

/* Animation erreur quand on essaie d’avancer sans répondre */
.quiz-panel-error {
  animation: quizShake .18s linear 0s 2;
  border-color: rgba(248,113,113,.9) !important;
}
@keyframes quizShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}


/* =========================================================
   12. PAGE AUTH — Alertes (erreur / succès)
   ========================================================= */

.auth-alert {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 1.2rem;
  padding: .75rem 1rem;
  border-radius: .65rem;
  font-size: .78rem;
  font-weight: 500;
  text-align: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
  animation: fadeIn .25s ease-out;
}

/* Erreur */
.auth-alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, .5);
  color: #fecaca;
}

/* Succès */
.auth-alert-success {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, .5);
  color: #bbf7d0;
}

/* Responsive */
@media (max-width: 720px) {
  .auth-alert {
    max-width: 95%;
    font-size: .75rem;
  }
}


/* =========================================================
   13. Messages d'erreur sous les boutons (login / register)
   ========================================================= */

.field-error {
  margin-top: .35rem;
  font-size: .75rem;
  color: #fecaca;
  padding: .35rem .55rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: .5rem;
}

/* =========================================================
   14. PAGE PROFIL UTILISATEUR — Colonne droite
   ========================================================= */

.profile-main {
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .4rem;
}

.profile-main-title {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.profile-main-title h1 {
  margin: 0;
  font-size: 1.1rem;
}

.profile-main-title p {
  margin: 0;
  font-size: .8rem;
  color: var(--text-muted);
}

.profile-status-pill {
  border-radius: 999px;
  padding: .2rem .75rem;
  font-size: .7rem;
  border: 1px solid rgba(56,189,248,.5);
  background: rgba(15,23,42,.85);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--text);
}

.profile-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.25);
}

.profile-main-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-sections {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .9fr);
  gap: 1rem;
  align-items: flex-start;
}

@media (max-width: 880px) {
  .profile-sections {
    grid-template-columns: minmax(0, 1fr);
  }
}

.profile-card-inner {
  background: rgba(15,23,42,.85);
  border-radius: .9rem;
  border: 1px solid rgba(148,163,184,.25);
  padding: .8rem .9rem .9rem;
}

.profile-section-title {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: 0 0 .6rem;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  font-size: .8rem;
}

/* Tag rang LoL */
.lol-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .18rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(234,179,8,.55);
  background: rgba(24,24,27,.9);
  font-size: .7rem;
  color: #facc15;
  margin-top: .25rem;
}

.lol-rank-pill span {
  color: #e5e7eb;
  font-size: .68rem;
}

/* Section sécurité */
.security-section {
  background: rgba(15,23,42,.9);
  border-radius: .9rem;
  border: 1px solid rgba(148,163,184,.25);
  padding: .8rem .9rem 1rem;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
}

@media (max-width: 900px) {
  .security-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.badge-soft {
  font-size: .7rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .18rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(56,189,248,.4);
  background: rgba(15,23,42,.8);
  color: var(--text-muted);
}

/* Bouton de sauvegarde du profil */
.profile-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: .3rem;
}

/* =========================================================
   15. CLASSEMENT — Classement général & classement entre amis
   ========================================================= */

.leaderboard-panel {
  padding: 1rem 1.2rem 1.2rem;
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: .75rem;
  margin-bottom: .9rem;
}

.leaderboard-title h1 {
  margin: 0;
  font-size: 1.1rem;
}

.leaderboard-title p {
  margin: .15rem 0 0;
  font-size: .8rem;
  color: var(--text-muted);
}

.leaderboard-badge {
  font-size: .72rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .3);
  background: rgba(15, 23, 42, .6);
  color: var(--text-muted);
}

/* Tableaux de classement (amis + global) */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

.leaderboard-table thead {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}

.leaderboard-table th,
.leaderboard-table td {
  padding: .45rem .5rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.leaderboard-table th:nth-child(1),
.leaderboard-table td:nth-child(1) {
  width: 45px;
  text-align: right;
  padding-right: .7rem;
}

.leaderboard-table th:nth-child(2),
.leaderboard-table td:nth-child(2) {
  width: 44px;
}

/* Cellule joueur */
.lb-user-cell {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.lb-avatar {
  width: 32px;
  height: 32px;
  border-radius: .6rem;
  background: radial-gradient(circle, #38bdf8 0%, #020617 70%);
  display: grid;
  place-items: center;
  font-size: .7rem;
  font-weight: 600;
  overflow: hidden;
}

.lb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lb-user-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* Pilule de rang + icône */
.lb-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .18rem .5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(15,23,42,.7);
  font-size: .7rem;
}

.lb-rank-icon {
  width: 27px;
  height: 27px;
  object-fit: contain;
  display: block;
}

/* Colonnes LP & winrate */
.lb-lp {
  font-variant-numeric: tabular-nums;
}

.lb-winrate {
  font-variant-numeric: tabular-nums;
}

/* Ligne de l'utilisateur connecté */
.lb-row-me {
  background: rgba(56, 189, 248, 0.04);
}

.lb-row-me td {
  border-bottom-color: rgba(56, 189, 248, 0.28);
}

.lb-row-me .lb-user-name {
  color: #e0f2fe;
}

/* Panel "classement entre amis" */
.friends-panel {
  padding: .9rem 1.1rem;
}

.friends-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .6rem;
}

.friends-header h2 {
  margin: 0;
  font-size: .95rem;
}

.friends-header p {
  margin: .15rem 0 0;
  font-size: .78rem;
  color: var(--text-muted);
}

.friends-form {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom: .4rem;
}

.friends-input {
  flex: 1;
  min-width: 200px;
}

.friends-input input {
  width: 100%;
  padding: .35rem .5rem;
  border-radius: .5rem;
  border: 1px solid rgba(148,163,184,.35);
  background: rgba(15,23,42,.8);
  color: var(--text);
  font-size: .8rem;
}

.friends-input input::placeholder {
  color: rgba(148,163,184,.7);
}

.friends-form button {
  border: none;
  border-radius: .6rem;
  padding: .38rem .8rem;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 100%);
  color: #020617;
}

.friends-mode-tag {
  font-size: .72rem;
  padding: .18rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(56,189,248,.5);
  background: rgba(8,47,73,.8);
  color: #e0f2fe;
}

/* Responsive classement */
@media (max-width: 720px) {
  .leaderboard-panel {
    padding: .8rem .8rem 1rem;
  }

  /* Option : cacher la colonne "win rate" sur mobile */
  .leaderboard-table th:nth-child(6),
  .leaderboard-table td:nth-child(6) {
    display: none;
  }
}

/* ============================================================
   QUESTIONS BONUS
   ============================================================ */

.bonus-page {
    display: grid;
    gap: 1rem;
}

.bonus-header {
    padding: 1rem;
}

.bonus-header-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.bonus-header h1 {
    margin: 0 0 .3rem;
    font-size: 1.1rem;
}

.bonus-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: .8rem;
}

.bonus-summary {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
}

.bonus-summary-item {
    padding: .65rem .75rem;
    border-radius: var(--radius-md);
    background: rgba(2, 6, 23, .25);
    border: 1px solid var(--border);
}

.bonus-summary-item span {
    display: block;
    color: var(--text-muted);
    font-size: .65rem;
    margin-bottom: .15rem;
}

.bonus-summary-item strong {
    font-size: 1rem;
}

.bonus-message {
    padding: .75rem 1rem;
    font-size: .75rem;
    font-weight: 700;
}

.bonus-message-success {
    color: #86efac;
    border-color: rgba(34, 197, 94, .15);
}

.bonus-message-error {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, .15);
}

.bonus-empty {
    padding: 1rem;
    color: var(--text-muted);
    font-size: .8rem;
}

.bonus-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.bonus-card {
    position: relative;
    min-height: 245px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, .45);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform .15s ease,
        border-color .15s ease,
        background .15s ease;
}

.bonus-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, .25);
    background: rgba(15, 23, 42, .58);
}

.bonus-card-image {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    display: block;
    background: rgba(2, 6, 23, .45);
}

.bonus-card-image-placeholder {
    width: 100%;
    aspect-ratio: 16 / 8;
    display: grid;
    place-items: center;
    background:
        radial-gradient(
            circle at top,
            rgba(56, 189, 248, .14),
            rgba(2, 6, 23, .15)
        );
    color: rgba(148, 163, 184, .35);
    font-size: 2rem;
}

.bonus-card-content {
    padding: .85rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bonus-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-bottom: .55rem;
}

.bonus-card h2 {
    margin: 0 0 .4rem;
    font-size: .92rem;
    line-height: 1.3;
}

.bonus-description {
    color: var(--text-muted);
    font-size: .73rem;
    line-height: 1.45;
    margin: 0 0 .8rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bonus-lp {
    display: inline-flex;
    align-items: center;
    padding: .2rem .5rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, .12);
    border: 1px solid rgba(56, 189, 248, .22);
    color: #bae6fd;
    font-size: .7rem;
    font-weight: 800;
}

.bonus-status {
    display: inline-flex;
    align-items: center;
    padding: .2rem .5rem;
    border-radius: 999px;
    font-size: .67rem;
    font-weight: 700;
}

.bonus-status-open {
    background: rgba(34, 197, 94, .12);
    color: #86efac;
}

.bonus-status-answer {
    background: rgba(56, 189, 248, .12);
    color: #bae6fd;
}

.bonus-status-closed {
    background: rgba(148, 163, 184, .12);
    color: var(--text-muted);
}

.bonus-status-win {
    background: rgba(34, 197, 94, .12);
    color: #86efac;
}

.bonus-status-lose {
    background: rgba(239, 68, 68, .10);
    color: #fca5a5;
}

.bonus-card-bottom {
    margin-top: auto;
    padding-top: .65rem;
    border-top: 1px solid var(--border);
}

.bonus-deadline {
    color: var(--text-muted);
    font-size: .68rem;
}

.bonus-answer {
    margin-top: .35rem;
    font-size: .72rem;
    color: var(--text);
}

.bonus-answer-box {
    margin-top: .8rem;
    border-top: 1px solid var(--border);
    padding-top: .7rem;
}

.bonus-answer-toggle {
    cursor: pointer;
    list-style: none;
    padding: .55rem .7rem;
    border-radius: .55rem;
    background: rgba(56, 189, 248, .10);
    border: 1px solid rgba(56, 189, 248, .18);
    color: #bae6fd;
    font-size: .72rem;
    font-weight: 800;
    text-align: center;
}

.bonus-answer-toggle::-webkit-details-marker {
    display: none;
}

.bonus-answer-box[open] .bonus-answer-toggle {
    margin-bottom: .7rem;
}

.bonus-answer-form {
    display: grid;
    gap: .65rem;
}

.bonus-choice-grid {
    display: grid;
    gap: .5rem;
}

.bonus-choice-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem;
    border-radius: .6rem;
    background: rgba(2, 6, 23, .30);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: .75rem;
    transition:
        border-color .15s ease,
        background .15s ease,
        transform .15s ease;
}

.bonus-choice-card:hover {
    border-color: rgba(56, 189, 248, .35);
    background: rgba(56, 189, 248, .07);
}

.bonus-choice-card:has(input:checked) {
    border-color: rgba(56, 189, 248, .65);
    background: rgba(56, 189, 248, .12);
}

.bonus-choice-card input {
    accent-color: var(--accent);
}

.bonus-choice-image {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: .45rem;
}

.bonus-choice-select {
    width: 100%;
    padding: .65rem .7rem;
    border-radius: .55rem;
    border: 1px solid var(--border);
    background: #0f172a;
    color: var(--text);
    font: inherit;
    font-size: .75rem;
    outline: none;
}

.bonus-choice-select:focus {
    border-color: rgba(56, 189, 248, .45);
}

.bonus-submit {
    border: 0;
    padding: .65rem .8rem;
    border-radius: .55rem;
    background: var(--accent);
    color: #082f49;
    font-weight: 900;
    font-size: .73rem;
    cursor: pointer;
    transition:
        filter .15s ease,
        transform .15s ease;
}

.bonus-submit:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* Résultat question bonus */
.bonus-result {
    margin-top: .8rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
    display: grid;
    gap: .55rem;
}

.bonus-result-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    font-size: .72rem;
}

.bonus-result-row span {
    color: var(--text-muted);
}

.bonus-result-row strong {
    text-align: right;
}

.bonus-result-verdict {
    margin-top: .15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .7rem;
    padding: .6rem .7rem;
    border-radius: .6rem;
    font-size: .72rem;
    font-weight: 800;
}

.bonus-result-correct {
    background: rgba(34, 197, 94, .10);
    border: 1px solid rgba(34, 197, 94, .18);
    color: #86efac;
}

.bonus-result-wrong {
    background: rgba(239, 68, 68, .08);
    border: 1px solid rgba(239, 68, 68, .15);
    color: #fca5a5;
}

/* Compteur Questions bonus dans le menu */
.nav-bonus-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

/* ============================================================
   QUESTIONS BONUS — TABLETTE
   ============================================================ */

@media (max-width: 900px) {

    .bonus-page {
        width: 100%;
        min-width: 0;
    }

    .bonus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .8rem;
    }

    .bonus-card {
        min-width: 0;
    }

    .bonus-header {
        padding: .9rem;
    }

    .bonus-summary {
        gap: .45rem;
    }
}

/* ============================================================
   QUESTIONS BONUS — MOBILE
   ============================================================ */

@media (max-width: 600px) {

    .bonus-page {
        width: 100%;
        gap: .75rem;
        min-width: 0;
    }

    .bonus-header {
        padding: .8rem;
        border-radius: .8rem;
    }

    .bonus-header-top {
        display: block;
    }

    .bonus-header h1 {
        font-size: 1rem;
        line-height: 1.25;
        margin-bottom: .35rem;
    }

    .bonus-header p {
        font-size: .72rem;
        line-height: 1.45;
    }

    .bonus-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .35rem;
        margin-top: .7rem;
    }

    .bonus-summary-item {
        padding: .5rem .35rem;
        text-align: center;
        min-width: 0;
    }

    .bonus-summary-item span {
        font-size: .56rem;
        line-height: 1.2;
        margin-bottom: .15rem;
    }

    .bonus-summary-item strong {
        font-size: .9rem;
    }

    .bonus-grid {
        grid-template-columns: 1fr;
        gap: .7rem;
    }

    .bonus-card {
        min-height: 0;
        border-radius: .8rem;
    }

    .bonus-card:hover {
        transform: none;
    }

    .bonus-card-image,
    .bonus-card-image-placeholder {
        aspect-ratio: 16 / 6;
    }

    .bonus-card-image-placeholder {
        font-size: 1.5rem;
    }

    .bonus-card-content {
        padding: .75rem;
    }

    .bonus-card-top {
        margin-bottom: .45rem;
        gap: .35rem;
    }

    .bonus-card h2 {
        font-size: .88rem;
        line-height: 1.3;
        margin-bottom: .35rem;
    }

    .bonus-description {
        font-size: .7rem;
        line-height: 1.4;
        margin-bottom: .6rem;
        -webkit-line-clamp: 4;
    }

    .bonus-lp,
    .bonus-status {
        font-size: .62rem;
        padding: .18rem .42rem;
        white-space: nowrap;
    }

    .bonus-card-bottom {
        padding-top: .55rem;
    }

    .bonus-deadline {
        font-size: .63rem;
    }

    .bonus-answer {
        font-size: .68rem;
    }

    .bonus-answer-box {
        margin-top: .65rem;
        padding-top: .6rem;
    }

    .bonus-answer-toggle {
        width: 100%;
        padding: .65rem;
        font-size: .7rem;
        border-radius: .55rem;
        touch-action: manipulation;
    }

    .bonus-answer-form {
        gap: .5rem;
    }

    .bonus-choice-grid {
        gap: .4rem;
    }

    .bonus-choice-card {
        width: 100%;
        padding: .7rem .65rem;
        gap: .5rem;
        font-size: .72rem;
        min-height: 46px;
    }

    .bonus-choice-card input {
        width: 17px;
        height: 17px;
        flex: 0 0 auto;
    }

    .bonus-choice-image {
        width: 34px;
        height: 34px;
        flex: 0 0 auto;
    }

    .bonus-choice-select {
        min-height: 44px;
        padding: .65rem;
        font-size: 16px;
    }

    .bonus-submit {
        width: 100%;
        min-height: 44px;
        padding: .7rem;
        font-size: .72rem;
    }

    .bonus-result {
        gap: .45rem;
        margin-top: .65rem;
        padding-top: .6rem;
    }

    .bonus-result-row {
        display: grid;
        grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
        gap: .5rem;
        align-items: start;
        font-size: .68rem;
    }

    .bonus-result-row strong {
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: right;
    }

    .bonus-result-verdict {
        padding: .55rem .6rem;
        font-size: .68rem;
        gap: .4rem;
        flex-wrap: wrap;
    }

    .bonus-message {
        padding: .65rem .75rem;
        font-size: .7rem;
    }
}

/* ============================================================
   QUESTIONS BONUS — TRÈS PETITS ÉCRANS
   ============================================================ */

@media (max-width: 390px) {

    .bonus-summary {
        gap: .25rem;
    }

    .bonus-summary-item {
        padding: .45rem .2rem;
    }

    .bonus-summary-item span {
        font-size: .52rem;
    }

    .bonus-summary-item strong {
        font-size: .82rem;
    }

    .bonus-card-content {
        padding: .65rem;
    }

    .bonus-card-top {
        align-items: flex-start;
    }

    .bonus-lp,
    .bonus-status {
        font-size: .58rem;
    }

    .bonus-result-row {
        grid-template-columns: 1fr;
        gap: .15rem;
    }

    .bonus-result-row strong {
        text-align: left;
    }
}
