/**
 * Styles pour les formulaires d'authentification
 * Connexion et Inscription
 */

/* ========================================
   CONTENEUR PRINCIPAL
======================================== */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-wrapper {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

.auth-wrapper.register-wrapper {
    max-width: 550px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   HEADER
======================================== */

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.auth-logo h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    color: white;
    text-decoration: none;
}

.auth-logo {
    text-decoration: none;
    display: inline-block;
}

.auth-subtitle {
    font-size: 16px;
    margin: 10px 0 0;
    opacity: 0.9;
}

/* ========================================
   MESSAGES
======================================== */

.auth-message {
    margin: 20px 30px;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    animation: fadeIn 0.3s ease-out;
}

.auth-message.error {
    background: #fee2e2;
    color: #7c2d12;
    border-left: 4px solid #e53e3e;
}

.auth-message.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #38a169;
}

/* ========================================
   FORMULAIRE
======================================== */

.auth-form-container {
    padding: 30px;
}

.auth-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.label-icon {
    font-size: 18px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #a0aec0;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #718096;
    margin-top: 5px;
}

/* ========================================
   CHAMP MOT DE PASSE
======================================== */

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-control {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    transition: transform 0.2s;
}

.toggle-password:hover {
    transform: scale(1.1);
}

.password-strength {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    min-height: 20px;
}

/* ========================================
   CHECKBOX ET INLINE
======================================== */

.form-group-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.form-group-checkbox {
    margin-bottom: 20px;
}

.form-group-checkbox .checkbox-label {
    line-height: 1.5;
}

.form-group-checkbox a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.form-group-checkbox a:hover {
    text-decoration: underline;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* ========================================
   BOUTONS
======================================== */

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.btn-submit:hover .btn-icon {
    transform: translateX(5px);
}

.btn-secondary {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 14px 24px;
    background: #f7fafc;
    color: #667eea;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #667eea;
}

/* ========================================
   DIVIDER
======================================== */

.auth-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #a0aec0;
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    padding: 0 15px;
}

/* ========================================
   FOOTER
======================================== */

.auth-footer {
    text-align: center;
}

.auth-footer p {
    color: #718096;
    font-size: 14px;
    margin: 0 0 15px;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-wrapper {
        border-radius: 15px;
    }
    
    .auth-header {
        padding: 30px 20px;
    }
    
    .auth-logo h1 {
        font-size: 26px;
    }
    
    .auth-form-container {
        padding: 20px;
    }
    
    .form-control {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .btn-submit {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .form-group-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* État de chargement du bouton */
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-submit:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Focus visible pour accessibilité */
.form-control:focus,
.btn-submit:focus,
.btn-secondary:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ========================================
   STYLES SPÉCIFIQUES WORDPRESS
======================================== */

/* Supprimer les marges par défaut de WP */
.login-page,
.register-page {
    margin: 0;
    padding: 0;
}

.login-page #wpadminbar,
.register-page #wpadminbar {
    display: none;
}

/* Correction pour les formulaires WordPress */
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    box-sizing: border-box;
}
