.block_section_hero_top {
    padding-bottom: 60px;
    padding-left: 0;
    padding-right: 0;
}

.hero {
    --hero-primary: #193b61;
    --hero-primary-hover: #102f50;
    --hero-text: #193b61;
    --hero-description: #40566d;
    --hero-white: #ffffff;
    --hero-gray: #f4f5f6;
    --hero-radius: 0px;
    width: 100%;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background: var(--hero-white);
}

.hero--white {
    background: #ffffff;
}

.hero--gray {
    background: #f4f5f6;
}

.hero-cadre {
    padding-left: 50px;
    padding-right: 50px;
    justify-content: center;
}

.hero__container {
    width: 100%;
    margin: 0 auto;
    min-height: 220px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 0px;
    padding: 0;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.hero__eyebrow {
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hero-primary);
}

.hero__title {
    margin: 0;
    color: var(--hero-text);
    font-size: 35px;
    line-height: 1.08;
    letter-spacing: -0.025em;
    text-wrap: balance;
    font-family: 'Montserrat' !important;
}

.hero__title span {
    color: var(--hero-primary);
}

.hero__description {
    color: var(--hero-description);
    font-size: 16px;
    line-height: 1.65;
    margin-top: 20px;
    font-family: 'Montserrat' !important;
    text-align-last: left;
    text-align: justify;
}

.hero__description p:last-child {
    margin-bottom: 0;
}

.hero__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.hero__button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 7px;
    font-size: 14px;
    line-height: 1;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.hero__button--primary {
    color: #ffffff;
    text-transform: uppercase;
    width: calc(50% - 10px);
    border-radius: 8px;
    background: var(--hero-primary);
    border: 1px solid var(--hero-primary);
    font-family: 'Montserrat' !important;
}

.hero-index {
    padding-top: 30px;
    padding-bottom: 30px;
}

.hero-container-index {
    margin-bottom: 35px;
}

.hero__button--primary:hover {
    color: #ffffff;
    background: var(--hero-primary-hover);
    border-color: var(--hero-primary-hover);
    transform: translateY(-1px);
}

.hero__button--secondary {
    color: var(--hero-primary);
    border-radius: 8px;
    background: transparent;
    width: calc(50% - 10px);
    text-transform: uppercase;
    border: 1px solid var(--hero-primary);
    font-family: 'Montserrat' !important;
}

.hero__button--secondary:hover {
    color: #ffffff;
    background: var(--hero-primary);
    border-color: var(--hero-primary);
    transform: translateY(-1px);
}

.hero__media {
    position: relative;
    width: calc(100% - 50px);
    padding-right: 5px;
    min-width: 0;
    z-index: 1;
}

.hero__media_top {
    position: relative;
    width: 100%;
}

/* Image unique par défaut */
.hero__image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1.42 / 1;
    overflow: hidden;
    border-radius: var(--hero-radius);
}

.hero__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

/* ==========================================================
   CARROUSEL 1 IMAGE PAR 1 (SANS ROGNAGE)
   ========================================================== */
.hero__image-wrapper--carousel {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Cache la barre de défilement (Firefox) */
    -ms-overflow-style: none; /* IE/Edge */
    width: 100% !important;
    aspect-ratio: 1.42 / 1;
    border-radius: var(--hero-radius);
    position: relative;
}

.hero__image-wrapper--carousel::-webkit-scrollbar {
    display: none; /* Chrome / Safari */
}

/* Chaque slide prend 100% de la largeur du bloc */
.hero__image-wrapper--carousel .hero__slide-item {
    flex: 0 0 100% !important;
    width: 100% !important;
    height: 100% !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.hero__image-wrapper--carousel .hero__image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* Affiche l'image entière sans la rogner */
    object-position: center;
    border-radius: var(--hero-radius);
    display: block !important;
}

/* ==========================================================
   BOUTONS INDICATEURS (DOTS) EN BAS
   ========================================================== */
.hero__carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.hero__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero__dot:hover {
    background-color: rgba(255, 255, 255, 0.85);
}

.hero__dot.active {
    background-color: #ffffff;
    width: 24px; /* Petite pilule allongée pour la puce active */
    border-radius: 10px;
}

/* Ordres d'affichage selon imagePosition */
.hero--image-left .hero__media,
.hero--image-left .hero__media_top {
    order: 1;
   
}
.hero--image-left {
 padding-left: 40px ;
}

.hero-container-cadre-on{
    padding-left: 0;
}

.hero--image-left .hero__content {
    order: 2;
}

.hero--image-right .hero__content {
    order: 1;
}

.hero--image-right .hero__media,
.hero--image-right .hero__media_top {
    order: 2;
}

.hero__content::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 1px;
    right: -110px;
    top: 95px;
    pointer-events: none;
}

.div-bt {
    position: absolute;
    z-index: 100;
    left: 50%;
    bottom: 70px;
    transform: translateX(-50%);
    width: 400px;
    display: flex;
    align-items: stretch;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    background-color: white;
}

.div-bt a {
    flex: 1;
    min-width: 0;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 20px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-family: "Montserrat" !important;
    border: 4px solid white;
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.div-bt a:first-child {
    border-radius: 4px 0 0 4px;
}

.div-bt a:last-child {
    border-radius: 0 4px 4px 0;
}

.bg-red {
    background-color: #e00000;
    border-radius: 10px !important;
    color: #ffffff;
}

.bg-white {
    background-color: #ffffff;
    color: #e00000;
}

.bg-white:hover {
    color: #e00000 !important;
}

.div-bt a:hover {
    color: #ffffff;
}

/* ==========================================================
   MEDIA QUERIES / RESPONSIVE
   ========================================================== */
@media (min-width: 1600px) {
    .hero {
        width: 100%;
        margin: auto;
    }

    .hero__container {
        width: 100%;
        margin: 0 auto;
        min-height: 220px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: stretch;
        gap: 0px;
    }

    .block_section_hero_top .hero__content__top {
        padding-left: 50px;
        padding-right: 90px;
        padding-top: 90px;
        
    }

    .block_section_hero .hero-container-cadre-off {
        padding-top: 25px;
        padding-bottom: 25px;
    }
}

@media (max-width: 1600px) {
    .block_section_hero_top .hero__content__top {
        padding-left: 50px;
        padding-right: 20px;
        padding-top: 30px;
    }

    .hero {
        width: 100%;
        margin: auto;
    }

    .hero__container {
        width: 100%;
        margin: 0 auto;
        min-height: 220px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: stretch;
        gap: 0px;
    }

    .block_section_hero .hero-container-cadre-off {
        padding-top: 25px;
        padding-bottom: 25px;
    }

    .hero__container .desc-left{
        margin-left: -10px;
        padding-left: 0px;
    }

}



@media screen and (max-width: 1160px) {
    .hero__actions a {
        font-size: 12px !important;
    }
}

@media (max-width: 991px) {
    .hero-container-index {
        margin-bottom: 5px;
    }

    .hero__container {
        width: min(100%, 900px);
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 50px 0;
        margin: auto;
    }

    .hero{
        margin: auto;
        padding-left: 0%;
    }

    .hero__content {
        max-width: 900px;
        order: 1 !important;
    }

    .hero__media {
        order: 2 !important;
        width: 100%;
        padding-left: 10px;
    }

    .hero__title {
        font-size: clamp(36px, 6vw, 50px);
    }

    .hero__description {
        max-width: 650px;
    }

    .hero__content::after {
        display: none;
    }

    .hero__image-wrapper,
    .hero__image-wrapper--carousel {
        aspect-ratio: 16 / 9;
    }

    .div-bt {
        width: 400px;
        bottom: 35px;
    }

    .block_section_hero_top .hero__content__top {
        padding-left: 20px;
        padding-right: 0px;
        padding-top: 30px;
    }
}

@media (max-width: 750px) {
    .hero-container-cadre-off {
        padding-top: 0px !important;
        margin-top: -30px !important;
    }

    
    .div-bt {
        width: calc(100% - 40px);
        left: 50%;
        bottom: 30px;
        transform: translateX(-50%);
    }

    .div-bt a {
        min-height: 40px;
        padding: 8px 16px;
    }

    .hero__media {
        justify-content: center;
        margin: auto;
    }

    .block_section_hero_top .hero__content__top {
        padding-left: 20px;
        padding-right: 10px;
        padding-top: 30px;
    }
}

@media (max-width: 640px) {
    .hero__content {
        padding: 0;
    }

    .hero__eyebrow {
        font-size: 11px;
        margin-bottom: 12px;
    }

    .hero__title {
        font-size: 34px;
        line-height: 1.1;
        letter-spacing: -0.02em;
    }

    .hero__description {
        margin-top: 18px;
        font-size: 15px;
        line-height: 1.6;
    }

    .hero__actions {
        width: 100%;
        margin-top: 26px;
        flex-direction: column;
        align-items: stretch;
    }

    .hero__button {
        width: 100%;
        min-height: 50px;
        padding: 0 10px;
    }

    .hero__image-wrapper,
    .hero__image-wrapper--carousel {
        aspect-ratio: 1 / 0.75;
    }

    .div-bt {
        width: calc(100% - 32px);
        bottom: 20px;
        font-size: 12px;
    }

    .div-bt a {
        min-height: 40px;
        padding: 7px 12px;
    }
}

@media (max-width: 400px) {
    .hero__container {
        width: calc(100% - 24px);
        padding: 32px 0;
    }

    .hero__title {
        font-size: 30px;
    }

    .hero__description {
        font-size: 14px;
    }

    .div-bt {
        width: calc(100% - 24px);
        bottom: 16px;
    }

    .div-bt a {
        padding: 7px 8px;
        font-size: 11px;
    }
} 





/* Réduction des espaces sur mobile */
@media (max-width: 991px) {
    .hero__container {
        gap: 20px;
        padding-top: 25px;
        padding-bottom: 10px;
    }

    .block_section_hero_top {
        padding-bottom: 15px;
    }
}

/* Ajustements pour les petits écrans */
@media (max-width: 640px) {
    .hero__container {
        gap: 15px;
        padding-top: 20px;
        padding-bottom: 5px;
    }

    .hero__media {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .hero__image-wrapper,
    .hero__image-wrapper--carousel {
        aspect-ratio: 16 / 10;
    }

    .block_section_hero_top {
        padding-bottom: 10px;
    }
}

/* Très petits écrans */
@media (max-width: 400px) {
    .hero__container {
        padding-top: 16px;
        padding-bottom: 0;
        gap: 12px;
    }

    .block_section_hero_top {
        padding-bottom: 5px;
    }
}





/* ==========================================================
   HERO IMAGE AVEC IMAGE ENTIÈRE + BACKGROUND FLOUTÉ
   Activé uniquement lorsque eyebrow existe
   ========================================================== */

.hero__image-wrapper-containner {
    position: relative;
    width: 100%;
    aspect-ratio: 1.42 / 1;
    overflow: hidden;
    isolation: isolate;
    background: #f4f5f6;
}

/* Image utilisée comme arrière-plan flouté */
.hero__image-wrapper-containner::before {
    content: "";
    position: absolute;
    inset: -20px;

    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    filter: blur(18px);
    transform: scale(1.08);
    opacity: 0.15;

    z-index: -1;
}

/* Image principale entièrement visible */
.hero__image-containner {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    z-index: 1;
}



/* ==========================================================
   MOBILE : AFFICHER L'IMAGE ENTIÈRE SANS COUPURE
   ========================================================== */

@media (max-width: 640px) {

    .hero__image-wrapper-containner, .hero__image-wrapper {
        width: 100%;
        height: auto !important;
        aspect-ratio: unset !important;
        min-height: 0;
        overflow: hidden;
    }

    .hero__image-containner, .hero__image {
        position: relative;
        display: block;
        width: 100%;
        height: auto !important;
        max-height: none !important;
        object-fit: contain;
        object-position: center;
    }

}
