/* ============================================
   RESET & VARIABLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0A1628;
    --primary-light: #1A2D4A;
    --secondary: #F59E0B;
    --secondary-hover: #D97706;
    --accent: #3B82F6;
    --text-white: #FFFFFF;
    --text-gray: #94A3B8;
    --text-dark: #1E293B;
    --bg-gradient: linear-gradient(135deg, #0A1628 0%, #1A2D4A 100%);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 30px 80px rgba(0, 0, 0, 0.5);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-white);
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ============================================
   CONTAINER PRINCIPAL (CARTE)
   ============================================ */
.auth-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 50px 45px;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

/* Effet de glow subtil */
.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.08), transparent 60%);
    pointer-events: none;
}

/* ============================================
   LOGO & HEADER
   ============================================ */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header .logo {
    display: inline-block;
    background: var(--secondary);
    color: var(--primary);
    width: 56px;
    height: 56px;
    border-radius: 14px;
    line-height: 56px;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-gray);
    font-size: 15px;
}

/* ============================================
   FORMULAIRE
   ============================================ */
.auth-form {
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.form-group .input-wrapper {
    position: relative;
}

.form-group .input-wrapper .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 18px;
    pointer-events: none;
    transition: var(--transition);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-size: 15px;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.form-group input:focus + .icon,
.form-group input:focus ~ .icon {
    color: var(--secondary);
}

/* ============================================
   BOUTONS
   ============================================ */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-hover));
    border: none;
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary .loading {
    display: none;
}

.btn-primary.loading .btn-text {
    display: none;
}

.btn-primary.loading .loading {
    display: inline-block;
}

/* ============================================
   FOOTER DU FORMULAIRE
   ============================================ */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    color: var(--text-gray);
    font-size: 14px;
}

.auth-footer a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--secondary-hover);
    text-decoration: underline;
}

/* ============================================
   MESSAGES D'ERREUR / SUCCÈS
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.5s ease-out;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86EFAC;
}

.alert .icon-alert {
    font-size: 20px;
    flex-shrink: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 520px) {
    .auth-container {
        padding: 30px 20px;
        border-radius: var(--radius-sm);
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .auth-header .logo {
        width: 48px;
        height: 48px;
        line-height: 48px;
        font-size: 22px;
    }
    
    .form-group input {
        padding: 12px 14px 12px 44px;
        font-size: 14px;
    }
}

/* ============================================
   CHECKBOX "J'accepte les CGU"
   ============================================ */
.form-group-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0;
}

.form-group-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    accent-color: var(--secondary);
    cursor: pointer;
}

.form-group-checkbox label {
    font-size: 13px;
    color: var(--text-gray);
    cursor: pointer;
    line-height: 1.5;
}

.form-group-checkbox label a {
    color: var(--secondary);
    text-decoration: none;
}

.form-group-checkbox label a:hover {
    text-decoration: underline;
}

/* ============================================
   INDICATEUR DE FORCE DE MOT DE PASSE
   ============================================ */
.password-strength {
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.password-strength .bar {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.password-strength .bar.weak { width: 33%; background: #EF4444; }
.password-strength .bar.medium { width: 66%; background: #F59E0B; }
.password-strength .bar.strong { width: 100%; background: #22C55E; }

.password-hint {
    font-size: 12px;
    color: var(--text-gray);
    margin-top: 4px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.password-hint .hint-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.password-hint .hint-item.valid {
    color: #22C55E;
}

.password-hint .hint-item.invalid {
    color: #EF4444;
}
/* ============================================
   STYLES SUPPLÉMENTAIRES POUR LA CONNEXION
   ============================================ */

/* Amélioration du bouton "Afficher/Masquer" mot de passe */
.form-group .input-wrapper .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    transition: var(--transition);
}

.form-group .input-wrapper .toggle-password:hover {
    color: var(--secondary);
}

/* Style pour le champ email en erreur */
.form-group input.error {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

/* Badge de statut */
.status-badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.15);
    color: #86EFAC;
}

.status-badge.suspended {
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
}