/* =========================================================
   GLOBAL
========================================================= */

body {
    background-color: rgb(45, 47, 48);
}

/* La hauteur est pilotée par le HTML (section + h-100)
   PAS ici */
section {
    height: 90vh;
}

/* Décalage de la search au-dessus du header */
.search-container {
    margin-top: -80px;
}

/* =========================================================
   EXPLORER (bloc carte texte)
========================================================= */

.explorer {
    padding: 20px;
    background-color: rgb(170, 170, 150);
    border-radius: 10px;
    margin-bottom: 30px;
}

/* =========================================================
   GRID DES CARDS
========================================================= */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 colonnes */

    width: 100%;
    height: 100%;           
    overflow: hidden;       
    box-sizing: border-box;
}

/* Limiter à 6 cards */
.cards-grid > .card-scroll-item:nth-child(n+7) {
    display: none;
}

/* =========================================================
   ITEM
========================================================= */

.card-scroll-item {
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

/* =========================================================
   CARD
========================================================= */

.hotel-card {
    height: 100%;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

/* ===== BADGES (étoiles + prix) ===== */
.hotel-badge {
    position: absolute;
    z-index: 5;
    top: 12px;               /* toujours au-dessus */
}

/* sécurisation des couches */
.hotel-img {
    position: relative;
    z-index: 1;
}

.hotel-overlay {
    z-index: 2;
}   

/* =========================================================
   IMAGE
========================================================= */

.hotel-image-wrapper {
    position: relative;
    height: 100%;
}

.hotel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* =========================================================
   OVERLAY
========================================================= */

.hotel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-content {
    color: #fff;
    padding: 1.5rem;
    width: 100%;
}

/* Hover */
.hotel-image-wrapper:hover .hotel-overlay {
    opacity: 1;
}

.hotel-image-wrapper:hover .hotel-img {
    transform: scale(1.05);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 992px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr); /* tablette */
    }
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr; /* mobile */
        height: auto;
    }

    /* Overlay toujours visible sur mobile */
    .hotel-overlay {
        opacity: 1;
    }
}
