/* =====================================================
   MOBILE.CSS — Responsive styles only (≤768px)
   Desktop version in styles.css is NOT touched here.
   ===================================================== */

/* ============================================
   BURGER MENU BUTTON (hidden on desktop)
   ============================================ */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.burger-btn span {
    display: block;
    height: 2.5px;
    width: 100%;
    background-color: #333;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.burger-btn.open span { opacity: 0; }

/* ============================================
   MOBILE NAV OVERLAY
   ============================================ */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1050;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 0;
}

.mobile-nav-overlay.open {
    display: flex;
    animation: overlay-in 0.3s ease forwards;
}

@keyframes overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.mobile-nav-close {
    position: absolute;
    top: 1.4rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    font-weight: bold;
    color: orange;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease;
    font-family: 'Courier New', Courier, monospace;
}

.mobile-nav-close:hover {
    transform: rotate(90deg) scale(1.2);
    color: #004dc0;
}

.mobile-nav-overlay .nav-item-wrap {
    position: relative;
    text-align: center;
    padding: 1.2rem 3rem;
    width: 100%;
    opacity: 0;
    transform: translateY(25px);
}

.mobile-nav-overlay.open .nav-item-wrap:nth-child(2) { animation: nav-slide 0.4s 0.05s ease forwards; }
.mobile-nav-overlay.open .nav-item-wrap:nth-child(3) { animation: nav-slide 0.4s 0.15s ease forwards; }
.mobile-nav-overlay.open .nav-item-wrap:nth-child(4) { animation: nav-slide 0.4s 0.25s ease forwards; }

@keyframes nav-slide {
    to { opacity: 1; transform: translateY(0); }
}

.mobile-nav-overlay .nav-item-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 75%;
    height: 55px;
    background: radial-gradient(ellipse, rgba(255, 165, 0, 0.18) 0%, transparent 75%);
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.mobile-nav-overlay .nav-item-wrap:hover::before { opacity: 1; }

.mobile-nav-overlay a {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.9rem;
    font-weight: 800;
    color: #222;
    text-decoration: none;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    transition: color 0.2s ease, letter-spacing 0.2s ease;
    display: block;
}

.mobile-nav-overlay a:hover {
    color: orange;
    letter-spacing: 1px;
}

/* ============================================
   RESPONSIVE BREAKPOINTS — 768px
   ============================================ */
@media (max-width: 768px) {

    .burger-btn { display: flex; }
    header nav { display: none; }

    header { padding: 8px 20px; }
    header img { height: 40px; }

    /* HOME: polaroids on top, text below */
    .content-wrapper {
        flex-direction: column-reverse;
        align-items: center;
        gap: 1rem; /* ⬅ écrase le gap: 13rem du desktop */
        margin-top: 0.5rem !important;
    }

    .section-box {
        flex: none !important;  /* écrase flex: 0 0 480px du desktop */
        max-width: 92%;
        width: 92%;
        box-sizing: border-box;
        padding: 1.2rem 1.4rem 1.4rem;
        margin-bottom: 1rem;
    }

    .section-box h3 {
        font-size: 2rem;
        margin-bottom: 0.4rem;
    }

    .section-box p {
        font-size: 0.92rem !important;
        margin-bottom: 14px !important;
    }

    .section-box > div[style] {
        justify-content: flex-start !important;
        gap: 8px !important;
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 5px 12px !important;
        font-size: 0.75rem !important;
        box-shadow: 0 2px 0 #b37e00 !important;
        border-radius: 15px !important;
    }

    .nav-link.blue { box-shadow: 0 2px 0 #003078 !important; }
    .nav-link:hover { transform: translateY(-2px) scale(1.03) !important; }

    .sticker { width: 75px; top: -28px; right: -12px; }

    /* Polaroids */
    .polaroid-stack {
        width: 170px;
        min-height: 230px;
        margin-right: 0;
        margin-top: 55px;
    }

    .polaroid-image:nth-child(1) { transform: translate(-50px, 15px) rotate(-15deg); }
    .polaroid-image:nth-child(2) { transform: translate(50px, -15px) rotate(11deg); }
    .polaroid-image:nth-child(3) { transform: translate(0, -25px) rotate(-2deg); }

    /* PRO2 Gallery */
    .improvement-gallery {
        flex-direction: column;
        align-items: center;
        flex-wrap: wrap;
    }

    .gallery-item { margin: 0.8rem auto; max-width: 90%; width: auto; aspect-ratio: 16 / 9; }
    .gallery-item img { width: 100%; height: 100%; object-fit: cover; }
    .row-1, .row-2, .row-3 { transform: none; }

    /* Pro nav */
    .pro-nav { flex-wrap: wrap; gap: 0.8rem; padding: 0 1rem; }

    /* Footer */
    footer {
        flex-direction: column !important;
        gap: 1rem;
        padding: 1.2rem 1rem;
        margin-top: 2rem;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .footer-left { flex-direction: column; align-items: center; gap: 0.5rem; }
    .footer-right { justify-content: center; }
    footer img { height: 28px; }
    footer p { font-size: 0.78rem; }

    /* Article */
    article { padding: 0.5rem 1rem; }

    /* Project pages */
    .project-hero-gallery { flex-direction: column; align-items: center; }

    .project-hero-gallery img {
        max-width: 85% !important;
        width: 85%;
    }

    .pro2-page main img,
    .pro2-page article img {
        max-width: 85% !important;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    .before-after img,
    .comparison img {
        max-width: 90% !important;
        width: 90%;
    }

    .pro2-page video {
        max-width: 90% !important;
        width: 90%;
        display: block;
        margin: 0 auto;
    }
}

/* ============================================
   RESPONSIVE BREAKPOINTS — 480px
   ============================================ */
@media (max-width: 480px) {
    .section-box h3 { font-size: 1.75rem; }
    .polaroid-stack { width: 145px; min-height: 200px; margin-top: 45px; }
    .polaroid-image:nth-child(1) { transform: translate(-42px, 12px) rotate(-15deg); }
    .polaroid-image:nth-child(2) { transform: translate(42px, -12px) rotate(11deg); }
    .nav-link { padding: 5px 10px !important; font-size: 0.72rem !important; }
}
