/* =========================================
   1. VARIABLES GLOBALES & RESET
   ========================================= */
:root {
    /* Couleurs Principales */
    --gold: #D4AF37;
    --gold-dark: #B3922E;
    --gold-glow: rgba(212, 175, 55, 0.4);
    
    /* Thème Sombre (Défaut) */
    --black-bg: #0a0a0a;
    --glass-bg: rgba(20, 20, 20, 0.85);
    --text-white: #ffffff;
    --text-gray: #cccccc;

    /* Thème Clair (Utilisé pour certaines sections) */
    --white-bg: #f8f8f8;
    --text-black: #111111;
    --text-dark-grey: #333333;
    --error-red: #ff4444;
}

/* OVERRIDE POUR LE THÈME CLAIR */
[data-theme="light"] {
    --black-bg: #f0f2f5;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --text-white: #1a1a1a;
    --text-gray: #555555;
    --gold: #b8962e; /* Or plus foncé pour le contraste sur fond blanc */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--black-bg);
    color: var(--text-white);
    overflow-x: hidden; /* Empêche le défilement horizontal */
}


/* =========================================
   2. NAVIGATION (UNIFIÉE)
   ========================================= */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 5%;
    background-color: transparent; /* Transparent par défaut, le fond est géré par la page */
    color: var(--text-white);
    position: fixed; /* Fixe pour la homepage, fonctionne aussi sur les autres */
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* Le fond de la navbar s'adapte au thème quand on scroll */
.navbar.scrolled {
    background-color: var(--glass-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* CORRECTION : Quand la navbar est transparente (en haut), le texte doit TOUJOURS être blanc 
   pour être visible sur les vidéos/images sombres, même en thème clair. */
.navbar:not(.scrolled) {
    color: #ffffff !important;
}
.navbar:not(.scrolled) .nav-links a,
.navbar:not(.scrolled) .nav-icons .icon-item {
    color: #ffffff !important;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-white);
    font-weight: bold;
    font-size: 1.2rem;
}

.logo img {
    height: 40px;
}

.logo-text {
    background: linear-gradient(90deg, #ffffff 40%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-white);
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--gold);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #000;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    border-top: 2px solid var(--gold);
    flex-direction: column;
    padding-top: 10px;
}

.dropdown-content a {
    padding: 12px 16px;
    display: block;
}

.dropdown:hover .dropdown-content {
    display: flex;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-icons .icon-item {
    font-size: 1.2rem;
    color: var(--text-white);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-icons .icon-item:hover {
    color: var(--gold);
}

.gear-icon {
    transition: transform 0.8s ease-in-out;
}

.icon-item:hover .gear-icon {
    transform: rotate(360deg);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background-color: var(--error-red);
    border-radius: 50%;
    border: 2px solid var(--black-bg);
    display: block; /* Visible par défaut si injecté */
    box-shadow: 0 0 5px var(--error-red);
}

.hamburger-menu {
    display: none; /* Caché sur PC */
    font-size: 1.5rem;
    cursor: pointer;
}


/* =========================================
   3. SECTION AUTHENTIFICATION (CONNEXION / INSCRIPTION)
   ========================================= */
.auth-section {
    height: 100dvh; 
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7)), url('../assets/img/jeunes-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 20px; 
    padding-top: 80px; /* Espace pour la navbar fixe */
}

.auth-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-header h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-message {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 25px;
    line-height: 1.4;
}

/* Style pour les messages d'erreur (ex: Serveur indisponible) */
.auth-error-message {
    color: var(--error-red);
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none; /* À activer via JS: element.style.display = 'block' */
}

.gold-text {
    color: var(--gold);
    font-weight: 600;
}

.input-group {
    position: relative;
    margin-bottom: 15px;
}

.input-group .input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
}

.input-group input {
    width: 100%;
    padding: 12px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-white);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-row {
    display: flex;
    gap: 10px;
}

.input-group input:focus {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.1);
}

.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    cursor: pointer;
}

.forgot-pass {
    text-align: right;
    margin-bottom: 20px;
    font-size: 0.8rem;
}

.forgot-pass a {
    color: #aaa;
    text-decoration: none;
}

.btn-login {
    width: 100%;
    padding: 14px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--text-black);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px var(--gold-glow);
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--gold-glow);
}

.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #777;
    font-size: 0.75rem;
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #444;
}

.divider span {
    padding: 0 15px;
}

.social-login {
    display: flex;
    gap: 15px;
}

.btn-social {
    flex: 1;
    padding: 12px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-social:hover {
    background-color: rgba(255,255,255,0.1);
}

.auth-footer {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.auth-footer a {
    color: var(--gold);
    text-decoration: none;
    font-weight: bold;
}

input[type="date"] {
    color-scheme: dark; 
    color: #ccc;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.8);
}

/* =========================================
   4. FORMULAIRE DE VÉRIFICATION (Code à 6 chiffres)
   ========================================= */
.code-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.code-inputs input {
    width: 48px;
    height: 60px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    outline: none;
    transition: border-color 0.3s;
}

.code-inputs input:focus {
    border-color: var(--gold);
}

/* Ajustement mobile pour éviter le dépassement des cases */
@media (max-width: 480px) {
    .code-inputs {
        gap: 5px; /* Réduit l'espace entre les cases */
    }
    .code-inputs input {
        width: 38px; /* Cases plus étroites */
        height: 50px; /* Hauteur ajustée */
        font-size: 1.4rem; /* Texte légèrement plus petit */
    }
}

/* =========================================
   5. HERO SECTION (Homepage)
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: var(--black-bg);
}

#hero-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.9) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff; /* Toujours blanc sur la vidéo, même en thème clair */
    max-width: 850px;
    padding: 20px;
    margin-top: 60px; /* Pour compenser la barre fixe */
}

.motto {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--gold);
    display: inline-block;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 5px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    line-height: 1.1;
    font-weight: 700;
}

.highlight {
    color: var(--gold);
    text-shadow: 0 2px 10px var(--gold-glow);
}

.description {
    font-size: 1.3rem;
    margin-bottom: 40px;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.btn-primary, .btn-secondary {
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, var(--gold), var(--gold-dark));
    color: var(--text-black);
    box-shadow: 0 5px 15px var(--gold-glow);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.6);
}

.btn-secondary:hover {
    background-color: var(--gold);
    color: var(--text-black);
    transform: translateY(-3px);
}


/* =========================================
   6. SECTIONS DE CONTENU (Homepage)
   ========================================= */
.services-preview {
    padding: 100px 10%;
    text-align: center;
    background-color: var(--white-bg); /* Fond clair pour cette section */
}

.services-preview h2 {
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--text-black);
    position: relative;
    display: inline-block;
}

.services-preview h2::after {
    content: '';
    display: block;
    width: 60%;
    height: 3px;
    background: var(--gold);
    margin: 10px auto 0;
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 15px;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: block; /* Important pour que le lien prenne la forme d'un bloc */
    text-decoration: none; /* Enlève le soulignement */
    color: inherit; /* Garde les couleurs définies pour h3 et p */
    cursor: pointer;
}

.card:hover {
    transform: translateY(-15px);
    border-color: var(--gold);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card i {
    font-size: 3.5rem;
    color: var(--gold);
    margin-bottom: 25px;
    display: block;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-black);
}

.card p {
    color: #666;
    line-height: 1.6;
    color: var(--text-dark-grey);
}


/* =========================================
   7. DASHBOARD & PROFIL
   ========================================= */
/* Le body en mode dashboard pour permettre le scroll */
.dashboard-mode {
    overflow-y: auto !important;
    height: auto !important;
}

/* Conteneur principal pour la page dashboard, remplace .auth-container */
.dashboard-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 900px; /* Plus large pour accommoder plus de contenu */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.dashboard-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-bottom: 40px;
    /* Pour que le texte soit au-dessus de la photo, assurez-vous que dans votre HTML,
       les éléments de texte (.welcome-message) sont AVANT .profile-wrapper */
}

.welcome-message {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-white);
}

/* Ce style est conservé si vous souhaitez afficher le nom de l'utilisateur séparément */
.user-name-display {
    color: var(--gold);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-top: -15px; /* Rapproche le nom du message de bienvenue */
}

.profile-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    cursor: pointer;
}

/* Input caché pour l'upload de fichier */
#profileUpload {
    display: none;
}

.profile-ring {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(var(--gold), #1ef30a, var(--gold));
    animation: spin-slow 4s linear infinite;
    z-index: 1;
}
@keyframes spin-slow {
    to { transform: rotate(360deg); }
}

.profile-img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--black-bg);
    object-fit: cover;
}

.camera-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 35px;
    height: 35px;
    background-color: var(--black-bg);
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gold);
    font-size: 1rem;
    z-index: 3;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.profile-wrapper:hover .camera-overlay {
    background-color: var(--gold);
    color: var(--black-bg);
    transform: scale(1.1);
}

/* Section pour le contenu principal du dashboard */
.dashboard-content {
    margin-top: 50px;
    text-align: left; /* Aligne le contenu des cartes à gauche */
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.4s ease;
}

.dashboard-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* Correction pour les cartes en mode clair (sinon elles sont invisibles) */
[data-theme="light"] .dashboard-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.dashboard-card h3 {
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-card p {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.6;
}


/* =========================================
   8. RESPONSIVE DESIGN (Mobile)
   ========================================= */
@media (max-width: 768px) {
    /* NAV */
    .nav-links { display: none; }
    .hamburger-menu { display: block; }
    .navbar { 
        padding: 15px 20px; 
        background: rgba(10, 10, 10, 0.85); /* Fond sombre semi-transparent */
        backdrop-filter: blur(10px); /* Effet de flou moderne */
        -webkit-backdrop-filter: blur(10px);
    }
    .logo img { height: 35px; }
    .logo-text { font-size: 1rem; }
    .nav-icons { gap: 15px; margin-left: auto; margin-right: 20px; }
    .nav-icons .icon-item { font-size: 1.1rem; }

    /* Sur mobile, on cache le panier (selon demande) mais on garde la cloche et le profil */
    .nav-icons .icon-item[title="Panier"] { display: none; }
    .nav-icons .icon-item[title="Notifications"] { display: block !important; }
    .hide-on-mobile { display: none; }

    /* HERO SECTION */
    .hero-content { margin-top: 0; padding: 0 20px; }
    .motto { font-size: 0.8rem; margin-bottom: 10px; }
    .hero h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 20px; }
    .description { font-size: 1rem; padding: 0 10px; margin-bottom: 30px; }
    .cta-buttons { flex-direction: column; gap: 15px; width: 100%; }
    .btn-primary, .btn-secondary { width: 100%; max-width: 100%; padding: 15px; }

    /* SERVICES SECTION */
    .services-preview { padding: 60px 20px; }
    .services-preview h2 { font-size: 2rem; margin-bottom: 40px; }
    .cards-container { gap: 20px; }
    .card { padding: 30px 20px; margin-bottom: 0; }

    /* DASHBOARD (Ajustements spécifiques) */
    .dashboard-container { padding: 20px; }
    .dashboard-header { gap: 20px; }
    .welcome-message { font-size: 1.6rem; text-align: center; }
    .user-name-display { font-size: 1.4rem; }
    .profile-wrapper { width: 120px; height: 120px; }
    
    /* AUTH SECTION FIX */
    .auth-section {
        height: auto;
        min-height: 100dvh;
        padding-top: 100px;
        padding-bottom: 40px;
        align-items: flex-start;
    }
    .auth-container { margin: auto 0; padding: 25px 20px; }
    .form-row { flex-direction: column; gap: 0; }

    /* MOBILE MENU OVERLAY */
    /* Les styles du menu mobile ont été déplacés en dehors du media query pour plus de robustesse */
}
/* =========================================
   9. MOBILE MENU (Global)
   ========================================= */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Fond noir, plus transparent */
    -webkit-backdrop-filter: blur(5px); /* Effet de flou léger */
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-overlay .menu-content {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    background: var(--glass-bg); /* S'adapte au thème (Blanc en mode clair, Noir en mode sombre) */
    border: 1px solid var(--gold-glow); /* Bordure dorée pour délimiter */
    border-radius: 20px 0 0 20px; /* Arrondi seulement à gauche pour un panneau latéral */
    width: 55%; /* Largeur réduite */
    max-width: 300px; /* Largeur maximale pour les tablettes */
    padding: 20px;
    backdrop-filter: blur(10px); /* Effet de flou en arrière-plan */
    transform: translateX(100%); /* Commence en dehors de l'écran */
    transition: transform 0.4s ease;
}

.mobile-menu-overlay.active .menu-content {
    transform: translateX(0); /* Glisse pour apparaître */
}

.mobile-menu-overlay .close-header {
    text-align: right;
    font-size: 1.5rem;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.mobile-menu-overlay .close-header i {
    cursor: pointer;
    transition: color 0.3s;
}

.mobile-menu-overlay .close-header i:hover {
    color: var(--gold);
}

.mobile-menu-overlay .menu-list {
    list-style: none;
}

.mobile-menu-overlay .menu-list li a {
    display: block;
    padding: 15px 10px;
    color: var(--text-white);
    text-decoration: none;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-overlay .menu-list li:last-child a {
    border-bottom: none;
}

.mobile-menu-overlay .menu-list li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--gold);
}

.mobile-menu-overlay .menu-list li a i {
    width: 25px;
    text-align: center;
    color: var(--gold);
}

/* =========================================
   10. RESPONSIVE (LANDSCAPE)
   ========================================= */
/* Cible les appareils en mode paysage avec une hauteur d'écran faible (téléphones) */
@media (orientation: landscape) and (max-height: 500px) {
    
    /* Forcer le menu hamburger à rester visible */
    .nav-links { display: none !important; }
    .hamburger-menu { display: block !important; }

    /* Réduire la taille du texte sur la page d'accueil */
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    .description {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    .hero-content {
        margin-top: 40px;
    }

    /* Permettre le défilement sur les pages de connexion/inscription */
    .auth-section {
        height: auto;
        min-height: 100vh;
        padding-top: 100px;
        padding-bottom: 40px;
    }

    /* Ajuster le menu mobile pour qu'il ne soit pas trop large */
    .mobile-menu-overlay .menu-content {
        width: 50%;
    }
}

/* =========================================
   11. MODAL DE RECADRAGE (CROPPER)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none; /* Caché par défaut */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex; /* Affiché quand la classe .active est ajoutée */
}

.modal-content-crop {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    border: 1px solid var(--gold);
}

.img-container-crop {
    max-height: 60vh;
    overflow: hidden;
    background: #000;
}

/* Modal Conditions d'utilisation (Stratagème UX) */
.modal-content-terms {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    border: 1px solid var(--gold);
    text-align: left;
}

/* =========================================
   12. MODAL PARAMÈTRES
   ========================================= */
.modal-content-settings {
    background: var(--glass-bg);
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--gold);
    text-align: left;
    color: var(--text-white);
    backdrop-filter: blur(10px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

[data-theme="light"] .modal-header { border-bottom: 1px solid rgba(0,0,0,0.1); }

.modal-header h3 { color: var(--gold); margin: 0; }
.close-settings { cursor: pointer; font-size: 1.2rem; transition: 0.3s; }
.close-settings:hover { color: var(--gold); }

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.setting-info { display: flex; flex-direction: column; }
.setting-label { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.setting-desc { font-size: 0.8rem; color: var(--text-gray); margin-top: 5px; }

/* Switch Toggle Style */
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--gold); }
input:checked + .slider:before { transform: translateX(24px); }

/* Custom Select */
.custom-select {
    padding: 8px 12px;
    border-radius: 5px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-white);
    outline: none;
}
[data-theme="light"] .custom-select {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.1);
}

/* =========================================
   13. WIDGET CHAT IA
   ========================================= */
.chat-widget-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-black);
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--gold-glow);
    z-index: 9999;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
}

.chat-widget-btn.hidden {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

.chat-widget-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

.chat-window {
    position: fixed;
    bottom: 20px;
    right: 30px;
    width: 360px;
    height: 520px;
    background: #121212; /* Fond plus sombre style ChatGPT */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--gold);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

/* RESPONSIVE CHAT (MOBILE) */
@media (max-width: 480px) {
    .chat-window {
        width: 100%;
        height: 100dvh;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}

.chat-window.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.chat-header {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px 15px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.chat-hamburger-btn {
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-white);
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px; /* Bord arrondi */
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-hamburger-btn:hover { 
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
    color: var(--gold); 
}
.chat-header h3 {
    color: var(--gold);
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

/* SIDEBAR DU CHAT (MENU HAMBURGER) */
.chat-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%; /* Prend toute la hauteur */
    background: #0f0f0f;
    border-right: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-radius: 15px 0 0 15px; /* Arrondi à gauche pour coller à la fenêtre */
}

.chat-sidebar.open {
    transform: translateX(0);
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
}

.sidebar-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-white);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold);
    color: var(--gold);
}

/* NOUVEAU : PROFIL DANS LA SIDEBAR */
.sidebar-profile-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
}

.sidebar-profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.sidebar-profile-name {
    font-size: 0.9rem;
    color: var(--text-white);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* NOUVEAU : HISTORIQUE */
.chat-history-label {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin: 15px 0 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chat-history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chat-history-item {
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #ccc;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-history-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold);
}

/* SÉLECTEUR DE MODÈLE */
.model-selector {
    display: flex;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 3px;
    gap: 5px;
    width: 100%;
}

.model-option {
    flex: 1;
    text-align: center;
    font-size: 0.7rem;
    padding: 6px 2px;
    border-radius: 6px;
    cursor: pointer;
    color: #888;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.model-option.active {
    background: var(--gold);
    color: #000;
    font-weight: bold;
}

.model-option.locked {
    cursor: not-allowed;
    opacity: 0.6;
}

.model-option i {
    font-size: 0.6rem;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
}

/* NOUVEAU : LIGNE DE MESSAGE (AVATAR + BULLE) */
.msg-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
}

.msg-row.user-row {
    flex-direction: row-reverse;
}

.msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 0px solid var(--gold);
    flex-shrink: 0;
    background: transparent;
    overflow: hidden;
}
.msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.message {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
    overflow: hidden; /* Pour contenir les images */
    animation: fadeIn 0.3s ease;
    margin-bottom: 5px; /* Espace pour la barre d'outils */
}

/* ACTIONS SUR MESSAGE (EDIT) */
.msg-actions {
    position: absolute;
    top: -20px;
    right: 0;
    background: #333;
    border-radius: 4px;
    padding: 2px 5px;
    display: none;
    gap: 5px;
}

.message:hover .msg-actions {
    display: flex;
}

.action-btn {
    color: #ccc;
    font-size: 0.7rem;
    cursor: pointer;
    padding: 2px;
}
.action-btn:hover { color: var(--gold); }

/* --- BARRE D'OUTILS SOUS MESSAGE (NOUVEAU) --- */
.msg-toolbar {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 15px;
    padding-left: 5px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.msg-toolbar:hover { opacity: 1; }

.toolbar-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s;
}

.toolbar-btn:hover { color: var(--gold); }
.toolbar-btn.liked { color: #4caf50; }
.toolbar-btn.disliked { color: #f44336; }

/* Alignement spécifique pour l'utilisateur (droite) */
.user-row + .msg-toolbar { justify-content: flex-end; }

/* --- MÉDIAS DANS LE CHAT (Images, Vidéos, Tableaux) --- */
.media-container {
    margin-bottom: 8px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-container img, 
.media-container video {
    max-width: 100%;
    height: auto;
    display: block;
}

.media-caption {
    font-size: 0.9rem;
    margin-top: 5px;
}

.file-attachment-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
}

/* Tableaux dans le chat */
.chat-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.85rem;
}
.chat-table th, .chat-table td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px;
    text-align: left;
}
.chat-table th {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold);
}

/* --- THINKING SURFACE (Animation de chargement style Google Flow) --- */
.thinking-surface {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin: 10px 0 10px 40px; /* Décalé pour s'aligner comme un message AI */
    max-width: 75%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.thinking-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.thinking-logo {
    width: 16px;
    height: 16px;
    animation: pulse 1.5s infinite;
}

.shimmer-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shimmer-line {
    height: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: shimmer 1.5s infinite linear;
}

.width-80 { width: 80%; }
.width-60 { width: 60%; }
.width-40 { width: 40%; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* INPUT AREA MODERNE */
.chat-input-wrapper {
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
    padding: 10px;
}

.msg-user {
    background: rgba(212, 175, 55, 0.2);
    color: var(--text-white);
    border: 1px solid var(--gold);
    border-bottom-right-radius: 2px;
}

.msg-ai {
    background: rgba(255,255,255,0.05);
    color: var(--text-white);
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* --- TOOLBOX (BOÎTE À OUTILS IA) --- */
.chat-toolbox {
    display: flex;
    gap: 10px;
    padding: 0 10px 10px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 10px;
}

.tool-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.tool-btn.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    font-weight: 600;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.chat-tools {
    display: flex;
    gap: 15px;
    padding: 5px 10px;
    margin-bottom: 5px;
}

.tool-icon {
    color: #888;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* PRÉVISUALISATION FICHIER */
.file-preview-area {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: none; /* Caché par défaut */
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gold);
    border: 1px dashed var(--gold);
}

.file-preview-area.active {
    display: flex;
}

.remove-file-btn {
    cursor: pointer;
    color: #ff4444;
    margin-left: 10px;
}

.tool-icon:hover { color: var(--gold); }
.tool-icon span { font-size: 0.7rem; }

/* BOUTON ATTACH (+) */
.chat-attach-btn {
    color: #ccc;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 10px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-attach-btn:hover {
    color: var(--gold);
}

.chat-input-area {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-area input {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 20px;
    color: white;
    outline: none;
}

.chat-input-area input:focus {
    border-color: var(--gold);
    background: rgba(255,255,255,0.05);
}

.chat-send-btn {
    background: var(--gold);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: black;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.chat-send-btn:hover {
    background: var(--gold-dark);
}

/* --- MODAL FEEDBACK (POURQUOI ?) --- */
.feedback-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.feedback-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #ccc;
    font-size: 0.9rem;
}

.feedback-textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px;
    color: white;
    resize: none;
}

/* =========================================
   14. FOOTER
   ========================================= */
.main-footer {
    background-color: #000;
    color: #fff;
    padding: 60px 5% 20px;
    border-top: 1px solid #333;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 { color: var(--gold); margin-bottom: 20px; font-size: 1.5rem; }
.footer-col h4 { color: #fff; margin-bottom: 20px; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-col p { color: #aaa; line-height: 1.6; font-size: 0.9rem; margin-bottom: 10px; }

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #aaa; text-decoration: none; transition: 0.3s; font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--gold); padding-left: 5px; }

.social-links { display: flex; gap: 15px; margin-top: 20px; flex-wrap: wrap; }
.social-links a { color: #fff; font-size: 1.2rem; transition: 0.3s; }
.social-links a:hover { color: var(--gold); transform: translateY(-3px); }

/* Force l'affichage du modal d'info au-dessus de tout */
#infoModal {
    z-index: 20000 !important;
}
#infoModal .modal-content-settings {
    border: 2px solid var(--gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #222;
    color: #555;
    font-size: 0.8rem;
}

/* =========================================
   15. NOTIFICATIONS & ANIMATION PROFIL
   ========================================= */
.notif-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notif-item {
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--gold);
    font-size: 0.9rem;
    position: relative;
}

.notif-item.unread { background: rgba(212, 175, 55, 0.1); }
.notif-title { font-weight: bold; color: white; margin-bottom: 5px; display: block; }
.notif-body { color: #ccc; font-size: 0.85rem; }
.notif-actions { display: flex; gap: 10px; margin-top: 8px; justify-content: flex-end; }
.notif-btn { background: none; border: none; color: #666; cursor: pointer; font-size: 0.8rem; transition: 0.3s; }
.notif-btn:hover { color: var(--gold); }

/* Animation "Connectez-vous" (Astronaute spatial) */
.login-animation-container {
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.astro-scene {
    position: relative;
    height: 120px;
    margin-bottom: 10px;
    overflow: hidden;
}

.astro-stars {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(1px 1px at 20% 30%, #fff 100%, transparent),
                radial-gradient(1px 1px at 60% 70%, #fff 100%, transparent),
                radial-gradient(1px 1px at 80% 20%, rgba(255,255,255,0.6) 100%, transparent),
                radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.4) 100%, transparent),
                radial-gradient(1.5px 1.5px at 10% 60%, #fff 100%, transparent),
                radial-gradient(1px 1px at 90% 50%, rgba(255,255,255,0.5) 100%, transparent);
    animation: twinkle 3s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.floating-astro {
    font-size: 3.5rem;
    color: var(--gold);
    position: relative;
    z-index: 2;
    animation: float-astro 4s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
}

@keyframes float-astro {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    25% { transform: translateY(-15px) rotate(3deg); }
    50% { transform: translateY(-8px) rotate(-3deg); }
    75% { transform: translateY(-20px) rotate(5deg); }
}

.astro-planet {
    position: absolute;
    bottom: 5px;
    right: 30px;
    width: 25px;
    height: 25px;
    background: radial-gradient(circle at 30% 30%, #667, #334);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(100, 100, 150, 0.3);
    animation: orbit 6s linear infinite;
}

@keyframes orbit {
    0% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(20px) translateY(-10px); }
    50% { transform: translateX(0) translateY(-5px); }
    75% { transform: translateX(-20px) translateY(-10px); }
    100% { transform: translateX(0) translateY(0); }
}

.astro-title {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.astro-subtitle {
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.btn-connect-cta {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--gold-glow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-connect-cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.btn-connect-cta i {
    animation: rocket-shake 1.5s ease-in-out infinite;
}

@keyframes rocket-shake {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg) translateY(-3px); }
}

/* =========================================
   16. AUTH TABS (Popup Profil)
   ========================================= */
.auth-tabs {
    display: flex;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: #888;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.auth-tab.active {
    background: var(--gold);
    color: #000;
    box-shadow: 0 2px 8px var(--gold-glow);
}

.auth-tab:hover:not(.active) {
    background: rgba(255,255,255,0.1);
    color: var(--text-white);
}

.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Form inputs for popup modal */
.form-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: var(--text-white);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
    margin-bottom: 12px;
    font-family: 'Poppins', sans-serif;
}

.form-input:focus {
    border-color: var(--gold);
    background: rgba(255,255,255,0.08);
}

.form-input::placeholder {
    color: #666;
}

textarea.form-input {
    resize: vertical;
    min-height: 50px;
}

/* Logout button */
.btn-logout-profile {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1.5px solid #ff4444;
    color: #ff4444;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
}

.btn-logout-profile:hover {
    background: rgba(255, 68, 68, 0.1);
}

/* Notification badge with counter */
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    background-color: var(--error-red);
    border-radius: 10px;
    border: 2px solid var(--black-bg);
    display: none;
    font-size: 0.6rem;
    color: #fff;
    text-align: center;
    line-height: 12px;
    font-weight: 700;
    padding: 0 3px;
    box-shadow: 0 0 5px var(--error-red);
}

/* =========================================
   17. SECTION A PROPOS (Homepage)
   ========================================= */
.about-section {
    background: #000;
    color: #fff;
    padding: 100px 5%;
    border-top: 1px solid #1a1a1a;
}

.about-container {
    max-width: 1100px;
    margin: 0 auto;
}

.about-header {
    text-align: center;
    margin-bottom: 60px;
}

.about-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
}

.about-line {
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.about-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 15px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.4s ease;
}

.about-card:hover {
    border-color: var(--gold);
    background: rgba(255,255,255,0.06);
    transform: translateY(-5px);
}

.about-card i {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 20px;
    display: block;
}

.about-card h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 600;
}

.about-card p {
    color: #999;
    font-size: 0.9rem;
    line-height: 1.6;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   18. PAGE SERVICES IA
   ========================================= */
.ia-service-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.ia-service-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.05), transparent);
    transition: left 0.6s ease;
}

.ia-service-card:hover::before {
    left: 100%;
}

.ia-card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 2px solid rgba(212,175,55,0.2);
}

.ia-card-icon i {
    font-size: 1.8rem;
    color: var(--gold);
    margin-bottom: 0;
}

.ia-card-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.ia-card-features span {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ia-card-features span i {
    color: var(--gold);
    font-size: 0.7rem;
    margin-bottom: 0;
}

/* =========================================
   19. UNIEXPRESS SERVICE CARDS
   ========================================= */
.uniex-service-card {
    transition: all 0.4s ease;
}

/* Section Marketing sur fond noir -> cartes doivent etre distinctes */
[style*="background: var(--black-bg)"] .uniex-service-card,
.services-preview[style*="background: var(--black-bg)"] .card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}

[style*="background: var(--black-bg)"] .uniex-service-card h3,
.services-preview[style*="background: var(--black-bg)"] .card h3 {
    color: var(--text-white);
}

[style*="background: var(--black-bg)"] .uniex-service-card p,
.services-preview[style*="background: var(--black-bg)"] .card p {
    color: #aaa;
}

[style*="background: var(--black-bg)"] .uniex-service-card:hover,
.services-preview[style*="background: var(--black-bg)"] .card:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--gold);
}

/* Responsive pour About + IA */
@media (max-width: 768px) {
    .about-header h2 { font-size: 2rem; }
    .about-stats { gap: 30px; }
    .stat-number { font-size: 2rem; }
    .ia-card-features { display: none; }
}
