/* ==============================
 * Block — Hero (slider plein écran)
 * Scope racine : .block-hero
 * ============================== */

.block-hero {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--color-bg-dark);
    color: var(--color-white);

    /* Min = hauteur logo (286px) + padding (~64px chacun) + titre/subtitle.
       Max = 1080px (limite full HD). Hauteur idéale = viewport. */
    --hero-min-h: 420px;
    --hero-max-h: 1080px;
    --hero-overlay: linear-gradient(180deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.50) 100%);
}

.block-hero__viewport {
    position: relative;
    width: 100%;
    /* clamp(min, idéal, max) — 100dvh suit la zone visible mobile (URL bar) */
    height: clamp(var(--hero-min-h), 100vh, var(--hero-max-h));
    height: clamp(var(--hero-min-h), 100dvh, var(--hero-max-h));
    overflow: hidden;
}

.block-hero__track {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

.block-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s var(--ease);
    will-change: opacity;
}
.block-hero__slide.is-active { opacity: 1; }

.block-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.block-hero__overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-overlay);
    pointer-events: none;
    z-index: 1;
}

.block-hero__content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px var(--gutter);
    pointer-events: none; /* laisse passer les clics aux flèches */
}
.block-hero__content > * { pointer-events: auto; }

.block-hero__logo {
    width: clamp(220px, 35vw, 482px);
    height: auto;
    aspect-ratio: 482 / 286;
    margin: 0 0 16px;
    object-fit: contain;
}

.block-hero__title {
    font-family: var(--font-heading);
    font-weight: var(--weight-heading);
    font-size: clamp(36px, 6vw, 64px);
    color: var(--color-white);
    margin: 0 0 8px;
    line-height: 1;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.block-hero__subtitle {
    font-family: var(--font-body);
    font-weight: var(--weight-body);
    font-size: clamp(14px, 1.6vw, 18px);
    margin: 0;
    color: var(--color-white);
    opacity: .95;
    text-shadow: 0 1px 8px rgba(0,0,0,.25);
}

.block-hero__cta-wrap { margin-top: 20px; }
.block-hero__cta-wrap[hidden] { display: none; }

/* ----- Navigation (flèches + dots) ----- */

.block-hero__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    /* taille du bouton = taille de la flèche (30×50 desktop) */
    width: 30px;
    height: 50px;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--color-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--dur) var(--ease);
}
.block-hero__nav-arrow {
    width: 30px;
    height: 50px;
}
/* SVG natif pointe à gauche → on miroir pour le bouton "next" */
.block-hero__nav--next .block-hero__nav-arrow {
    transform: scaleX(-1);
}
.block-hero__nav:hover,
.block-hero__nav:focus-visible {
    transform: translateY(-50%) scale(1.12);
}
.block-hero__nav:active { transform: translateY(-50%) scale(0.92); }
.block-hero__nav--prev { left: clamp(8px, 2vw, 24px); }
.block-hero__nav--next { right: clamp(8px, 2vw, 24px); }

.block-hero__dots {
    display: none;
    position: absolute;
    bottom: clamp(16px, 3vw, 28px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.block-hero__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.45);
    border: none;
    cursor: pointer;
    transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.block-hero__dot:hover  { background: rgba(255,255,255,.75); }
.block-hero__dot.is-active {
    background: var(--color-primary);
    transform: scale(1.2);
}

/* ----- Placeholder (édition Gutenberg sans slide) ----- */
.block-hero--placeholder {
    background: var(--color-bg-alt);
    color: var(--color-text);
    padding: 32px var(--gutter);
    text-align: center;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
}

/* ----- Mobile ----- */
@media (max-width: 768px) {
    .block-hero { --hero-min-h: 360px; }
    /* Sur mobile, on cache les flèches et on affiche les dots */
    .block-hero__nav { display: none; }
    .block-hero__dots { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
    .block-hero__slide { transition: none; }
}
