/* --- VARIABLES & BASE --- */
:root {
    --blue: #0056b3;
    --blue-dark-hero: rgba(0, 51, 102, 0.75); /* Nouveau bleu foncé pour le contraste */
    --light-blue: #e3f2fd;
    --orange: #e67e22;
    --dark: #2c3e50;
    --white: #ffffff;
    --gray: #f4f7f6;
    --text-muted: #7f8c8d;
    --transition: all 0.3s ease-in-out;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    color: var(--dark); 
    line-height: 1.6; 
    background-color: var(--white);
    overflow-x: hidden;
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- HEADER & NAVIGATION --- */
header {
    position: fixed; top: 0; width: 100%; background: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1); z-index: 1000; height: 85px;
}
.nav-container { 
    max-width: 1400px; margin: 0 auto; 
    display: flex; align-items: center; 
    height: 100%; padding: 0 25px; 
}
.logo img { height: 55px; transition: var(--transition); }
.logo img:hover { transform: scale(1.05); }

nav { margin-left: auto; display: flex; align-items: center; }
.nav-list { display: flex; list-style: none; align-items: center; }
.nav-item { position: relative; }
.nav-link { 
    text-decoration: none; color: var(--dark); 
    font-weight: 600; padding: 30px 15px; 
    display: block; cursor: pointer; transition: var(--transition);
    font-size: 0.95rem;
}
.nav-link:hover { color: var(--blue); }

/* DROPDOWN STYLES */
.dropdown {
    position: absolute; top: 100%; left: 0; background: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); min-width: 250px;
    display: none; border-top: 4px solid var(--blue);
    animation: fadeIn 0.3s ease;
}
.nav-item:hover > .dropdown { display: block; }
.dropdown a {
    display: block; padding: 15px 25px; text-decoration: none;
    color: var(--dark); border-bottom: 1px solid #f1f1f1; 
    font-size: 14px; transition: var(--transition);
}
.dropdown a:hover { background: var(--gray); color: var(--blue); padding-left: 30px; }

/* SUB DROPDOWN */
.sub-dropdown { 
    position: absolute; left: 100%; top: -4px; 
    background: var(--white); box-shadow: 10px 10px 30px rgba(0,0,0,0.1); 
    display: none; min-width: 200px; border-left: 1px solid #eee;
}
.has-sub:hover > .sub-dropdown { display: block; }

/* AUTH BUTTONS */
.auth-group { display: flex; gap: 10px; margin-left: 20px; }
.btn-login { color: var(--blue) !important; font-weight: 700; text-decoration: none; }
.btn-register { 
    background: var(--orange); color: white !important; 
    border-radius: 5px; padding: 10px 20px !important; 
    text-decoration: none; font-weight: bold;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
    transition: var(--transition);
}
.btn-register:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4); }

/* --- MOBILE TOGGLE AJUSTÉ --- */
.mobile-toggle { 
    display: none; 
    font-size: 24px; 
    cursor: pointer; 
    color: var(--blue); 
    margin-left: auto; /* Pousse le bouton vers la droite, loin du logo */
    padding: 10px;
    border: 1px solid #eee; /* Optionnel : crée un petit contour de bouton */
    border-radius: 5px;
}

@media (max-width: 1024px) {
    .mobile-toggle { 
        display: flex; /* Utilise flex pour bien centrer l'icône */
        align-items: center;
        justify-content: center;
    }
    
    /* On s'assure que la nav ne colle pas au bouton */
    .nav-container {
        justify-content: space-between;
    }
}

/* --- HERO SECTION MODIFIÉE --- */
.hero {
    height: 70vh;
    margin-top: 85px;
    /* Overlay bleu foncé + Image de la fille */
    background: linear-gradient(var(--blue-dark-hero), var(--blue-dark-hero)), 
               url('C.webp');
    background-size: cover; background-position: center;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; color: var(--white); padding: 0 20px;
}
.hero-content { animation: fadeInUp 1s ease; max-width: 900px; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; margin-bottom: 20px; line-height: 1.1; text-shadow: 2px 2px 10px rgba(0,0,0,0.3); }
.hero p { font-size: clamp(1.1rem, 2vw, 1.6rem); margin-bottom: 30px; font-weight: 400; opacity: 1; }
.hero .btn-cta { 
    background: var(--white); color: var(--blue); 
    padding: 15px 40px; border-radius: 50px; 
    text-decoration: none; font-weight: 800; 
    font-size: 1.1rem; transition: var(--transition);
    display: inline-block;
}
.hero .btn-cta:hover { background: var(--orange); color: var(--white); transform: scale(1.05); }

/* --- CATEGORIES GRID --- */
.categories { padding: 80px 20px; background: var(--gray); }
.container { max-width: 1200px; margin: 0 auto; }
.cat-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}
.cat-card {
    background: var(--white); padding: 40px;
    text-align: center; border-radius: 20px;
    border-bottom: 5px solid var(--blue);
    transition: var(--transition); text-decoration: none; color: inherit;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.cat-card i { font-size: 3.5rem; color: var(--blue); margin-bottom: 20px; display: block; }
.cat-card h3 { font-size: 1.5rem; margin-bottom: 15px; color: var(--dark); }
.cat-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); background: var(--blue); }
.cat-card:hover h3, .cat-card:hover i, .cat-card:hover p { color: white; }

/* --- WHY CHOOSE US --- */
.features { padding: 100px 20px; text-align: center; }
.feature-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 40px; margin-top: 50px; 
}
.feature-item i { font-size: 2.5rem; color: var(--orange); margin-bottom: 20px; }
.feature-item h4 { font-size: 1.3rem; margin-bottom: 10px; }

/* --- STEPS --- */
.preparia-steps { padding: 100px 20px; background: var(--light-blue); text-align: center; }
.steps-container { 
    display: flex; justify-content: center; gap: 40px; 
    flex-wrap: wrap; margin-top: 60px; 
}
.step-card { 
    background: var(--white); padding: 40px 30px; 
    border-radius: 20px; flex: 1; min-width: 300px;
    position: relative; transition: var(--transition);
}
.step-number { 
    width: 60px; height: 60px; background: var(--orange); 
    color: white; border-radius: 50%; display: flex; 
    align-items: center; justify-content: center; 
    margin: -70px auto 25px; font-size: 1.8rem; font-weight: bold;
    border: 5px solid var(--light-blue);
}

/* --- MISSION --- */
.preparia-mission { 
    padding: 120px 20px; background: linear-gradient(45deg, var(--blue), #003d80); 
    color: white; text-align: center; 
}
.mission-content h2 { font-size: 3rem; margin-bottom: 25px; }
.mission-content p { font-size: 1.3rem; max-width: 1000px; margin: 0 auto; line-height: 1.8; font-style: italic; }

/* --- FOOTER --- */
footer { background: #111; color: #999; padding: 80px 20px 30px; }
.footer-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 50px; max-width: 1300px; margin: 0 auto; 
}
.footer-col h4 { color: white; margin-bottom: 25px; font-size: 1.2rem; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 2px; background: var(--orange); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { color: #999; text-decoration: none; transition: 0.3s; }
.footer-col a:hover { color: var(--white); padding-left: 5px; }

.social-icons { display: flex; gap: 15px; margin-top: 20px; }
.social-icons a { 
    width: 40px; height: 40px; background: #222; 
    display: flex; align-items: center; justify-content: center; 
    border-radius: 50%; color: white; font-size: 1.1rem;
}
.social-icons a:hover { background: var(--blue); transform: translateY(-3px); }

.footer-bottom { 
    border-top: 1px solid #222; margin-top: 60px; 
    padding-top: 30px; text-align: center; font-size: 0.85rem; 
}

/* OPTIMISATION LOGO PAIEMENT */
.payment-methods { margin-top: 20px; opacity: 0.9; }
.payment-logo { height: 35px; width: auto; filter: grayscale(20%); }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .mobile-toggle { display: block; }
    nav {
        position: fixed; top: 85px; right: -100%; width: 300px; height: calc(100vh - 85px);
        background: var(--white); flex-direction: column; transition: 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1); padding: 40px 20px; overflow-y: auto;
    }
    nav.active { right: 0; }
    .nav-list { flex-direction: column; width: 100%; align-items: flex-start; }
    .nav-item { width: 100%; }
    .nav-link { padding: 15px 0; border-bottom: 1px solid #eee; width: 100%; }
    .dropdown, .sub-dropdown { position: static; display: none; box-shadow: none; padding-left: 20px; width: 100%; }
    .nav-item:hover > .dropdown, .has-sub:hover > .sub-dropdown { display: block; }
    .auth-group { flex-direction: column; margin-left: 0; margin-top: 30px; width: 100%; }
    .btn-register { text-align: center; }
}
