/* ============================================
   CORRECTIONS AFFICHAGE MOBILE
   ============================================ */

/* Top Bar Mobile - Bandeau vert */
@media (max-width: 992px) {
    .top-bar {
        padding: 10px 0;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .top-bar-left {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        align-items: flex-start;
    }
    
    .top-bar-left a,
    .top-bar-left span {
        font-size: 12px;
        word-break: break-word;
        width: 100%;
    }
    
    .top-bar-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .social-icons {
        gap: 8px;
    }
    
    .social-icons a {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/* Header Mobile - Logo et Menu */
@media (max-width: 992px) {
    .main-header {
        position: relative;
        z-index: 1000;
    }
    
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 0;
        position: relative;
    }
    
    .header-logo {
        max-width: 150px;
        z-index: 1001;
        position: relative;
    }
    
    .header-logo img {
        max-height: 50px;
        width: auto;
    }
    
    /* Cacher la navigation principale en mobile */
    .header-nav {
        display: none !important;
    }
    
    /* Garder les boutons visibles mais ajuster leur style */
    .header-buttons {
        display: flex !important;
        gap: 10px;
        align-items: center;
    }
    
    .header-buttons .btn {
        font-size: 12px;
        padding: 10px 15px;
        white-space: nowrap;
    }
    
    .header-buttons .btn i {
        display: none;
    }
    
    .header-buttons .btn span {
        font-size: 12px;
    }
    
    /* Afficher le bouton hamburger */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 1001;
        position: relative;
        background: #30D54A !important;
        color: white !important;
        border: none;
        min-width: 45px !important;
        min-height: 45px !important;
        padding: 12px 18px;
        border-radius: 10px;
        cursor: pointer;
        font-size: 20px;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }
    
    .mobile-menu-toggle i {
        color: white !important;
        font-size: 20px !important;
    }
    
    .mobile-menu-toggle:hover {
        transform: scale(1.1);
        background: #FF0080 !important;
        color: #ffffff !important;
    }
    
    /* Menu mobile en sidebar */
    .header-nav.active {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: #000000;
        padding: 80px 20px 20px;
        z-index: 999;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
        animation: slideInLeft 0.3s ease;
    }
    
    @keyframes slideInLeft {
        from {
            transform: translateX(-100%);
        }
        to {
            transform: translateX(0);
        }
    }
    
    .header-nav.active .main-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .header-nav.active .main-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .header-nav.active .main-menu > li > a {
        display: block;
        padding: 15px 10px;
        color: #ffffff;
        text-align: left;
    }
    
    .header-nav.active .main-menu > li > a:hover {
        background: rgba(48,213,74,0.1);
        color: #30D54A;
    }
    
    /* Sous-menus en mobile */
    .header-nav.active .dropdown-menu {
        position: static;
        display: none;
        background: rgba(255,255,255,0.05);
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
    
    .header-nav.active .has-dropdown.open .dropdown-menu {
        display: block;
    }
    
    .header-nav.active .dropdown-menu li a {
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* Overlay pour le menu mobile */
@media (max-width: 992px) {
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }
}

/* Textes du bandeau vert - Empêcher l'étirement */
@media (max-width: 768px) {
    .top-bar-left a,
    .top-bar-left span {
        font-size: 11px;
        line-height: 1.4;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .top-bar-left i {
        font-size: 12px;
        flex-shrink: 0;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .top-bar {
        padding: 8px 0;
    }
    
    .top-bar-left a,
    .top-bar-left span {
        font-size: 10px;
    }
    
    .header-logo {
        max-width: 100px;
    }
    
    .header-logo img {
        max-height: 35px;
    }
    
    .header-buttons .btn {
        font-size: 10px;
        padding: 8px 12px;
    }
    
    .mobile-menu-toggle {
        padding: 10px 14px;
        font-size: 18px;
    }
    
    .social-icons a {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}

/* ============================================
   OPTIMISATIONS MOBILE GLOBALES
   ============================================ */

/* Sections - padding réduit sur mobile */
@media (max-width: 768px) {
    section {
        padding: 40px 0 !important;
    }
    
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Titres de section */
    .section-header h2 {
        font-size: 1.8rem !important;
    }
    
    /* Hero slider */
    .hero-section {
        min-height: 500px !important;
    }
    
    .hero-text h1 {
        font-size: 2rem !important;
    }
    
    .hero-text p {
        font-size: 1rem !important;
    }
    
    /* Property cards grid */
    .properties-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Services 360 grid */
    .services-360-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Team grid */
    .team-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Page banner */
    .page-banner {
        min-height: 250px !important;
    }
    
    .page-banner h1 {
        font-size: 2rem !important;
    }
    
    /* Footer */
    .footer-main {
        padding: 40px 0 !important;
    }
    
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    /* Formulaires */
    .search-form-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* Boutons */
    .btn {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
    
    /* Property card */
    .property-card {
        margin-bottom: 20px;
    }
    
    .property-title {
        font-size: 1.1rem !important;
    }
    
    /* Page Contact */
    .contact-info-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Pagination */
    .page-numbers {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .page-numbers a,
    .page-numbers span {
        min-width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.5rem !important;
    }
    
    .hero-section {
        min-height: 400px !important;
    }
    
    .hero-text h1 {
        font-size: 1.5rem !important;
    }
    
    .page-banner {
        min-height: 200px !important;
    }
    
    .page-banner h1 {
        font-size: 1.5rem !important;
    }
    
    /* Menu hamburger - forcer l'affichage sur petits écrans */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 45px !important;
        height: 45px !important;
        padding: 0 !important;
        font-size: 20px !important;
        background: #30D54A !important;
        color: white !important;
        border: none !important;
        border-radius: 5px !important;
        cursor: pointer !important;
        z-index: 1001 !important;
        position: relative !important;
    }
    
    .mobile-menu-toggle i {
        font-size: 20px !important;
        color: white !important;
    }
}

/* Page Contact - optimisation mobile */
@media (max-width: 768px) {
    /* Grid 2 colonnes -> 1 colonne */
    .page-template-page-contact section > div > div > div[style*="grid-template-columns"] {
        display: block !important;
    }
    
    .page-template-page-contact section > div > div > div > div {
        margin-bottom: 30px !important;
    }
    
    /* Réduire le padding des cartes */
    .page-template-page-contact section > div > div > div > div[style*="padding: 40px"] {
        padding: 25px !important;
    }
    
    /* Titres plus petits */
    .page-template-page-contact h3 {
        font-size: 22px !important;
    }
}
