/* Vocalimmo — ce que l'application ajoute à la charte des maquettes (rv.css) : plein écran du téléphone,
   largeurs de 375 à 430 px, zones de sécurité, aucune barre de défilement visible. Aucune valeur de design n'est changée. */
html, body { margin: 0; height: 100%; background: #c3e6fd; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
/* Hauteur = la partie visible quand les barres de Safari sont affichées (100svh) : la barre de menu de l'appli reste au-dessus de celle de Safari.
   Ouverte depuis l'écran d'accueil, l'appli n'a pas de barre Safari et prend tout l'écran. */
#app { position: fixed; left: 0; right: 0; top: 0; height: 100%; overflow: hidden; }
@supports (height: 100svh) { #app { height: 100svh; } }
#app > .rv { width: 100%; height: 100%; }

/* Les images de fond gardent leur proportion d'origine (780 × 1385) à toutes les largeurs. */
.rv .fond-img { aspect-ratio: 780 / 1385; height: auto; }

/* Zones de sécurité : encoche en haut, barre d'accueil en bas. */
.rv > header.entete:first-of-type { padding-top: calc(16px + env(safe-area-inset-top)) !important; }
/* Les barres flottantes du bas descendent dans la zone de la barre d'accueil de l'iPhone (24 px gagnés), sans la toucher. */
:root { --sb: max(0px, calc(env(safe-area-inset-bottom) - 24px)); }
.rv .nav { bottom: calc(14px + var(--sb)); }
.rv .defile { padding-bottom: calc(112px + var(--sb)); }

/* Aucune barre de défilement visible, le défilement reste actif. */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

.rv a, .rv button { -webkit-user-select: none; user-select: none; }
.rv input, .rv textarea, .rv select { font-family: inherit; }

/* Message bref (enregistré, erreur…). */
#vi-message { position: fixed; left: 50%; bottom: calc(96px + var(--sb)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: linear-gradient(160deg, #1d4778, #0e2a47); color: #fff; font: 600 13.5px/1.35 "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
  padding: 11px 16px; border-radius: 16px; box-shadow: 0 16px 30px -12px rgba(14,42,71,.6); max-width: calc(100% - 40px); z-index: 100; transition: opacity .2s, transform .2s; }
#vi-message.vu { opacity: 1; transform: translate(-50%, 0); }

/* La carte MapLibre remplit l'écran sous les commandes. */
.rv .carte-gl { position: absolute; inset: 0; z-index: 0; }
.rv .maplibregl-ctrl-attrib { display: none; }

/* Feuille qui monte depuis le bas. */
.rv .monte { transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.rv .monte.cache { transform: translateY(105%); }

/* ---------- Mouvement (0.4.4) ---------- */
/* Transitions entre les pages (View Transitions de Safari 18 et Chrome) : le menu du bas reste en place. */
/* Entre deux onglets, le menu du bas reste en place ; quand on ouvre une fiche, il part avec sa page. */
html:is([data-sens="fondu"], [data-sens="vue"]) .rv > nav.nav[aria-label="Navigation"] { view-transition-name: menu-bas; }
html[data-sens="vue"]::view-transition-old(root) { animation: vi-efface .14s ease-out both; }
html[data-sens="vue"]::view-transition-new(root) { animation: vi-montre .18s ease-out both; }
::view-transition-group(menu-bas) { animation: none; }
::view-transition-old(menu-bas), ::view-transition-new(menu-bas) { animation: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .26s; animation-timing-function: cubic-bezier(.2,.8,.2,1); }
html[data-sens="avant"]::view-transition-old(root) { animation-name: vi-recule; }
html[data-sens="avant"]::view-transition-new(root) { animation-name: vi-arrive-droite; }
html[data-sens="arriere"]::view-transition-old(root) { animation-name: vi-part-droite; z-index: 2; }
html[data-sens="arriere"]::view-transition-new(root) { animation-name: vi-revient; }
html[data-sens="fondu"]::view-transition-old(root) { animation: vi-efface .18s ease-out both; }
html[data-sens="fondu"]::view-transition-new(root) { animation: vi-montre .22s ease-out both; }
@keyframes vi-arrive-droite { from { transform: translateX(100%); } }
@keyframes vi-recule { to { transform: translateX(-22%); opacity: .6; } }
@keyframes vi-part-droite { to { transform: translateX(100%); } }
@keyframes vi-revient { from { transform: translateX(-22%); opacity: .6; } }
@keyframes vi-efface { to { opacity: 0; } }
@keyframes vi-montre { from { opacity: 0; } }
/* Sans View Transitions (iPhone plus ancien) : la nouvelle page arrive seule. */
#app > .rv.arrivee-avant { animation: vi-arrive-droite .26s cubic-bezier(.2,.8,.2,1); }
#app > .rv.arrivee-arriere { animation: vi-revient .26s cubic-bezier(.2,.8,.2,1); }
#app > .rv.arrivee-fondu { animation: vi-montre .22s ease-out; }

/* Apparition des blocs l'un après l'autre. */
.rv .apparait { animation: vi-apparait .42s cubic-bezier(.2,.8,.2,1) both; }
@keyframes vi-apparait { from { opacity: 0; transform: translateY(14px); } }

/* Retour au toucher : boutons, cartes et lignes s'enfoncent légèrement. */
.rv :is(a, button, .tuile, .ligne):not(.maplibregl-marker):not(.mk) { transition: transform .14s ease-out, filter .14s ease-out; }
.rv :is(a, button, .tuile, .ligne):not(.maplibregl-marker):not(.mk):active { transform: scale(.965); filter: brightness(.97); }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .rv .apparait, #app > .rv[class*="arrivee-"] { animation: none !important; }
  .rv :is(a, button, .tuile, .ligne):active { transform: none !important; }
}

/* Carte : les trois boutons du résumé d'un bien (Fiche, Y aller, Appeler) tiennent dès 360 px. */
/* Chaque bouton prend la largeur de son contenu, puis la place restante est partagée à parts égales. */
.rv .actions-resume .btn { flex: 1 1 auto; min-width: 0; padding: 0 14px; gap: 6px; }

/* ---------- Carte dégagée (0.5.0) ---------- */
/* Menu des filtres : il se déplie sous son bouton. */
.rv.carte-degagee .liste-filtres { transform-origin: 20px 0; transform: scale(.92) translateY(-6px); opacity: 0; pointer-events: none; transition: transform .18s cubic-bezier(.2,.8,.2,1), opacity .15s ease-out; }
.rv.carte-degagee.filtres-ouverts .liste-filtres { transform: none; opacity: 1; pointer-events: auto; }
.rv.carte-degagee .menu-filtre .ic:last-child { transition: transform .18s; }
.rv.carte-degagee.filtres-ouverts .menu-filtre .ic:last-child { transform: rotate(180deg); }
/* Recherche : fermée, elle n'existe que sous forme de loupe ; elle se déplie depuis la droite. */
.rv.carte-degagee .cherche-carte { clip-path: inset(0 0 calc(100% - 44px) calc(100% - 98px) round 22px); opacity: 0; pointer-events: none; transition: clip-path .3s cubic-bezier(.2,.8,.2,1), opacity .2s ease-out; }
.rv.carte-degagee.recherche-ouverte .cherche-carte { clip-path: inset(0 0 0 0 round 22px); opacity: 1; pointer-events: auto; }
.rv.carte-degagee .resultats-carte:empty { display: none; }
.rv.carte-degagee .resultats-carte { max-height: 60vh; overflow-y: auto; }
/* Position et Photo : seulement en Prospection, et jamais sous le résumé d'un bien. */
.rv.carte-degagee .terrain-carte { transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .18s; }
.rv.carte-degagee.en-prospection:not(.resume-ouvert) .terrain-carte { transform: none; opacity: 1; pointer-events: auto; }
/* Les feuilles (fonds de carte, choix, menu Plus) passent toujours au-dessus du résumé d'un bien. */
.rv .vi-f .voile { z-index: 39; }
.rv .vi-f .feuille { z-index: 40; }

/* ---------- 0.5.2 ---------- */
/* Les feuilles montent du bas en douceur (et le voile apparaît en fondu) ; elles redescendent à la fermeture. */
.rv .vi-f .feuille { animation: vi-feuille-monte .32s cubic-bezier(.2,.8,.2,1) backwards; }
.rv .vi-f .voile { animation: vi-montre .25s ease-out backwards; }
.rv .vi-f.sort .feuille { animation: vi-feuille-descend .24s cubic-bezier(.4,0,1,1) both; }
.rv .vi-f.sort .voile { animation: vi-efface .24s ease-in both; }
@keyframes vi-feuille-monte { from { transform: translateY(100%); } }
@keyframes vi-feuille-descend { to { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .rv .vi-f .feuille, .rv .vi-f .voile { animation: none !important; } }
/* Carte : les ronds blancs se détachent nettement d'un fond clair. */
.rv.carte-degagee .rond:not(.azur) { border: 1px solid rgba(14,42,71,.22); box-shadow: 0 8px 18px -6px rgba(14,42,71,.55); }
.rv.carte-degagee .menu-filtre { border: 1px solid rgba(14,42,71,.12); }
/* Carte : le bouton des filtres rétrécit plutôt que de pousser les ronds hors de l'écran. */
.rv.carte-degagee .menu-filtre { flex: 0 1 auto; min-width: 0; }
.rv.carte-degagee .menu-filtre > span:first-of-type { overflow: hidden; text-overflow: ellipsis; }
/* Segments (durée, statut…) : le texte ne déborde jamais de son bouton ; plus petit quand il y a 5 choix. */
.rv [data-seg] button { overflow: hidden; text-overflow: ellipsis; }
.rv [data-seg][data-n="5"] { gap: 3px !important; }
.rv [data-seg][data-n="5"] button { font-size: 12.5px !important; letter-spacing: -.01em; }
/* Carte : les commandes du bas à droite s'effacent quand la petite fiche d'un bien est ouverte. */
.rv.carte-degagee .commandes-carte { transition: opacity .2s, transform .2s; }
.rv.carte-degagee.resume-ouvert .commandes-carte { opacity: 0; pointer-events: none; transform: translateY(12px); }
.rv.carte-degagee .zoom-carte button:active { background: var(--azur-pale); }
/* Carte : après « Ma position », Position et Photo apparaissent aussi, pour entrer un bien là où l'on se trouve. */
.rv.carte-degagee.localise:not(.resume-ouvert) .terrain-carte { transform: none; opacity: 1; pointer-events: auto; }
/* Menu des filtres : le nombre de biens en jaune sur le bouton, en bleu marine dans la liste. */
.rv.carte-degagee .menu-filtre .n { color: var(--mimosa); }
.rv.carte-degagee .liste-filtres .n { color: var(--encre); }
/* Ouverte depuis l'écran d'accueil (sans barre Safari) : l'appli épouse exactement l'écran, du haut jusqu'en bas. */
@media (display-mode: standalone) { #app { top: 0; bottom: 0; height: auto !important; } }
/* Fin de page jamais cachée sous le menu du bas. Safari (iPhone) ne compte pas la marge du bas d'une colonne qui défile :
   on la remplace par un espace vide en bout de page, que tous les navigateurs comptent. */
.rv .defile { padding-bottom: 0; }
.rv .defile::after { content: ""; flex: none; display: block; height: calc(120px + env(safe-area-inset-bottom)); }
/* Galerie plein écran des photos d'un bien : apparaît en douceur, photos qu'on fait défiler du doigt. */
.rv .galerie { position: absolute; inset: 0; z-index: 60; background: #08121f; display: flex; flex-direction: column; animation: vi-galerie .28s cubic-bezier(.2,.8,.2,1) both; }
.rv .galerie.sort { animation: vi-efface .2s ease-in both; }
@keyframes vi-galerie { from { opacity: 0; transform: scale(.94); } }
.rv .galerie-haut { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 16px 10px; color: #fff; font-weight: 700; font-size: 15px; }
.rv .galerie-haut .rond { background: rgba(255,255,255,.14); color: #fff; border: 0; box-shadow: none; }
.rv .galerie-defile { flex: 1; min-height: 0; min-width: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rv .galerie-page { flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; padding: 0 0 calc(30px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.rv .galerie-page img { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (prefers-reduced-motion: reduce) { .rv .galerie, .rv .galerie.sort { animation: none; } }

/* Étiquettes de prix de la carte un peu plus grandes que la maquette (voulu par Thierry, 29/11). */
.rv .mk.prix { height: 34px; padding: 0 12px; font-size: 14px; font-weight: 800; }
.rv .mk.prix::after { width: 12px; height: 12px; bottom: -6px; }

/* Photos en attente d'envoi (réseau faible) : pastille en haut de l'écran ; la toucher relance l'envoi (retours du 29/11). */
#vi-envois { position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translate(-50%, -16px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; z-index: 90;
  background: linear-gradient(160deg, #1d4778, #0e2a47); color: #fff; font: 600 13px/1 "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
  box-shadow: 0 10px 22px -10px rgba(14,42,71,.6); white-space: nowrap; transition: opacity .2s, transform .2s; }
#vi-envois b { color: #ffd60a; font-weight: 800; }
#vi-envois .ic { width: 16px; height: 16px; }
#vi-envois.vu { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* Tirer vers le bas pour actualiser : rond qui descend, flèche qui se retourne, puis tourne pendant la mise à jour. */
#vi-tirer { position: fixed; left: 50%; top: calc(8px + env(safe-area-inset-top)); width: 38px; height: 38px; border-radius: 50%; z-index: 95; pointer-events: none;
  display: flex; align-items: center; justify-content: center; background: #fff; color: #0e2a47; opacity: 0; transform: translate(-50%, 0);
  box-shadow: 0 8px 18px -8px rgba(14,42,71,.5); transition: opacity .15s; }
#vi-tirer.pret { background: linear-gradient(150deg, #ffe766, #ffc400); }
#vi-tirer.tourne { transition: transform .2s; }
#vi-tirer.tourne .ic { animation: vi-tourne .8s linear infinite; }
@keyframes vi-tourne { to { transform: rotate(360deg); } }

/* « Son histoire » : une entrée par note, la date en petit et en gris, de l'air entre les entrées. */
.rv .histoire { padding: 4px 0; }
.rv .histoire .entree { padding: 13px 16px 14px; }
.rv .histoire .entree + .entree { border-top: 1px solid var(--filet); }
.rv .histoire .quand { display: block; font-size: 12px; font-weight: 600; color: var(--gris); margin-bottom: 4px; }
.rv .histoire p { font-size: 14px; line-height: 1.55; white-space: pre-line; margin: 0; }
/* Notes mises en forme : paragraphes, titres en gras un peu plus grands, liens soulignés (29/11). */
.rv .texte-note { font-size: 14px; line-height: 1.55; }
.rv .texte-note .p-note { display: block; }
.rv .texte-note .vide-note { display: block; height: .6em; }
.rv .texte-note .t-note, .rv .notes-ed h3 { display: block; font-weight: 800; font-size: 16px; line-height: 1.35; margin: 6px 0 2px; color: var(--encre); }
.rv .texte-note a, .rv .notes-ed a { color: var(--mer); text-decoration: underline; }
.rv .notes-ed { min-height: 120px; border-radius: 15px; border: 1px solid var(--filet); background: #f5f9fd; padding: 12px 14px; font-size: 15px; line-height: 1.5; color: var(--encre); outline: none; -webkit-user-select: text; user-select: text; }
.rv .notes-ed:focus { border-color: #1d4778; background: #fff; }
.rv .notes-ed p { margin: 0; }
.carte-gl.loin .mk b { display: none !important; }
.etq { cursor: default; } /* reste en position absolue (MapLibre) : sa taille suit l'étiquette */
.etq .corps { display: block; position: relative; }
.etq .corps svg { display: block; overflow: visible; }
.etq .sol { position: absolute; left: 50%; bottom: -5px; width: 34px; height: 9px; margin-left: -17px; border-radius: 50%; background: radial-gradient(closest-side, rgba(14,42,71,.38), rgba(14,42,71,0)); }
.etq.attend .corps, .etq.attend .sol { opacity: 0; }
.etq.atterrit .corps { animation: etq-tombe .9s cubic-bezier(.3,.7,.4,1) both; }
.etq.atterrit .sol { animation: etq-ombre .9s cubic-bezier(.3,.7,.4,1) both; }
@keyframes etq-tombe { 0% { transform: translateY(-70px); opacity: 0; } 45% { opacity: 1; } 62% { transform: translateY(0); } 76% { transform: translateY(-9px); } 88% { transform: translateY(0); } 94% { transform: translateY(-2px); } 100% { transform: translateY(0); } }
@keyframes etq-ombre { 0% { transform: scale(.3); opacity: 0; } 62% { transform: scale(1); opacity: 1; } 76% { transform: scale(.8); } 88%, 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .etq.atterrit .corps, .etq.atterrit .sol { animation: none; } .etq.attend .corps, .etq.attend .sol { opacity: 1; } }
/* Ventes DVF (30/11) : losange violet cerclé de blanc ; pastille blanche avec le nombre de ventes au même endroit. */
.dvf-pt { width: 30px; height: 30px; cursor: pointer; }
.dvf-pt > i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff4c4; color: #0e2a47; font-style: normal; font-size: 14px; font-weight: 800; box-shadow: 0 2px 7px rgba(0,0,0,.45); }
.dvf-pt > b { position: absolute; left: 20px; top: -9px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #0e2a47; color: #fff4c4; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
/* De près : étiquette violette avec le prix de la dernière vente et le nombre de ventes. */
.dvf-pt.pres { width: auto; height: auto; }
.dvf-pt.pres .c { display: flex; flex-direction: column; align-items: center; padding: 5px 11px 4px; border-radius: 12px; background: #fff4c4; color: #0e2a47; line-height: 1.15; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.dvf-pt.pres .c b { font-size: 14px; font-weight: 800; }
.dvf-pt.pres .c em { font-style: normal; font-size: 11px; font-weight: 700; }
/* Une adresse trouvée par la loupe (30/11) : épingle jaune à pointe. */
.adr-ici { display: flex; flex-direction: column; align-items: center; filter: drop-shadow(0 4px 8px rgba(0,0,0,.45)); }
.adr-ici .c { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #ffd60a; color: #0e2a47; }
.adr-ici i { width: 0; height: 0; margin-top: -2px; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 11px solid #ffd60a; }
/* Une vente située (30/11) : bulle violette avec le prix et la date, pointe vers l'adresse. */
.dvf-ici { display: flex; flex-direction: column; align-items: center; cursor: pointer; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.dvf-ici .c { display: flex; flex-direction: column; align-items: center; padding: 6px 12px 5px; border-radius: 13px; background: #fff4c4; color: #0e2a47; line-height: 1.15; white-space: nowrap; }
.dvf-ici .c b { font-size: 15px; font-weight: 800; }
.dvf-ici .c span { font-size: 11.5px; font-weight: 700; }
.dvf-ici i { width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 9px solid #fff4c4; }
.vente-touchable { cursor: pointer; }
.vente-touchable:active { background: var(--mimosa-pale); }
.legende-dvf::before { content: "€"; width: 18px; height: 18px; border-radius: 50%; background: #fff4c4; color: #0e2a47; box-shadow: inset 0 0 0 1px rgba(14,42,71,.3); font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.legende-dvf[hidden] { display: none !important; }
.legende-dvf.charge::before { animation: vi-tourne .9s linear infinite; }
/* « Vous êtes ici » (30/11) : bleu vif cerclé de blanc, halo qui pulse ; ne se confond pas avec le point d'un bien. */
.moi-pos { width: 22px; height: 22px; pointer-events: none; }
.moi-pos::before { content: ""; position: absolute; left: -14px; top: -14px; width: 50px; height: 50px; border-radius: 50%; background: rgba(26,115,232,.28); animation: moi-pulse 2s ease-out infinite; }
.moi-pos i { position: absolute; inset: 0; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.4); }
@keyframes moi-pulse { 0% { transform: scale(.45); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .moi-pos::before { animation: none; opacity: .6; } }
.rv .notes-ed .date-note { font-size: 12px; font-weight: 800; color: var(--gris); margin: 12px 0 4px; -webkit-user-select: none; user-select: none; }
.rv .notes-ed .date-note:first-child { margin-top: 0; }
/* Safari iPhone laisse la date collée en haut du champ : une hauteur de ligne égale au champ la recentre (29/11). */
.rv input[type=date], .rv input[type=datetime-local], .rv input[type=time] { padding-top: 0; padding-bottom: 0; line-height: 48px !important; }
.rv input[type=date]::-webkit-date-and-time-value, .rv input[type=datetime-local]::-webkit-date-and-time-value, .rv input[type=time]::-webkit-date-and-time-value { line-height: 48px; }

/* Champs date sur iPhone : Safari leur impose une largeur minimale et centre la date ; ils empiétaient sur le champ voisin
   (« Prochaine relance » / « Appels sans réponse », 29/11). Ici, la date est alignée à gauche et le champ tient dans sa colonne. */
.rv input[type=date], .rv input[type=datetime-local], .rv input[type=time] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; display: block; text-align: left; }
.rv input[type=date]::-webkit-date-and-time-value, .rv input[type=datetime-local]::-webkit-date-and-time-value, .rv input[type=time]::-webkit-date-and-time-value { text-align: left; margin: 0; }
