/* Styles pour page_fiche_ville_details.php */
/* Affichage des gîtes, hôtels et restaurants à proximité */

/* Section titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.section-title i.material-icons {
    font-size: 1.8rem;
}

/* Section gîtes */
.ville-gites-section .section-title {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
}

.ville-gites-proximite-section .section-title {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
}

/* Section hôtels */
.ville-hotels-section .section-title {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.ville-hotels-proximite-section .section-title {
    background: linear-gradient(135deg, #42a5f5 0%, #1976d2 100%);
}

/* Section restaurants */
.ville-restaurants-section .section-title {
    background: linear-gradient(135deg, #e65100 0%, #bf360c 100%);
}

.ville-restaurants-proximite-section .section-title {
    background: linear-gradient(135deg, #ff9800 0%, #e65100 100%);
}

/* Badge de distance */
.distance-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(33, 150, 243, 0.9);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 500;
}

.distance-badge i.material-icons {
    font-size: 14px;
}

.row.flex_row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.row.flex_row > .col {
    min-width: 0;
    flex: 0 0 auto;
}

.row.flex_row > .col.s12 {
    flex-basis: 100%;
    max-width: 100%;
}

@media only screen and (min-width: 601px) {
    .row.flex_row > .col.m6 {
        flex-basis: 50%;
        max-width: 50%;
    }
}

@media only screen and (min-width: 993px) {
    .row.flex_row > .col.l4 {
        flex-basis: 33.333333%;
        max-width: 33.333333%;
    }
}

.card.cardatf,
.card.cardatf .card-content,
.card.cardatf .card-reveal,
.card.cardatf .card-title {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

/* Cards hébergement - taille fixe comme campings */
.ville-gites-section .card.cardatf,
.ville-gites-proximite-section .card.cardatf,
.ville-hotels-section .card.cardatf,
.ville-hotels-proximite-section .card.cardatf,
.ville-restaurants-section .card.cardatf,
.ville-restaurants-proximite-section .card.cardatf {
    height: 100%;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ville-gites-section .card.cardatf:hover,
.ville-gites-proximite-section .card.cardatf:hover,
.ville-hotels-section .card.cardatf:hover,
.ville-hotels-proximite-section .card.cardatf:hover,
.ville-restaurants-section .card.cardatf:hover,
.ville-restaurants-proximite-section .card.cardatf:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Images dans les cards - taille fixe */
.ville-gites-section .card.cardatf .card-image,
.ville-gites-proximite-section .card.cardatf .card-image,
.ville-hotels-section .card.cardatf .card-image,
.ville-hotels-proximite-section .card.cardatf .card-image,
.ville-restaurants-section .card.cardatf .card-image,
.ville-restaurants-proximite-section .card.cardatf .card-image {
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.ville-gites-section .card.cardatf .card-image img,
.ville-gites-proximite-section .card.cardatf .card-image img,
.ville-hotels-section .card.cardatf .card-image img,
.ville-hotels-proximite-section .card.cardatf .card-image img,
.ville-restaurants-section .card.cardatf .card-image img,
.ville-restaurants-proximite-section .card.cardatf .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ville-gites-section .card.cardatf:hover .card-image img,
.ville-gites-proximite-section .card.cardatf:hover .card-image img,
.ville-hotels-section .card.cardatf:hover .card-image img,
.ville-hotels-proximite-section .card.cardatf:hover .card-image img,
.ville-restaurants-section .card.cardatf:hover .card-image img,
.ville-restaurants-proximite-section .card.cardatf:hover .card-image img {
    transform: scale(1.05);
}

/* Card content - flex grow */
.ville-gites-section .card.cardatf .card-content,
.ville-gites-proximite-section .card.cardatf .card-content,
.ville-hotels-section .card.cardatf .card-content,
.ville-hotels-proximite-section .card.cardatf .card-content,
.ville-restaurants-section .card.cardatf .card-content,
.ville-restaurants-proximite-section .card.cardatf .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Card title - limiter le texte */
.ville-gites-section .card.cardatf .card-title,
.ville-gites-proximite-section .card.cardatf .card-title,
.ville-hotels-section .card.cardatf .card-title,
.ville-hotels-proximite-section .card.cardatf .card-title,
.ville-restaurants-section .card.cardatf .card-title,
.ville-restaurants-proximite-section .card.cardatf .card-title {
    font-size: 1rem;
    line-height: 1.3;
    max-height: 3.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Conteneur flex pour les rows */
.row.ville-gites-section,
.row.ville-gites-proximite-section,
.row.ville-hotels-section,
.row.ville-hotels-proximite-section,
.row.ville-restaurants-section,
.row.ville-restaurants-proximite-section {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

/* Colonnes avec même hauteur */
.ville-gites-section > .col,
.ville-gites-proximite-section > .col,
.ville-hotels-section > .col,
.ville-hotels-proximite-section > .col,
.ville-restaurants-section > .col,
.ville-restaurants-proximite-section > .col {
    display: flex;
    flex-direction: column;
}

/* Badge cuisine pour restaurants */
.badge-cuisine {
    display: inline-block;
    background: #ff5722;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 5px;
    vertical-align: middle;
}

/* Message vide */
.empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #757575;
}

.empty-message i.material-icons {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
    color: #bdbdbd;
}

/* Responsive - Mobile */
@media only screen and (max-width: 600px) {
    .section-title {
        font-size: 1.2rem;
        padding: 12px 15px;
    }

    .section-title i.material-icons {
        font-size: 1.5rem;
    }

    .ville-gites-section .card.cardatf,
    .ville-gites-proximite-section .card.cardatf,
    .ville-hotels-section .card.cardatf,
    .ville-hotels-proximite-section .card.cardatf,
    .ville-restaurants-section .card.cardatf,
    .ville-restaurants-proximite-section .card.cardatf {
        min-height: 320px;
    }

    .ville-gites-section .card.cardatf .card-image,
    .ville-gites-proximite-section .card.cardatf .card-image,
    .ville-hotels-section .card.cardatf .card-image,
    .ville-hotels-proximite-section .card.cardatf .card-image,
    .ville-restaurants-section .card.cardatf .card-image,
    .ville-restaurants-proximite-section .card.cardatf .card-image {
        height: 150px;
    }

    .distance-badge {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
}

/* Responsive - Tablet */
@media only screen and (min-width: 601px) and (max-width: 992px) {
    .section-title {
        font-size: 1.3rem;
    }

    .ville-gites-section .card.cardatf,
    .ville-gites-proximite-section .card.cardatf,
    .ville-hotels-section .card.cardatf,
    .ville-hotels-proximite-section .card.cardatf,
    .ville-restaurants-section .card.cardatf,
    .ville-restaurants-proximite-section .card.cardatf {
        min-height: 350px;
    }

    .ville-gites-section .card.cardatf .card-image,
    .ville-gites-proximite-section .card.cardatf .card-image,
    .ville-hotels-section .card.cardatf .card-image,
    .ville-hotels-proximite-section .card.cardatf .card-image,
    .ville-restaurants-section .card.cardatf .card-image,
    .ville-restaurants-proximite-section .card.cardatf .card-image {
        height: 180px;
    }
}

/* Style pour le nombre d'étoiles (hôtels) */
.card.cardatf .card-content .card-title sup.red-text {
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* Style pour les épis (gîtes) */
.atfsmalltitre .nowrap img {
    margin-right: 2px;
}

/* Animation d'apparition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ville-gites-section .col,
.ville-gites-proximite-section .col,
.ville-hotels-section .col,
.ville-hotels-proximite-section .col,
.ville-restaurants-section .col,
.ville-restaurants-proximite-section .col {
    animation: fadeInUp 0.5s ease forwards;
}

.ville-gites-section .col:nth-child(2) { animation-delay: 0.1s; }
.ville-gites-section .col:nth-child(3) { animation-delay: 0.2s; }
.ville-gites-section .col:nth-child(4) { animation-delay: 0.3s; }
.ville-gites-section .col:nth-child(5) { animation-delay: 0.4s; }
.ville-gites-section .col:nth-child(6) { animation-delay: 0.5s; }

.ville-hotels-section .col:nth-child(2) { animation-delay: 0.1s; }
.ville-hotels-section .col:nth-child(3) { animation-delay: 0.2s; }
.ville-hotels-section .col:nth-child(4) { animation-delay: 0.3s; }
.ville-hotels-section .col:nth-child(5) { animation-delay: 0.4s; }
.ville-hotels-section .col:nth-child(6) { animation-delay: 0.5s; }

.ville-restaurants-section .col:nth-child(2) { animation-delay: 0.1s; }
.ville-restaurants-section .col:nth-child(3) { animation-delay: 0.2s; }
.ville-restaurants-section .col:nth-child(4) { animation-delay: 0.3s; }
.ville-restaurants-section .col:nth-child(5) { animation-delay: 0.4s; }
.ville-restaurants-section .col:nth-child(6) { animation-delay: 0.5s; }

