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

.banner-custom {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    min-height: 82vh;
    padding: var(--gap-xl) 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);
}

/* ── 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: 50px;
    display: flex;
    flex-direction: column;
    gap: var(--gap-m);
    max-width: 83%;
    width: 100%;
}

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

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

/* [highlight] : italique par défaut, stylisable via CSS custom */
.banner-custom__highlight {
    font-style: italic;
}

/* ── Description ── */
.banner-custom__description {
    color: var(--secondary-color, #fff);
    font-size: calc(17px + (20 - 17) * ((100vw - 320px) / (1920 - 320)));
    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 {
    background: var(--color-accent, #e05);
    color: var(--secondary-color, #fff);
}

.banner-custom__button--secondary {
    background: transparent;
    color: var(--secondary-color, #fff);
    border: 2px solid var(--secondary-color, #fff);
}

/* ── 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;
}

/* ══════════════════════════════════════════════════
   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: 700;
    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: 2px;
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    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-accent, #8b4f3f);
    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-accent, #8b4f3f) 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);
}

@media (max-width: 768px) {

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

    .banner-custom {
        min-height: 55vh;
    }

    .home .banner-custom {
        min-height: 100vh;
    }

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

}
