/* Optimisations mobiles */
@media (max-width: 768px) {
    /* Safe areas pour les écrans avec encoche (iPhone X+) */
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    /* Réduction de la taille des polices */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2;
        word-break: break-word;
    }

    h2 {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }

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

    /* Ajustement des espacements */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    /* Header mobile amélioré */
    .header-nav {
        padding: 0.75rem 0;
        padding-top: calc(0.75rem + env(safe-area-inset-top));
    }

    .header-nav .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Optimisation des cartes */
    .zone-card {
        height: 250px !important;
        margin-bottom: 1rem;
        border-radius: 0.75rem;
        background-position: center;
        background-size: cover;
    }

    .pricing-card {
        padding: 1.5rem !important;
        margin-bottom: 1rem;
    }

    /* Menu mobile - safe areas */
    #mobile-menu {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* Bouton fermer le menu */
    #mobile-menu-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 50%;
        border: none;
        color: #ffffff;
        cursor: pointer;
        font-size: 1.5rem;
    }

    /* Formulaire de contact */
    .contact-form input,
    .contact-form textarea,
    input, textarea, select {
        font-size: 16px !important; /* Évite le zoom automatique sur iOS */
        padding: 0.875rem;
        border-radius: 0.5rem;
    }

    /* Optimisation des boutons */
    button, 
    .btn,
    [data-reservation] {
        padding: 0.875rem 1.5rem;
        min-height: 48px; /* Pour une meilleure accessibilité tactile */
        font-size: 1rem;
        border-radius: 0.5rem;
        -webkit-tap-highlight-color: transparent;
    }

    button:active,
    .btn:active,
    [data-reservation]:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    /* Amélioration de la navigation tactile */
    nav a {
        padding: 0.75rem;
        min-width: 44px;
        min-height: 44px;
    }

    /* Hero section mobile */
    .hero-section {
        min-height: calc(100vh - env(safe-area-inset-top));
        min-height: 100svh; /* Small viewport height pour mobile */
        padding-top: calc(80px + env(safe-area-inset-top));
        background-position: center 25%;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-content h1 {
        font-size: 2.25rem !important;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }

    /* Note: .zone-card styles fusionnés avec le sélecteur principal ligne 47 */

    /* Réduction des animations pour la performance */
    .animate {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }

    /* Amélioration de la lisibilité */
    p {
        font-size: 1rem !important;
        line-height: 1.7;
    }

    /* Optimisation du formulaire de réservation */
    .modal-content,
    #reservation-modal > div {
        width: 95%;
        max-width: 400px;
        max-height: calc(100vh - 2rem);
        max-height: calc(100svh - 2rem);
        overflow-y: auto;
        margin: 1rem auto;
        padding: 1.5rem;
        border-radius: 1rem;
    }

    /* Grilles responsives */
    .grid {
        gap: 1rem !important;
    }

    [class*="grid-cols-"] {
        grid-template-columns: 1fr !important;
    }

    /* Footer mobile */
    footer {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }

    footer .grid {
        text-align: center;
    }

    /* Scroll smooth désactivé sur mobile pour performance */
    html {
        scroll-behavior: auto;
    }

    /* Images lazy loading placeholder */
    img[loading="lazy"] {
        background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
        background-size: 200% 100%;
    }

    /* Prix responsive */
    .pricing-price {
        font-size: 2.5rem !important;
    }

    /* Espacement sections */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Optimisations pour les petits écrans */
@media (max-width: 360px) {
    h1 {
        font-size: 2rem !important;
    }

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

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Optimisations pour économiser la batterie */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Optimisations pour le mode sombre du système */
@media (prefers-color-scheme: dark) {
    .bg-gray-900 {
        background-color: #0D0D0D !important;
    }
}
