/* ============================================================
   Banner Custom — styles front-end
   ============================================================ */

.banner-custom {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: 37vh;
    padding: 5px var(--gap-l);
    background-color: var(--primary-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    font-family: var(--primary-font);
}

.home .banner-custom.main-slider-banner {
    min-height: 97vh;
    padding: var(--gap-xl) var(--gap-l);
}

.page-group .banner-custom {
    min-height: 50vh;
}

.page-group .banner-custom__overlay {
    background:
        linear-gradient(rgba(8, 12, 22, 0.6), rgba(8, 12, 22, 0.4), rgb(8, 12, 22)),
        linear-gradient(135deg, rgb(22, 40, 90), rgb(34, 60, 129));
    opacity: .85;
}

/* ── Vidéo de fond ── */
.banner-custom__bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* ── Overlay sombre ── */
.banner-custom__overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay-dark, rgba(0, 0, 0, 0.5));
    z-index: 1;
    pointer-events: none;
}

/* ── Contenu ── */
.banner-custom__inner {
    position: relative;
    z-index: 2;
    bottom: 60px;
    display: flex;
    flex-direction: column;
    row-gap: var(--gap-s);
    max-width: 83%;
    width: 100%;
}

.home .banner-custom__inner {
    gap: var(--gap-m);
    bottom: 50px;
}

/* Eyebrow sur fond sombre */
.banner-custom .section-heading__eyebrow {
    position: relative;
    color: var(--color-primary);
    opacity: 0.85;
    margin: 0;
}

/* ── Titre ── */
.banner-custom__title {
    color: #fff;
    font-size: calc(36px + (60 - 36) * ((100vw - 320px) / (1920 - 320)));
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -.02em;
    max-width: calc(300px + (768 - 300) * ((100vw - 320px) / (1920 - 320)));
    margin: 0;
}

.home .banner-custom__title {
    font-size: calc(36px + (72 - 36) * ((100vw - 320px) / (1920 - 320)));
    font-weight: 600;
}

/* [highlight] : italique par défaut, stylisable via CSS custom */
.banner-custom__highlight {
    font-style: normal;
    background: linear-gradient(135deg, var(--color-primary, #00a1d6), var(--color-secondary, #223c81));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ── Description ── */
.banner-custom__description {
    color: var(--color-text-secondary);
    font-size: 1.125rem;
    line-height: 1.65;
    opacity: 0.9;
    margin: 0;
    max-width: 640px;
}

/* ── Boutons ── */
.banner-custom__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-s);
    margin-top: var(--gap-s);
}

.banner-custom__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.75em 1.75em;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.banner-custom__button:hover {
    opacity: 0.85;
}

.banner-custom__button--primary {
    color: #fff;
}

.banner-custom__button--secondary {
    color: var(--color-primary);
    border: 2px solid var(--color-secondary);
}

/* ── Icône SVG dans les boutons ── */
.banner-custom__button-icon {
    display: inline-flex;
    align-items: center;
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
}

.banner-custom__button-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ══════════════════════════════════════════════════
   Mode section (bannière dans le corps de page)
   ══════════════════════════════════════════════════ */

.banner-custom--as-section {
    min-height: 50vh;
    justify-content: center;
    align-items: center;
}

.banner-custom--as-section .banner-custom__inner {
    bottom: 0;
    margin-left: 0;
}

/* ══════════════════════════════════════════════════
   Template 2 — section CTA centrée, hauteur réduite
   ══════════════════════════════════════════════════ */

.banner-custom--template-2 {
    justify-content: center;
    align-items: center;
    min-height: 0;
    padding: 80px var(--gap-l);
}

.banner-custom--template-2 .banner-custom__overlay {
    background: rgba(0, 0, 0, 0.65);
}

.banner-custom--template-2 .banner-custom__inner {
    align-items: center;
    text-align: center;
    bottom: 0;
    max-width: 700px;
    gap: var(--gap-s, 16px);
}

.banner-custom--template-2 .banner-custom__title {
    font-size: clamp( 1.5rem, 3vw, 2.125rem );
    font-weight: 400;
    max-width: none;
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.banner-custom--template-2 .banner-custom__description {
    text-align: center;
    max-width: 540px;
    font-size: 0.9375rem;
    opacity: 0.82;
    line-height: 1.65;
}

.banner-custom--template-2 .banner-custom__actions {
    justify-content: center;
    gap: 12px;
    margin-top: var(--gap-m, 24px);
}

/* ── Boutons template 2 : rectangles, uppercase ── */

/* Ciblage des deux systèmes de classes (render.php = btn-element, canvas = banner-custom__button) */
.banner-custom--template-2 .btn-element,
.banner-custom--template-2 .banner-custom__button {
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    padding: 1em 1.75em;
    line-height: 1;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Bouton primaire : terracotta plein */
.banner-custom--template-2 .btn-primary,
.banner-custom--template-2 .banner-custom__button--primary {
    background: var(--color-primary, #00a1d6);
    color: #fff;
    border: none;
}

.banner-custom--template-2 .btn-primary:hover,
.banner-custom--template-2 .banner-custom__button--primary:hover {
    background: color-mix(in srgb, var(--color-primary, #00a1d6) 82%, #000);
    opacity: 1;
}

/* Bouton secondaire : outlined blanc */
.banner-custom--template-2 .btn-secondary,
.banner-custom--template-2 .banner-custom__button--secondary {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    border-radius: 2px;
}

.banner-custom--template-2 .btn-secondary:hover,
.banner-custom--template-2 .banner-custom__button--secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

/* Icône dans les boutons */
.banner-custom--template-2 .banner-custom__button-icon {
    width: 1em;
    height: 1em;
}

/* ── Alignements ── */
.alignwide.banner-custom,
.alignfull.banner-custom {
    padding-left: max(var(--gap-l), 5vw);
    padding-right: max(var(--gap-l), 5vw);
}

/* ══════════════════════════════════════════════════
   Mode avec Divisions — panneau gauche + slides
   ══════════════════════════════════════════════════ */

.banner-custom--with-divisions {
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    background-color: #080c16;
}

/* Fond propre à chaque slide */
.banner-custom__slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    object-fit: cover;
    z-index: 0;
}

/* Overlay dégradé gauche → transparent */
.banner-custom__slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(8, 12, 22, 0.8), rgba(8, 12, 22, 0.2), rgba(0, 0, 0, 0)), rgba(0, 0, 0, 0.55);
    z-index: 1;
    pointer-events: none;
}

/* Panneau gauche navigation */
.banner-custom__divisions {
    position: absolute;
    left: clamp(24px, 4vw, 60px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

.banner-custom__division-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    opacity: 0.45;
    transition: all 0.35s ease-in-out;
}

.banner-custom__division-item.is-active,
.banner-custom__division-item:hover {
    opacity: 1;
}

.banner-custom__division-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-primary);
    line-height: 1;
    transition: all 0.35s ease-in-out;
}

.banner-custom__division-item:not(.is-active) .banner-custom__division-label {
    color: #fff;
    opacity: 0.45;
}

.banner-custom__division-label::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 1.5px;
    background: var(--color-primary, #00a1d6);
    transition: width 0.3s ease;
    flex-shrink: 0;
}

.banner-custom__division-item:not(.is-active) .banner-custom__division-label::before {
    background: transparent;
}

.banner-custom__division-name {
    display: block;
    font-size: 30px;
    font-weight: 400;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-left: 0.75em;
    transition: all 0.35s ease-in-out;
}

.banner-custom__division-item.is-active .banner-custom__division-name {
    font-size: 36px;
}

/* Conteneur des slides */
.banner-custom__slides {
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: hidden;
}

/* Chaque slide = fond + contenu qui bougent ensemble */
.banner-custom__slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transform: translateY(100%);
    opacity: 1;
    transition: transform 1200ms cubic-bezier(0.77, 0, 0.175, 1), opacity 1200ms ease-out;
    will-change: transform;
    z-index: 2;
    pointer-events: none;
}

.banner-custom__slide.is-active {
    transform: translateY(0%);
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

/* Slide sortant : monte légèrement et disparaît */
.banner-custom__slide.is-exiting {
    transform: translateY(-20%);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

/* Le slide centre son contenu verticalement et horizontalement */
.banner-custom__slide {
    justify-content: center;
    align-items: center;
}

/* Le contenu texte est au-dessus du fond */
.banner-custom__slide .banner-custom__inner {
    position: relative;
    z-index: 2;
    padding: var(--gap-xl, 80px) clamp(24px, 6vw, 80px);
    margin-left: auto;
    margin-right: auto;
    max-width: 768px;
    width: 100%;
    bottom: auto;
    align-items: center;
    text-align: center;
}

/* Titre plus léger dans le mode divisions */
.banner-custom--with-divisions .banner-custom__title {
    font-weight: 400;
}

/* Description centrée */
.banner-custom--with-divisions .banner-custom__description {
    text-align: center;
    max-width: 600px;
}

/* Bouton lien type "DÉCOUVRIR" */
.banner-custom__btn-link {
    display: inline-block;
    background: none !important;
    color: #fff !important;
    border: none !important;
    padding: 0 !important;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 1px solid #00a1d64d !important;
    padding-bottom: 4px !important;
    border-radius: 0 !important;
    transition: all 0.35s ease-in-out;
}

.banner-custom__btn-link:hover {
    color: var(--color-primary) !important;
}

@media (max-width: 768px) {
    .banner-custom__divisions {
        left: 16px;
        top: auto;
        bottom: 32px;
        transform: none;
        flex-direction: row;
        gap: 20px;
    }

    .banner-custom__slide .banner-custom__inner {
        max-width: 100%;
    }
}

/* ══════════════════════════════════════════════════ */

@media (max-width: 768px) {

    .banner-custom__inner {
        bottom: 0;
        max-width: 95%;
        margin-left: 0;
    }

    .page-group .banner-custom {
        min-height: 70vh;
    }

    .page-group .banner-custom {
        min-height: 70vh;
    }

    .banner-custom {
        min-height: 70vh;
        padding: var(--gap-l) var(--gap-m);
    }

    .banner-custom__title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .banner-custom__actions {
        flex-direction: column;
    }

    .banner-custom__actions .btn-element {
        justify-content: center;
    }

    /* Template 2 mobile : pas de min-height 100vh */
    .banner-custom--template-2 {
        min-height: 0;
        padding: 60px var(--gap-m);
    }

    .banner-custom--template-2 .banner-custom__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .banner-custom--template-2 .btn-element,
    .banner-custom--template-2 .banner-custom__button {
        justify-content: center;
        text-align: center;
    }

}

@media (min-width: 1200px) {

    /* ══════════════════════════════════════════════════
   Mode bannière haut de page
   ══════════════════════════════════════════════════ */

    body:not(.home) .banner-custom--is-banner .banner-custom__inner {
        left: calc(100px + (220 - 100) * ((100vw - 1200px) / (1920 - 1200)));
    }

}