/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop (1400px et plus) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    :root {
        --h1-size: 3.5rem;
        --h2-size: 3rem;
        --h3-size: 2.25rem;
    }
}

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }
}

/* Tablet Large (992px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
        padding: 0 15px;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
    
    .contact-info {
        gap: 1.5rem;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    :root {
        --h1-size: 2.5rem;
        --h2-size: 2rem;
        --h3-size: 1.75rem;
        --section-padding: 60px 0;
    }
    
    /* Navigation mobile */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--box-shadow);
        gap: 0;
    }
    
    .nav-menu.active {
        margin-top:-1px;
        display: flex;
    }
    
    .nav-item {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }

    /* Dropdown mobile */
    .dropdown-menu {
        position: static;
        display: none;
        background: rgba(15, 14, 82, 0.05);
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    .dropdown-menu.show {
        display: block;
    }

    .dropdown-item {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        color: var(--primary-dark);
    }

    .dropdown-item:hover {
        background: rgba(15, 14, 82, 0.1);
        color: var(--primary-blue);
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Header mobile */
    .header-top {
        padding: 5px 0;
    }
    
    .contact-info {
        flex-wrap: wrap;
        gap: 1rem;
        font-size: 0.8rem;
    }
    
    .navbar {
        position: relative;
    }
    
    .nav-actions .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    /* Footer tablet */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    /* WhatsApp button tablet */
    .whatsapp-button {
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-button i {
        font-size: 1.75rem;
    }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }
    
    :root {
        --h1-size: 2rem;
        --h2-size: 1.75rem;
        --h3-size: 1.5rem;
        --section-padding: 40px 0;
        --container-padding: 0 15px;
    }
    
    body {
        padding-top: 100px;
    }
    
    /* Header mobile */
    .header-top .contact-info {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .header-top .contact-info span {
        font-size: 0.75rem;
    }
    
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .nav-brand {
        flex: 1;
    }
    
    .brand-text {
        font-size: 1.25rem;
    }
    
    .logo {
        height: 35px;
    }
    
    .nav-actions {
        order: 2;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Boutons mobile */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Cards responsive */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Newsletter mobile */
    .newsletter-form {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        border-radius: var(--border-radius);
    }
}

/* Mobile (320px - 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }
    
    :root {
        --h1-size: 1.75rem;
        --h2-size: 1.5rem;
        --h3-size: 1.25rem;
        --body-size: 0.9rem;
        --section-padding: 30px 0;
    }
    
    body {
        padding-top: 90px;
    }
    
    /* Header très petit écran */
    .header-top {
        display: none; /* Masquer les infos de contact sur très petits écrans */
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .brand-text {
        font-size: 1rem;
    }
    
    .logo {
        height: 30px;
    }
    
    .nav-actions .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* WhatsApp button mobile */
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-button i {
        font-size: 1.5rem;
    }
    
    /* Contact info mobile */
    .contact-info {
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
    }
    
    /* Footer mobile */
    .footer-main {
        padding: 40px 0;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
    }
}

/* Très petit mobile (moins de 320px) */
@media (max-width: 319px) {
    .container {
        padding: 0 5px;
    }
    
    :root {
        --h1-size: 1.5rem;
        --h2-size: 1.25rem;
        --h3-size: 1.1rem;
        --body-size: 0.85rem;
    }
    
    .nav-brand {
        gap: 0.25rem;
    }
    
    .brand-text {
        display: none; /* Masquer le texte sur très petits écrans */
    }
}

/* Utilitaires responsive */
.hidden-mobile {
    display: block;
}

.visible-mobile {
    display: none;
}

@media (max-width: 767px) {
    .hidden-mobile {
        display: none;
    }
    
    .visible-mobile {
        display: block;
    }
}

/* Grilles responsives */
.grid-responsive {
    display: grid;
    gap: 2rem;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 991px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .grid-4,
    .grid-3,
    .grid-2 { 
        grid-template-columns: 1fr; 
    }
}

/* Animation responsive */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .whatsapp-float,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    body {
        padding-top: 0;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}