/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --komit-orange: #FF5C00;
    --orange-light: #FFE0B2;
    --orange-bright: #FF8540;
    --orange-soft: #FFF3E0;
    --komit-violet: #662E9B;
    --violet-light: #D1C4E9;
    --bg-soft: #F9FAFB;
    --black: #1a1a1a;
    --gray-dark: #333333;
    --gray-medium: #666666;
    --white: #ffffff;

    --navbar-height: 130px; 
    --navbar-scrolled-height: 90px;
    --mobile-header-height: 80px;
    
    --transition-duration: 0.3s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito', sans-serif; color: var(--black); background-color: var(--white); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Lilita One', sans-serif; font-weight: 700; line-height: 1.2; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.orange {
    color: var(--komit-orange) !important;
}

/* ==========================================================================
   2. HEADER & NAVBAR
   ========================================================================== */
#header {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--navbar-height);
    background: transparent; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 5%; transition: all 0.4s ease;
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.05); height: var(--navbar-scrolled-height);
}

#header.scroll-down { transform: translateY(-100%); }
#header.scroll-up { transform: translateY(0); }

.logo-link { display: flex; align-items: center; z-index: 1002; height: 100%; }
/* LOGO NAVBAR (Taille spécifique Header) */
.logo { height: 160px; width: auto; transition: all 0.4s ease; }
#header.scrolled .logo { height: 150px; }

.navbar-center { display: flex; align-items: center; gap: 3rem; position: absolute; left: 50%; transform: translateX(-50%); height: 100%; }
.nav-link {
    text-decoration: none;
    color: var(--gray-dark);
    font-weight: 400; /* Moins gras (avant 800) */
    font-size: 1.15rem;
    transition: color 0.3s ease;
    position: relative; /* Nécessaire pour le soulignement */
    padding: 5px 0;
}

/* Ligne de soulignement invisible par défaut */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px; /* Épaisseur du trait */
    bottom: 0;
    left: 0;
    background-color: var(--komit-orange);
    transition: width 0.3s ease-in-out; /* Animation progressive */
    border-radius: 2px;
}

/* Au survol : Le trait s'étend et le texte devient orange */
.nav-link:hover {
    color: var(--komit-orange);
}
.nav-link:hover::after {
    width: 100%;
}

/* Lien Actif : Le trait reste affiché */
.nav-link.active {
    color: var(--komit-orange);
}
.nav-link.active::after {
    width: 100%;
}

/* --- DROPDOWN --- */
.nav-item-dropdown { position: relative; display: flex; align-items: center; height: 100%; }
.dropdown-menu {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
    background: white; min-width: 220px; padding: 10px; border-radius: 16px;
    box-shadow: 0 10px 30px rgba(102, 46, 155, 0.15); opacity: 0; visibility: hidden;
    transition: all 0.2s ease; border: 1px solid rgba(0,0,0,0.05);
}
.nav-item-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown-link {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    color: var(--black); text-decoration: none; font-weight: 700; font-size: 0.95rem;
    border-radius: 10px; transition: background 0.2s;
}
.dropdown-link:hover { background-color: var(--bg-soft); color: var(--komit-orange); }

/* --- ACTIONS DROITE --- */
.navbar-right { display: flex; align-items: center; gap: 1.5rem; z-index: 1002; }
.profile-icon {
    background: none; border: none; cursor: pointer; color: var(--black);
    transition: all 0.2s; display: flex; align-items: center; padding: 10px; border-radius: 50%;
}
.profile-icon:hover { color: var(--komit-orange); background: var(--orange-soft); }

/* --- BURGER MENU ICON --- */
.burger-btn {
    display: none; 
    flex-direction: column; justify-content: center; gap: 6px;
    width: 40px; height: 40px; background: none; border: none; cursor: pointer;
    z-index: 3000; padding: 0;
}

.burger-btn span {
    display: block; width: 100%; height: 3px; 
    background-color: var(--black); border-radius: 10px;
    transition: background-color 0.3s ease;
    transform: none !important; opacity: 1 !important;
}

/* État Actif */
.burger-btn.active span {
    background-color: var(--komit-orange) !important;
    transform: none !important; opacity: 1 !important;
}
.burger-btn.active span:nth-child(1),
.burger-btn.active span:nth-child(2),
.burger-btn.active span:nth-child(3) { transform: none !important; }
/* ==========================================================================
   3. MENU MOBILE OVERLAY
   ========================================================================== */
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(255, 255, 255, 0.99); z-index: 2000;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 2rem; opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }

.mobile-menu-close {
    position: absolute; top: 20px; right: 25px;
    background: none; border: none; font-size: 3rem; color: var(--black); cursor: pointer;
    z-index: 2001; line-height: 1;
}

.mobile-nav-links { display: flex; flex-direction: column; align-items: center; gap: 2rem; width: 100%; margin-bottom: 3rem; }
.mobile-nav-link { font-family: 'Lilita One', sans-serif; font-size: 2.5rem; color: var(--black); text-decoration: none; transition: color 0.2s; }
.mobile-nav-link:hover, .mobile-nav-link.active { color: var(--komit-orange); }
.mobile-menu-footer { width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 1rem; }

/* ==========================================================================
   4. AUTRES
   ========================================================================== */
.cta-button {
    background: var(--komit-orange); color: white; padding: 0.9rem 2.2rem; border-radius: 50px;
    text-decoration: none; font-weight: 900; font-size: 1.1rem; 
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    white-space: nowrap; border: 2px solid transparent; 
    cursor: pointer; display: inline-block; text-align: center; font-family: 'Nunito', sans-serif;
}
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(255, 92, 0, 0.4); background: #ff7b33; }
.cta-button.secondary { background: transparent; border: 2px solid var(--komit-violet); color: var(--komit-violet); box-shadow: none; }
.cta-button.secondary:hover { background: var(--komit-violet); color: white; }

.scroll-progress { position: fixed; top: 0; left: 0; height: 4px; background: linear-gradient(90deg, var(--komit-orange), var(--komit-violet)); width: 0%; z-index: 2000; }

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
.final-cta-footer { background-color: var(--bg-soft); margin-top: 6rem; padding-top: 2rem; width: 100%; }
.final-cta-content {
    background: linear-gradient(135deg, var(--komit-orange) 0%, #FF8540 100%);
    border-radius: 40px; padding: 4rem 2rem; text-align: center; color: white;
    max-width: 1200px; width: 90%; margin: 0 auto 4rem; box-shadow: 0 20px 60px rgba(255, 92, 0, 0.15); position: relative; overflow: hidden;
}
.final-cta-content h2 { font-size: 3rem; margin-bottom: 1rem; }
.cta-buttons { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.cta-buttons .cta-button { background: white; color: var(--komit-orange); border: none; min-width: 200px; }

footer { background-color: white; padding: 3rem 5% 2rem; border-top: 1px solid #eee; width: 100%; }
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }

/* LOGO FOOTER (CLASSE SPÉCIFIQUE) */
.footer-logo-img {
    height: 120px; /* Taille spécifique au footer */
    width: auto;
    display: block;
    margin-bottom: 5px;
}

.footer-links { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-weight: 700; color: var(--gray-medium); transition: color 0.2s; font-size: 1rem; }
.footer-links a:hover { color: var(--komit-violet); }
.social-links { display: flex; gap: 1.5rem; }
.social-link svg { width: 28px; height: 28px; fill: var(--gray-medium); transition: 0.2s; }
.social-link:hover svg { fill: var(--komit-orange); transform: scale(1.15); }
.copyright { margin-top: 2rem; font-size: 0.85rem; color: #ccc; text-align: center; }

/* ==========================================================================
   6. AUTH MODAL (REDESIGN)
   ========================================================================== */
.auth-modal {
    position: fixed; inset: 0; z-index: 3000;
    display: none; align-items: center; justify-content: center;
}
.auth-modal.active { display: flex; }

.auth-modal-overlay {
    position: absolute; inset: 0;
    background: rgba(26, 26, 26, 0.6); backdrop-filter: blur(8px);
}

.auth-modal-content {
    background: white; width: 90%; max-width: 480px;
    padding: 3rem 2.5rem; border-radius: 32px;
    position: relative; z-index: 3001;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: slideUpModal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}
@keyframes slideUpModal { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

.auth-modal-close {
    position: absolute; top: 1.5rem; right: 1.5rem;
    background: #f5f5f5; border: none; cursor: pointer;
    color: #999; font-size: 1.5rem; line-height: 1;
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.auth-modal-close:hover { background: #eee; color: #333; }

/* LOGO : 3x Plus grand et centré */
.auth-logo img {
    height: 100px; /* Agrandissement significatif */
    margin-bottom: 2rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* FORMULAIRE (Email/Mdp en premier) */
.auth-form { text-align: left; margin-bottom: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.auth-form input {
    width: 100%; padding: 1rem 1.2rem;
    background: #FAFAFA; border: 2px solid #eee;
    border-radius: 16px; margin-bottom: 1rem;
    font-family: 'Nunito', sans-serif; font-weight: 600; font-size: 1rem;
    transition: border-color 0.2s;
}
.auth-form input:focus { border-color: var(--komit-orange); outline: none; background: white; }

.auth-submit-btn {
    width: 100%; padding: 1rem;
    background: linear-gradient(135deg, var(--komit-orange) 0%, #FF8540 100%);
    color: white; border: none; border-radius: 16px;
    font-weight: 800; font-size: 1.1rem; cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 92, 0, 0.25);
    transition: transform 0.2s;
    font-family: 'Nunito', sans-serif;
}
.auth-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(255, 92, 0, 0.35); }

/* SÉPARATEUR */
.auth-divider {
    display: flex; align-items: center; margin: 1.5rem 0; 
    color: #999; font-weight: 700; font-size: 0.85rem; text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
    content: ""; flex: 1; height: 1px; background: #eee;
}
.auth-divider span { padding: 0 15px; }

/* BOUTONS SOCIAUX (Longues barres) */
.social-login-column {
    display: flex; flex-direction: column; gap: 0.8rem;
}

.social-btn {
    display: flex; align-items: center; justify-content: flex-start; /* Icône à gauche */
    width: 100%; height: 50px; 
    border-radius: 16px; border: 2px solid #f0f0f0;
    background: white; cursor: pointer; transition: all 0.2s;
    font-family: 'Nunito', sans-serif; font-weight: 700; color: #444; font-size: 0.95rem;
    position: relative; padding-left: 50px; /* Espace pour l'icône */
}

.social-btn:hover { border-color: #ddd; background: #f9f9f9; transform: translateY(-1px); }

/* Icône positionnée en absolu pour centrer le texte correctement si besoin, ou flex simple */
.social-btn svg { 
    width: 24px; height: 24px; 
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
}

.social-btn span {
    width: 100%; text-align: center; /* Texte centré ou aligné à gauche selon préférence */
    padding-right: 35px; /* Compenser le padding left pour centrer visuellement */
}

.auth-footer { margin-top: 2rem; font-size: 0.9rem; color: #666; }
.auth-footer a { color: var(--komit-orange); font-weight: 800; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ==========================================================================
   7. MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */
@media (max-width: 1024px) {
    .navbar-center, .desktop-only { display: none !important; }
    .burger-btn { display: flex; }
    
    /* Logo petit sur mobile */
    .logo { height: 110px !important; } 
    #header.scrolled .logo { height: 110px !important; } 
    #header { height: var(--mobile-header-height); padding: 0 1.5rem; }
    #header.scrolled { height: 80px; }
}

@media (max-width: 768px) {
    .final-cta-content { width: 95%; padding: 3rem 1.5rem; }
    .final-cta-content h2 { font-size: 2rem; }
    .cta-buttons { flex-direction: column; width: 100%; }
    .cta-buttons .cta-button { width: 100%; text-align: center; }
    .footer-links { flex-direction: column; gap: 1rem; text-align: center; }
    
    /* Ajustement logo footer mobile */
    .footer-logo-img { height: 100px; }
}