/* ==========================================================================
   MAN PROPERTIES GROUP : Composants
   ========================================================================== */

/* ==========================================================================
   Logo
   ========================================================================== */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.72em;
  color: inherit;
  --mpg-ink: currentColor;
}
.logo__mark {
  width: auto;
  height: var(--logo-h, 34px);
  flex: none;
  overflow: visible;
}
.logo__mark path { transition: fill var(--dur-fast) var(--ease-out); }

.logo__word {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: calc(var(--logo-h, 34px) * 0.396);
  line-height: 1.06;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo--stack .logo__word { line-height: 1.04; }
.logo--lg { --logo-h: 76px; }
.logo--sm { --logo-h: 26px; }

/* Sur fond sombre, l'encre du monogramme passe en blanc */
.invert .logo,
.logo--invert { --mpg-ink: var(--bone-50); }

/* ==========================================================================
   Boutons
   Des rectangles d'encre, le mot seul. La pastille ronde a fleche qui
   tournait au survol etait l'accessoire de tous les gabarits du moment,
   et le vert en aplat donnait un air de jeu d'enfant.
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 0.85em 1.5em;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }

/* Un pictogramme ne reste que la ou il dit quelque chose : le telephone,
   WhatsApp. La fleche generique se tait. */
.btn__ico { display: none; }
.btn--tel .btn__ico, .btn--wa .btn__ico { display: inline-grid; place-items: center; }
.btn__ico svg { width: 1em; height: 1em; }

/* L'action principale : l'encre */
.btn--accent { background: var(--encre); color: #fff; }
.btn--accent:hover { background: var(--mpg-blue); }

/* Le bleu de la charte : prendre rendez-vous, depuis l'en-tete */
.btn--primary { background: var(--mpg-blue); color: #fff; }
.btn--primary:hover { background: var(--encre); }

/* Contour, pour les actions secondaires */
.btn--ghost {
  border-color: currentColor;
  color: var(--text);
  background: transparent;
}
.btn--ghost:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.invert .btn--ghost:hover, .footer .btn--ghost:hover { background: #fff; color: var(--encre); border-color: #fff; }
/* Sur fond d'encre, l'action principale passe en blanc */
.invert .btn--accent, .footer .btn--accent { background: #fff; color: var(--encre); }
.invert .btn--accent:hover, .footer .btn--accent:hover { background: var(--bone-200); }

/* Plein clair sur fond sombre */
.btn--light { background: #fff; color: var(--encre); }
.btn--light:hover { background: var(--bone-200); }

.btn--wide { padding-inline: 1.8em; }
.btn--sm { font-size: var(--step--2); min-height: 40px; padding: 0.6em 1em; }

/* Lien texte : souligne pour de vrai, c'est ainsi qu'on le reconnait */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
  text-decoration-color: currentColor;
  transition: text-decoration-color var(--dur-fast) var(--ease-out);
}
.link:hover { color: var(--mpg-blue); }
.link svg { width: 0.85em; height: 0.85em; }

/* Bouton carre seul */
.icon-btn {
  width: 2.75rem; height: 2.75rem;
  border-radius: var(--radius-xs);
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  flex: none;
  transition: background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.icon-btn svg { width: 1rem; height: 1rem; }
.icon-btn:hover { background: var(--encre); border-color: var(--encre); color: #fff; }
.icon-btn[disabled] { opacity: 0.32; pointer-events: none; }

/* ==========================================================================
   Etiquettes
   A angle droit, comme sur un plan cote. La gelule a point lumineux etait
   le badge par defaut des interfaces generees.
   ========================================================================== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.3em 0.6em;
  border-radius: var(--radius-xs);
  border: 1px solid var(--rule);
  font-size: var(--step--2);
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.35;
  white-space: nowrap;
  background: var(--bg-raised);
}
.chip--accent { background: #DFEBDD; border-color: #B9D3B6; color: #274F25; }
.chip--solid { background: var(--encre); border-color: var(--encre); color: #fff; }
.chip--bare { background: transparent; }

.chip__dot {
  width: 7px; height: 7px; border-radius: 0;
  background: currentColor; flex: none;
}

/* États de disponibilité */
.chip--libre  { background: #DFEBDD; border-color: #B9D3B6; color: #274F25; }
.chip--option { background: #EFE6D2; border-color: #DCCDA8; color: #6B5420; }
.chip--vendu  { background: var(--bone-200); border-color: var(--sand-300); color: var(--ink-600); }

/* ==========================================================================
   Cartes
   Pas d'ombre, pas d'elevation au survol : un filet d'un pixel, comme sur
   un plan. Au survol, c'est le filet qui se fonce.
   ========================================================================== */

.card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.card__body { padding: clamp(1.25rem, 2vw, 1.75rem); display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-sunk); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__foot { margin-top: auto; padding-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

a.card:hover, .card--hover:hover { border-color: var(--text); }

.card--dark {
  background: var(--encre);
  border-color: var(--encre);
  color: #fff;
  --text: #fff;
  --text-muted: rgba(255, 255, 255, .78);
  --rule: rgba(255, 255, 255, .22);
}
.card--accent {
  background: var(--bone-100);
  border-color: var(--sand-300);
}
.card--flat { background: transparent; border-color: transparent; }
.card--sunk { background: var(--bg-sunk); border-color: transparent; }

.card__index {
  font-family: var(--font-sans);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Vignette pleine image. Le voile ne sert qu'a lire le texte pose dessus. */
.tile {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: block;
  isolation: isolate;
  background: var(--mpg-ink);
}
.tile > img { width: 100%; height: 100%; object-fit: cover; transition: opacity var(--dur) var(--ease-out); }
.tile::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgb(var(--voile) / .82) 0%, rgb(var(--voile) / .2) 45%, rgb(var(--voile) / 0) 70%);
  z-index: 1;
}
.tile__content {
  position: absolute; inset: auto 0 0 0;
  z-index: 2;
  padding: clamp(1.1rem, 2vw, 1.75rem);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.tile__top {
  position: absolute; inset: 0 0 auto 0; z-index: 2;
  padding: clamp(0.9rem, 1.6vw, 1.25rem);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
}
a.tile:hover > img { opacity: .9; }

/* ==========================================================================
   Statistiques
   Un chiffre ne s'affiche que s'il est vrai et verifiable. Les « 12+ »,
   « 180+ » et « 24+ » de l'ancienne version n'avaient pas de source.
   ========================================================================== */

.stat { display: flex; flex-direction: column; gap: 0.35rem; }
.stat__num {
  font-family: var(--font-display);
  font-size: var(--step-6);
  font-weight: 400;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.04em;
  line-height: 0.95;
  display: flex;
  align-items: baseline;
  gap: 0.12em;
}
.stat__num sup, .stat__num small {
  font-size: 0.36em;
  font-weight: 650;
  letter-spacing: 0;
  top: 0;
}
.stat__label {
  font-size: var(--step--1);
  color: var(--text-muted);
  max-width: 24ch;
  line-height: 1.4;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}
.stat-row .stat {
  padding-top: 1.1rem;
  border-top: 1px solid var(--encre);
}

/* ==========================================================================
   En-tête
   ========================================================================== */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-block: 0.85rem;
  transition: transform 520ms var(--ease-out), background-color 380ms var(--ease-out),
              border-color 380ms var(--ease-out), backdrop-filter 380ms var(--ease-out);
  border-bottom: 1px solid var(--rule);
  background: #fff;
  color: var(--encre);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Sur fond clair ou après défilement */
/* Blanc franc et filet : le verre depoli de l'ancienne version etait
   l'effet de surface le plus repandu des gabarits. */
.header.is-solid {
  background: #fff;
  border-bottom-color: var(--rule);
  color: var(--ink-800);
}
.header.is-hidden { transform: translateY(-102%); }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.1rem); }
.nav__link {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.005em;
  position: relative;
  padding-block: 0.4rem;
  white-space: nowrap;
  opacity: 0.86;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 420ms var(--ease-out);
}
.nav__link:hover { opacity: 1; }
.nav__link:hover::after,
.nav__link[aria-current='page']::after { transform: scaleX(1); transform-origin: left; }
.nav__link[aria-current='page'] { opacity: 1; font-weight: 600; }

.header__actions { display: flex; align-items: center; gap: 0.75rem; }

/* Bouton burger : trois traits, et une croix a l'ouverture. Rien d'autre. */
.burger {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  border-radius: var(--radius-xs);
  place-items: center;
  gap: 5px;
  flex-direction: column;
  z-index: 130;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.burger i {
  display: block;
  width: 20px; height: 2px;
  background: currentColor;
  transition: transform 240ms var(--ease-out), opacity 120ms linear;
}
.burger:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.burger[aria-expanded='true'] { background: var(--encre); color: #fff; }
.burger[aria-expanded='true'] i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded='true'] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Tiroir mobile */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #fff;
  color: var(--encre);
  padding: calc(var(--header-h) + 2rem) var(--gutter) 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 520ms var(--ease-out);
  overflow-y: auto;
  visibility: hidden;
}
.drawer.is-open { clip-path: inset(0 0 0 0); visibility: visible; }

.drawer__nav { display: flex; flex-direction: column; gap: 0.15rem; }
.drawer__link {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.01em;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms var(--ease-out) var(--d, 0ms), transform 520ms var(--ease-out) var(--d, 0ms);
}
.drawer.is-open .drawer__link { opacity: 1; transform: none; }
/* Les numeros 01 a 08 devant chaque lien : un ornement de gabarit. */
.drawer__link span { display: none; }
.drawer__foot { display: flex; flex-direction: column; gap: 1rem; font-size: var(--step--1); }

@media (max-width: 1080px) {
  .nav, .header__actions .btn { display: none; }
  .burger { display: flex; }
}

/* ==========================================================================
   Accordéon
   ========================================================================== */

.acc { border-top: 1px solid var(--rule); }
.acc__item { border-bottom: 1px solid var(--rule); }
.acc__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.2rem, 2vw, 1.75rem) 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  transition: color var(--dur-fast) var(--ease-out);
}
.acc__btn:hover { color: var(--mpg-blue); }
.acc__sign {
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--rule);
  display: grid; place-items: center;
  flex: none;
  position: relative;
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform 480ms var(--ease-out);
}
.acc__sign::before, .acc__sign::after {
  content: ''; position: absolute;
  background: currentColor; border-radius: 2px;
}
.acc__sign::before { width: 12px; height: 1.6px; }
.acc__sign::after { width: 1.6px; height: 12px; transition: transform 480ms var(--ease-out); }
.acc__btn[aria-expanded='true'] .acc__sign {
  background: var(--encre); border-color: var(--encre); color: #fff;
}
.acc__btn[aria-expanded='true'] .acc__sign::after { transform: scaleY(0); }

.acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 560ms var(--ease-out);
}
.acc__panel[data-open='true'] { grid-template-rows: 1fr; }
.acc__panel > div { overflow: hidden; }
.acc__panel .acc__inner { padding-bottom: clamp(1.2rem, 2vw, 1.9rem); }

/* ==========================================================================
   Formulaires
   ========================================================================== */

.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text);
}
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stone-400);
  background: var(--bg-raised);
  font-size: var(--step-0);
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 1px solid var(--encre);
  outline-offset: -1px;
  border-color: var(--encre);
  background: var(--bg-raised);
}
.field input::placeholder, .field textarea::placeholder { color: var(--stone-400); }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%234A555D' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
  background-size: 12px;
  padding-right: 2.6rem;
}

.checkline { display: flex; align-items: flex-start; gap: 0.75rem; font-size: var(--step--1); color: var(--text-muted); }
.checkline input { width: 1.15rem; height: 1.15rem; accent-color: var(--mpg-green); flex: none; margin-top: 0.22rem; }

/* Groupe de boutons segmenté */
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-xs);
  background: var(--bg-sunk);
  border: 1px solid var(--rule);
  gap: 2px;
}
.seg button {
  padding: 0.55em 1em;
  border-radius: var(--radius-xs);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-muted);
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.seg button[aria-pressed='true'], .seg button[aria-selected='true'], .seg button.is-active {
  background: var(--encre);
  color: #fff;
}
.invert .seg button[aria-pressed='true'], .invert .seg button[aria-selected='true'], .invert .seg button.is-active {
  background: #fff; color: var(--encre);
}

/* ==========================================================================
   Pied de page
   ========================================================================== */

/* Le pied peignait un fond sombre sans jamais redefinir ses jetons : tout
   ce qu'il contient et qui s'appuie sur --text-muted, --rule ou --bg-raised
   heritait des valeurs du theme clair. « La lettre des Domaines » tombait
   ainsi a 2,5 de rapport. On lui donne le meme jeu que .invert. */
.footer {
  --bg: var(--encre);
  background: var(--encre);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: .25em; }

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-block: clamp(3.5rem, 6vw, 6rem) clamp(2rem, 3vw, 3rem);
}
.footer__title {
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
  margin-bottom: 1rem;
}
.footer__list { display: flex; flex-direction: column; gap: 0.7rem; font-size: var(--step--1); }
.footer__list a { color: rgba(255, 255, 255, .8); transition: color var(--dur-fast) var(--ease-out); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-block: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: var(--step--2);
  color: rgba(255, 255, 255, .7);
}

.socials { display: flex; gap: 0.6rem; }
.socials a {
  width: 2.75rem; height: 2.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, .25);
  display: grid; place-items: center;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.socials a:hover { background: #fff; border-color: #fff; color: var(--encre); }
.socials svg { width: 1rem; height: 1rem; }

@media (max-width: 940px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Bouton WhatsApp flottant
   ========================================================================== */

.wa-float {
  position: fixed;
  right: clamp(0.9rem, 2vw, 1.5rem);
  bottom: clamp(0.9rem, 2vw, 1.5rem);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0 1rem 0 0.8rem;
  border-radius: 0;
  background: var(--encre);
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(14, 33, 48, .45);
  font-size: var(--step--1);
  font-weight: 600;
  transform: translateY(160%);
  transition: transform 360ms var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.wa-float.is-in { transform: none; }
.wa-float:hover { background: var(--mpg-blue); }
.wa-float i { display: grid; place-items: center; flex: none; }
.wa-float svg { width: 1.3rem; height: 1.3rem; }
.wa-float span { display: none; }
@media (min-width: 620px) { .wa-float span { display: inline; } }
@media (max-width: 619px) { .wa-float { padding: 0; width: 48px; justify-content: center; } }

/* ==========================================================================
   Fil d'Ariane / en-tête de page interne
   ========================================================================== */

/* Sur papier blanc, sous un filet. L'ancienne tete posait une photo a
   34 % sous un degrade marine : une image qu'on ne voyait pas, qui pesait
   quand meme. */
.page-head {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(2.5rem, 5.5vw, 5rem));
  padding-bottom: clamp(2.25rem, 4.5vw, 4rem);
  background: #fff;
  color: var(--encre);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  isolation: isolate;
}
.page-head__bg { display: none; }
.crumbs {
  display: flex; align-items: center; gap: 0.55rem;
  font-size: var(--step--1);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.crumbs a { text-decoration: underline; text-underline-offset: .25em; text-decoration-color: var(--sand-300); }
.crumbs a:hover { color: var(--mpg-blue); }
.crumbs span { color: var(--encre); }

/* Retour visible apres soumission d'un formulaire */
.form-status {
  margin-top: 1.1rem;
  font-size: var(--step--1);
  line-height: 1.6;
  padding: 0;
  min-height: 1px;
}
.form-status[data-state] {
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
}
.form-status[data-state='ok'] {
  background: var(--green-50);
  border-color: var(--green-300);
  color: var(--green-800);
}
.form-status[data-state='error'] {
  background: #FDF3D9;
  border-color: #F0DFA8;
  color: #86611A;
}

/* ==========================================================================
   Infolettre et bas de page
   ========================================================================== */

.footer > .shell { padding-top: clamp(2.75rem, 5vw, 4.5rem); }
.lettre {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.8rem, 4vw, 4rem);
  align-items: center;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule-invert);
}
@media (max-width: 860px) { .lettre { grid-template-columns: 1fr; } }

.lettre__mot h2 { margin: 0.5rem 0 0.9rem; }
.lettre__note {
  font-size: var(--step--1);
  line-height: 1.65;
  opacity: 0.8;
  max-width: 46ch;
}

.lettre__ligne { display: flex; gap: 0.7rem; }
.lettre__ligne input { flex: 1; min-width: 0; }
.lettre__ligne .btn { flex: none; }
@media (max-width: 520px) {
  .lettre__ligne { flex-direction: column; }
  .lettre__ligne .btn { width: 100%; justify-content: center; }
}

.lettre .field label { color: #fff; }
.lettre .field input {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .35);
  color: #fff;
}
.lettre .field input::placeholder { color: rgba(255, 255, 255, .55); }
.lettre .field input:focus { border-color: var(--mpg-green); }

.lettre__choix {
  border: 0; padding: 0; margin: 1rem 0 0;
  display: flex; flex-wrap: wrap; gap: 0.55rem 1.3rem;
  align-items: center;
}
.lettre__choix legend {
  float: left; width: 100%;
  font-size: var(--step--1); font-weight: 650;
  color: #fff;
  margin-bottom: 0.6rem;
}
.lettre__choix label {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: var(--step--1);
  opacity: 0.82; cursor: pointer;
}
.lettre__choix input { accent-color: var(--mpg-green); width: 16px; height: 16px; }

.footer__legal { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.footer__legal a { opacity: 0.72; }
.footer__legal a:hover { opacity: 1; color: var(--mpg-green); }
.footer__signature { opacity: 0.72; }
.footer__signature b { font-weight: 600; color: #fff; }

/* ==========================================================================
   Prise de rendez-vous
   ========================================================================== */

.rdv { display: flex; flex-direction: column; gap: 1.6rem; }

.rdv__jours {
  display: flex; gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.rdv__jour {
  flex: none;
  scroll-snap-align: start;
  min-width: 4.6rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: var(--bg-raised);
  text-align: center;
  line-height: 1.25;
  transition: border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.rdv__jour:hover:not(:disabled) { border-color: var(--text); }
.rdv__jour.is-active { background: var(--encre); border-color: var(--encre); color: #fff; }
.rdv__jour:disabled { opacity: 0.36; cursor: not-allowed; }
.rdv__jour span { display: block; }
.rdv__jour .j-sem { font-size: var(--step--2); text-transform: uppercase; letter-spacing: .1em; opacity: 0.62; }
.rdv__jour .j-num { font-family: var(--font-display); font-size: var(--step-2); font-weight: 400; }
.rdv__jour .j-mois { font-size: var(--step--2); opacity: 0.62; }

.rdv__creneaux { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rdv__creneau {
  padding: 0.6rem 1rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--rule);
  background: var(--bg-raised);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  transition: border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}
.rdv__creneau:hover { border-color: var(--mpg-green); }
.rdv__creneau.is-active { background: var(--encre); border-color: var(--encre); color: #fff; font-weight: 600; }

.rdv__modes { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rdv__mode {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: var(--bg-raised);
  font-size: var(--step--1);
}
.rdv__mode.is-active { border-color: var(--mpg-blue); background: var(--blue-100); color: var(--blue-900); }

.rdv__resume {
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius-sm);
  background: var(--bg-sunk);
  border: 1px dashed var(--rule);
  font-size: var(--step--1);
  line-height: 1.6;
}
.rdv__resume b { color: var(--mpg-blue); }
.rdv__resume[data-pret='oui'] { border-style: solid; border-color: var(--green-300); background: var(--green-50); }

/* Contact : la carte et les actions cote a cote, pour ne pas derouler */
.contact-duo {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(1.6rem, 3.5vw, 3rem);
  align-items: start;
}
.contact-duo__carte { position: sticky; top: calc(var(--header-h) + 1.2rem); }
@media (max-width: 1000px) {
  /* minmax(0, 1fr) et non 1fr : « 1fr » vaut minmax(auto, 1fr), et le auto
     prend la largeur intrinseque du SVG de la carte (1090 px), ce qui faisait
     exploser la colonne a 980 px dans un ecran de 375. */
  .contact-duo { grid-template-columns: minmax(0, 1fr); }
  .contact-duo__carte { position: static; }
}
/* Ceinture et bretelles : aucun enfant ne peut imposer sa largeur */
.contact-duo > * { min-width: 0; max-width: 100%; }
.contact-duo .seg { flex-wrap: wrap; max-width: 100%; }
@media (max-width: 520px) {
  .contact-duo .seg { width: 100%; }
  .contact-duo .seg button { flex: 1; text-align: center; }
}

/* ==========================================================================
   Palette de commandes
   ========================================================================== */

.palette { position: fixed; inset: 0; z-index: 200; }
.palette[hidden] { display: none; }

.palette__fond {
  position: absolute; inset: 0;
  background: rgba(11, 15, 18, .55);
  opacity: 0;
  transition: opacity 220ms var(--ease-out);
}
.palette.is-ouvert .palette__fond { opacity: 1; }

.palette__cadre {
  position: relative;
  width: min(640px, calc(100vw - 2rem));
  margin: clamp(3rem, 11vh, 8rem) auto 0;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  transform: translate3d(0, -8px, 0);
  transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-spring);
}
.palette.is-ouvert .palette__cadre { opacity: 1; transform: none; }

.palette__saisie {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--rule);
}
.palette__saisie > svg { width: 1.05rem; height: 1.05rem; color: var(--mpg-green); flex: none; }
.palette__saisie input {
  flex: 1; min-width: 0;
  border: 0; background: transparent; padding: 0.2rem 0;
  font-size: var(--step-0); font-family: inherit; color: var(--text);
}
.palette__saisie input:focus { outline: none; }
.palette__saisie input::-webkit-search-cancel-button { display: none; }

kbd {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  padding: 0.2em 0.45em;
  border-radius: var(--radius-xs);
  border: 1px solid var(--rule);
  background: var(--bg-sunk);
  color: var(--text-muted);
  line-height: 1.5;
}

.palette__liste { max-height: min(52vh, 430px); overflow-y: auto; padding: 0.5rem; }

.palette__groupe {
  font-size: var(--step--2);
  color: var(--text-muted); font-weight: 700;
  padding: 0.9rem 0.7rem 0.4rem;
}

.palette__item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.62rem 0.7rem;
  border-radius: var(--radius-xs);
  color: var(--text);
}
.palette__item.is-actif { background: var(--encre); color: #fff; }
.palette__ico {
  flex: none;
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  border-radius: var(--radius-xs);
  background: var(--bg-sunk);
  color: var(--mpg-blue);
}
.palette__item.is-actif .palette__ico { background: color-mix(in srgb, var(--mpg-green) 22%, transparent); color: var(--mpg-green); }
.palette__ico svg { width: 0.95rem; height: 0.95rem; }

.palette__texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.palette__texte b { font-weight: 560; font-size: var(--step--1); }
.palette__texte span {
  font-size: var(--step--2);
  color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.palette__item.is-actif .palette__texte span { color: color-mix(in srgb, var(--bone-50) 62%, transparent); }

.palette__fleche { width: 0.8rem; height: 0.8rem; opacity: 0; flex: none; }
.palette__item.is-actif .palette__fleche { opacity: .8; }

.palette__vide { padding: 2.2rem 1.2rem; text-align: center; color: var(--text-muted); font-size: var(--step--1); line-height: 1.65; }

.palette__pied {
  display: flex; align-items: center; gap: 1.1rem;
  padding: 0.7rem 1.15rem;
  border-top: 1px solid var(--rule);
  background: var(--bg-sunk);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.palette__pied kbd { margin-right: 0.2rem; }
.palette__compte { margin-left: auto; }
@media (max-width: 560px) { .palette__pied span:not(.palette__compte) { display: none; } }

/* Le declencheur dans l'en-tete */
.chercher {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.5rem 0.7rem 0.5rem 0.85rem;
  border-radius: var(--pill);
  border: 1px solid var(--rule);
  background: var(--bg-raised);
  color: var(--text-muted);
  font-size: var(--step--2);
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.chercher:hover { border-color: var(--mpg-green); color: var(--text); }
.chercher svg { width: 0.9rem; height: 0.9rem; }
.chercher kbd { margin-left: 0.15rem; }
@media (max-width: 1080px) { .chercher span, .chercher kbd { display: none; } .chercher { padding: 0.5rem; } }

/* ==========================================================================
   Passe mobile
   Sur telephone tout s'empile et la page triple de hauteur. On rend
   les colonnes aux blocs qui le supportent, et on fait balayer le reste.
   ========================================================================== */

@media (max-width: 700px) {

  /* Rythme vertical resserre : le blanc coute cher sur un petit ecran */
  :root { --section-y: clamp(3.1rem, 2rem + 5vw, 5rem); }

  /* Les quatre chiffres tiennent en deux colonnes, pas en quatre lignes */
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1.2rem; }
  .stat-row .stat { padding-top: 1rem; }
  .stat__num { font-size: var(--step-4); }
  .stat__label { font-size: var(--step--2); }

  /* Pied de page : les trois listes de liens en deux colonnes */
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.4rem;
    padding-block: 2.6rem 1.6rem;
  }
  .footer__grid > *:first-child { grid-column: 1 / -1; }
  .footer__list { gap: 0.5rem; }
  .footer__list a, .footer__list p { font-size: var(--step--2); }
  .footer__title { margin-bottom: 0.8rem; }

  .lettre { padding-bottom: 2.2rem; margin-bottom: 2.2rem; }
  /* La note garde ses deux premieres lignes : l'essentiel y est */
  .lettre__note {
    font-size: var(--step--2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .lettre__mot h2 { font-size: var(--step-1); }
  .lettre__choix { margin-top: 0.7rem; }

  .footer__bottom { gap: 0.8rem; }

  /* Les listes a puces se resserrent */
  .ticks { gap: 0.55rem; }
  .ticks li { font-size: var(--step--2); }
}

/* Le declencheur de recherche reste atteignable au pouce */
@media (max-width: 700px) {
  .header__actions .btn--sm { padding-inline: 0.9em; font-size: var(--step--2); }
}

/* ==========================================================================
   Tactile : pas d'elevation au survol
   Sur telephone, :hover reste actif apres le toucher. Les cartes du rail
   se soulevaient sous le doigt pendant le balayage puis retombaient.
   On reserve les elevations aux pointeurs qui survolent vraiment.
   ========================================================================== */

@media (hover: none), (pointer: coarse) {

  a.card:hover, .card--hover:hover,
  .btn:hover, .itineraire a:hover,
  .rdv__jour:hover:not(:disabled) {
    transform: none;
  }
  a.card:hover { box-shadow: none; }
  a.card:hover .card__media img,
  .card--hover:hover .card__media img,
  a.tile:hover > img,
  .member:hover .member__media img,
  .bande-photos figure:hover img {
    transform: none;
  }
  .btn:hover .btn__ico { transform: none; }
  .link:hover svg { transform: none; }

  /* Le retour d'appui remplace le survol : bref, net, volontaire */
  a.card:active, .card--hover:active {
    transform: scale(.985);
    transition: transform 120ms var(--ease-out);
  }
  .btn:active { transform: scale(.97); }
  .rdv__jour:active, .rdv__creneau:active, .filter:active,
  .selecteur__item:active, .lot-item:active {
    transform: scale(.98);
    transition: transform 120ms var(--ease-out);
  }
}

/* Les cartes du rail ne doivent jamais bouger toutes seules */
.rail .card { transition: border-color var(--dur-fast) var(--ease-out); }

/* ==========================================================================
   Ouverture du site
   Le monogramme se construit dans l'ordre de lecture de la marque :
   le M noir, le chevron bleu, le chevron vert. Puis le rideau se leve.
   ========================================================================== */

html.est-en-ouverture { overflow: hidden; }

.ouverture {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--encre);
  cursor: pointer;
  transition: clip-path 760ms var(--ease-out), opacity 300ms linear 460ms;
  clip-path: inset(0 0 0 0);
}
/* Le rideau se retire vers le haut, comme un store */
.ouverture.est-levee { clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none; }

.ouverture__scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  padding: var(--gutter);
  text-align: center;
}

.ouverture__mark {
  width: clamp(74px, 15vw, 116px);
  height: auto;
  overflow: visible;
}

/* Chaque forme monte a sa place, dans l'ordre du logotype */
.ouverture__mark path {
  opacity: 0;
  transform: translate3d(0, 16%, 0);
  transform-box: fill-box;
  transform-origin: center;
  animation: o-pose 760ms var(--ease-spring) forwards;
}
.o-ink   { fill: var(--encre);  animation-delay: 60ms; }
.o-ink2  { fill: var(--encre);  animation-delay: 190ms; }
.o-blue  { fill: var(--mpg-blue); animation-delay: 320ms; }
.o-green { fill: var(--mpg-green); animation-delay: 450ms; }

@keyframes o-pose {
  from { opacity: 0; transform: translate3d(0, 16%, 0); }
  to   { opacity: 1; transform: none; }
}

/* Le nom se pose mot a mot */
.ouverture__mot {
  display: flex;
  gap: 0.42em;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(0.98rem, 3.4vw, 1.32rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
}
.ouverture__mot span {
  opacity: 0;
  transform: translate3d(0, 0.5em, 0);
  animation: o-mot 620ms var(--ease-out) forwards;
}
.ouverture__mot span:nth-child(1) { animation-delay: 520ms; }
.ouverture__mot span:nth-child(2) { animation-delay: 590ms; }
.ouverture__mot span:nth-child(3) { animation-delay: 660ms; }

@keyframes o-mot {
  from { opacity: 0; transform: translate3d(0, 0.5em, 0); }
  to   { opacity: 1; transform: none; }
}

/* La signature, en dernier, souligne d'un trait qui se tire */
.ouverture__signe {
  position: relative;
  margin: 0.2rem 0 0;
  font-family: var(--font-sans);
  font-size: clamp(0.72rem, 2.2vw, 0.84rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-800);
  opacity: 0;
  animation: o-mot 620ms var(--ease-out) 780ms forwards;
}
.ouverture__signe::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -0.5rem;
  width: 0; height: 1px;
  background: color-mix(in srgb, var(--mpg-green) 62%, transparent);
  transform: translateX(-50%);
  animation: o-trait 720ms var(--ease-out) 880ms forwards;
}
@keyframes o-trait { to { width: 100%; } }

/* Animations reduites : le module ne se declenche pas, mais on protege
   quand meme le cas ou le rideau serait deja pose. */
@media (prefers-reduced-motion: reduce) {
  .ouverture { display: none; }
  html.est-en-ouverture { overflow: auto; }
}

/* Sur telephone, un bouton d'action principale prend toute la largeur :
   la cible du pouce ne se discute pas. */
@media (max-width: 700px) {
  .btn--wide { width: 100%; justify-content: center; }
  .rdv form .btn, .lettre__ligne .btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   Barre de qualification
   Le site n'a pas de catalogue de biens : on qualifie une demande plutot
   que de simuler une recherche dans un stock inexistant.
   ========================================================================== */

.qualif-zone { position: relative; z-index: 2; margin-top: calc(var(--section-y) * -0.42); }

.qualif {
  padding: clamp(1.3rem, 2.6vw, 2rem);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.qualif__intentions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.qualif__intention {
  min-height: 40px;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--rule);
  background: var(--bg);
  font-size: var(--step--1);
  font-weight: 600;
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.qualif__intention[aria-pressed='true'] {
  background: var(--encre); border-color: var(--encre); color: #fff;
}
@media (hover: hover) and (pointer: fine) {
  .qualif__intention:hover { border-color: var(--text); }
}
@media (hover: none), (pointer: coarse) {
  .qualif__intention:active { transform: scale(.97); }
}

.qualif__champs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 0.8rem;
  align-items: end;
}
.qualif__champs .field label {
  font-size: var(--step--2);
}
.qualif__champs .field select,
.qualif__champs .field input {
  padding: 0.7rem 0.9rem;
  font-size: var(--step--1);
}
.qualif__champs .field select { padding-right: 2.2rem; }
.qualif__envoi { white-space: nowrap; height: fit-content; }

@media (max-width: 1000px) {
  .qualif__champs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qualif__envoi { grid-column: 1 / -1; justify-content: center; }
}
/* ------------------------------------------------------------------ *
 * Telephone : le formulaire tenait 748 pixels sur un ecran de 812. Il
 * occupait la premiere vue entiere, juste sous le heros.
 * ------------------------------------------------------------------ */
@media (max-width: 620px) {
  .qualif { padding: 1.05rem 0 0.95rem; gap: 0.85rem; }

  /* Les intentions : une seule ligne que l'on fait defiler. Elles
     debordent volontairement du cadre pour que la derniere pastille
     soit coupee par le bord, ce qui annonce qu'il y en a d'autres. */
  .qualif__intentions {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-inline: 1.05rem;
    margin-inline: 0;
    /* le fondu de droite dit qu'il reste des choix */
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 88%, transparent 100%);
            mask-image: linear-gradient(90deg, #000 0, #000 88%, transparent 100%);
  }
  .qualif__intentions::-webkit-scrollbar { display: none; }
  .qualif__intention { flex: none; scroll-snap-align: start; padding: 0.55rem 0.9rem; }

  /* Les champs : deux courts cote a cote, les deux longs pleine largeur.
     On evite ainsi de tronquer « Appartement, villa, immeuble ». */
  /* Deux colonnes dont la seconde restait vide une rangee sur deux : la
     zone et l'echeance se retractaient a 154 px pendant que le type et le
     numero s'etiraient a 317. Quatre rangees dans les deux cas, mais une
     seule sans trou. */
  .qualif__champs {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding-inline: 1.05rem;
  }

  /* L'intitule sort de l'ecran mais reste annonce : chaque controle dit
     deja ce qu'il est, et quatre intitules empiles coutaient
     quatre-vingts pixels pour ne rien apprendre. */
  .qualif__champs .field label {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .qualif__champs .field select,
  .qualif__champs .field input { padding: 0.72rem 0.85rem; }

  .qualif__envoi { grid-column: 1 / -1; justify-content: center; padding-block: 0.85em; }
  .qualif__pied { padding-inline: 1.05rem; gap: 0.4rem 1rem; }
  .qualif-zone { margin-top: calc(var(--section-y) * -0.22); }
}

.qualif__pied {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.3rem;
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  font-size: var(--step--1);
  color: var(--text-muted);
}
.qualif__pied a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: .25em; text-decoration-color: var(--sand-300); }
.qualif__pied a:hover { text-decoration-color: currentColor; }
.qualif__pied svg { width: 0.85rem; height: 0.85rem; color: var(--green-700); }
