/* ============================================================
   quelafamille — Styles globaux
   Coupe du Monde 2026 • Design immersif
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─── Variables ─── */
:root {
  color-scheme: dark;

  --bg:           #040c1a;
  --bg-surface:   #161a22;
  --bg-card:      #1e232c;
  --border:       rgba(255, 255, 255, 0.10);
  --border-hover: rgba(255, 255, 255, 0.18);

  --green:        #22c55e;
  --green-dark:   #16a34a;
  --green-light:  #4ade80;
  --green-glow:   rgba(34, 197, 94, 0.18);

  --gold:         #f59e0b;
  --gold-dark:    #d97706;
  --gold-glow:    rgba(245, 158, 11, 0.25);

  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --text-faint:   #475569;

  --danger:       #ef4444;
  --danger-bg:    rgba(239, 68, 68, 0.08);
  --danger-border:rgba(239, 68, 68, 0.25);

  --success:      #22c55e;
  --success-bg:   rgba(34, 197, 94, 0.08);
  --success-border:rgba(34, 197, 94, 0.25);

  --warning-bg:   rgba(245, 158, 11, 0.08);
  --warning-border:rgba(245, 158, 11, 0.25);

  --info-bg:      rgba(59, 130, 246, 0.08);
  --info-border:  rgba(59, 130, 246, 0.25);

  --r-sm:  6px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 28px;

  --shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* ════════════════════════════════════════════════════════════
   THÈME SOMBRE — modules un peu plus clairs que le fond
   (beaucoup de cartes étaient en rgba(255,255,255,.0X), trop sombres)
   ════════════════════════════════════════════════════════════ */
.stat-card,
.action-card,
.profil-card,
.fav-card,
.admin-card,
.group-standing-card,
.group-card,
.grp-standings,
.rank-table-wrap,
.scoring-ref,
.dash-match-col,
.adm-standing-box,
.bkt-round-col,
.rp-card,
.real-poules .rp-card {
  background: var(--bg-card);
}

/* ════════════════════════════════════════════════════════════
   THÈME CLAIR  ([data-theme="light"] sur <html>)
   ════════════════════════════════════════════════════════════ */
[data-theme="light"] {
  color-scheme: light;

  --bg:           #eef2f7;
  --bg-surface:   #ffffff;
  --bg-card:      #ffffff;
  --border:       rgba(15, 23, 42, 0.12);
  --border-hover: rgba(15, 23, 42, 0.22);

  --green-glow:   rgba(34, 197, 94, 0.16);
  --gold-glow:    rgba(245, 158, 11, 0.20);

  --text:         #0f172a;
  --text-muted:   #475569;
  --text-faint:   #94a3b8;

  --shadow:    0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-sm: 0 4px 18px rgba(15, 23, 42, 0.08);
}

/* Surfaces translucides "blanc sur sombre" → teinte sombre légère sur clair.
   Couvre les nombreuses cartes définies en rgba(255,255,255,.0X). */
[data-theme="light"] .stat-card,
[data-theme="light"] .action-card,
[data-theme="light"] .profil-card,
[data-theme="light"] .fav-card,
[data-theme="light"] .admin-card,
[data-theme="light"] .group-standing-card,
[data-theme="light"] .rank-table-wrap,
[data-theme="light"] .scoring-ref,
[data-theme="light"] .dash-match-col,
[data-theme="light"] .adm-standing-box,
[data-theme="light"] .bkt-round-col,
[data-theme="light"] .welcome-banner,
[data-theme="light"] .rank-hero,
[data-theme="light"] .podium-card {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

/* Barres / bandeaux translucides */
[data-theme="light"] .topbar,
[data-theme="light"] .mobile-nav,
[data-theme="light"] .bracket-save-bar,
[data-theme="light"] .group-save-strip,
[data-theme="light"] .legend-bar,
[data-theme="light"] .filter-tabs,
[data-theme="light"] .main-tabs {
  background: rgba(255, 255, 255, 0.92);
}

/* Petites surfaces internes (lignes, entêtes de tableau, inputs, puces) */
[data-theme="light"] .data-table th,
[data-theme="light"] .standing-table th,
[data-theme="light"] .adm-standing-hdr,
[data-theme="light"] .gsc-header,
[data-theme="light"] .dash-match-col-hdr,
[data-theme="light"] .admin-card-header,
[data-theme="light"] .sinp,
[data-theme="light"] .bkt-card,
[data-theme="light"] .bkt-rcard,
[data-theme="light"] .ko-team {
  background: rgba(15, 23, 42, 0.03);
}

/* Liens de nav au survol */
[data-theme="light"] .topbar-nav a:hover { background: rgba(15,23,42,.06); }

/* Inputs */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #ffffff;
  color: var(--text);
}

/* Body fond clair (l'auth utilise un fond à part, voir plus bas) */
[data-theme="light"] body { background: var(--bg); }

/* Alertes lisibles en thème clair (texte foncé sur fond teinté) */
[data-theme="light"] .alert-error   { background: #fef2f2; border-color: rgba(220,38,38,.35);  color: #991b1b; }
[data-theme="light"] .alert-success { background: #f0fdf4; border-color: rgba(22,163,74,.35);   color: #166534; }
[data-theme="light"] .alert-warning { background: #fffbeb; border-color: rgba(217,119,6,.4);    color: #92400e; }
[data-theme="light"] .alert-info    { background: #eff6ff; border-color: rgba(37,99,235,.35);   color: #1e40af; }
[data-theme="light"] .alert strong  { color: inherit; }

/* Bouton bascule de thème (dans le header) */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1rem; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
  flex-shrink: 0; line-height: 1; padding: 0;
}
.theme-toggle:hover { border-color: var(--gold); transform: scale(1.08); }
[data-theme="light"] .theme-toggle { background: rgba(15,23,42,.05); }

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--green); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-light); }
img { max-width: 100%; display: block; }

/* ============================================================
   AUTH PAGES
   ============================================================ */

.auth-bg {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 15% 0%,   rgba(34, 197, 94,  0.07) 0%, transparent 65%),
    radial-gradient(ellipse 55% 40% at 85% 100%,  rgba(245, 158, 11, 0.06) 0%, transparent 60%),
    linear-gradient(160deg, #040c1a 0%, #060f1c 55%, #040c1a 100%);
}

/* Ligne centrale (terrain) */
.auth-bg::before {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(34, 197, 94, 0.07) 20%,
    rgba(34, 197, 94, 0.07) 80%,
    transparent 100%
  );
  transform: translateX(-50%);
  pointer-events: none;
}

/* Cercle central (terrain) */
.auth-bg::after {
  content: '';
  position: absolute;
  width: 520px; height: 520px;
  border: 1px solid rgba(34, 197, 94, 0.04);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ── Logo ── */
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.auth-logo .trophy {
  font-size: 3.2rem;
  display: block;
  margin-bottom: 10px;
  animation: trophy-pulse 3s ease-in-out infinite;
}

@keyframes trophy-pulse {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(245,158,11,.55)); }
  50%       { filter: drop-shadow(0 0 32px rgba(245,158,11,.85)); }
}

.auth-logo h1 {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #f59e0b 10%, #fbbf24 50%, #f59e0b 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-logo .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 99px;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.4px;
}

/* ── Carte ── */
.auth-card {
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px;
  width: 100%;
  max-width: 450px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

.auth-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-card .card-sub {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 28px;
}

/* ── Footer liens ── */
.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.auth-footer a {
  color: var(--text-muted);
  font-weight: 500;
  transition: color .2s;
}

.auth-footer a:hover,
.auth-footer a strong { color: var(--green); }
.auth-footer a strong { font-weight: 700; }

/* ============================================================
   FORMULAIRES
   ============================================================ */

.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 7px;
  letter-spacing: 0.2px;
}

.input-wrap { position: relative; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 11px 16px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none;
  color-scheme: dark;
}

/* Options des listes déroulantes — thème sombre */
option,
optgroup {
  background-color: #0d1b2e;
  color: #f1f5f9;
}
option:checked,
option:hover {
  background-color: #16a34a;
  color: #fff;
}

input::placeholder,
textarea::placeholder { color: var(--text-faint); }

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.03);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Champ mot de passe avec toggle */
.input-wrap input[type="password"],
.input-wrap input[type="text"].pwd-field {
  padding-right: 46px;
}

.pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-faint);
  font-size: 1.1rem;
  line-height: 1;
  transition: color .2s;
  width: auto;
}

.pwd-toggle:hover { color: var(--green); }

/* Lien "Mot de passe oublié ?" dans le form */
.forgot-link {
  display: block;
  text-align: right;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: -10px;
  margin-bottom: 20px;
  transition: color .2s;
}

.forgot-link:hover { color: var(--green); }

/* ============================================================
   BOUTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: none;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #15803d, #22c55e);
  color: #fff;
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #166534, #16a34a);
  box-shadow: 0 6px 28px rgba(34, 197, 94, 0.42);
  color: #fff;
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-block { width: 100%; }

.btn[disabled],
.btn.loading { opacity: .7; cursor: not-allowed; pointer-events: none; }

/* Spinner dans le bouton */
.btn .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
}

.btn.loading .spinner { display: inline-block; }
.btn.loading .btn-text { display: none; }

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

/* ============================================================
   ALERTES / FLASH
   ============================================================ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  margin-bottom: 22px;
  line-height: 1.5;
}

.alert-icon { font-size: 1rem; flex-shrink: 0; padding-top: 1px; }

.alert-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: #fca5a5;
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: #86efac;
}

.alert-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: #fcd34d;
}

.alert-info {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  color: #93c5fd;
}

/* ============================================================
   SÉPARATEUR
   ============================================================ */

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-faint);
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   BOX DEV MODE (reset link affiché en local)
   ============================================================ */

.dev-box {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--r);
  padding: 18px;
  margin-top: 24px;
}

.dev-box .dev-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.dev-box .reset-url {
  word-break: break-all;
  font-size: 0.82rem;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 12px;
  border-radius: var(--r-sm);
  display: block;
  margin-top: 6px;
  font-family: monospace;
}

/* ============================================================
   DASHBOARD / PAGES INTERNES (placeholder Step 2)
   ============================================================ */

.topbar {
  background: rgba(8, 15, 30, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 24px;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.topbar-brand {
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-nav a {
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .2s;
}

.topbar-nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.topbar-nav a.active { color: var(--green); background: rgba(34,197,94,.08); }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--green);
  object-fit: cover;
}

.topbar-username {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.topbar-logout {
  padding: 5px 12px;
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all .2s;
}

.topbar-logout:hover {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ============================================================
   RESPONSIVE — AUTH
   ============================================================ */

@media (max-width: 520px) {
  .auth-card { padding: 28px 22px; border-radius: var(--r-lg); }
  .auth-logo h1 { font-size: 1.75rem; }
  .auth-logo .trophy { font-size: 2.6rem; }
}

/* ============================================================
   PHASE 8 — Design immersif final & responsive
   ============================================================ */

/* ─── Ambiance de fond (pages internes) ─────────────────────── */
body {
  background-image:
    radial-gradient(ellipse 75% 55% at 8% -8%,   rgba(22,163,74,.07)  0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 92% 108%, rgba(99,102,241,.06) 0%, transparent 55%);
}

/* ─── Scroll reveal ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .45s ease var(--reveal-delay, 0s),
              transform .45s ease var(--reveal-delay, 0s);
}
.reveal.revealed {
  opacity: 1;
  transform: none;
}

/* ─── Cards — hover glow ─────────────────────────────────────── */
.stat-card {
  transition: border-color .2s, box-shadow .25s, transform .2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card:hover {
  border-color: rgba(34, 197, 94, 0.2);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.06), var(--shadow-sm);
  transform: translateY(-2px);
}
.stat-card.stat-ok  { border-color: rgba(34,197,94,.25); }
.stat-card.stat-todo { border-color: rgba(245,158,11,.25); }

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.stat-badge {
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.badge-ok   { background: rgba(34,197,94,.12);  color: #4ade80; }
.badge-warn { background: rgba(245,158,11,.12); color: var(--gold); }

.stat-action-link {
  display: inline-block;
  margin-top: 10px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
}
.stat-action-link:hover { text-decoration: underline; }
.stat-action-link.stat-action-muted {
  color: var(--text-faint);
  font-weight: 500;
}
.stat-action-link.stat-action-muted:hover { color: var(--text-muted); }

/* ─── Dashboard — résultats / prochains matchs ───────────────── */
.dash-matches-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}
@media (max-width: 640px) {
  .dash-matches-grid { grid-template-columns: 1fr; }
}
.dash-match-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.dash-match-col-hdr {
  padding: 12px 18px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.dash-match-row {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.dash-match-row:last-child { border-bottom: none; }
.dash-match-teams {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dmt-side { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.dmt-home { justify-content: flex-start; }
.dmt-away { justify-content: flex-end; }
.dmt-away .dash-name { text-align: right; }
.dash-flag  { font-size: 1.15rem; flex-shrink: 0; }
.dash-name  { font-size: .85rem; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-score {
  font-size: .95rem;
  font-weight: 800;
  color: var(--green);
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.2);
  border-radius: 6px;
  padding: 2px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.dash-vs {
  font-size: .75rem;
  color: var(--text-faint);
  font-weight: 600;
  flex-shrink: 0;
}
.dash-match-date {
  font-size: .72rem;
  color: var(--text-faint);
  margin-top: 5px;
}

/* Prono de l'utilisateur connecté sous chaque match */
.dash-prono {
  font-size: .76rem;
  color: var(--text-muted);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}
.dash-prono strong { color: var(--text); font-weight: 800; font-size: 18px;}
.dash-prono .dp-pts { font-weight: 800; margin-left: 6px; }
.dash-prono .dp-pts.pos  { color: var(--green); }
.dash-prono .dp-pts.zero { color: #f87171; }
.dash-prono .dp-none { color: var(--text-faint); font-style: italic; }

/* ─── Bouton hamburger ───────────────────────────────────────── */
.topbar-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s, border-color .2s;
}
.topbar-hamburger:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

/* ─── Overlay mobile nav ─────────────────────────────────────── */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 199;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Panneau mobile nav ─────────────────────────────────────── */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 290px;
  background: #06101e;
  border-right: 1px solid var(--border);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mobile-nav-brand {
  font-size: 1.05rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mobile-nav-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  line-height: 1;
  transition: color .15s, background .15s;
}
.mobile-nav-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  color: var(--text-muted);
  font-size: .93rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .15s;
  text-decoration: none;
}
.mobile-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-left-color: rgba(34, 197, 94, 0.3);
}
.mobile-nav a.active {
  color: var(--green);
  font-weight: 700;
  background: rgba(34, 197, 94, 0.07);
  border-left-color: var(--green);
}
.mobile-nav-logout {
  color: #f87171 !important;
  border-left-color: transparent !important;
}
.mobile-nav-logout:hover {
  background: rgba(239, 68, 68, 0.06) !important;
  border-left-color: rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
}

.mobile-nav-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
  flex-shrink: 0;
}

.mobile-nav-user {
  margin: 6px 16px 4px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.mobile-nav-user img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--green);
  object-fit: cover;
  flex-shrink: 0;
}
.mobile-nav-user-info { flex: 1; min-width: 0; }
.mobile-nav-user-name {
  font-weight: 700;
  font-size: .88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-nav-user-role {
  font-size: .72rem;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  padding: 18px 24px;
  text-align: center;
  font-size: .74rem;
  color: var(--text-faint);
  letter-spacing: .3px;
}
.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-sep { opacity: .3; }

/* ─── Responsive topbar — mobile ────────────────────────────── */
@media (max-width: 760px) {
  .topbar-nav     { display: none !important; }
  .topbar-hamburger { display: flex !important; }
  .topbar-username  { display: none; }
  .topbar-logout    { display: none; }
}

@media (max-width: 520px) {
  .topbar { padding: 0 16px; }
  .page-content { padding: 24px 16px; }
}
