/* ============================================================
   SÉBASTIEN PRAT — IMMOBILIER VAR & CÔTE D'AZUR
   Design system + composants
   ============================================================ */

/* ---------- 1. Tokens ------------------------------------- */
:root {
  /* Couleurs de marque */
  --navy-900: #0a1c30;
  --navy-800: #102b47;
  --navy-700: #1a3f63;
  --navy-600: #2a5a86;

  --gold-600: #96754a;
  --gold-500: #b08d57;
  --gold-400: #c6a67d;
  --gold-200: #e6d7c0;
  --gold-100: #f1e7d8;

  --cream: #faf7f2;
  --sand: #f3ede4;
  --white: #ffffff;

  --ink: #12233a;
  --ink-2: #4d5f75;
  --ink-3: #7d8da3;

  --line: rgba(16, 43, 71, 0.12);
  --line-strong: rgba(16, 43, 71, 0.22);
  --line-light: rgba(255, 255, 255, 0.18);

  --danger: #b3261e;
  --success: #2e6b4f;

  /* Sémantique */
  --bg: var(--cream);
  --surface: var(--white);
  --fg: var(--ink);
  --fg-muted: var(--ink-2);
  --accent: var(--gold-500);

  /* Typographie */
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --fs-eyebrow: 0.72rem;
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-xl: clamp(1.35rem, 1.1rem + 0.9vw, 1.75rem);
  --fs-h3: clamp(1.6rem, 1.25rem + 1.4vw, 2.25rem);
  --fs-h2: clamp(2.1rem, 1.5rem + 2.6vw, 3.75rem);
  --fs-h1: clamp(2.6rem, 1.7rem + 3.6vw, 4.9rem);

  /* Espacement — échelle 4/8 */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  --section-y: clamp(4rem, 3rem + 6vw, 8.5rem);
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 4rem);
  --container: 1320px;
  --container-narrow: 860px;

  /* Formes et ombres */
  --radius-sm: 2px;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(10, 28, 48, 0.06), 0 4px 12px rgba(10, 28, 48, 0.05);
  --shadow-md: 0 2px 6px rgba(10, 28, 48, 0.07), 0 18px 40px -18px rgba(10, 28, 48, 0.28);
  --shadow-lg: 0 4px 10px rgba(10, 28, 48, 0.08), 0 40px 80px -32px rgba(10, 28, 48, 0.38);

  /* Mouvement */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur: 280ms;
  --dur-slow: 900ms;

  /* Couches */
  --z-base: 1;
  --z-sticky: 40;
  --z-header: 60;
  --z-menu: 80;
  --z-overlay: 100;
}

/* ---------- 2. Reset --------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* clip plutôt que hidden : empêche le débordement horizontal des animations
     d'entrée sans créer de conteneur de défilement, ce qui casserait position: sticky */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.is-locked { overflow: hidden; }

img,
picture,
video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--navy-800);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; background: none; border: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--gold-200); color: var(--navy-900); }

/* ---------- 3. Utilitaires --------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow { max-width: var(--container-narrow); }
/* Un peu plus large que la grille du site : donne de l'ampleur à la galerie */
.container-wide { max-width: 1560px; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }

.section--dark {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.82);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--white); }

.section--sand { background: var(--sand); }
.section--surface { background: var(--surface); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -110%);
  z-index: var(--z-overlay);
  background: var(--navy-900);
  color: var(--white);
  padding: var(--sp-3) var(--sp-5);
  font-size: var(--fs-sm);
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus { transform: translate(-50%, 0); }

.tabular { font-variant-numeric: tabular-nums; }

/* ---------- 4. Typographie de composition ------------------ */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin: 0 0 var(--sp-4);
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--gold-500);
  flex: none;
}
.section--dark .eyebrow { color: var(--gold-400); }

.title-xl { font-size: var(--fs-h1); }
.title-lg { font-size: var(--fs-h2); }
.title-md { font-size: var(--fs-h3); }
.title-sm { font-size: var(--fs-xl); }

.lede {
  font-size: var(--fs-lg);
  color: var(--fg-muted);
  max-width: 56ch;
  line-height: 1.75;
}
.section--dark .lede { color: rgba(255, 255, 255, 0.72); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
  margin-bottom: var(--sp-7);
}
.section-head__text { max-width: 60ch; }
.section-head p { margin-top: var(--sp-3); margin-bottom: 0; }

/* ---------- 5. Boutons ------------------------------------- */
.btn {
  --btn-bg: var(--navy-800);
  --btn-fg: var(--white);
  --btn-border: var(--navy-800);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  min-height: 52px;
  padding: 0 var(--sp-6);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gold-500);
  transform: translate3d(0, 101%, 0);
  transition: transform 520ms var(--ease-out);
}
.btn:hover { color: var(--navy-900); border-color: var(--gold-500); }
.btn:hover::after { transform: translate3d(0, 0, 0); }
.btn:active { transform: translateY(1px); }

.btn--gold {
  --btn-bg: var(--gold-500);
  --btn-fg: var(--navy-900);
  --btn-border: var(--gold-500);
}
.btn--gold::after { background: var(--navy-800); }
.btn--gold:hover { color: var(--white); border-color: var(--navy-800); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--navy-800);
  --btn-border: var(--line-strong);
}
.btn--ghost::after { background: var(--navy-800); }
.btn--ghost:hover { color: var(--white); border-color: var(--navy-800); }

.section--dark .btn--ghost,
.hero .btn--ghost,
.page-hero .btn--ghost,
.cta-band .btn--ghost {
  --btn-fg: var(--white);
  --btn-border: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.section--dark .btn--ghost::after,
.hero .btn--ghost::after,
.page-hero .btn--ghost::after,
.cta-band .btn--ghost::after { background: var(--gold-500); }
.section--dark .btn--ghost:hover,
.hero .btn--ghost:hover,
.page-hero .btn--ghost:hover,
.cta-band .btn--ghost:hover { color: var(--navy-900); border-color: var(--gold-500); }

.btn--sm { min-height: 44px; padding: 0 var(--sp-5); font-size: 0.8rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* Lien fléché */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 44px;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-800);
}
.link-arrow svg { transition: transform 420ms var(--ease-out); }
.link-arrow .rule {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--gold-500);
  transition: width 420ms var(--ease-out);
}
.link-arrow:hover .rule { width: 46px; }
.link-arrow:hover svg { transform: translateX(6px); }
.section--dark .link-arrow { color: var(--white); }

/* ---------- 6. En-tête ------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-header);
  padding-block: var(--sp-4);
  transition: background 420ms var(--ease-out),
              box-shadow 420ms var(--ease-out),
              padding 420ms var(--ease-out),
              transform 520ms var(--ease-out);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250, 247, 242, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity 420ms var(--ease-out);
}
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-scrolled { padding-block: var(--sp-2); }
.site-header.is-hidden { transform: translateY(-102%); }

/* Menu ouvert : l'en-tête repasse au-dessus du panneau pour que la croix de
   fermeture et le logo restent accessibles (l'en-tête crée son propre contexte
   d'empilement, ses enfants ne peuvent pas en sortir seuls). */
body.is-locked .site-header {
  z-index: calc(var(--z-menu) + 1);
  transform: none;
}
body.is-locked .site-header::before { opacity: 0; }
body.is-locked .brand__name { color: var(--white); }
body.is-locked .brand__sub { color: var(--gold-400); }
body.is-locked .menu-toggle__bars span { background: var(--white); }

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}

/* En haut de page, l'en-tête repose sur un visuel sombre : texte clair.
   Une fois le fond crème appliqué (is-scrolled), retour au marine. */
.site-header:not(.is-scrolled) .brand__name,
.site-header:not(.is-scrolled) .nav__link,
.site-header:not(.is-scrolled) .header__phone { color: rgba(255, 255, 255, 0.92); }
.site-header:not(.is-scrolled) .brand__sub { color: var(--gold-400); }
.site-header:not(.is-scrolled) .nav__link::after { background: var(--gold-400); }
.site-header:not(.is-scrolled) .nav__link[aria-current="page"] { color: var(--gold-400); }
.site-header:not(.is-scrolled) .nav__link:hover,
.site-header:not(.is-scrolled) .header__phone:hover { color: var(--white); }
.site-header:not(.is-scrolled) .menu-toggle__bars span { background: var(--white); }
.site-header:not(.is-scrolled) .brand__mark rect:first-of-type { fill: rgba(255, 255, 255, 0.1); }

/* Logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 48px;
}
.brand__mark {
  flex: none;
  width: 40px;
  height: 40px;
  transition: transform 600ms var(--ease-out);
}
.brand:hover .brand__mark { transform: rotate(-6deg); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-800);
  white-space: nowrap;
}
.brand__sub {
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-600);
  white-space: nowrap;
}

/* Navigation desktop */
.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: clamp(1rem, 0.2rem + 1.9vw, 2.5rem); }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--navy-800);
  transition: color var(--dur) var(--ease-out);
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 12px;
  width: 100%;
  height: 1px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 420ms var(--ease-out);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav__link[aria-current="page"] { color: var(--gold-600); }

.header__actions { display: flex; align-items: center; gap: var(--sp-4); }
.header__phone {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--navy-800);
}
.header__phone:hover { color: var(--gold-600); }
.header__cta { display: none; }

/* Bouton menu */
.menu-toggle {
  position: relative;
  z-index: calc(var(--z-menu) + 1);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-right: -8px;
}
.menu-toggle__bars { display: block; width: 26px; height: 12px; position: relative; }
.menu-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--navy-800);
  transition: transform 420ms var(--ease-out), opacity 200ms linear, background 200ms linear;
}
.menu-toggle__bars span:first-child { top: 0; }
.menu-toggle__bars span:last-child { bottom: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span { background: var(--white); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:first-child { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:last-child { transform: translateY(-5px) rotate(-45deg); }

/* Menu mobile plein écran */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: max(6rem, env(safe-area-inset-top) + 5rem) var(--gutter) max(2.5rem, env(safe-area-inset-bottom) + 1.5rem);
  background: var(--navy-900);
  color: var(--white);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 720ms var(--ease-out);
  visibility: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; }

.mobile-menu__list { display: flex; flex-direction: column; gap: var(--sp-1); }
.mobile-menu__item { overflow: hidden; }
.mobile-menu__link {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  padding-block: var(--sp-3);
  min-height: 56px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 4vw, 3.25rem);
  line-height: 1.15;
  color: var(--white);
  transition: transform 700ms var(--ease-out), color var(--dur) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.js .mobile-menu__link { transform: translate3d(0, 110%, 0); }
.mobile-menu.is-open .mobile-menu__link { transform: translate3d(0, 0, 0); }
.mobile-menu__link:hover,
.mobile-menu__link[aria-current="page"] { color: var(--gold-400); }
.mobile-menu__num {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--gold-500);
}

.mobile-menu__foot {
  margin-top: var(--sp-8);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line-light);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--ease-out) 320ms, transform 600ms var(--ease-out) 320ms;
}
.mobile-menu.is-open .mobile-menu__foot { opacity: 1; transform: none; }
.mobile-menu__foot a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 48px;
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.8);
}
.mobile-menu__foot a:hover { color: var(--gold-400); }

@media (min-width: 1024px) {
  .nav { display: block; }
  .menu-toggle { display: none; }
  .header__phone { display: inline-flex; }
  .header__cta { display: inline-flex; }
}
@media (min-width: 1180px) {
  .brand__mark { width: 44px; height: 44px; }
}

/* ---------- 7. Hero ---------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  padding-top: 6.5rem;
  padding-bottom: clamp(2rem, 0.75rem + 2.5vw, 3.25rem);
  overflow: hidden;
  background: var(--navy-900);
}

.hero__media {
  position: absolute;
  inset: -8% 0 -8%;
  z-index: 0;
}
.js .hero__media {
  clip-path: inset(0 0 100% 0);
  animation: heroClip 1400ms var(--ease-out) 180ms forwards;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
.js .hero__media img {
  transform: scale(1.12);
  animation: heroZoom 2600ms var(--ease-out) 260ms forwards;
}
@keyframes heroClip { to { clip-path: inset(0 0 0 0); } }
@keyframes heroZoom { to { transform: scale(1); } }

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(10, 28, 48, 0.62) 0%, rgba(10, 28, 48, 0.12) 34%, rgba(10, 28, 48, 0.5) 68%, rgba(10, 28, 48, 0.88) 100%),
    linear-gradient(90deg, rgba(10, 28, 48, 0.6) 0%, rgba(10, 28, 48, 0.05) 62%);
}

.hero__inner { position: relative; z-index: 2; width: 100%; }
.hero__copy { max-width: 20ch; }
.hero .eyebrow { color: var(--gold-400); }
.hero .eyebrow::before { background: var(--gold-400); }

/* Le titre suit aussi la hauteur du viewport : le hero tient sur un écran
   d'ordinateur portable (720–800 px) sans rogner la ligne de chiffres. */
.hero__title {
  font-size: max(2.4rem, min(var(--fs-h1), 9.5vh));
  color: var(--white);
  margin-bottom: var(--sp-4);
}
.hero__title em {
  font-style: italic;
  color: var(--gold-400);
}
.hero__lede {
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-5);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
@media (max-width: 560px) {
  /* Accroche sur une seule ligne et boutons de largeur égale */
  .eyebrow { font-size: 0.64rem; letter-spacing: 0.15em; }
  .hero__actions { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
  .cta-band__actions { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
}

.hero__meta {
  display: none;
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line-light);
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.hero__meta dt {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: var(--sp-2);
}
.hero__meta dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--white);
  line-height: 1.2;
}

/* Indicateur de défilement, vertical sur le bord droit */
.scroll-cue {
  position: absolute;
  top: 50%;
  right: max(var(--gutter), 1.25rem);
  z-index: 2;
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  writing-mode: vertical-rl;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.scroll-cue__line {
  width: 1px;
  height: 54px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold-400);
  animation: cueDrop 2200ms var(--ease-in-out) infinite;
}
@keyframes cueDrop {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

@media (min-width: 768px) {
  .hero__meta { display: grid; }
  .scroll-cue { display: flex; }
}

/* Hero secondaire (pages internes) */
.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(360px, 56vh, 620px);
  padding-top: 8rem;
  padding-bottom: clamp(2.5rem, 1rem + 4vw, 4.5rem);
  background: var(--navy-900);
  overflow: hidden;
}
.page-hero__media { position: absolute; inset: -6% 0; z-index: 0; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(10, 28, 48, 0.76) 0%, rgba(10, 28, 48, 0.42) 38%, rgba(10, 28, 48, 0.93) 100%),
    linear-gradient(90deg, rgba(10, 28, 48, 0.55) 0%, rgba(10, 28, 48, 0) 68%);
}
.page-hero__inner { position: relative; z-index: 2; width: 100%; }
.page-hero h1 { color: var(--white); font-size: var(--fs-h2); }
.page-hero .lede { color: rgba(255, 255, 255, 0.8); margin-top: var(--sp-4); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--sp-4);
}
.breadcrumb a { min-height: 44px; display: inline-flex; align-items: center; }
.breadcrumb a:hover { color: var(--gold-400); }
.breadcrumb__sep { color: var(--gold-500); }

/* ---------- 8. Chiffres clés -------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5) var(--sp-4);
}
.stat__value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.6rem + 3vw, 3.75rem);
  line-height: 1;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
}
.section--dark .stat__value { color: var(--white); }
.stat__suffix { color: var(--gold-500); }
.stat__label {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}
.section--dark .stat__label { color: rgba(255, 255, 255, 0.65); }

@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
}

/* ---------- 9. Cartes de biens ------------------------------ */
.grid-properties {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6) var(--sp-5);
}
@media (min-width: 640px) { .grid-properties { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-properties { grid-template-columns: repeat(3, 1fr); } }

.property-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 520ms var(--ease-out),
              box-shadow 520ms var(--ease-out),
              border-color 520ms var(--ease-out);
}
.property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-200);
}
.property-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--sand);
}
.property-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out);
}
.property-card:hover .property-card__media img { transform: scale(1.07); }

.badge {
  position: absolute;
  top: var(--sp-4);
  left: var(--sp-4);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 12px;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 100px;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy-800);
}
.badge--gold { background: var(--gold-500); color: var(--navy-900); }
.badge--dark { background: rgba(10, 28, 48, 0.9); color: var(--white); }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

.property-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--sp-5);
}
.property-card__place {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: var(--sp-3);
}
.property-card__title {
  font-size: 1.55rem;
  margin-bottom: var(--sp-3);
}
.property-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
}
.property-card__desc {
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  margin-bottom: var(--sp-5);
}

.property-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}
.property-card__specs li { display: flex; align-items: center; gap: var(--sp-2); }
.property-card__specs svg { color: var(--gold-500); flex: none; }

.property-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}
.property-card__price {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.property-card__price small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.property-card__go {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--navy-800);
  transition: background 420ms var(--ease-out), color 420ms var(--ease-out),
              border-color 420ms var(--ease-out), transform 420ms var(--ease-out);
}
.property-card:hover .property-card__go {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
  transform: rotate(-45deg);
}

/* Carte vedette pleine largeur */
.property-feature {
  display: grid;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.property-feature__media { position: relative; aspect-ratio: 16 / 11; overflow: hidden; }
.property-feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1000ms var(--ease-out); }
.property-feature:hover .property-feature__media img { transform: scale(1.05); }
.property-feature__body { padding: clamp(1.75rem, 1rem + 3vw, 3.5rem); display: flex; flex-direction: column; justify-content: center; }
.property-feature__specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
  margin-block: var(--sp-5);
  padding-block: var(--sp-5);
  border-block: 1px solid var(--line);
}
.property-feature__specs dt {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2px;
}
.property-feature__specs dd { margin: 0; font-family: var(--font-display); font-size: 1.5rem; color: var(--navy-800); }

@media (min-width: 900px) {
  .property-feature { grid-template-columns: 1.15fr 1fr; }
  .property-feature__media { aspect-ratio: auto; height: 100%; min-height: 480px; }
  .property-feature__specs { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 10. Filtres ------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  padding-bottom: var(--sp-6);
  margin-bottom: var(--sp-7);
  border-bottom: 1px solid var(--line);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--sp-5);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: transparent;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-800);
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.filter-chip:hover { border-color: var(--gold-500); color: var(--gold-600); }
.filter-chip[aria-pressed="true"] {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--white);
}
.filters__count {
  margin-left: auto;
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

.property-card.is-filtered-out { display: none; }

.filter-empty {
  display: none;
  padding: var(--sp-9) var(--sp-5);
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.filter-empty.is-shown { display: block; }
.filter-empty svg { color: var(--gold-500); margin-bottom: var(--sp-4); }

/* ---------- 11. Secteurs ------------------------------------ */
.grid-sectors { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 700px) { .grid-sectors { grid-template-columns: repeat(3, 1fr); } }

.sector-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 340px;
  padding: var(--sp-5);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}
.sector-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1100ms var(--ease-out);
}
.sector-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 28, 48, 0.1) 20%, rgba(10, 28, 48, 0.82) 100%);
  transition: opacity 520ms var(--ease-out);
}
.sector-card:hover img { transform: scale(1.07); }
.sector-card__body { width: 100%; }
.sector-card h3 { color: var(--white); font-size: 1.85rem; margin-bottom: var(--sp-2); }
.sector-card p {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: var(--sp-3);
}
.sector-card__towns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.sector-card__towns li::after { content: " ·"; color: rgba(255, 255, 255, 0.4); }
.sector-card__towns li:last-child::after { content: ""; }

@media (min-width: 700px) { .sector-card { min-height: 420px; } }

/* ---------- 12. Services / Conseils -------------------------- */
.grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
@media (min-width: 700px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); }
@media (min-width: 860px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 520ms var(--ease-out), box-shadow 520ms var(--ease-out),
              border-color 520ms var(--ease-out);
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-200);
}
.section--dark .service-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-light);
}
.section--dark .service-card:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--gold-500); }

.service-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--sp-5);
  border: 1px solid var(--gold-200);
  border-radius: 50%;
  color: var(--gold-600);
  transition: background 520ms var(--ease-out), color 520ms var(--ease-out),
              border-color 520ms var(--ease-out);
}
.service-card:hover .service-card__icon {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--white);
}
.section--dark .service-card__icon { border-color: var(--line-light); color: var(--gold-400); }

.service-card h3 { font-size: 1.5rem; margin-bottom: var(--sp-3); }
.service-card p { font-size: var(--fs-sm); color: var(--fg-muted); margin-bottom: var(--sp-4); }
.section--dark .service-card p { color: rgba(255, 255, 255, 0.7); }
.service-card__num {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--gold-100);
}
.section--dark .service-card__num { color: rgba(255, 255, 255, 0.09); }

/* ---------- 13. Projets ------------------------------------- */
.project-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy-900);
}
.project-card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.project-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1000ms var(--ease-out), opacity 520ms var(--ease-out);
}
.project-card:hover .project-card__media img { transform: scale(1.06); opacity: 0.82; }
.project-card__body {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  background: linear-gradient(180deg, transparent, rgba(10, 28, 48, 0.92));
  color: var(--white);
}
.project-card__body h3 { color: var(--white); font-size: 1.7rem; margin-bottom: var(--sp-2); }
.project-card__body p { font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.76); margin: 0; }
.project-card__tag {
  display: inline-block;
  margin-bottom: var(--sp-3);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-400);
}

/* Avant / après */
.ba {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  background: var(--sand);
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  background: var(--white);
  transform: translateX(-1px);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(10, 28, 48, 0.18);
}
.ba__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy-800);
  box-shadow: var(--shadow-md);
}
.ba__label {
  position: absolute;
  bottom: var(--sp-4);
  z-index: 2;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(10, 28, 48, 0.72);
  color: var(--white);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
}
.ba__label--before { left: var(--sp-4); }
.ba__label--after { right: var(--sp-4); }

/* Curseur natif superposé : accessible au clavier, invisible à l'écran.
   Le repère visuel reste .ba__handle. */
.ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.ba__range::-webkit-slider-thumb { -webkit-appearance: none; width: 48px; height: 48px; }
.ba__range::-moz-range-thumb { width: 48px; height: 48px; border: 0; }
.ba:focus-within .ba__grip { outline: 2px solid var(--gold-500); outline-offset: 3px; }

/* ---------- 14. Articles ------------------------------------ */
.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 520ms var(--ease-out), box-shadow 520ms var(--ease-out);
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.article-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--sand); }
.article-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.article-card:hover .article-card__media img { transform: scale(1.06); }
.article-card__body { display: flex; flex-direction: column; flex: 1; padding: var(--sp-5); }
.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.article-card__meta span:not(:first-child)::before {
  content: "·";
  margin-right: var(--sp-3);
  color: var(--ink-3);
}
.article-card h3 { font-size: 1.45rem; margin-bottom: var(--sp-3); }
.article-card h3 a::after { content: ""; position: absolute; inset: 0; }
.article-card p { font-size: var(--fs-sm); color: var(--fg-muted); margin-bottom: var(--sp-4); }
.article-card .link-arrow { margin-top: auto; }

/* Article long-form */
.prose { max-width: 68ch; }
.prose h2 { font-size: var(--fs-h3); margin: var(--sp-8) 0 var(--sp-4); }
.prose h3 { font-size: var(--fs-xl); margin: var(--sp-6) 0 var(--sp-3); }
.prose p { margin-bottom: var(--sp-5); line-height: 1.8; }
.prose ul { margin-bottom: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.prose ul li { position: relative; padding-left: var(--sp-5); }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.75em;
  width: 12px; height: 1px;
  background: var(--gold-500);
}
.prose blockquote {
  margin: var(--sp-7) 0;
  padding-left: var(--sp-5);
  border-left: 2px solid var(--gold-500);
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.4;
  color: var(--navy-800);
}

/* ---------- 15. Témoignages --------------------------------- */
.testimonials { position: relative; }
.testimonial-track {
  position: relative;
  min-height: 320px;
}
.testimonial {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  pointer-events: none;
}
.testimonial.is-active { opacity: 1; transform: none; pointer-events: auto; }
.testimonial__quote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1rem + 1.8vw, 2.35rem);
  line-height: 1.4;
  color: var(--navy-800);
  max-width: 26ch;
  margin-bottom: var(--sp-6);
}
.section--dark .testimonial__quote { color: var(--white); }
.testimonial__author { font-size: var(--fs-sm); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-600); }
.testimonial__where { font-size: 0.78rem; color: var(--ink-3); letter-spacing: 0.06em; }
.section--dark .testimonial__where { color: rgba(255, 255, 255, 0.55); }
.testimonial__stars { display: flex; gap: 4px; color: var(--gold-500); margin-bottom: var(--sp-5); }

.testimonial-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}
.testimonial-dots { display: flex; gap: var(--sp-2); }
.testimonial-dot {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.testimonial-dot::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--line-strong);
  transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.testimonial-dot[aria-selected="true"]::before { background: var(--gold-500); transform: scaleY(2); }
.section--dark .testimonial-dot::before { background: rgba(255, 255, 255, 0.28); }
.section--dark .testimonial-dot[aria-selected="true"]::before { background: var(--gold-400); }

.slider-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--navy-800);
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.slider-btn:hover { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }
.section--dark .slider-btn { border-color: var(--line-light); color: var(--white); }
.section--dark .slider-btn:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-900); }

/* ---------- 16. Bandeau CTA --------------------------------- */
.cta-band {
  position: relative;
  padding-block: clamp(4rem, 3rem + 5vw, 7rem);
  overflow: hidden;
  background: var(--navy-900);
  color: var(--white);
  isolation: isolate;
}
.cta-band img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(10, 28, 48, 0.94) 10%, rgba(10, 28, 48, 0.6) 100%);
}
.cta-band h2 { color: var(--white); max-width: 18ch; }
.cta-band p { color: rgba(255, 255, 255, 0.78); max-width: 52ch; margin-top: var(--sp-4); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-6); }

/* ---------- 17. Split image/texte ---------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: repeat(2, 1fr); gap: clamp(2.5rem, 1rem + 5vw, 6rem); }
  .split--reverse .split__media { order: 2; }
}
.split__media { position: relative; }
.split__media img { width: 100%; border-radius: var(--radius); object-fit: cover; }
.split__media--stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
.split__media--stack img:first-child { grid-row: span 2; height: 100%; }

.frame-accent {
  position: relative;
}
.frame-accent::before {
  content: "";
  position: absolute;
  inset: auto -18px -18px auto;
  width: 55%;
  height: 55%;
  border: 1px solid var(--gold-400);
  border-radius: var(--radius);
  z-index: -1;
}

/* ---------- 18. Galerie / Lightbox --------------------------- */
/* Mosaïque en colonnes : chaque photo garde sa hauteur naturelle et le bloc
   se remplit sans cellule vide, quel que soit le nombre de visuels.
   Recadrer tout au même format donnait un effet de vignettes creuses. */
/* Sur téléphone, une seule colonne : une vignette de 160 px ne permet pas
   de juger d'une pièce, et la photo est l'argument de vente principal. */
.gallery {
  columns: 1;
  column-gap: 10px;
}
@media (min-width: 560px) { .gallery { columns: 2; } }
@media (min-width: 720px) {
  .gallery { columns: 2; column-gap: 12px; }
  /* Une troisième colonne seulement à partir de 5 photos : en dessous, les
     hauteurs se déséquilibrent et laissent des colonnes à moitié vides. */
  .gallery:has(.gallery__item:nth-child(5)) { columns: 3; }
}
@media (min-width: 1280px) { .gallery { column-gap: 14px; } }

.gallery__item {
  position: relative;
  break-inside: avoid;
  margin: 0 0 10px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand);
  cursor: zoom-in;
}
@media (min-width: 720px) { .gallery__item { margin-bottom: 12px; } }
@media (min-width: 1280px) { .gallery__item { margin-bottom: 14px; } }

.gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 900ms var(--ease-out);
}
.gallery__item:hover img { transform: scale(1.05); }

.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 28, 48, 0) 45%, rgba(10, 28, 48, 0.45));
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}
.gallery__item:hover::after { opacity: 1; }

/* Pastille d'agrandissement : signale que la photo ouvre la visionneuse */
.gallery__item::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.82);
  background: rgba(250, 247, 242, 0.95)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Ccircle cx='8' cy='8' r='6' stroke='%230a1c30' stroke-width='1.4'/%3E%3Cpath d='M8 5.5v5M5.5 8h5M12.5 12.5l4 4' stroke='%230a1c30' stroke-width='1.4'/%3E%3C/svg%3E")
    center / 18px no-repeat;
  opacity: 0;
  transition: opacity 320ms var(--ease-out), transform 420ms var(--ease-out);
}
.gallery__item:hover::before,
.gallery__item:focus-visible::before { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(6, 18, 32, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  /* visibility bascule sans interpolation : immédiatement à l'ouverture (pour que
     le focus puisse s'y déplacer), et seulement après le fondu à la fermeture. */
  transition: opacity 380ms var(--ease-out), visibility 0s linear 380ms;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 380ms var(--ease-out), visibility 0s;
}
.lightbox__img {
  max-width: min(1200px, 94vw);
  max-height: 82vh;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius);
  transform: scale(0.96);
  transition: transform 480ms var(--ease-out);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__bar {
  position: absolute;
  inset: auto 0 max(1rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5);
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.lightbox__btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: var(--white);
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--white); }
.lightbox__close { position: absolute; top: max(1rem, env(safe-area-inset-top)); right: 1rem; }

/* ---------- 19. Fiche bien ---------------------------------- */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}
@media (min-width: 768px) { .spec-grid { grid-template-columns: repeat(4, 1fr); } }
.spec {
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}
.spec dt {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--sp-2);
}
.spec dd { margin: 0; font-family: var(--font-display); font-size: 1.75rem; color: var(--navy-800); line-height: 1.1; }

.feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}
@media (min-width: 640px) { .feature-list { grid-template-columns: repeat(2, 1fr); } }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}
.feature-list svg { flex: none; margin-top: 5px; color: var(--gold-500); }

.dpe {
  display: flex;
  align-items: stretch;
  gap: 3px;
  margin-top: var(--sp-4);
}
.dpe__step {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  background: var(--line-strong);
  opacity: 0.35;
  transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
}
.dpe__step.is-active { opacity: 1; transform: scaleY(1.35); box-shadow: var(--shadow-sm); }
.dpe__step[data-grade="A"] { background: #1c8a4a; }
.dpe__step[data-grade="B"] { background: #4aa63a; }
.dpe__step[data-grade="C"] { background: #94bd2f; }
.dpe__step[data-grade="D"] { background: #f3d02f; color: var(--navy-900); }
.dpe__step[data-grade="E"] { background: #f0a92b; color: var(--navy-900); }
.dpe__step[data-grade="F"] { background: #e2702c; }
.dpe__step[data-grade="G"] { background: #d1352b; }

.sticky-panel {
  position: sticky;
  top: 6.5rem;
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.sticky-panel__price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1.1;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
}
.sticky-panel__note { font-size: 0.78rem; color: var(--ink-3); margin-top: var(--sp-2); }
.agent-mini {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-block: var(--sp-5);
  padding-block: var(--sp-5);
  border-block: 1px solid var(--line);
}
.agent-mini__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-400);
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
}
.agent-mini__name { font-weight: 500; color: var(--navy-800); line-height: 1.3; }
.agent-mini__role { font-size: 0.78rem; color: var(--ink-3); }

.detail-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-7); }
@media (min-width: 1024px) {
  .detail-layout { grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: var(--sp-8); }
}

/* ---------- 20. Formulaires ---------------------------------- */
.form { display: grid; gap: var(--sp-5); }
.form-row { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
@media (min-width: 640px) { .form-row { grid-template-columns: repeat(2, 1fr); } }

.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field label {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy-800);
}
.field label .req { color: var(--gold-600); }
.field__hint { font-size: 0.78rem; color: var(--ink-3); }

.field input,
.field select,
.field textarea {
  min-height: 52px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 300;
  color: var(--fg);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.65; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23b08d57' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.75rem;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.16);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-3); }

.field__error {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.8rem;
  color: var(--danger);
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--danger); }
.field.has-error .field__error { display: flex; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  min-height: 44px;
  font-size: 0.85rem;
  color: var(--fg-muted);
  cursor: pointer;
}
.checkbox input {
  flex: none;
  width: 22px;
  height: 22px;
  min-height: 0;
  margin-top: 3px;
  accent-color: var(--gold-500);
  cursor: pointer;
}
.checkbox.has-error { color: var(--danger); }
.checkbox.has-error input { outline: 2px solid var(--danger); outline-offset: 2px; }
.section--dark .checkbox { color: rgba(255, 255, 255, 0.78); }
.section--dark .checkbox.has-error { color: #ffb4ae; }

.form-status {
  display: none;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
}
.form-status.is-shown { display: flex; }
.form-status--ok { background: rgba(46, 107, 79, 0.1); color: var(--success); border: 1px solid rgba(46, 107, 79, 0.3); }
.form-status--err { background: rgba(179, 38, 30, 0.08); color: var(--danger); border: 1px solid rgba(179, 38, 30, 0.28); }
.form-status svg { flex: none; margin-top: 3px; }

/* ---------- 21. Contact ------------------------------------- */
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.contact-item:last-child { border-bottom: 0; }
.contact-item__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold-200);
  border-radius: 50%;
  color: var(--gold-600);
}
.contact-item dt {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2px;
}
.contact-item dd { margin: 0; font-size: var(--fs-lg); color: var(--navy-800); }
.contact-item dd a { display: inline-flex; align-items: center; min-height: 32px; }
.contact-item dd a:hover { color: var(--gold-600); }

/* ---------- 22. Pied de page --------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.66);
  padding-top: var(--sp-9);
  padding-bottom: max(var(--sp-6), env(safe-area-inset-bottom));
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid var(--line-light);
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--sp-6); } }

.site-footer .brand__name { color: var(--white); }
.site-footer .brand__sub { color: var(--gold-400); }
.footer-about { max-width: 42ch; margin-top: var(--sp-5); }

.footer-title {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: var(--sp-4);
}
.footer-list { display: flex; flex-direction: column; }
.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: rgba(255, 255, 255, 0.66);
  transition: color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.footer-list a:hover { color: var(--gold-400); transform: translateX(4px); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-top: var(--sp-5);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.footer-bottom a { display: inline-flex; align-items: center; min-height: 40px; }
.footer-bottom a:hover { color: var(--gold-400); }

.socials { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.72);
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.socials a:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-900); }

/* Barre d'action mobile */
.mobile-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: var(--z-sticky);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(105%);
  transition: transform 520ms var(--ease-out);
}
.mobile-bar.is-shown { transform: none; }
.mobile-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 58px;
  background: var(--surface);
  color: var(--navy-800);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mobile-bar a:last-child { background: var(--gold-500); color: var(--navy-900); }
@media (min-width: 1024px) { .mobile-bar { display: none; } }
@media (max-width: 1023px) { body { padding-bottom: 0; } }

/* ---------- 23. Animations ---------------------------------- */
/* Les états de départ ne s'appliquent que si JavaScript est actif : sans lui,
   le contenu reste visible au lieu de disparaître définitivement. */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
  will-change: opacity, transform;
}
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="left"] { transform: translate3d(-32px, 0, 0); }
.js [data-reveal="right"] { transform: translate3d(32px, 0, 0); }
.js [data-reveal="zoom"] { transform: scale(0.94); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

.reveal-mask { display: block; overflow: hidden; padding-bottom: 0.08em; }
.js .reveal-mask > span {
  display: block;
  transform: translate3d(0, 110%, 0);
  transition: transform 1000ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 95ms);
}
.js .reveal-mask.is-visible > span { transform: translate3d(0, 0, 0); }

.js .reveal-media {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1200ms var(--ease-out);
}
.js .reveal-media.is-visible { clip-path: inset(0 0 0 0); }

.parallax { will-change: transform; }
.parallax > img,
img.parallax { transform: translate3d(0, var(--py, 0px), 0); }

.rule-grow {
  display: block;
  height: 1px;
  background: var(--gold-500);
  transform-origin: left;
  transition: transform 1100ms var(--ease-out);
}
.js .rule-grow { transform: scaleX(0); }
.js .rule-grow.is-visible { transform: scaleX(1); }

/* Bandeau défilant */
.marquee {
  position: relative;
  display: flex;
  overflow: hidden;
  padding-block: var(--sp-5);
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  flex: none;
  gap: var(--sp-6);
  padding-right: var(--sp-6);
  animation: marquee 46s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-6);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  color: var(--navy-800);
  white-space: nowrap;
}
.marquee__item::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-500);
}

/* Transition de page */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--navy-900);
  transform: translate3d(0, -100%, 0);
  pointer-events: none;
}
.page-transition.is-out {
  animation: pageOut 520ms var(--ease-in-out) forwards;
}
@keyframes pageOut {
  0% { transform: translate3d(0, 100%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Barre de progression de lecture */
.progress-bar {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: calc(var(--z-header) + 1);
  height: 2px;
  width: 100%;
  background: var(--gold-500);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

/* ---------- 24. Préférences utilisateur ---------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal],
  .reveal-mask > span,
  .reveal-media {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .hero__media { clip-path: none; animation: none; }
  .hero__media img { transform: none; animation: none; }
  .marquee__track { animation: none; }
  .parallax > img, img.parallax { transform: none !important; }
  .scroll-cue__line::after { animation: none; }
}

@media print {
  .site-header, .mobile-bar, .mobile-menu, .cta-band, .scroll-cue { display: none !important; }
  body { background: #fff; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
