/* =====================================================================
   Retouches mobile (téléphones, < 576 px) — chargé après app.css.
   Supprimer ce fichier (ou son <link> dans layouts/app.blade.php)
   suffit à revenir à l'affichage d'origine.
   ===================================================================== */
:root { --accent: #44aec7; --accent-texte: #5eb9d1; --encre: #21212d; --gris: #6b6f7a; }

/* Les avis clients étaient mis en Majuscule À Chaque Mot par le CSS d'origine */
.carousel-text-avis { text-transform: none !important; }

/* ---------- Vignettes des biens (toutes tailles d'écran) ---------- */
.border-vignette-bien > a { position: relative; display: block; overflow: hidden; }
.border-vignette-bien .logo-3d { top: 12px; left: 12px; width: 36px; }
.border-vignette-bien .top-right-corner {
    top: 32px; right: -62px; width: 240px; padding: 5px 0; text-align: center;
    font-size: 14px; line-height: 1.2; box-shadow: 0 2px 6px rgba(0,0,0,.2);
    transform-origin: 50% 50%; transform: rotate(45deg);
}
.border-vignette-bien p.mt-3 { margin-left: 0; margin-bottom: 0; }
.border-vignette-bien span[style*="font-size: 12px"] { display: block; font-size: 14px !important; line-height: 1.4; color: #6b6f7a !important; }
.border-vignette-bien h2 { margin-bottom: 0; line-height: 1.4; }
.border-vignette-bien .txt-savoir { margin: 10px 0 0; font-size: 14px; }

/* ---------- Fiche bien ---------- */
.text-details { line-height: .95; }
.pictos-bien-details { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.pictos-bien-details img { width: 28px !important; flex: 0 0 28px; }
.encart-energie { width: 100%; max-width: 500px; height: auto; }
@media (max-width: 991.98px) {
    .bloc-dpe > div { margin-left: 0 !important; margin-right: 0 !important; padding-left: 15px !important; padding-right: 15px !important; margin-bottom: 24px; }
}
/* diaporama (mobile / tablette) : toutes les photos au même format, sinon la plus haute (photo en portrait) laissait un grand vide sous les autres */
.swipe-wrap > div > img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
/* galerie (ordinateur) : grande photo à gauche, grille 2 x 2 régulière à droite, mêmes écarts partout */
@media (min-width: 1200px) {
    .pt-7.gallery > .col-sm-6 { padding-left: 8px; padding-right: 8px; }
    .pt-7.gallery > .col-sm-6:first-child > a,
    .pt-7.gallery > .col-sm-6:first-child #visite-virtuelle,
    .pt-7.gallery > .col-sm-6:first-child .matterport-showcase { display: block; width: 100%; height: 100%; }
    .pt-7.gallery .thumb-img-first { display: block; width: 100%; height: 100%; object-fit: cover; }
    .pt-7.gallery .viste__iframe { display: block; height: 100%; border: 0; }
    .right-lightbox { padding-left: 8px !important; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; }
    .right-lightbox > .row { display: contents; }
    .right-lightbox .col-sm-6 { max-width: none; padding: 0; margin: 0; }
    .right-lightbox a.thumbnail, .right-lightbox div.thumbnail { display: block; }
    .right-lightbox .thumb-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; }
    .right-lightbox .blue-background-primary.thumb-img { display: flex; flex-direction: column; align-items: center; justify-content: center; }
    .right-lightbox .blue-background-primary.thumb-img > .text-center { width: 100%; }
    .right-lightbox .blue-background-primary.thumb-img img.mt-3 { margin-top: 0 !important; width: 45% !important; }
}

/* Logo du pied de page cliquable */
.footer .logo-footer { display: block; }

/* Écrans tactiles : pas de survol « collant » qui laisserait un filtre coloré après l'avoir décoché */
@media (hover: none) {
    .bouton-recherche-filtre:hover:not(.blue-btn) { background-color: transparent !important; border-color: var(--accent) !important; color: var(--accent) !important; }
    .bouton-home-filtre:hover:not(.blue-btn) { background-color: rgba(196, 196, 196, 0.9) !important; color: #fff !important; }
}

/* Gouttières régulières entre les biens sur ordinateur */
@media (min-width: 992px) {
    /* filtres au-dessus de l'illustration de l'en-tête ; lien « Recherche détaillée » centré, hors de l'illustration */
    .section-filtres { position: relative; z-index: 2; }
    .lien-recherche-detaillee { text-align: left !important; margin-bottom: 0; }
    .lien-recherche-detaillee span { float: none !important; display: inline-block; margin-top: 20px !important; }
    .picto-home-header { margin-left: 0 !important; margin-top: -154px !important; text-align: right; padding-right: 24px; }
    .picto-home-header img { width: 150px !important; }
    /* grille : espacement entre les biens, plus de marge interne dans les vignettes */
    .card-bien { padding-top: 40px; margin-left: 0 !important; margin-right: 0 !important; column-gap: 32px; }
    .card-bien > .border-vignette-bien { margin-top: 0 !important; margin-bottom: 44px !important; padding: 0 !important; border: 0 !important; }
    .card-bien > .col-lg-4 { flex: 0 0 calc((100% - 64px) / 3); max-width: calc((100% - 64px) / 3); }
    .card-bien > .col-lg-3 { flex: 0 0 calc((100% - 96px) / 4); max-width: calc((100% - 96px) / 4); }
    .card-bien > .col-lg-6 { flex: 0 0 calc((100% - 32px) / 2); max-width: calc((100% - 32px) / 2); }
    /* survol : léger zoom de la photo au lieu du cadre */
    .card-bien .vignette-bien { transition: transform .4s ease; }
    .card-bien > .border-vignette-bien:hover .vignette-bien { transform: scale(1.04); }
}

@media (max-width: 575.98px) {

    /* ---------- Général ---------- */
    body { overflow-x: hidden; }
    .courbe-com-high { max-width: 100%; height: auto; }
    p.text-rumble, span.text-rumble, h1.text-rumble, h2, h3 { line-height: 1.2 !important; }
    .titre-page { font-size: 34px !important; line-height: 1.12 !important; }
    .titre-page .sous-titre-page { font-size: 28px !important; line-height: 1.15 !important; }

    /* ---------- Bloc « Trouvez ici le toit qui vous va » + filtres ---------- */
    .zone-mobile { font-size: 14px !important; letter-spacing: .08em; font-weight: 600; margin-bottom: 4px; }
    .zone-mobile + p.text-rumble { font-size: 30px !important; line-height: 1.12 !important; margin: 0 0 14px !important; }
    .listes-criteres-mobile1 .row.mt-3 { margin-top: 8px !important; }
    .listes-criteres-mobile1 .card { border: 0; background: transparent; }
    .listes-criteres-mobile1 .card-header { padding: 0; background: transparent; border: 0; }
    .listes-criteres-mobile1 .btn-link { padding: 14px 16px; text-decoration: none !important; box-shadow: none !important; }
    .listes-criteres-mobile1 .btn-link > span.text-rumble {
        display: flex !important; align-items: center; gap: 12px;
        font-size: 19px !important; line-height: 1.2 !important;
    }
    .listes-criteres-mobile1 .btn-link > span.text-rumble > img { float: none !important; width: 24px !important; flex: 0 0 24px; }
    .listes-criteres-mobile1 .btn-link > span.text-rumble > span { float: none !important; order: 2; }
    .listes-criteres-mobile1 .btn-link .icon-plus { order: 3; margin-left: auto; font-size: 16px; color: var(--accent) !important; }
    .listes-criteres-mobile1 .hr-barre { margin: 0 16px; border-color: #ececef; }
    .listes-criteres-mobile1 .collapse, .listes-criteres-mobile1 .collapsing { flex: 0 0 100%; width: 100%; }
    .listes-criteres-mobile1 .card-body { padding: 2px 16px 18px; }
    .listes-criteres-mobile1 .card-body > .container { padding: 0; }
    .listes-criteres-mobile1 .card-body .row.mt-2 { margin-top: 0 !important; }
    .listes-criteres-mobile1 .card-body .row.justify-content-center {
        display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 10px !important;
        justify-content: stretch !important;
    }
    .listes-criteres-mobile1 .card-body .row.justify-content-center > div { margin: 0 !important; padding: 0 !important; max-width: none; }
    .listes-criteres-mobile1 .bouton-recherche-filtre {
        width: 100%; min-width: 0 !important; padding: 12px 8px; font-size: 15px; font-weight: 600;
        border: 1.5px solid var(--accent); border-radius: 10px !important;
    }
    .listes-criteres-mobile1 select.form-control {
        height: 48px; font-size: 16px; border: 1.5px solid var(--accent); border-radius: 0;
        padding: 0 14px; text-align-last: left;
    }

    /* ---------- Annonces : deux colonnes ---------- */
    .container.liste { padding-left: 16px !important; padding-right: 16px !important; }
    .card-bien { margin-left: -6px !important; margin-right: -6px !important; }
    .card-bien .border-vignette-bien {
        flex: 0 0 50%; max-width: 50%;
        padding: 0 6px !important; margin: 0 0 20px !important;
    }
    .card-bien .vignette-bien { width: 100%; height: auto !important; aspect-ratio: 16 / 10; object-fit: cover; }
    .card-bien .border-vignette-bien a { position: relative; display: block; }
    .card-bien .logo-3d { width: 28px !important; top: 8px; left: 8px; }
    .card-bien .top-right-corner { width: auto; transform: none; top: 8px; right: 0; padding: 3px 8px; box-shadow: none; }
    .card-bien .border-vignette-bien p.mt-3 { margin: 8px 0 0 !important; line-height: 1.25; }
    .card-bien .border-vignette-bien p.mt-3 > span:first-child { font-size: 16px !important; }
    .card-bien .border-vignette-bien p.mt-3 > span.text-rumble { font-size: 14px !important; letter-spacing: .04em; color: var(--encre); }
    .card-bien .border-vignette-bien h2 { margin: 3px 0 0; line-height: 1 !important; }
    .card-bien .border-vignette-bien span[style*="font-size: 12px"] {
        font-size: 14px !important; line-height: 1.35 !important; color: var(--gris) !important;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .card-bien .txt-savoir { display: none; }
    .message-oups { font-size: 22px !important; line-height: 1.3 !important; }

    /* ---------- Blocs de services (Besoin d'un chez-vous ?…) ---------- */
    /* même bleu que les courbes décoratives du bloc avis (#44aec7), au lieu de #5eb9d1 */
    .blue-background-primary { background-color: var(--accent) !important; padding-left: 16px !important; padding-right: 16px !important; padding-bottom: 8px !important; }
    .blue-background-primary .white-background { margin-top: 16px !important; padding: 22px 18px !important; }
    .blue-background-primary .white-background img.img-fluid { width: 64px !important; margin-bottom: 10px; }
    .blue-background-primary .white-background .pr-5 { padding-right: 15px !important; }
    .blue-background-primary .white-background span.text-rumble { font-size: 22px !important; }
    .green-background-primary { margin: 0 !important; padding: 4px 16px 16px !important; }
    .green-background-primary .colMenu { margin: 16px 0 0 !important; padding: 22px 18px !important; flex: 0 0 100%; max-width: 100%; }
    .green-background-primary .colMenu img.img-fluid { width: 72px !important; }
    .green-background-primary .colMenu span[style*="20px"] { font-size: 17px !important; line-height: 1.35; padding: 0 6px; }
    .green-background-primary .colMenu .bouton-generique { margin-top: 14px !important; }
    .bouton-generique { font-size: 14px !important; font-weight: 600; padding: 10px 20px !important; border-width: 1.5px; }

    /* ---------- « Notre agence… » : valeurs sur deux colonnes ---------- */
    .section-valeurs { padding-left: 20px !important; padding-right: 20px !important; }
    .section-valeurs .row { margin-left: 0 !important; margin-right: 0 !important; }
    .section-valeurs p.text-rumble { font-size: 28px !important; margin-bottom: 0; }
    .section-valeurs .row ~ .row, .section-valeurs > .row:nth-child(2) {
        display: grid; grid-template-columns: 1fr 1fr; gap: 26px 14px; margin-top: 18px !important;
    }
    .section-valeurs .row > [class*="col"] { padding: 0; max-width: none; }
    .section-valeurs .row > [class*="col"]:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .section-valeurs img { width: 84px !important; height: 84px !important; }
    .section-valeurs p.mt-4 { margin: 6px 0 0 !important; }
    .section-valeurs span.blue { font-size: 16px !important; line-height: 1.25 !important; display: inline-block; }
    .section-valeurs span[style*="14px"] { font-size: 14px !important; line-height: 1.4; display: block; margin-top: 4px !important; }
    .section-valeurs span.blue + br, .section-valeurs span[style*="14px"] + br { display: none; }

    /* ---------- Témoignages ---------- */
    #bandeau-brun { margin-top: 0 !important; }
    .triangle-rectangle { display: none; }
    /* flèches sous les avis, de part et d'autre des points, au lieu de recouvrir le texte */
    #carousel-com { padding-bottom: 48px; }
    #carousel-com .carousel-indicators { bottom: 0; margin: 0; height: 44px; align-items: center; }
    #carousel-com .carousel-control-prev, #carousel-com .carousel-control-next { top: auto; bottom: 0; width: 44px; height: 44px; opacity: .9; z-index: 16; }
    #carousel-com .carousel-control-prev { left: calc(50% - 96px); }
    #carousel-com .carousel-control-next { right: calc(50% - 96px); }
    .carousel-text-avis { font-size: 15px !important; line-height: 1.55; text-shadow: 0 1px 3px rgba(0,0,0,.45); padding-left: 8px !important; padding-right: 8px !important; }
    .titre-temoignages { font-size: 26px !important; line-height: 1.2 !important; display: inline-block; margin-bottom: .75rem; }
    .sous-titre-temoignages { font-size: 16px !important; }

    /* ---------- Page contact : titre au-dessus de la vague ---------- */
    .background-corpo .mt-8 { margin-top: 1.5rem !important; }
    .background-corpo .titre-header { margin-top: 0; font-size: 30px; }

    /* ---------- Pied de page ---------- */
    div.footer { height: auto !important; }
    .footer > .container { padding: 36px 24px 28px !important; }
    .footer .row > [class*="col-"] {
        flex: 0 0 100%; max-width: 100%;
        margin-left: 0 !important; margin-top: 22px !important;
        padding-left: 0 !important; padding-right: 0 !important; text-align: center;
    }
    .footer .row > [class*="col-"]:first-child { margin-top: 0 !important; }
    .footer .row > [class*="col-"]:first-child img { width: 78% !important; max-width: 280px; display: block; margin: 0 auto; }
    .footer .row p { margin-bottom: 8px; line-height: 1.6; }
    .footer .d-flex { justify-content: center !important; gap: 18px; margin-top: 6px !important; }
    .footer .d-flex a { margin: 0 !important; }
    .footer .list-footer { padding: 0; margin: 0; list-style: none; }
    .footer .list-footer li, .footer .text-footer { font-size: 14px; letter-spacing: .05em; padding: 3px 0; }
    .footer .sous-text-footer { font-size: 14px; }
    .footer .hr-barre-bleu { margin: 0 auto 12px !important; }
    .footer .arrow-up {
        position: static !important; right: auto !important; top: auto !important;
        display: flex; justify-content: center; align-items: center; gap: 22px;
        width: 100%; margin-top: 26px;
    }
    .footer .arrow-up img { width: 62px !important; }
    .footer #arrow-up {
        position: fixed; right: 16px; bottom: 16px; z-index: 1040;
        width: 48px; height: 48px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        background: var(--accent); color: #fff !important; font-size: 20px !important;
        box-shadow: 0 4px 14px rgba(0,0,0,.28);
        opacity: 0; pointer-events: none; transition: opacity .25s ease;
    }
    .footer #arrow-up.arrow-up-visible { opacity: 1; pointer-events: auto; }
}
