/* ===================================
   Responsive - Design adaptatif
   =================================== */

/* ========== TABLETTE (max-width: 1024px) ========== */
@media (max-width: 1024px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--color-white);
        flex-direction: column;
        padding: var(--space-3xl) var(--space-xl);
        transition: left var(--transition-base);
        overflow-y: auto;
        box-shadow: var(--shadow-xl);
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: var(--space-xl);
    }

    .nav-link {
        font-size: var(--fs-xl);
        padding: var(--space-sm) 0;
        width: 100%;
        text-align: center;
        color: var(--color-black) !important;
    }
    
    .nav-link:hover {
        color: var(--color-primary) !important;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hero */
    .hero-title {
        font-size: var(--fs-4xl);
    }

    .hero-subtitle {
        font-size: var(--fs-2xl);
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }

    .about-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }

    .about-salon {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2xl);
    }
}

/* ========== MOBILE (max-width: 768px) ========== */
@media (max-width: 768px) {
    /* Tabs layout mobile - centrage */
    .tabs-nav {
        gap: var(--space-sm);
        padding: 0 var(--space-md);
        justify-content: center;
    }
    
    .tabs-content {
        min-height: auto;
    }
    
    /* Correction de la mise en page des massages sur mobile */
    .massage-detail-tab {
        grid-template-columns: 1fr !important;
        gap: var(--space-2xl);
        padding: var(--space-lg);
        text-align: left;
    }
    
    .massage-detail-image-tab {
        transform: rotate(0deg);
        margin: 0 auto var(--space-xl);
        width: 100%;
        max-width: 280px;
        height: auto;
        display: block;
        border-radius: 30px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .massage-detail-info-tab {
        padding: 0 !important;
        text-align: left;
    }
    
    /* Alternative ergonomique pour mobile : layout horizontal compact */
    @media (max-width: 480px) {
        .massage-detail-tab {
            position: relative;
        }
        
        /* Image flottante à gauche, plus petite */
        .massage-detail-image-tab {
            float: left;
            width: 120px;
            height: 120px;
            margin: 0 var(--space-md) var(--space-md) 0;
            border-radius: 20px;
        }
        
        /* Titre et tagline avec l'image */
        .massage-card-title,
        .massage-card-sanskrit,
        .massage-card-tagline {
            text-align: left !important;
            margin-bottom: var(--space-sm);
        }
        
        /* Clear le float pour les sections suivantes */
        .massage-intro,
        .massage-section:first-of-type {
            clear: both;
        }
    }
    
    /* Centrage uniquement pour les titres */
    .massage-card-title,
    .massage-card-sanskrit,
    .massage-card-tagline {
        text-align: center !important;
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Texte aligné à gauche pour une meilleure lisibilité */
    .massage-detail-info-tab p,
    .massage-section p {
        text-align: left !important;
        margin: 0 0 var(--space-md) 0;
    }
    
    /* Sections de massage avec padding ajusté */
    .massage-section {
        margin: var(--space-lg) 0;
        padding: var(--space-md);
        transform: none !important;
    }
    
    .massage-section:hover {
        transform: none !important;
    }
    
    .massage-features {
        justify-content: center;
        margin: var(--space-lg) 0;
    }
    
    .massage-actions {
        flex-direction: column;
        align-items: center;
        margin-top: var(--space-xl);
    }
    
    .massage-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    /* Variables ajustées */
    :root {
        --header-height: var(--header-height-mobile);
        --container-padding: var(--space-md);
    }

    /* Sections */
    section {
        padding: var(--space-3xl) 0;
    }

    /* Typography */
    .section-title {
        font-size: var(--fs-3xl);
    }

    .section-subtitle {
        font-size: var(--fs-xl);
    }

    /* Hero */
    .hero {
        min-height: 500px;
    }

    .hero-main {
        font-size: var(--fs-4xl);
    }

    .hero-description {
        font-size: var(--fs-lg);
    }
    
    /* Bouton scroll hero - Centrage mobile */
    .hero-scroll {
        width: 40px;
        height: 40px;
        bottom: var(--space-lg);
        left: 50%;
        transform: translateX(-50%);
        font-size: var(--fs-md);
        border-width: 1.5px;
    }
    
    .hero-scroll:hover {
        transform: translateX(-50%) translateY(-3px);
    }
    
    /* Override de l'animation pour mobile */
    .hero-scroll {
        /* Forcer l'animation qui préserve le centrage sur mobile */
        animation: gentleBounceHero 2s infinite !important;
    }
    
    /* S'assurer que la vidéo ne déborde pas */
    .hero-bg {
        overflow: hidden;
    }
    
    .hero-video {
        /* Réduire le blur sur mobile pour éviter les débordements */
        filter: blur(4px) brightness(0.7);
    }

    /* Massages Grid */
    .massages-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    /* About */
    .about-title {
        font-size: var(--fs-2xl);
    }

    .about-image-decoration {
        display: none;
    }

    .salon-features {
        gap: var(--space-md);
    }

    /* Contact Form */
    .contact-form {
        padding: var(--space-2xl);
    }

    /* Map */
    .map {
        height: 350px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }

    .footer-socials {
        justify-content: center;
    }

    .newsletter-form {
        max-width: 300px;
        margin: var(--space-lg) auto 0;
    }

    /* Buttons */
    .btn {
        font-size: var(--fs-sm);
        padding: calc(var(--btn-padding-y) * 0.8) calc(var(--btn-padding-x) * 0.8);
    }

    /* Back to top */
    .back-to-top {
        bottom: var(--space-md);
        right: 50%;
        transform: translateX(50%);
        width: 45px;
        height: 45px;
        font-size: var(--fs-base);
    }
    
    .back-to-top:hover {
        transform: translateX(50%) translateY(-5px);
    }
    
    .back-to-top.lotus-style {
        transform: translateX(50%) rotate(45deg);
    }
    
    .back-to-top.lotus-style:hover {
        transform: translateX(50%) rotate(45deg) translateY(-5px);
    }
}

/* ========== PETITS MOBILES (max-width: 480px) ========== */
@media (max-width: 480px) {
    /* Hero */
    .hero {
        min-height: 450px;
    }

    .hero-title {
        margin-bottom: var(--space-lg);
    }

    .hero-main {
        font-size: var(--fs-3xl);
    }

    .hero-subtitle {
        font-size: var(--fs-xl);
    }

    .hero-divider {
        width: 100px;
    }

    /* Section headers */
    .section-header {
        margin-bottom: var(--space-3xl);
    }

    .section-title {
        font-size: var(--fs-2xl);
    }

    .section-subtitle {
        font-size: var(--fs-lg);
    }

    /* Cards */
    .massage-card {
        border-radius: var(--radius-lg);
    }

    .massage-card-content {
        padding: var(--space-lg);
    }
    
    /* Ajustements supplémentaires pour les massages */
    .massage-detail-tab {
        padding: var(--space-md) !important;
        border-radius: var(--radius-lg);
    }
    
    .massage-detail-image-tab {
        width: 100%;
        max-width: 220px;
        margin: 0 auto var(--space-md);
        aspect-ratio: 1;
        object-fit: cover;
    }
    
    .massage-detail-image-tab img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: inherit;
    }
    
    .massage-section {
        padding: var(--space-sm) var(--space-md);
        border-radius: var(--radius-md);
    }
    
    .massage-section h4 {
        font-size: var(--fs-lg);
    }
    
    .massage-intro,
    .massage-section p {
        font-size: var(--fs-base);
        line-height: 1.6;
    }
    
    /* Boutons de massage */
    .tab-button {
        font-size: var(--fs-xs);
        padding: var(--space-xs) var(--space-md);
        border-radius: var(--radius-lg);
    }
    
    .massage-actions .btn {
        font-size: var(--fs-sm);
        padding: var(--space-sm) var(--space-lg);
    }

    /* Modals */
    .modal-content {
        padding: var(--space-2xl);
        margin: var(--space-md);
        width: calc(100% - var(--space-xl));
        max-width: calc(100% - var(--space-xl));
    }
    
    #giftModal .modal-content {
        max-width: calc(100% - var(--space-xl));
    }

    .modal-close {
        width: 35px;
        height: 35px;
        font-size: var(--fs-lg);
    }

    /* Forms */
    .form-group {
        margin-bottom: var(--space-lg);
    }

    /* Footer */
    .footer-bottom {
        font-size: var(--fs-sm);
        padding: var(--space-lg) 0;
    }
}

/* ========== TRÈS PETITS ÉCRANS (max-width: 360px) ========== */
@media (max-width: 360px) {
    /* Typography */
    body {
        font-size: var(--fs-sm);
    }

    /* Buttons */
    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Contact info */
    .contact-item {
        flex-direction: column;
        text-align: center;
    }

    .contact-item i {
        margin: 0 auto var(--space-sm);
    }
}

/* ========== GRAND ÉCRAN (min-width: 1280px) ========== */
@media (min-width: 1280px) {
    /* Container plus large */
    .container {
        max-width: 1280px;
    }

    /* Massages Grid - 3 colonnes */
    .massages-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== TRÈS GRAND ÉCRAN (min-width: 1600px) ========== */
@media (min-width: 1600px) {
    /* Container encore plus large */
    .container {
        max-width: 1400px;
    }

    /* Typography plus grande */
    html {
        font-size: 18px;
    }

    /* Hero plus imposant */
    .hero {
        min-height: 800px;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    /* Masquer les éléments non essentiels */
    .header,
    .hero-video,
    .hero-scroll,
    .back-to-top,
    .nav-toggle,
    .modal,
    .map,
    .footer-socials,
    .newsletter-form {
        display: none !important;
    }

    /* Styles d'impression */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    section {
        page-break-inside: avoid;
        padding: 20px 0;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
}

/* ========== ORIENTATION PAYSAGE MOBILE ========== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }

    .hero-content {
        padding: var(--space-xl) 0;
    }

    .hero-scroll {
        display: none;
    }
}

/* ========== ACCESSIBILITÉ - Motion réduit ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-video {
        display: none;
    }

    .hero-bg {
        background-image: url('../images/hero-static.jpg');
        background-size: cover;
        background-position: center;
    }
    
}

/* ========== DARK MODE (optionnel) ========== */
@media (prefers-color-scheme: dark) {
    /* À implémenter si besoin d'un mode sombre */
}