/* ==========================================================================
   Sunrise — one-pager
   Tokens repris de la charte app (frontend/src/index.css, PRD §27)
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Sun — accent de marque */
  --sun-50: #fff4ea; --sun-100: #ffe6cc; --sun-200: #ffd0a3; --sun-300: #ffb36b;
  --sun-400: #ff933a; --sun-500: #fb6f03; --sun-600: #e55c00; --sun-700: #bf4a08; --sun-800: #8f3a0e;
  /* Rose — secondaire d'aube */
  --rose-100: #fbdfe3; --rose-300: #ee94a4; --rose-500: #db5169; --rose-600: #c23e57;
  /* Ink / Navy */
  --ink-900: #08131f; --ink-800: #0e1e2e; --ink-700: #16293b; --ink-600: #234056;
  /* Stone — neutres chauds */
  --stone-0: #ffffff; --stone-50: #faf9f7; --stone-100: #f3f1ee; --stone-200: #e7e3de;
  --stone-300: #d4cfc8; --stone-400: #a8a29b; --stone-500: #78716b; --stone-600: #57534e;
  --stone-700: #3f3b37; --stone-900: #1c1917;
  /* Sémantique */
  --success: #15a34a; --danger: #dc2626; --warning: #d97706; --info: #0e8fa8;
  /* Dégradés d'aube */
  --gradient-aube-a: linear-gradient(135deg, #ffc15e, #fb6f03 48%, #db5169);
  --gradient-aube-c: linear-gradient(120deg, #f8b26a, #f4647e 55%, #db5169);
  /* Forme */
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px;
  --shadow-e1: 0 1px 2px rgba(0,0,0,.04);
  --shadow-e2: 0 4px 12px rgba(0,0,0,.10);
  --shadow-e3: 0 8px 24px rgba(0,0,0,.15);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Ciel bandé — état initial : nuit */
  --band-0: #050b13; --band-1: #08131f; --band-2: #0b1826; --band-3: #0e1e2e;
  --band-4: #122536; --band-5: #16293b; --band-6: #1d3145;
  --hill-back: #0d1b2a; --hill-front: #071019;
  --stars-alpha: 1;

  --header-h: 68px;
}

/* ==== Base ==== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* overflow-anchor : l'ancrage de scroll natif re-scrolle pendant les
   refresh des pins ScrollTrigger et corrompt leurs bornes */
html { scroll-behavior: smooth; overflow-anchor: none; }
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--stone-900);
  background: var(--ink-900);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.tnum { font-variant-numeric: tabular-nums; }

section[id] { scroll-margin-top: var(--header-h); }

/* ==== Ciel ==== */
.sky {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.sky__bands { position: absolute; inset: 0; display: flex; flex-direction: column; }
.band { flex: 1; }
.band[data-band="0"] { background: var(--band-0); }
.band[data-band="1"] { background: var(--band-1); }
.band[data-band="2"] { background: var(--band-2); }
.band[data-band="3"] { background: var(--band-3); }
.band[data-band="4"] { background: var(--band-4); }
.band[data-band="5"] { background: var(--band-5); }
.band[data-band="6"] { background: var(--band-6); }

.sky__stars { position: absolute; inset: 0 0 30% 0; opacity: var(--stars-alpha); }
.star {
  position: absolute;
  width: 2px; height: 2px; border-radius: 50%;
  background: #e8eef5;
}
.star--cross {
  width: 9px; height: 9px; background: none;
}
.star--cross::before, .star--cross::after {
  content: ''; position: absolute; background: #e8eef5;
}
.star--cross::before { left: 4px; top: 0; width: 1px; height: 9px; }
.star--cross::after { top: 4px; left: 0; height: 1px; width: 9px; }

.sky__sun {
  position: absolute;
  left: 50%; top: 0;
  width: clamp(170px, 22vw, 270px);
  aspect-ratio: 1;
  transform: translate(-50%, 120vh);
  will-change: transform;
}
.sun__disc {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: linear-gradient(155deg, #ffc15e, #fb6f03 48%, #db5169);
}
/* voile blanc progressif : le soleil pâlit à mesure que le matin s'installe */
.sun__disc::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%;
  background: #fff;
  opacity: var(--sun-veil, 0);
}
.sun__halo {
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(255, 193, 94, .13), 0 0 0 52px rgba(255, 193, 94, .06);
}
.sun__rays {
  position: absolute; inset: -30%;
  opacity: 0;
}

.sky__hills {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: clamp(90px, 17vh, 190px);
  display: block;
}
#hillBack { fill: var(--hill-back); }
#hillFront { fill: var(--hill-front); }

.grain {
  position: fixed; inset: 0; z-index: 60;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==== Header ==== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  transition: background-color .35s ease, box-shadow .35s ease;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__word {
  font-size: 20px; font-weight: 600; letter-spacing: -0.02em;
  background: var(--gradient-aube-a);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 7px rgba(251, 111, 3, .3));
}
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.site-nav a:not(.btn) {
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,.82);
  transition: color .25s ease;
  position: relative;
  padding: 4px 0;
}
.site-nav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--sun-500); border-radius: 1px;
  transition: right .25s ease;
}
.site-nav a:not(.btn):hover, .site-nav a.is-active:not(.btn) { color: #fff; }
.site-nav a.is-active:not(.btn)::after { right: 0; }

.site-header.is-day { background: rgba(255,255,255,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 -1px 0 var(--stone-200); }
.site-header.is-day .site-nav a:not(.btn) { color: var(--stone-600); }
.site-header.is-day .site-nav a:not(.btn):hover,
.site-header.is-day .site-nav a.is-active:not(.btn) { color: var(--stone-900); }

.burger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.burger span { width: 22px; height: 2px; background: #fff; border-radius: 1px; transition: transform .3s, opacity .3s, background-color .3s; }
.site-header.is-day .burger span { background: var(--stone-900); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==== Boutons ==== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-weight: 600; text-decoration: none;
  border: 0; cursor: pointer;
  border-radius: var(--radius-md);
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn--primary { background: var(--sun-500); color: #fff; }
.btn--primary:hover { background: var(--sun-600); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(251,111,3,.35); }
.btn--ghost-light { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.btn--ghost-light:hover { background: rgba(255,255,255,.15); }
.btn--sm { font-size: 13px; padding: 8px 16px; }
.btn--lg { font-size: 16px; padding: 14px 28px; }

/* ==== Typo commune ==== */
.overline {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sun-600);
  margin-bottom: 14px;
}
.overline--light { color: var(--sun-300); }

.section__title {
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.12;
  margin-bottom: 18px;
}
.section__sub {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.6;
  max-width: 56ch;
  margin-bottom: 8px;
  text-wrap: pretty; /* évite les mots orphelins en fin de paragraphe */
}

/* ==== Sections ==== */
main { position: relative; z-index: 1; }

.section {
  position: relative;
  padding: clamp(80px, 12vh, 140px) clamp(20px, 4vw, 48px);
}
.section--pin { min-height: 100vh; display: flex; align-items: center; }
.section__inner { max-width: 1160px; margin: 0 auto; width: 100%; }
.section__inner--center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.section__inner--center .section__sub { margin-inline: auto; }
.section__inner--split {
  display: grid; grid-template-columns: minmax(320px, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.section__inner--reverse { grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr); }
.section__inner--reverse .section__text { order: 2; }
.section__inner--reverse .app-window { order: 1; }
.section__inner--stack { display: flex; flex-direction: column; gap: 40px; align-items: center; }
.section__text--center { text-align: center; display: flex; flex-direction: column; align-items: center; }

/* Sections claires (jour) : texte sombre */
#toiture, #contacts, #pipeline, #demo { color: var(--stone-900); }
#toiture .section__sub, #contacts .section__sub,
#pipeline .section__sub, #demo .section__sub { color: var(--stone-600); }

/* Sections sombres (nuit/aube) : texte clair — #recherche vit sur
   l'embrasement de l'aube */
.section--ondark { color: #fff; }
.section--ondark .section__sub { color: rgba(255,255,255,.78); }

/* ==== Hero ==== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 40px) 24px 120px;
  color: #fff;
}
.hero__brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; }
.hero__word {
  font-size: 34px; font-weight: 600; letter-spacing: -0.02em;
  background: var(--gradient-aube-a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 10px rgba(251, 111, 3, .35));
}
.hero__title {
  font-size: clamp(34px, 5.6vw, 62px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.08;
  margin-bottom: 22px;
}
.hero__sub {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
  color: rgba(255,255,255,.78);
  max-width: 58ch;
  margin-inline: auto;
  margin-bottom: 36px;
  text-wrap: balance; /* pas de mot orphelin sur la dernière ligne */
}
.hero__sub strong { font-weight: 700; color: #fff; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* Chaîne d'automatisation du hero : détecter, qualifier, contacter. Les
   étapes sont reliées par un rail parcouru d'une impulsion lumineuse (rien
   à faire, ça avance tout seul) ; les connecteurs sont des pseudo-éléments,
   jamais du texte, pour ne pas être lus par les lecteurs d'écran. */
.chain {
  --rail-dim: rgba(255,255,255,.22);
  --rail-lit: var(--sun-300);
  display: flex; flex-direction: column; align-items: center;
  gap: 9px;
  margin: 0 0 24px;
}
.chain__steps {
  list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px 9px;
}
.chain__steps li { display: inline-flex; align-items: center; gap: 9px; }
.chain__steps li span {
  font-size: 13.5px; font-weight: 600; letter-spacing: .01em;
  color: #fff;
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
  border-radius: 999px;
  padding: 7px 15px;
  white-space: nowrap;
}
.chain__steps li:not(:last-child)::after {
  content: '';
  width: 42px; height: 2px; border-radius: 1px;
  flex-shrink: 0;
  background-image: linear-gradient(90deg,
    var(--rail-dim) 0 34%, var(--rail-lit) 50%, var(--rail-dim) 66% 100%);
  background-size: 280% 100%;
  animation: rail-flow 2.4s linear infinite;
}
.chain__steps li:nth-child(2)::after { animation-delay: .4s; }
@keyframes rail-flow {
  from { background-position: 0% 0; }
  to { background-position: 100% 0; }
}
.chain__note {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sun-300);
}

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; color: rgba(255,255,255,.6);
}
/* les chevrons de bas de section sont posés sur les collines, sombres à
   toute heure : le blanc convient sur toutes les sections */
.scroll-hint--bare { color: rgba(255,255,255,.75); }
.scroll-hint__label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.scroll-hint__chevron {
  width: 10px; height: 10px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: hint-bounce 2s ease-in-out infinite;
}
@keyframes hint-bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: .6; }
  50% { transform: rotate(45deg) translate(4px, 4px); opacity: 1; }
}

.badge {
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  white-space: nowrap;
}
.badge--industriel { background: #dbe7f5; color: #1e40af; }
.badge--proprio { background: #dcf2e3; color: #166534; }

.score-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; padding: 2px 9px;
  border-radius: 999px;
  background: #1fa85a; color: #fff;
  font-size: 12px; font-weight: 700;
}
.score-pill--mid { background: #93c53d; }

/* ==== Fenêtre app (mockups) ==== */
.app-window {
  background: var(--stone-0);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-e3), 0 0 0 1px var(--stone-200);
  overflow: hidden;
}
.app-window--wide { width: 100%; max-width: 1080px; }
.app-toolbar {
  display: flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 16px;
  border-bottom: 1px solid var(--stone-200);
  background: var(--stone-0);
}
.app-toolbar__word {
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  background: var(--gradient-aube-a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.app-tabs {
  margin-left: 14px;
  display: flex; gap: 2px;
  background: var(--stone-100);
  padding: 3px; border-radius: 9px;
}
.app-tab {
  font-size: 12px; font-weight: 500; color: var(--stone-600);
  padding: 4px 12px; border-radius: 7px;
}
.app-tab.is-active { background: var(--stone-0); color: var(--stone-900); box-shadow: var(--shadow-e1); }

/* ==== Mockup Recherche ==== */
.app-body--recherche { display: grid; grid-template-columns: 268px 1fr; min-height: 340px; }
.filter-panel { padding: 16px 15px; border-right: 1px solid var(--stone-200); display: flex; flex-direction: column; gap: 15px; }
.filter-group { display: flex; flex-direction: column; gap: 11px; }
.filter-panel__title { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--stone-500); }

/* Champs de filtre : mêmes poids visuels que les curseurs de pondération
   (le filtrage est la moitié de la promesse de la vue Recherche) */
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 8px; }
.ffield { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ffield__label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--sun-700);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ffield__value {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  font-size: 11.5px; font-weight: 600; color: var(--stone-900);
  background: var(--stone-0);
  border: 1px solid var(--stone-300);
  border-radius: var(--radius-sm);
  padding: 6px 7px 6px 9px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: var(--shadow-e1);
}
.ffield__caret {
  width: 11px; height: 11px; flex-shrink: 0;
  stroke: var(--stone-400); stroke-width: 2.4; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.slider { display: flex; flex-direction: column; gap: 7px; }
.slider__head { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 500; color: var(--stone-700); }
.slider__val { color: var(--stone-900); font-weight: 600; }
.slider__track { position: relative; height: 6px; border-radius: 3px; background: var(--stone-200); }
.slider__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: 3px; background: var(--sun-500); }
.slider__thumb {
  position: absolute; top: 50%; left: 0%;
  width: 15px; height: 15px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--sun-500);
  box-shadow: 0 0 0 2.5px #fff, var(--shadow-e2);
}
/* bouton factice du mockup : clarifie la fonction de la vue */
.mock-search-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--sun-500); color: #fff;
  font-size: 12.5px; font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}
.mock-search-btn svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2; fill: none;
  stroke-linecap: round;
}
.match-count {
  margin-top: auto;
  font-size: 13px; color: var(--stone-600);
  padding-top: 14px; border-top: 1px solid var(--stone-100);
}
.match-count strong { font-size: 20px; font-weight: 700; color: var(--stone-900); margin-right: 4px; }

.mock-map { position: relative; background: #e5e8e1; overflow: hidden; }
.mock-map__bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mock-map__bg .dept {
  fill: #fbfaf6;
  stroke: #c9c2b6; stroke-width: 1.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.mock-map__label {
  position: absolute; left: 12px; bottom: 9px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--stone-500);
}
.cluster {
  position: absolute;
  left: var(--cx); top: var(--cy);
  width: var(--cs); height: var(--cs);
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(251, 111, 3, .88);
  box-shadow: 0 0 0 5px rgba(251, 111, 3, .22);
  color: #fff; font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ==== Mockup Toiture (fiche prospect) ==== */
.app-body--toiture { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 340px; }
.fiche-head {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--stone-200);
  background: var(--stone-50);
}
.fiche-head__name { font-size: 14px; font-weight: 600; }
.fiche-head__loc { margin-left: auto; font-size: 12.5px; color: var(--stone-500); }
/* colonne gauche : score puis image satellite */
.fiche-left { padding: 14px 16px; border-right: 1px solid var(--stone-200); display: flex; flex-direction: column; justify-content: center; gap: 12px; }
/* Les barres restent groupées au centre (écart fixe), mais le bloc garde
   la même hauteur que la jauge « Score global » (align-items: stretch). */
.score-row { display: flex; align-items: stretch; gap: 16px; margin-bottom: 8px; }
.score-row .score-ring { flex-shrink: 0; }
.score-row .score-bars { flex: 1; justify-content: center; gap: 11px; }
.roof-real {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.roof-real img { width: 100%; height: auto; display: block; }
.roof-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.roof-overlay .bldg { fill: none; stroke: #0e1e2e; stroke-width: 1.5; }
.roof-overlay .pan {
  fill-opacity: 0.7;
  stroke: #fff; stroke-width: 0.8;
  transform-origin: center;
  transform-box: fill-box;
  cursor: pointer;
  transition: fill-opacity .15s ease, stroke-width .15s ease;
}
.roof-overlay .pan.is-hover { fill-opacity: 0.95; stroke-width: 2.4; }
.roof-caption { font-size: 12px; color: var(--stone-500); text-align: center; }

/* Infobulle des pans : reprend le cartouche sombre de l'application.
   Positionnée en pixels depuis le coin haut gauche de l'orthophoto par le
   JS, jamais cliquable pour ne pas voler le survol au pan. */
.roof-tip {
  position: absolute; left: 0; top: 0; z-index: 3;
  transform: translate(var(--tx, 0px), var(--ty, 0px));
  pointer-events: none;
  display: flex; flex-direction: column; gap: 3px;
  min-width: 138px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: rgba(8, 19, 31, .92);
  box-shadow: var(--shadow-e2);
  color: #fff;
  opacity: 0; visibility: hidden;
  transition: opacity .13s ease, visibility .13s;
}
.roof-tip.is-on { opacity: 1; visibility: visible; }
.roof-tip__title {
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--sun-300);
}
.roof-tip__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  font-size: 11px; color: rgba(255,255,255,.66);
  white-space: nowrap;
}
.roof-tip__row strong { font-size: 11.5px; font-weight: 600; color: #fff; }

/* colonne droite : cartouches empilés */
.fiche-right { padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; justify-content: center; }
.score-ring { width: 96px; }
.score-ring__dial { position: relative; }
.score-ring svg { width: 100%; display: block; transform: rotate(-90deg); }
.score-ring__bg { fill: none; stroke: var(--stone-100); stroke-width: 10; }
.score-ring__arc {
  fill: none; stroke: #1fa85a; stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 314.16; stroke-dashoffset: 314.16;
}
.score-ring__label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.score-ring__label strong { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
/* le libellé vit SOUS la jauge : aucun chevauchement possible */
.score-ring__caption {
  display: block;
  margin-top: 3px;
  text-align: center;
  white-space: nowrap;
  font-size: 9.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--stone-500);
}

.score-bars { width: 100%; display: flex; flex-direction: column; gap: 9px; }
.score-bar { display: grid; grid-template-columns: 76px 1fr 28px; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 500; color: var(--stone-600); }
.score-bar__track { height: 7px; border-radius: 4px; background: var(--stone-100); overflow: hidden; }
.score-bar__fill { height: 100%; width: 0%; border-radius: 4px; background: var(--bar-color); }
.score-bar__val { text-align: right; font-weight: 600; color: var(--stone-900); }

/* cartouches : les données de la fiche */
.tile {
  background: var(--stone-50);
  border: 1px solid var(--stone-100);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0;
}
.tile__label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--sun-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile strong { font-size: 13.5px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==== Contacts ==== */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: clamp(28px, 5vh, 56px);
  width: 100%;
  max-width: 1020px;
}
.step-card {
  position: relative;
  background: var(--stone-0);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-e2), 0 0 0 1px var(--stone-200);
  padding: 26px 24px 22px;
  text-align: left;
}
.step-card__num {
  position: absolute; top: 18px; right: 20px;
  font-size: 13px; font-weight: 700;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--sun-50); color: var(--sun-700);
}
.step-card__icon {
  width: 26px; height: 26px;
  stroke: var(--sun-600); stroke-width: 1.8; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: 14px;
}
.step-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.step-card p { font-size: 14px; line-height: 1.55; color: var(--stone-600); }
.step-card__demo {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed var(--stone-200);
  display: flex; flex-direction: column; gap: 6px;
}
.demo-row {
  font-size: 12.5px; font-weight: 500; color: var(--stone-700);
  background: var(--stone-50);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.demo-row .ok { font-style: normal; color: var(--success); font-weight: 700; }
/* profil LinkedIn du dirigeant, remonté par l'enrichissement */
.demo-row--li { display: flex; align-items: center; gap: 7px; }
.demo-row--li svg { width: 13px; height: 13px; flex-shrink: 0; fill: #0a66c2; }

/* ==== Pipeline ==== */
.kanban {
  position: relative;
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  padding: 16px;
  min-height: 300px;
  background: var(--stone-50);
}
.kcol {
  background: var(--stone-0);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0;
}
.kcol__head {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700;
  color: var(--col);
  background: var(--col-bg);
  border-radius: 7px;
  padding: 6px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kcol__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--col); flex-shrink: 0; }
.kslot { height: 68px; border-radius: var(--radius-sm); }
.kcard {
  font-size: 11.5px; font-weight: 500; line-height: 1.3;
  color: var(--stone-700);
  background: var(--stone-0);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-e1);
  padding: 8px 9px;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}
.kcard .score-pill { font-size: 10.5px; min-width: 28px; padding: 1px 7px; }
.kcard--ghost { opacity: .8; }
.kcard--mover {
  position: absolute;
  z-index: 2;
  box-shadow: var(--shadow-e2);
  border-color: var(--sun-300);
}
#colVendu.is-won { box-shadow: 0 0 0 2px var(--success); transition: box-shadow .3s ease; }

/* ==== Démo (compact : la carte doit tenir entière dans le viewport) ==== */
#demo {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: calc(var(--header-h) + 24px);
  padding-bottom: 76px;
}
.demo-card {
  width: min(680px, 100%);
  background:
    radial-gradient(ellipse 120% 80% at 50% 115%, var(--sun-200), var(--rose-100) 38%, var(--stone-50) 72%);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-e3), 0 0 0 1px var(--stone-200);
  padding: clamp(22px, 3vw, 36px) clamp(22px, 4vw, 48px);
  display: flex; flex-direction: column; align-items: center;
  max-height: calc(100dvh - var(--header-h) - 40px);
  overflow-y: auto;
}
.demo-card__logo { width: 38px; height: 38px; margin-bottom: 12px; }
.demo-card .section__title { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 10px; }
.demo-card .section__sub { font-size: 15px; }
/* Réservation directe : bouton vers le modal Cal.com, séparateur, formulaire */
.demo-cta { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 14px; }
.demo-cta__hint { font-size: 12.5px; font-weight: 500; color: var(--stone-500); }
.demo-or {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  margin-top: 14px;
  font-size: 13px; font-weight: 500; color: var(--stone-400);
}
.demo-or::before, .demo-or::after { content: ''; flex: 1; height: 1px; background: var(--stone-200); }

.demo-form { width: 100%; margin-top: 12px; display: flex; flex-direction: column; gap: 11px; text-align: left; }
.demo-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.demo-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--stone-700); }
.demo-form label em { font-weight: 400; color: var(--stone-400); font-style: normal; }
.demo-form input, .demo-form textarea {
  font-family: inherit; font-size: 14px;
  color: var(--stone-900);
  background: var(--stone-0);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.demo-form input::placeholder, .demo-form textarea::placeholder { color: var(--stone-400); }
.demo-form input:focus, .demo-form textarea:focus {
  outline: none;
  border-color: var(--sun-500);
  box-shadow: 0 0 0 3px rgba(251, 111, 3, .18);
}
.demo-form textarea { resize: vertical; }
.demo-form .btn { margin-top: 4px; align-self: center; min-width: 230px; font-size: 15px; padding: 11px 24px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; pointer-events: none; }
.demo-form__status { font-size: 13.5px; font-weight: 500; text-align: center; min-height: 18px; }
.demo-form__status.is-ok { color: var(--success); }
.demo-form__status.is-error { color: var(--danger); }
.demo-form__rgpd { font-size: 12px; color: var(--stone-500); text-align: center; }
.demo-form__rgpd a { color: inherit; }

/* ==== Footer : texte blanc sur les collines du dernier écran ==== */
.site-footer {
  position: absolute; left: 0; right: 0; bottom: 12px;
  padding: 0 24px;
  text-align: center;
  color: rgba(255, 255, 255, .92);
  font-size: 12.5px; font-weight: 500;
  line-height: 1.7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.site-footer a { color: inherit; text-underline-offset: 3px; }

/* ==== Focus visible ==== */
:focus-visible { outline: 2px solid var(--sun-500); outline-offset: 2px; }

/* ==========================================================================
   Écrans courts : tout doit tenir dans le viewport
   ========================================================================== */
@media (max-height: 820px) {
  .section { padding-top: 48px; padding-bottom: 48px; }
  .section--pin { padding-top: calc(var(--header-h) + 12px); }
  .section__title { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 12px; }
  .section__sub { font-size: 15px; }
  .section__inner--stack { gap: 22px; }
  .kanban { min-height: 240px; padding: 12px; }
  .kslot { height: 62px; }
  .app-body--recherche, .app-body--toiture { min-height: 300px; }
  .chain { gap: 7px; margin-bottom: 16px; }
  .chain__steps { gap: 7px; }
  .chain__steps li { gap: 8px; }
  .chain__steps li span { font-size: 12px; padding: 5px 12px; }
  .chain__steps li:not(:last-child)::after { width: 32px; }
  .chain__note { font-size: 10px; }
  .filter-panel { padding: 12px; gap: 11px; }
  .filter-group { gap: 8px; }
  .filter-grid { gap: 7px 6px; }
  .ffield__value { padding: 5px 6px 5px 8px; font-size: 11px; }
  .slider { gap: 5px; }
  .match-count { padding-top: 9px; }
  .match-count strong { font-size: 18px; }
  .app-toolbar { height: 40px; }
  .fiche-head { padding: 8px 14px; }
  .fiche-left { padding: 10px 12px; gap: 8px; }
  .fiche-right { padding: 8px 10px; gap: 5px; }
  .score-ring { width: 78px; }
  .score-ring__label strong { font-size: 18px; }
  .score-ring__caption { font-size: 8px; }
  .tile { padding: 5px 10px; }
  #demo { padding-top: calc(var(--header-h) + 12px); padding-bottom: 64px; }
  .site-footer { font-size: 11.5px; bottom: 8px; }
  .demo-card__logo { display: none; }
  .demo-card { padding: 18px clamp(20px, 3vw, 36px); }
  .demo-card .section__title { font-size: 22px; margin-bottom: 6px; }
  .demo-card .section__sub { font-size: 13.5px; }
  .demo-cta { margin-top: 8px; }
  .demo-or { margin-top: 10px; }
  .demo-form { margin-top: 6px; gap: 8px; }
  .demo-form label { gap: 3px; font-size: 12px; }
  .demo-form input, .demo-form textarea { padding: 7px 12px; font-size: 13.5px; }
  .demo-form .btn { padding: 9px 20px; font-size: 14px; margin-top: 2px; }
  .demo-form__status { min-height: 14px; font-size: 12.5px; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .section__inner--split, .section__inner--reverse { grid-template-columns: 1fr; }
  .section__inner--reverse .section__text { order: 1; }
  .section__inner--reverse .app-window { order: 2; }
  .steps { grid-template-columns: 1fr; max-width: 460px; }
  .kanban { grid-template-columns: repeat(6, minmax(130px, 1fr)); overflow-x: auto; }
  .app-window--wide { max-width: 100%; }
}

@media (max-width: 767px) {
  .burger { display: flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink-800);
    padding: 12px 24px 24px;
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .3s ease, opacity .3s ease, visibility .3s;
  }
  .site-header.is-day .site-nav { background: #fff; box-shadow: var(--shadow-e2); }
  .site-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .site-nav a:not(.btn) { padding: 14px 0; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .site-header.is-day .site-nav a:not(.btn) { border-bottom-color: var(--stone-100); }
  .site-nav .btn { margin-top: 16px; }
  .sky__sun { width: 130px; }
  .chain__steps { gap: 8px; }
  .chain__steps li { gap: 8px; }
  .chain__steps li span { font-size: 12.5px; padding: 6px 13px; }
  .chain__steps li:not(:last-child)::after { width: 26px; }
  .app-body--recherche, .app-body--toiture { grid-template-columns: 1fr; }
  .filter-panel, .fiche-left { border-right: 0; border-bottom: 1px solid var(--stone-200); }
  .mock-map { min-height: 260px; }
  .demo-form__grid { grid-template-columns: 1fr; }
  .section--pin { min-height: 0; }
}

/* ==========================================================================
   Reduced motion / sans JS : tout visible, thème jour statique
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint__chevron { animation: none; }
  /* le rail garde son dégradé, il cesse simplement de défiler */
  .chain__steps li:not(:last-child)::after { animation: none; background-position: 50% 0; }
}
body.no-motion {
  --band-0: #d3e6f4; --band-1: #deecf6; --band-2: #e8f1f7; --band-3: #f2f6f7;
  --band-4: #fcf7ef; --band-5: #fdf5ea; --band-6: #fff8f0;
  --hill-back: #8fae6d; --hill-front: #5c7f45;
  --stars-alpha: 0;
}
body.no-motion .hero, body.no-motion .section--ondark { color: var(--stone-900); }
body.no-motion .hero__sub, body.no-motion .section--ondark .section__sub { color: var(--stone-600); }
body.no-motion .overline--light { color: var(--sun-600); }
body.no-motion .site-nav a:not(.btn) { color: var(--stone-600); }
body.no-motion .btn--ghost-light { color: var(--stone-900); box-shadow: inset 0 0 0 1px var(--stone-300); background: var(--stone-0); }
body.no-motion .scroll-hint { color: var(--stone-500); }
body.no-motion .hero__sub strong { color: var(--stone-900); }
body.no-motion .chain { --rail-dim: var(--stone-300); --rail-lit: var(--sun-500); }
body.no-motion .chain__steps li span {
  color: var(--stone-900);
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 0 0 1px var(--stone-300);
}
body.no-motion .chain__note { color: var(--sun-700); }
body.no-motion .sky__sun { transform: translate(-50%, 26vh); }
body.no-motion .burger span { background: var(--stone-900); }
body.no-motion .slider__fill { width: var(--target, 50%); }
body.no-motion .slider__thumb { left: var(--target, 50%); }
body.no-motion .score-bar__fill { width: var(--target, 80%); }
body.no-motion .score-ring__arc { stroke-dashoffset: 40.84; }
