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

html, body {
    width: 100%;
    height: 100%; /* Important pour que le wrapper puisse s'appuyer dessus */
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #000; /* Fond de secours */
}

/* =========================
   2. LE CONTENEUR (WRAPPER)
========================= */
.landing-wrapper {
    width: 100%;
    min-height: 100vh; /* Force l'image à couvrir TOUT l'écran, même sur mobile */
    display: flex;
    align-items: center; /* Centre verticalement */
    justify-content: center; /* Centre horizontalement */
    padding: 20px;
    
    /* Background intelligent */
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), 
                url("image/philipp-hubert-dVVjhUcdb30-unsplash.jpg") no-repeat center center;
    background-size: cover;
    background-attachment: fixed; /* Fixe le fond sur desktop */
}

/* Désactiver le background-attachment: fixed sur mobile pour éviter les bugs de rendu */
@media (max-width: 768px) {
    .landing-wrapper {
        background-attachment: scroll;
    }
}

/* =========================
   3. LA CARTE (FORMULAIRE)
========================= */
.login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.96); /* Fond blanc quasi opaque */
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 35px 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    text-align: center;
}

/* =========================
   4. ÉLÉMENTS INTERNES
========================= */
.login-logo {
    width: 110px;
    height: auto;
    margin-bottom: 15px;
}

.login-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0A3D62;
    margin: 0 0 10px 0;
}

.login-subtext {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 25px;
}

/* Formulaire */
.form-group {
    text-align: left;
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #0A3D62;
    box-shadow: 0 0 0 3px rgba(10, 61, 98, 0.1);
}

/* Bouton */
.login-btn {
    width: 100%;
    background: #0A3D62;
    color: #fff;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #082f4c;
}

/* Erreur */
.error-msg {
    color: #d32f2f;
    background: #fdeaea;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* =========================
   5. AJUSTEMENTS MOBILE & TABLETTE
========================= */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
        max-width: 100%; /* Utilise l'espace disponible */
    }
    
    .login-title {
        font-size: 1.25rem;
    }
}
/* =========================
   6. CHAMP MOT DE PASSE
========================= */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 45px; /* espace pour l'icône */
}

.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #0A3D62;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}
