/* ===== RESPONSIVE STYLES - COMPLETE ===== */

/* ========== LARGE SCREENS (1400px+) ========== */
@media (min-width: 1400px) {
    .container-main {
        max-width: 1320px;
    }
}

/* ========== EXTRA LARGE SCREENS (1700px+) - Restore full image ========== */
@media (min-width: 1701px) {
    /* Hero Section - Full image visibility for large screens */
    .hero-background {
        width: 68%; /* Retour à la largeur originale */
        clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%); /* Clip original */
    }
    .hero-content-wrapper {
        width: 38%; /* Retour à la largeur originale */
        padding: 60px 40px;
    }
}

/* ========== DESKTOP (1200px - 1399px) ========== */
@media (max-width: 1399px) {
    .container-main {
        max-width: 1140px;
        padding: 0 30px;
    }
}

/* ========== ANCIEN BREAKPOINT 1200px SUPPRIMÉ - CONFLIT AVEC LES PALIERS ========== */

/* ========== PETITS ÉCRANS (769px - 1399px) - Layout mobile ========== */
@media (min-width: 769px) and (max-width: 1399px) {
    /* Layout mobile : logo fixe en haut, image, puis texte */
    .hero-glassmorphism {
        flex-direction: column;
        padding-top: 0;
        min-height: auto;
    }

    .hero-logo-box {
        position: fixed;
        top: 5px;
        left: 0;
        right: 0;
        z-index: 1000;
        padding: 15px 25px;
        height: 75px;
        background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
        border-radius: 0;
        border: none;
        border-bottom: 2px solid rgba(255, 215, 0, 0.2);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        display: flex;
        justify-content: center;
        align-items: center;
        backdrop-filter: blur(10px);
        box-sizing: border-box;
    }

    .hero-background {
        position: relative;
        width: 100%;
        height: 50vh;
        min-height: 400px;
        clip-path: none;
        order: 1;
        margin-top: 80px;
    }

    .hero-background img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
    }

    .hero-content-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 50px 30px 60px;
        order: 2;
        background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    }

    /* Texte adapté */
    .hero-title-top {
        font-size: 32px;
        white-space: normal;
        word-wrap: break-word;
    }
    .hero-subtitle-gold {
        font-size: 28px;
        white-space: normal;
        word-wrap: break-word;
    }
    .hero-description {
        font-size: 17px;
        white-space: normal;
        word-wrap: break-word;
    }
    .hero-phone-line {
        font-size: 19px;
        white-space: normal;
        word-wrap: break-word;
        flex-wrap: wrap;
    }
}

/* ========== GRANDS ÉCRANS (1400px+) - Layout diagonal ========== */
@media (min-width: 1400px) {
    /* Remet le layout diagonal original optimisé */
    .hero-glassmorphism {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-height: 100vh;
        background: linear-gradient(135deg, #1a2332 0%, #2c3e50 50%, #34495e 100%);
    }

    .hero-content-wrapper {
        width: 45% !important; /* Encore plus d'espace pour le texte et forcé */
        padding: 60px 40px !important;
        max-width: 650px !important;
        position: relative !important;
        z-index: 10 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .hero-background {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        width: 55% !important; /* Image encore plus petite et forcée */
        height: 100% !important;
        z-index: 2 !important;
        clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%) !important; /* Clip encore moins agressif et forcé */
    }

    .hero-background img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
    }

    /* Texte optimisé pour grands écrans */
    .hero-title-top {
        font-size: 44px;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.2;
    }
    .hero-subtitle-gold {
        font-size: 38px;
        white-space: normal;
        word-wrap: break-word;
        margin-bottom: 45px;
    }
    .hero-description {
        font-size: 22px;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.7;
    }
    .hero-phone-line {
        font-size: 24px;
        white-space: normal;
        word-wrap: break-word;
        flex-wrap: wrap;
        margin-bottom: 45px;
    }
    .hero-cta-btn {
        padding: 20px 50px;
        font-size: 20px;
    }
}

/* ========== ANCIEN BREAKPOINT SUPPRIMÉ - REMPLACÉ PAR LES PALIERS CI-DESSUS ========== */

/* ========== TABLET PORTRAIT (768px - 991px) ========== */
@media (max-width: 900px) {
    /* Pricing - 2 columns */
    .pricing-plans-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .pricing-card {
        flex: none;
        min-width: auto;
    }
    .pricing-card.recommended {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .container-main {
        max-width: 720px;
        padding: 0 20px;
    }

    /* Hero Section - Mobile Layout avec bande logo en haut */
    .hero-glassmorphism {
        min-height: auto;
        flex-direction: column;
        padding: 0;
        position: relative;
        padding-top: 0; /* Reset padding car on utilise margin sur l'image */
    }

    /* Logo repositionné en bande fixe en haut */
    .hero-logo-box {
        position: fixed;
        top: 5px; /* Petit espace en haut pour éviter le débordement */
        left: 0;
        right: 0;
        z-index: 1000;
        order: -1; /* Force en premier */
        margin-bottom: 0;
        padding: 20px 25px; /* Encore plus de padding pour centrer le logo */
        width: 100%;
        height: 90px; /* Hauteur encore plus grande */
        background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
        border-radius: 0;
        border: none;
        border-bottom: 2px solid rgba(255, 215, 0, 0.2);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        display: flex;
        justify-content: center;
        align-items: center;
        backdrop-filter: blur(10px);
        box-sizing: border-box;
    }

    /* Image en premier dans le hero (après logo fixe) */
    .hero-background {
        position: relative;
        width: 100%;
        height: 40vh;
        min-height: 300px;
        max-height: 400px;
        clip-path: none;
        order: 1;
        margin-top: 95px; /* Force une marge directement sur l'image */
    }
    .hero-background::after {
        background: linear-gradient(to bottom, transparent 0%, rgba(44, 62, 80, 0.3) 100%);
    }

    /* Contenu texte en deuxième */
    .hero-content-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 50px 25px 60px;
        order: 2;
        background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    }
    .hero-logo-box img {
        max-width: 220px;
    }
    .hero-title-top {
        font-size: 30px;
        margin-bottom: 18px;
        white-space: normal;
        line-height: 1.3;
    }
    .hero-subtitle-gold {
        font-size: 26px;
        margin-bottom: 30px;
        white-space: normal;
        padding-bottom: 12px;
    }
    .hero-description {
        font-size: 16px;
        margin-bottom: 25px;
        line-height: 1.6;
    }
    .hero-phone-line {
        font-size: 19px;
        margin-bottom: 30px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    .hero-phone-icon {
        font-size: 24px;
    }
    .hero-cta-btn {
        padding: 15px 35px;
        font-size: 17px;
        width: 100%;
        max-width: 350px;
    }
    .hero-trust-indicator {
        margin-top: 20px;
        font-size: 14px;
    }

    /* General Sections */
    .section {
        padding: 60px 20px;
    }
    .section-title-main {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .section-subtitle-main {
        font-size: 17px;
        margin-bottom: 35px;
    }

    /* About Section */
    .about-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .about-column {
        padding: 30px 25px;
    }
    .about-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .features-highlight-box {
        padding: 25px 20px;
    }
    .features-highlight-box .about-features-list li {
        font-size: 14px;
        padding: 10px 12px;
    }
    .about-callout {
        padding: 25px 25px;
    }
    .about-callout h4 {
        font-size: 20px;
    }

    /* How It Works */
    .steps-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .step-card {
        padding: 30px 25px;
    }

    /* Access Numbers */
    .numbers-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    /* Pricing */
    .pricing-plans-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .pricing-card {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    .country-buttons {
        flex-wrap: wrap;
        gap: 10px;
    }
    .country-btn {
        flex: 1 1 calc(50% - 5px);
        min-width: 140px;
    }

    /* Resources */
    .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    /* Contact - No specific responsive needed, handled in contact CSS */

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    .footer-column:first-child {
        grid-column: 1 / -1;
        text-align: center;
    }
}

/* ========== MOBILE LARGE (576px - 767px) ========== */
@media (max-width: 600px) {
    .container-main {
        padding: 0 18px;
    }

    /* Hero Section */
    .hero-glassmorphism {
        padding-top: 0; /* Reset padding */
    }
    .hero-background {
        height: 35vh;
        min-height: 250px;
        margin-top: 80px; /* Marge directe sur l'image */
    }
    .hero-content-wrapper {
        padding: 40px 20px 50px;
    }
    .hero-logo-box {
        top: 5px; /* Petit espace en haut */
        padding: 15px 20px; /* Plus de padding */
        height: 75px; /* Hauteur plus grande */
    }
    .hero-logo-box img {
        max-width: 200px;
    }
    .hero-title-top {
        font-size: 26px;
        margin-bottom: 15px;
    }
    .hero-subtitle-gold {
        font-size: 22px;
        margin-bottom: 25px;
    }
    .hero-description {
        font-size: 15px;
        margin-bottom: 20px;
    }
    .hero-phone-line {
        font-size: 17px;
        margin-bottom: 25px;
    }
    .hero-phone-icon {
        font-size: 22px;
    }
    .hero-cta-btn {
        padding: 14px 30px;
        font-size: 16px;
        width: 100%;
    }
    .hero-trust-indicator {
        margin-top: 18px;
        font-size: 13px;
    }

    /* General */
    .section {
        padding: 50px 18px;
    }
    .section-title-main {
        font-size: 28px;
    }
    .section-subtitle-main {
        font-size: 16px;
    }

    /* About */
    .about-icon {
        font-size: 45px;
    }
    .about-column h3 {
        font-size: 20px;
    }
    .about-column p {
        font-size: 14px;
    }

    /* Steps */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    .step-icon {
        font-size: 40px;
    }
    .step-card h3 {
        font-size: 20px;
    }

    /* Pricing */
    .plan-name {
        font-size: 24px;
    }
    .plan-price {
        font-size: 40px;
    }
    .plan-period {
        font-size: 14px;
    }

    /* Resources */
    .resources-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-column {
        margin-bottom: 20px;
    }
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* ========== MOBILE SMALL (< 480px) ========== */
@media (max-width: 480px) {
    .container-main {
        padding: 0 15px;
    }

    /* Hero */
    .hero-glassmorphism {
        padding-top: 0; /* Reset padding */
    }
    .hero-background {
        height: 30vh;
        min-height: 220px;
        margin-top: 75px; /* Marge directe sur l'image */
    }
    .hero-content-wrapper {
        padding: 35px 18px 45px;
    }
    .hero-logo-box {
        top: 5px; /* Petit espace en haut */
        padding: 12px 15px; /* Plus de padding */
        height: 70px; /* Hauteur plus grande */
    }
    .hero-logo-box img {
        max-width: 180px;
    }
    .hero-title-top {
        font-size: 24px;
        margin-bottom: 12px;
    }
    .hero-subtitle-gold {
        font-size: 20px;
        margin-bottom: 20px;
    }
    .hero-description {
        font-size: 14px;
        margin-bottom: 18px;
    }
    .hero-phone-line {
        font-size: 16px;
        margin-bottom: 22px;
    }
    .hero-cta-btn {
        padding: 13px 25px;
        font-size: 15px;
    }
    .hero-trust-indicator {
        margin-top: 16px;
        font-size: 12px;
    }

    /* General */
    .section {
        padding: 40px 15px;
    }
    .section-title-main {
        font-size: 26px;
    }
    .section-subtitle-main {
        font-size: 15px;
    }

    /* About */
    .about-column {
        padding: 25px 20px;
    }
    .features-highlight-box {
        padding: 20px 15px;
    }
    .features-highlight-box .about-features-list li {
        font-size: 13px;
        padding: 8px 10px;
        gap: 8px;
    }

    /* Pricing */
    .pricing-card {
        padding: 30px 20px;
    }
    .country-btn {
        flex: 1 1 100%;
        font-size: 14px;
        padding: 10px 15px;
    }

    /* Numbers Grid */
    .numbers-grid {
        grid-template-columns: 1fr;
    }

    /* Contact inline styles - override */
    .contact-section [style*="padding: 50px"] {
        padding: 30px 20px !important;
    }
    .contact-section [style*="padding: 32px"] {
        padding: 25px 18px !important;
    }
}

/* ========== MOBILE EXTRA SMALL (< 375px) ========== */
@media (max-width: 374px) {
    .hero-title-top {
        font-size: 22px;
    }
    .hero-subtitle-gold {
        font-size: 18px;
    }
    .hero-description {
        font-size: 13px;
    }
    .hero-cta-btn {
        font-size: 14px;
        padding: 12px 20px;
    }
    .section-title-main {
        font-size: 24px;
    }
}

/* ========== LANDSCAPE ORIENTATION FIX ========== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-glassmorphism {
        min-height: auto;
    }
    .hero-background {
        height: 100vh;
        max-height: none;
    }
    .hero-content-wrapper {
        padding: 30px 20px;
    }
    .hero-logo-box {
        margin-bottom: 20px;
        padding: 12px 20px;
    }
    .hero-logo-box img {
        max-width: 160px;
    }
    .hero-title-top {
        font-size: 22px;
        margin-bottom: 10px;
    }
    .hero-subtitle-gold {
        font-size: 18px;
        margin-bottom: 15px;
    }
    .hero-description {
        font-size: 13px;
        margin-bottom: 12px;
    }
    .hero-phone-line {
        font-size: 15px;
        margin-bottom: 15px;
    }
    .hero-cta-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}

/* ========== UTILITY RESPONSIVE CLASSES ========== */
@media (max-width: 768px) {
    /* Force full width on mobile for specific elements */
    .mobile-full-width {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Stack flex items on mobile */
    .mobile-stack {
        flex-direction: column !important;
    }

    /* Hide on mobile */
    .mobile-hide {
        display: none !important;
    }

    /* Center text on mobile */
    .mobile-center {
        text-align: center !important;
    }

    /* Reduce padding on mobile */
    .mobile-reduce-padding {
        padding: 20px 15px !important;
    }
}

/* ========== ACCESSIBILITY & TOUCH TARGETS ========== */
@media (max-width: 768px) {
    /* Ensure touch targets are at least 44x44px */
    button,
    a.cta-btn-primary,
    a.hero-cta-btn,
    .download-btn,
    .country-btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Increase spacing for better touch interaction */
    .pricing-card,
    .step-card,
    .resource-card,
    .about-column {
        margin-bottom: 20px;
    }
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */
@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .hero-glassmorphism::before,
    .hero-glassmorphism::after {
        animation: none;
    }

    .hero-background::after {
        animation: none;
    }

    /* Simplify hover effects on touch devices */
    @media (hover: none) {
        .hero-cta-btn:hover,
        .cta-btn-primary:hover,
        .about-column:hover,
        .step-card:hover,
        .resource-card:hover {
            transform: none;
        }
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .hero-background,
    .hero-glassmorphism::before,
    .hero-glassmorphism::after {
        display: none;
    }
    .hero-content-wrapper {
        width: 100%;
        padding: 20px;
    }
    .section {
        page-break-inside: avoid;
    }
    
    /* Hide interactive elements in print */
    button,
    .hero-cta-btn,
    .cta-btn-primary,
    .download-btn {
        display: none;
    }
    
    /* Optimize colors for print */
    body {
        background: white;
        color: black;
    }
    
    .section-title-main,
    .hero-title-top {
        color: black;
    }
}
