/*
 * Ajustements uniquement sur l'accueil public (WordPress body.home).
 * Base : Local Platform Web RC10.9.25 (referentiel du 29 octobre 2026).
 * Aucun impact sur les fiches, les Dashboards et les portails municipaux.
 */

/* Enlever les espaces verticaux cumules, sans modifier les composants internes. */
body.home .lp-hero-rc6 {
    min-height: auto !important;
    padding-bottom: clamp(22px, 3vw, 40px) !important;
}

body.home .lp-section:not(.lp-trust-strip) {
    padding-top: clamp(34px, 4vw, 54px) !important;
    padding-bottom: clamp(34px, 4vw, 54px) !important;
}

/* La section Explorer suit le hero ; elle a besoin de moins de marge en haut. */
body.home .lp-section.lp-section-categories {
    padding-top: clamp(22px, 3vw, 42px) !important;
}

/* Sur bureau le hero garde deux colonnes : le texte reste sur deux lignes. */
@media (min-width: 981px) and (max-width: 1399px) {
    body.home .lp-hero-rc6 h1 {
        font-size: clamp(39px, 4.1vw, 57px) !important;
    }
}

@media (min-width: 1400px) {
    body.home .lp-hero-rc6 h1 {
        font-size: min(4.6vw, 67px) !important;
    }
}

/* Deux lignes exactes sur les smartphones : le <br> existant fait la separation. */
@media (max-width: 640px) {
    body.home .lp-hero-rc6 h1 {
        font-size: clamp(25px, 9.5vw, 40px) !important;
        line-height: 1.09 !important;
        letter-spacing: -.048em;
        white-space: nowrap;
    }

    body.home .lp-hero-rc6 h1 span {
        white-space: nowrap;
    }
}

/* RC10.9.27 — Sur petit ecran, les suggestions prennent leur place dans
 * le formulaire : aucun champ voisin ne peut les recouvrir.
 * N'affecte que la recherche de l'accueil et seulement sous 540 px.
 */
@media (max-width: 540px) {
    body.home .lp-hero-rc6 .lp-home-search-rc101 .lp-home-search-query {
        display: flex !important;
        flex-wrap: wrap !important;
        height: auto !important;
        align-content: center;
        overflow: visible !important;
    }
    body.home .lp-hero-rc6 .lp-home-search-rc101 .lp-home-search-query > [data-lp-activity-input] {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
    }
    body.home .lp-hero-rc6 .lp-home-search-rc101 .lp-activity-suggestions:not([hidden]) {
        position: static !important;
        order: 3;
        flex: 0 0 100%;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        max-height: min(280px, 40dvh);
        overflow-y: auto;
        margin: 5px 0 9px;
        box-sizing: border-box;
        isolation: isolate;
    }
}
