
/* =========================================
   LÜN — CARROUSEL DE LA PAGE D'ACCUEIL
   ========================================= */

/* On conserve les dimensions et la typographie
   déjà définies dans style2.css. */
.home-hero.home-carousel {
    isolation: isolate;
}

/* Le dégradé est géré séparément par chaque slide. */
.home-hero.home-carousel::after {
    display: none;
}

/* =========================================
   SLIDES
   ========================================= */

.home-carousel-slide {
    position: absolute;
    inset: 0;
    z-index: 0;
    isolation: isolate;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.7s ease,
        visibility 0.7s ease;
}

.home-carousel-slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Images */
.home-carousel .home-carousel-image {
    position: absolute;
    inset: 0;
    z-index: 1;

    display: block;
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center 35%;
    filter: brightness(0.65);

    transition: transform 8s var(--ease);
}

/* Zoom discret */
.home-carousel:hover
.home-carousel-slide.is-active
.home-carousel-image {
    transform: scale(1.02);
}

/* Dégradé individuel derrière le texte */
.home-carousel-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.20) 45%,
        transparent 100%
    );
}

/* Les styles du texte restent dans style2.css. */
.home-carousel .home-hero-content {
    z-index: 3;
}

/* =========================================
   FLÈCHES DISCRÈTES
   ========================================= */

.home-carousel .home-carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 10;

    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;
    padding: 0;

    transform: translateY(-50%);

    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;

    color: #fff;
    background: rgba(0, 0, 0, 0.16);

    font-family: inherit;
    font-size: 25px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;
    backdrop-filter: blur(5px);

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.home-carousel .home-carousel-arrow--prev {
    left: 24px;
}

.home-carousel .home-carousel-arrow--next {
    right: 24px;
}

.home-carousel .home-carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.45);
    border-color: #fff;
}

/* Ordinateur : flèches cachées hors survol. */
@media (hover: hover) and (pointer: fine) {
    .home-carousel .home-carousel-arrow {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

   .home-carousel:hover .home-carousel-arrow,
.home-carousel .home-carousel-arrow:focus-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* Focus clavier accessible */
.home-carousel .home-carousel-arrow:focus-visible,
.home-carousel .home-carousel-dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

/* =========================================
   POINTS CENTRÉS EN BAS
   ========================================= */

.home-carousel .home-carousel-nav {
    position: absolute;
    left: 50%;
    bottom: 27px;
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;

    width: max-content;
    transform: translateX(-50%);
}

.home-carousel .home-carousel-dots {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Style des petits ronds */
.home-carousel .home-carousel-nav
.home-carousel-dots .home-carousel-dot {
    appearance: none;
    -webkit-appearance: none;

    display: block;
    flex: 0 0 8px;

    width: 8px;
    min-width: 8px;
    height: 8px;
    min-height: 8px;

    padding: 0;
    margin: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.55);
    box-shadow: none;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.home-carousel .home-carousel-nav
.home-carousel-dots .home-carousel-dot.is-active {
    background: #fff;
    transform: scale(1.2);
}

/* =========================================
   LIGNE DE PROGRESSION
   Collée au bord inférieur de l'image
   ========================================= */

.home-carousel .home-carousel-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;

    display: block;
    width: 100%;
    height: 2px;

    margin: 0;
    padding: 0;
    overflow: hidden;

    background: rgba(255, 255, 255, 0.28);
}

.home-carousel .home-carousel-progress-fill {
    display: block;
    width: 0;
    height: 100%;

    background: rgba(255, 255, 255, 0.95);

    animation: lunHomeCarouselProgress 8s linear forwards;
}

@keyframes lunHomeCarouselProgress {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 767px) {
    .home-carousel .home-carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 21px;
    }

    .home-carousel .home-carousel-arrow--prev {
        left: 12px;
    }

    .home-carousel .home-carousel-arrow--next {
        right: 12px;
    }

    .home-carousel .home-carousel-nav {
        bottom: 23px;
    }
}

/* =========================================
   PRÉFÉRENCE DE RÉDUCTION DES ANIMATIONS
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    .home-carousel-slide {
        transition: none;
    }

    .home-carousel .home-carousel-image {
        transition: none;
    }

    .home-carousel .home-carousel-progress-fill {
        animation: none;
        width: 100%;
    }
}

/* LÜN — Animation du trait des liens du hero */

.home-carousel .home-hero-content .primary-link::after {
    transition: width 0.3s ease;
}

.home-carousel .home-hero-content .primary-link:hover::after,
.home-carousel .home-hero-content .primary-link:focus::after,
.home-carousel .home-hero-content .primary-link:active::after {
    width: clamp(42px, 4vw, 54px);
}