/* KRONOS LAB — démo Porcelaine Pixels */
:root {
  --white: #FFFFFF;
  --grey: #F5F5F7;
  --ink: #1D1D1F;
  --muted: #6E6E73;
  --accent: #0066CC;
  --accent-dark: #004F9E;
  --line: #E5E5EA;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 56px;
  --radius: 22px;
  --wrap: 1120px;
}

*, *::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; font-family: var(--font); color: var(--ink); background: var(--white);
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; letter-spacing: -0.01em;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(0, 102, 204, .45); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.section--alt { background: var(--grey); }
section { padding-block: clamp(80px, 12vw, 160px); }

/* Progress */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 100; pointer-events: none; }
.progress__bar { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); will-change: transform; }

/* Bandeau démo */
.demo-banner { margin: 0; padding: 8px 16px; text-align: center; font-size: 12px; color: var(--muted); background: var(--grey); }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent; transition: border-color .3s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner { height: 100%; width: min(var(--wrap), 100% - 32px); margin-inline: auto; display: flex; align-items: center; gap: 24px; }
.logo { font-weight: 700; letter-spacing: .12em; font-size: 15px; color: var(--ink); white-space: nowrap; }
.logo span { font-weight: 400; color: var(--muted); margin-left: .35em; }
.logo:hover { text-decoration: none; }
.nav { margin-left: auto; }
.nav__list { position: relative; display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__link { display: block; padding: 6px 12px; font-size: 14px; color: var(--ink); opacity: .8; transition: opacity .2s; }
.nav__link:hover { text-decoration: none; opacity: 1; }
.nav__link.is-active { opacity: 1; }
.nav__indicator {
  position: absolute; left: 0; bottom: -4px; height: 2px; width: 1px; background: var(--ink); border-radius: 2px;
  transform-origin: 0 50%; opacity: 0; transition: transform .5s var(--ease), opacity .3s;
}
.nav__toggle { display: none; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 22px; border-radius: 980px; border: 0; cursor: pointer;
  font-size: 17px; font-weight: 500; transition: background-color .2s, transform .2s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--sm { padding: 6px 14px; font-size: 13px; }
.btn--full { width: 100%; }
.btn--link { background: none; color: var(--accent); padding: 12px 8px; border: 0; cursor: pointer; }
.btn--link:hover { text-decoration: underline; }

/* Typo sections */
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 12px; letter-spacing: 0; }
.section-head { max-width: 760px; margin: 0 auto clamp(48px, 7vw, 88px); text-align: center; }
.section-title { font-size: clamp(34px, 5.6vw, 64px); }
.section-lead { margin: 20px auto 0; font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 620px; }
.note { font-size: 13px; color: var(--muted); margin-top: 16px; }

/* Hero */
.hero { padding-top: clamp(56px, 9vw, 112px); padding-bottom: clamp(64px, 8vw, 120px); overflow: hidden; }
.hero__text { text-align: center; will-change: transform, opacity; }
.hero__title { font-size: clamp(42px, 8.4vw, 96px); letter-spacing: -0.045em; line-height: 1.02; }
.hero__title span { color: var(--muted); }
.hero__lead { max-width: 620px; margin: 28px auto 0; font-size: clamp(18px, 2.2vw, 23px); color: var(--muted); line-height: 1.45; }
.hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; margin-top: 36px; }
.hero__media { margin-top: clamp(48px, 7vw, 88px); }
.hero__frame {
  margin: 0; border-radius: clamp(18px, 3vw, 32px); overflow: hidden; background: var(--grey);
  transform-origin: 50% 0; will-change: transform, opacity;
}
.hero__frame img { width: 100%; aspect-ratio: 1376 / 768; object-fit: cover; }

/* Sticky Showcase */
.showcase__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(40px, 6vw, 96px); }
.showcase__sticky { position: sticky; top: calc(var(--header-h) + 8vh); align-self: start; }
.showcase__frame {
  position: relative; aspect-ratio: 4 / 3.4; border-radius: var(--radius); overflow: hidden; background: var(--white);
}
.showcase__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(var(--z, 1.08)) translate(var(--x, 0%), var(--y, 0%));
  transition: opacity .8s var(--ease), transform 1.1s var(--ease);
}
.showcase__img.is-active { opacity: 1; }
.showcase__progress { display: flex; gap: 10px; list-style: none; margin: 20px 0 0; padding: 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.showcase__progress li { flex: 1; display: grid; gap: 8px; transition: color .4s; }
.showcase__progress span { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; position: relative; }
.showcase__progress span::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease); }
.showcase__progress li.is-active { color: var(--ink); }
.showcase__progress li.is-active span::after, .showcase__progress li.is-done span::after { transform: scaleX(1); }
.showcase__progress li.is-done span::after { background: var(--ink); opacity: .35; }

.chapter { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; }
.chapter:last-child { min-height: 60vh; }
.chapter__media { display: none; margin: 0 0 24px; border-radius: 18px; overflow: hidden; }
.chapter__num { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.chapter__title { font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 18px; }
.chapter p:last-child { color: var(--muted); font-size: 19px; max-width: 460px; }

/* Tarifs */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; margin-bottom: 20px; }
.filters__group { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 4px; background: var(--grey); border-radius: 980px; }
.chip {
  border: 0; background: transparent; padding: 8px 16px; border-radius: 980px; cursor: pointer;
  font-size: 14px; color: var(--muted); transition: background-color .25s var(--ease), color .25s;
}
.chip:hover { color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; }
.pricing__count { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 40px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
  background: var(--grey); border-radius: var(--radius); padding: 28px 26px 24px;
  display: flex; flex-direction: column;
  transition: transform .45s var(--ease), background-color .3s, opacity .4s var(--ease);
}
.card:hover { transform: translateY(-4px); background: #EEEEF1; }
.card.is-hidden { display: none; }
.card.is-entering { animation: cardIn .5s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card__brand { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.card__title { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 8px; }
.card__desc { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.card__meta { margin: auto 0 0; display: flex; justify-content: space-between; align-items: flex-end; }
.card__meta dt { font-size: 12px; color: var(--muted); }
.card__meta dd { margin: 0; font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }
.card__meta div:last-child { text-align: right; }
.card__meta div:last-child dd { font-size: 24px; letter-spacing: -0.02em; }
.pricing__empty { text-align: center; color: var(--muted); }
.pricing .note { text-align: center; margin-top: 40px; }

/* Corner */
.corner__media { margin: 0 0 clamp(32px, 5vw, 56px); border-radius: clamp(18px, 3vw, 32px); overflow: hidden; }
.corner__media img { width: 100%; aspect-ratio: 1376 / 768; object-fit: cover; }
.corner__grid { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.flat { background: var(--white); border-radius: var(--radius); padding: 28px; }
.flat h3 { font-size: 19px; letter-spacing: -0.02em; margin-bottom: 8px; }
.flat p { color: var(--muted); font-size: 15px; margin: 0; }
.hours { margin: 16px 0 0; }
.hours div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.trust { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Devis */
.quote__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .slots legend { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select {
  width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  font-size: 16px; transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 102, 204, .12); }
.field.is-invalid input, .field.is-invalid select { border-color: #D70015; }
.slots { border: 0; margin: 0; padding: 0; }
.slots legend { padding: 0; margin-bottom: 6px; }
.slots__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot { position: relative; cursor: pointer; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span { display: block; text-align: center; padding: 12px 6px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; transition: background-color .2s, color .2s, border-color .2s; }
.slot input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.slot input:focus-visible + span { outline: 3px solid rgba(0, 102, 204, .45); outline-offset: 2px; }
.slots.is-invalid .slot span { border-color: #D70015; }
.form__error { color: #D70015; font-size: 14px; margin: 0; }
.form .note { margin: 0; text-align: center; }

.form-done { text-align: center; padding: 48px 24px; background: var(--grey); border-radius: var(--radius); animation: cardIn .6s var(--ease) both; }
.form-done:focus { outline: none; }
.form-done h3 { font-size: 28px; margin: 20px 0 12px; }
.form-done p { color: var(--muted); }
.form-done__check { width: 56px; height: 56px; margin: 0 auto; fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.form-done__check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .7s var(--ease) forwards; }
.form-done__check path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw .5s .45s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.access { display: grid; gap: 24px; }
.map { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.map__river { fill: none; stroke: #D6E6F7; stroke-width: 18; stroke-linecap: round; }
.map__road path { fill: none; stroke: #FFFFFF; stroke-width: 10; stroke-linecap: round; }
.map__street path { fill: none; stroke: #FFFFFF; stroke-width: 4; stroke-linecap: round; }
.map__park { fill: #E3EEE3; }
.map__pin { fill: var(--accent); }
.map__pulse { fill: var(--accent); opacity: .15; transform-box: fill-box; transform-origin: center; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(.5); opacity: .35; } 100% { transform: scale(1.6); opacity: 0; } }
.map__label { font: 700 13px var(--font); fill: var(--ink); letter-spacing: .08em; }
.map__small { font: 500 11px var(--font); fill: var(--muted); }
.access__info h3 { font-size: 19px; margin-bottom: 8px; letter-spacing: .08em; }
.access__info p { color: var(--muted); font-size: 15px; margin-bottom: 10px; }

/* Footer */
.footer { background: var(--grey); padding: 48px 0 56px; font-size: 13px; color: var(--muted); }
.footer__inner { display: grid; gap: 10px; }
.footer p { margin: 0; }
.logo--small { font-size: 13px; color: var(--ink); margin-bottom: 6px !important; }

/* Révélations */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .showcase__grid { grid-template-columns: 1fr; }
  .showcase__sticky { display: none; }
  .chapter, .chapter:last-child { min-height: 0; opacity: 1; padding-bottom: 56px; }
  .chapter__media { display: block; }
  .corner__grid, .quote__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .header__cta { display: none; }
  .nav__toggle { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; }
  .nav__burger, .nav__burger::before, .nav__burger::after { display: block; width: 18px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease); }
  .nav__burger { position: relative; }
  .nav__burger::before, .nav__burger::after { content: ""; position: absolute; left: 0; }
  .nav__burger::before { top: -6px; } .nav__burger::after { top: 6px; }
  .nav__toggle[aria-expanded="true"] .nav__burger { background: transparent; }
  .nav__toggle[aria-expanded="true"] .nav__burger::before { transform: translateY(6px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__burger::after { transform: translateY(-6px) rotate(-45deg); }
  .nav__list {
    position: fixed; left: 0; right: 0; top: var(--header-h); flex-direction: column; gap: 0; padding: 8px 24px 24px;
    background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease);
  }
  .nav.is-open .nav__list { opacity: 1; transform: none; pointer-events: auto; }
  .nav__link { padding: 14px 0; font-size: 20px; border-bottom: 1px solid var(--line); }
  .nav__indicator { display: none; }
  .trust, .form__row { grid-template-columns: 1fr; }
  .slots__list { grid-template-columns: 1fr 1fr; }
  .filters { gap: 10px; }
  .filters__group { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .filters__group::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero__text, .hero__frame { transform: none !important; opacity: 1 !important; }
  .map__pulse { display: none; }
}
