/* ============================================================
   Bloc de présentation détaillée de la page d'accueil
   (home_presentation.twig). Chargé uniquement sur la home.
   ============================================================ */

/* --- Cards à défilement horizontal (scroll-snap + drag + flèches) --- */
.home-presentation .cards-scroll-wrap {
    position: relative;
}

.home-presentation .cards-scroll {
    display: flex;
    align-items: stretch; /* toutes les cards à la même hauteur */
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    /* scrollbar masquée : les affordances sont le drag, les flèches et le "peek" */
    scrollbar-width: none;
}

.home-presentation .cards-scroll::-webkit-scrollbar {
    display: none;
}

.home-presentation .cards-scroll.dragging {
    cursor: grabbing;
    scroll-snap-type: none; /* défilement fluide pendant le drag */
    scroll-behavior: auto;
    user-select: none;
}

.home-presentation .cards-scroll > .card {
    flex: 0 0 auto;
    width: min(85%, 320px); /* mobile : 1 card + "peek" de la suivante */
    scroll-snap-align: start;
    background-color: #576A5A; /* tfl-vert : fond vert foncé */
    border: 0;
    color: #fff;
}

/* Titre des cards en blanc (surcharge .text-primary) */
.home-presentation .cards-scroll > .card .card-title {
    color: #fff !important;
}

@media (min-width: 992px) {
    .home-presentation .cards-scroll > .card {
        width: 320px; /* desktop : ~3 cards visibles, scroll si besoin */
    }
}

/* --- Flèches de navigation gauche/droite --- */
.home-presentation .cards-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
    cursor: pointer;
}

.home-presentation .cards-nav:hover {
    background: var(--bs-link-hover-color);
}

.home-presentation .cards-nav[hidden] {
    display: none;
}

.home-presentation .cards-nav-prev {
    left: -8px;
}

.home-presentation .cards-nav-next {
    right: -8px;
}

/* Sur mobile, le défilement tactile suffit : on masque les flèches */
@media (max-width: 767.98px) {
    .home-presentation .cards-nav {
        display: none;
    }
}

/* --- FAQ : accordéon natif <details> --- */
.home-presentation .faq-item {
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1rem 0;
}

.home-presentation .faq-item > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--bs-primary);
    list-style: none; /* masque le triangle par défaut */
    position: relative;
    padding-right: 1.75rem;
}

.home-presentation .faq-item > summary::-webkit-details-marker {
    display: none; /* Safari */
}

.home-presentation .faq-item > summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1.5rem;
    line-height: 1;
}

.home-presentation .faq-item[open] > summary::after {
    content: "\2212"; /* signe moins */
}

.home-presentation .faq-item > p {
    margin-top: 0.75rem;
    margin-bottom: 0;
}
