/* css/all_sites.css */

.hidden {
    display: none !important;
}
.no-results-message {
    text-align: center;
    color: #777;
    font-size: 1.1em;
    padding: 20px;
}

/* Styles de la page */
.all-sites-section {
    padding: 60px 0;
}
.cards-section {
    margin-bottom: 60px;
}
.cards-section h2 {
    font-size: 2.8em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 0;
    letter-spacing: 1.5px;
    position: relative;
    margin-top: 40px;
}
.cards-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--climbout-orange);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Conteneur de carrousel */
.carousel-container {
    position: relative;
    margin: 0 auto;
    max-width: 100%;
}
.carousel-cards {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    gap: 20px;
    padding-bottom: 15px;
    padding-left: 20px;
    padding-right: 20px;
}
.carousel-cards::-webkit-scrollbar {
    display: none;
}
.carousel-cards.search-active {
    flex-wrap: wrap; 
    justify-content: center;
    overflow-x: hidden; 
}

/* Navigation du carrousel */
.carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}
.carousel-nav button {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--climbout-green);
    color: var(--climbout-green);
    padding: 10px 15px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    pointer-events: auto;
}
.carousel-nav button:hover {
    background-color: var(--climbout-green);
    color: var(--text-light);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}
.carousel-nav .prev-btn {
    margin-left: -50px;
}
.carousel-nav .next-btn {
    margin-right: -50px;
}

/* Styles des cartes */
.climbing-site-card {
    min-width: 300px;
    max-width: 300px;
    height: 400px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
}
.climbing-site-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.climbing-site-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.climbing-site-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    align-items: flex-start;
}
.climbing-site-card h3 {
    font-size: 1.3em;
    margin-bottom: 5px;
    color: var(--climbout-green);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}
.climbing-site-card-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
    word-break: break-word;
}
.climbing-site-card .card-text-container small {
    color: #666;
}
.card-text-container {
    flex-grow: 0;
    flex-shrink: 0;
}

/* Mise en page de la section Blocs avec filtre */
.pistes-layout-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    align-items: flex-start;
}

.pistes-list-wrapper {
    min-width: 0;
}

/* Styles de la liste des pistes */
.pistes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.piste-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--light-grey);
    font-size: 1.1em;
    transition: background-color 0.2s ease;
    text-decoration: none; 
    color: inherit; 
}
.piste-item:last-child {
    border-bottom: none;
}
.piste-item:hover {
    background-color: var(--modern-background);
    cursor: pointer;
}
.piste-name {
    font-weight: 600;
    color: var(--climbout-green);
    flex-grow: 1;
}
.piste-difficulty {
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.9em;
    min-width: 45px;
    text-align: center;
}

/* Style du bouton de filtre mobile */
.btn-filter-toggle {
    display: none;
    margin: 0 auto 20px auto;
    background-color: var(--climbout-green);
    color: var(--text-light);
    width: 100%;
    max-width: 250px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    box-shadow: none;
    border-radius: 8px;
    padding: 12px 25px;
    cursor: pointer;
}

/* Filtre latéral pour les blocs */
.pistes-filter {
    position: sticky;
    top: 100px;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.pistes-filter h4 {
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.2em;
    color: var(--text-dark);
}
#filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-option input[type="checkbox"] {
    width: 1.2em;
    height: 1.2em;
    cursor: pointer;
    accent-color: var(--climbout-orange);
}
.filter-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 1em;
    flex-grow: 1;
    user-select: none;
}
.color-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    flex-shrink: 0;
}
.filter-option input[type="checkbox"]:checked + label {
    font-weight: bold;
}

/* Boutons "afficher plus/moins" */
.load-more-btn, .hide-pistes-btn {
    text-align: center;
    padding: 20px;
    cursor: pointer;
    font-size: 2em;
    color: var(--climbout-green);
    transition: color 0.3s ease;
}
.load-more-btn:hover, .hide-pistes-btn:hover {
    color: var(--climbout-orange);
}

/* Barre de recherche */
.search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 20px auto 40px auto;
}
#searchInput {
    width: 100%;
    padding: 12px 140px 12px 20px;
    font-size: 1.1em;
    border-radius: 25px;
    border: 2px solid var(--light-grey);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: block;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}
#searchInput:focus {
    outline: none;
    border-color: var(--climbout-orange);
    box-shadow: 0 4px 20px rgba(255,138,0,0.2);
}
#searchButton {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--climbout-orange);
    color: var(--text-light);
    border: none;
    border-radius: 20px;
    padding: 8px 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#searchButton:hover {
    background-color: #e07a00;
}

/* --- STYLES RESPONSIVES SPÉCIFIQUES --- */
@media (max-width: 992px) {
    h1 {
        font-size: 2.5em !important;
    }
    .cards-section h2 {
        font-size: 2.2em;
    }
    .carousel-cards {
        padding-left: 15px;
        padding-right: 15px;
    }
    .climbing-site-card {
        min-width: 280px;
        max-width: 280px;
    }
    .carousel-nav .prev-btn {
        margin-left: -15px;
    }
    .carousel-nav .next-btn {
        margin-right: -15px;
    }
    .pistes-layout-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .btn-filter-toggle {
        display: flex; 
    }
    .pistes-filter {
        position: static;
        /* width: 100%;  <-- Ligne supprimée pour corriger le débordement */
        margin-bottom: 20px;
        display: none;
    }
    
    #filter-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 10px;
        justify-items: start;
    }
}
@media (max-width: 480px) {
    h1 {
        font-size: 2em !important;
    }
    .cards-section h2 {
        font-size: 1.8em;
    }
    #searchInput {
        padding: 10px 15px;
        font-size: 1em;
    }
    #searchButton {
        display: none;
    }
}