/* ============================
   LAYOUT GLOBAL
============================ */
.catalogue-layout {
    display: grid;
    grid-template-columns: 280px 1fr; /* sidebar + résultats */
    gap: 2rem;
    align-items: start;
    width: 100%;
    justify-items: center;
}
#results {
    display: grid;
    flex-direction: column;
    width: 100%;
    justify-items: center;
}

.filters-column {
    display: none; /* masqué sur mobile → drawer */
}

/* ============================
   SIDEBAR FILTRES (desktop)
============================ */

.filter-block {
    margin-bottom: 1.5rem;
}
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    margin-bottom: 0.5rem;
}

.filter-link {
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.filter-link:hover {
    color: #007bff;
}

.filter-link.active {
    font-weight: bold;
    color: #007bff;
}

/* ============================
   DRAWER MOBILE
============================ */
.btn-filter-mobile {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}
.btn-filter-mobile i {
    margin: 0;
}
.filter-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
}

.filters-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 280px;
    height: 100%;
    background: var(--primary-color-gradient);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
    z-index: 3000;
    color: #fff;
}

.filters-drawer.open {
    left: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.drawer-close {
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: #fff;
    font-weight: 900;
}

.drawer-content {
    padding: 1rem;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

/* ============================
   GRILLE DES OFFRES
============================ */
.results-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
    width: 100%;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 10px auto;
    width: 100%;
    justify-content: center;
}

/* ============================
   STYLE DES CARDS
============================ */
.offer-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    width: 100%;
    max-width: 300px;
}
.offer-card form {
    display: flex;
    justify-content: center;
    width: 97%;
}
.offer-card form button {
    max-width: 280px;
    border-radius: 50px;
    margin-bottom: 20px;
}
.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--primary-color);
}
/* Icone des favoris */
.favori {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    cursor: pointer;
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 1px 1px 1px rgb(115, 115, 115);
}
/* Image */
.offer-image img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    display: block;
}
.offer-date {
    margin: 5px;
    color: rgb(110, 110, 110);
    display: inline-flex;
    text-align: center;
}
.offer-date i {
    color: darkgray;
    text-shadow: none;
}
/* Contenu */
.offer-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.offer-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.offer-description {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 10px;
    flex-grow: 1;
}

.offer-meta {
    display: flex;
    font-size: 0.85rem;
    color: #777;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.offer-price {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--secondary-color);
    text-align: center;
    margin: 5px;
    text-shadow: 1px 1px 1px darkgray;
}

.offer-category {
    background: var(--secondary-color-gradient);
    width: 90px;
    color: #ffff;
    padding: 10px;
}
/* Lien bouton */
.offer-link {
    align-self: flex-start;
    padding: 8px 14px;
    background: #007bff;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.offer-link:hover {
    background: #0056b3;
}
.offer-footer {
    display: flex;
    justify-content: center;
}
.btn-add-cart {
    margin-top: auto;
}
.persons-number {
    display: flex;
    flex-direction: row;
    padding: 5px;
    align-items: center;
    justify-content: center;
    background: #d8d8d8;
}
.add-child-plus-sign {
    color: white;
}
.adult-icon {
    color: var(--secondary-color);
    margin-right: 1px;
}
.child-icon {
    color: lightblue;
    margin-right: 1px;
}
/* Par défaut : masquer sur desktop */
#openFilters {
    display: none;
}
.offer-sports {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    text-align: center;
    background-color: #ededed;
    box-shadow: var(--box-shadow);
    padding: 5px;
}
.offer-emplacement {
    display: inline-block;
    max-width: 100%;
    padding: 5px;
    margin: 5px;
    word-wrap: break-word;
    white-space: normal;
}
.sport-list {
    list-style: none; /* supprime les puces */
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem; /* espace entre les tags */
}

.sport-items {
    background: #f1f3f5; /* gris clair */
    color: #333;
    font-size: 0.85rem;
    padding: 0.25rem 0.6rem;
    border-radius: 15px; /* arrondi style "pill" */
    border: 1px solid #ddd;
    display: inline-block;
    transition: all 0.2s ease-in-out;
}

.sport-items:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}
.results-header,
#resultsCount,
.offres-counter {
    text-align: center;
}
.last-offers {
    color: var(--primary-color);
}
/* Version sur la page d'accueil (promotions) */
.promotions-wrapper {
    display: flex;
    max-width: 800px;
}
.promotions {
    padding: 10px;
    display: grid;
    overflow-x: scroll;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 10px;
    white-space: nowrap;
    width: 100%;
}
.sport-emoji {
    font-size: 40px;
}
.sport-intitule {
    width: 100%;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px darkgray;
}
.offer-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    background: var(--primary-color-gradient);
}
@media (max-width: 576px) {
    .catalogue-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .offers-grid {
        justify-items: center;
    }
}

/* Afficher uniquement en mobile (par ex < 768px) */
@media (max-width: 768px) {
    .offers-grid {
        /* grid-template-columns: 1fr; */
        justify-content: center;
        align-items: center;
    }
    .offer-card {
        max-width: 400px;
        width: 100%;
    }
    #openFilters {
        display: flex;
    }
    .results-column {
        align-items: center;
    }
    .catalogue-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .promotions-wrapper {
        width: 97%;
    }
    .promotions {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 97%;
    }
}
/* format tablettes */
/* @media (max-width: 992px) {
    .catalogue-layout {
        grid-template-columns: 1fr 1fr;
        justify-items: center;
    }
} */
