/* Variables pour une cohérence des styles */
:root {
    --primary-color: #ea4b5d;
    --secondary-color: #eeff46;
    --accent-color: #ff6b7a;
    --error-color: #dc3545;
    --success-color: #28a745;
    --text-color: #333;
    --text-light: #6c757d;
    --background: #fff5f6;
    --card-background: #ffffff;
    --border-color: #e9ecef;
    --border-radius: 12px;
    --shadow: 0 10px 30px rgba(234, 75, 93, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Conteneur principal */
.singup-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--background) 0%, #fef9e7 100%);
}

/* Carte d'authentification */
.singup-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 500px;
    padding: 2.5rem;
    transition: var(--transition);
    border: 1px solid rgba(234, 75, 93, 0.1);
    animation: slideIn 0.6s ease-out;
}

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

.singup-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(234, 75, 93, 0.2);
}

/* En-tête */
.singup-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.singup-logo {
    margin-bottom: 1.5rem;
    width: 80px;
    margin-left: auto;
    margin-right: auto;
}

.singup-logo img {
    width: 80px;
    height: auto;
    /* filter: brightness(1) invert(1); */ 
}

.singup-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.singup-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.4;
}

/* Formulaire */
.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: block;
    height: 56px;
}

.form-input {
    width: 100%;
    height: 100%;
    padding: 0 50px 0 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    outline: none;
    line-height: normal;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(234, 75, 93, 0.15);
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

.form-input:focus + .input-icon {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

/* Messages d'erreur */
.form-errors {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.form-errors ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #333;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(238, 255, 70, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(234, 75, 93, 0.4);
    color: #333;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-full {
    width: 100%;
    height: 56px;
}

.btn-loading {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.btn-loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Liens */
.auth-links {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(234, 75, 93, 0.1);
}

.auth-links p {
    margin-bottom: 0;
    color: var(--text-light);
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.auth-link:hover {
    color: var(--primary-color);
}

.auth-link:hover::after {
    width: 100%;
}

/* États de validation */
.form-input.valid {
    border-color: var(--success-color);
}

.form-input.invalid {
    border-color: var(--error-color);
}

/* Responsive */
@media (max-width: 576px) {
    .singup-container {
        padding: 15px;
    }
    
    .singup-card {
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .singup-title {
        font-size: 1.5rem;
    }
    
    .input-wrapper {
        height: 52px;
    }
    
    .btn {
        padding: 0.85rem 1.25rem;
        height: 52px;
    }
    
    .form-input {
        padding: 0 45px 0 0.75rem;
    }
    
    .input-icon {
        right: 0.75rem;
    }
}

/* Animation de fond */
@keyframes gradientShift {
    0%, 100% { 
        background: linear-gradient(135deg, var(--background) 0%, #fef9e7 100%); 
    }
    50% { 
        background: linear-gradient(135deg, #fef9e7 0%, var(--background) 100%); 
    }
}

.singup-container {
    animation: gradientShift 8s ease infinite;
}

/* Effets supplémentaires */
.singup-card {
    backdrop-filter: blur(10px);
}

.form-input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

/* Amélioration de l'accessibilité */
.btn:focus-visible,
.form-input:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.custom-checkbox {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 15px;
}

/* Checkbox RGPD et newsletter */
/*==============================*/
/* ===== VALIDATION MOT DE PASSE ===== */
/* Styles pour les règles de mot de passe */
.password-rules {
    display: none;
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.875rem;
}

.password-rules.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.password-rules h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #495057;
    font-weight: 600;
}

.password-rules ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.password-rules li {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    color: #6c757d;
}

.rule-valid {
    color: #28a745;
}

.rule-invalid {
    color: #dc3545;
}

.rule-icon {
    margin-right: 8px;
    font-size: 0.75rem;
}

.password-match {
    display: none;
    margin-top: 5px;
    font-size: 0.875rem;
    align-items: center;
}

.password-match.show {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
}

.password-match.valid {
    color: #28a745;
}

.password-match.invalid {
    color: #dc3545;
}

.match-icon {
    margin-right: 5px;
    font-size: 0.75rem;
}

.password-group:focus-within .password-rules {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group.password-group {
    position: relative;
}