/* ===================================================================
   DESIGN SYSTEM IVOIRE EAU - VERSION FINALE STABLE
   =================================================================== */

/* --- Variables & Styles Globaux --- */
:root {
    --font-heading: 'Lora', serif;
    --font-body: 'Poppins', sans-serif;
    --color-dark: #030712;
    --color-light: #F9FAFB;
    --color-text: #E5E7EB;
    --color-primary: #3B82F6;
    --color-accent: #A3E635;
    --header-height: 80px;
}
* { box-sizing: border-box; padding: 0; margin: 0; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--color-dark);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}
main {
    position: relative;
    z-index: 1;
}
h1, h2, h3 { font-family: var(--font-heading); font-weight: 500; }
a { text-decoration: none; color: var(--color-primary); }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
*:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }
.progress-bar { position: fixed; top: 0; left: 0; height: 4px; background: var(--color-primary); width: 0%; z-index: 200; }
.skip-link { position: absolute; top: -40px; left: 0; background: var(--color-accent); color: var(--color-dark); padding: 8px; z-index: 300; transition: top 0.3s; }
.skip-link:focus { top: 0; }

/* --- Header --- */
#header { width: 100%; position: fixed; top: 0; left: 0; z-index: 100; transition: background-color 0.4s ease, backdrop-filter 0.4s ease; }
#header.scrolled { background-color: rgba(3, 7, 18, 0.8); backdrop-filter: blur(10px); }
nav { height: var(--header-height); display: flex; justify-content: space-between; align-items: center; position: relative; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-size: 1.4rem; color: var(--color-light); font-weight: 500; z-index: 102; }
.logo img { width: 42px; }
.logo b { color: var(--color-accent); }

/* ===================================================================
   SECTION MENU DÉFINITIVE (MOBILE + DESKTOP)
   =================================================================== */

/* --- Styles du Menu Mobile (par défaut) --- */
.nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh; /* MODIFIÉ : Utilise l'unité vh, plus fiable sur mobile que 100% */
    background-color: var(--color-dark);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 101;
    padding: 6rem 2rem 2rem;
    overflow-y: auto;
    transition: left 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
    
    /* NOUVEAU : Force le navigateur à correctement calculer la position */
    transform: translateZ(0); 
}
.show-menu {
    left: 0; /* Fait apparaître le menu */
}
.nav-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem; /* Espace réduit entre les liens */
}
.nav-item {
    width: 100%;
}
.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 0.5rem;
    font-size: 1.2rem; /* Taille de police lisible et propre */
    font-weight: 500;
    color: var(--color-text);
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s;
    position: relative; /* Ajouté pour le positionnement du span */
}
.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
.nav-link.active {
    color: var(--color-primary);
    background-color: rgba(59, 130, 246, 0.1);
}
.nav-link.parent-active {
    color: var(--color-accent);
}

/* Logique de l'accordéon sur mobile */
.dropdown-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}
.nav-item-dropdown.open > .nav-link > .dropdown-icon {
    transform: rotate(180deg);
}
.dropdown-menu {
    list-style: none;
    padding-left: 1rem; /* Indentation */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}
.nav-item-dropdown.open .dropdown-menu {
    max-height: 200px;
}
.dropdown-menu .nav-link {
    font-size: 1.1rem; /* Sous-liens légèrement plus petits */
    font-weight: 400;
}

.nav-close { display: block; position: absolute; top: 1.5rem; right: 1.5rem; font-size: 1.8rem; color: var(--color-light); cursor: pointer; }
.nav-buttons { display: flex; align-items: center; gap: 1rem; }
.btn-admin { background-color: transparent; border: 1px solid rgba(255, 255, 255, 0.2); color: var(--color-text); padding: 0.5rem 0.75rem; font-size: 0.9rem; transition: all 0.3s ease; }
.btn-admin .admin-text { display: none; }
.btn-admin i { margin-right: 0; }
.nav-toggle { font-size: 1.5rem; color: var(--color-light); cursor: pointer; display: block; }

/* --- Styles du Menu Desktop --- */
@media (min-width: 992px) {
    .nav-toggle, .nav-close { display: none; }
    .nav-menu {
    /* On annule le positionnement absolu qui cause le décalage */
    position: static;
    transform: none;

    /* On utilise Flexbox pour occuper le centre et s'aligner */
    flex-grow: 1; /* Le menu prend tout l'espace central disponible */
    display: flex;
    justify-content: center; /* Centre les liens horizontalement */
    align-items: center;     /* Aligne les liens verticalement */

    /* On réinitialise les autres propriétés pour le mode desktop */
    flex-direction: row;
    width: auto;
    height: 100%; /* Le menu prend 100% de la hauteur du header */
    background-color: transparent;
    border: none;
    padding: 0;
    z-index: 1;
    overflow-y: visible;
    transition: none;
}
    .nav-list { flex-direction: row; gap: 2.5rem; width: auto; }
    .nav-item { width: auto; }
    .nav-link { font-size: 1rem; color: var(--color-text); font-weight: 500; white-space: nowrap; padding: 0;}
    .nav-link:hover { background: none; }
    
    .nav-link span { position: relative; padding: 0.5rem 0; }
    .nav-link.active { background-color: transparent !important; }
    .nav-link.active span::after {
        content: ''; position: absolute; bottom: 0; left: 0;
        width: 100%; height: 2px; background-color: var(--color-primary);
    }
    .nav-link.parent-active { color: var(--color-accent); }
    .nav-link.parent-active span::after {
        content: ''; position: absolute; bottom: 0; left: 0;
        width: 100%; height: 2px; background-color: var(--color-accent);
    }

    .btn-admin { padding: 0.5rem 1rem; }
    .btn-admin .admin-text { display: inline; }
    .btn-admin i { margin-right: 0.5rem; }

    .nav-item-dropdown { position: relative; padding-bottom: 1rem; }
    .nav-item-dropdown::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1rem; height: 2rem; background-color: transparent; }
    .dropdown-icon { display: inline-block; font-size: 0.7rem; margin-left: 0.3rem; transition: transform 0.3s ease; }
    .nav-item-dropdown:hover .dropdown-icon { transform: rotate(180deg); }
    .dropdown-menu {
        display: block; position: absolute; top: 120%; left: 50%;
        transform: translateX(-50%); background-color: var(--color-dark);
        border: 1px solid rgba(249, 250, 251, 0.1); border-radius: 8px;
        padding: 0.5rem; list-style: none; width: max-content;
        opacity: 0; visibility: hidden; transition: opacity 0.3s ease, top 0.3s ease;
        z-index: 10; margin-top: 0; max-height: none;
    }
    .nav-item-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; top: 100%; }
    .dropdown-menu .nav-link { padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 500; }
    .dropdown-menu .nav-link:hover { background-color: rgba(249, 250, 251, 0.05); color: var(--color-primary); }
}

/* ===================================================================
   LE RESTE DU CSS (SECTIONS, FOOTER, EFFETS...)
   =================================================================== */

/* --- Hero & Sections --- */
.hero { position: relative; height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.hero-background-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('../images/hero-background.jpg') no-repeat center center/cover; opacity: 0.4; z-index: 0; }
.hero-background-image::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(0deg, rgba(3, 7, 18, 0.8) 0%, rgba(3, 7, 18, 0.4) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; }
.hero-brand { text-transform: uppercase; letter-spacing: 2px; font-size: 0.9rem; margin-bottom: 1rem; color: rgba(229, 231, 235, 0.7); }
.hero-title { font-size: 3rem; line-height: 1.1; color: var(--color-light); margin-bottom: 1.5rem; }
.hero-subtitle { font-size: 1.1rem; max-width: 500px; margin: 0 auto 2.5rem auto; }
.btn { display: inline-flex; align-items: center; gap: 0.75rem; background-color: var(--color-primary); color: var(--color-light); padding: 0.9rem 1.8rem; border-radius: 8px; font-weight: 500; transition: transform 0.3s ease, box-shadow 0.3s ease; border: none; cursor: pointer; position: relative; overflow: hidden; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3); }
.section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-title { font-size: 2.5rem; line-height: 1.2; margin-bottom: 1.5rem; }
.tag { display: inline-block; padding: 0.25rem 1rem; border: 1px solid var(--color-accent); color: var(--color-accent); border-radius: 20px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; white-space: nowrap; }
.about-container, .app-container { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 992px) {
    .about-container { grid-template-columns: 1.2fr 1fr; }
    .about-text { order: -1; }
    .app-container { grid-template-columns: 1fr 1fr; }
}
.about-image img, .app-mockup img { border-radius: 16px; }
.app-store-btn { display: inline-flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.5rem; border: 1px solid var(--color-text); border-radius: 8px; color: var(--color-text); margin-right: 1rem; transition: background-color 0.3s, color 0.3s; }
.app-store-btn:hover { background-color: var(--color-accent); color: var(--color-dark); border-color: var(--color-accent); }
.services-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
.service-card { background-color: rgba(249, 250, 251, 0.05); border: 1px solid rgba(249, 250, 251, 0.1); padding: 2rem; border-radius: 16px; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.service-card:hover { transform: translateY(-10px); border-color: var(--color-primary); box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1); }
.service-icon { font-size: 2rem; color: var(--color-primary); margin-bottom: 1rem; }
.contact-wrapper { max-width: 600px; margin: 2rem auto 0 auto; text-align: center; }
.contact-text { margin-bottom: 2rem; }
.contact-form { display: grid; gap: 1rem; }
.contact-form input, .contact-form textarea { width: 100%; padding: 1rem; background-color: rgba(249, 250, 251, 0.05); border: 1px solid rgba(249, 250, 251, 0.1); border-radius: 8px; color: var(--color-light); font-family: var(--font-body); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #9CA3AF; }

/* --- Footer --- */
.footer { background-color: #000; padding: 4rem 0 2rem 0; margin-top: 3rem; border-top: 1px solid rgba(249, 250, 251, 0.1); }
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; }
.footer-col .logo { margin-bottom: 1rem; }
.footer-brand-mention { color: #9CA3AF; font-size: 0.9rem; margin-bottom: 1.5rem; }
.footer-socials { display: flex; gap: 1rem; }
.footer-socials a { color: #9CA3AF; font-size: 1.2rem; transition: color 0.3s, transform 0.3s; }
.footer-socials a:hover { color: var(--color-primary); transform: translateY(-2px); }
.footer-col h3 { font-family: var(--font-body); font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; color: #9CA3AF; margin-bottom: 1.5rem; }
.footer-col ul li { margin-bottom: 0.75rem; position: relative; padding-left: 20px; }
.footer-col ul li::before { content: '\f043'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--color-primary); position: absolute; left: 0; top: 2px; font-size: 0.8rem; }
.footer-col ul a, .footer-col ul p { color: var(--color-text); }
.footer-col ul p i { margin-right: 0.5rem; color: var(--color-primary); }
.footer-col ul a:hover { color: var(--color-primary); }
.footer-bottom { text-align: center; padding-top: 3rem; margin-top: 3rem; border-top: 1px solid rgba(249, 250, 251, 0.1); }
.footer-bottom p { color: #9CA3AF; font-size: 0.9rem; }

/* --- Éléments Fixes --- */
.scroll-up { position: fixed; right: 1.5rem; bottom: -50%; background-image: linear-gradient(45deg, var(--color-primary), #5a9cff); color: var(--color-light); width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; font-size: 1.2rem; box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3); z-index: 50; transition: bottom 0.4s ease, transform 0.3s ease; }
.scroll-up:hover { transform: translateY(-5px); }
.show-scroll { bottom: 9rem; }
.chat-bubble { position: fixed; right: 1.5rem; bottom: 3rem; background-color: var(--color-accent); color: var(--color-dark); width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; font-size: 1.5rem; box-shadow: 0 5px 20px rgba(163, 230, 53, 0.4); z-index: 50; cursor: pointer; transition: transform 0.3s ease; }
.chat-bubble:hover { transform: scale(1.1); }

/* --- Responsive Final --- */
@media (min-width: 768px) {
    body { font-size: 18px; }
    .section { padding: 7rem 0; }
    .section-title { font-size: 3.5rem; }
    .hero-title { font-size: 5rem; }
    .hero-subtitle { font-size: 1.25rem; }
}
@media (max-width: 767px) {
    .section { padding: 4rem 0; }
    .section-title { font-size: 1.8rem; }
    .hero-title { font-size: 2.2rem; line-height: 1.3; }
    .hero-subtitle { font-size: 1.1rem; }
}

/* --- Effets et Sections Ajoutés --- */
.rain-background { position: fixed; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: -1; }
.raindrop { position: absolute; bottom: 100%; width: 2px; height: 60px; background: linear-gradient(to bottom, rgba(59, 130, 246, 0), rgba(59, 130, 246, 0.3)); animation: fall linear infinite; }
@keyframes fall { to { transform: translateY(120vh); } }
.raindrop:nth-child(1) { left: 5%; animation-duration: 1.2s; animation-delay: 0.5s; }
.raindrop:nth-child(2) { left: 15%; animation-duration: 0.8s; animation-delay: 0.2s; }
.raindrop:nth-child(3) { left: 23%; animation-duration: 1.5s; animation-delay: 1.1s; }
.raindrop:nth-child(4) { left: 35%; animation-duration: 1.1s; animation-delay: 0.8s; }
.raindrop:nth-child(5) { left: 48%; animation-duration: 0.7s; animation-delay: 0.1s; }
.raindrop:nth-child(6) { left: 55%; animation-duration: 1.3s; animation-delay: 0.4s; }
.raindrop:nth-child(7) { left: 64%; animation-duration: 0.9s; animation-delay: 0.7s; }
.raindrop:nth-child(8) { left: 72%; animation-duration: 1.6s; animation-delay: 1.4s; }
.raindrop:nth-child(9) { left: 85%; animation-duration: 1.0s; animation-delay: 0.3s; }
.raindrop:nth-child(10) { left: 95%; animation-duration: 1.4s; animation-delay: 1.2s; }
.raindrop:nth-child(11) { left: 30%; animation-duration: 1.0s; animation-delay: 0.1s; }
.raindrop:nth-child(12) { left: 90%; animation-duration: 0.6s; animation-delay: 0.9s; }

.wave-container { position: relative; width: 100%; height: 10vh; margin-bottom: -7px; min-height: 100px; max-height: 150px; }
.waves { position: relative; width: 100%; height: 15vh; margin-bottom: -7px; min-height: 100px; max-height: 150px; }
.parallax > use { animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite; }
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }
@keyframes move-forever { 0% { transform: translate3d(-90px,0,0); } 100% { transform: translate3d(85px,0,0); } }
@media (max-width: 768px) { .waves { height: 40px; min-height: 40px; } .wave-container { height: 10vh; } }

.btn .ripple { position: absolute; border-radius: 50%; background-color: rgba(255, 255, 255, 0.6); transform: scale(0); animation: ripple-effect 0.6s linear; }
@keyframes ripple-effect { to { transform: scale(4); opacity: 0; } }

.testimonials-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 3rem; }
@media (min-width: 768px) { .testimonials-grid { grid-template-columns: 1fr 1fr; } }
.testimonial-card { background-color: rgba(249, 250, 251, 0.05); border: 1px solid rgba(249, 250, 251, 0.1); padding: 2rem; border-radius: 16px; text-align: center; display: flex; flex-direction: column; align-items: center; opacity: 0; transform: translateY(50px); }
.testimonial-avatar { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--color-primary); margin-bottom: 1.5rem; object-fit: cover; }
.testimonial-card blockquote { font-family: var(--font-heading); font-style: italic; font-size: 1.1rem; line-height: 1.6; margin-bottom: 1.5rem; flex-grow: 1; }
.testimonial-card cite { font-weight: 500; color: var(--color-accent); }

.faq-container { max-width: 700px; margin: 3rem auto 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item { background-color: rgba(249, 250, 251, 0.05); border: 1px solid rgba(249, 250, 251, 0.1); border-radius: 8px; overflow: hidden; }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; font-size: 1.1rem; font-weight: 500; color: var(--color-light); background-color: transparent; border: none; text-align: left; }
.faq-question i { transition: transform 0.3s ease; color: var(--color-primary); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out, padding 0.4s ease-out; }
.faq-answer p { padding: 0 1.5rem 1.5rem 1.5rem; line-height: 1.8; }
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-item.active .faq-answer { max-height: 200px; }

.custom-cursor { width: 25px; height: 25px; border: 2px solid var(--color-accent); border-radius: 50%; position: fixed; pointer-events: none; transform: translate(-50%, -50%); z-index: 10000; transition: width 0.3s, height 0.3s, background-color 0.3s; }
body, a, button { cursor: none; }
.custom-cursor.grow { width: 50px; height: 50px; background-color: rgba(163, 230, 53, 0.2); }
@media (pointer: coarse) { .custom-cursor { display: none; } body, a, button { cursor: initial; } }

.services-full-image { margin-top: 4rem; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }
.services-full-image img { width: 100%; display: block; }

/* ===================================================================
   STYLES POUR LES PAGES DE STATUT (MERCI / ERREUR)
   =================================================================== */

.status-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}

.status-box {
    background-color: rgba(249, 250, 251, 0.05);
    border: 1px solid rgba(249, 250, 251, 0.1);
    padding: 3rem;
    border-radius: 16px;
    max-width: 500px;
}

.status-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.status-icon.success {
    color: var(--color-accent); /* Vert */
}

.status-icon.error {
    color: #F43F5E; /* Rouge/Rose pour l'erreur */
}

.status-box h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-light);
}

.status-box p {
    color: var(--color-text);
    margin-bottom: 2rem;
}

/* ===================================================================
   STYLE POUR LES NOTIFICATIONS "TOAST"
   =================================================================== */

#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    background-color: var(--color-dark);
    color: var(--color-light);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--color-accent); /* Ligne verte pour le succès */
    animation: toast-in 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.toast.fade-out {
    animation: toast-out 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;
}

.toast i {
    font-size: 1.2rem;
    color: var(--color-accent);
}

.toast span {
    font-weight: 500;
}

/* Animation d'apparition */
@keyframes toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animation de disparition */
@keyframes toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}