/* ============================================================
   VAELORIA — CSS Principal
   Thème : Dark médiéval fantastique
   ============================================================ */

/* --- Variables globales --- */
:root {
    --color-bg:           #0a0a0f;
    --color-bg-panel:     #11111a;
    --color-bg-card:      #1a1a28;
    --color-border:       #2e2e4a;
    --color-border-gold:  #8a6a1a;
    --color-gold:         #c8922a;
    --color-gold-light:   #e8b84a;
    --color-red:          #8b1a1a;
    --color-red-light:    #c0392b;
    --color-text:         #d4c9a8;
    --color-text-muted:   #7a7060;
    --color-text-light:   #f0e8cc;
    --color-success:      #2e7d32;
    --color-error:        #c0392b;

    --font-title:   'Cinzel', serif;
    --font-body:    'Crimson Text', serif;

    --radius:       4px;
    --radius-lg:    8px;
    --shadow:       0 4px 24px rgba(0,0,0,0.6);
    --shadow-gold:  0 0 12px rgba(200,146,42,0.3);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 52px;
    background: linear-gradient(90deg, #0d0d18 0%, #14141f 50%, #0d0d18 100%);
    border-bottom: 1px solid var(--color-border-gold);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(0,0,0,0.8);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-logo {
    font-size: 20px;
    color: var(--color-gold);
}

.navbar-title {
    font-family: var(--font-title);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-gold-light);
    letter-spacing: 4px;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s;
}
.nav-link:hover { color: var(--color-gold-light); }
.nav-separator { color: var(--color-border); }
.nav-player { color: var(--color-gold); font-size: 14px; }
.nav-logout { color: var(--color-text-muted); font-size: 13px; }
.nav-logout:hover { color: var(--color-red-light); }

/* --- Main content --- */
.main-content {
    min-height: 100vh;
    padding-top: 52px;
}

/* --- Pages auth (login / register) --- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(139,26,26,0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(42,42,80,0.3) 0%, transparent 60%),
        var(--color-bg);
    padding: 24px;
}

.auth-container {
    width: 100%;
    max-width: 460px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    font-size: 40px;
    margin-bottom: 8px;
}

.auth-title {
    font-family: var(--font-title);
    font-size: 32px;
    font-weight: 700;
    color: var(--color-gold-light);
    letter-spacing: 6px;
    text-shadow: 0 0 20px rgba(200,146,42,0.4);
}

.auth-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-top: 6px;
    font-style: italic;
}

.auth-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-top: 2px solid var(--color-border-gold);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}

.auth-card-title {
    font-family: var(--font-title);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: #0d0d18;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--color-text-light);
    font-family: var(--font-body);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-input:focus {
    border-color: var(--color-border-gold);
    box-shadow: 0 0 0 2px rgba(138,106,26,0.2);
}
.form-input::placeholder { color: var(--color-text-muted); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-hint {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 4px;
    font-style: italic;
}

/* Sélecteur de couleur */
.color-picker-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.color-preview {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}
input[type="color"] {
    width: 100%;
    height: 36px;
    background: #0d0d18;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 2px;
}

/* Séparateur de section */
.form-section {
    margin: 24px 0 18px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}
.form-section-title {
    font-family: var(--font-title);
    font-size: 13px;
    color: var(--color-gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

/* --- Boutons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-title);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #8a6a1a 0%, #c8922a 50%, #8a6a1a 100%);
    color: #0a0a0f;
    box-shadow: 0 2px 8px rgba(200,146,42,0.3);
    margin-top: 8px;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #a07a20 0%, #e8b84a 50%, #a07a20 100%);
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
}

/* --- Messages d'erreur --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-error {
    background: rgba(139,26,26,0.2);
    border: 1px solid var(--color-red);
    color: #e57373;
}
.alert-error ul { margin: 4px 0 0 16px; }

/* --- Lien bas de page auth --- */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--color-text-muted);
}
.auth-footer a {
    color: var(--color-gold);
    text-decoration: none;
}
.auth-footer a:hover { color: var(--color-gold-light); }

/* --- Bannière preview --- */
.banner-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #0d0d18;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-top: 12px;
}
.banner-shield {
    width: 44px;
    height: 52px;
    border-radius: 4px 4px 50% 50%;
    border: 2px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
    transition: background 0.3s;
}
.banner-info {
    font-size: 13px;
    color: var(--color-text-muted);
    font-style: italic;
}
.banner-name {
    font-family: var(--font-title);
    font-size: 15px;
    color: var(--color-text-light);
}
