/* css/modern_site.css */

/* CORRECTION : La propriété overflow-x a été retirée pour permettre au header d'être sticky */
html, body {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.6)), url('../images/IMG_2123.JPG') no-repeat center/cover;
    background-position: center 80%;
    color: var(--text-light);
    text-align: center;
    padding: 120px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}
 .hero h1 {
    font-size: 3.0em;
    margin-bottom: 20px;
    color: var(--text-light);
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
}

/* Barre de recherche et résultats */
.search-bar-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; 
    z-index:1;
    position:relative;
}
.search-widget-container {
    position: relative; 
    max-width: 700px;
    width: 90%; 
    margin: 0 auto;
    z-index: 1001;
}
.hero .search-bar {
    background-color: #fff;
    padding: 10px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    width: 100%;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    margin-bottom: 20px; 
    position: relative;
}
.hero .search-bar input {
    border: none;
    outline: none;
    flex-grow: 1;
    padding: 12px 20px 12px 20px; 
    font-size: 1.1em;
    border-radius: 25px; 
    background: transparent;
    color: var(--text-dark);
}
.hero .search-bar .btn-search {
    background-color: var(--climbout-orange);
    color: var(--text-light);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: 5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hero .search-bar .btn-search:hover { background-color: #e07a00; }
.btn-map-hero {
    padding: 18px 45px;
    font-size: 1.2em;
    font-weight: 600;
    background-color: var(--climbout-green);
    color: var(--text-light);
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.btn-map-hero:hover {
    background-color: #1a3024;
    transform: translateY(-2px);
}
.no-results-message {
    padding: 15px 20px;
    text-align: center;
    color: #777;
    font-style: italic;
}
.search-results-container {
    position: absolute;
    top: 67px;
    left: 0; 
    right: 0;
    background-color: #fff;
    border-radius: 25px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 0;
    border: 1px solid #eee;
    border-top: none; 
    display: none;
    padding: 0;
}
.result-item {
    display: grid;
    grid-template-columns: 35px 1fr; 
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--light-grey);
    transition: background-color 0.2s ease;
    gap: 10px;
}
.result-item:last-child { 
    border-bottom: none; 
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
}
.result-item--city {
    grid-template-columns: 35px 1fr auto;
}
.result-item-icon { 
    color: #555; 
    justify-self: center; 
    font-size: 1.1em;
}
.result-item-text { text-align: left; }
.result-item-name { 
    font-weight: 600; 
    color: var(--text-dark); 
    display: block;
}
.result-item-type { 
    font-size: 0.8em; 
    color: #777; 
    display: block;
}
.result-item-action {
    color: #888;
    font-style: italic;
    font-size: 0.8em;
    justify-self: end;
}
.result-item:hover, .result-item.selected { 
    background-color: var(--modern-background); 
}
.search-results-container .result-item:first-child {
    border-top: none;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
}

/* Section sites populaires (Carousel) */
.climbing-sites-section {
    padding: 90px 0;
    background-color: var(--modern-background);
    position: relative;
    overflow: hidden;
}
    .climbing-sites-section h2 {
        font-size: 2.8em;
        margin-bottom: 20px;
        padding-left: 20px;
        z-index: 1;
        position: relative;
    }
.carousel-container {
    position: relative;
    padding: 0 20px;
}
.carousel-wrapper {
    display: flex;
    overflow-x: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    gap: 20px;
    padding-bottom: 10px;
    align-items: flex-start;
    width: 100%;
}
.carousel-wrapper::-webkit-scrollbar { display: none; }

.climbing-site-link {
    text-decoration: none;
    color: inherit;
}
.climbing-site-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
    width: 300px;
    height: 400px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}
.climbing-site-link:hover .climbing-site-card {
    transform: translateY(-10px);
    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;
}
.climbing-site-card h3 {
    font-size: 1.4em;
    margin-bottom: 5px;
    color: var(--climbout-green);
}
.climbing-site-card-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    max-height: 4.5em;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease-out;
    flex-grow: 1;
}
.climbing-site-card-footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 15px 16px 15px;
    background-color: var(--light-grey);
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}
.info-stat {
    margin: 0;
    font-size: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: baseline;
}
.stat-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--climbout-orange);
    margin-right: 6px;
}
.stat-label {
    font-weight: 400;
    font-size: 0.8rem;
    color: #666;
}

/* Carte "Voir plus" */
.view-more-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    flex-shrink: 0;
    width: 300px;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.view-more-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.view-more-card .text {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--climbout-green);
    margin-bottom: 10px;
}
.view-more-card .icon {
    font-size: 3em;
    color: var(--climbout-orange);
    line-height: 1;
}

/* Skeleton Loader */
.skeleton-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    flex-shrink: 0;
    width: 300px;
    height: 400px;
    display: flex;
    flex-direction: column;
}
.skeleton {
    background-color: #e0e0e0;
    position: relative;
    overflow: hidden;
}
.skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    height: 100%;
    width: 150%;
    background: linear-gradient(to right, transparent 0%, #f0f0f0 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}
.skeleton-image {
    width: 100%;
    height: 200px;
}
.skeleton-content {
    padding: 15px;
    flex-grow: 1;
}
.skeleton-line {
    height: 1em;
    border-radius: 4px;
    margin-bottom: 10px;
}
.skeleton-line.title {
    width: 60%;
    height: 1.4em;
    margin-bottom: 15px;
}
.skeleton-line.text {
    width: 90%;
    margin-bottom: 8px;
}
.skeleton-line.text:last-child { width: 80%; }
.skeleton-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;
}
.skeleton-counter {
    width: 50px;
    height: 30px;
    border-radius: 4px;
}

/* Navigation du Carrousel */
.carousel-nav {
    position: absolute;
    top: 50%;
    width: calc(100% - 40px);
    max-width: 1200px;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: space-between;
    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: -20px;
}
.carousel-nav .next-btn { 
    margin-right: -20px;
}

/* Section fonctionnalités */
.features-section {
    background-color: var(--text-light);
    padding: 90px 0;
    position: relative;
}
.features-box {
    background-color: var(--climbout-beige);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: left;
}
.features-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    flex-wrap: wrap;
}
.features-text {
    flex: 1;
    max-width: 50%;
    z-index:1;
}
.features-text h2 {
    font-size: 2.8em;
    color: var(--climbout-green);
    margin-bottom: 20px;
}
.features-text p {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 30px;
    font-weight: 400;
}
.download-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}
.download-buttons img {
    height: 45px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.download-buttons img:hover { transform: translateY(-5px); }

/* Carrousel images application */
.app-image-carousel {
    flex: 1;
    max-width: 45%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index:1;
}
.app-image-carousel .carousel-inner {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.app-image-carousel .carousel-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.app-image-carousel .carousel-item.active { opacity: 1; }
.app-image-carousel .carousel-item img {
    width: auto;
    max-height: 500px;
    display: block;
}
.app-carousel-nav .prev-btn { margin-left: -20px; }
.app-carousel-nav .next-btn { margin-right: -20px; }
.diagonal-iphone {
    transform: rotate(7deg) translate(-50%, -50%);
    top: 50%;
    left: 50%;
}
.diagonal-iphone img {
    max-height: 500px;
    transform-origin: center;
    transition: transform 0.5s ease-in-out;
}
.dynamic-description {
    font-size: 1.2em;
    text-align: center;
    color: var(--climbout-green);
    font-weight: 600;
    margin-top: 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
}

/* Indicateurs (dots) pour carrousels */
.carousel-dots {
    text-align: center;
    margin-top: 15px;
}
.carousel-dots .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.carousel-dots .dot.active { background-color: var(--climbout-orange); }

/* Section CTA "Plus de 15 000 blocs" */
.app-features-section {
    padding: 90px 0;
    background-color: #fff;
}
.cta-box {
    background-color: var(--climbout-green);
    color: var(--text-light);
    padding: 90px 60px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 1;
    position: relative;
}
.cta-box h2 {
    color: var(--text-light);
    font-size: 3.2em;
    margin-bottom: 10px;
}
.cta-box p {
    font-size: 1.4em;
    max-width: 700px;
    margin: 0 auto 40px auto;
    opacity: 0.9;
}
.btn-map {
    background-color: var(--climbout-orange);
    color: var(--text-light);
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.btn-map:hover {
    background-color: #e07a00;
    transform: translateY(-2px);
}

/* Section Communauté */
.user-creations-section {
    background-color: var(--modern-background);
    padding: 90px 0;
    overflow: hidden;
}
.community-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
    position: relative;
}
.community-carousel-container {
    position: relative;
    max-width: 320px;
    justify-self: end;
    z-index: 1;
    position: relative;
}
.carousel-viewport {
    width: 100%;
    overflow: hidden;
}
.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.carousel-slide {
    flex: 1 0 100%;
    width: 100%;
}
.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}
.community-caption {
    font-style: italic;
    text-align: center;
    color: var(--text-dark);
    margin-top: 8px;
    font-size: 0.9em;
}
.community-text-box {
    background-color: var(--climbout-beige);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    z-index: 1;
    position: relative;
}
.community-text-box h2 {
    font-size: 2.8em;
    margin-bottom: 15px;
    line-height: 1.3;
}
.community-text-box p {
    font-size: 1.2em;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 30px;
}
.btn-cta-community {
    background-color: var(--climbout-green);
    color: var(--text-light);
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.btn-cta-community:hover { background-color: #1a3024; }

/* Styles pour l'animation de la flèche du bouton communauté */
.community-text-box .btn-cta-community i {
    transition: transform 0.3s ease;
}
.community-text-box .dropdown.active .btn-cta-community i {
    transform: rotate(180deg);
}


/* Section À Propos */
.about-section {
    background-color: #fff;
    padding: 90px 0;
}
.about-section-content {
    background-color: var(--light-grey);
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    z-index: 1;
    position: relative;
}
.about-section-content h2 {
    font-size: 2.8em;
    color: var(--climbout-green);
    margin-bottom: 30px;
}
.about-section-content p {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-dark);
    font-weight: 400;
}

/* Section "Partez à l'aventure" */
.explore-lists-section {
    background-color: #fff; 
    padding: 25px 0;
    border-top: 1px solid #e0e0e0;
}
.explore-lists-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    z-index:1;
    position:relative;
}
.explore-lists-section h2 {
    text-align: left;
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 20px;
}
.explore-lists-container {
    display: flex;
    /* MODIFICATION : Centre les 2 colonnes restantes */
    justify-content: space-evenly;
    gap: 40px;
    max-width: 900px; /* Empêche les colonnes d'être trop éloignées */
    margin: 0 auto; /* Centre le conteneur */
}
.explore-list {
    flex: 1; 
    min-width: 0;
}
.explore-list h3 {
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: #333;
    text-align: left;
}
.explore-list ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: 0.9em;
    column-count: 2;
    column-gap: 25px;
}
.explore-list ul li {
    margin-bottom: 6px; 
    -webkit-column-break-inside: avoid;
            page-break-inside: avoid;
                 break-inside: avoid;
}
.explore-list ul li a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}
.explore-list ul li a:hover {
    color: var(--climbout-orange);
    text-decoration: underline;
}

/* Styles responsifs spécifiques à la page */
@media (max-width: 992px) {
    .community-grid {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }
    .community-carousel-container {
        justify-self: center;
        max-width: 280px;
        order: 2;
    }
    .community-text-box { 
        text-align: center; 
        order: 1;
    }
}

@media (max-width: 768px) {
    .hero { padding: 80px 20px; }
    .hero h1 { font-size: 2.5em; text-align: center; }
    .hero .search-bar { width: 95%; margin: 0 auto 15px auto; }
    .hero .search-bar input { flex-grow: 1; width: 100%; border-radius: 50px; }
    .hero .search-bar .btn-search { display: none; }
    .btn-map-hero { padding: 15px 30px; font-size: 1.1em; margin-top: 5%; }
    
    .climbing-sites-section h2,
    .features-text h2,
    .about-section-content h2,
    .cta-box h2,
    .community-text-box h2 {
        font-size: 2.2em;
        text-align: center;
    }
    .features-section .container { flex-direction: column; gap: 40px; }
    .app-carousel-nav { display: none; }
    .features-text { max-width: 100%; text-align: center; }
    .download-buttons { justify-content: center; }
    .app-image-carousel { max-width: 80%; }
    
    .explore-lists-section h2 {
        text-align: center;
    }
    .explore-lists-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .explore-list {
        text-align: center;
        width: 100%;
        max-width: 350px;
    }
    .explore-list h3 {
        text-align: center;
    }
    .explore-list ul {
        column-count: 1;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2em; }
    .climbing-sites-section h2,
    .features-text h2,
    .about-section-content h2,
    .cta-box h2,
    .community-text-box h2 { font-size: 1.8em; }
    .cta-box { padding: 60px 30px; }
}