
/* =========================================================
   MCC FONCIERE - OPTIMISATION MOBILE
   ========================================================= */

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
svg {
    max-width: 100%;
    height: auto;
}

/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width: 900px) {

    .container,
    .wrapper,
    .inner,
    .content,
    main > section {
        width: 100%;
        max-width: 100%;
    }

    .grid,
    .cards,
    .projects-grid,
    .project-grid,
    .services-grid,
    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {

    body {
        font-size: 15px;
        line-height: 1.6;
    }

    /* ---------- CONTENEURS ---------- */

    .container,
    .wrapper,
    .inner,
    .content {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box;
    }

    section {
        padding-top: 55px !important;
        padding-bottom: 55px !important;
    }


    /* ---------- HEADER ---------- */

    header {
        min-height: auto !important;
    }

    header .container,
    header .wrapper,
    header .inner {
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }

    header img {
        max-width: 160px;
        height: auto;
    }


    /* ---------- NAVIGATION ---------- */

    nav {
        max-width: 100%;
    }

    nav ul {
        display: flex;
        flex-wrap: nowrap;
        gap: 20px !important;

        overflow-x: auto;
        overflow-y: hidden;

        padding: 8px 0 !important;
        margin: 0;

        scrollbar-width: none;

        -webkit-overflow-scrolling: touch;
    }

    nav ul::-webkit-scrollbar {
        display: none;
    }

    nav li {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    nav a {
        font-size: 12px !important;
        letter-spacing: 0.04em;
    }


    /* ---------- HERO ---------- */

    .hero,
    .hero-section,
    .banner,
    .masthead {
        min-height: auto !important;
        height: auto !important;
        padding-top: 80px !important;
        padding-bottom: 70px !important;
    }

    .hero-content,
    .hero .content,
    .hero .inner {
        width: 100% !important;
        max-width: 100% !important;
    }

    .hero h1,
    h1 {
        font-size: clamp(36px, 11vw, 52px) !important;
        line-height: 1.02 !important;
        letter-spacing: -0.035em !important;
        max-width: 100% !important;
        margin-bottom: 24px !important;
    }

    .hero h2 {
        font-size: 22px !important;
        line-height: 1.25 !important;
    }

    .hero p,
    .hero .subtitle,
    .hero .lead {
        font-size: 16px !important;
        line-height: 1.6 !important;
        max-width: 100% !important;
    }


    /* ---------- TITRES ---------- */

    h2 {
        font-size: clamp(28px, 8vw, 38px) !important;
        line-height: 1.1 !important;
        letter-spacing: -0.025em;
    }

    h3 {
        font-size: 21px !important;
        line-height: 1.25 !important;
    }


    /* ---------- GRILLES ---------- */

    .grid,
    .cards,
    .projects-grid,
    .project-grid,
    .services-grid,
    .features-grid,
    .columns,
    .two-columns,
    .three-columns {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }


    /* ---------- CARTES ---------- */

    .card,
    .project,
    .project-card,
    .service-card,
    .feature-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    .card img,
    .project img,
    .project-card img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }


    /* ---------- IMAGES ---------- */

    figure {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    img {
        max-width: 100%;
    }


    /* ---------- BOUTONS ---------- */

    .button,
    .btn,
    a.button,
    a.btn,
    button {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 13px 20px !important;
        box-sizing: border-box;
    }


    /* ---------- BLOCS FLEX ---------- */

    .row,
    .flex,
    .split,
    .columns {
        flex-direction: column !important;
    }


    /* ---------- TABLEAUX ---------- */

    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }


    /* ---------- FOOTER ---------- */

    footer {
        padding-top: 45px !important;
        padding-bottom: 35px !important;
    }

    footer .container,
    footer .wrapper,
    footer .inner {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    footer nav ul {
        flex-wrap: wrap;
        gap: 12px 20px !important;
    }


    /* ---------- ANCRAGES ---------- */

    [id] {
        scroll-margin-top: 90px;
    }

}


/* =========================================================
   PETITS MOBILES
   ========================================================= */

@media (max-width: 390px) {

    .container,
    .wrapper,
    .inner,
    .content {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    section {
        padding-top: 45px !important;
        padding-bottom: 45px !important;
    }

    .hero,
    .hero-section,
    .banner,
    .masthead {
        padding-top: 65px !important;
        padding-bottom: 55px !important;
    }

    .hero h1,
    h1 {
        font-size: 34px !important;
    }

    h2 {
        font-size: 28px !important;
    }

}

