/********** Template CSS **********/
:root {
    --primary: #32C36C;
    --light: #F6F7F8;
    --dark: #1A2A36;
}

.fw-medium {
    font-weight: 500 !important;
}

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

.fw-black {
    font-weight: 900 !important;
}

.back-to-top {
    position: fixed;
    display: inline-block;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

.btn-devis {
    position: fixed;
    display: inline-block;
    right: 45px;
    bottom: 45px;
    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,
.btn.btn-outline-primary:hover {
    color: #FFFFFF;
}

.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: 75px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: var(--dark);
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    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 ***/
.owl-carousel-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, .1);
}

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

    .header-carousel .owl-carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .header-carousel .owl-carousel-item p {
        font-size: 16px !important;
    }
}

.header-carousel .owl-dots {
    position: absolute;
    width: 60px;
    height: 100%;
    top: 0;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-carousel .owl-dots .owl-dot {
    position: relative;
    width: 45px;
    height: 45px;
    margin: 5px 0;
    background: #FFFFFF;
    box-shadow: 0 0 30px rgba(255, 255, 255, .9);
    border-radius: 45px;
    transition: .5s;
}

.header-carousel .owl-dots .owl-dot.active {
    width: 60px;
    height: 60px;
}

.header-carousel .owl-dots .owl-dot img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 2px;
    border-radius: 45px;
    transition: .5s;
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, .1), rgba(0, 0, 0, .1)), url("../img/banniere_mpo_solution.jpeg") center center no-repeat;
    background-size: cover;
}

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


/*** About ***/
@media (min-width: 992px) {
    .container.about {
        max-width: 100% !important;
    }

    .about-text  {
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .about-text  {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .about-text  {
        padding-right: calc(((100% - 1320px) / 2) + .75rem);
    }
}


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

.service-icon {
    position: relative;
    margin: -50px 0 25px 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #FFFFFF;
    border-radius: 100px;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    transition: .5s;
}

.service-item:hover .service-icon {
    color: #FFFFFF;
    background: var(--primary);
}


/*** Feature ***/
@media (min-width: 992px) {
    .container.feature {
        max-width: 100% !important;
    }

    .feature-text  {
        padding-left: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .feature-text  {
        padding-left: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .feature-text  {
        padding-left: calc(((100% - 1320px) / 2) + .75rem);
    }
}


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

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

.portfolio-img {
    position: relative;
}

.portfolio-img::before,
.portfolio-img::after {
    position: absolute;
    content: "";
    width: 0;
    height: 100%;
    top: 0;
    background: var(--dark);
    transition: .5s;
}

.portfolio-img::before {
    left: 50%;
}

.portfolio-img::after {
    right: 50%;
}

.portfolio-item:hover .portfolio-img::before {
    width: 51%;
    left: 0;
}

.portfolio-item:hover .portfolio-img::after {
    width: 51%;
    right: 0;
}

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

.portfolio-item:hover .portfolio-btn {
    opacity: 1;
    transition-delay: .3s;
}


/*** Quote ***/
@media (min-width: 992px) {
    .container.quote {
        max-width: 100% !important;
    }

    .quote-text  {
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .quote-text  {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .quote-text  {
        padding-right: calc(((100% - 1320px) / 2) + .75rem);
    }
}


/*** Team ***/
.team-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.team-item img {
    border-radius: 8px 60px 0 0;
}

.team-item .team-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    background: #FFFFFF;
    transition: .5s;
}


/*** 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-nav {
    position: absolute;
    width: 350px;
    top: 20px;
    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);
}

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

.testimonial-carousel .testimonial-img .btn-square {
    position: absolute;
    bottom: -19px;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-carousel .owl-item .testimonial-text {
    margin-bottom: 30px;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    transform: scale(.8);
    transition: .5s;
}

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


/*** Contact ***/
@media (min-width: 992px) {
    .container.contact {
        max-width: 100% !important;
    }

    .contact-text  {
        padding-left: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .contact-text  {
        padding-left: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .contact-text  {
        padding-left: calc(((100% - 1320px) / 2) + .75rem);
    }
}


/*** Footer ***/
.footer .btn.btn-social {
    margin-right: 5px;
    color: #9B9B9B;
    border: 1px solid #9B9B9B;
    border-radius: 38px;
    transition: .3s;
}

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

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #9B9B9B;
    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: #FFFFFF;
    letter-spacing: 1px;
    box-shadow: none;
}

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

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

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

.btn-outline-primary.clicked {
background-color: green !important; /* Pour que le bouton cliqué soit vert */
border-color: green !important; /* Pour que le bouton cliqué ait une bordure verte */
color: #FFFFFF !important; /* Pour que le texte soit blanc sur le bouton cliqué */
}

.btn-outline-primary.grayed {
background-color: lightgray !important; /* Pour que les autres boutons soient gris */
border-color: lightgray !important; /* Pour que les autres boutons aient une bordure grise */
color: gray !important; /* Pour que le texte soit gris sur les autres boutons */
}

.fixed-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    padding: 10px 20px;
    background-color: #007bff; /* Couleur de fond du bouton */
    color: #fff; /* Couleur du texte du bouton */
    border: none;
    border-radius: 5px; /* Angle arrondis */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* Ombre du bouton */
    transition: all 0.3s ease; /* Effet de transition */
    display: inline-block; /* Assure que le bouton est affiché */
    pointer-events: auto; /* Assure que le bouton est cliquable */
}

.fixed-button:hover {
    background-color: #0056b3; /* Couleur de fond au survol */
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3); /* Ombre au survol */
}

@media (max-width: 768px) {
    .fixed-button {
        bottom: 10px;
        right: 10px;
        padding: 8px 16px;
    }
}

/* --- WIDGET DEVIS MODAL --- */

/* 1. Le bouton flottant (fixe en bas à droite) */
.fixed-quote-btn {
    position: fixed;
    display: inline-block;
    right: 30px;
    bottom: 30px;
    z-index: 9998; /* Juste en dessous du modal mais au-dessus du reste */
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    padding: 15px 25px;
    font-weight: bold;
    transition: 0.3s;
    color: white !important; /* Force le texte en blanc */
}

.fixed-quote-btn:hover {
    transform: scale(1.05);
    background: #1A2A36; /* Ou une teinte plus foncée de votre couleur primaire */
}

/* 2. Le fond sombre (Overlay) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Fond noir semi-transparent */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Très haut pour passer au-dessus du menu et du spinner */
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Classe utilitaire pour cacher les éléments */
.hidden {
    display: none !important;
}

/* 3. La boîte du modal */
.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 550px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: slideIn 0.3s ease-out;
    border: none; /* Surcharge bootstrap */
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 4. Éléments internes du modal */
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: 0.2s;
}
.close-modal:hover { color: #000; }

.modal-header {
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    padding-bottom: 10px;
    display: block; /* Surcharge bootstrap flex */
}

/* Grille des boutons catégories */
.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
@media (max-width: 450px) {
    .category-grid { grid-template-columns: 1fr; }
}

.cat-btn {
    padding: 15px;
    border: 2px solid #eee;
    cursor: pointer;
    text-align: center;
    border-radius: 8px;
    font-weight: 500;
    transition: 0.3s;
    color: #333;
}
.cat-btn:hover {
    background: var(--primary) !important;
    border-color: #1A2A36 !important;
    color: #FFFFFF !important;
	transform: translateY(-2px);
	box-shadow: 0 4px 15px rgba(50, 195, 108, 0.2);
}

/* Formulaires */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.modal-footer {
    border-top: 1px solid #eee;
    margin-top: 20px;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
}

/* --- STYLE MODAL HARMONISÉ MPO SOLUTION --- */

/* 1. Structure Globale */
#quote-modal .modal-content {
    border: none;
    border-radius: 0; /* Votre navbar et topbar sont très rectilignes */
    box-shadow: 0 0 45px rgba(0, 0, 0, .15);
}

/* 2. Header (Style Topbar/Navbar) */
#quote-modal .modal-header {
    color: #FFFFFF;
    border-bottom: 4px solid var(--primary); /* Rappel de la couleur active */
    padding: 20px 25px;
    border-radius: 0;
}

#quote-modal .modal-title {
    font-family: 'Poppins', sans-serif; /* Ou votre police actuelle */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* 3. Bouton Fermer (la croix) */
#quote-modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%); /* Rend la croix blanche */
    opacity: 0.8;
}

/* 4. Corps du Modal */
#quote-modal .modal-body {
    padding: 30px;
    background-color: #FFFFFF;
}

/* 5. Inputs (Style Formulaire du Template) */
#quote-modal .form-control {
    border-radius: 0; /* Style carré comme vos boutons de topbar */
    padding: 12px 15px;
    border: 1px solid #ced4da;
    font-size: 15px;
	background-color: #FFFFFF;
	color: #000000;
}

#quote-modal .form-control:focus {
    border-color: var(--primary);
    box-shadow: none; /* Nettoie le halo bleu par défaut de Bootstrap */
}

/* 6. Boutons de navigation */
#btn-next {
    background-color: var(--primary);
    border: none;
    border-radius: 0;
    padding: 15px 30px;
    font-weight: 700;
    text-transform: uppercase;
    transition: .5s;
}

#btn-next:hover {
    background-color: var(--dark);
    color: var(--primary);
}

#btn-back {
    color: var(--dark);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
	border-radius: 0;
	padding: 15px 30px;
	transition: .5s;
}

/* 7. Grille de catégories */
.category-grid .cat-btn {
    border: 1px solid #EEEEEE;
    background: var(--light);
    color: var(--dark);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 13px;
    transition: .5s;
}

.category-grid .cat-btn:hover, 
.category-grid .cat-btn.active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

/* --- BARRE DE PROGRESSION --- */
.progress-container {
    background-color: #eee;
    height: 4px;
    width: 100%;
    margin-bottom: 25px;
}

.progress-bar-fill {
    background-color: var(--primary);
    transition: width 0.5s ease-in-out;
}

/* --- BOUTONS DE CATÉGORIE (Bordure ultra-fine) --- */
.category-grid .cat-btn {
    border: 0.5px solid rgba(26, 42, 54, 0.15); /* Bord extrêmement fin et discret */
    background: var(--light);
    color: var(--dark);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 13px;
    padding: 20px 10px;
    transition: all 0.3s ease;
    border-radius: 0; /* Garde le style carré du site */
}

.category-grid .cat-btn:hover {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Style quand une catégorie est sélectionnée */
.category-grid .cat-btn.selected {
    border: 1px solid var(--primary) !important;
    background: var(--primary) !important;
    color: #ffffff !important;
}

.grayscale-to-color {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: 0.3s;
}
.grayscale-to-color:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Bloque la hauteur du modal pour éviter qu'il sorte de l'écran */
#quote-modal .modal-content {
    max-height: 90vh; /* 90% de la hauteur de l'écran */
    display: flex;
    flex-direction: column;
}

/* Rend uniquement le corps du formulaire défilable */
#modal-body {
    overflow-y: auto;
    padding-right: 10px; /* Évite que la scrollbar colle au texte */
    flex-grow: 1;
}

/* Optionnel : Rendre les champs plus compacts */
.form-group {
    margin-bottom: 12px !important;
}

.form-control {
    padding: 8px 12px !important;
    font-size: 14px !important;
}

/* On cible l'image à l'intérieur de la div portfolio-img */
.portfolio-img img {
    width: 100%;
    aspect-ratio: 3 / 2; /* Force le ratio 600x400 */
    object-fit: cover;   /* Remplit le cadre sans déformer l'image (recadre le surplus) */
    object-position: center; /* Centre l'image dans le cadre */
}

.portfolio-img img {
    transition: transform 0.5s ease;
}

