/* =============================================================================
   design-system.css — Source de vérité visuelle.

   Inspiration : produits modernes de gestion de tournoi (WSOP App, Bravo Live,
   DraftKings) — fond très sombre, contraste élevé, accent gold/orange poker,
   typographie franche, composants à fort poids visuel.
   ============================================================================= */

/* ============================================================================
   1. TOKENS — couleurs, espacements, typo, ombres
   ============================================================================ */
:root {
    /* --- Surfaces (du plus sombre au plus clair) --- */
    --surface-base: #07090d;   /* fond de page                                 */
    --surface-1:    #11151c;   /* card de base                                 */
    --surface-2:    #181d27;   /* card élevée, header de card                  */
    --surface-3:    #232936;   /* input, hover state, badge soft               */
    --surface-4:    #2d3545;   /* sélection, élément actif                     */
    --surface-5:    #3a4257;   /* outline highlight                            */

    /* --- Bordures --- */
    --border-subtle:  rgba(255, 255, 255, 0.06);
    --border:         rgba(255, 255, 255, 0.1);
    --border-strong:  rgba(255, 255, 255, 0.18);
    --border-focus:   rgba(241, 196, 15, 0.6);

    /* --- Texte (FORT contraste) --- */
    --text-primary:   #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted:     #94a3b8;
    --text-faint:     #64748b;
    --text-disabled:  #475569;

    /* --- Brand (poker = gold) --- */
    --brand:        #fbbf24;
    --brand-bright: #fcd34d;
    --brand-deep:   #d97706;
    --brand-soft:   rgba(251, 191, 36, 0.14);
    --brand-glow:   rgba(251, 191, 36, 0.4);

    /* --- Accent secondaire (orange feu) --- */
    --accent:        #fb923c;
    --accent-bright: #fdba74;
    --accent-deep:   #ea580c;
    --accent-soft:   rgba(251, 146, 60, 0.14);

    /* --- Sémantique — couleurs SATURÉES, pas pastels --- */
    --success:        #22c55e;   /* vert vif    */
    --success-bright: #4ade80;
    --success-soft:   rgba(34, 197, 94, 0.14);

    --danger:        #ef4444;
    --danger-bright: #f87171;
    --danger-soft:   rgba(239, 68, 68, 0.16);

    --warning:        #f59e0b;
    --warning-soft:   rgba(245, 158, 11, 0.14);

    --info:        #3b82f6;
    --info-bright: #60a5fa;
    --info-soft:   rgba(59, 130, 246, 0.14);

    --purple:      #a855f7;
    --purple-soft: rgba(168, 85, 247, 0.14);

    /* --- Espacements (échelle 4 px) --- */
    --space-0:  0;
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  20px;
    --space-6:  24px;
    --space-7:  28px;
    --space-8:  32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-14: 56px;
    --space-16: 64px;
    --space-20: 80px;

    /* --- Typographie --- */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --text-xs:   0.75rem;   /* 12 */
    --text-sm:   0.875rem;  /* 14 */
    --text-base: 1rem;      /* 16 */
    --text-lg:   1.125rem;  /* 18 */
    --text-xl:   1.25rem;   /* 20 */
    --text-2xl:  1.5rem;    /* 24 */
    --text-3xl:  1.875rem;  /* 30 */
    --text-4xl:  2.25rem;   /* 36 */
    --text-5xl:  3rem;      /* 48 */

    /* --- Bordures / coins --- */
    --radius-sm:   6px;
    --radius:      10px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --radius-xl:   20px;
    --radius-full: 9999px;

    /* --- Ombres — subtiles mais réelles --- */
    --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow:     0 4px 12px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.6);
    --shadow-md:  0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg:  0 20px 50px rgba(0, 0, 0, 0.6);
    --shadow-glow-brand:   0 0 32px var(--brand-glow);
    --shadow-glow-success: 0 0 24px rgba(34, 197, 94, 0.3);

    /* --- Transitions --- */
    --t-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --t:      180ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 320ms cubic-bezier(0.4, 0, 0.2, 1);

    /* --- Z-layers --- */
    --z-nav:     500;
    --z-overlay: 1000;
    --z-modal:   2000;
    --z-toast:   5000;

    /* --- Layout --- */
    --container-sm: 600px;
    --container-md: 960px;
    --container-lg: 1280px;
    --container-xl: 1440px;
    --nav-height:   68px;
}

/* ============================================================================
   2. RESET & BASE
   ============================================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--surface-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.5;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.015em;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }

p { margin: 0; }
small { font-size: var(--text-sm); color: var(--text-muted); }

a {
    color: var(--brand);
    text-decoration: none;
    transition: color var(--t);
}
a:hover { color: var(--brand-bright); }

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--space-6) 0;
}

::selection { background: var(--brand); color: #000; }

/* Scrollbar */
*::-webkit-scrollbar         { width: 12px; height: 12px; }
*::-webkit-scrollbar-track   { background: transparent; }
*::-webkit-scrollbar-thumb   { background: var(--surface-3); border-radius: var(--radius-full); border: 3px solid var(--surface-base); }
*::-webkit-scrollbar-thumb:hover { background: var(--surface-4); }

/* ============================================================================
   3. UTILITIES
   ============================================================================ */
.container        { max-width: var(--container-lg); margin: 0 auto; padding: 0 var(--space-5); }
.container-sm     { max-width: var(--container-sm); margin: 0 auto; padding: 0 var(--space-5); }
.container-md     { max-width: var(--container-md); margin: 0 auto; padding: 0 var(--space-5); }
.container-xl     { max-width: var(--container-xl); margin: 0 auto; padding: 0 var(--space-5); }

.text-primary   { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-faint     { color: var(--text-faint) !important; }
.text-brand     { color: var(--brand) !important; }
.text-accent    { color: var(--accent) !important; }
.text-success   { color: var(--success) !important; }
.text-danger    { color: var(--danger) !important; }
.text-warning   { color: var(--warning) !important; }
.text-info      { color: var(--info) !important; }
.text-center    { text-align: center; }
.text-right     { text-align: right; }
.text-mono      { font-family: var(--font-mono); }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.05em; }

.flex            { display: flex; }
.flex-col        { display: flex; flex-direction: column; }
.items-center    { align-items: center; }
.items-start     { align-items: flex-start; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.flex-wrap       { flex-wrap: wrap; }
.flex-1          { flex: 1; }
.gap-1 { gap: var(--space-1); } .gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); } .gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); } .gap-6 { gap: var(--space-6); }

.mt-0 { margin-top: 0; }       .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: var(--space-2); } .mb-2 { margin-bottom: var(--space-2); }
.mt-4 { margin-top: var(--space-4); } .mb-4 { margin-bottom: var(--space-4); }
.mt-6 { margin-top: var(--space-6); } .mb-6 { margin-bottom: var(--space-6); }
.mt-8 { margin-top: var(--space-8); } .mb-8 { margin-bottom: var(--space-8); }

.w-full { width: 100%; }
.hidden { display: none !important; }

/* ============================================================================
   4. BOUTONS — charte stricte 3 couleurs
   ----------------------------------------------------------------------------
   Variantes autorisées (et SEULES) :
     • ds-btn-primary  → CTA principal     (gold gradient, UN par vue)
     • ds-btn          → action secondaire (surface-3 neutre)
     • ds-btn-ghost    → action tertiaire  (transparent + bordure)
     • ds-btn-danger   → destruction uniquement
   Le vert/bleu/violet/orange sont RÉSERVÉS aux status badges, jamais boutons.
   ============================================================================ */
.ds-btn,
.btn-main,
.btn-action,
.btn-approve,
.btn-reject,
.btn-return,
.btn-small,
.btn-open-main,
.btn-direct,
.btn-sub-action,
.btn-small-off,
.btn-create-poker,
.btn-edit-user,
.btn-blue-sm,
.btn-action-icon,
.btn-td-header,
.btn-td-action,
.btn-blue-action,
.btn-gray-action,
.btn-red-action,
.btn-out,
.btn-move,
.btn-reentry,
.btn-link-social,
.tpl-btn,
.btn-delete-opt,
.btn-fast-clock,
.killer-btn,
.btn-bulk,
.btn-save,
.btn-add,
.btn-delete,
.btn-close,
.btn-cancel,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-3);
    color: var(--text-primary);
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--t), border-color var(--t), transform var(--t-fast), color var(--t), box-shadow var(--t);
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.ds-btn:hover,
.btn-main:hover,
.btn-action:hover,
.btn-small:hover,
.btn-direct:hover,
.btn-sub-action:hover,
.btn-action-icon:hover,
.btn-blue-sm:hover,
.btn-small-off:hover,
.btn-edit-user:hover,
.btn-td-header:hover,
.btn-td-action:hover,
.btn-blue-action:hover,
.btn-gray-action:hover,
.btn-link-social:hover,
.tpl-btn:hover,
.btn-add:hover,
.btn-secondary:hover,
.btn-cancel:hover {
    background: var(--surface-4);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}
.ds-btn:active,
.btn-main:active,
.btn-action:active { transform: translateY(0); }

.ds-btn:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.ds-btn[disabled],
.ds-btn:disabled,
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ──────── PRIMARY (gold gradient — UN seul CTA par vue) ──────── */
.ds-btn-primary,
.btn-main,
.btn-approve,
.btn-create-poker,
.btn-open-main,
.btn-save {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    color: #1a0f00 !important;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}
.ds-btn-primary:hover,
.btn-main:hover,
.btn-approve:hover,
.btn-create-poker:hover,
.btn-open-main:hover,
.btn-save:hover {
    background: linear-gradient(135deg, var(--brand-bright) 0%, var(--brand) 100%);
    color: #1a0f00 !important;
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.45);
    transform: translateY(-1px);
    border-color: transparent;
}

/* ──────── GHOST (transparent + bordure) — action tertiaire ──────── */
.ds-btn-ghost,
.btn-return,
.btn-sub-action,
.btn-action-icon,
.btn-close,
.btn-cancel {
    background: transparent;
    border-color: var(--border);
    color: var(--text-secondary);
}
.ds-btn-ghost:hover,
.btn-return:hover,
.btn-sub-action:hover,
.btn-action-icon:hover,
.btn-close:hover,
.btn-cancel:hover {
    background: var(--surface-2);
    color: var(--text-primary);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

/* ──────── DANGER (rouge — destruction UNIQUEMENT, hover only) ──────── */
.ds-btn-danger,
.btn-reject,
.btn-out,
.btn-red-action {
    background: var(--danger);
    color: white !important;
    border-color: transparent;
}
.ds-btn-danger:hover,
.btn-reject:hover,
.btn-out:hover,
.btn-red-action:hover {
    background: var(--danger-bright);
    color: white !important;
    border-color: transparent;
}

/* .btn-delete : ghost par défaut, rouge UNIQUEMENT au hover (cas le plus fréquent) */
.btn-delete,
.btn-sub-action.delete,
.btn-action-icon.btn-delete {
    background: transparent !important;
    color: var(--text-muted) !important;
    border-color: var(--border) !important;
}
.btn-delete:hover,
.btn-sub-action.delete:hover,
.btn-action-icon.btn-delete:hover {
    background: var(--danger-soft) !important;
    color: var(--danger-bright) !important;
    border-color: var(--danger) !important;
}

/* Tailles */
.ds-btn-sm { padding: 6px 12px; font-size: var(--text-xs); }
.ds-btn-lg { padding: 13px 22px; font-size: var(--text-base); }
.ds-btn-block, .btn-main { width: 100%; }

/* ──────── ALIAS sémantiques : tout reste en neutre/primary/ghost ──────── */
/* Les classes legacy "colorées" sont nivelées vers le système :
   - btn-green / btn-action.btn-green / btn-purple / btn-blue / btn-blue-sm / btn-blue-action
     → restent en .ds-btn neutre (CTA principal de la vue prend .ds-btn-primary explicitement). */

.btn-action.btn-green,
.btn-action.btn-purple,
.btn-action.btn-blue {
    background: var(--surface-3);
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-action.btn-green:hover,
.btn-action.btn-purple:hover,
.btn-action.btn-blue:hover {
    background: var(--surface-4);
    border-color: var(--border-strong);
}

/* Quand l'auteur veut explicitement marquer une action comme CTA principal,
   ajouter la classe .is-primary à n'importe quel bouton. */
.is-primary,
.btn-action.is-primary,
.btn-direct.is-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%) !important;
    color: #1a0f00 !important;
    border-color: transparent !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}
.is-primary:hover {
    background: linear-gradient(135deg, var(--brand-bright) 0%, var(--brand) 100%) !important;
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.45) !important;
    transform: translateY(-1px);
}

/* ============================================================================
   5. CARTES
   ============================================================================ */
.ds-card,
.card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.ds-card-elevated {
    background: var(--surface-2);
    box-shadow: var(--shadow);
    border-color: var(--border-strong);
}

.ds-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
}

.ds-card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================================================
   6. FORMULAIRES
   ============================================================================ */
.ds-input,
input[type="text"]:not(.no-ds),
input[type="email"]:not(.no-ds),
input[type="password"]:not(.no-ds),
input[type="number"]:not(.no-ds),
input[type="search"]:not(.no-ds),
input[type="tel"]:not(.no-ds),
input[type="url"]:not(.no-ds),
input[type="date"]:not(.no-ds),
input[type="datetime-local"]:not(.no-ds),
input[type="time"]:not(.no-ds),
select:not(.no-ds),
textarea:not(.no-ds) {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: var(--text-base);
    line-height: 1.4;
    transition: border-color var(--t), background var(--t), box-shadow var(--t);
    appearance: none;
}

textarea:not(.no-ds) { resize: vertical; min-height: 100px; }

input:not(.no-ds):focus,
select:not(.no-ds):focus,
textarea:not(.no-ds):focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface-3);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

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

.ds-label,
label.ds-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group { margin-bottom: var(--space-4); }
.input-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

/* Chevron custom pour select */
select:not(.no-ds) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }

/* ============================================================================
   7. BADGES — couleurs SOLIDES (pas pastels)
   ============================================================================ */
.ds-badge,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    background: var(--surface-3);
    color: var(--text-secondary);
}

.ds-badge-brand    { background: var(--brand);   color: #1a0f00; }
.ds-badge-success,
.badge-live        { background: var(--success); color: #052e10; }
.ds-badge-danger   { background: var(--danger);  color: white; }
.ds-badge-warning  { background: var(--warning); color: #1a0f00; }
.ds-badge-info     { background: var(--info);    color: white; }
.ds-badge-muted,
.badge-done        { background: var(--surface-3); color: var(--text-muted); }
.ds-badge-soft-brand   { background: var(--brand-soft);   color: var(--brand-bright); }
.ds-badge-soft-success { background: var(--success-soft); color: var(--success-bright); }
.ds-badge-soft-danger  { background: var(--danger-soft);  color: var(--danger-bright); }
.ds-badge-soft-info    { background: var(--info-soft);    color: var(--info-bright); }

/* Statut tournois — couleurs solides bien lisibles */
.status-live     { background: var(--danger);    color: white; }
.status-planned  { background: var(--info);      color: white; }
.status-finished { background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border); }
.status-open     { background: var(--success);    color: white; }

/* ============================================================================
   8. ALERTES
   ============================================================================ */
.ds-alert,
.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-primary);
    font-size: var(--text-sm);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    line-height: 1.5;
}

.ds-alert-success { background: var(--success-soft); border-color: var(--success); color: var(--success-bright); }
.ds-alert-danger  { background: var(--danger-soft);  border-color: var(--danger);  color: var(--danger-bright); }
.ds-alert-warning { background: var(--warning-soft); border-color: var(--warning); color: var(--warning); }
.ds-alert-info    { background: var(--info-soft);    border-color: var(--info);    color: var(--info-bright); }

/* ============================================================================
   9. TABLES
   ============================================================================ */
.ds-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
    font-size: var(--text-sm);
}
.ds-table th {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    background: var(--surface-2);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--text-xs);
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}
.ds-table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
}
.ds-table tr:hover td { background: var(--surface-2); }

/* ============================================================================
   10. NAVIGATION
   ============================================================================ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: var(--z-nav);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    background: rgba(7, 9, 13, 0.92);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-lg);
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.02em;
}
.logo span { color: var(--brand); }
.logo:hover { color: var(--text-primary); }

.nav-container { display: flex; align-items: center; gap: var(--space-3); }

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 12px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--text-sm);
    text-decoration: none;
    transition: color var(--t), background var(--t);
}
.nav-links li a:hover {
    color: var(--text-primary);
    background: var(--surface-2);
}

.nav-links .logout-link { color: var(--danger-bright) !important; }
.nav-links .logout-link:hover { background: var(--danger-soft); color: var(--danger-bright) !important; }

.burger-menu {
    display: none;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 1.1rem;
    padding: 8px 12px;
    border-radius: var(--radius);
    cursor: pointer;
}

/* Switch view button (admin <-> player) */
.btn-switch {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--brand-soft);
    color: var(--brand);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all var(--t);
}
.btn-switch:hover { background: var(--brand); color: #1a0f00; }
.btn-switch.to-player { background: var(--info-soft); color: var(--info-bright); }
.btn-switch.to-player:hover { background: var(--info); color: white; }

@media (max-width: 992px) {
    .burger-menu { display: inline-flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--surface-1);
        border-bottom: 1px solid var(--border);
        padding: var(--space-3);
        box-shadow: var(--shadow-md);
    }
    .nav-links.active { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links li a { width: 100%; padding: 14px var(--space-4); }
}

/* Auth buttons (non logué) */
.auth-buttons .btn-login-head {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 18px;
    border-radius: var(--radius);
    background: var(--brand);
    color: #1a0f00;
    font-weight: 700;
    font-size: var(--text-sm);
    text-decoration: none;
    transition: background var(--t);
}
.auth-buttons .btn-login-head:hover { background: var(--brand-bright); color: #1a0f00; }

/* ============================================================================
   11. PAGE LAYOUT
   ============================================================================ */
.page {
    padding-top: calc(var(--nav-height) + var(--space-8));
    padding-bottom: var(--space-12);
    min-height: 100vh;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}
.page-header h1 {
    font-size: var(--text-3xl);
    font-weight: 800;
    letter-spacing: -0.02em;
}
.page-header .subtitle,
.page-header p { color: var(--text-muted); margin-top: 4px; }

.section { margin-bottom: var(--space-10); }
.section-title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-4);
}

/* ============================================================================
   12. MODALES
   ============================================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--space-4);
}

.modal-overlay .modal-content,
.ds-modal {
    background: var(--surface-1);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

/* ============================================================================
   13. FOOTER
   ============================================================================ */
.main-footer {
    margin-top: var(--space-16);
    padding: var(--space-6) var(--space-4);
    text-align: center;
    color: var(--text-faint);
    font-size: var(--text-sm);
    border-top: 1px solid var(--border-subtle);
}
.main-footer .footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 var(--space-2);
}
.main-footer .footer-link:hover { color: var(--brand); }
.main-footer .version-tag {
    font-family: var(--font-mono);
    color: var(--text-faint);
    font-size: var(--text-xs);
}
