:root {
  --bg: #F4F1EC; --surface: #FFFFFF; --muted: #F7F4EF; --soft: #FBF9F6;
  --border: #E7E1D8; --border-input: #DCD4C9; --divider: #F1ECE5;
  --ink: #241F1A; --ink-2: #5E554D; --ink-3: #6E655D; --ink-4: #6B625A;
  --accent: #1F6F5C; --accent-hover: #2A8A72; --accent-tint: #DDEDE7;
  --ok-bg: #E4F2EA; --ok-border: #BEDFCC; --ok-ink: #1A6B45;
  --warn-bg: #FFF6E3; --warn-border: #F0DDB4; --warn-ink: #8A6410;
  --err-ink: #963A1C; --err-border: #F0C9BC;
  --shadow: 0 1px 2px rgba(36,31,26,.05), 0 12px 32px -20px rgba(36,31,26,.2);
  --shadow-big: 0 1px 2px rgba(36,31,26,.05), 0 28px 60px -32px rgba(36,31,26,.4);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Manrope, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #164F42; }
img { display: block; }
.mono { font-family: var(--mono); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(244,241,236,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand span { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.nav__links { display: flex; gap: 24px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.nav__links a, .nav__signin { color: var(--ink-2); }
.nav__links a:hover, .nav__signin:hover { color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: 6px; }
.nav__signin { font-size: 14px; font-weight: 700; padding: 10px 12px; white-space: nowrap; }

/* Boutons */
.btn { display: inline-block; border-radius: 14px; padding: 16px 28px; font: 700 16px/1.2 Manrope, system-ui, sans-serif; border: 1px solid transparent; cursor: pointer; text-align: center; transition: background .18s ease, border-color .18s ease; }
.btn--sm { border-radius: 12px; padding: 11px 16px; font-size: 14px; white-space: nowrap; }
.btn--primary { background: var(--accent); color: #FFFFFF; }
.btn--primary:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--border-input); padding: 16px 24px; }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(31,111,92,.16); }

/* Hero */
.hero { padding-top: 72px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: var(--accent); }
.hero h1 { margin: 0; font-size: clamp(36px, 6vw, 64px); line-height: 1.02; letter-spacing: -.04em; font-weight: 800; max-width: 15em; text-wrap: balance; }
.hero p { margin: 0; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
.row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.film { padding-top: 48px; padding-bottom: 88px; }
.film__frame { position: relative; aspect-ratio: 16 / 9; border-radius: 28px; overflow: hidden; background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow-big); }
.film__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: var(--bg); }

/* Sections */
.section { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 32px; }
.section--flush { padding-top: 0; }
.head { display: flex; flex-direction: column; gap: 10px; max-width: 40em; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4); font-weight: 700; }
.head h2, .demo h2 { margin: 0; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; }

/* Fonctionnalités */
.grid { display: grid; gap: 16px; }
.grid--features { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid--roles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--surface); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 20px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font-size: 21px; font-weight: 800; letter-spacing: -.015em; line-height: 1.3; }
.card p { margin: 0; font-size: 15px; color: var(--ink-3); line-height: 1.6; }
.vignette { margin-top: auto; background: var(--muted); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.line--dark { background: var(--ink); color: #FFFFFF; font-size: 13px; font-weight: 600; padding: 11px 14px; }
.line--dark u { font-weight: 800; text-underline-offset: 3px; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who b { display: block; font-size: 14px; }
.who small { display: block; font-size: 12.5px; color: var(--ink-3); }
.avatar { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 999px; background: #EFEAE2; color: var(--ink-2); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.badge { border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; border: 1px solid; white-space: nowrap; }
.badge--ok { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-ink); }
.badge--warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-ink); }
.kpis { margin-top: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--muted); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.kpi span { font-size: 12.5px; color: var(--ink-3); }
.kpi b { font-size: 15px; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; }
.check::before { content: '✓'; width: 18px; height: 18px; flex: 0 0 auto; border-radius: 999px; background: var(--ok-bg); color: var(--ok-ink); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.durations { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); }
.seg { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 3px; }
.seg span { padding: 5px 10px; border-radius: 9px; font-family: var(--mono); font-size: 12px; }
.seg .on { background: var(--ink); color: #FFFFFF; }
.also { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; }
.also div { background: var(--soft); padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.also b { font-size: 15px; }
.also span { font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }

/* Paiement par un tiers */
.dark { background: var(--ink); color: #FFFFFF; }
.dark__grid { padding-top: 88px; padding-bottom: 88px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 56px; align-items: center; }
.dark .eyebrow { color: #B5ADA4; }
.dark h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; }
.dark p { margin: 0; font-size: 17px; line-height: 1.65; color: #CFC7BE; max-width: 32em; text-wrap: pretty; }
.dark__text { display: flex; flex-direction: column; gap: 20px; }
.steps { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 16px; background: #2F2923; border: 1px solid #3F382F; border-radius: 18px; padding: 20px; }
.steps .mono { font-size: 13px; color: #B5ADA4; padding-top: 2px; }
.steps b { display: block; font-size: 15.5px; margin-bottom: 4px; }
.steps span:last-child { font-size: 14px; color: #CFC7BE; line-height: 1.5; }

/* Trois métiers */
.role { padding: 28px; gap: 16px; border-radius: 22px; }
.tag { align-self: flex-start; background: #EFEAE2; color: var(--ink-2); border-radius: 999px; padding: 5px 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.role h3 { font-size: 20px; margin: 0; }
.bullets { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.bullets li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.bullets li::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--accent); flex: 0 0 auto; margin-top: 8px; }
/* Accès aux guides d'utilisation (/aide/*) : lien en pied de carte, encart pour le guide réservé aux agences. */
.role__more { margin-top: auto; align-self: flex-start; font-size: 14.5px; font-weight: 700; }
.role__lock { margin: auto 0 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--muted); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.role__lock a { font-weight: 700; }
.footer__links { flex-wrap: wrap; }
#aide { scroll-margin-top: 96px; }

/* Démo */
.demo { background: var(--accent); border-radius: 28px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 40px; color: #FFFFFF; align-items: start; }
.demo__text { display: flex; flex-direction: column; gap: 14px; }
.demo__text p { margin: 0; font-size: 16.5px; line-height: 1.6; color: #E3F0EB; max-width: 28em; }
.form { background: var(--surface); color: var(--ink); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow-big); }
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-size: 13.5px; font-weight: 600; }
.label small { color: var(--ink-4); font-weight: 500; font-size: 13.5px; }
.input { height: 48px; border: 1px solid var(--border-input); border-radius: 14px; padding: 0 15px; font: 15px Manrope, system-ui, sans-serif; color: var(--ink); outline: none; width: 100%; background: var(--surface); transition: border-color .16s ease, box-shadow .16s ease; }
.input:focus, .affix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,111,92,.16); }
.affix { display: flex; height: 48px; border: 1px solid var(--border-input); border-radius: 14px; overflow: hidden; transition: border-color .16s ease, box-shadow .16s ease; }
.affix span { background: var(--muted); border-right: 1px solid var(--border-input); padding: 0 14px; display: flex; align-items: center; font-family: var(--mono); font-size: 14px; color: var(--ink-2); }
.affix input { flex: 1 1 auto; min-width: 0; border: none; padding: 0 14px; font-family: var(--mono); font-size: 14.5px; outline: none; color: var(--ink); }
.error { display: none; font-size: 12.5px; color: var(--err-ink); }
.field.is-invalid .error { display: block; }
.field.is-invalid .input, .field.is-invalid .affix { border-color: var(--err-border); }
.choices { display: flex; gap: 3px; background: var(--muted); border: 1px solid var(--border); border-radius: 14px; padding: 3px; margin: 0; }
.choices label { flex: 1 1 0; cursor: pointer; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span { display: block; text-align: center; padding: 9px 4px; border-radius: 11px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.choices input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(36,31,26,.1); }
.choices input:focus-visible + span { box-shadow: 0 0 0 3px rgba(31,111,92,.16); }
.hint { font-size: 12.5px; color: var(--ink-3); text-align: center; margin: 0; }
.form-error { margin: 0; font-size: 13px; color: var(--err-ink); }
.done { display: flex; flex-direction: column; gap: 12px; padding: 12px 0; }
.done__icon { width: 44px; height: 44px; border-radius: 999px; background: var(--ok-bg); border: 1px solid var(--ok-border); color: var(--ok-ink); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.done b { font-size: 20px; }
.done p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.done .btn { align-self: flex-start; padding: 12px 18px; font-size: 14.5px; }
[hidden] { display: none !important; }

/* Pied de page */
.footer { border-top: 1px solid var(--border); }
.footer__row { padding-top: 28px; padding-bottom: 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer .brand span { font-size: 14px; font-weight: 700; }
.footer__links { display: flex; gap: 22px; font-size: 13.5px; font-weight: 600; }
.footer__links a { color: var(--ink-3); }
.footer__links a:hover { color: var(--ink); }
.footer small { font-size: 13px; color: var(--ink-3); }

@media (max-width: 900px) { .nav__links { display: none; } }
@media (max-width: 640px) { .nav__signin { display: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Cadre d'attente tant que la vidéo de démo n'est pas déposée (public/assets/brand/tenancia-demo.mp4). */
.film__placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--muted); color: var(--ink-3); text-align: center; padding: 24px; }
.film__placeholder img { width: 56px; height: 56px; border-radius: 14px; opacity: .9; }
.film__placeholder b { color: var(--ink); font-size: 17px; font-weight: 700; }
.film__placeholder span { font-size: 14px; }
.film__frame.is-empty video { display: none; }
/* Champ piège anti-robots : hors écran, jamais rempli par un humain. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
