/* Layout avec scroll — pages Accueil, About, Contact */

body {
    display: grid;
    grid-template-columns: minmax(12rem, 15vw) 1fr;
    grid-template-rows: auto 1fr auto;  
    grid-template-areas:
        "menu   menu"
        "aside  main"
        "footer footer";
    height: 100vh;
    overflow: hidden;
}

main {
    grid-area: main;
    min-width: 0;
    min-height: 0;  
    background-color: #d9d9d9;
    display: flex;
    flex-direction: column;
    overflow: hidden;   /* pas de scroll par défaut */
}

main.scrollable {
    overflow-y: auto; 
}
aside {
    grid-area: aside;
    background-color: #A10E2F;
    overflow-y: auto;
}

/* --- Hero (page Accueil) --- */
.hero {
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 2.4rem 1.25rem;
    display: flex;
    align-items: flex-end;
    height: 11rem;
    flex-shrink: 0;
    box-sizing: border-box;
}

.hero .hero-caption {
    background-color: rgba(0, 0, 0, 0.6);
    display: block;
    width: 100%;
    padding: 0.75rem 2rem;
    box-sizing: border-box;
}

.content {
    background-color: white;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 1.25rem;
}

.content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* --- Carrousel de collections --- */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.carousel-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 0.5rem 0;
    flex: 1;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
    background: #eadfe0;
    border-radius: 0.4rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    min-height: 12rem;
}

.carousel-card img {
    width: 25%;
    max-width: 12rem;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #eadfe0;
    border-radius: 0.3rem;
    flex-shrink: 0;
}

.carousel-card .card-body {
    flex: 1;
    min-width: 0;
}

.carousel-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #A10E2F;
    display: block;
    margin-bottom: 0.4rem;
}

.carousel-card p {
    font-size: 0.9rem;
    color: #444;
    margin: 0;
}

.carousel-arrow {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    background: #A10E2F;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow:hover {
    opacity: 0.85;
}

/* --- Mobile --- */
@media (max-width: 48rem) {
    body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr auto;
        grid-template-areas:
            "menu"
            "aside"
            "main"
            "footer";
    }

    .menu h1 {
        font-size: 1.1rem;
    }

    .hero {
        height: auto;
        min-height: 8rem;
    }

    .carousel-card {
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }

    .carousel-card img {
        width: 60%;
        margin: 0 auto;
    }

    /* Scroll interne sur ordinateur et tablette paysage */
    main.scrollable {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }

/* Téléphone et tablette étroite */
@media (max-width: 48rem) {
    html,
    body {
        height: auto;
        min-height: 100%;
    }

    body {
        grid-template-rows: auto auto auto auto;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    main,
    main.scrollable {
        min-height: 0;
        overflow: visible;
    }

    .content {
        margin: 1rem;
        padding: 1rem;
        overflow-wrap: anywhere;
    }
}
}