/* ////////////////////////////////////////////////////////
   SECTION 1 : VARIABLES GLOBALES & RESET
   //////////////////////////////////////////////////////// */
:root {
    --bleu-escrime: #0066cc;
    --or-lutte: #ffd700;
    --noir: #121212;
    --gris-clair: #f4f4f4;
    --blanc: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--gris-clair);
    color: var(--noir);
    line-height: 1.6;
}

/* ////////////////////////////////////////////////////////
   SECTION 2 : COMPOSANTS RÉUTILISABLES (UI)
   //////////////////////////////////////////////////////// */

/* Cartes (Cards) */
.card {
    background: var(--blanc);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 1rem;
}

/* Boutons personnalisés */
.btn-custom {
    display: inline-block;
    background-color: var(--bleu-escrime);
    color: var(--blanc);
    border: 2px solid var(--bleu-escrime);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    font-family: 'Rajdhani', sans-serif;
    transition: all 0.3s ease;
    width: 100%; /* Par défaut pour les formulaires */
}

.btn-custom:hover {
    background-color: var(--noir);
    color: var(--or-lutte);
    border-color: var(--or-lutte);
}

/* Alertes (Erreurs de formulaires) */
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ////////////////////////////////////////////////////////
   SECTION 3 : FORMULAIRES
   //////////////////////////////////////////////////////// */

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 1.2rem;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--bleu-escrime);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

/* ////////////////////////////////////////////////////////
   SECTION 4 : UTILITAIRES DE MISE EN PAGE (LAYOUT HELPERS)
   //////////////////////////////////////////////////////// */

.text-center { text-align: center; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1rem; }
.fw-bold { font-weight: bold; }

/* Centrage vertical (pour login/signup) */
.flex-center-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

/* ////////////////////////////////////////////////////////
   SECTION 5 : RESPONSIVE DESIGN
   //////////////////////////////////////////////////////// */

@media (max-width: 768px) {
    /* Sur mobile, on empile les éléments */
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 2px solid var(--bleu-escrime);
    }
}

/* ////////////////////////////////////////////////////////
   SECTION : DJANGO AUTO-FORM STYLING
   Cible les inputs générés par Django qui n'ont pas de classe
   //////////////////////////////////////////////////////// */

form input[type="text"],
form input[type="password"],
form input[type="email"],
form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-family: inherit;
}

.help-text {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 1rem;
    display: block;
}