/* ====================================
   OPTIMISATIONS MOBILE - INDEX.HTML
   ==================================== */

/* Variables pour mobile */
:root {
    --mobile-padding: 1rem;
    --mobile-margin: 1rem;
    --card-spacing: 1.5rem;
}

/* ===== HEADER & NAVIGATION MOBILE ===== */
@media (max-width: 768px) {
    /* Header responsive */
    .container-fluid.bg-dark {
        padding: 0 !important;
    }

    /* Logo mobile - centré et plus petit */
    .navbar-brand img {
        width: 100px !important;
        height: 65px !important;
    }

    /* Navigation mobile plus compacte */
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.98);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 8px;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
        border-radius: 6px;
        transition: all 0.3s;
    }

    .navbar-nav .nav-link:hover {
        background: rgba(0, 102, 153, 0.2);
        padding-left: 1.5rem !important;
    }

    /* Bouton menu hamburger stylisé */
    .navbar-toggler {
        border: 2px solid #006699;
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(0, 102, 153, 0.25);
    }
}

/* ===== CAROUSEL / SLIDER HERO ===== */
@media (max-width: 768px) {
    .carousel-item {
        min-height: 400px !important;
    }

    .carousel-caption h1 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
    }

    .carousel-caption p {
        font-size: 0.95rem !important;
        margin-bottom: 1rem !important;
    }

    .carousel-caption .btn {
        padding: 0.5rem 1.2rem !important;
        font-size: 0.85rem !important;
    }

    /* Meilleur espacement des indicateurs */
    .carousel-indicators {
        margin-bottom: 1rem;
    }

    .carousel-indicators button {
        width: 10px !important;
        height: 10px !important;
        border-radius: 50%;
        margin: 0 5px;
    }
}

/* ===== FORMULAIRE DE RECHERCHE ===== */
@media (max-width: 768px) {
    /* Formulaire de recherche en colonne sur mobile */
    .booking-form {
        padding: 1.5rem !important;
        border-radius: 15px;
        margin: 0 1rem;
    }

    .booking-form .row {
        margin: 0 !important;
    }

    .booking-form .col-md-3,
    .booking-form .col-md-2 {
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 1rem;
    }

    .booking-form select,
    .booking-form input,
    .booking-form .date {
        width: 100% !important;
        padding: 0.75rem !important;
        font-size: 1rem;
        border-radius: 8px;
    }

    .booking-form button {
        width: 100% !important;
        padding: 0.875rem !important;
        font-size: 1.1rem !important;
        border-radius: 8px;
        margin-top: 0.5rem;
    }
}

/* ===== CARTES D'HÉBERGEMENT (Hôtels & Appartements) ===== */
@media (max-width: 768px) {
    /* Container principal */
    #hotel-container,
    #apartment-container {
        padding: 0 var(--mobile-padding) !important;
    }

    /* Colonnes - Une carte par ligne sur mobile */
    #hotel-container .col-lg-4,
    #apartment-container .col-lg-4,
    .hotel-container .col-lg-4 {
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: var(--card-spacing);
    }

    /* Cartes optimisées pour mobile */
    .property-item,
    .hotel-card,
    .apartment-card {
        border-radius: 12px;
        margin: 0 auto;
        max-width: 100%;
    }

    /* Images des cartes */
    .property-item .overflow-hidden,
    .hotel-card .image-container,
    .apartment-card .image-container {
        height: 220px !important;
        border-radius: 12px 12px 0 0;
    }

    .property-item img,
    .hotel-card img,
    .apartment-card img {
        height: 220px !important;
        object-fit: cover;
    }

    /* Contenu des cartes */
    .property-item .p-4,
    .hotel-card .card-body,
    .apartment-card .card-body {
        padding: 1.25rem !important;
    }

    /* Titres des cartes */
    .property-item h5,
    .hotel-card h5,
    .apartment-card h5 {
        font-size: 1.15rem !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.4;
    }

    /* Prix sur mobile */
    .property-item .price,
    .hotel-card .price,
    .apartment-card .price {
        font-size: 1.3rem !important;
        font-weight: 700;
        color: #006699;
    }

    /* Badges et icônes */
    .property-item .badge,
    .hotel-card .badge,
    .apartment-card .badge {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.65rem !important;
    }

    /* Boutons des cartes */
    .property-item .btn,
    .hotel-card .btn,
    .apartment-card .btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.9rem !important;
        width: 100%;
        margin-top: 0.5rem;
    }

    /* Features/Caractéristiques */
    .property-item .features,
    .hotel-card .features,
    .apartment-card .features {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin: 0.75rem 0;
    }

    .property-item .features .badge,
    .hotel-card .features .badge,
    .apartment-card .features .badge {
        font-size: 0.7rem !important;
    }
}

/* ===== TITRES DE SECTIONS ===== */
@media (max-width: 768px) {
    .section-title,
    .text-center h1,
    .text-center h2 {
        font-size: 1.75rem !important;
        margin-bottom: 1.5rem !important;
        padding: 0 1rem;
    }

    .section-title.position-relative {
        padding-bottom: 1rem !important;
    }

    /* Sous-titres */
    h6.text-primary {
        font-size: 0.95rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* Descriptions */
    .text-center p {
        font-size: 0.95rem !important;
        padding: 0 1rem;
        line-height: 1.6;
    }
}

/* ===== SERVICES / FEATURES ===== */
@media (max-width: 768px) {
    .service-item {
        padding: 1.5rem 1rem !important;
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .service-item i {
        font-size: 2.5rem !important;
        margin-bottom: 1rem !important;
    }

    .service-item h5 {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
    }

    .service-item p {
        font-size: 0.9rem !important;
        line-height: 1.5;
    }
}

/* ===== TÉMOIGNAGES / REVIEWS ===== */
@media (max-width: 768px) {
    .testimonial-card-modern {
        padding: 1.25rem !important;
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .testimonial-header {
        margin-bottom: 1rem !important;
    }

    .testimonial-avatar {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.25rem !important;
    }

    .testimonial-name {
        font-size: 1rem !important;
    }

    .testimonial-role {
        font-size: 0.85rem !important;
    }

    .testimonial-text {
        font-size: 0.9rem !important;
        line-height: 1.6;
    }

    .rating-stars {
        font-size: 0.9rem !important;
    }
}

/* ===== FOOTER ===== */
@media (max-width: 768px) {
    .footer-modern {
        padding: 2rem 0 !important;
    }

    .footer-content {
        padding: 1.5rem 0 !important;
    }

    /* Sections du footer */
    .footer-about,
    .footer-links,
    .footer-contact {
        text-align: center;
        margin-bottom: 2rem;
    }

    .footer-logo {
        display: inline-block;
        margin: 0 auto 1rem;
    }

    .footer-logo img {
        width: 110px !important;
        height: 75px !important;
    }

    .footer-description {
        font-size: 0.9rem !important;
        text-align: center !important;
        padding: 0 1rem;
    }

    /* Liens du footer */
    .footer-links ul {
        text-align: center;
    }

    .footer-links li {
        margin-bottom: 0.5rem;
    }

    /* Réseaux sociaux centrés */
    .footer-social {
        justify-content: center !important;
        margin-top: 1rem;
    }

    .social-link {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.2rem !important;
    }

    /* Contact footer */
    .contact-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1rem !important;
    }

    .contact-icon {
        margin: 0 auto 0.5rem !important;
    }

    /* Footer bottom */
    .footer-bottom {
        padding: 1rem 0 !important;
    }

    .footer-bottom .col-md-6 {
        text-align: center !important;
        margin-bottom: 0.5rem;
    }

    .footer-bottom p {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
    }
}

/* ===== BOUTON RETOUR EN HAUT ===== */
@media (max-width: 768px) {
    .back-to-top {
        width: 45px !important;
        height: 45px !important;
        bottom: 20px !important;
        right: 20px !important;
        font-size: 1.2rem !important;
    }
}

/* ===== SPINNER / LOADER ===== */
@media (max-width: 768px) {
    #spinner .spinner-border {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
}

/* ===== FILTRES & BOUTONS ===== */
@media (max-width: 768px) {
    /* Groupe de filtres */
    .filter-buttons,
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        padding: 0 var(--mobile-padding);
    }

    .filter-buttons .btn,
    .btn-group .btn {
        width: 100% !important;
        margin: 0 !important;
        border-radius: 8px !important;
    }
}

/* ===== ESPACEMENT GÉNÉRAL MOBILE ===== */
@media (max-width: 768px) {
    /* Containers */
    .container-xxl,
    .container-xl,
    .container {
        padding-left: var(--mobile-padding) !important;
        padding-right: var(--mobile-padding) !important;
    }

    /* Sections */
    section {
        padding: 2rem 0 !important;
    }

    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }

    /* Rows */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .row > * {
        padding-left: calc(var(--mobile-padding) / 2) !important;
        padding-right: calc(var(--mobile-padding) / 2) !important;
    }
}

/* ===== ANIMATIONS OPTIMISÉES MOBILE ===== */
@media (max-width: 768px) {
    /* Désactiver certaines animations pour de meilleures performances */
    .wow {
        animation: none !important;
        visibility: visible !important;
    }

    /* Transitions rapides */
    * {
        transition-duration: 0.2s !important;
    }
}

/* ===== TYPOGRAPHIE MOBILE ===== */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        line-height: 1.6;
    }

    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    h4 {
        font-size: 1.1rem !important;
    }

    h5 {
        font-size: 1rem !important;
    }

    h6 {
        font-size: 0.9rem !important;
    }

    p {
        font-size: 0.95rem !important;
    }

    .small,
    small {
        font-size: 0.85rem !important;
    }
}

/* ===== OPTIMISATIONS POUR TRÈS PETITS ÉCRANS (< 400px) ===== */
@media (max-width: 400px) {
    :root {
        --mobile-padding: 0.75rem;
        --card-spacing: 1rem;
    }

    .property-item .overflow-hidden,
    .hotel-card .image-container,
    .apartment-card .image-container {
        height: 200px !important;
    }

    .carousel-item {
        min-height: 350px !important;
    }

    .carousel-caption h1 {
        font-size: 1.5rem !important;
    }
}

/* ===== AMÉLIORATIONS TACTILES ===== */
@media (hover: none) and (pointer: coarse) {
    /* Augmenter la zone tactile des boutons et liens */
    .btn,
    a,
    button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Retirer les effets hover sur mobile */
    .property-item:hover,
    .hotel-card:hover,
    .apartment-card:hover {
        transform: none;
    }

    /* Améliorer le feedback tactile */
    .btn:active,
    a:active,
    button:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
}
