/* ============================================================
   Archiga — Landing publique (page d'accueil visiteurs)
   Chargé uniquement sur core/landing.html via {% block extra_css %}, APRÈS
   partials/feuilles_de_style.html que base_anonymous.html inclut : la
   landing n'est pas une page autonome, elle a toutes les feuilles de
   l'application (tokens, layout, les familles, utilities) et n'en recharge
   aucune (#336). Toutes les classes sont préfixées .lp- et scopées sous .lp
   pour ne pas entrer en collision avec les blocks partagés.
   Couleurs, espacements, tailles, rayons et ombres : tokens.css ; huit
   valeurs propres à la page, ci-dessous.
   ============================================================ */

/* Le layout anonyme (base_anonymous.html) centre son contenu pour le login.
   landing.css n'étant chargé que sur la landing, on peut cibler le wrapper
   directement : ici on veut un flux pleine largeur en haut de page. */
.layout-anonymous {
  display: block;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 0;
  background: var(--color-surface);
}

/* ── Tokens propres à la page marketing (lot D-8 du design system, 21/09/2026) ──
   La landing lit tokens.css comme toute page (couleurs, espacements, tailles,
   rayons, ombres) ; les 46 alias `--lp-*` du 15/09 en renommaient 35 et en
   laissaient 4 morts. Restent huit valeurs qui n'existent pas dans l'échelle
   de l'application et que seule cette page emploie — un rythme de section et
   un titre de héros plus grands qu'aucun écran de gestion, une carte plus
   ronde, une ombre plus portée, la barre de navigation : un choix de page
   assumé, sous son nom de page. Les nommer dans tokens.css serait leur donner
   un rôle qu'aucune deuxième page n'a. */
.lp {
  --lp-text-on-accent: #d5e5ee; /* texte secondaire posé sur le fond primaire du CTA */
  --lp-shadow-preview: 0 12px 32px rgb(15 23 42 / 12%); /* l'aperçu produit « flotte » plus que --shadow-lg */
  --lp-space-20: 80px; /* rythme des sections, au-delà de --space-16 (64) */
  --lp-space-24: 96px;
  --lp-text-60: 60px; /* titre du héros, au-delà de --text-56 */
  --lp-radius-2xl: 16px; /* aperçu produit et comparatif, au-delà de --radius-xl (12) */
  --lp-nav-h: 60px; /* hauteur de la barre collante, reprise par le menu mobile */
  --lp-container: 1120px; /* plus large que page--wide (960) */

  color: var(--color-text);
  font-size: var(--text-14);
  line-height: var(--leading-relaxed);
}

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

/* :where() → spécificité nulle : toute classe (.lp-nav__link, .btn…) reprend la main sur la couleur. */
:where(.lp) a {
  color: var(--color-primary);
  text-decoration: none;
}

:where(.lp) a:hover {
  text-decoration: none;
}

/* Même règle pour le reset des boutons nus (le burger du menu mobile) : en
   `.lp button` (0,1,1) il battait `.btn--primary` (0,1,0) et rendait les CTA
   en texte nu, sans fond ni filet, depuis l'origine de la page (#308). */
:where(.lp) button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.lp svg {
  display: block;
}

/* Focus visible cohérent (accessibilité clavier) — pour ce qui n'a pas de
   famille : le burger, les liens de navigation. `.btn:focus-visible` et
   `.field__input:focus-visible` (0,2,0) gardent la main sur les boutons et
   les champs, qui gardent aussi leur arrondi (#308 : la règle en `.lp a`
   posait `border-radius: sm` sur un `.btn` au focus). */
:where(.lp) a:focus-visible,
:where(.lp) button:focus-visible,
:where(.lp) input:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.lp-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 300;
}

.lp-skip:focus {
  left: var(--space-4);
  top: var(--space-4);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

.lp-container {
  width: 100%;
  max-width: var(--lp-container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.lp-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}

.lp-muted {
  color: var(--color-text-secondary);
}

/* ── Badges (aperçu produit) ── */

/* ════════════════════════ NAVIGATION ════════════════════════ */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--lp-nav-h);
  background: rgb(255 255 255 / 85%);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.lp-nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.lp-nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: var(--text-18);
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.lp-nav__logo {
  width: 26px;
  height: 26px;
}

.lp-nav__links,
.lp-nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.lp-nav__link {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-13);
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition:
    background 120ms ease,
    color 120ms ease;
}

.lp-nav__link:hover {
  background: var(--color-bg-subtle);
  color: var(--color-text);
}

.lp-nav__burger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text);
}

.lp-nav__burger:hover {
  background: var(--color-bg-subtle);
}

.lp-nav__burger svg {
  width: 22px;
  height: 22px;
}

.lp-nav__mobile {
  display: none;
  position: fixed;
  inset: var(--lp-nav-h) 0 auto 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-6) var(--space-6);
  box-shadow: var(--shadow-md);
  z-index: 199;
}

.lp-nav__mobile.is-open {
  display: block;
}

.lp-nav__mobile .lp-nav__link {
  display: block;
  padding: var(--space-3);
  font-size: var(--text-16);
}

.lp-nav__mobile-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* Connexion inline (topbar) */
.lp-login {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.lp-nav__mobile-login {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

/* ════════════════════════ HERO ════════════════════════ */
.lp-hero {
  position: relative;
  padding: var(--space-16) 0 var(--space-12);
  background: var(--color-surface);
  overflow: hidden;
}

.lp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgb(27 73 101 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(27 73 101 / 5%) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(160deg, #000 0%, transparent 65%);
  mask-image: linear-gradient(160deg, #000 0%, transparent 65%);
  pointer-events: none;
}

.lp-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: var(--space-12);
  align-items: center;
}

.lp-hero__copy {
  text-align: left;
}

.lp-hero__title {
  font-size: var(--lp-text-60);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0 0 var(--space-5);
  color: var(--color-text);
}

.lp-hero__title em {
  font-style: normal;
  color: var(--color-primary);
}

.lp-hero__sub {
  font-size: var(--text-18);
  line-height: 1.45;
  color: var(--color-text-secondary);
  max-width: 48ch;
  margin: 0 0 var(--space-8);
}

/* Formulaire "commencer gratuitement" → signup */
.lp-cta-form {
  display: flex;
  gap: var(--space-2);
  max-width: 460px;
}

/* Aperçu produit (mock HTML/CSS) */
.lp-preview {
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--lp-radius-2xl);
  background: var(--color-surface);
  box-shadow: var(--lp-shadow-preview);
  overflow: hidden;
  text-align: left;
}

.lp-appbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.lp-appbar__url {
  margin-left: var(--space-3);
  font-size: var(--text-12);
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

.lp-appshell {
  display: grid;
  grid-template-columns: 168px 1fr;
  min-height: 340px;
}

.lp-appshell__side {
  border-right: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
  padding: var(--space-4) var(--space-3);
}

.lp-appnav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lp-appnav__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-13);
  color: var(--color-text-secondary);
}

.lp-appnav__item svg {
  width: 15px;
  height: 15px;
}

.lp-appnav__item--active {
  background: #e6ebf1;
  color: var(--color-text);
  font-weight: 500;
}

.lp-appshell__main {
  padding: var(--space-5);
}

.lp-appshell__crumb {
  font-size: var(--text-12);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.lp-appshell__title {
  font-size: var(--text-18);
  font-weight: 600;
  margin-bottom: var(--space-5);
}

.lp-appshell__kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

/* La tuile de la maquette est `card kpi` (les familles carte et KPI, chargées
   par la page) ; la landing ne charge pas utilities.css, le padding est ici. */
.lp-appshell__kpi {
  padding: var(--space-4);
}

.lp-appshell__delta {
  color: var(--color-success);
}

/* ════════════════════════ SECTIONS ════════════════════════ */
.lp-section {
  padding: var(--lp-space-24) 0;
}

/* Les sept fonds « discrets » de la page (cette section, le pied de page, les
   survols de la navigation, la barre et le volet de la maquette, la colonne
   des libellés du comparatif) lisent `--color-bg-subtle` : l'alias d'origine
   `--lp-bg-subtle` pointait `--color-bg` (#fff), un blanc sur blanc (#308). */
.lp-section--subtle {
  background: var(--color-bg-subtle);
}

.lp-section__head {
  max-width: 680px;
  margin: 0 0 var(--space-12);
  text-align: left;
}

.lp-section__title {
  font-size: var(--text-48);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: var(--space-3) 0 var(--space-4);
  color: var(--color-text);
}

.lp-section__sub {
  font-size: var(--text-18);
  line-height: 1.45;
  color: var(--color-text-secondary);
}

/* ── Comparatif ── */
.lp-compare {
  border: 1px solid var(--color-border);
  border-radius: var(--lp-radius-2xl);
  overflow: hidden;
  background: var(--color-surface);
}

.lp-compare__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.lp-compare__row + .lp-compare__row {
  border-top: 1px solid var(--color-border);
}

.lp-compare__cell {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-13);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.lp-compare__cell--label {
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg-subtle);
}

.lp-compare__cell--archiga {
  background: var(--color-primary-bg);
}

.lp-compare__head {
  font-weight: 600;
  font-size: var(--text-13);
}

.lp-compare__head--archiga {
  color: var(--color-primary);
}

.lp-compare__ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.lp-compare__ico--no {
  color: var(--color-danger);
}

.lp-compare__ico--yes {
  color: var(--color-success);
}

.lp-compare__val {
  color: var(--color-text-secondary);
}

.lp-compare__val--strong {
  color: var(--color-text);
  font-weight: 500;
}

/* ── Fonctionnalités ── */
.lp-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6) var(--space-8);
}

.lp-feature {
  position: relative;
  padding-top: var(--space-5);
  border-top: 2px solid var(--color-primary);
}

.lp-feature__num {
  position: absolute;
  top: var(--space-5);
  right: 0;
  font-variant-numeric: tabular-nums;
  font-size: var(--text-12);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.lp-feature__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.lp-feature__icon svg {
  width: 20px;
  height: 20px;
}

.lp-feature__title {
  font-size: var(--text-16);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.lp-feature__desc {
  font-size: var(--text-13);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ── CTA final ── */
.lp-cta {
  padding: var(--lp-space-20) 0;
  background: var(--color-primary);
  color: #fff;
  text-align: left;
}

.lp-cta__title {
  font-size: var(--text-48);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
  max-width: 18ch;
  color: #fff;
}

.lp-cta__sub {
  font-size: var(--text-18);
  color: var(--lp-text-on-accent);
  max-width: 54ch;
  margin: 0 0 var(--space-8);
}

.lp-cta .lp-cta-form {
  margin: 0;
}

.lp-cta__note {
  margin-top: var(--space-4);
  font-size: var(--text-13);
  color: var(--lp-text-on-accent);
}

/* ── Footer ── */
.lp-footer {
  padding: var(--space-16) 0 var(--space-8);
  background: var(--color-bg-subtle);
  border-top: 1px solid var(--color-border);
}

.lp-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--space-8);
}

.lp-footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: var(--text-18);
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.lp-footer__blurb {
  font-size: var(--text-13);
  color: var(--color-text-secondary);
  max-width: 34ch;
}

.lp-footer__made {
  margin-top: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-12);
  color: var(--color-text-secondary);
}

.lp-footer__col-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.lp-footer__link {
  display: block;
  padding: var(--space-1) 0;
  font-size: var(--text-13);
  color: var(--color-text-secondary);
}

.lp-footer__link:hover {
  color: var(--color-text);
}

.lp-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-12);
  color: var(--color-text-secondary);
}

/* ════════════════════════ RESPONSIVE ════════════════════════
   Deux paliers de l'échelle (tokens.css) au lieu de quatre seuils propres
   (1040, 900, 860, 720 — lot D-8, 21/09/2026). La navigation se replie d'un
   coup à 1024 : avant, entre 860 et 1040 px, les liens étaient masqués sans
   que le burger apparaisse — un trou de 180 px où « Fonctionnalités » et
   « Tarifs » n'étaient joignables nulle part. Le héros passe en une colonne
   au même palier : à deux colonnes sous 1024 px, le titre de 60 px n'a plus
   la place. */
@media (width <= 1024px) {
  .lp-nav__links,
  .lp-nav__actions {
    display: none;
  }

  .lp-nav__burger {
    display: flex;
  }

  .lp-hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .lp-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .lp-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  .lp-appshell__side {
    display: none;
  }

  .lp-appshell {
    grid-template-columns: 1fr;
  }
}

@media (width <= 768px) {
  .lp-hero__title {
    font-size: var(--text-40);
  }

  .lp-section__title,
  .lp-cta__title {
    font-size: var(--text-32);
  }

  .lp-hero {
    padding: var(--space-16) 0 var(--space-12);
  }

  .lp-cta-form {
    flex-direction: column;
  }

  .lp-appshell__kpis {
    grid-template-columns: 1fr;
  }

  .lp-features {
    grid-template-columns: 1fr;
  }

  .lp-compare__row {
    grid-template-columns: 1fr;
  }

  .lp-compare__cell--label {
    border-bottom: 1px solid var(--color-border);
  }

  .lp-footer__grid {
    grid-template-columns: 1fr;
  }
}

.lp-features--narrow {
  max-width: 760px;
}
