:root {
    --color-bg-prest: #f9f9fa;
    --color-text-main: #1a1a1a;
    --color-text-light: #666666;
    --color-brand: #ea5b10;
    --color-border: #eaeaea;
    --font-main: 'Arial', sans-serif;
}

/* =========================================
   MOBILE FIRST : Le Slider (par défaut)
   ========================================= */

.block-prestations {
    width: 100%;
    padding: 60px 24px; /* Padding mobile par défaut */
    background: #FAFAF8;
    box-sizing: border-box;
    overflow-x: hidden; /* Empêche les bugs de scroll horizontal global */
}

.prest__container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 50px;
    max-width: 1280px;
    margin: 0 auto;
}

/* --- Header Mobile --- */
.prest__header {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0px;
    gap: 10px;
    width: 100%;
    height: auto;
}

.prest__title {
    width: 100%;
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 700;
    font-size: 24px; /* Taille mobile */
    line-height: 28px;
    color: #111111;
    margin: 0;
}

.prest__counters {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 10px;
}

.prest__count {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    font-size: 15px;
    line-height: 20px;
    color: #8A8A85;
}

.prest__counters strong {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
    line-height: 19px;
    color: #111111;
}

/* --- Grille / Slider Mobile --- */
.prest__grid {
    display: flex;
    gap: 20px;
    
    /* Scroll Horizontal Mobile */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Cache scrollbar sur Firefox */
    
    /* Edge to Edge (déborde de l'écran) */
    width: 100%;
    padding-top: 10px;
    padding-bottom: 30px; /* Pour l'ombre/le style */
    box-sizing: border-box;
}

.prest__grid::-webkit-scrollbar {
    display: none; /* Cache scrollbar sur Chrome/Safari */
}

/* --- Cartes Régions Mobile --- */
.prest__card {
    display: flex;
    flex-direction: row;
    align-items: normal;
    padding: 20px;
    gap: 14px;
    
    /* Largeur dynamique pour laisser dépasser la carte suivante */
    width: 80vw; 
    max-width: 262px; /* Conserve la largeur max de la maquette */
    height: 188px;
    
    /* Vital pour le slider */
    flex-shrink: 0; 
    scroll-snap-align: start; 
    
    background: #FFFFFF;
    border: 1px solid #EAEAE5;
    border-radius: 14px;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.prest__region-title {
    width: 100%; /* Adapté pour flex-wrap sur mobile */
    max-width: 222px;
    border-bottom: 1px solid #F2F2EE;
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
    line-height: 19px;
    color: #111111;
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 9px;
}

.prest__region-dot {
    width: 9px;
    height: 9px;
    background: #EA5B0C;
    border-radius: 3px;
    display: inline-block;
}

/* --- Liste des prestations & Scrollbar Custom --- */
.prest__item-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 113px;
    overflow-y: auto;
    padding-right: 0px;
    width: 100%;
	min-height: 113px;
    scrollbar-width: thin;
    scrollbar-color: rgba(234, 91, 12, 1) rgba(239, 238, 235, 1);
}

.prest__item-list::-webkit-scrollbar {
    width: 4px;
}
.prest__item-list::-webkit-scrollbar-track {
    background: rgba(239, 238, 235, 1); 
    border-radius: 10px;
}
.prest__item-list::-webkit-scrollbar-thumb {
    background: rgba(234, 91, 12, 1); 
    border-radius: 10px;
}

.prest__item {
    margin-bottom: 9px;
}
.prest__item:last-child {
    margin-bottom: 0;
}

.prest__item-link {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    font-size: 15px;
    line-height: 20px;
    display: flex;
    align-items: center;
    color: #5A5A5A;
    text-decoration: none;
    transition: color 0.2s ease;
}

.prest__item-link::before {
    content: '\203A';
    display: inline-block;
    margin-right: 8px;
    color: #cccccc;
    font-size: 18px;
    line-height: 1;
}

.prest__item-link:hover {
    color: var(--color-brand);
}
.prest__item-link:hover::before {
    color: var(--color-brand);
}

.prest__empty {
    font-size: 14px;
    color: #999;
    font-style: italic;
}


/* =========================================
   DESKTOP : La Grille (Design original intact)
   ========================================= */

@media (min-width: 768px) {
    .block-prestations {
        padding: 80px;
    }

    .prest__header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%; /* Adaptatif avant 992px */
        height: 37px;
    }

    .prest__title {
        font-size: 32px;
        line-height: 37px;
        width: 536px;
    }

    .prest__grid {
        /* Restaure la grille et désactive le slider */
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        overflow-x: visible;
        width: 100%;
        margin-left: 0;
        padding: 10px 20px;
    }

    .prest__card {
        /* Restaure les dimensions exactes desktop */
        width: 262px;
        min-width: 262px;
        max-width: 262px;
    }
}

@media (min-width: 992px) {
    .prest__header {
        width: 1120px; /* Largeur exacte maquette */
    }

    .prest__grid {
        grid-template-columns: repeat(4, 1fr);
        width: 1120px; /* Largeur exacte maquette */
        padding: 0;
        gap: 24px;
    }
}