/* --- 1. VARIABLES & THÈME (NOUVEAU DESIGN) --- */
:root {
    /* Nouvelle Palette : Orange (dominant), Bleu ciel et Vert */
    --primary-color: #fd9309; /* Orange doré (plus proche du logo) - Couleur principale */
    --primary-dark: #ea580c;  /* Orange sombre - Pour les dégradés */
    --secondary-color: #0f172a; /* Bleu nuit - Pour les fonds sombres et le header */
    --sidebar-bg: #eb7507;    /* Bleu nuit pour la sidebar */
    --accent-color: #10b981;  /* Vert */
    
    /* Overrides Bootstrap */
    --bs-primary: #f97316;
    --bs-primary-rgb: 249, 115, 22;
    
    /* Backgrounds */
    --bg-body: #ffffff;
    --bg-card: #f8fafc; /* Un gris très clair pour les cartes */
    --bg-section-alt: #fffbeb; /* Fond très légèrement jaune pour les sections alternées */
    
    /* Typography */
    --text-main: #334155;
    --text-muted: #64748b;
    --heading-color: #fd9309;
    
    /* UI Elements */
    --border-radius: 1.25rem;
    --nav-height: 70px;
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.08);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --scrollbar-thumb: #cbd5e1;
}

/* --- NOUVEAU : Admin Layout --- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #f8f9fa; /* Couleur de fond pour la zone de contenu */
}
.admin-sidebar {
    width: 250px;
    flex-shrink: 0;
    background-color: var(--sidebar-bg, #1e293b);
    color: #fff;
    transition: margin-left 0.3s ease-in-out;
}
.admin-content {
    width: 100%;
    overflow-x: hidden;
}

@media (min-width: 992px) {
    .admin-sidebar {
        width: 250px;
    }
    .admin-content {
        width: calc(100% - 250px);
    }
    .admin-wrapper.sidebar-toggled .admin-sidebar {
        margin-left: -250px;
    }
    .admin-wrapper.sidebar-toggled .admin-content {
        width: 100%;
    }
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1040;
        margin-left: -250px;
    }
    .admin-wrapper.sidebar-toggled .admin-sidebar {
        margin-left: 0;
    }
}

/* Animation pour l'icône de notification */
@keyframes pulse-red {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
.animate-pulse { animation: pulse-red 2s infinite; }

.dark-theme {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-section-alt: #1e293b;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --heading-color: #f8fafc;
    
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.05);
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.3);
    --scrollbar-thumb: #334155;
}

body {   
     font-family: 'Outfit', sans-serif;
    line-height: 1.7;
    color: var(--text-main);
    background-color: var(--bg-body);
    overflow-x: hidden;
    transition: background-color 0.4s ease;
    /* SUPPRIMÉ : Le fond est déplacé vers #public-content */
}

/* NOUVEAU : Le fond de grille est appliqué ici, à l'exclusion du footer */
#public-content {
    flex-grow: 1;
}

/* NOUVEAU : Assurer que le wrapper principal ne perturbe pas le flux */
#public-wrapper {
    flex-grow: 1;
}

#public-menu-toggle {
    cursor: pointer;
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    z-index: 1100;
}

#public-sidebar {
    flex-shrink: 0; /* Empêche le menu de rétrécir */
    min-width: 250px;
    width: 250px;
}

/* Amélioration Mobile pour Admin Sidebar */
@media (max-width: 768px) {
    #public-menu-toggle, #menu-toggle {
        display: flex !important;
        margin-right: 15px;
        background: var(--primary-color);
        border: none;
        padding: 10px;
        border-radius: 8px;
    }
    #public-sidebar {
        width: 250px;
        margin-left: -250px;
        transition: margin 0.3s ease-in-out;
        position: fixed;
        height: 100%;
        z-index: 1050;
        top: 0;
    }
    #wrapper.toggled #public-sidebar, 
    #public-wrapper.toggled #public-sidebar {
        margin-left: 0;
    }
    #public-sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
        display: none;
    }
    #wrapper.toggled #public-sidebar-overlay,
    #public-wrapper.toggled #public-sidebar-overlay {
        display: block;
    }
    .display-5 { font-size: 2.5rem !important; }
}

#public-menu-toggle:hover {
    color: var(--primary-color);
}

/* Force le texte blanc dans la navbar pour correspondre au fond sombre */
.top-bar-nav h2, 
.top-bar-nav .nav-link,
.top-bar-nav .btn-icon {
    color: #fff !important;
    background: none;
    -webkit-text-fill-color: initial;
}
.top-bar-nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* --- 3. HERO SECTION & TYPOGRAPHY --- */
h1, h2, h3, h4, h5 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
    
    /* Dégradé Rouge-Jaune */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--heading-color); /* Fallback */
}

/* Exception pour les titres blancs (ex: Stats, Footer) pour garder la lisibilité */
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5,
h1.text-white, h2.text-white, h3.text-white, h4.text-white, h5.text-white {
    background: none;
    -webkit-text-fill-color: initial;
    color: #fff !important;
}

/* --- NOUVEAU : Style pour le header (navbar) - AMÉLIORÉ --- */
.top-bar-nav {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

/* Style par défaut (pour toutes les pages sauf l'accueil) */
.top-bar-nav {
    background-color: var(--secondary-color);
}

/* NOUVEAU : Styles pour le header mobile */
@media (max-width: 991.98px) {
    /* Appliquer le fond sombre et transparent aussi sur mobile */
    .top-bar-nav,
    .top-bar-nav.scrolled {
        background-color: rgba(15, 23, 42, 0.85) !important; /* Bleu nuit semi-transparent */
        backdrop-filter: blur(10px);
    }

    .top-bar-nav .navbar-brand,
    .top-bar-nav .navbar-toggler,
    .top-bar-nav .nav-link,
    .top-bar-nav .dropdown-toggle,
    .top-bar-nav .btn-outline-primary,
    .top-bar-nav .btn-primary {
        color: #fff !important; /* Texte blanc */
        border-color: rgba(255, 255, 255, 0.2) !important; /* Bordure blanche transparente */
    }

    .top-bar-nav .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }

    .top-bar-nav .navbar-brand {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .top-bar-nav .navbar-brand img {
        width: 38px;
        height: 38px;
    }

    .top-bar-nav .navbar-toggler {
        border: 1px solid rgba(255, 255, 255, 0.2);
        background-color: rgba(255, 255, 255, 0.1);
        width: 46px;
        height: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        z-index: 1201;
    }

    .top-bar-nav .navbar-toggler:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .top-bar-nav .navbar-nav .nav-link {
        padding: 0.45rem 0.55rem;
        font-size: 0.9rem;
        white-space: nowrap;
        line-height: 1.1;
    }

    .top-bar-nav .navbar-nav {
        justify-content: center;
        text-align: center;
    }

    .top-bar-nav .navbar-nav .btn {
        width: auto;
        font-size: 0.85rem;
        padding: 0.45rem 0.9rem;
    }

    .top-bar-nav .btn-primary {
        padding: 0.45rem 1rem;
        min-width: auto;
    }

    .top-bar-nav .btn-outline-primary {
        padding: 0.45rem 1rem;
        min-width: auto;
    }

    .top-bar-nav .navbar-toggler {
        border: 1px solid rgba(255, 255, 255, 0.2);
        background-color: rgba(255, 255, 255, 0.1);
        width: 46px;
        height: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        z-index: 1201;
    }

    .mobile-nav-offcanvas {
        width: min(100%, 340px);
        max-width: 340px;
    }

    .mobile-nav-offcanvas .navbar-nav {
        gap: 0.35rem;
    }

    .mobile-nav-offcanvas .nav-link,
    .mobile-nav-offcanvas .dropdown-item {
        padding: 0.95rem 1.25rem;
        font-size: 0.95rem;
    }

    .mobile-nav-offcanvas .dropdown-menu {
        width: 100%;
        border: none;
        background: transparent;
        box-shadow: none;
    }
}

@media (min-width: 992px) {
    .top-bar-nav .navbar-nav.mx-auto {
        gap: 0.4rem;
        justify-content: center;
        align-items: center;
    }

    .top-bar-nav .navbar-nav .nav-link {
        padding: 0.45rem 0.6rem;
        font-size: 0.92rem;
    }

    .top-bar-nav .navbar-nav .btn,
    .top-bar-nav .navbar-nav .btn-outline-primary,
    .top-bar-nav .navbar-nav .btn-primary {
        font-size: 0.85rem;
        padding: 0.45rem 0.9rem;
    }
}

/* Correction supplémentaire pour le header responsive et le menu mobile */
.offcanvas,
.offcanvas-backdrop {
    pointer-events: auto !important;
}

.offcanvas {
    z-index: 1200 !important;
}

.offcanvas-backdrop.show {
    z-index: 1100 !important;
}

.top-bar-nav .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-bar-nav .navbar-brand img {
    width: 38px;
    height: 38px;
}

@media (max-width: 991.98px) {
    .top-bar-nav {
        padding: 0.45rem 0.75rem;
    }

    .top-bar-nav .navbar-toggler {
        border: 1px solid rgba(255, 255, 255, 0.2);
        background-color: rgba(255, 255, 255, 0.1);
        width: 46px;
        height: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        z-index: 1201;
    }

    .top-bar-nav .navbar-toggler:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .mobile-nav-offcanvas {
        width: min(100%, 360px);
        max-width: 360px;
        position: fixed;
        top: 0;
        right: 0;
        height: 100%;
        overflow-y: auto;
    }

    .mobile-nav-offcanvas .navbar-nav {
        gap: 0.35rem;
    }

    .mobile-nav-offcanvas .nav-link,
    .mobile-nav-offcanvas .dropdown-item {
        padding: 0.95rem 1.25rem;
        font-size: 0.95rem;
    }

    .mobile-nav-offcanvas .dropdown-menu {
        width: 100%;
        border: none;
        background: transparent;
        box-shadow: none;
    }
}

.mobile-nav-offcanvas {
    /* NOUVEAU : Fond sombre avec effet de verre pour la lisibilité des liens blancs */
    background-color: rgba(15, 23, 42, 0.9); /* Bleu nuit semi-transparent */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
}

/* Correction : s'assurer que l'offcanvas reçoit les clics et est au-dessus des overlays */
.mobile-nav-offcanvas,
.mobile-nav-offcanvas .offcanvas-body,
.mobile-nav-offcanvas .nav-link,
.mobile-nav-offcanvas .dropdown-item {
    pointer-events: auto !important;
    z-index: 1200 !important;
}

/* Si un overlay bootstrap (backdrop) est présent, s'assurer qu'il est derrière l'offcanvas */
.offcanvas-backdrop {
    z-index: 1100 !important;
}

.mobile-nav-offcanvas .nav-link,
.mobile-nav-offcanvas .offcanvas-title {
    /* NOUVEAU : Liens blancs pour la lisibilité sur fond sombre */
    color: #f1f5f9 !important;
}

.mobile-nav-offcanvas .offcanvas-header {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

.mobile-nav-offcanvas .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* NOUVEAU : Cacher le menu desktop sur mobile et le menu mobile sur desktop */
/* Le menu Bootstrap collapse doit rester géré par Bootstrap sur mobile. */
.mobile-nav-offcanvas .btn-close {
    filter: invert(1);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.45);
    z-index: 1030;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.admin-wrapper.sidebar-toggled .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

/* Style pour l'accueil quand il est en haut de page (maintenant identique au style au scroll) */
.top-bar-nav.transparent-on-top,
.top-bar-nav.scrolled,
.top-bar-nav:not(.transparent-on-top) {
    background-color: rgba(15, 23, 42, 0.85); /* Bleu nuit semi-transparent */
    backdrop-filter: blur(10px);
}

/* Style qui s'applique au scroll ou quand l'en-tête n'est pas transparent */
.top-bar-nav.scrolled,
.top-bar-nav:not(.transparent-on-top) {
    background-color: rgba(15, 23, 42, 0.85); /* Bleu nuit semi-transparent */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Couleur des liens */
/* NOUVEAU : Couleur par défaut des liens (sombre) quand le header est transparent ET non défilé */
.top-bar-nav.transparent-on-top:not(.scrolled) .navbar-nav .nav-link,
.top-bar-nav.scrolled .navbar-nav .nav-link,
.top-bar-nav:not(.transparent-on-top) .navbar-nav .nav-link {
    color: #f5f3f3 !important; /* Blanc cassé, avec !important pour assurer la priorité */
}

/* NOUVEAU : Couleur des liens (blanc) quand le header est opaque (au scroll ou sur les autres pages) */

.top-bar-nav .navbar-nav .nav-link {    
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 8px;
    padding: 0.5rem 0.75rem; /* Réduction du padding horizontal */
}

.top-bar-nav .navbar-nav .nav-link:hover {
    color: var(--secondary-color);
    background-color: rgba(249, 115, 22, 0.12);
}
/* NOUVEAU : Réduire la taille du bouton "Mon Compte" pour l'aligner avec les autres liens */
.top-bar-nav .navbar-nav .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* NOUVEAU : Rendre le bouton de thème plus visible et adaptatif */
.top-bar-nav.transparent-on-top:not(.scrolled) #theme-toggle,
.top-bar-nav.scrolled #theme-toggle,
.top-bar-nav:not(.transparent-on-top) #theme-toggle {
    color: #f5f3f3; /* Blanc sur fond sombre */
    border-color: #f5f3f3;
}

.top-bar-nav .navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: bold;
}

/* NOUVEAU : Centrer les liens de la navbar sur les grands écrans */
@media (min-width: 992px) {
    .top-bar-nav .navbar-collapse {
        justify-content: center; /* Centre les éléments flex (les liens) */
    }
}


#accueil {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    z-index: 1;
    padding-top: var(--nav-height); /* Espace pour le header fixe */
}

.display-3 {
    font-weight: 800 !important;
    color: #3b82f6 !important; /* NOUVELLE COULEUR : Bleu vif */
    text-shadow: 0 5px 25px rgba(0,0,0,0.25);
}

/* NOUVEAU : Couleur bleue pour le texte de la machine à écrire */
#typewriter-text {
    color: #faad06; 
    font-weight: 700; /* Rendu en gras */
}


/* --- NOUVEAU : Effet Parallaxe pour les Hero Sections --- */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    background-color: var(--secondary-color); /* Fallback color */
}

/* --- 4. CARDS & UI ELEMENTS --- */
.card {
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--border-radius);
    background-color: var(--bg-card);
    box-shadow: 0 4px 15px -2px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card .stretched-link-style-remover:hover {
    color: var(--primary-color) !important;
}

.card .card-img, .card .card-img-top, .card .transition-transform {
    transition: transform 0.4s ease, filter 0.4s ease;
}
.card:hover .hover-zoom {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-soft);
    border-color: rgba(99, 102, 241, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
    transform: translateY(-2px);
    color: #fff;
}

/* --- 5. PRELOADER & UTILS --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-body);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-container {
    width: 120px;
    height: 120px;
}

.preloader-spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #3b82f6; /* Bleu vif pour correspondre au thème */
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.preloader-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.preloader-percentage {
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    font-family: 'Space Grotesk', sans-serif;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1035;
}

.reading-progress-bar {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 0.1s;
}

/* --- 6. COMPATIBILITÉ INDEX.PHP (CAROUSELS & SECTIONS) --- */
#heroCarousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* --- Hero Backgrounds for other pages --- */
#contact-hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1534536281715-e28d76689b4d?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed !important;
    min-height: 300px;
    display: flex;
    align-items: center;
}
#blog-hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1499750310107-5fef28a66643?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed !important;
    min-height: 300px;
    display: flex;
    align-items: center;
}
#partners-hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1543269865-cbf427effbad?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed !important;
    min-height: 300px;
    display: flex;
    align-items: center;
}
#services-hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1556761175-5973dc0f32e7?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed !important;
    min-height: 300px;
    display: flex;
    align-items: center;
}

.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    background-color: var(--secondary-color); /* Fallback color */
}

.carousel-item {
    height: 100vh;
}

.carousel-item video,
.carousel-item div[style*="background-image"] {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

#projects-hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed !important;
    min-height: 300px;
    display: flex;
    align-items: center;
}

.bg-light-gray {
    background-color: var(--bg-section-alt) !important;
}

.profile-picture {
    border-radius: 2rem;
    box-shadow: var(--shadow-soft);
}

/* Skills Scroller */
.skills-scroller {
    overflow: hidden;
    white-space: nowrap;
    padding: 2rem 0;
}

.skills-track {
    display: inline-flex;
    gap: 2rem;
    animation: scroll 30s linear infinite;
}

.skill-item {
    width: 350px; /* Carte plus large pour l'expérience */
    white-space: normal; /* Important : permet au texte de revenir à la ligne */
}

.skill-card-img {
    height: 240px; /* Image plus grande et uniforme */
    width: 100%;
    object-fit: cover;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Service Cards */
.service-carousel-card {
    padding: 2rem;
    border-radius: var(--border-radius);
    background-color: var(--bg-card);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.service-carousel-card:hover,
.service-carousel-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Service Images styling for Home Page */
.service-carousel-card .service-img-container {
    height: 120px; /* Taille augmentée pour mobile */
    width: 120px; /* Taille augmentée pour mobile */
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius); /* Utilisation de la variable pour la cohérence */
    background: var(--bg-section-alt);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* NOUVEAU : Ajout de la transition */
}

.service-carousel-card .service-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* NOUVEAU : Animation au survol pour les icônes de service */
.service-carousel-card:hover .service-img-container {
    transform: translateY(-8px) scale(1.05); /* Fait "flotter" l'icône */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- NOUVEAU : Partners Scroller (Carrousel automatique) --- */
.partners-scroller {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.partners-track {
    display: flex;
    gap: 2rem;
    animation: scroll-partners 40s linear infinite;
}

.partners-track:hover {
    animation-play-state: paused;
}

.partner-item {
    flex-shrink: 0;
    width: 250px; /* Largeur fixe pour chaque carte partenaire */
}

.partner-item .card {
    background-color: var(--bg-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-item .card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-soft);
}

.partner-item img {
    transition: transform 0.3s ease;
}

.partner-item .card:hover img {
    transform: scale(1.05);
}

@keyframes scroll-partners {
    to {
        transform: translateX(calc(-50% - 1rem)); /* -50% pour la moitié du track, -1rem pour la moitié du gap */
    }
}


/* Style pour les statistiques */
.stat-item {
    transition: transform 0.3s ease;
}
.stat-item:hover {
    transform: translateY(-5px);
}
.stat-item i {
    opacity: 0.8;
    transition: opacity 0.3s;
}
.stat-item:hover i {
    opacity: 1;
    color: #fff !important;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: #fff;
    padding-top: 4rem;
}

/* Back to Top */
#backToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

#backToTopBtn.show {
    opacity: 1;
    visibility: visible;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #FFF;
    transform: scale(1.1);
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animation des cercles décoratifs */
@keyframes float-1 {
    0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }
    50% { transform: translate(-50%, -50%) translate(30px, 20px); }
}

@keyframes float-2 {
    0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }
    50% { transform: translate(-50%, -50%) translate(-20px, -30px); }
}

.floating-circle-1 {
    transform: translate(-50%, -50%); /* Remplace translate-middle */
    animation: float-1 15s ease-in-out infinite;
}

.floating-circle-2 {
    transform: translate(-50%, -50%); /* Remplace translate-middle */
    animation: float-2 18s ease-in-out infinite;
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

/* --- 7. UTILITIES & ANIMATIONS --- */
.hover-scale { transition: transform 0.3s ease; }
.hover-scale:hover { transform: scale(1.05); }
.shadow-sm { box-shadow: var(--shadow-soft) !important; }
.rounded-pill { border-radius: 50rem !important; }
.fw-bold { font-weight: 700 !important; }
.letter-spacing-2 { letter-spacing: 2px; }
.small { font-size: 0.875rem; }

/* --- 8. CORRECTIFS MODE SOMBRE (BOOTSTRAP OVERRIDES) --- */
/* Force les éléments à fond blanc à devenir sombres */
.dark-theme .bg-white {
    background-color: var(--bg-card) !important;
    color: var(--text-main);
}

/* Force les éléments à fond clair à devenir sombres */
.dark-theme .bg-light, 
.dark-theme .bg-light-gray {
    background-color: var(--bg-section-alt) !important;
    color: var(--text-main);
}

/* Inverse la couleur du texte "text-dark" et autres variantes noires */
.dark-theme .text-dark,
.dark-theme .text-black,
.dark-theme .text-body {
    color: #f1f5f9 !important; /* Blanc cassé */
}

/* Ajuste la couleur du texte secondaire (souvent gris foncé) */
.dark-theme .text-secondary,
.dark-theme .text-body-secondary {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Ajuste la couleur du texte muet (gris) pour qu'il soit visible */
.dark-theme .text-muted,
.dark-theme .text-body-tertiary {
    color: var(--text-muted) !important;
}

/* Correction spécifique pour les liens Footer et Sidebar en mode sombre */
.dark-theme .footer a, 
.dark-theme #public-sidebar a,
.dark-theme .page-navigation a {
    color: rgba(255, 255, 255, 0.8) !important;
}

.dark-theme .footer a:hover, 
.dark-theme .page-navigation a:hover {
    color: var(--primary-color) !important;
}

/* Ajuste les bordures pour qu'elles soient subtiles en mode sombre */
.dark-theme .border, 
.dark-theme .border-top, 
.dark-theme .border-bottom, 
.dark-theme .border-start, 
.dark-theme .border-end {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Styles pour les formulaires (inputs) en mode sombre */
.dark-theme .form-control, 
.dark-theme .form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* --- 9. SCROLLBAR PERSONNALISÉE --- */
/* Standard (Firefox) */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--bg-body);
}

/* Webkit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 6px;
    border: 3px solid var(--bg-body); /* Crée un espace autour */
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}

/* Correction pour les listes et éléments interactifs */
.dark-theme .list-group-item {
    background-color: var(--bg-card);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Correction pour les liens dans le contenu (hors boutons) */
.dark-theme a:not(.btn):not(.nav-link):not(.badge) {
    color: var(--primary-color);
}
.dark-theme a:not(.btn):not(.nav-link):not(.badge):hover {
    color: var(--accent-color);
}

.dark-theme .form-control:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.dark-theme .input-group-text {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* --- 10. UTILITAIRES DE DÉLAI D'ANIMATION --- */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-500 { transition-delay: 0.5s; }

/* --- 11. ANIMATION PULSATION (BATTEMENT DE CŒUR) --- */
@keyframes pulse-white {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
        transform: scale(1);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
        transform: scale(1);
    }
}

.btn-pulse {
    animation: pulse-white 2s infinite;
}

/* --- 12. BANNIÈRE COOKIES (GDPR) --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 1.5rem 0;
    z-index: 1050;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    transform: translateY(100%); /* Caché par défaut (en bas) */
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.cookie-banner.show {
    transform: translateY(0); /* Visible */
}

.pagination .page-link {
    transition: all 0.3s ease;
    border-radius: 0.5rem !important;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.dark-theme .pagination .page-link {
    background-color: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.1);
}
/* --- 13. COMMENTAIRES & RÉPONSES --- */
.comment-reply {
    margin-left: 3rem;
    border-left: 3px solid var(--primary-color);
    background-color: var(--bg-section-alt);
}

.admin-badge {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

/* --- 14. NOUVEAU : Styles pour les liens sociaux de l'équipe --- */
.team-social-links .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    opacity: 0;
    transform: translateX(10px);
}
.card:hover .team-social-links .social-icon {
    opacity: 1;
    transform: translateX(0);
}
.team-social-links .social-icon:hover { background-color: var(--primary-color); transform: scale(1.1); }
.team-social-links .social-icon:nth-child(2) { transition-delay: 0.1s; }
.team-social-links .social-icon:nth-child(3) { transition-delay: 0.2s; }

/* --- 15. NOUVEAU : Styles pour la Timeline (Page À Propos) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    border: 4px solid var(--primary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(even)::after { left: -10px; }
.timeline-content { 
    padding: 20px 30px; 
    background-color: var(--bg-section-alt); 
    border-radius: 1rem; 
    position: relative; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
/* Flèches pour les bulles de la timeline */
.timeline-item:nth-child(odd) .timeline-content::before { content: " "; height: 0; position: absolute; top: 28px; width: 0; z-index: 1; right: -10px; border: medium solid var(--bg-section-alt); border-width: 10px 0 10px 10px; border-color: transparent transparent transparent var(--bg-section-alt); }
.timeline-item:nth-child(even) .timeline-content::before { content: " "; height: 0; position: absolute; top: 28px; width: 0; z-index: 1; left: -10px; border: medium solid var(--bg-section-alt); border-width: 10px 10px 10px 0; border-color: transparent var(--bg-section-alt) transparent transparent; }

.dark-theme .timeline-item:nth-child(odd) .timeline-content::before { border-color: transparent transparent transparent var(--bg-section-alt); }
.dark-theme .timeline-item:nth-child(even) .timeline-content::before { border-color: transparent var(--bg-section-alt) transparent transparent; }

.timeline-year { font-weight: bold; color: var(--primary-color); margin-bottom: 10px; display: inline-block; }
@media (max-width: 768px) {
    .top-bar-nav {
        position: relative;
    }

    .navbar-collapse,
    .navbar-collapse.collapsing,
    .navbar-collapse.show {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        z-index: 1090;
        background: url('https://images.unsplash.com/photo-1620121692029-d088224ddc74?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat !important;
        background-color: transparent !important;
        border: none !important;
        margin-top: 0;
        overflow: hidden;
        padding: 1rem 1rem 1.5rem !important;
        box-shadow: 0 10px 20px rgba(0,0,0,0.12);
    }

    .navbar-collapse.show .nav-link,
    .navbar-collapse.collapsing .nav-link {
        color: #fff !important;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar-nav .nav-link {
        padding: 0.8rem 1rem;
        border-radius: 0.75rem;
        background: rgba(0,0,0,0.18);
        color: #fff !important;
    }

    .navbar-nav .nav-link:hover {
        background: rgba(255,255,255,0.15);
    }

    .timeline::after { left: 20px; }
    /* Correction pour la timeline sur mobile */
    .timeline-item { width: 100%; padding-left: 60px; padding-right: 15px; }
    .timeline-item:nth-child(even) { left: 0%; }
    .timeline-item::after { left: 10px; }
    .timeline-item .timeline-content::before { left: -10px; border-width: 10px 10px 10px 0; border-color: transparent var(--bg-section-alt) transparent transparent; }
}

/* --- Client area: mobile menu background (bord droit) --- */
@media (max-width: 768px) {
    #clientNavbar,
    #clientNavbar.collapsing,
    #clientNavbar.show {
        /* Image placée sur le bord droit pour l'espace client */
        background: url('https://images.unsplash.com/photo-1620121692029-d088224ddc74?auto=format&fit=crop&w=1200&q=80') right center/cover no-repeat !important;
        background-color: transparent !important;
        padding: 1rem 1rem 1.5rem !important;
        box-shadow: 0 8px 18px rgba(0,0,0,0.12);
        border-radius: 0 0 0.75rem 0.75rem;
    }

    #clientNavbar .nav-link {
        color: #fff !important;
    }
}

/* --- NOUVEAU : Styles pour le formulaire de commentaire --- */
#comment-form-section .card {
    background-color: var(--bg-section-alt);
}

#comment-form-section .form-control {
    background-color: var(--bg-body);
    border: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#comment-form-section .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.15);
    background-color: var(--bg-body);
}


 /* --- 16. NOUVEAU : Styles pour la galerie de projet --- */
#main-project-image {
    transition: opacity 0.2s ease-in-out;
}

.project-gallery .gallery-thumbnail img {
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.3s ease, transform 0.3s ease;
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.project-gallery .gallery-thumbnail:hover img {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

/* --- 17. NOUVEAU : Amélioration du formulaire partenaire --- */
#partnerRequestForm .form-control {
    background-color: var(--bg-section-alt);
    border: 1px solid transparent;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#partnerRequestForm .form-control:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.15);
    outline: none;
}

.dark-theme #partnerRequestForm .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme #partnerRequestForm .form-control:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.25);
}

/* --- Client area: mobile menu background (AMÉLIORÉ) --- */
@media (max-width: 768px) {
    #clientNavbar,
    #clientNavbar.collapsing,
    #clientNavbar.show {
        /* NOUVEAU : Positionnement absolu pour se détacher du header */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        z-index: 1090;
        /* NOUVELLE IMAGE : Image avec un dégradé sombre pour la lisibilité, thème orange */
        background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95)), url('https://images.unsplash.com/photo-1580137189272-c97799807c1a?auto=format&fit=crop&w=1200&q=80') center center/cover no-repeat !important;
        background-color: transparent !important;
        padding: 1rem 1rem 1.5rem !important;
        box-shadow: 0 10px 20px rgba(0,0,0,0.12);
        border-radius: 0; /* Pas de coins arrondis en pleine largeur */
    }

    /* NOUVEAU : Styles pour les liens pour améliorer la lisibilité et l'interaction */
    #clientNavbar .nav-link {
        color: #fff !important;
        background: rgba(255, 255, 255, 0.08);
        padding: 0.8rem 1rem;
        border-radius: 0.5rem;
        margin-bottom: 0.25rem;
        transition: background-color 0.2s ease;
    }
    #clientNavbar .nav-link:hover {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* --- 18. NOUVEAU : Barre de progression pour le suivi de commande --- */
.progress-track {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 30px;
}
.progress-track::before {
    content: '';
    background-color: #e0e0e0;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 4px;
    width: 100%;
    z-index: 1;
}
.step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100px;
}
.step .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.4s ease;
}
.step .text { font-size: 0.8rem; color: #777; margin-top: 8px; }
.step.active .icon { background-color: var(--primary-color); }
.step.active .text { color: var(--primary-color); font-weight: bold; }



/* --- 16. NOUVEAU : Styles pour la section Témoignages --- */
.testimonial-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    position: relative;
    box-shadow: var(--shadow-soft);
    margin: 1rem;
    border: 1px solid rgba(0,0,0,0.05);
}

.testimonial-quote-icon {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.15;
}

.testimonial-author-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    padding: 3px;
    background-color: var(--bg-card);
}

#testimonialCarousel .carousel-control-prev,
#testimonialCarousel .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(0,0,0,0.05);
    border-radius: 50%;
}