:root {
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-gradient: linear-gradient(135deg, #FF6B6B, #FFB700);
    --hover-gradient: linear-gradient(135deg, #FFB700, #FF6B6B);
    --glass-blur: blur(10px);
    --surface-gradient-dark: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    --surface-gradient-light: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.9));
    --font-primary: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container principal avec animation d'entrée */
.modern-account-container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 2rem;
    animation: fadeScale 0.6s ease-out;
    font-family: var(--font-primary);
}

@keyframes fadeScale {
    0% {
        opacity: 0;
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Navigation */
.navigation-header {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.theme-light .back-link {
    color: #333;
}

.back-link:hover {
    transform: translateX(-4px);
    opacity: 0.8;
}

/* En-tête stylisé */
.form-header {
    text-align: center;
    padding: 3rem;
    background: var(--primary-gradient);
    border-radius: 24px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

/* Effet de particules dans l'en-tête */
.form-header::before,
.form-header::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite;
    bottom: -150px;
    left: -100px;
}

.form-header::before {
    top: -150px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -10px) rotate(5deg); }
    50% { transform: translate(-5px, 5px) rotate(-5deg); }
    75% { transform: translate(8px, 8px) rotate(3deg); }
}

.form-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.8));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

/* Conteneur principal du formulaire */
.form-container {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-light .form-container {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--card-shadow);
}

.form-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

/* Grille des champs avec animation */
.fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Section mot de passe avec style distinctif */
.password-change {
    border: none;
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.theme-light .password-change {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.password-change legend {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    padding: 0 1rem;
    margin-bottom: 2rem;
    position: relative;
}

.theme-light .password-change legend {
    color: #333333;
}

.password-change legend::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--primary-gradient);
    margin-top: 0.5rem;
    border-radius: 2px;
}

/* Champs de formulaire avec animations */
.form-field {
    position: relative;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.form-field:hover {
    transform: translateX(5px);
}

.form-field label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.theme-light .form-field label {
    color: #444444;
}

/* Bouton stylisé */
.button {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 1rem 2.5rem !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    z-index: 1 !important;
    text-decoration: none !important;
    display: inline-block !important;
    line-height: 1.5 !important;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.2) !important;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hover-gradient) !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 12px;
}

.button:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3) !important;
}

.button:hover::before {
    opacity: 1;
}

.form-actions {
    margin-top: 3rem;
    text-align: right;
}

/* Responsive design */
@media (max-width: 768px) {
    .modern-account-container {
        margin: 2rem auto;
        padding: 0 1.5rem;
    }

    .form-header {
        padding: 2rem;
        margin-bottom: 2rem;
    }

    .form-title {
        font-size: 2rem;
    }

    .form-container {
        padding: 2rem;
    }

    .fields-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .password-change {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    .form-actions {
        text-align: center;
    }

    .button {
        width: 100%;
        max-width: 300px;
    }
}
