
.highlight-section {
    max-width: 90%;
    margin: 10px auto 28px;
    padding: 0 40px 10px;
}

.highlight-title {
    display: flex;
    justify-content: flex-start;
    font-family: "Grold", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 2.4em;
    font-weight: 700;
    margin: 0 0 8px;
    text-align: center;
}

/* =========================
   CARROUSEL — par section
========================= */

.highlight-carousel-wrapper {
    position: relative;
    width: 100%;
    /* overflow: visible — les boutons doivent pouvoir déborder du wrapper */
}

.highlight-carousel {
    display: flex;
    gap: 20px;
    padding: 20px 30px;               /* gouttière interne pour éloigner les cartes des flèches */
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;            /* Firefox: masque scrollbar */
    scroll-snap-type: x mandatory;    /* navigation par batch propre */
    scroll-padding-inline: 30px;      /* le snap respecte la gouttière */
    overscroll-behavior-x: contain;   /* évite que le scroll horizontal “fuite” à la page */
}
.highlight-carousel::-webkit-scrollbar { display: none; }

.highlight-card {
    flex: 0 0 250px;
    min-width: 250px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    padding: 10px;
    transition: transform .2s ease, box-shadow .2s ease;
    scroll-snap-align: start;
}
.highlight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

/* Image bien scalée (pas étirée) */
.highlight-imgwrap {
    width: 100%;
    aspect-ratio: 16/10;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.highlight-imgwrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: auto;
    display: block;
}

.highlight-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    text-align: center;
}
.highlight-price {
    color: #de3d41;
    font-family: "Grold", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 700;
}
/* === Flèches de navigation par batch === */
.carousel-btn {
    position: absolute;
    top: calc(50% - 9px);             /* compense la barre de progression sous le carrousel */
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.92);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 55%;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,.14), 0 1px 3px rgba(0,0,0,.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;

    /* État masqué par défaut, révélé au hover du wrapper */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) scale(0.85);
    transition: opacity .18s ease, transform .18s ease, background-color .15s ease, visibility .18s;
}
.carousel-btn.left  { left:  -22px; background-image: url("/assets/img/icons/fleche-gauche.svg"); }
.carousel-btn.right { right: -22px; background-image: url("/assets/img/icons/fleche-droite.svg"); }

.carousel-btn:hover  { background-color: #fff; transform: translateY(-50%) scale(1.06); }
.carousel-btn:active { transform: translateY(-50%) scale(0.95); }

.carousel-btn:disabled {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}

/* Affichage uniquement sur les périphériques avec hover (desktop) */
@media (hover: hover) {
    .highlight-carousel-wrapper:hover .carousel-btn:not(:disabled),
    .carousel-btn:focus-visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%) scale(1);
    }
}

/* Sur tactile : pas de flèches, l'utilisateur swipe */
@media (hover: none) {
    .carousel-btn { display: none; }
}

/* Barre de progression */
.carousel-progress {
    width: 100%;
    height: 3px;
    background: #e5e7eb;
    border-radius: 9999px;
    margin-top: 16px;
    overflow: hidden;
}

.carousel-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #151414, #000000);
    border-radius: 9999px;
    width: 0%;
    transition: width 0.1s ease-out;
}

/* ========== RESPONSIVE ========== */

/* Tablette large */
@media (max-width: 1200px) {
    .highlight-section {
        padding: 0 30px 10px;
    }

    .highlight-title {
        font-size: 2em;
    }

    .highlight-card {
        flex: 0 0 340px;
        min-width: 340px;
    }
}

/* Tablette */
@media (max-width: 900px) {
    .highlight-section {
        padding: 0 20px 10px;
        margin: 10px 15px 28px;
    }

    .highlight-title {
        font-size: 1.8em;
        justify-content: center;
    }

    .highlight-card {
        flex: 0 0 320px;
        min-width: 320px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }
}

/* Mobile */
@media (max-width: 600px) {

    .highlight-section {
        padding: 0 15px 10px;
        margin: 10px 10px 20px;
    }

    .highlight-title {
        font-size: 1.5em;
    }

    .highlight-carousel {
        gap: 15px;
        padding: 15px 0;
    }

    .highlight-card {
        flex: 0 0 280px;
        min-width: 280px;
        padding: 8px;
    }

    .highlight-label {
        padding: 8px;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
    }

    .carousel-nav {
        padding: 0 4px;
    }
}

/* Petit mobile */
@media (max-width: 400px) {
    .highlight-card {
        flex: 0 0 75vw;
        min-width: 75vw;
    }

    .highlight-title {
        font-size: 1.3em;
    }

    .carousel-btn {
        width: 32px;
        height: 32px;
    }
}