/* Fiche offre 2026 : en-tête, actions, résumé, caractéristiques, proximité, similaires, partage, barre collante. Aucune animation en mouvement réduit. */

/* ---------- mosaïque ---------- */
.fm { position: relative; display: grid; gap: 8px; height: 440px; border-radius: var(--r-md, 12px); overflow: hidden; background: var(--c-bg-2, #f1f5f9); }
.fm--1 { grid-template-columns: 1fr; }
.fm--2 { grid-template-columns: 1fr 1fr; }
.fm--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.fm--3 .fm__cell--1 { grid-row: 1 / 3; }
.fm--4 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.fm--4 .fm__cell--1 { grid-row: 1 / 3; }
.fm--4 .fm__cell--4 { grid-column: 2 / 4; }
.fm--5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.fm--5 .fm__cell--1 { grid-row: 1 / 3; }
.fm__cell { position: relative; margin: 0; min-width: 0; min-height: 0; overflow: hidden; background: var(--c-bg-2, #e2e8f0); }
.fm__cell::before { content: ""; position: absolute; inset: -8%; background: var(--lq) center / cover; filter: blur(14px); }  /* flou avant l'image nette */
.fm__btn { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.fm__btn picture, .fm__btn img { display: block; width: 100%; height: 100%; }
.fm__btn img { object-fit: cover; transition: opacity .4s ease, transform .5s ease; }
.fm__cell[data-lq="1"] img { opacity: 0; }
.fm__cell[data-lq="1"].is-loaded img { opacity: 1; }
.fm__btn:hover img { transform: scale(1.03); }
.fm__btn:focus-visible { outline: 3px solid var(--ui-focus, #0052A3); outline-offset: -3px; }
.fm__all { position: absolute; right: 12px; bottom: 12px; z-index: 2; }
.fm__kb { position: absolute; left: 12px; bottom: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(15, 23, 42, .72); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.fm__kb[aria-pressed="true"] { background: var(--c-brand, #3D5A73); }
.fm__kb:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fm[data-kb="on"] .fm__main img { animation: fm-kb 26s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes fm-kb { from { transform: scale(1); } to { transform: scale(1.12) translate(-1.5%, -1%); } }
@media (max-width: 1023.98px) {
    .fm { height: 260px; margin: 0 -24px; border-radius: 0; grid-template-columns: 1fr !important; grid-template-rows: 1fr !important; }
    .fm .fm__cell { grid-row: auto !important; grid-column: auto !important; }
    .fm .fm__cell:not(.fm__main) { display: none; }
}
@media (max-width: 639.98px) { .fm { margin: 0 -16px; } }

/* ---------- visionneuse ---------- */
.fv { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0b1220; color: #fff; overflow: hidden; }
.fv[open] { display: flex; flex-direction: column; }
.fv::backdrop { background: #0b1220; }
.fv__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.fv__tabs { display: flex; gap: 4px; overflow-x: auto; min-width: 0; }
.fv__top > .fv__tab--lien { margin-right: auto; }
.fv__tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: #e2e8f0; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.fv__tab[aria-selected="true"] { background: #fff; color: #0f172a; }
.fv__tab:hover:not([aria-selected="true"]) { background: rgba(255, 255, 255, .14); }
.fv__tab:focus-visible, .fv__close:focus-visible, .fv__nav:focus-visible, .fv__thumb:focus-visible, .fv__stage:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fv__close { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.fv__panel { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.fv__panel[hidden] { display: none; }
.fv__stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; cursor: zoom-in; }
.fv__stage.is-zoom { cursor: grab; }
.fv__img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transform-origin: 0 0; will-change: transform; opacity: 0; transition: opacity .25s ease; }
.fv__img.is-ok { opacity: 1; }
.fv__nav { position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -48px; border: 0; border-radius: 999px; background: rgba(15, 23, 42, .7); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.fv__nav--prev { left: 12px; } .fv__nav--next { right: 12px; }
.fv__count { position: absolute; top: 12px; left: 12px; z-index: 2; margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(15, 23, 42, .72); font-size: 14px; font-weight: 600; }
.fv__thumbs { flex: 0 0 auto; display: flex; gap: 8px; list-style: none; margin: 0; padding: 10px 12px; overflow-x: auto; justify-content: safe center; background: rgba(0, 0, 0, .35); }
.fv__thumb { display: block; padding: 0; width: 96px; height: 64px; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #1e293b; opacity: .6; cursor: pointer; }
.fv__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fv__thumb[aria-current="true"] { border-color: #fff; opacity: 1; }
.fv__map { flex: 1 1 auto; min-height: 0; background: #1e293b; }
.fv__note { margin: 0; padding: 8px 12px; font-size: 13px; color: #cbd5e1; }
::view-transition-group(fv-photo) { animation-duration: .35s; }

/* ---------- résumé ---------- */
.fr { margin-top: 24px; }
.fr__liste { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.fr__item { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; border: 1px solid var(--c-border, #e2e8f0); border-radius: var(--r-md, 12px); background: #fff; }
.fr__picto { color: var(--c-brand, #3D5A73); }
.fr__valeur { font-size: 22px; line-height: 28px; font-weight: 700; color: var(--c-text, #0f172a); overflow-wrap: anywhere; }
.fr__valeur small { font-size: 14px; font-weight: 600; color: var(--c-text-2, #475569); }
.fr__libelle { font-size: 13px; color: var(--c-text-2, #475569); }
.fr__dpe { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 32px; padding: 0 10px; border-radius: 6px; color: #0f172a; background: #e2e8f0; font-size: 18px; }
.fr__dpe--A { background: #2f8f3f; color: #fff; } .fr__dpe--B { background: #6bb43a; color: #0f172a; } .fr__dpe--C { background: #c9d92f; color: #0f172a; }
.fr__dpe--D { background: #f6e03a; color: #0f172a; } .fr__dpe--E { background: #f2a93b; color: #0f172a; } .fr__dpe--F { background: #e3622b; color: #fff; } .fr__dpe--G { background: #c0262d; color: #fff; }

/* ---------- proximité ---------- */
.fp__liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fp__item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--c-border, #e2e8f0); border-radius: var(--r-md, 12px); background: #fff; }
.fp__picto { color: var(--c-brand, #3D5A73); }
.fp__titre { font-weight: 600; min-width: 0; }
.fp__titre small { display: block; font-weight: 400; color: var(--c-text-2, #475569); overflow-wrap: anywhere; }
.fp__val { font-weight: 700; text-align: right; white-space: nowrap; }
.fp__note { margin-top: 10px; }
@media (max-width: 479.98px) { .fp__val { white-space: normal; max-width: 8.5em; } }

/* ---------- similaires ---------- */
.fs { margin-top: 48px; }
.fs__tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.fs__nav { display: flex; gap: 8px; flex: 0 0 auto; }
.fs__piste { display: flex; gap: 16px; list-style: none; margin: 0; padding: 4px 2px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; }
.fs__piste::-webkit-scrollbar { display: none; width: 0; height: 0; }
.fs__piste:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 2px; border-radius: 4px; }
.fs__nav .ui-btn[disabled] { opacity: .4; cursor: default; }
.fs__ic--lire, .fs__pause[aria-pressed="true"] .fs__ic--pause { display: none; }
.fs__pause[aria-pressed="true"] .fs__ic--lire { display: block; }
.fs__pause[hidden] { display: none; }
.fs__item { flex: 0 0 min(82%, 340px); scroll-snap-align: start; min-width: 0; }
@media (min-width: 1024px) { .fs__item { flex-basis: calc((100% - 32px) / 3); } }

/* ---------- partage ---------- */
.fh__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fq { border: 0; border-radius: var(--r-lg, 16px); padding: 24px; max-width: min(92vw, 360px); text-align: center; }
.fq::backdrop { background: rgba(15, 23, 42, .6); }
.fq__img svg, .fq__img img { display: block; width: 100%; height: auto; margin: 0 auto; image-rendering: pixelated; }
.fq__aide { margin: 12px 0 0; font-size: 14px; color: var(--c-text-2, #475569); }
.fq__close { position: absolute; top: 8px; right: 8px; background: #e2e8f0; color: #0f172a; }

/* ---------- barre collante : dans le flux (sticky), elle ne recouvre jamais le contenu ---------- */
.fb { position: sticky; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 32px -24px -40px; padding: 10px 24px;
    background: rgba(255, 255, 255, .96); border-top: 1px solid var(--c-border, #e2e8f0); box-shadow: 0 -4px 16px rgba(15, 23, 42, .08); }
.fb[hidden] { display: none; }
.fb__chiffres { display: flex; flex-direction: column; margin: 0; min-width: 0; line-height: 1.25; }
.fb__chiffres strong { font-size: 18px; } .fb__chiffres span { font-size: 14px; color: var(--c-text-2, #475569); overflow-wrap: anywhere; }
.fb__actions { display: flex; gap: 8px; flex: 0 0 auto; }
.fb__actions .ui-btn { min-width: 0; width: auto; }
@media (max-width: 639.98px) {
    .fb { margin: 24px -16px -32px; padding: 8px 16px; flex-wrap: wrap; gap: 4px 12px; }
    .fb__chiffres { flex: 1 1 100%; flex-direction: row; align-items: baseline; gap: 4px 12px; }   /* #288 : le prix ne se casse plus lettre à lettre */
    .fb__actions { flex: 1 1 100%; flex-wrap: wrap; align-items: center; min-width: 0; }
    .fb__actions .fb__contact { flex: 1 1 auto; }
    .fb__actions .ui-btn { padding-left: 12px; padding-right: 12px; }
    .fb__actions .sel-btn-texte [data-sel-texte] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .fb__actions .sel-btn-texte { min-width: var(--ui-tap, 44px); }
}

@media (prefers-reduced-motion: reduce) {
    .fm__btn img, .fv__img { transition: none; }
    .fm[data-kb="on"] .fm__main img { animation: none; }
    .fm__kb { display: none; }
    ::view-transition-group(*) { animation: none; }
}
@media (max-width: 767.98px) { .fb { bottom: calc(var(--nb-barre-h, 60px) + 1px + env(safe-area-inset-bottom, 0px)); } }  /* au-dessus de la barre d'actions mobile du site */
@media print { .fb, .fv, .fm__kb, .fs, .fh { display: none !important; } }

/* ---------- en-tête : badges, titre, adresse, prix et surface, actions ---------- */
.fe__badges { margin-bottom: 12px; }
.fe__chiffres { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 16px 0 0; }
.fe__chiffres strong { font-size: 28px; line-height: 34px; font-weight: 700; color: var(--c-text, #0f172a); }
.fe__dates { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; line-height: 18px; color: var(--c-text-body, #334155); }
.fe__dates svg { flex: none; }
.fe__chiffres span { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--c-brand, #3D5A73); overflow-wrap: anywhere; }
.fa { display: grid; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--c-border, #e2e8f0); }
.fa__ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fa .ui-btn { width: auto; min-width: 0; }
.fa .cmp-consent { flex: 1 0 100%; margin: 0; }
.fa .cmp-case--fiche { margin: 0; }
.fa .ui-btn.cmp-alerte-fiche { text-align: left; }
.fa .fh { margin: 0; padding: 0; border: 0; }
.fa .fh__actions { gap: 8px; }
@media (max-width: 479.98px) { .fa .fa__ligne > .ui-btn, .fa .fh__actions > .ui-btn { flex: 1 1 calc(50% - 8px); } .fa .ui-btn.cmp-alerte-fiche { flex-basis: 100%; } }

/* ---------- caractéristiques : tableau ---------- */
.fcar { width: 100%; border-collapse: collapse; }
.fcar th, .fcar td { padding: 12px 0; border-bottom: 1px solid var(--c-border, #e2e8f0); vertical-align: top; text-align: left; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.fcar th { width: 45%; padding-right: 16px; font-weight: 400; color: var(--c-text-2, #475569); }
.fcar td { font-weight: 600; color: var(--c-text, #0f172a); }
.fcar tr:last-child th, .fcar tr:last-child td { border-bottom: 0; }
.ui-fiche__main > .fr { margin-top: 24px; }

/* Plan, vue satellite, Street View : pictos directement sur la mosaïque */
.fm__vues { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; gap: 6px; }
.fm__vue { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(30, 42, 54, .78);
    color: #fff; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; box-shadow: var(--sh-1); backdrop-filter: blur(4px); }
.fm__vue:hover { background: var(--c-nuit); color: #fff; }
.fm__vue:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 1023.98px) {
    .fm__vue { width: 44px; height: 44px; padding: 0; justify-content: center; }
    .fm__vue > span:not(.sr-only) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media print { .fm__vues { display: none !important; } }
