* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #202020;
}

#Logo {
    color: #0c9143;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
}

/* Barre de recherche */
.search-bar {
    background: #ffffff00;
    padding: 20px;
    border-radius: 0px;
    margin-bottom: 20px;
}

.search-bar form {
    display: flex;
    gap: 10px;
    align-items:center ;
    justify-content: center;
}

.search-bar input {
    flex: 0.5;
    padding: 10px;
    border: 1px solid #0c9143;
    color: white;
    border-radius: 999px;
    font-size: 16px;
    background-color: #0c914300;
}

/* Empêche les sauts */
#resultsGrid {
    min-height: 300px; /* ajuste selon ton contenu */
    position: relative;
}

/* Loader overlay */
.grid-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(3px);
    z-index: 5;
}

/* Spinner */
.grid-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 4px solid #6ea8ff;
    border-top: 4px solid transparent;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 0.8s linear infinite;
    z-index: 6;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

a {
    color: white;
}

.search-bar button {
    padding: 10px 20px;
    background: #0c9143;
    color: white;
    border: none;
    border-radius: 999px;
    cursor: pointer;    
    transition: 1s;
}

.search-bar button:hover {
    background: #14d464;
}

/* Grille des attractions */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: #202020;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #0c9143;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.306);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #333;
}

.card h3 {
    padding: 15px 15px 5px;
    font-size: 18px;
    color: #ffffff;
}

.card p {
    padding: 0 15px 10px;
    color: #ffffff;
    font-size: 14px;
}

.en-service {
    color: #0c9143;
}

.hors-service {
    color: #e74c3c;
}

/* Vue détail plein écran */
.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #202020;
    z-index: 1000;
    overflow-y: auto;
    padding: 40px 20px;
}

.detail-container {
    max-width: 800px;
    margin: 0 auto;
    background: #202020;
}

.back-button {
    display: inline-block;
    margin-bottom: 30px;
    padding: 10px 20px;
    background: #0c9143;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.back-button:hover {
    background: #13c55d;
}

.detail-card h2 {
    color: #0c9143;
    margin-bottom: 20px;
    font-size: 28px;
}

.detail-card h3 {
    margin: 25px 0 15px;
    color: #0c9143;
    font-size: 20px;
    border-bottom: 2px solid #0c9143;
    padding-bottom: 5px;
}

.detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.detail-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    gap: 10px;
}

.detail-label {
    font-weight: bold;
    color: #ffffff;
}

.description-box {
    color: #ffffff  !important;
    line-height: 1.6;
    padding: 15px;
    background: rgba(255, 255, 255, 0);
    border-radius: 8px;
    border: none;
    margin-top: 10px;
}

.detail-value {
    color: #ffffff;
    text-align: right;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-top: 10px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.no-result {
    text-align: center;
    padding: 50px;
    color: #ffffff;
    grid-column: 1/-1;
}

.admin-link {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    background: white;
    border-radius: 10px;
}

.admin-link a {
    color: #3498db;
    text-decoration: none;
}

/* Cacher la page normale quand détail est ouvert */
.main-content.hidden {
    display: none;
}

/* =========================
   SCROLLBAR CUSTOM (INVISIBLE)
========================= */

/* Chrome / Edge / Safari */
::-webkit-scrollbar {
    width: 0px;
    height: 0px;
}

/* Firefox */
* {
    scrollbar-width: none; /* cache la scrollbar */
}

/* IE (au cas où) */
body {
    -ms-overflow-style: none;
}

/* Enlever contour focus */
.search-bar input:focus {
    outline: none;
    box-shadow: none;
}

/* Enlever highlight bleu mobile */
* {
    -webkit-tap-highlight-color: transparent;
}

button:focus,
a:focus {
    outline: none;
    box-shadow: none;
}

/* =========================
   FIX GRID + CARD STABLE + NO JUMP
========================= */

/* Empêche les sauts de grille */
#resultsGrid {
    min-height: 600px;
    position: relative;
}

/* Cards stables */
.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 260px;
    will-change: transform;
}

/* Image avec taille fixe (CRUCIAL) */
.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #333;
}

/* Texte bien réparti */
.card h3 {
    flex-grow: 1;
}

/* Anti décalage global */
.grid {
    align-items: start;
}

/* =========================
   NO RESULT STYLE
========================= */

.no-result {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.no-result-box {
    text-align: center;
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #0c914300;
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.4s ease;
    transition: 0.3s;
}

/* Icône */
.no-result-box i {
    font-size: 45px;
    color: #0c9143;
    margin-bottom: 15px;
    animation: pulse 1.5s infinite;
}

.no-result-box h2 {
    color: white;
    margin-bottom: 10px;
}

.no-result-box p {
    color: #aaa;
    font-size: 14px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   RESPONSIVE MOBILE ULTRA PRO
========================= */

@media (max-width: 768px) {

    /* Container */
    .container {
        padding: 15px 10px;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    /* 🔍 SEARCH BAR MOBILE */
    .search-bar {
        padding: 10px;
    }

    .search-bar form {
        gap: 8px;
    }

    .search-bar input {
        flex: 1;
        font-size: 14px;
        padding: 12px 15px;
    }

    .search-bar button {
        padding: 12px;
        border-radius: 50%;
        aspect-ratio: 1/1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 🔥 GRID MOBILE (2 cards clean) */
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* 🔥 CARDS MOBILE */
    .card {
        height: 200px;
        border-radius: 12px;
    }

    .card img {
        height: 120px;
    }

    .card h3 {
        font-size: 14px;
        padding: 10px 10px 3px;
    }

    .card p {
        font-size: 12px;
        padding: 0 10px 8px;
        opacity: 0.8;
    }

    /* 🔥 DETAIL PAGE MOBILE */
    .detail-overlay {
        padding: 20px 10px;
    }

    .detail-container {
        max-width: 100%;
    }

    .detail-card h2 {
        font-size: 22px;
    }

    .detail-card h3 {
        font-size: 16px;
    }

    .detail-image {
        max-height: 250px;
    }

    /* 🔥 STACK INFOS (plus lisible mobile) */
    .detail-row {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 5px;
    }

    .detail-label {
        font-size: 13px;
        opacity: 0.7;
    }

    .detail-value {
        text-align: left;
        font-size: 14px;
    }

    /* 🔥 BUTTON BACK */
    .back-button {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: 14px;
    }

    /* 🔥 NO RESULT */
    .no-result-box {
        padding: 25px;
    }

    .no-result-box i {
        font-size: 35px;
    }

    .no-result-box h2 {
        font-size: 18px;
    }

    .no-result-box p {
        font-size: 13px;
    }

    /* 🔥 ADMIN LINK */
    .admin-link {
        font-size: 14px;
        padding: 10px;
    }
}