/********** Template CSS **********/
:root{
  --primary: #dc3545; /* Rouge */
  --secondary: #0b5ed7;
  --secondary-light: #fdeaea; /* Changé en Rouge très clair pour les badges */
  --accent:#22c1c3;
  --muted:#6c757d;
  --bg:#ffffff; /* fond global blanc */
  --navbar-height: 80px; /* hauteur du header fixe */
}

body{
  background:var(--bg) !important;
  font-family: "Inter", "Saira", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  color:#222;
  padding-top: 0; /* retiré : plus d'espace blanc si navbar non-fixe */
}

.back-to-top {
    position: fixed;
    display: none;
    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;
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary {
    color: #FFFFFF;
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn.btn-primary:hover {
    color: #FFFFFF;
    background-color: #bb2d3b; /* Rouge plus sombre pour le hover */
    border-color: #b02a37;
}

.btn.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn.btn-outline-primary:hover {
    color: #FFFFFF;
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Overrides pour forcer le rouge sur les classes Bootstrap */
.bg-primary {
    background-color: var(--primary) !important;
}

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

/* Amélioration du design des Badges (Pills) de section */
.rounded-pill.bg-secondary.text-primary {
    background-color: var(--secondary-light) !important;
    color: var(--primary) !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.2px;
    padding: 0.6rem 1.5rem !important;
    border: 1px solid rgba(220, 53, 69, 0.15);
    display: inline-block;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.05);
}

.border-primary {
    border-color: var(--primary) !important;
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary) !important;
    color: #ffffff !important;
}

/* Style pour le badge des projets */
.project-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    z-index: 2;
    background-color: var(--primary) !important;
    color: #fff !important;
}

/* Overrides pour remplacer l'orange par le rouge */
.bg-secondary {
    background-color: var(--secondary-light) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.bg-secondary.text-primary {
    color: var(--secondary) !important;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Navbar ***/
.fixed-top {
    transition: .5s;
}

.fixed-top {
  transition: transform .25s ease, box-shadow .25s ease, top .25s ease;
}

.fixed-top.navbar-hidden {
  transform: translateY(-110%);
  pointer-events: none;
  opacity: 0.98;
}

.top-bar {
    height: 45px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    color: #FFFFFF;
    font-weight: 500;
    outline: none;
}

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

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        margin-top: 10px;
        border-top: 1px solid rgba(0, 0, 0, .07);
        background: var(--dark);
    }

    .navbar .navbar-nav .nav-link {
        padding: 10px 0;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
/* --- 1. Amélioration du Hero (Carousel) --- */
.carousel-item::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(rgba(0, 29, 35, 0.4), rgba(0, 29, 35, 0.1)); /* Overlay dégradé plus doux */
    z-index: 1;
}

.carousel-caption {
    z-index: 2;
}

.carousel-caption h1 {
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: none; /* On retire l'ombre lourde */
}

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

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--dark);
    border: 12px solid var(--dark);
    border-radius: 3rem;
}

@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;
    }
}

.page-header {
    padding-top: 12rem;
    padding-bottom: 6rem;
    background: linear-gradient(rgba(0, 29, 35, .8), rgba(0, 29, 35, .8)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: #999999;
}


/*** Causes ***/
.causes-item .progress {
    height: 5px;
    border-radius: 0;
    overflow: visible;
}

.causes-item .progress .progress-bar {
    position: relative;
    overflow: visible;
    width: 0px;
    border-radius: 0;
    transition: 5s;
}

.causes-item .progress .progress-bar span {
    position: absolute;
    top: -7px;
    right: 0;
    width: 40px;
    height: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: var(--primary);
    color: #FFFFFF;
}

.causes-item .causes-overlay {
    position: absolute;
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    overflow: hidden;
    opacity: 0;
    transition: .5s;
}

.causes-item:hover .causes-overlay {
    height: 100%;
    opacity: 1;
}


/*** Service ***/
.service-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .06);
}

/* --- 2. Cartes Unifiées (Services, Actualités, Projets) --- */
.service-item, .causes-item, .project-item {
    border: none !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    background: #ffffff;
}

.service-item:hover, .causes-item:hover, .project-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
}

/* Effet de zoom sur les images au survol */
.causes-item .position-relative, .project-item .position-relative {
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.causes-item img, .project-item img {
    transition: transform 0.6s ease;
}

.causes-item:hover img, .project-item:hover img {
    transform: scale(1.1);
}

/*** Donate ***/
.donate {
    background: transparent; /* Retrait de l'effet sombre sur le bloc Contact/Parallax */
}

/* Ajout d'une ombre au texte pour le bloc Contact */
.donate h1,
.donate p {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.btn-group .btn-light:hover,
.btn-group input[type="radio"]:checked+label {
    color: var(--primary);
    border-color: var(--primary);
}


/*** Team ***/
.team-item img {
    position: relative;
    top: 0;
    transition: .5s;
}

.team-item:hover img {
    top: -30px;
}

.team-item .team-text {
    position: relative;
    height: 100px;
    transition: .5s;
}

.team-item:hover .team-text {
    margin-top: -60px;
    height: 160px;
}

.team-item .team-text .team-social {
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-text .team-social {
    opacity: 1;
}

.team-item .team-social .btn {
    display: inline-flex;
    color: var(--primary);
    background: #FFFFFF;
    border-radius: 40px;
}

.team-item .team-social .btn:hover {
    color: #FFFFFF;
    background: var(--primary);
}


/*** Testimonial ***/
.testimonial-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.testimonial-carousel::after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

@media (min-width: 768px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 200px;
    }
}

@media (min-width: 992px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 300px;
    }
}

.testimonial-carousel .owl-item .testimonial-text {
    background: var(--light);
    transform: scale(.8);
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text {
    background: var(--primary);
    transform: scale(1);
}

.testimonial-carousel .owl-item .testimonial-text *,
.testimonial-carousel .owl-item .testimonial-item img {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text * {
    color: var(--light) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item img {
    background: var(--primary) !important;
}

.testimonial-carousel .owl-nav {
    position: absolute;
    width: 350px;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
    z-index: 1;
}

.testimonial-carousel:hover .owl-nav {
    width: 300px;
    opacity: 1;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    position: relative;
    color: var(--primary);
    font-size: 45px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: var(--dark);
}


/*** Footer ***/

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: rgba(255,255,255,0.5);
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: rgba(255,255,255,0.5);
    margin-right: 10px;
}

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

.footer .btn.btn-square {
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.5);
}

.footer .btn.btn-square:hover {
    color: var(--secondary);
    border-color: var(--light);
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

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

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

.container-fluid.fixed-top{
  background: rgba(255,255,255,0.98); /* fond opaque pour lisibilité */
   backdrop-filter: blur(6px);
   -webkit-backdrop-filter: blur(6px);
   box-shadow: 0 6px 18px rgba(2,6,23,0.12);
   border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* Désactive la couleur bleue sur le lien actif/hover de la navbar */
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active,
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    color: #222 !important;
    background: #f6f9fc !important;
}

/* Neutraliser couleur/effets pour les liens de la navbar (hover/active) */
.navbar .navbar-nav .nav-link,
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus,
.navbar .navbar-nav .nav-link.active,
.navbar .navbar-nav .nav-link[aria-current],
.navbar .dropdown-item,
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  color: inherit !important;
  background: transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

/* Rendre la navbar toujours fixe en haut */
/* --- Navbar & Liens en noir --- */
  .navbar, .navbar * {
    color: #000 !important;
    text-shadow: none !important;
  }
  .navbar .navbar-nav .nav-link,
  .navbar .navbar-brand,
  .navbar .dropdown-item,
  .navbar .btn,
  .navbar .fw-bold,
  .navbar .dropdown-toggle,
  .navbar .dropdown-menu,
  .navbar .nav-item .dropdown-menu a,
  .navbar .btn-outline-primary,
  .navbar .navbar-toggler,
  .navbar .navbar-toggler span,
  .navbar .fa,
  .navbar .navbar-toggler-icon {
    color: #000 !important;
    background: none !important;
    border-color: #000 !important;
  }
  .navbar .btn-outline-primary {
    background-color: #fff !important;
    border-color: #000 !important;
    color: #000 !important;
  }
  .navbar .text-white {
    color: #000 !important;
  }
  .navbar .dropdown-menu {
    background-color: #fff !important;
  }
  .navbar .navbar-nav .nav-link:hover,
  .navbar .navbar-nav .nav-link.active,
  .navbar .dropdown-item:hover,
  .navbar .dropdown-item:focus {
    color: #222 !important;
    background: #f6f9fc !important;
  }

/* Navbar — style amélioré */
.navbar {
  padding-top: 10px;
  padding-bottom: 10px;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

/* Brand */
.navbar-brand .text-primary { font-size: 1.05rem; letter-spacing: .4px; }
.navbar-brand small { font-size: .7rem; margin-top: -2px; }

/* Nav links — pas de changement de couleur quand actif */
.navbar .nav-link {
  color: #222 !important;
  padding: .5rem 0.75rem;
  font-weight: 500;
  transition: color .15s ease, transform .15s ease;
}
.navbar .nav-link:hover {
  color: #0b5ed7 !important;
  text-decoration: none;
  transform: translateY(-1px);
}
/* Neutraliser couleur forcée pour actif (selon demande) */
.navbar .nav-link.active,
.navbar .nav-link:focus {
  color: inherit !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Dropdown */
.navbar .dropdown-menu {
  border-radius: .35rem;
  box-shadow: 0 8px 24px rgba(2,6,23,0.08);
}

/* Donate button */
.btn-donate {
  background: linear-gradient(90deg, #dc3545, #ff4d5a); /* Dégradé de rouge */
  color: #fff;
  border: none;
  padding: .5rem .9rem;
  border-radius: 30px;
  box-shadow: 0 6px 18px rgba(220, 53, 69, 0.12);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.btn-donate:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(220, 53, 69, 0.14);
}

/* Mobile menu background for readability */
@media (max-width: 991.98px) {
  .navbar-collapse { background: #fff; padding: 1rem; border-radius: 8px; box-shadow: 0 8px 30px rgba(2,6,23,0.06); }
  .navbar { padding-left: .75rem; padding-right: .75rem; }
}

/* Rendre l'icône du bouton navbar noire pour une meilleure visibilité sur fond blanc */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0, 0, 0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Compact mobile spacing — rapprocher logo/titre comme sur l'exemple */
@media (max-width: 576px) {
  .navbar {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .navbar-brand img {
    width: 70px;
    height: 66px;
    object-fit: cover;
    margin-right: .5rem;
  }

  .navbar-brand .fw-bold {
    font-size: 1rem;
    line-height: 1;
  }

  .navbar-brand small {
    font-size: .65rem;
    display: block;
    margin-top: 2px;
    line-height: 1;
  }

  .navbar .nav-link {
    padding: .25rem .4rem !important;
    margin-right: 8px;
    font-size: .95rem;
  }

  /* Réduire verticalement les grandes sections (About/Sections) */
  .container-xxl.py-5 {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }

  /* Rapprocher image + texte dans la colonne About */
  .container-xxl.py-5 .row.g-5 {
    gap: 0.75rem;
  }

  /* Ajustements pour les cartes/causes si nécessaire */
  .causes-item .text-center p,
  .service-item p {
    margin-bottom: .75rem;
  }
}

/* --- Modern Footer Design --- */
.footer {
    border-radius: 50px 50px 0 0; /* Courbe élégante en haut */
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.footer-link {
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: #fff !important;
    transform: translateX(8px);
}

.footer-link i {
    font-size: 12px;
    transition: 0.3s;
}

.social-btn {
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 12px; /* Carré arrondi moderne */
    color: #fff;
    transition: all 0.3s ease;
    margin-right: 10px;
    text-decoration: none;
}

.social-btn:hover {
    background: #fff;
    color: #1a5c2a !important; /* Couleur du footer au survol */
    transform: translateY(-5px);
}

.contact-box {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- Rétablissement du bouton WhatsApp --- */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    z-index: 9999; /* Très haut pour être au-dessus de tout */
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    color: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* --- Partners Section Improved --- */
.partner-item {
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 15px;
    background: #f8f9fa;
    text-decoration: none !important;
    height: 220px; /* Hauteur fixe pour que toutes les cartes soient identiques */
    text-align: center;
}

.partner-logo {
    max-height: 50px;
    width: auto !important;
    filter: none;
    opacity: 1;
    transition: all 0.4s ease;
    margin-bottom: 15px;
}

.partner-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
    display: block;
}

.partner-link-text {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    opacity: 1; /* Toujours visible */
    transform: none; /* Pas de décalage */
    transition: 0.3s;
    border-bottom: 1px solid transparent;
}

.partner-item:hover {
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.partner-item:hover .partner-link-text {
    border-bottom: 1px solid var(--primary); /* Petit effet au survol */
}

/* --- Nouveau Design Navbar (Image) --- */
.custom-nav-link {
    color: #333 !important;
    font-weight: 600;
    padding: 5px 12px !important; /* Espacement réduit */
    margin: 0 2px;
    position: relative;
    transition: 0.3s;
}

/* On retire le fond gris qui alourdissait le design */
.custom-nav-link.active,
.custom-nav-link:hover {
    color: #6610f2 !important;
    background: none !important;
}

.custom-nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -2px; /* Collé sous le texte */
    left: 12px;
    right: 12px;
    height: 3px; /* Barre plus fine */
    background-color: #6610f2;
    border-radius: 10px;
}

/* Icônes sociales plus compactes */
.nav-social-item {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    transition: 0.3s;
    font-size: 14px;
    margin-left: 5px;
}

.nav-social-item:hover {
    background: #6610f2;
    color: white;
}

/* Ajustement du dropdown pour PC */
.navbar .dropdown-menu {
    margin-top: 10px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- Design Mobile Offcanvas (Style Sidebar) --- */
@media (max-width: 991.98px) {
    .offcanvas-start {
        width: 300px !important;
    }

    .offcanvas-body {
        display: flex;
        flex-direction: column;
        padding: 20px !important;
    }

    .offcanvas-body .navbar-nav {
        align-items: flex-start !important;
        width: 100%;
    }

    .offcanvas-body .nav-link {
        padding: 12px 0 !important;
        border-bottom: none; /* Ligne retirée ici */
        width: 100%;
        font-weight: 500;
        color: #333 !important;
        display: flex;
        align-items: center;
    }

    .text-violet {
        color: #6610f2 !important; /* Couleur violette de votre image */
        width: 25px;
        text-align: center;
    }

    /* Cacher la barre violette active sur mobile pour ce design */
    .custom-nav-link.active::after {
        display: none;
    }
}

/* --- Forcer l'affichage horizontal sur Desktop --- */
@media (min-width: 992px) {
    .offcanvas {
        position: static !important;
        visibility: visible !important;
        transform: none !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        border: none !important;
        display: flex !important;
        flex-grow: 1;
    }
    .offcanvas-header {
        display: none;
    }
    .offcanvas-body {
        display: flex !important;
        padding: 0 !important;
        overflow-y: visible !important;
    }
}

/* --- Project Section Styles --- */
.project-item {
    transition: .5s;
    border: 1px solid transparent;
}

.project-item:hover {
    background: #ffffff !important;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    border-color: var(--primary);
}

/* --- Project Section Improvements --- */
.project-item {
    border: 1px solid #eee !important;
    transition: all 0.3s ease;
}

/* Forcer la taille identique des images */
.project-item img {
    height: 220px; /* Hauteur fixe pour toutes les images */
    width: 100%;
    object-fit: cover; /* Remplit le cadre sans déformer l'image */
    transition: transform 0.6s ease;
}

.project-item:hover img {
    transform: scale(1.1);
}

/* --- 6. Effet de flou sur la Navbar au scroll --- */
.sticky-top.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9) !important;
}

/* --- Gallery Section --- */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    height: 250px; /* Hauteur fixe pour l'harmonie */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s;
}

.gallery-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.7); /* Rouge transparent au survol */
    opacity: 0;
    transition: .5s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay .btn {
    transform: translateY(20px);
    transition: .5s;
}

.gallery-item:hover .gallery-overlay .btn {
    transform: translateY(0);
}

/* --- Gallery Section Improved --- */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    height: 280px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* filter: grayscale(100%);  <-- Supprimé pour afficher la couleur directement */
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: flex-end; /* Texte en bas */
    padding: 30px;
    background: linear-gradient(to top, rgba(220, 53, 69, 0.9) 0%, transparent 70%); /* Dégradé rouge */
    opacity: 0;
    transition: 0.5s;
}

.gallery-text {
    transform: translateY(20px);
    transition: 0.5s;
    width: 100%;
}

.gallery-item:hover img {
    /* filter: grayscale(0%); <-- Supprimé car l'image est déjà en couleur */
    transform: scale(1.15);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-text {
    transform: translateY(0);
}

.gallery-item .btn-primary {
    background: #fff !important;
    color: var(--primary) !important;
    border: none;
}

/* --- Gallery Modal Image Fix --- */
#galleryModalImg {
    width: 100%;
    height: 500px; /* Dimension unique fixée */
    object-fit: cover; /* Remplit l'espace sans déformer */
    background-color: #000;
}

@media (max-width: 768px) {
    #galleryModalImg {
        height: 350px; /* Hauteur réduite pour mobile */
    }
}
