/********** Template CSS **********/
:root {
    --primary: #348E38;
    --secondary: #525368;
    --light: #E8F5E9;
    --dark: #0F4229;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

h1,
.h1,
h2,
.h2,
.fw-bold {
    font-weight: 700 !important;
}

h3,
.h3,
h4,
.h4,
.fw-medium {
    font-weight: 600 !important;
}

h5,
.h5,
h6,
.h6,
.fw-semi-bold {
    font-weight: 500 !important;
}


/*** 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 {
    transition: .5s;
    font-weight: 500;
}

.btn-primary,
.btn-outline-primary:hover {
    color: var(--light);
}

.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 ***/
.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

.navbar .navbar-brand,
.navbar a.btn {
    height: 80px
}

.navbar .navbar-nav .nav-link {
    margin-right: 35px;
    padding: 25px 0;
    color: var(--dark);
    font-size: 18px;
    font-weight: 500;
    outline: none;
}

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

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

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }
}

@media (min-width: 992px) {
    .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-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(15, 66, 41, .6);
    z-index: 1;
}

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

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

@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 {
    background: linear-gradient(rgba(15, 66, 41, .6), rgba(15, 66, 41, .6)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
    font-size: 18px;
    color: var(--light);
}


/*** Top Feature ***/
@media (min-width: 991.98px) {
    .top-feature {
        position: relative;
        margin-top: -144px;
        z-index: 3;
    }
}


/*** Facts & Quote — parallax + overlay vert ***/
.facts,
.quote {
    position: relative;
    background: transparent;
}
.facts::before,
.quote::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 66, 41, .60);
    z-index: 0;
}
.facts .container,
.quote .container {
    position: relative;
    z-index: 1;
}


/*** Service ***/
.service-item {
    position: relative;
    text-align: center;
}

.service-item .service-img {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: -1;
}

.service-item .service-img img {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    object-fit: cover;
    transform: scale(1.2);
    transition: .3s;
    z-index: -1;
}

.service-item:hover .service-img img {
    transform: scale(1);
}

.service-item .service-text {
    background: #FFFFFF;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    transition: .3s;
}

.service-item:hover .service-text {
    background: rgba(15, 66, 41, .6);
}

.service-item .service-text h4,
.service-item .service-text p {
    transition: .3;
}

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

.service-item:hover .service-text p {
    color: var(--light);
}

.service-item .service-text .btn-square {
    width: 100px;
    height: 100px;
    background: transparent;
    transition: .5s;
}

.service-item:hover .service-text .btn-square {
    background: var(--light);
}

.service-item .service-text .btn {
    width: 31px;
    height: 31px;
    display: inline-flex;
    align-items: center;
    color: var(--dark);
    background: var(--light);
    white-space: nowrap;
    overflow: hidden;
    transition: .3s;
}

.service-item:hover .service-text .btn {
    width: 112px;
}


/*** Project Portfolio ***/
#portfolio-flters {
    display: inline-block;
    background: var(--light);
    padding: 10px 15px;
}

#portfolio-flters li {
    display: inline-block;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
    transition: .5s;
    border-bottom: 2px solid transparent;
}

#portfolio-flters li:hover,
#portfolio-flters li.active {
    color: var(--dark);
    border-color: var(--dark);
}

.portfolio-inner {
    position: relative;
    overflow: hidden;
}

.portfolio-inner::before,
.portfolio-inner::after {
    position: absolute;
    content: "";
    width: 0;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(15, 66, 41, .6);
    transition: .5s;
}

.portfolio-inner::after {
    left: auto;
    right: 0;
}

.portfolio-inner:hover::before,
.portfolio-inner:hover::after {
    width: 50%;
}

.portfolio-inner .portfolio-text {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: .5s;
    z-index: 3;
    opacity: 0;
}

.portfolio-inner:hover .portfolio-text {
    transition-delay: .3s;
    opacity: 1;
}

.portfolio-inner .portfolio-text .btn {
    background: var(--light);
    color: var(--primary);
}

.portfolio-inner .portfolio-text .btn:hover {
    background: var(--primary);
    color: var(--light);
}


/*** Team ***/
.team-item {
    position: relative;
    overflow: hidden;
}

.team-item .team-text {
    position: absolute;
    width: calc(100% - 45px);
    left: -100%;
    bottom: 45px;
    padding: 1.5rem;
    background: #FFFFFF;
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: .5s;
}

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

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

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

.team-item .team-img .team-social {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .5s;
    z-index: 3;
    opacity: 0;
}

.team-item:hover .team-img .team-social {
    transition-delay: .3s;
    opacity: 1;
}


/*** Testimonial ***/

.testimonial-carousel .owl-item img {
    width: 100px;
    height: 100px;
}

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

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

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


/*** Footer ***/
.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--light);
    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;
    margin-right: 10px;
}

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

.copyright {
    color: var(--light);
    background: #072A19;
}

.copyright a {
    color: #FFFFFF;
}

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

/* ==============================================================
   MODIFICATIONS HEADER + HERO  (v2 redesign)
   ============================================================== */

/*** Topbar réseaux sociaux ***/
.topbar-social {
    background: var(--dark);
    min-height: 48px;
}

.topbar-social .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: 6px;
    border-radius: 50%;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .3);
    font-size: 13px;
    transition: all .3s ease;
}

.topbar-social .social-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/*** Navbar : logo image (remplace le texte) ***/
.navbar .navbar-brand .brand-logo {
    height: 64px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Le brand n'a plus besoin de la hauteur de 80px quand il contient une image */
.navbar .navbar-brand {
    height: 90px;
    display: flex;
    align-items: center;
}

/*** Navbar : menu centré et mieux aligné ***/
.navbar .navbar-nav .nav-link {
    margin: 0 11px;
    padding: 30px 0;
    color: var(--dark);
    font-size: 14.5px;
    font-weight: 500;
    position: relative;
}

/* Soulignement animé sous le lien actif / au survol */
.navbar .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 20px;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all .3s ease;
    transform: translateX(-50%);
}

.navbar .navbar-nav .nav-link:hover::after,
.navbar .navbar-nav .nav-link.active::after {
    width: 100%;
}

/*** Bouton Contact (remplace "Get A Quote") ***/
.navbar .btn-contact {
    height: 90px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .3px;
    background: var(--primary);
    border: none;
    color: #fff;
    transition: all .3s ease;
}

.navbar .btn-contact:hover {
    background: var(--dark);
    color: #fff;
}

/*** Bouton flottant sélecteur de langue ***/
.lang-switcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1050;
}

.lang-toggle {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: #fff;
    border: 2px solid var(--primary);
    box-shadow: 0 6px 20px rgba(15, 66, 41, .18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    padding: 0;
    transition: all .3s ease;
}

.lang-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(15, 66, 41, .28);
    background: var(--light);
}

.lang-toggle .fi {
    width: 26px;
    height: 18px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

.lang-toggle .lang-code {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--dark);
    line-height: 1;
}

.lang-menu {
    position: absolute;
    right: 0;
    bottom: 78px;
    min-width: 180px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(15, 66, 41, .22);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .25s ease;
}

.lang-switcher.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-menu .lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all .2s ease;
}

.lang-menu .lang-option:hover {
    background: var(--light);
    color: var(--primary);
}

.lang-menu .lang-option.active {
    background: var(--light);
    color: var(--primary);
    font-weight: 600;
}

.lang-menu .lang-option .fi {
    width: 24px;
    height: 17px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
    flex-shrink: 0;
}

/*** Hero plein écran ***/
.hero-fullscreen .carousel-item {
    height: calc(100vh - 138px);
    /* 48px topbar + 90px navbar */
    min-height: 520px;
    max-height: 820px;
}

.hero-fullscreen .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* La carousel-caption reste par-dessus avec l'overlay vert */
.hero-fullscreen .carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(15, 66, 41, .55);
    padding: 0 20px;
}

/* Titre plus imposant et bouton arrondi comme dans la maquette */
.hero-fullscreen .carousel-caption h1 {
    font-size: clamp(2.2rem, 5.5vw, 4.8rem);
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 4px 20px rgba(0, 0, 0, .3);
}

.hero-fullscreen .carousel-caption p {
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    opacity: .95;
}

.hero-fullscreen .btn-hero {
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: .5px;
    box-shadow: 0 6px 20px rgba(52, 142, 56, .45);
    transition: all .3s ease;
}

.hero-fullscreen .btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(52, 142, 56, .6);
}

/* Flèches du carousel : rondes et bien visibles */
.hero-fullscreen .carousel-control-prev,
.hero-fullscreen .carousel-control-next {
    width: 8%;
    opacity: 1;
}

.hero-fullscreen .carousel-control-prev-icon,
.hero-fullscreen .carousel-control-next-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: rgba(52, 142, 56, .85);
    border: none;
    background-size: 40% 40%;
    transition: all .3s ease;
}

.hero-fullscreen .carousel-control-prev:hover .carousel-control-prev-icon,
.hero-fullscreen .carousel-control-next:hover .carousel-control-next-icon {
    background-color: var(--primary);
    transform: scale(1.1);
}

/*** Responsive : tablettes et mobiles ***/
@media (max-width: 991.98px) {
    .navbar .navbar-brand .brand-logo {
        height: 50px;
    }

    .navbar .navbar-brand {
        height: auto;
        padding: 12px 20px !important;
    }

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

    .navbar .navbar-nav .nav-link::after {
        display: none;
    }

    .hero-fullscreen .carousel-item {
        height: calc(100vh - 80px);
        min-height: 450px;
    }

    .lang-switcher {
        right: 16px;
        bottom: 16px;
    }

    .lang-toggle {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 767.98px) {

    .hero-fullscreen .carousel-control-prev,
    .hero-fullscreen .carousel-control-next {
        display: none;
    }
}

/*** Override ancien CSS carousel-caption (on utilise .hero-fullscreen) ***/
#header-carousel.hero-fullscreen .carousel-caption {
    z-index: 2;
}

/*** JS : toggle du menu langue ***/


/* ==============================================================
   CORRECTIONS V2 (ajustements après retour utilisateur)
   ============================================================== */

/*** 1. Bouton Contact : étiré sur toute la hauteur de la navbar
       (collé au topbar au-dessus et au hero en-dessous) ***/
.navbar .btn-contact {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0;
    align-self: stretch;
    min-height: 90px;
}

/*** 2. Hero : on l'allonge en n'enlevant que la hauteur de la navbar
       (le topbar disparaît au scroll, donc on récupère ses 48px) ***/
.hero-fullscreen .carousel-item {
    height: calc(100vh - 90px);
    min-height: 650px;
    max-height: none;
}

/*** 3. Top Feature : collé au bas du Hero, cartes visibles dès le 1er scroll ***/
@media (min-width: 991.98px) {
    .top-feature {
        margin-top: -144px !important;
        /* 48px topbar + 48px outer py-5 + 48px inner py-5 = 144px avant les cards */
    }
}

/*** 4. Carousel : flèches prev/next au-dessus de l'overlay vert
       (avant elles étaient masquées par la carousel-caption en z-index:2) ***/
.hero-fullscreen .carousel-control-prev,
.hero-fullscreen .carousel-control-next {
    z-index: 5;
}

/*** 5. Navbar compacte – override TOUTES les hauteurs ***/
.navbar .navbar-brand,
.navbar a.btn,
.navbar .btn-contact {
    height: 70px !important;
    min-height: 70px !important;
}

.navbar .navbar-brand .brand-logo {
    height: 52px;
}

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

.navbar .navbar-nav .nav-link::after {
    bottom: 14px;
}

/* Le bouton Contact se centre proprement dans ses 70px */
.navbar .btn-contact {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Compenser dans le hero */
.hero-fullscreen .carousel-item {
    height: calc(100vh - 70px);
}

/* ================================================================
   GALERIE ACTIVITÉS DE TERRAIN
   ================================================================ */

/* Carte activité (page gallery.php) */
.gallery-act-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(15, 66, 41, .10);
    transition: transform .35s ease, box-shadow .35s ease;
    cursor: pointer;
}

.gallery-act-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(15, 66, 41, .20);
}

.gallery-act-img {
    position: relative;
    height: 260px;
    overflow: hidden;
}

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

.gallery-act-card:hover .gallery-act-img img {
    transform: scale(1.07);
}

.gallery-act-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 66, 41, .65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .35s ease;
}

.gallery-act-card:hover .gallery-act-overlay {
    opacity: 1;
}

.gallery-act-body {
    padding: 16px 18px 18px;
}

.gallery-act-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.4;
}

.gallery-act-badge {
    background: var(--light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* En-tête page activité (gallery-activity.php) */
.gallery-act-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    padding: 42px 0 36px;
    margin-bottom: 48px;
}

/* Grid photos de l'activité */
.photo-grid-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
}

.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    display: block;
}

.photo-grid-item:hover img {
    transform: scale(1.06);
}

.photo-grid-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 66, 41, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s ease;
}

.photo-grid-item:hover .photo-grid-overlay {
    opacity: 1;
}

.photo-grid-overlay i {
    color: #fff;
    font-size: 2rem;
}

@media (max-width: 575.98px) {
    .gallery-act-img {
        height: 200px;
    }
}
