:root {
    --color-bg-section: #f9f9fa;
    --color-text-main: #1a1a1a;
    --color-text-muted: #1a1a1a;
    --color-star: #ea5b10;
    --color-card-border: #eaeaea;
}

.block-avis {
    width: 100%;
    background: #FAFAF8;
    box-sizing: border-box;
    /* Empêche les bugs de scroll horizontal sur l'ensemble de la page sur mobile */
    overflow-x: hidden; 
}

.avis__container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Section En-tête --- */
.avis__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px;
    gap: 24px;
    width: 100%;
    max-width: 768px;
}

.avis__title {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 37px;
    text-align: center;
    margin: 0;
    color: #000000;
}

.avis__desc {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 19px;
    text-align: center;
    color: #000000;
}

/* --- Base des éléments internes --- */
.avis__stars {
    display: flex;
    gap: 4px;
}

.avis__content {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 19px;
    color: #000000;
    flex-grow: 1;
}

.avis__author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avis__author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.avis__author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avis__author-name {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
}

.avis__author-sub {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
}

/* =========================================
   MOBILE FIRST : Le Slider (par défaut)
   ========================================= */

.block-avis {
    padding: 60px 24px;
}

.avis__container {
    gap: 30px;
}

.avis__grid {
    display: flex;
    gap: 20px;
    
    /* Scroll horizontal natif */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    
    /* Edge to Edge (déborde de l'écran) */
    width: 100%;
    box-sizing: border-box;
}

.avis__grid::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.avis__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 20px;
    
    /* Comportement de la carte dans le slider mobile */
    width: 70vw; /* Laisse de la place pour voir la carte suivante */
    max-width: 320px;
    flex-shrink: 0; /* Vital : empêche l'écrasement */
    scroll-snap-align: start; /* Magnétisme au scroll */
    
    background: #FFFFFF;
    border: 1px solid #F2F2EE;
    border-radius: 14px;
    box-sizing: border-box;
}

/* =========================================
   DESKTOP : La Grille (Ne touche pas au design original)
   ========================================= */

@media (min-width: 768px) {
    .block-avis {
        padding: 80px;
    }

    .avis__container {
        gap: 50px;
    }

    .avis__grid {
        /* On remplace le Flex par la Grid */
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
        
        /* On annule les réglages "Edge-to-Edge" du slider mobile */
        width: 100%;
        margin-left: 0;
        padding-left: 0;
        padding-right: 0;
        overflow-x: visible; /* Désactive le scroll */
    }

    .avis__card {
        /* La grille gère la taille, on annule les largeurs fixes */
        width: auto;
        max-width: none;
    }
}

/* --- Ajustements Typographiques Mobile --- */
@media (max-width: 50em) {
    .avis__title {
        font-size: 24px;
        line-height: 28px;
    }
}