/* ==========================================================================
   GLOBAL.CSS — Styles partagés sur toutes les pages
   ========================================================================== */

/* --- Variables de thème --- */
:root {
    --gold: #fbbf24;
    --gold-dark: #b45309;
    --epic-grad: linear-gradient(180deg, #2d2d2d 0%, #1a1a1a 100%);
    --inner-shadow: inset 0 0 15px rgba(0,0,0,0.5);
    --border-epic: 1px solid rgba(251, 191, 36, 0.3);
}

/* --- Reset de base --- */
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    background: var(--epic-grad);
    border-bottom: 2px solid var(--gold-dark);
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    position: sticky;
    top: 0;
    z-index: 999;
    flex-shrink: 0;
}

.site-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 70px;
    flex-wrap: nowrap;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: var(--gold);
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
    letter-spacing: 1px;
    flex-shrink: 0;
}

.nav {
    display: flex;
    gap: 2px;
    flex-wrap: nowrap;
    justify-content: center;
    flex: 1;
}

.nav a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 8px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid transparent;
}

.nav a:hover {
    color: var(--gold);
    background: rgba(255, 255, 255, 0.05);
    border: var(--border-epic);
    box-shadow: var(--inner-shadow);
}

.lang-switch {
    background: rgba(0,0,0,0.3);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.lang-switch a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.lang-switch a.active {
    color: var(--gold);
    font-weight: bold;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer,
footer {
    flex-shrink: 0;
    text-align: center;
    padding: 15px;
    background: #1a1a1a;
    color: white;
    font-size: 0.8rem;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1e293b;
    border: 2px solid var(--gold-dark);
    color: white;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    border-radius: 12px;
    padding: 25px;
    width: 350px;
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content h2 {
    color: var(--gold);
    text-align: center;
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
    padding-bottom: 15px;
}

.modal-content input[type="text"],
.modal-content input[type="password"],
.modal-content input[type="email"] {
    width: 100%;
    padding: 8px;
    margin: 8px 0 15px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.close {
    position: absolute;
    right: 10px;
    top: 8px;
    font-size: 20px;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   ALERTES GLOBALES
   ========================================================================== */
.alert-error {
    background: #ffdddd;
    border: 1px solid #ff5c5c;
    color: #a60000;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.alert-success {
    background: #ddffdd;
    border: 1px solid #5cb85c;
    color: #006600;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.error { color: red; }

/* ==========================================================================
   BOUTONS COMMUNS
   ========================================================================== */
.btn-primary, .btn-secondary {
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    text-decoration: none;
}

.btn-primary {
    background-color: #ffcc00;
    color: #000;
    font-weight: bold;
}

.btn-secondary {
    background-color: #333;
    color: #fff;
}

/* ==========================================================================
   RESPONSIVE — Tablette & Mobile
   ========================================================================== */
@media (max-width: 1024px) {
    .nav { gap: 2px; }
    .nav a { font-size: 0.85rem; padding: 6px 10px; }
}

@media (max-width: 768px) {
    .site-header__inner {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    .nav {
        justify-content: center;
        width: 100%;
    }
    .nav a {
        background: rgba(255,255,255,0.03);
        flex: 1 1 40%;
        text-align: center;
        font-size: 0.8rem;
    }
    .logo { font-size: 1.5rem; }
}
