/*
 * ITF Theme — page-hero.css
 * .page-hero, .page-hero__*, .page-hero--primary
 */

/* ============================================================
   PAGE HERO (pages internes)
   ============================================================ */

.page-hero {
    min-height: clamp(260px, 30vh, 420px);
    display: flex;
    align-items: flex-end;
    padding-block: clamp(var(--space-10), 8vh, var(--space-16));
    background-color: var(--color-surface);
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-12);
    position: relative;
}

/* Overlay — image sombre (défaut) */
.page-hero[style*="background-image"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,30,18,.72) 0%, rgba(10,30,18,.35) 60%, transparent 100%);
    transition: opacity .3s;
}

/* Overlay réduit sur image claire */
.page-hero--img-light[style*="background-image"]::before {
    background: linear-gradient(to top, rgba(255,255,255,.65) 0%, rgba(255,255,255,.25) 60%, transparent 100%);
}

.page-hero[style*="background-image"] .container {
    position: relative;
    z-index: 1;
}

/* Texte blanc sur image sombre (défaut dès qu'il y a une image) */
.page-hero[style*="background-image"] .page-hero__title,
.page-hero[style*="background-image"] .page-hero__intro {
    color: #fff;
}

/* Texte sombre sur image claire */
.page-hero--img-light .page-hero__title {
    color: var(--color-primary) !important;
}
.page-hero--img-light .page-hero__intro {
    color: var(--color-text) !important;
}

/* Breadcrumb — style de base sur tous les heroes */
.page-hero .breadcrumb__list {
    display: inline-flex;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: rgba(0,0,0,.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 999px;
    padding: 5px 16px;
    gap: var(--space-2);
}

/* Fond clair → pill sombre */
.page-hero--light-bg .breadcrumb__list,
.page-hero--img-light .breadcrumb__list {
    background: rgba(0,0,0,.08);
}

/* Texte — fond sombre (image ou couleur) */
.page-hero--dark-bg .breadcrumb,
.page-hero--dark-bg .breadcrumb a,
.page-hero--dark-bg .breadcrumb__item,
.page-hero--dark-bg .breadcrumb__item--current,
.page-hero--primary .breadcrumb,
.page-hero--primary .breadcrumb a,
.page-hero--primary .breadcrumb__item,
.page-hero--primary .breadcrumb__item--current {
    color: #fff;
}
.page-hero--dark-bg .breadcrumb__item + .breadcrumb__item::before,
.page-hero--primary .breadcrumb__item + .breadcrumb__item::before {
    color: rgba(255,255,255,.6);
}
.page-hero--dark-bg .breadcrumb a:hover,
.page-hero--primary .breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Texte — fond clair */
.page-hero--light-bg .breadcrumb,
.page-hero--light-bg .breadcrumb a,
.page-hero--light-bg .breadcrumb__item,
.page-hero--light-bg .breadcrumb__item--current,
.page-hero--img-light .breadcrumb,
.page-hero--img-light .breadcrumb a,
.page-hero--img-light .breadcrumb span {
    color: rgba(0,0,0,.75) !important;
}

.page-hero--primary {
    background-color: var(--color-primary);
    color: #fff;
}

.page-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: var(--font-bold);
    line-height: 1.08;
    color: var(--color-primary);
    margin-top: var(--space-3);
    max-width: min(100%, 18ch);
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.page-hero--primary .page-hero__title {
    color: #fff;
}

.page-hero__intro {
    font-size: clamp(1rem, 1.7vw, 1.25rem);
    color: var(--color-muted);
    margin-top: var(--space-4);
    max-width: min(100%, 72ch);
    line-height: 1.55;
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

.page-hero--primary .page-hero__intro {
    color: rgba(255,255,255,.85);
}

/* ============================================================
   RESPONSIVE — page-hero
   ============================================================ */

@media (max-width: 768px) {
    .page-hero {
        min-height: 280px;
        padding-block: var(--space-10);
        margin-bottom: var(--space-10);
    }
    .page-hero__title {
        font-size: clamp(1.85rem, 8vw, 3rem);
        max-width: 100%;
    }
    .page-hero__intro {
        font-size: var(--text-base);
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .page-hero {
        min-height: 260px;
        padding-block: var(--space-8);
        margin-bottom: var(--space-8);
    }
    .page-hero__title {
        font-size: clamp(1.65rem, 9vw, 2.25rem);
        line-height: 1.12;
    }
    .page-hero__intro {
        font-size: 0.95rem;
    }
    .page-hero .breadcrumb__list {
        font-size: var(--text-xs);
        max-width: 100%;
        flex-wrap: wrap;
        border-radius: var(--radius-md);
    }
}
