/* ========================================
   GMMS SARLU DRC - Responsive Styles
   ======================================== */

/* ===== Tablet Landscape (max-width: 1200px) ===== */
@media screen and (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .poles-grid {
        gap: var(--spacing-lg);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Tablet Portrait (max-width: 992px) ===== */
@media screen and (max-width: 992px) {
    /* Navigation — plein écran comme la maquette mobile */
    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 10001;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.35s ease, visibility 0.35s ease;
    }

    .nav-backdrop.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.nav-open > :not(#header):not(.nav-backdrop):not(#preloader) {
        filter: blur(6px) brightness(0.72);
        transition: filter 0.35s ease;
    }

    .nav-item-hide-mobile {
        display: none !important;
    }

    .mobile-nav-top {
        display: block !important;
        width: 100%;
        margin-bottom: var(--spacing-sm);
    }

    .mobile-nav-cta-wrap,
    .mobile-nav-bottom-bar {
        display: block;
        width: 100%;
    }

    /* Logo affiché dans le panneau mobile (mobile-nav-top) */
    .nav-container > .logo.logo-brand {
        display: none !important;
    }

    body.nav-open #header {
        z-index: 10004;
        background: linear-gradient(180deg, #1b5e20 0%, #0d3b12 100%);
        box-shadow: none;
    }

    body.nav-open #header.header-dark,
    body.nav-open #header.scrolled {
        background: linear-gradient(180deg, #1b5e20 0%, #0d3b12 100%);
    }

    body.nav-open #header .lang-btn,
    body.nav-open #header .lang-separator {
        color: var(--white);
    }

    body.nav-open #header .lang-btn.active {
        background: var(--secondary-color);
        color: var(--gray-900);
        border-radius: var(--radius-sm);
    }

    body.nav-open #header .hamburger span {
        background: var(--white);
    }

    .nav-actions {
        position: relative;
        z-index: 10005;
    }

    .mobile-nav-header {
        padding: var(--spacing-md) var(--spacing-lg);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        justify-content: flex-start;
    }

    .mobile-nav-logo.logo-brand {
        background: var(--white);
        padding: 8px 12px;
        border-radius: 4px;
    }

    .mobile-nav-logo.logo-brand img {
        height: 42px;
        max-width: 200px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        min-height: 100dvh;
        max-height: 100dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: linear-gradient(180deg, #1b5e20 0%, var(--primary-dark) 32%, #061a10 68%, #0a1525 100%);
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        padding-top: calc(var(--mobile-header-height) + 4px);
        box-shadow: none;
        transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
        gap: 0;
        z-index: 10003;
        transform: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        list-style: none;
    }

    .nav-menu.active {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-xs);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-menu > li {
        width: 100%;
    }

    .nav-menu .nav-link,
    .nav-menu .dropdown-toggle {
        color: rgba(255, 255, 255, 0.9);
        width: 100%;
        padding: var(--spacing-lg) var(--spacing-xl);
        line-height: 1.35;
        font-size: 1.02rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        border-bottom: none;
        border-radius: 0;
    }

    .nav-menu .dropdown-toggle i {
        display: none;
    }

    .nav-menu .nav-link::after,
    .nav-menu .dropdown-toggle::after {
        display: none;
    }

    .nav-menu .nav-link:hover,
    .nav-menu .dropdown-toggle:hover {
        color: var(--white);
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-menu .nav-link.active,
    .nav-menu .dropdown-toggle.active {
        color: var(--white);
        background: rgba(76, 175, 80, 0.28);
        box-shadow: inset 3px 0 0 var(--secondary-color);
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 0;
        padding: 0;
        margin: 0;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .dropdown-menu a {
        color: rgba(255, 255, 255, 0.75);
        padding: var(--spacing-md) var(--spacing-xl) var(--spacing-md) calc(var(--spacing-xl) + var(--spacing-md));
        font-size: 0.95rem;
        text-transform: none;
        letter-spacing: 0;
        font-weight: 500;
    }

    .dropdown-menu a:hover,
    .dropdown-menu a.active {
        background: rgba(255, 255, 255, 0.08);
        color: var(--secondary-color);
    }

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

    .mobile-nav-cta-wrap {
        padding: var(--spacing-2xl) var(--spacing-xl) var(--spacing-lg);
        margin-top: auto;
    }

    .mobile-nav-cta {
        display: block;
        width: 100%;
        border-radius: 999px;
        padding: var(--spacing-md) var(--spacing-xl);
        font-size: 1.05rem;
        font-weight: 700;
        text-align: center;
        background: var(--primary-light);
        color: var(--white);
        border: none;
    }

    .mobile-nav-cta:hover {
        background: #43a047;
        color: var(--white);
    }

    .mobile-nav-bottom-bar {
        height: 52px;
        min-height: 52px;
        margin: 0;
        padding: 0;
        background: #0a1020;
        border: none;
        list-style: none;
    }

    .hamburger {
        display: flex;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
    }

    .hamburger span,
    #header.scrolled .hamburger span,
    #header.header-dark .hamburger span {
        background: var(--white);
    }

    #header.header-dark .lang-btn,
    #header.scrolled.header-dark .lang-btn {
        color: var(--white);
    }

    #header.header-dark .lang-separator,
    #header.scrolled.header-dark .lang-separator {
        color: rgba(255, 255, 255, 0.5);
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
    
    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .slogan-text {
        font-size: 1.25rem;
    }
    
    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
    
    .about-image {
        order: -1;
    }
    
    .image-wrapper img {
        height: 400px;
    }
    
    /* Poles */
    .poles-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }

    .pole-intro-image {
        min-height: 420px;
        padding: var(--spacing-md);
    }
    
    /* Section */
    .section-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
}

/* ===== Mobile Landscape (max-width: 768px) ===== */
@media screen and (max-width: 768px) {
    /* Typography */
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }

    .pole-intro-image {
        min-height: 360px;
        padding: var(--spacing-sm);
    }
    
    /* Stats */
    .stats-section {
        margin-top: 0;
        padding: var(--spacing-2xl) 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .stat-card {
        padding: var(--spacing-lg);
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .stat-icon i {
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* About Features */
    .about-features {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-contact li {
        justify-content: center;
        text-align: left;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-legal,
    .footer-badge,
    .footer-copyright {
        width: 100%;
    }

    .footer-dev-credit {
        flex: 1 1 100%;
        width: 100%;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        align-self: center;
        margin-left: auto;
        margin-right: auto;
        font-size: 0.8rem;
        gap: 8px;
        text-align: center;
    }

    .footer-dev-credit img {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }
    
    /* CTA */
    .cta-title {
        font-size: 1.75rem;
    }
    
    .cta-text {
        font-size: 1rem;
    }
}

/* ===== Mobile Portrait (max-width: 576px) ===== */
@media screen and (max-width: 576px) {
    /* Container */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Navigation */
    .logo-text {
        font-size: 1rem;
    }
    
    .logo img {
        height: 40px;
    }

    .logo-brand img {
        height: 40px;
        max-width: min(220px, 70vw);
    }
    
    .mobile-nav-header {
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .nav-menu .nav-link,
    .nav-menu .dropdown-toggle {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 1rem;
    }

    .mobile-nav-cta-wrap {
        padding: var(--spacing-md) var(--spacing-lg) var(--spacing-xl);
    }
    
    /* Hero */
    .hero-content {
        padding: var(--spacing-lg);
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: var(--spacing-xs) var(--spacing-md);
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .slogan-text {
        font-size: 1rem;
    }
    
    .hero-slogan {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        display: flex;
        align-items: center;
        text-align: left;
        gap: var(--spacing-lg);
    }
    
    .stat-icon {
        margin: 0;
        flex-shrink: 0;
    }
    
    /* Sections */
    .section-header {
        margin-bottom: var(--spacing-2xl);
    }
    
    .section-tag {
        font-size: 0.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* About */
    .about-text {
        font-size: 1rem;
    }
    
    .image-wrapper img {
        height: 300px;
    }

    .intro-image {
        min-height: 320px;
        padding: var(--spacing-sm);
    }

    .supply-chain-image {
        min-height: 340px;
        padding: var(--spacing-sm);
    }

    .consultancy-image {
        min-height: 340px;
        padding: var(--spacing-sm);
    }
    
    .image-badge {
        right: var(--spacing-md);
        bottom: 0;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .badge-year {
        font-size: 1.5rem;
    }
    
    /* Poles */
    .pole-card {
        margin-bottom: var(--spacing-md);
    }
    
    .pole-content {
        padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
    }
    
    .pole-title {
        font-size: 1.25rem;
    }
    
    /* CTA */
    .cta-section {
        padding: var(--spacing-2xl) 0;
        min-height: auto;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    /* Footer */
    .footer-top {
        padding: var(--spacing-2xl) 0;
    }
    
    .footer-logo img {
        height: 50px;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 40px;
        height: 40px;
        right: var(--spacing-md);
        bottom: var(--spacing-md);
    }
}

/* ===== Very Small Devices (max-width: 375px) ===== */
@media screen and (max-width: 375px) {
    .hero-title {
        font-size: 1.35rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .slogan-text {
        font-size: 0.9rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.35rem;
    }
}

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

/* ===== Print Styles ===== */
@media print {
    #header,
    .hero-video-container,
    .back-to-top,
    .hero-scroll,
    #preloader {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        text-decoration: underline;
    }
}
