/* ══ LP Charpente, Mobile pro & fonctionnel ══ */
@media (max-width: 900px) {
    html {
        -webkit-tap-highlight-color: transparent;
    }

    body.nav-open {
        overflow: hidden;
    }

    /* ── Header ── */
    #header {
        padding: .6rem 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: #ffffff;
        border-bottom: 1px solid var(--gray-100);
    }

    .header-inner {
        padding: 0 1rem;
        gap: .5rem;
    }

    .logo-tagline {
        display: block;
        font-size: .58rem;
        font-weight: 700;
        letter-spacing: .08em;
        margin-top: .15rem;
        line-height: 1.15;
        color: var(--primary-dark);
    }

    .logo-text-group {
        gap: 0;
        min-width: 0;
    }

    .logo-img {
        height: 36px;
    }

    .logo-text {
        font-size: .95rem;
    }

    .header-actions {
        display: none;
    }

    .burger {
        display: flex;
        order: 3;
        margin-left: .25rem;
    }

    .header-phone-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: var(--primary-bg);
        color: var(--primary);
        margin-left: auto;
        flex-shrink: 0;
    }

    /* ── Overlay ── */
    .nav-overlay {
        position: fixed;
        inset: 0;
        z-index: 999;
        background: rgba(12, 10, 9, .45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s var(--ease), visibility .3s var(--ease);
    }

    .nav-overlay.visible {
        opacity: 1;
        visibility: visible;
    }

    /* ── Drawer latéral ── */
    #main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(100%, 340px);
        height: 100dvh;
        max-width: none;
        background: #ffffff;
        box-shadow: -10px 0 40px rgba(0, 0, 0, .12);
        transform: translateX(100%);
        transition: transform .35s var(--ease);
        z-index: 1000;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 0;
    }

    #main-nav.open {
        transform: translateX(0);
    }

    .mobile-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.15rem;
        border-bottom: 1px solid var(--gray-100);
        flex-shrink: 0;
    }

    .mobile-drawer-brand {
        display: flex;
        align-items: center;
        gap: .7rem;
        min-width: 0;
    }

    .mobile-drawer-brand img {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .mobile-drawer-brand strong {
        display: block;
        font-family: var(--font-h);
        font-size: .9rem;
        font-weight: 800;
        color: var(--gray-900);
    }

    .mobile-drawer-brand span {
        display: block;
        font-size: .58rem;
        font-weight: 700;
        letter-spacing: .12em;
        text-transform: uppercase;
        color: var(--primary);
    }

    .mobile-drawer-close {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: var(--gray-50);
        color: var(--gray-600);
        font-size: 1.4rem;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        cursor: pointer;
        flex-shrink: 0;
    }

    #main-nav > ul {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: .75rem 1rem;
        gap: 0;
        flex-direction: column;
    }

    #main-nav > ul > li {
        border-bottom: 1px solid var(--gray-100);
    }

    #main-nav > ul > li:last-child {
        border-bottom: none;
    }

    #main-nav > ul > li > a {
        display: flex;
        align-items: center;
        width: 100%;
        padding: .95rem .35rem;
        font-size: .92rem;
        font-weight: 600;
        color: var(--gray-800);
        background: transparent;
        border-radius: 0;
        min-height: 48px;
    }

    #main-nav > ul > li > a::after {
        display: none;
    }

    #main-nav > ul > li > a:active,
    .has-dropdown.open > a {
        color: var(--primary);
    }

    .nav-chevron {
        margin-left: auto;
        transition: transform .25s var(--ease);
    }

    #main-nav .has-dropdown.open > a .nav-chevron {
        transform: rotate(180deg);
    }

    #main-nav .has-dropdown {
        position: relative;
    }

    #main-nav .dropdown {
        position: static;
        top: auto;
        left: auto;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: 100%;
        min-width: 0;
        max-height: 0;
        overflow: hidden;
        padding: 0 !important;
        margin: 0;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        transition: max-height .28s var(--ease);
    }

    #main-nav .has-dropdown.open .dropdown {
        max-height: 420px;
        padding: .15rem 0 .65rem !important;
    }

    #main-nav .dropdown a {
        display: flex;
        align-items: center;
        gap: .65rem;
        width: 100%;
        padding: .72rem .5rem .72rem 1.1rem;
        margin: 0;
        min-height: 0;
        font-size: .84rem;
        font-weight: 500;
        color: var(--gray-600);
        background: transparent;
        border: none;
        border-left: 2px solid transparent;
        border-radius: 0;
        white-space: normal;
        line-height: 1.35;
    }

    #main-nav .dropdown a:hover,
    #main-nav .dropdown a:active {
        color: var(--primary);
        background: var(--primary-bg);
        border-left-color: var(--primary);
        padding-left: 1.1rem;
    }

    #main-nav .dropdown a::after {
        display: none;
    }

    #main-nav .dd-icon {
        flex-shrink: 0;
        width: 14px;
        height: 14px;
        color: var(--primary);
        opacity: .85;
    }

    #main-nav .mobile-drawer-actions {
        display: flex;
        flex-direction: column;
        gap: .55rem;
        padding: 1rem 1.15rem calc(1rem + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--gray-100);
        background: #ffffff;
        flex-shrink: 0;
    }

    #main-nav .mobile-drawer-actions .drawer-btn {
        display: flex;
        align-items: center;
        gap: .85rem;
        width: 100%;
        min-height: 54px;
        padding: .7rem 1rem;
        border-radius: 12px;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease);
    }

    #main-nav .mobile-drawer-actions .drawer-btn:active {
        transform: scale(.985);
    }

    #main-nav .drawer-btn-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        flex-shrink: 0;
    }

    #main-nav .drawer-btn-copy {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: .1rem;
        min-width: 0;
    }

    #main-nav .drawer-btn-label {
        font-size: .62rem;
        font-weight: 700;
        letter-spacing: .1em;
        text-transform: uppercase;
        color: var(--gray-500);
        line-height: 1.2;
    }

    #main-nav .drawer-btn-value {
        font-size: .92rem;
        font-weight: 700;
        letter-spacing: .01em;
        color: var(--gray-900);
        line-height: 1.25;
    }

    #main-nav .drawer-btn-call {
        background: var(--gray-50);
        border: 1px solid var(--gray-200);
        color: var(--gray-800);
    }

    #main-nav .drawer-btn-call .drawer-btn-icon {
        background: rgba(140, 87, 36, .1);
        color: var(--primary);
    }

    #main-nav .drawer-btn-call:active {
        background: var(--gray-100);
        border-color: var(--gray-300);
    }

    #main-nav .drawer-btn-cta {
        justify-content: flex-start;
        background: var(--primary);
        color: #ffffff;
        border: none;
        box-shadow: 0 4px 16px rgba(140, 87, 36, .22);
        font-family: var(--font-h);
        font-size: .92rem;
        font-weight: 700;
    }

    #main-nav .drawer-btn-cta .drawer-btn-copy {
        font-size: .92rem;
        font-weight: 700;
        letter-spacing: .01em;
        color: #ffffff;
    }

    #main-nav .drawer-btn-cta .drawer-btn-icon {
        background: rgba(255, 255, 255, .16);
        color: #ffffff;
    }

    #main-nav .drawer-btn-cta:active {
        background: var(--primary-dark);
        box-shadow: 0 2px 10px rgba(140, 87, 36, .18);
    }

    /* ── Contenu ── */
    [id] {
        scroll-margin-top: 76px;
    }

    .section {
        padding: 3.5rem 0;
    }

    .container {
        padding: 0 1.15rem;
    }

    .btn {
        min-height: 48px;
    }

    #hero {
        min-height: 80vh;
        padding-bottom: 5rem;
    }

    .hero-inner {
        padding: 0 1.15rem;
    }

    .hero-h1 {
        font-size: clamp(1.85rem, 8vw, 2.2rem);
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .about-feats {
        grid-template-columns: 1fr;
    }

    .real-showcase,
    .real-gallery {
        grid-template-columns: 1fr;
    }

    .real-item,
    .real-item--hero {
        min-height: 240px;
        border-radius: 14px;
    }

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

    .form input,
    .form select,
    .form textarea {
        font-size: 16px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        padding: 2.5rem 1.15rem 2rem;
    }

    /* ── Footer mobile simplifié ── */
    #site-footer .footer-desktop {
        display: none !important;
    }

    #site-footer .footer-compact {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 2rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
        gap: 1rem;
    }

    #site-footer .footer-compact-brand {
        display: inline-flex;
        align-items: center;
        gap: .65rem;
        text-decoration: none;
        color: var(--primary-dark);
    }

    #site-footer .footer-compact-brand img {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        object-fit: contain;
    }

    #site-footer .footer-compact-brand span {
        font-family: var(--font-h);
        font-size: 1rem;
        font-weight: 800;
        letter-spacing: .03em;
        text-transform: uppercase;
        color: var(--primary-dark);
    }

    #site-footer .footer-compact-tagline {
        max-width: 280px;
        font-size: .78rem;
        line-height: 1.5;
        color: var(--gray-500);
        margin: 0;
    }

    #site-footer .footer-compact-actions {
        display: flex;
        flex-direction: column;
        gap: .5rem;
        width: 100%;
        max-width: 300px;
        margin-top: .25rem;
    }

    #site-footer .footer-compact-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        padding: .65rem 1rem;
        border-radius: 10px;
        font-size: .84rem;
        font-weight: 600;
        text-decoration: none;
        background: var(--gray-50);
        color: var(--gray-800);
        border: 1px solid var(--gray-200);
        transition: background .2s var(--ease), border-color .2s var(--ease);
    }

    #site-footer .footer-compact-btn-primary {
        background: var(--primary);
        color: #ffffff;
        border-color: var(--primary);
    }

    #site-footer .footer-compact-btn:active {
        opacity: .92;
    }

    #site-footer .footer-compact-social {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .65rem;
        margin-top: .15rem;
    }

    #site-footer .footer-compact-social a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: var(--gray-50);
        color: var(--gray-600);
        transition: background .2s var(--ease), color .2s var(--ease);
    }

    #site-footer .footer-compact-social a:nth-child(1):active { color: #1877F2; }
    #site-footer .footer-compact-social a:nth-child(2):active { color: #0A66C2; }
    #site-footer .footer-compact-social a:nth-child(3):active { color: #E4405F; }

    #site-footer .footer-compact-copy {
        margin: .35rem 0 0;
        font-size: .72rem;
        font-weight: 500;
        color: var(--gray-400);
    }

    #site-footer .footer-compact-legal {
        font-size: .72rem;
        font-weight: 500;
        color: var(--gray-500);
        text-decoration: none;
    }

    #site-footer .footer-compact-legal:active {
        color: var(--primary);
    }

    #site-footer .footer-compact-legal-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .45rem;
        margin-top: .15rem;
        font-size: .72rem;
        color: var(--gray-400);
    }

    #back-to-top {
        bottom: 1.25rem;
        right: 1rem;
    }

    .page-hero:not(.page-hero--photo) {
        min-height: 340px;
        height: auto;
        padding-top: 64px;
    }

    .xp-layout {
        grid-template-columns: 1fr;
        padding: 2.5rem 1.15rem;
    }

    .xp-sidebar {
        grid-template-columns: 1fr;
    }

    .xp-gallery,
    .xp-gallery.cols-3 {
        grid-template-columns: 1fr;
    }

    .actu-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 901px) {
    .nav-overlay,
    .mobile-drawer-head,
    .mobile-drawer-actions,
    .header-phone-mobile,
    .nav-item-ico,
    #site-footer .footer-compact {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .header-phone-mobile {
        display: flex;
    }
}
