/* ==========================================================================
   RESET & VARIABLES GLOBALES
   ========================================================================== */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --navy-dark: #0f172a;       /* Bleu marine très foncé pour le fond */
    --navy-main: #1e293b;       /* Bleu marine principal */
    --navy-light: #334155;      /* Bleu marine clair */
    --green-accent:   #ee790b;;     /* Vert foncé au survol */
    --white: #ffffff;
    --text-muted: #94a3b8;
    --danger: #ef4444;          /* Rouge pour l'erreur */
}

/* ==========================================================================
   BODY & CONTENEUR PRINCIPAL
   ========================================================================== */
body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--navy-dark) 0%, #1e1b4b 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
}

/* Carte de connexion */
.login-box {
    display: flex;
    background-color: var(--navy-main);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   PARTIE GAUCHE (Présentation & Image)
   ========================================================================== */
.left {
    flex: 1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.95) 100%);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.left h1 {
    color: var(--white);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.left p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.left img {
    width: 100%;
    max-width: 280px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--green-accent);
}

/* ==========================================================================
   PARTIE DROITE (Formulaire)
   ========================================================================== */
.right {
    flex: 1.2;
    padding: 45px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.right h2 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 25px;
    position: relative;
}

/* Ligne décorative verte sous le titre */
.right h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 4px;
    background-color: #f05b06;
    border-radius: 2px;
}

/* Message d'erreur PHP */
.erreur {
    background-color: rgba(239, 68, 68, 0.15);
    border-left: 4px solid var(--danger);
    color: #fca5a5;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Champs du formulaire */
form {
    display: flex;
    flex-direction: column;
}

label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input {
    background-color: #010213;
    border: 1px solid #f05b06;
    color: var(--white);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 20px;
    outline: none;
    transition: all 0.3s ease;
}

input:focus {
    border-color: #f05b06;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

input::placeholder {
    color: #64748b;
}

/* Bouton de connexion */
button {
    background-color: #f05b06;
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin-top: 10px;
}

button:hover {
    background-color: #f05b06;
}

button:active {
    transform: scale(0.98);
}

/* Lien de retour */
.retour {
    display: inline-block;
    margin-top: 25px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    text-align: center;
}

.retour:hover {
    color: #e79f75;
}

/* ==========================================================================
   RESPONSIVE (Mobiles et Tablettes)
   ========================================================================== */
@media (max-width: 768px) {
    .login-box {
        flex-direction: column;
    }

    .left {
        padding: 30px 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .left img {
        display: none; /* Cache l'image sur petit écran pour économiser l'espace */
    }

    .right {
        padding: 30px 20px;
    }
}