        /*** General ***/
        :root {
            --primary: #0099cc; /* Couleur primaire (bleu) */
            --secondary: #6c757d; /* Couleur secondaire (gris) */
            --light: #f8f9fa; /* Couleur claire */
            --dark: #343a40; /* Couleur sombre */
        }

        body {
            font-family: 'Montserrat', sans-serif;
            color: #555;
            background-color: #fff;
        }

        h1, h2, h3, h4, h5, h6 {
            font-family: 'Roboto Slab', serif;
            color: var(--dark);
            font-weight: 700;
        }

.bg-custom {
  position: relative;
  position: relative;
  min-height: 100vh;
  background: #fff;
}

.bg-custom::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url(/assets/img/bg.webp);
  background-position: center;
  background-size: cover; /* L’image s'adapte à l’écran sans déformation */
  background-repeat: no-repeat;
  opacity: 0.2; /* Transparence ajustable */
  z-index: -1;
  will-change: transform; /* Optimisation performance */
}

        .fw-medium { font-weight: 500 !important; }
        .fw-bold { font-weight: 700 !important; }
        .fw-black { font-weight: 900 !important; }

        .btn {
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            transition: .5s;
        }

        .btn.btn-primary,
        .btn.btn-secondary {
            color: #FFFFFF;
        }

         .btn-square { width: 38px; height: 38px; padding: 0; display: flex; align-items: center; justify-content: center; font-weight: normal; border-radius: .25rem; }
         .btn-sm-square { width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center; font-weight: normal; border-radius: .25rem; }
         .btn-lg-square { width: 48px; height: 48px; padding: 0; display: flex; align-items: center; justify-content: center; font-weight: normal; border-radius: .25rem; }

  /*** Navbar ***/
        .navbar-brand h1 {
            color: var(--primary);
            font-size: 2.2rem;
        }

        .navbar .navbar-nav .nav-link {
            padding: 30px 15px;
            font-size: 1rem;
            font-weight: 500;
            text-transform: uppercase;
            color: var(--dark);
            outline: none;
            transition: .5s;
        }

        .sticky-top.navbar .navbar-nav .nav-link {
            padding: 20px 15px;
        }

        .navbar .navbar-nav .nav-link:hover,
        .navbar .navbar-nav .nav-link.active {
            color: var(--primary);
        }

        .navbar-light .navbar-toggler {
             color: var(--dark);
             border-color: rgba(52, 58, 64, 0.3);
        }

        /* Sticky Navbar Styling */
        .navbar.sticky-top {
            top: -100px; /* Start hidden if there's a top bar */
            transition: .5s;
        }
        .navbar.sticky-top.navbar-scrolled {
            top: 0;
            background-color: #ffffff;
            box-shadow: 0 .5rem 1rem rgba(0,0,0,.10)!important;
        }
        /* Adjust padding when scrolled */
         .navbar.sticky-top.navbar-scrolled .navbar-nav .nav-link {
            padding: 20px 15px;
         }


        @media (max-width: 991.98px) {
            .navbar .navbar-nav .nav-link,
            .sticky-top.navbar .navbar-nav .nav-link {
                padding: 10px 0;
            }
             .navbar.sticky-top { /* Ensure it's visible on mobile when scrolled */
                 top: 0 !important;
             }
	      .bg-custom::after {
                background-attachment: scroll !important;
                position: fixed;
             } 
        }

        @media (min-width: 992px) {
            .navbar.navbar-expand-lg { /* Ensure correct alignment with dropdown */
                 align-items: center;
            }
             .navbar .nav-item .dropdown-menu {
                display: block;
                border: none;
                margin-top: 0;
                top: 150%;
                opacity: 0;
                visibility: hidden;
                transition: .5s;
             }
             .navbar .nav-item:hover .dropdown-menu {
                top: 100%;
                visibility: visible;
                transition: .5s;
                opacity: 1;
             }
        }


        /*** Header Carousel ***/
        .carousel-caption {
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, .6);
            z-index: 1;
        }

        .carousel-control-prev,
        .carousel-control-next {
            width: 10%;
        }

        .carousel-control-prev-icon,
        .carousel-control-next-icon {
            width: 3rem;
            height: 3rem;
            background-color: var(--primary);
            border-radius: 50%;
        }

        @media (max-width: 768px) {
            #header-carousel .carousel-item {
                position: relative;
                min-height: 450px;
            }

            #header-carousel .carousel-item img {
                position: absolute;
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
            .carousel-caption h1 {
                font-size: 1.8rem;
            }
            .carousel-caption p {
                 font-size: 0.9rem;
                 padding: 0 10px !important;
                 margin: 0 auto !important;
             }
        }


        /*** Section Title ***/
        .section-title h5::before {
            position: absolute;
            content: "";
            width: 45px;
            height: 3px;
            right: -55px;
            bottom: 11px;
            background: var(--primary);
        }

        .section-title h5::after {
            position: absolute;
            content: "";
            width: 15px;
            height: 3px;
            right: -75px;
            bottom: 11px;
            background: var(--secondary);
        }
        .section-title.text-center h5::before { left: -55px; right: auto; }
        .section-title.text-center h5::after { left: -75px; right: auto; }


        /*** Services ***/
        .service-item {
            position: relative;
            padding: 45px 30px;
            transition: .5s;
            z-index: 1;
        }

        .service-item::before {
            position: absolute;
            content: "";
            width: 100%;
            height: 10px;
            left: 0;
            bottom: 0;
            background: var(--primary);
            border-radius: 0 0 5px 5px;
            transition: .5s;
            z-index: -1;
        }

        .service-item:hover::before {
            height: 100%;
            border-radius: 5px;
        }
         .service-item .service-icon {
            margin-bottom: 30px;
            width: 80px;
            height: 80px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--primary);
            border-radius: 50%;
            transform: rotate(-45deg);
            transition: .5s;
        }

         .service-item:hover .service-icon {
            background: var(--light);
         }

        .service-item .service-icon i {
            color: #FFFFFF;
            font-size: 40px;
            transform: rotate(45deg);
            transition: .5s;
        }
        .service-item:hover .service-icon i {
            color: var(--primary);
        }

        .service-item h4,
        .service-item p {
            transition: .5s;
        }

        .service-item:hover h4,
        .service-item:hover p {
            color: #FFFFFF;
        }

     .service-item a.btn {
            position: absolute;
            bottom: -40px; /* Start hidden below */
            left: 50%;
            transform: translateX(-50%);
            color: var(--primary);
            background: #FFFFFF;
            border: 1px solid var(--primary);
            border-radius: 40px;
            transition: .5s;
            opacity: 0; /* Hidden initially */
            z-index: 5;
        }

        .service-item:hover a.btn {
            bottom: 20px; /* Move up on hover */
            opacity: 1; /* Show on hover */
        }
        .service-item a.btn:hover {
             background: var(--primary);
             color: #fff;
        }

        /*** Projects ***/
        .project-item {
            padding: 30px;
            border: 1px solid #eee;
            transition: all 0.3s ease;
        }
        .project-item:hover {
             box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
             border-color: transparent;
        }
        .project-item img {
            max-height: 200px; /* Limit image height */
            width: 100%;
            object-fit: cover; /* Ensure image covers area */
            border-radius: 5px;
        }
         .project-item a.btn {
             margin-top: 15px;
         }

        /*** Team ***/
        .team-item {
            transition: .5s;
             padding: 30px;
             border: 1px solid #eee;
        }
         .team-item:hover {
             box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
             border-color: transparent;
        }

        .team-item img {
            width: 150px;
            height: 150px;
            object-fit: cover;
            border-radius: 50%;
            border: 5px solid var(--light);
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
        }
         .team-item .btn-social {
             color: var(--primary);
             border: 1px solid var(--primary);
         }
         .team-item .btn-social:hover {
             color: #fff;
             background-color: var(--primary);
         }


        /*** Testimonial ***/
        .testimonial-carousel .owl-item .testimonial-item {
            box-shadow: 0 0 15px rgba(0, 0, 0, .08);
            border-radius: 5px;
        }

        .testimonial-carousel .owl-nav {
            margin-top: 30px;
            display: flex;
            justify-content: center;
        }

   .testimonial-carousel .owl-nav .owl-prev,
        .testimonial-carousel .owl-nav .owl-next {
            margin: 0 12px;
            width: 60px;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary);
            background: var(--light);
            border-radius: 60px;
            font-size: 22px;
            transition: .5s;
        }

        .testimonial-carousel .owl-nav .owl-prev:hover,
        .testimonial-carousel .owl-nav .owl-next:hover {
            color: #FFFFFF;
            background: var(--primary);
        }

        .testimonial-carousel .owl-dots {
            margin-top: 20px;
            display: flex;
            justify-content: center;
        }
        .testimonial-carousel .owl-dot {
            margin: 0 5px;
            width: 12px;
            height: 12px;
            background: var(--light);
            border-radius: 50%;
            transition: .5s;
        }
        .testimonial-carousel .owl-dot.active {
            background: var(--primary);
        }


        /*** Footer ***/
        .footer {
            background: #222; /* Darker footer */
            color: #aaa; /* Lighter text for footer */
        }


        .footer .btn.btn-social {
            margin-right: 5px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #aaa;
            border: 1px solid #aaa;
            border-radius: 40px;
            transition: .3s;
        }

        .footer .btn.btn-social:hover {
            color: var(--primary);
            border-color: var(--primary);
        }

        .footer .btn.btn-link {
            display: block;
            margin-bottom: 10px;
            padding: 0;
            text-align: left;
            color: #aaa;
            font-size: 1rem;
            font-weight: normal;
            text-transform: capitalize;
            transition: .3s;
        }

        .footer .btn.btn-link::before {
            position: relative;
            content: "\f105"; /* FontAwesome right arrow */
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            margin-right: 10px;
        }

        .footer .btn.btn-link:hover {
            letter-spacing: 1px;
            box-shadow: none;
            color: var(--primary);
        }

        .footer .copyright {
            padding: 25px 0;
            font-size: 1rem;
            border-top: 1px solid rgba(256, 256, 256, .1);
        }
          .footer .copyright a {
            color: var(--light);
        }

        .footer .copyright a:hover {
            color: var(--primary);
        }


         /*** Back to Top Button ***/
        .back-to-top {
            position: fixed;
            display: none; /* Hidden by default, shown via JS */
            right: 30px;
            bottom: 30px;
            z-index: 99;
        }

         /*** Spinner ***/
        #spinner {
            opacity: 0;
            visibility: hidden;
            transition: opacity .5s ease-out, visibility 0s linear .5s;
            z-index: 99999;
        }
        #spinner.show {
            transition: opacity .5s ease-out, visibility 0s linear 0s;
            visibility: visible;
            opacity: 1;
        }
        .spinner-grow {
            width: 3rem;
            height: 3rem;
        }

        /*** Dark Theme Overrides ***/
        body.dark-theme {
            background-color: #1a1a1a;
            color: #e0e0e0;
        }

        body.dark-theme h1,
        body.dark-theme h2,
        body.dark-theme h3,
        body.dark-theme h4,
        body.dark-theme h5,
        body.dark-theme h6 {
            color: var(--light);
        }

        /* Navbar */
        body.dark-theme .navbar.sticky-top.navbar-scrolled {
            background-color: #2d2d2d !important;
            box-shadow: 0 .5rem 1rem rgba(255, 255, 255, 0.05) !important;
        }

        body.dark-theme .navbar .navbar-nav .nav-link {
            color: #e0e0e0 !important;
        }

        body.dark-theme .navbar-light .navbar-toggler {
            border-color: rgba(255, 255, 255, 0.3);
        }

        /* Header Carousel */
        body.dark-theme .carousel-caption {
            background: rgba(0, 0, 0, 0.75);
        }

        /* Services */
        body.dark-theme .service-item {
            background: #2d2d2d;
        }

        body.dark-theme .service-item::before {
            background: var(--primary);
        }

        body.dark-theme .service-item:hover h4,
        body.dark-theme .service-item:hover p {
            color: var(--light);
        }

        /* Projects */
        body.dark-theme .project-item {
            background: #2d2d2d;
            border-color: #444;
        }

        body.dark-theme .project-item:hover {
            box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
        }

        /* Team */
        body.dark-theme .team-item {
            background: #2d2d2d;
            border-color: #444;
        }

        body.dark-theme .team-item img {
            border-color: #444;
        }

        /* Testimonials */
        body.dark-theme .testimonial-carousel .owl-item .testimonial-item {
            background: #2d2d2d;
        }

        /* Footer */
        body.dark-theme .footer {
            background: #111;
        }

        body.dark-theme .footer .copyright {
            border-top-color: rgba(255, 255, 255, 0.1);
        }

        /* Form Elements */
        body.dark-theme input,
        body.dark-theme textarea,
        body.dark-theme .form-control {
            background-color: #333 !important;
            color: #fff !important;
            border-color: #444 !important;
        }

        /* General Components */
        body.dark-theme .card {
            background-color: #2d2d2d;
            border-color: #444;
        }

        .theme-toggle {
            position: absolute;
            right: 20px;
            top: 20px;
            background: transparent;
            border: none;
            cursor: pointer;
            font-size: 1.5em;
            color: #333;
            z-index: 1000;
            transition: color 0.3s ease;
        }

        .theme-toggle:hover {
            color: #666;
        }

        body.dark-theme {
            background-color: #1a1a1a;
            color: #fff;
        }

        body.dark-theme .menu li a {
            color: #fff;
        }

        body.dark-theme .theme-toggle {
            color: #fff;
        }

        /* Text Overrides */
        body.dark-theme .text-dark {
            color: var(--light) !important;
        }

        body.dark-theme .text-muted {
            color: #999 !important;
        }

        /* Buttons */
        body.dark-theme .btn-outline-primary {
            border-color: var(--primary);
            color: var(--primary);
        }

        body.dark-theme .btn-outline-primary:hover {
            background-color: var(--primary);
        }

        /* Transitions */
        body.dark-theme * {
            transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
        }
