/* ==========================================================================
   Habitat groupé du Petit Marais — feuille de style
   Palette « nature & organique » : vert mousse, crème, terre.
   ========================================================================== */

:root {
  --bg: #f7f3ea;
  --surface: #fffdf8;
  --surface-2: #efe8da;
  --ink: #23291f;
  --muted: #5c6556;
  --line: #ddd4c2;
  --moss: #3d5a3a;
  --moss-strong: #2c4229;
  --moss-soft: #e3eadb;
  --fern: #6f9160;
  --earth: #a3613a;
  --earth-soft: #f3e2d4;
  --ochre: #c4943f;
  --sold: #b9b2a3;
  --on-moss: #fbf8f1;
  --shadow: 0 1px 2px rgb(35 41 31 / .06), 0 8px 28px rgb(35 41 31 / .08);
  --radius: 18px;
  --radius-sm: 10px;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
  --header-h: 72px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141912;
    --surface: #1b2219;
    --surface-2: #232c21;
    --ink: #ebe7dc;
    --muted: #a9b0a1;
    --line: #333d30;
    --moss: #9cc18a;
    --moss-strong: #b9d8a8;
    --moss-soft: #263323;
    --fern: #86ab74;
    --earth: #e0976a;
    --earth-soft: #3a2a20;
    --ochre: #e0b363;
    --sold: #555d50;
    --on-moss: #142012;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 28px rgb(0 0 0 / .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141912;
  --surface: #1b2219;
  --surface-2: #232c21;
  --ink: #ebe7dc;
  --muted: #a9b0a1;
  --line: #333d30;
  --moss: #9cc18a;
  --moss-strong: #b9d8a8;
  --moss-soft: #263323;
  --fern: #86ab74;
  --earth: #e0976a;
  --earth-soft: #3a2a20;
  --ochre: #e0b363;
  --sold: #555d50;
  --on-moss: #142012;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 28px rgb(0 0 0 / .35);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--moss); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--earth); }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4.2rem); font-weight: 400; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: .35em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--moss); color: var(--on-moss); padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 32px, 760px); margin-inline: auto; }
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-alt { background: var(--surface-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--earth); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.section-head { max-width: 760px; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head.center { margin-inline: auto; }

/* ---------- Boutons ---------- */
.btn {
  --btn-bg: var(--moss); --btn-fg: var(--on-moss);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.4rem; border-radius: 999px; border: 1.5px solid var(--btn-bg);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 600 .98rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); background: var(--moss-strong); border-color: var(--moss-strong); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--moss); border-color: currentColor; }
.btn-ghost:hover { background: var(--moss); color: var(--on-moss); border-color: var(--moss); }
.btn-light { --btn-bg: #fbf8f1; --btn-fg: #2c4229; }
.btn-light:hover { background: #fff; border-color: #fff; color: #2c4229; }
.btn-outline-light { --btn-bg: transparent; --btn-fg: #fbf8f1; border-color: rgb(251 248 241 / .7); }
.btn-outline-light:hover { background: rgb(251 248 241 / .14); border-color: #fbf8f1; color: #fbf8f1; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.has-hero .site-header { position: fixed; inset: 0 0 auto 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.has-hero .site-header .brand, .has-hero .site-header .nav-links a, .has-hero .site-header .icon-btn { color: #fbf8f1; }
/* Sur la photo : voile sombre derrière le menu + légère ombre du texte pour la lisibilité */
.has-hero .site-header::before {
  content: ""; position: absolute; inset: 0 0 -40px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgb(15 22 13 / .62) 0%, rgb(15 22 13 / .32) 60%, rgb(15 22 13 / 0) 100%);
  transition: opacity .3s ease;
}
.has-hero .site-header.is-scrolled::before { opacity: 0; }
.has-hero .site-header:not(.is-scrolled) .brand,
.has-hero .site-header:not(.is-scrolled) .nav-links a { text-shadow: 0 1px 3px rgb(0 0 0 / .45), 0 0 14px rgb(0 0 0 / .25); }
.has-hero .site-header:not(.is-scrolled) .icon-btn svg { filter: drop-shadow(0 1px 2px rgb(0 0 0 / .5)); }
.has-hero .site-header:not(.is-scrolled) .nav-links a:hover,
.has-hero .site-header:not(.is-scrolled) .nav-links a[aria-current="page"] { background: rgb(251 248 241 / .18); }
.has-hero .site-header.is-scrolled { background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.has-hero .site-header.is-scrolled .brand, .has-hero .site-header.is-scrolled .nav-links a, .has-hero .site-header.is-scrolled .icon-btn { color: var(--ink); }
.site-header .wrap { width: min(100% - 32px, 1320px); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-serif); font-size: 1.28rem; font-weight: 500; }
.brand-sub { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.nav { display: flex; align-items: center; gap: .4rem; }
.nav-links { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; }
.nav-links a {
  display: block; padding: .5rem .72rem; border-radius: 999px; white-space: nowrap;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .96rem;
  transition: background .2s ease;
}
.nav-links a:hover { background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; }
.nav-links a[aria-current="page"] { background: color-mix(in srgb, currentColor 14%, transparent); }
.nav-cta { margin-left: .4rem; padding: .6rem 1.05rem; font-size: .9rem; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center;
  background: transparent; border: 0; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.icon-btn svg { width: 22px; height: 22px; }
.menu-toggle { display: none; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

@media (max-width: 1300px) { .nav-cta { display: none; } }
@media (max-width: 1100px) {
  .menu-toggle { display: grid; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg); padding: 1rem 16px 1.5rem; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav-links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a, .has-hero .site-header .nav-links a { color: var(--ink); padding: .85rem .6rem; font-size: 1.1rem; border-radius: 10px; }
  .nav-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 920px); display: flex; align-items: flex-end;
  color: #fbf8f1; isolation: isolate; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); animation: heroZoom 18s ease-out forwards; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(20 28 18 / .55) 0%, rgb(20 28 18 / 0) 26%),
    linear-gradient(0deg, rgb(20 28 18 / .88) 0%, rgb(20 28 18 / .45) 45%, rgb(20 28 18 / .05) 75%);
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-content { padding-block: calc(var(--header-h) + 3rem) clamp(3rem, 8vw, 6rem); max-width: 820px; }
.hero h1 { color: #fbf8f1; margin-bottom: .35em; }
.hero h1 em { font-style: italic; color: #e9d7a8; }
.hero p { font-size: clamp(1.08rem, 1.7vw, 1.3rem); color: rgb(251 248 241 / .9); max-width: 58ch; }
.hero .btn-row { margin-top: 1.8rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.4rem;
  padding: .45rem .95rem .45rem .55rem; border-radius: 999px;
  background: rgb(251 248 241 / .14); border: 1px solid rgb(251 248 241 / .3);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: .9rem; font-weight: 500; color: #fbf8f1; text-decoration: none;
}
.hero-badge:hover { color: #fbf8f1; background: rgb(251 248 241 / .22); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #b8de8c; box-shadow: 0 0 0 0 rgb(184 222 140 / .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgb(184 222 140 / 0); } 100% { box-shadow: 0 0 0 0 rgb(184 222 140 / 0); } }

/* Bandeau de page intérieure */
.page-hero { position: relative; padding-block: calc(var(--header-h) + 4rem) 4rem; color: #fbf8f1; isolation: isolate; overflow: hidden; }
.page-hero .hero-media img { animation: none; transform: none; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(20 28 18 / .85), rgb(20 28 18 / .35)); }
.page-hero h1 { color: #fbf8f1; font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: .3em; }
.page-hero p { color: rgb(251 248 241 / .88); font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 60ch; margin: 0; }
.page-hero .eyebrow { color: #e9d7a8; }

/* ---------- Chiffres clés ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 1.6rem 1.4rem; }
.stat-value { font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; color: var(--moss); margin-bottom: .35rem; }
.stat-value small { font-size: .5em; margin-left: .15em; }
.stat-label { font-size: .92rem; color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Grilles & cartes ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card-body h3 { margin-bottom: .2rem; }
.card-body p { color: var(--muted); font-size: .98rem; margin: 0; }
.card-meta { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--earth); }
.card-link { margin-top: auto; padding-top: .8rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.card-link::after { content: "→"; transition: transform .2s ease; }
.card-link:hover::after { transform: translateX(4px); }
a.card { color: inherit; text-decoration: none; }

.feature { padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.feature-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--moss-soft); color: var(--moss); margin-bottom: 1rem; }
.feature-icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.feature p { color: var(--muted); font-size: .97rem; margin: 0; }

.photo-frame { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-stack { position: relative; }
.photo-stack .photo-frame:nth-child(2) {
  position: absolute; width: 46%; right: -4%; bottom: -10%;
  border: 6px solid var(--bg);
}
@media (max-width: 860px) { .photo-stack .photo-frame:nth-child(2) { right: 4%; } .photo-stack { margin-bottom: 3rem; } }
.caption { font-size: .85rem; color: var(--muted); margin-top: .6rem; }

.quote {
  font-family: var(--font-serif); font-size: clamp(1.4rem, 2.8vw, 2rem); line-height: 1.35; font-style: italic;
  margin: 0; padding-left: 1.4rem; border-left: 3px solid var(--ochre);
}
.quote footer { font-family: var(--font-sans); font-style: normal; font-size: .95rem; color: var(--muted); margin-top: .9rem; }

.callout { background: var(--moss-soft); border-radius: var(--radius); padding: 1.5rem 1.6rem; }
.callout-earth { background: var(--earth-soft); }
.callout h3 { font-size: 1.2rem; }
.callout p:last-child { margin: 0; }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 1.8rem; margin-bottom: .6rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--moss-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%236f9160' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

.tag { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--moss-soft); color: var(--moss); }
.tag-earth { background: var(--earth-soft); color: var(--earth); }
.tag-muted { background: var(--surface-2); color: var(--muted); }

/* ---------- Bandeau CTA ---------- */
.cta-band {
  position: relative; border-radius: calc(var(--radius) + 6px); overflow: hidden; isolation: isolate;
  padding: clamp(2.5rem, 6vw, 4.5rem); color: #fbf8f1; background: #2c4229;
}
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 85% 20%, rgb(196 148 63 / .35), transparent 50%), radial-gradient(circle at 10% 100%, rgb(111 145 96 / .5), transparent 55%); }
.cta-band h2 { color: #fbf8f1; max-width: 22ch; }
.cta-band p { color: rgb(251 248 241 / .85); max-width: 56ch; }

/* ---------- Galerie & lightbox ---------- */
.gallery { columns: 3 260px; column-gap: 1rem; }
.gallery a { display: block; margin-bottom: 1rem; break-inside: avoid; border-radius: var(--radius-sm); overflow: hidden; position: relative; background: var(--surface-2); }
.gallery img { width: 100%; transition: transform .5s ease, filter .3s ease; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption, .gallery .g-cap {
  position: absolute; inset: auto 0 0 0; padding: 1.6rem .9rem .7rem; font-size: .85rem; color: #fff;
  background: linear-gradient(0deg, rgb(0 0 0 / .65), transparent); opacity: 0; transition: opacity .25s ease;
}
.gallery a:hover .g-cap, .gallery a:focus-visible .g-cap { opacity: 1; }
@media (hover: none) { .gallery .g-cap { opacity: 1; } }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; margin-top: 1rem; }
.thumbs a { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; display: block; background: var(--surface-2); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.thumbs a:hover img { transform: scale(1.07); }

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: 1fr auto; place-items: center;
  background: rgb(12 15 11 / .94); padding: 3.5rem 1rem 1rem; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100svh - 9rem); width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgb(0 0 0 / .5); }
.lightbox-caption { color: #e8e4da; font-size: .95rem; text-align: center; padding: .8rem 1rem 0; min-height: 2.6rem; }
.lightbox-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgb(255 255 255 / .1); color: #fff; display: grid; place-items: center; transition: background .2s ease;
}
.lightbox-btn:hover { background: rgb(255 255 255 / .22); }
.lightbox-btn svg { width: 24px; height: 24px; }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-count { position: absolute; top: 22px; left: 20px; color: #bdb8ad; font-size: .85rem; }
@media (max-width: 620px) { .lightbox-prev, .lightbox-next { top: auto; bottom: 14px; transform: none; } .lightbox { padding-bottom: 4.5rem; } }

/* ---------- Frise chronologique ---------- */
.year-nav { position: sticky; top: var(--header-h); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.year-nav ul { display: flex; gap: .3rem; list-style: none; margin: 0; padding: .7rem 0; overflow-x: auto; scrollbar-width: none; }
.year-nav ul::-webkit-scrollbar { display: none; }
.year-nav li { margin: 0; }
.year-nav a { display: block; padding: .4rem .95rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.year-nav a:hover { color: var(--ink); background: var(--surface-2); }
.year-nav a.is-active { color: var(--on-moss); background: var(--moss); }

.timeline { position: relative; margin-top: 2rem; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--fern), var(--line)); }
.tl-year { position: relative; padding-left: 3rem; margin: 3.5rem 0 1.5rem; }
.tl-year:first-child { margin-top: 0; }
.tl-year h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--moss); }
.tl-year::before { content: ""; position: absolute; left: 0; top: 50%; width: 24px; height: 24px; border-radius: 50%; background: var(--moss); transform: translateY(-50%); box-shadow: 0 0 0 6px var(--bg); }
.tl-item { position: relative; padding-left: 3rem; margin-bottom: 2rem; }
.tl-item::before { content: ""; position: absolute; left: 5px; top: 1.9rem; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--fern); }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.6rem; display: grid; grid-template-columns: 1fr; gap: 1rem; }
.tl-card.has-media { grid-template-columns: 1.1fr 1fr; align-items: start; }
@media (max-width: 760px) { .tl-card.has-media { grid-template-columns: 1fr; } }
.tl-date { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--earth); margin-bottom: .3rem; }
.tl-card h3 { margin-bottom: .45rem; }
.tl-card p { color: var(--muted); margin-bottom: .6em; }
.tl-card p:last-child { margin-bottom: 0; }
.tl-media { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.tl-media a { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); }
.tl-media a:only-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.tl-media a.wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.tl-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tl-media a:hover img { transform: scale(1.05); }
.tl-item.is-future .tl-card { border-style: dashed; background: transparent; }
.tl-item.is-future::before { border-color: var(--ochre); }

/* ---------- Bâtiment interactif ---------- */
.building-wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 920px) { .building-wrap { grid-template-columns: 1fr; } }
.building { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 3vw, 2rem); }
.building-scene { position: relative; padding-top: .5rem; }
.building-compass { display: flex; justify-content: space-between; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.roof {
  position: relative; height: clamp(70px, 12vw, 110px); margin: 0 -3%;
  background: linear-gradient(180deg, var(--earth), color-mix(in srgb, var(--earth) 70%, #000));
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  display: grid; place-items: end center; padding-bottom: .55rem;
  color: #fbf3e8; font-size: clamp(.65rem, 1.4vw, .8rem); font-weight: 600; letter-spacing: .05em; text-align: center;
}
.floors { border: 3px solid color-mix(in srgb, var(--ink) 60%, transparent); border-top: 0; background: color-mix(in srgb, var(--ochre) 10%, var(--surface)); }
.floor { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.floor + .floor { border-top: 3px solid color-mix(in srgb, var(--ink) 60%, transparent); }
.floor-label { grid-column: 1 / -1; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: .35rem .7rem 0; }
.lot {
  position: relative; min-height: clamp(96px, 15vw, 132px); margin: .45rem; border-radius: 8px;
  border: 2px solid transparent; background: var(--surface-2); color: var(--muted);
  font: inherit; text-align: left; padding: .7rem .8rem; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between; gap: .3rem;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.lot-num { font-family: var(--font-serif); font-size: clamp(1.05rem, 2.4vw, 1.4rem); line-height: 1.1; color: var(--ink); }
.lot-state { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.lot-price { font-size: .85rem; font-weight: 600; }
.lot::after { /* fenêtres */
  content: ""; position: absolute; right: .6rem; top: .7rem; width: 28%; height: 28%;
  border: 2px solid currentColor; border-radius: 3px; opacity: .25;
  background: linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat, linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}
.lot.is-available { background: var(--moss-soft); color: var(--moss); border-color: color-mix(in srgb, var(--moss) 35%, transparent); }
.lot.is-available:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--moss); }
.lot.is-selected { background: var(--moss); color: var(--on-moss); border-color: var(--moss); box-shadow: var(--shadow); }
.lot.is-selected .lot-num { color: var(--on-moss); }
.lot.is-common { background: color-mix(in srgb, var(--ochre) 22%, var(--surface)); color: color-mix(in srgb, var(--ochre) 60%, var(--ink)); }
.lot.is-common.is-selected { background: var(--ochre); color: #2a210f; border-color: var(--ochre); }
.lot.is-common.is-selected .lot-num { color: #2a210f; }
.lot.is-sold { background: var(--surface-2); color: var(--muted); }
.lot.is-sold .lot-num { color: var(--muted); }
.lot.is-sold.is-selected { border-color: var(--sold); background: var(--surface-2); color: var(--muted); }
.ground { height: 14px; margin: 0 -3%; background: repeating-linear-gradient(90deg, var(--fern) 0 6px, transparent 6px 10px); opacity: .55; border-radius: 0 0 6px 6px; }
.stilts { display: flex; justify-content: space-around; height: 14px; }
.stilts span { width: 4px; background: color-mix(in srgb, var(--ink) 50%, transparent); }
.legend { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; margin-top: 1.2rem; font-size: .85rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .45rem; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

.lot-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem); position: sticky; top: calc(var(--header-h) + 1rem); }
.lot-panel[hidden] { display: none; }
.lot-panel h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .2rem; }
.lot-panel .price { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.6vw, 2.4rem); color: var(--moss); margin: .6rem 0 .2rem; }
.lot-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: 1.2rem 0; padding: 0; list-style: none; }
.lot-specs li { margin: 0; padding: .7rem .8rem; background: var(--surface-2); border-radius: var(--radius-sm); font-size: .88rem; }
.lot-specs b { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: .1rem; }
.lot-panel h4 { font-family: var(--font-sans); font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--earth); margin: 1.3rem 0 .5rem; }
.lot-panel ul.checklist { font-size: .95rem; }
.lot-budget { width: 100%; border-collapse: collapse; font-size: .93rem; }
.lot-budget td { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.lot-budget td:last-child { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 1rem; }
.lot-panel .btn-row { margin-top: 1.4rem; }

/* ---------- Tableaux & FAQ ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .97rem; }
.table th, .table td { padding: .95rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table td.num { text-align: right; white-space: nowrap; font-weight: 600; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .7rem; }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 3rem 1.1rem 1.3rem; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 300; color: var(--moss); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .faq-body { padding: 0 1.3rem 1.2rem; color: var(--muted); }
.faq .faq-body p:last-child { margin: 0; }

/* Étapes numérotées */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; margin: 0; padding: 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--moss); color: var(--on-moss); font-weight: 700; margin-bottom: .8rem; }
.steps h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.steps p { font-size: .93rem; color: var(--muted); margin: 0; }

/* Téléchargements */
.downloads { display: grid; gap: .7rem; }
.download {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: border-color .2s ease, transform .2s ease;
}
.download:hover { border-color: var(--moss); color: var(--ink); transform: translateX(3px); }
.download-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--earth-soft); color: var(--earth); flex: none; font-size: .7rem; font-weight: 800; }
.download-icon svg { width: 22px; height: 22px; }
.download-text { display: flex; flex-direction: column; line-height: 1.3; }
.download-text small { color: var(--muted); }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .35rem; }
.field label, .fieldset legend { font-size: .9rem; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .8rem .95rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--moss); box-shadow: 0 0 0 4px color-mix(in srgb, var(--moss) 18%, transparent); }
.fieldset { border: 0; padding: 0; margin: 0; }
.fieldset legend { margin-bottom: .55rem; padding: 0; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; }
@media (max-width: 620px) { .choices { grid-template-columns: 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice label {
  display: flex; align-items: center; gap: .65rem; padding: .75rem .9rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: .95rem; line-height: 1.3;
  transition: border-color .2s ease, background .2s ease;
}
.choice label::before { content: ""; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--muted); flex: none; transition: all .15s ease; }
.choice input:checked + label { border-color: var(--moss); background: var(--moss-soft); }
.choice input:checked + label::before { background: var(--moss) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2l3 3L12.5 5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 85% no-repeat; border-color: var(--moss); }
.choice input:focus-visible + label { outline: 3px solid var(--ochre); outline-offset: 2px; }
.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.consent input { margin-top: .25rem; width: 18px; height: 18px; accent-color: var(--moss); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: .95rem; padding: .85rem 1rem; border-radius: var(--radius-sm); display: none; }
.form-status.is-visible { display: block; }
.form-status.is-success { background: var(--moss-soft); color: var(--moss); }
.form-status.is-error { background: var(--earth-soft); color: var(--earth); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.newsletter { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: clamp(1.6rem, 5vw, 3.5rem); }
@media (max-width: 860px) { .newsletter { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.contact-list li { display: flex; gap: 1rem; margin: 0; }
.contact-list .feature-icon { margin: 0; flex: none; }
.contact-list b { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--surface-2); }
.map iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Pied de page ---------- */
.site-footer { background: #1f2b1d; color: #d9d6cb; padding-block: 4rem 2rem; margin-top: 0; }
.site-footer a { color: #e9e5d9; text-decoration: none; }
.site-footer a:hover { color: #e9d7a8; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fbf8f1; margin-bottom: 1rem; }
.site-footer h3 { font-family: var(--font-sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #a8b39c; font-weight: 600; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer p { color: #bfc2b4; font-size: .95rem; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .1); margin-top: 3rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .85rem; color: #9ea392; }

/* ---------- Animations d'apparition ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Divers ---------- */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 2rem; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose > :first-child { margin-top: 0; }
.leaf-divider { display: flex; justify-content: center; color: var(--fern); margin: 0 auto; opacity: .7; }
.leaf-divider svg { width: 46px; height: 46px; }
.archive-note { font-size: .88rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 1rem; }

@media print {
  .site-header, .site-footer, .year-nav, .newsletter, .cta-band { display: none !important; }
  .hero, .page-hero { color: #000; min-height: 0; padding: 1rem 0; }
  .hero::after, .page-hero::after, .hero-media { display: none; }
  .hero h1, .page-hero h1, .hero p, .page-hero p { color: #000; }
  .reveal { opacity: 1; transform: none; }
}
