/* ==========================================================================
   ECO CASA CONCEPT — global.css
   Composants partagés : tokens, base, nav, boutons, footer, reveals
   ========================================================================== */

:root {
  /* Couleurs — stratégie Committed : le vert forêt porte l'identité */
  --paper:        oklch(99.3% 0.003 85);   /* Blanc quasi pur, très légère tiède */
  --cream:        oklch(96.5% 0.014 85);   /* Beige clair pour les CARDS uniquement */
  --cream-deep:   oklch(93% 0.022 80);
  --forest:       oklch(32% 0.055 155);
  --forest-soft:  oklch(42% 0.055 152);
  --forest-deep:  oklch(26% 0.05 155);
  --moss:         oklch(62% 0.06 140);
  --moss-ink:     oklch(46% 0.075 145); /* Contraste ≥ 4.5:1 sur cream — pour texte accent vert */
  --bark:         oklch(42% 0.045 60);
  --ink:          oklch(24% 0.015 90);
  --ink-soft:     oklch(42% 0.015 90);
  --paper-on-dark:oklch(94% 0.015 90);
  --paper-dim:    oklch(80% 0.02 120);
  --line:         oklch(85% 0.02 85);
  --line-dark:    oklch(40% 0.04 155);

  /* Typo — direction éditoriale luxe : Prata (display) + EB Garamond (body) */
  --serif: "Prata", "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans:  "EB Garamond", "Garamond", "Iowan Old Style", Georgia, serif;

  /* Règle Matteo : arrondis 10px max, uniformes */
  --radius: 10px;

  --container: 1240px;
  --gutter: clamp(20px, 4.5vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  margin: 0;
  text-wrap: balance;
}

/* Headings compacts (h3/h4) en EB Garamond avec plus de poids pour lisibilité */
h3, h4 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
}
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin: 0; }
a { color: inherit; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Boutons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  padding: 18px 30px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .25s cubic-bezier(.22,1,.36,1), color .25s, border-color .25s, transform .25s cubic-bezier(.22,1,.36,1);
}
.btn:active { transform: translateY(1px); }
.btn-lg {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 22px 38px;
  gap: 12px;
  box-shadow: 0 6px 16px -8px oklch(20% 0.04 100 / .35);
}

.btn-forest { background: var(--forest); color: var(--paper-on-dark); }
.btn-forest:hover { background: var(--forest-deep); }

.btn-paper { background: var(--cream); color: var(--forest); }
.btn-paper:hover { background: var(--cream-deep); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }

.btn-ghost-light { background: transparent; color: var(--paper-on-dark); border-color: oklch(94% 0.015 90 / .45); }
.btn-ghost-light:hover { border-color: var(--paper-on-dark); background: oklch(94% 0.015 90 / .08); }

/* --- Navigation flottante ----------------------------------------------- */

.nav {
  position: fixed;
  top: clamp(14px, 2vw, 22px);
  left: 0;
  right: 0;
  margin-inline: auto;
  z-index: 100;
  width: calc(100% - clamp(20px, 4vw, 44px));
  max-width: 1180px;
  transition: box-shadow .35s ease;
}

.nav-inner {
  padding: 12px 14px 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: var(--radius);
  background: oklch(99.3% 0.003 85 / .85);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid oklch(30% 0.03 100 / .08);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / .6) inset,
    0 12px 32px -18px oklch(20% 0.04 100 / .3),
    0 4px 12px -8px oklch(20% 0.04 100 / .15);
}

.nav.on-dark .nav-inner {
  background: oklch(22% 0.045 155 / .55);
  border-color: oklch(94% 0.015 90 / .18);
  box-shadow:
    0 1px 0 oklch(100% 0 0 / .12) inset,
    0 16px 40px -20px oklch(0% 0 0 / .5);
}

.nav.is-scrolled .nav-inner {
  background: oklch(99.3% 0.003 85 / .96);
}

.nav.is-open .nav-inner {
  background: oklch(99.3% 0.003 85 / .98);
  border-color: oklch(30% 0.03 100 / .08);
  box-shadow: 0 1px 0 oklch(100% 0 0 / .6) inset, 0 12px 32px -18px oklch(20% 0.04 100 / .3);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.55rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: color .3s ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.nav-logo em { font-style: normal; color: var(--moss); }
.nav-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--forest);
  transition: color .3s ease;
}
.nav-logo-mark svg { width: 100%; height: 100%; }
.nav.on-dark:not(.is-scrolled) .nav-logo-mark { color: oklch(85% 0.06 130); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.8vw, 40px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a:not(.btn) {
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  transition: color .2s;
}
.nav-links a:not(.btn):hover { color: var(--bark); }
.nav-links .btn { padding: 13px 22px; font-size: 1.05rem; font-weight: 700; box-shadow: none; }

/* Nav posée sur le hero sombre */
.nav.on-dark:not(.is-scrolled) .nav-logo,
.nav.on-dark:not(.is-scrolled) .nav-links a:not(.btn) { color: var(--paper-on-dark); }
.nav.on-dark:not(.is-scrolled) .nav-links a:not(.btn):hover { color: oklch(88% 0.04 120); }
.nav.on-dark:not(.is-scrolled) .btn-forest { background: var(--cream); color: var(--forest); }
.nav.on-dark:not(.is-scrolled) .nav-logo em { color: oklch(85% 0.06 130); }

.nav-burger {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--ink);
  margin: 6px 0;
  transition: transform .3s cubic-bezier(.22,1,.36,1), opacity .3s, background-color .3s;
}
.nav.on-dark:not(.is-scrolled):not(.is-open) .nav-burger span { background: var(--paper-on-dark); }

@media (max-width: 860px) {
  .nav-inner { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-burger { display: block; position: relative; z-index: 102; }
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 101;
    flex-direction: column;
    justify-content: center;
    padding: 120px 24px 40px;
    gap: 28px;
    background: var(--paper);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    overflow-y: auto;
  }
  .nav.is-open .nav-links { opacity: 1; pointer-events: auto; }
  .nav.on-dark.is-open .nav-links a:not(.btn) { color: var(--ink); }
  .nav.on-dark.is-open .btn-forest { background: var(--forest); color: var(--paper-on-dark); }
  .nav.is-open .nav-burger span { background: var(--ink); }
  .nav.is-open .nav-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav.is-open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .nav-links a:not(.btn) { font-size: 1.35rem; }
}

/* --- Footer ------------------------------------------------------------- */

.footer {
  background: var(--forest-deep);
  color: var(--paper-dim);
  padding: clamp(56px, 8vw, 96px) 0 40px;
  font-size: .95rem;
}
.footer a { color: var(--paper-on-dark); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--paper-on-dark);
}
.footer-brand em { font-style: normal; color: var(--moss); }
.footer p { max-width: 46ch; }

.footer .footer-title {
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: oklch(78% 0.07 140);
  margin: 0 0 18px;
  line-height: 1.2;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  font-size: .85rem;
  color: oklch(65% 0.03 140);
}

@media (max-width: 760px) {
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
}

/* --- Reveals au scroll --------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* --- Sticky CTA mobile (global — présent sur toutes les pages) ------------- */

.sticky-cta {
  position: fixed;
  bottom: 14px;
  left: 12px;
  right: 12px;
  z-index: 90;
  display: none;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 14px 16px;
  background: var(--forest);
  color: var(--paper-on-dark);
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow:
    0 16px 40px -14px oklch(20% 0.04 155 / .6),
    0 6px 16px -6px oklch(20% 0.04 155 / .4);
  transform: translateY(140%);
  transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta:active { transform: translateY(2px); }

.sticky-cta-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: oklch(94% 0.015 90 / .16);
  color: oklch(88% 0.06 130);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.sticky-cta-icon svg { width: 24px; height: 24px; }
.sticky-cta-icon::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: var(--radius);
  border: 2px solid oklch(88% 0.06 130 / .5);
  animation: sticky-pulse 2.4s ease-out infinite;
}
@keyframes sticky-pulse {
  0%   { transform: scale(1);    opacity: .6; }
  70%  { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1.15); opacity: 0; }
}

.sticky-cta-body {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}
.sticky-cta-body strong {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--paper-on-dark);
}
.sticky-cta-body span {
  display: block;
  font-size: .82rem;
  color: oklch(85% 0.03 120);
  margin-top: 3px;
}
.sticky-cta-arrow {
  flex-shrink: 0;
  width: 22px; height: 22px;
  color: oklch(88% 0.06 130);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.sticky-cta:active .sticky-cta-arrow { transform: translateX(4px); }

@media (max-width: 860px) {
  .sticky-cta { display: flex; }
  body.has-sticky-cta { padding-bottom: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .sticky-cta-icon::after { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   CTA final (section sombre avec image en fond)
   Shared by home + geo pages
   ============================================================ */
.cta-final {
  position: relative;
  isolation: isolate;
  color: var(--paper-on-dark);
  padding-block: clamp(88px, 14vw, 180px);
  text-align: center;
}
.cta-final img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
}
.cta-final::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: oklch(22% 0.045 155 / .72);
}
.cta-final h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
  font-size: clamp(2.1rem, 5.5vw, 4.2rem);
  max-width: 20ch;
  margin-inline: auto;
}
.cta-final p {
  margin: 22px auto 0;
  max-width: 52ch;
  font-size: 1.2rem;
  color: oklch(90% 0.02 100);
  line-height: 1.6;
}
.cta-final .hero-ctas { justify-content: center; display: flex; flex-wrap: wrap; gap: 16px; }
.cta-final-ctas { margin-top: 34px; }
.cta-reassure {
  margin: 20px auto 0;
  max-width: 60ch;
  font-size: 1.05rem;
  color: oklch(88% 0.025 110);
  line-height: 1.6;
}

/* ============================================================
   Mesh interne — bloc "Nos autres zones d'intervention"
   ============================================================ */
.geo-mesh {
  padding-block: clamp(56px, 8vw, 88px);
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.geo-mesh-head { text-align: center; max-width: 780px; margin: 0 auto clamp(32px, 4vw, 48px); }
.geo-mesh-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 14px;
}
.geo-mesh-head p { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.6; }
.geo-mesh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(28px, 3vw, 40px);
  max-width: 1100px;
  margin: 0 auto;
}
.geo-mesh-col h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.geo-mesh-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.geo-mesh-col a {
  display: block;
  padding: 8px 0;
  font-size: 1.02rem;
  color: var(--ink);
  text-decoration: none;
  transition: color .18s, transform .18s;
}
.geo-mesh-col a::before {
  content: "→ ";
  color: var(--forest);
  opacity: 0;
  transition: opacity .18s;
  margin-right: 4px;
}
.geo-mesh-col a:hover { color: var(--forest); }
.geo-mesh-col a:hover::before { opacity: 1; }
.geo-mesh-col a[aria-current="page"] {
  color: var(--forest);
  font-weight: 600;
  pointer-events: none;
}
.geo-mesh-col a[aria-current="page"]::before { opacity: 1; }
