/* css/site_details.css */

.site-detail-section {
    padding: 60px 0;
}

.detail-header {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 400px;
    border-radius: 15px;
    overflow: hidden;
}
.detail-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
    z-index: 1;
}
.detail-header h1 {
    color: var(--text-light);
    font-size: 3.5em;
    margin-bottom: 10px;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.detail-header p {
    color: #fff;
    font-size: 1.2em;
    z-index: 2;
}
.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
    color: var(--text-light);
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.detail-content {
    padding: 40px;
}
.detail-section {
    margin-bottom: 40px;
}
.detail-section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
}
.detail-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--climbout-orange);
    margin: 10px auto 0;
    border-radius: 2px;
}
.description-text {
    text-align: center;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}
.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: 15px 20px;
}
.carousel-cards::-webkit-scrollbar { display: none; }

.carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    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);
}
.carousel-nav button:hover {
    background-color: var(--climbout-green);
    color: var(--text-light);
}
.carousel-nav .prev-btn { margin-left: -50px; }
.carousel-nav .next-btn { margin-right: -50px; }

.climbing-site-card {
    min-width: 300px; max-width: 300px; 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: start; display: flex; flex-direction: column; cursor: pointer;
}
.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; }
.climbing-site-card-content { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.climbing-site-card h3 { font-size: 1.4em; margin-bottom: 5px; }
.climbing-site-card-description { font-size: 0.9em; color: #666; margin-bottom: 10px; flex-grow: 1; max-height: 4.5em; overflow: hidden; line-height: 1.5em; }
.climbing-site-card-footer { display: flex; justify-content: space-around; align-items: center; padding: 15px; background-color: var(--light-grey); border-top: 1px solid #e0e0e0; margin-top: auto; }
.info-count { display: flex; flex-direction: column; align-items: center; font-family: 'Montserrat', sans-serif; text-align: center; color: var(--climbout-green); }
.info-count .count-number { font-size: 1em; font-weight: 700; color: var(--climbout-orange); margin-bottom: 5px; }
.info-count .count-label { font-size: 0.8em; font-weight: 600; color: var(--text-dark); }
.pistes-layout-container { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: flex-start; }
.pistes-list-wrapper { min-width: 0; }
.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); max-width: 100%; }
.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; }
.piste-item:last-child { border-bottom: none; }
.piste-item:hover { background-color: var(--modern-background); }
.no-pistes-message { text-align: center; color: #777; padding: 30px 20px; font-style: italic; }
.piste-link { display: flex; justify-content: space-between; align-items: center; flex-grow: 1; color: inherit; }
.piste-name { font-weight: 600; flex-grow: 1; }
.piste-difficulty { padding: 5px 10px; border-radius: 5px; font-weight: 700; font-size: 0.9em; min-width: 45px; text-align: center; }
.show-more-icon { font-size: 2em; color: var(--climbout-orange); cursor: pointer; transition: transform 0.3s ease; }
.show-more-icon:hover { transform: translateY(5px); }
.show-less-icon { font-size: 2em; color: var(--climbout-orange); cursor: pointer; transition: transform 0.3s ease; }
.show-less-icon:hover { transform: translateY(-5px); }

/* NOUVEAU : 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;
}

.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; }
#error-message { text-align: center; font-size: 1.2em; color: #777; padding: 50px 0; width: 100%; }

/* ... (Styles des Skeletons inchangés) ... */

@media (max-width: 992px) {
    .detail-header { min-height: 300px; }
    .detail-header h1 { font-size: 2.5em; }
    .detail-section h2 { font-size: 2.2em; }
    .carousel-cards { padding: 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-list { max-width: 100%; }
    
    .pistes-layout-container { grid-template-columns: 1fr; gap: 20px; }
    
    /* NOUVEAU : Logique d'affichage mobile */
    .btn-filter-toggle {
        display: flex;
    }
    .pistes-filter {
        position: static;
        width: auto;
        margin-bottom: 20px;
        display: none;
    }
    .pistes-filter.is-open {
        display: block;
    }
    
    #filter-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 10px;
        justify-items: start;
    }
}

@media (max-width: 480px) {
    .detail-header h1 { font-size: 2em; }
    .detail-section h2 { font-size: 1.8em; }
}