/* ── login.css — Page de connexion Inventaire DSI ─────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ── Carte centrale ─────────────────────────────────────────────────────────── */
.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

/* ── En-tête ────────────────────────────────────────────────────────────────── */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.login-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* ── Message d'erreur ───────────────────────────────────────────────────────── */
.login-erreur {
    background: #fdf0f0;
    border: 1px solid #e74c3c;
    border-left: 4px solid #e74c3c;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #c0392b;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.erreur-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Formulaire ─────────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5c72;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #dce3ea;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #2c3e50;
    background: #f9fbfc;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: #33bdf2;
    box-shadow: 0 0 0 3px rgba(51, 189, 242, 0.15);
    background: #fff;
}

/* ── Champ mot de passe avec bouton œil ─────────────────────────────────────── */
.input-password-wrap {
    position: relative;
}

.input-password-wrap input {
    padding-right: 44px;
}

.btn-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #95a5a6;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.btn-toggle-password:hover {
    color: #4b5c72;
}

/* ── Bouton connexion ───────────────────────────────────────────────────────── */
.btn-connexion {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #4b5c72, #33bdf2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 8px;
}

.btn-connexion:hover {
    opacity: 0.92;
}

.btn-connexion:active {
    transform: scale(0.98);
}

/* ── Responsive mobile ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 22px;
    }

    .login-header h1 {
        font-size: 1.35rem;
    }
}