/* --- VARIABLES ET STYLES GLOBAUX (THÈME CLAIR) --- */
:root {
    --violet: #7F56D9;
    --blue: #2563EB;
    /* Palette inspirée de la plaquette */
    --bg-dark: #F8FAFC;       /* Arrière-plan principal (slate-50) */
    --bg-card: #FFFFFF;        /* Fond des cartes et sections (white) */
    --text-primary: #1E2B3B;   /* Texte des titres (slate-800) */
    --text-secondary: #475569; /* Texte principal (slate-600) */
    --border-color: #E2E8F0;   /* Bordures (slate-200) */
    --shadow-color: rgba(127, 86, 217, 0.3); /* Ombre adoucie */
    --error-color: #F87171;
    --success-color: #34D399;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

/* --- STYLES DE BASE POUR LES TITRES --- */
/* CORRECTION : Le !important force cette règle à s'appliquer même sur les styles en ligne (color: white) de votre HTML. */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary) !important;
}


.page { display: block; }

/* --- COMPOSANTS UI --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

header {
    background-color: rgba(255, 255, 255, 0.8); /* Fond clair pour le header */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease-in-out;
}

header.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* Ombre plus subtile */
    border-radius: 0 0 1rem 1rem;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
    top: 0.5rem;
    border-bottom: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    transition: color 0.3s ease;
    font-weight: 500;
    position: relative;
    cursor: pointer;
}
.nav-link:hover { color: var(--violet); } /* Couleur de survol ajustée */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--violet), var(--blue));
    transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* CORRECTION : Style pour le lien de la page active dans la navigation */
#desktop-menu .nav-link.active {
    font-weight: 700 !important;
    background: linear-gradient(90deg, var(--violet), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}


.gradient-text {
    background: linear-gradient(90deg, var(--violet), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

/* --- STYLES SPÉCIFIQUES POUR LE TITRE ET ICÔNES --- */
/* CORRECTION : Cible le lien du logo, l'agrandit et applique le dégradé */
header nav > a:first-child {
    background: linear-gradient(90deg, var(--violet), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent !important;
    background-clip: text;
    text-fill-color: transparent !important;
    font-weight: 800;
    font-size: 1.6rem !important; /* Taille augmentée */
}

/* Applique le dégradé à l'icône de fusée */
.fa-rocket {
    background: linear-gradient(90deg, var(--violet), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    /* Important est nécessaire pour outrepasser le style en ligne "color: white;" dans le HTML */
    color: transparent !important;
}

.gradient-button {
    display: inline-block;
    background: linear-gradient(90deg, var(--violet), var(--blue));
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    /* CORRECTION : Force le texte à être blanc sur les boutons */
    color: white !important;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px -5px rgba(0,0,0,0.1);
}
.gradient-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 10px 25px -5px var(--shadow-color);
}
.gradient-button:disabled {
    background: #D1D5DB; /* Gris clair pour le bouton désactivé */
    color: #6B7280 !important;
    cursor: not-allowed;
    filter: none;
    box-shadow: none;
    transform: none;
}

.secondary-button {
    display: inline-block;
    background-color: transparent;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease-in-out;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    color: var(--text-primary); /* Couleur de texte ajustée */
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
.secondary-button:hover {
    background-color: #F9FAFB; /* Fond très léger au survol */
    border-color: var(--violet);
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    box-shadow: 0 4px 10px -5px rgba(0,0,0,0.05);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
}

.guarantee-card {
    position: relative;
    border-radius: 1rem;
    padding: 2px;
    background: linear-gradient(120deg, var(--violet), var(--blue));
}
.guarantee-card .content {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: calc(1rem - 2px);
}

/* --- ANIMATIONS MODERNISÉES --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform, opacity;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- STYLES DES PAGES LÉGALES --- */
.legal-page { padding: 4rem 0; }
.legal-page h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 2rem; text-transform: none; }
.legal-page h2 { font-size: 1.5rem; font-weight: 700; margin-top: 2.5rem; margin-bottom: 1rem; border-left: 3px solid var(--violet); padding-left: 1rem; text-transform: none;}
.legal-page p, .legal-page li { color: var(--text-secondary); line-height: 1.7; }
.legal-page a { color: var(--violet); text-decoration: underline; }
.legal-page ul { padding-left: 20px; }
.legal-page strong { color: var(--text-primary); font-weight: 600; }

/* --- BANDEAU COOKIES --- */
#cookie-banner {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background-color: var(--bg-card);
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 2000;
    gap: 1rem;
    flex-wrap: wrap;
    border-radius: 0.75rem;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- ACCORDÉON MODERNISÉ --- */
.accordion-item {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}
.accordion-item:hover {
    border-color: rgba(127, 86, 217, 0.5);
}
.accordion-button {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary); /* Couleur de texte ajustée */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
}
.accordion-button .accordion-icon {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    flex-shrink: 0;
    margin-left: 1rem;
}
.accordion-button[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.accordion-content-inner {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin: 0 1.5rem;
    padding-top: 1.5rem;
}
.accordion-content-inner p {
    margin: 0;
    line-height: 1.7;
}

.social-icon {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}
.social-icon:hover {
    color: var(--violet); /* Couleur de survol ajustée */
    transform: scale(1.1) translateY(-2px);
}

.profile-medallion {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(90deg, var(--violet), var(--blue));
    margin: auto auto 1.5rem auto;
    box-shadow: 0 0 40px -10px var(--shadow-color);
}
.profile-medallion img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-card); /* Bordure blanche sur le médaillon */
}

.credentials-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0 0;
    text-align: left;
}
.credentials-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.credentials-list .icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
}

/* --- STYLES ESPACE CONNEXION --- */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 4rem 0;
}
.auth-container {
    width: 100%;
    max-width: 450px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
}
.auth-container h1 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}
.auth-form .form-group {
    margin-bottom: 1.5rem;
}
.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.auth-form .form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #F9FAFB; /* Fond d'input très léger */
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}
.auth-form .form-input:focus {
    outline: none;
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(127, 86, 217, 0.2);
}
.auth-form .gradient-button {
    width: 100%;
    font-size: 1.1rem;
}
.auth-toggle-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}
.auth-toggle-link a {
    color: var(--violet);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.auth-toggle-link a:hover {
    text-decoration: underline;
}
.auth-message {
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    display: none;
}
#auth-error-message {
    color: #991B1B; /* Texte d'erreur plus sombre */
    background-color: #FEE2E2; /* Fond d'erreur */
    border: 1px solid #FCA5A5;
}
#auth-success-message {
    color: #14532D; /* Texte de succès plus sombre */
    background-color: #D1FAE5; /* Fond de succès */
    border: 1px solid #6EE7B7;
}

.rgpd-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.rgpd-group input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
    accent-color: var(--violet);
}
.rgpd-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.rgpd-group a {
    color: var(--text-primary);
    text-decoration: underline;
}


/* --- STYLES ESPACE MEMBRE & DASHBOARD --- */
.member-page-header {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-card);
}
.member-page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.member-page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}
.dashboard-content {
    text-align: center;
    padding: 4rem 1.5rem;
}
.dashboard-content .icon {
    font-size: 4rem;
    color: var(--violet);
    margin-bottom: 1.5rem;
}
.dashboard-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.dashboard-content p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

/* --- NOUVEAUX STYLES POUR L'ESPACE MEMBRE --- */
.progress-container {
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.progress-bar-bg {
    background-color: #F3F4F6; /* Fond de barre de progression (gray-100) */
    border-radius: 0.5rem;
    height: 1.5rem;
    padding: 4px;
    border: 1px solid var(--border-color);
}
.progress-bar {
    background: linear-gradient(90deg, var(--violet), var(--blue));
    height: 100%;
    width: 0%;
    border-radius: 0.25rem;
    transition: width 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}
.progress-label {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.module-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
}
.module-checkbox-label:hover {
    background-color: #F9FAFB; /* Fond très léger au survol */
}
.module-checkbox {
    width: 1.25em;
    height: 1.25em;
    accent-color: var(--violet);
}

.module-resources {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}
.module-resources a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-section {
    padding: 4rem 0;
    background-color: var(--bg-card);
    margin-top: 4rem;
    text-align: center;
}
.contact-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.contact-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
}
.contact-section a {
    color: var(--violet); /* Couleur de lien ajustée */
    font-weight: 600;
    text-decoration: none;
}
.contact-section a:hover {
    text-decoration: underline;
}

.video-embed-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    margin-top: 1rem;
    border-radius: 0.5rem;
    background-color: #000;
}
.video-embed-container iframe,
.video-embed-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-watched-indicator {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--success-color);
    margin-left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* --- NOUVEAUX STYLES POUR LA PAGE PROFIL --- */
.profile-section {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}
.profile-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.profile-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}
.profile-info-grid p {
    margin: 0;
    padding: 0.5rem 0;
    color: var(--text-secondary);
}
.profile-info-grid p strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* --- STYLES POUR LES MENUS DÉROULANTS --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-card);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 0.5rem 0;
    margin-top: 10px;
}

.dropdown-content a {
    color: var(--text-secondary);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: 500;
}

.dropdown-content a:hover {
    background-color: #F9FAFB; /* Fond très léger au survol */
    color: var(--violet); /* Couleur de survol ajustée */
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* --- CORRECTIONS POUR LE SIMULATEUR --- */
#page-simulateur input[type="number"],
#page-simulateur select {
    width: 3in; /* Largeur fixe demandée */
    max-width: 100%; /* Empêche le débordement sur les petits écrans */
    box-sizing: border-box; /* Assure que le padding est inclus dans la largeur */
}

#page-simulateur input[type="number"],
#page-simulateur select,
#page-simulateur .checkbox-group {
    background-color: #FFFFFF !important; /* Fond blanc pour correspondre au thème */
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}
#page-simulateur .input-group .unit-symbol {
    color: var(--text-secondary) !important;
}
#page-simulateur .form-group label {
    color: var(--text-secondary) !important;
}
/* CORRECTION: Rend le texte des descriptions du tableau visible */
#page-simulateur .comparison-table tbody tr td:first-child {
    color: var(--text-primary) !important;
}


/* --- SECTION RESPONSIVE CORRIGÉE --- */
#mobile-menu-button {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary); /* Couleur d'icône ajustée */
    font-size: 1.5rem;
    cursor: pointer;
}

#mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1rem;
    background-color: var(--bg-card);
}

#mobile-menu a {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

#mobile-menu a:last-child {
    border-bottom: none;
}

@media (max-width: 992px) {
    #desktop-menu {
        display: none !important;
    }
    #mobile-menu-button {
        display: block;
    }
}
/* --- CORRECTION POUR LE MENU DÉROULANT --- */
/* Ajout d'un z-index élevé pour s'assurer que le menu passe au-dessus de tout */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-card);
    min-width: 220px; /* Légèrement élargi pour le confort */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1500; /* **VALEUR CLÉ** */
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 0.5rem 0;
    margin-top: 10px;
}