/* ===== AUTHENTICATION STYLES ===== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container.hidden {
    display: none;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    animation: slideIn 0.3s ease-in;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-title {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
    font-size: 32px;
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.auth-form.hidden {
    display: none;
}

.auth-form h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.auth-form input {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.1);
}

.auth-switch {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Champ */
.auth-field {
    margin-bottom: 14px;
}

.auth-field input,
.auth-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: #fff;
    box-sizing: border-box;
}

.auth-field input:focus,
.auth-field select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Deux colonnes côte à côte */
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Bouton pleine largeur */
.btn-block {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    background: #667eea;
    color: #fff;
    transition: background 0.2s, opacity 0.2s;
    margin-bottom: 12px;
}

.btn-block:hover:not(:disabled) {
    background: #5a6fd6;
}

.btn-block:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages d'erreur / succès inline */
.auth-error,
.auth-success {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
    font-weight: 500;
}

.auth-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.auth-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.auth-error.hidden,
.auth-success.hidden {
    display: none;
}

/* ── Mobile : la carte de connexion ne colle plus aux bords ── */
@media (max-width: 480px) {
    .auth-container { padding: 16px; }
    .auth-box { padding: 28px 22px; }
}
