/* =====================================================================
   Fiche programme — téléphone et tablette (≤ 860 px). 2.24.
   Chargé seulement sur les fiches, avec media="(max-width: 860px)" et après mobile.css : l'ordinateur ne lit
   jamais ces règles. Aucun contenu n'est retiré du HTML (référencement) : seuls les doublons visuels sont
   masqués à l'écran (adresse du hero reprise dans « Localisation », bouton « Échanger avec un conseiller »
   assuré par la barre d'actions, boutons de documents déjà proposés dans « Documents » et la barre).

   Hiérarchie des boutons (44 px de haut, la taille minimale d'une cible tactile) :
   - principal  : bleu plein (#0061B2) — une seule action par bloc ;
   - secondaire : fond bleu très clair, texte bleu ;
   - tertiaire  : lien souligné ou icône seule (libellé conservé pour les lecteurs d'écran).
   ===================================================================== */

/* ---------- Boutons ---------- */
.single-property .btn { min-height: 44px; gap: 10px; padding: 0 6px 0 18px; font-size: 15px; }
.single-property .btn--plain { padding: 0 18px; }
.single-property .btn__icon { width: 32px; height: 32px; }
.single-property .btn__icon svg { width: 13px; height: 13px; }
.single-property .btn--doc { min-height: 44px; font-size: 15px; }
.single-property .btn--ghost { box-shadow: inset 0 0 0 1px currentColor; }
/* Plus de mise à l'échelle au survol simulé : le doigt n'a pas de survol. */
.single-property .btn:active { transform: scale(0.97); }

/* ---------- En-tête : photo, nom, lieu, une action principale ---------- */
.prog-hero { min-height: 68svh; }
.prog-hero__inner {
  min-height: 0; gap: 10px;
  padding-top: calc(var(--lc-nav-h) + 12px + env(safe-area-inset-top)); padding-bottom: 80px;
}
.prog-hero .crumbs { gap: 6px; font-size: 11.5px; }
.prog-hero .crumbs li + li::before { margin-right: 6px; }
.prog-hero .crumbs li[aria-current] { display: none; } /* le nom est juste en dessous, en titre */
.prog-hero__chips { gap: 6px; }
.prog-hero__chips .chip { min-height: 28px; padding: 0 11px; font-size: 12.5px; }
.prog-hero__title { font-size: clamp(2.3rem, 10.6vw, 3.4rem); line-height: 1; max-width: none; }
.prog-hero__place { font-size: 13px; letter-spacing: 0.14em; }
.prog-hero__place span { display: none; } /* adresse complète : section « Localisation » */
.prog-hero__cta { gap: 8px; margin-top: 6px; }
.prog-hero__cta .btn { flex: 0 1 auto; justify-content: center; }
/* Une seule action principale (blanche) ; la brochure passe en secondaire, sur verre. */
.single-property .prog-hero__cta .btn ~ .btn { --bg: rgba(4, 31, 58, 0.42); --fg: #fff; border: 1px solid rgba(255, 255, 255, 0.45); }
.single-property .prog-hero__cta .btn ~ .btn .btn__icon { background: rgba(255, 255, 255, 0.18); color: #fff; }
.prog-hero__cta .btn--plain { display: none; } /* « Échanger avec un conseiller » : barre d'actions et bloc contact */

/* ---------- Chiffres clés : carte compacte, 2 × 2 ---------- */
.prog-dock { margin-top: -52px; }
.prog-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; padding: 0; overflow: hidden;
  border-radius: 18px; background: var(--lc-line); box-shadow: 0 14px 36px -18px rgba(4, 31, 58, 0.35);
}
.prog-facts .prog-fact:nth-child(n) { grid-column: auto; border: 0; padding: 12px 14px; gap: 3px; background: #fff; }
.prog-fact dt { font-size: 10.5px; letter-spacing: 0.16em; }
.prog-fact dd { font-size: 1.08rem; line-height: 1.2; }
/* « Ville » (toujours en dernier) double le lieu affiché sous le nom. */
.prog-facts .prog-fact:last-child:not(:first-child) { display: none; }
.prog-facts .prog-fact:nth-last-child(2):nth-child(odd) { grid-column: 1 / -1; }

/* ---------- Rythme des sections ---------- */
.prog-body { padding-top: 34px; padding-bottom: 48px; }
.prog-layout { gap: 44px; }
.prog-main { gap: 48px; }
.prog-sec .eyebrow { gap: 10px; margin-bottom: 10px; font-size: 11.5px; }
.prog-sec .eyebrow__num { font-size: 15px; }
.prog-sec .eyebrow__line { width: 28px; }
.prog-sec .h2 { font-size: clamp(1.75rem, 8.2vw, 2.3rem); line-height: 1.02; }
.prog-sec > .h2, .prog-sec__head { margin-bottom: 16px; }
.prog-sec__head { gap: 6px 16px; }
.prog-sec__head .muted, .prog-note { font-size: 13.5px; }
.prog-note { margin-top: 12px; }

/* ---------- Présentation : texte repliable (« Voir plus ») ---------- */
.prog-intro__grid { gap: 18px; margin-bottom: 0; }
.prog-intro .prose { font-size: 16px; line-height: 1.6; }
.prog-intro .prose--lead > p:first-child { font-size: 1.14rem; line-height: 1.42; }
.prog-intro .prose ul { margin-top: 0.4em; }
.prog-intro__media { aspect-ratio: 16 / 10; max-width: none; }
.prog-intro__media img { border-radius: 18px; }
.prog-intro__frame { display: none; }

.clamp { --clamp-h: 9.4rem; } /* environ 5 à 6 lignes */
.prog-intro .prose h3:first-child { margin-top: 0; }
.clamp.is-clamped .clamp__body {
  max-height: var(--clamp-h); overflow: hidden; overflow-anchor: none;
  transition: max-height 380ms var(--lc-ease);
  -webkit-mask-image: linear-gradient(180deg, #000 52%, transparent); mask-image: linear-gradient(180deg, #000 52%, transparent);
}
.clamp.is-clamped.is-open .clamp__body { -webkit-mask-image: none; mask-image: none; }
.clamp__btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 2px; padding: 0 14px 0 0;
  border: 0; background: none; color: var(--lc-blue); font: 600 15px/1 var(--lc-font); cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.clamp__btn::after {
  content: ''; width: 7px; height: 7px; margin-top: -4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
  transition: transform 300ms var(--lc-ease), margin 300ms var(--lc-ease);
}
.clamp.is-open .clamp__btn::after { margin-top: 3px; transform: rotate(-135deg); }
.clamp__btn:active { opacity: 0.65; }
.clamp__btn:focus-visible { outline: 2px solid var(--lc-blue); outline-offset: 2px; border-radius: 8px; }
.clamp__btn[hidden] { display: none; }

/* ---------- Logements : cartes (≤ 8 lots) ---------- */
.lot-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.lot { grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 3px; padding: 16px; border-radius: 18px; }
.lot__type { grid-column: 1; font-size: 11.5px; }
.lot__price { grid-column: 2; grid-row: 1 / span 2; align-self: start; margin: 0; font-size: 1.5rem; text-align: right; }
.lot__ref, .lot__size { grid-column: 1; }
.lot__size { font-size: 15px; }
.lot__detail { grid-column: 1 / -1; font-size: 13.5px; line-height: 1.45; }
.lot > .link, .lot > .btn--doc { grid-column: 1; justify-self: start; align-self: center; margin-top: 6px; }
.lot > .link { font-size: 15px; }
.lot .lot-cmp--card { grid-column: 2; justify-self: end; align-self: center; margin-top: 6px; }

/* ---------- Logements : panneaux par typologie (plus de 8 lots) ---------- */
.lot-group { border-radius: 18px; }
.lot-group__sum { padding: 14px 16px; gap: 2px 12px; }
.lot-group__type { font-size: 1.3rem; }
.lot-group__meta { gap: 2px 10px; font-size: 13.5px; }
.lot-group__meta span + span::before { margin-right: 10px; }
.lot-group__from { font-size: 13px; }
.lot-group__from b { font-size: 17px; }
.lot-group__chev { width: 32px; height: 32px; }
.lot-rows { padding: 0 16px 6px; }
/* Une ligne par logement : surface et prix, puis détail et actions côte à côte. */
.lot-rows .lot-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'size price' 'detail acts'; gap: 2px 12px; padding: 12px 0; align-items: center; }
.lot-row__size { font-size: 15px; }
.lot-row__price { font-size: 16px; }
.lot-row__detail { align-self: start; font-size: 13.5px; line-height: 1.4; }
.lot-row .lot-row__acts { grid-area: acts; justify-self: end; display: inline-flex; gap: 6px; margin-top: 4px; }
.lot-row .lot-row__acts > * { flex: none; min-height: 40px; }
.lot-row .lot-row__acts .lot-row__ask { padding: 0 14px; font-size: 13.5px; }
/* « Comparer » en icône seule (libellé conservé dans aria-label). */
.lot-row .lot-cmp { width: 40px; padding: 0; }
.lot-row .lot-cmp__l { display: none; }
/* Cibles tactiles de 44 px autour des boutons de 40 px. */
.lot-row__acts > *, .lot .lot-cmp--card { position: relative; }
.lot-row__acts > *::before, .lot .lot-cmp--card::before { content: ''; position: absolute; inset: -2px; }

/* ---------- Galerie : à faire glisser au doigt ---------- */
.gallery.gallery--mosaic {
  display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(var(--lc-gutter) * -1); padding: 0 var(--lc-gutter); scroll-padding-inline: var(--lc-gutter);
}
.gallery.gallery--mosaic::-webkit-scrollbar { display: none; }
/* !important : remplace les dispositions de la mosaïque (sélecteurs :nth-child très spécifiques de fiche.css). */
.gallery.gallery--mosaic > a { flex: 0 0 min(86%, 560px); grid-column: auto !important; grid-row: auto !important; aspect-ratio: 4 / 3 !important; border-radius: 16px; scroll-snap-align: start; }

/* ---------- Cadre de vie ---------- */
.prog-life { gap: 10px; }
.prog-life__card { padding: 18px; gap: 10px; border-radius: 18px; }
.prog-life__card .h3 { font-size: 1.15rem; }
.prog-life .ticks { gap: 8px; font-size: 15px; }

/* ---------- Localisation ---------- */
.locate { gap: 10px; }
.locate__map { min-height: 220px; border-radius: 18px; }
.locate__info { gap: 6px; }
.locate__info .keyfacts { grid-template-columns: minmax(0, 1fr); gap: 0; border-radius: 16px; background: var(--lc-mist); overflow: hidden; }
.locate__info .keyfacts div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 14px; border-radius: 0; background: none; }
.locate__info .keyfacts div + div { border-top: 1px solid var(--lc-mist-2); }
.locate__info .keyfacts dt { flex: none; font-size: 13px; }
.locate__info .keyfacts dd { font-size: 14.5px; text-align: right; }
.locate__links { gap: 4px 18px; }

/* ---------- Documents : une ligne par document, téléchargement en icône ---------- */
.prog-docs { gap: 8px; }
.prog-doc { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 16px; }
.prog-doc__icon { width: 38px; height: 46px; border-radius: 8px; font-size: 10.5px; }
.prog-doc .h3 { font-size: 1.05rem; }
.prog-doc .muted { margin-top: 2px; font-size: 13px; line-height: 1.4; }
.single-property .prog-doc .btn--doc { grid-column: 3; width: 44px; padding: 0; gap: 0; font-size: 0; box-shadow: none; justify-content: center; }
.single-property .prog-doc .btn--doc .btn__icon { width: 44px; height: 44px; background: var(--lc-sky); }
.single-property .prog-doc .btn--doc .btn__icon svg { width: 16px; height: 16px; }

/* ---------- Acheter dans le neuf : cartes à faire glisser ---------- */
.prog-buy .prog-note { margin-top: 0; }
.prog-buy__grid {
  display: flex; gap: 10px; margin: 14px calc(var(--lc-gutter) * -1) 0; padding: 0 var(--lc-gutter) 4px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--lc-gutter); scrollbar-width: none;
}
.prog-buy__grid::-webkit-scrollbar { display: none; }
.prog-buy__card { flex: 0 0 min(78%, 320px); gap: 6px; padding: 18px; border-radius: 18px; scroll-snap-align: start; }
.prog-buy__num { font-size: 1.5rem; }
.prog-buy__card .h3 { font-size: 1.08rem; }
.prog-buy__card p { font-size: 14.5px; line-height: 1.5; }

/* ---------- Contact ---------- */
.prog-aside { gap: 12px; padding: 18px; border-radius: 20px; }
.prog-aside .h3 { font-size: 1.35rem; }
.prog-aside .advisor { padding: 12px 14px; border-radius: 16px; }
/* L'envoi du formulaire est l'action principale du bloc : l'email passe en secondaire. */
.single-property .prog-aside__call { --bg: var(--lc-sky); --fg: var(--lc-blue); justify-self: start; justify-content: center; }
.single-property .prog-aside__call .btn__icon { background: rgba(0, 97, 178, 0.1); }
.prog-aside__tel { display: none; } /* le numéro est déjà sur la carte du conseiller */
.prog-aside .doc-aside { display: none; } /* plans et brochure : section « Documents » et barre d'actions */
.prog-aside .form { gap: 10px; }
.prog-aside .field { gap: 4px; }
.prog-aside .field label { font-size: 13px; }
.prog-aside .field input, .prog-aside .field select { min-height: 48px; padding-block: 0; }
.prog-aside .field textarea { min-height: 92px; }
.prog-aside .check { font-size: 13.5px; line-height: 1.4; }
.single-property .prog-aside .form .btn[type='submit'] { width: 100%; justify-content: space-between; }

/* ---------- Programmes proches ---------- */
.prog-similar { padding-block: 44px; }
.prog-similar .section-head { gap: 12px; margin-bottom: 14px; }

/* ---------- Barre d'actions : claire, compacte, au-dessus de la barre d'accueil ---------- */
.single-property .mobile-bar {
  left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); gap: 6px; padding: 6px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.97); border: 1px solid var(--lc-line); box-shadow: 0 14px 34px -14px rgba(4, 31, 58, 0.4);
}
.single-property .mobile-bar > * { min-height: 44px; border-radius: 14px; font-size: 14px; }
.single-property .mobile-bar__call, .single-property .mobile-bar .mobile-bar__doc { background: var(--lc-sky); color: var(--lc-blue); }
.single-property .mobile-bar__cta { background: var(--lc-blue); color: #fff; }
.single-property .mobile-bar .mobile-bar__doc .btn__icon { color: var(--lc-blue); }
body.single-property:has(.mobile-bar.is-shown) .cmp-tray { bottom: calc(max(8px, env(safe-area-inset-bottom)) + 66px); }
/* Bandeau des cookies affiché : la barre attend qu'un choix soit fait (les deux occupent le bas de l'écran). */
body.single-property:has(.lcc:not([hidden])) .mobile-bar { transform: translateY(140%); }
/* Un lien interne (#logements, #contact-programme) ne s'arrête jamais sous la barre. */
html:has(body.single-property) { scroll-padding-bottom: 72px; }

/* ---------- Tablette (600–860 px) : plus d'informations par ligne ---------- */
@media (min-width: 600px) {
  .prog-facts { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .prog-facts .prog-fact:nth-last-child(2):nth-child(odd) { grid-column: auto; }
  .lot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prog-life { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prog-life__card--wide { grid-column: 1 / -1; }
  .locate { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .locate__info .keyfacts div { display: grid; gap: 2px; }
  .locate__info .keyfacts dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .clamp.is-clamped .clamp__body, .clamp__btn::after { transition: none; }
}
