/* ═══════════════════════════════════════════════════════════════
   MAPAERO — site de présentation
   Typographie système (SF Pro sur Apple), sections plein écran,
   alternance clair / sombre. Aucune ressource externe.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Clair */
  --ink:        #1d1d1f;
  --ink-soft:   #6e6e73;
  --ink-faint:  #86868b;
  --paper:      #ffffff;
  --paper-2:    #f5f5f7;
  --hair:       rgba(0, 0, 0, 0.10);
  --link:       #0a6ed1;

  /* Sombre — palette de l'application */
  --night:      #060910;
  --night-2:    #0d1322;
  --night-ink:  #eef5fc;
  --night-soft: #8ea4bb;
  --night-hair: rgba(124, 160, 202, 0.16);
  --cyan:       #00c8ff;
  --amber:      #e6b14a;
  --green:      #39ff14;
  --orange:     #ff6b35;

  --nav-h: 48px;
  --measure: 680px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
          Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Barre de navigation ─────────────────────────────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.nav.is-dark {
  background: rgba(6, 9, 16, 0.72);
  border-bottom-color: rgba(124, 160, 202, 0.18);
}

.nav__inner {
  max-width: 1024px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  transition: color 0.4s var(--ease);
}
.nav__brand:hover { text-decoration: none; opacity: 0.7; }
.nav__brand img { width: 20px; height: 20px; border-radius: 5px; }
.nav.is-dark .nav__brand { color: var(--night-ink); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.nav__link {
  font-size: 13px;
  color: var(--ink);
  opacity: 0.85;
  letter-spacing: 0;
  transition: opacity 0.25s var(--ease), color 0.4s var(--ease);
}
.nav__link:hover { opacity: 1; text-decoration: none; }
.nav__link.is-active { font-weight: 600; opacity: 1; }
.nav.is-dark .nav__link { color: var(--night-ink); }

/* Choix de la langue : la langue courante en gras, l'autre en lien. */
.nav__lang {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.nav__lang a,
.nav__lang span {
  padding: 3px 6px;
  border-radius: 5px;
  color: var(--ink);
  transition: background 0.25s var(--ease), color 0.4s var(--ease);
}
.nav__lang a { opacity: 0.6; }
.nav__lang a:hover { opacity: 1; text-decoration: none; background: var(--hair); }
.nav__lang span { font-weight: 600; }
.nav.is-dark .nav__lang a,
.nav.is-dark .nav__lang span { color: var(--night-ink); }
.nav.is-dark .nav__lang a:hover { background: var(--night-hair); }

/* ─── Sections plein écran ────────────────────────────────────── */

/* Une section = un écran. Le défilement reste libre : pas d'accrochage,
   qui se retourne contre l'utilisateur dès qu'une section dépasse. */
.screen {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 44px) 22px 56px;
  position: relative;
  overflow: hidden;
}

.screen--tight { min-height: auto; padding-top: 96px; padding-bottom: 96px; }

.screen--dark {
  background: var(--night);
  color: var(--night-ink);
}
.screen--dark .lede { color: var(--night-soft); }
.screen--dark .eyebrow { color: var(--cyan); }
.screen--dark .kicker { color: var(--night-soft); }

.screen--tinted { background: var(--paper-2); }

.wrap {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  text-align: center;
}
.wrap--wide { max-width: 1180px; }
.wrap--text { max-width: var(--measure); text-align: left; }

/* ─── Typographie ─────────────────────────────────────────────── */

.eyebrow {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--link);
  margin: 0 0 10px;
}

h1, h2, h3 { letter-spacing: -0.025em; margin: 0; font-weight: 600; }

.display {
  font-size: clamp(44px, 8vw, 88px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.title {
  font-size: clamp(32px, 5.2vw, 56px);
  line-height: 1.08;
  margin: 0 0 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  max-width: 16ch;
  margin-inline: auto;
}
.wrap--text .title { margin-inline: 0; max-width: none; }

.title--wide { max-width: 22ch; }

.lede {
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto;
}
.wrap--text .lede { margin-inline: 0; }

.kicker {
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0;
  margin: 18px 0 0;
}

.mono {
  font-family: var(--mono);
  font-size: 0.86em;
  letter-spacing: 0.02em;
}

/* ─── Boutons ─────────────────────────────────────────────────── */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}
.wrap--text .actions { justify-content: flex-start; }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 980px;
  background: var(--link);
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.btn:hover { text-decoration: none; background: #0a5cb0; }
.btn:active { transform: scale(0.97); }

.btn--ghost {
  background: transparent;
  color: var(--link);
  border-color: currentColor;
}
.btn--ghost:hover { background: rgba(10, 110, 209, 0.08); }

.screen--dark .btn { background: var(--cyan); color: #04121b; font-weight: 500; }
.screen--dark .btn:hover { background: #4fdcff; }
.screen--dark .btn--ghost {
  background: transparent; color: var(--cyan); border-color: rgba(0, 200, 255, 0.5);
}
.screen--dark .btn--ghost:hover { background: rgba(0, 200, 255, 0.10); }

.link-arrow { font-size: 16px; color: var(--link); }
.link-arrow::after { content: " ›"; }
.screen--dark .link-arrow { color: var(--cyan); }

/* ─── Visuels ─────────────────────────────────────────────────── */

.shot {
  margin: 36px auto 0;
  width: fit-content;
  max-width: min(940px, 100%);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Le visuel ne pousse jamais la section au-delà d'un écran. */
.shot img { max-height: 46vh; width: auto; max-width: 100%; }
.shot--flat img { max-height: 30vh; }
.screen--dark .shot {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  border: 1px solid var(--night-hair);
}
.shot--sm { max-width: 720px; }
.shot--first { margin-top: 34px; }

/* Vidéo de présentation : même gabarit que les captures, au format 16:9. */
.shot--video video {
  display: block;
  max-height: 46vh;
  max-width: 100%;
  width: auto;
  aspect-ratio: 16 / 9;
  background: var(--night);
}

/* ─── Grilles ─────────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: 22px;
  margin-top: 44px;
  text-align: left;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 18px;
  padding: 26px 24px;
}
.screen--tinted .card { background: var(--paper);}
.screen--dark .card {
  background: var(--night-2);
  border-color: var(--night-hair);
}

.card h3 { font-size: 19px; margin: 0 0 8px; }
.card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.screen--dark .card p { color: var(--night-soft); }

/* Bandeau de chiffres */
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px 22px;
  margin-top: 40px;
  width: 100%;
}
.figure__value {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.screen--dark .figure__value { color: var(--cyan); }
.figure__label {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.35;
}
.screen--dark .figure__label { color: var(--night-soft); }

/* Liste sobre à puces discrètes */
.checks { list-style: none; margin: 26px 0 0; padding: 0; text-align: left; }
.checks li {
  position: relative;
  padding: 0 0 0 26px;
  margin-bottom: 12px;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 2px; top: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--link);
}
.screen--dark .checks li { color: var(--night-soft); }
.screen--dark .checks li::before { background: var(--cyan); }

/* ─── Boutique : cartes tarifaires ───────────────────────────── */

.plans {
  display: grid;
  gap: 20px;
  margin-top: 48px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 360px));
  justify-content: center;
  text-align: left;
  width: 100%;
}

.plan {
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: 32px 28px 28px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
}
.plan--featured {
  border-color: rgba(10, 110, 209, 0.5);
  box-shadow: 0 18px 44px rgba(10, 110, 209, 0.12);
}
.plan__tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 14px;
}
.plan__name { font-size: 24px; font-weight: 600; margin: 0 0 6px; }
.plan__price {
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 18px 0 2px;
  line-height: 1;
}
.plan__price small { font-size: 15px; font-weight: 400; color: var(--ink-soft); letter-spacing: 0; }
.plan__note { font-size: 13px; color: var(--ink-faint); margin: 0 0 20px; }
.plan__list { list-style: none; padding: 0; margin: 0 0 26px; }
.plan__list li {
  font-size: 15px;
  color: var(--ink-soft);
  padding: 8px 0 8px 24px;
  position: relative;
  border-top: 1px solid var(--hair);
}
.plan__list li:first-child { border-top: 0; }
.plan__list li::before {
  content: "✓";
  position: absolute; left: 0; top: 8px;
  color: var(--link);
  font-size: 13px;
}
.plan__list li.is-off { color: var(--ink-faint); }
.plan__list li.is-off::before { content: "—"; color: var(--ink-faint); }
.plan .btn { margin-top: auto; text-align: center; }

/* ─── Télécharger : une carte par plateforme ─────────────────── */

.downloads {
  display: grid;
  gap: 20px;
  margin-top: 44px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  text-align: left;
  width: 100%;
}

.dl {
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: 28px 24px 24px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
}
/* Plateforme du visiteur, repérée par main.js. */
.dl.is-suggested {
  border-color: rgba(10, 110, 209, 0.5);
  box-shadow: 0 18px 44px rgba(10, 110, 209, 0.12);
}
.dl__name { font-size: 24px; margin: 0 0 8px; }
.dl__req { font-size: 14px; color: var(--ink-soft); line-height: 1.45; margin: 0 0 22px; }
.dl .btn { margin-top: auto; text-align: center; }
.dl__note { font-size: 13px; color: var(--ink-faint); line-height: 1.45; margin: 14px 0 0; }

/* Plateforme pas encore disponible : bouton inerte. */
.btn--soon,
.btn--soon:hover {
  background: var(--paper-2);
  color: var(--ink-faint);
  border-color: var(--hair);
  cursor: default;
  transform: none;
}

/* ─── Support : accordéon et lignes ──────────────────────────── */

.faq { margin-top: 40px; width: 100%; text-align: left; }

.faq details {
  border-top: 1px solid var(--hair);
  padding: 0;
}
.faq details:last-child { border-bottom: 1px solid var(--hair); }

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 40px 20px 0;
  font-size: 18px;
  font-weight: 500;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  font-weight: 300;
  color: var(--link);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 62ch;
}

.rows { margin-top: 40px; width: 100%; text-align: left; }
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--hair);
}
.row:last-child { border-bottom: 1px solid var(--hair); }
.row__label { flex: 0 0 210px; font-weight: 500; font-size: 16px; }
.row__value { flex: 1 1 260px; color: var(--ink-soft); font-size: 16px; }

/* ─── Compte : création, connexion, abonnement ───────────────── */

.account {
  width: 100%;
  max-width: 440px;
  margin: 40px auto 0;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 18px;
  padding: 30px 28px 26px;
}
.account h2 { font-size: 22px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.015em; }
.account__intro { margin: 0 0 22px; font-size: 15px; color: var(--ink-soft); line-height: 1.5; }
.account__intro strong { color: var(--ink); font-weight: 600; word-break: break-all; }

.field { display: block; margin-bottom: 16px; }
.field__label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.field__hint { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 6px; }
.field input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  padding: 11px 13px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus {
  outline: none;
  border-color: var(--link);
  box-shadow: 0 0 0 3px rgba(10, 110, 209, 0.18);
}
.field input.is-code { font-family: var(--mono); font-size: 22px; letter-spacing: 0.3em; text-align: center; }

.account .btn { width: 100%; text-align: center; border: 0; cursor: pointer; font: inherit; }
.account .btn + .btn { margin-top: 10px; }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn.is-busy::after { content: " …"; }

.account__msg {
  margin: 0 0 16px;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  background: rgba(255, 107, 53, 0.10);
  color: #a3360c;
}
.account__msg.is-ok { background: rgba(10, 110, 209, 0.08); color: var(--link); }

.account__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 18px;
  font-size: 14px;
}
.account__links a { color: var(--link); }
.account__note { font-size: 13px; color: var(--ink-faint); line-height: 1.45; margin: 12px 0 0; }
.account__plan { margin: 0 0 22px; font-size: 15px; font-weight: 500; }

/* Étapes numérotées sous le formulaire. */
.card__step {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--link);
  margin-bottom: 10px;
}

/* ─── Encart d'avertissement ─────────────────────────────────── */

.notice {
  margin-top: 40px;
  border-left: 3px solid var(--amber);
  background: rgba(230, 177, 74, 0.08);
  padding: 20px 24px;
  border-radius: 0 12px 12px 0;
  text-align: left;
  max-width: 720px;
  margin-inline: auto;
}
.notice h3 { font-size: 16px; margin: 0 0 6px; }
.notice p { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.5; }
.screen--dark .notice { background: rgba(230, 177, 74, 0.10); }
.screen--dark .notice p { color: var(--night-soft); }

/* ─── Pied de page ───────────────────────────────────────────── */

.foot {
  background: var(--paper-2);
  border-top: 1px solid var(--hair);
  padding: 44px 22px 52px;
  font-size: 12px;
  color: var(--ink-faint);
}
.foot__inner { max-width: 1024px; margin: 0 auto; }
.foot__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--hair);
}
.foot h4 { font-size: 12px; margin: 0 0 12px; color: var(--ink); font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 8px; }
.foot a { color: var(--ink-soft); }
.foot__legal { padding-top: 22px; line-height: 1.6; }
.foot__legal p { margin: 0 0 8px; max-width: 74ch; }

/* ─── Apparition au défilement ───────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.10s; }
.reveal[data-delay="2"] { transition-delay: 0.20s; }
.reveal[data-delay="3"] { transition-delay: 0.30s; }

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

/* ─── Adaptatif ──────────────────────────────────────────────── */

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav__inner { padding: 0 16px; gap: 18px; }
  .nav__links { gap: 18px; }
  .nav__link { font-size: 12px; }
  .nav__lang a, .nav__lang span { padding: 3px 4px; }
  .screen { padding: calc(var(--nav-h) + 40px) 18px 56px; min-height: auto; }
  .screen:first-child { min-height: 100svh; }
  .shot { margin-top: 32px; border-radius: 14px; width: 100%; }
  .shot img { max-height: none; width: 100%; }
  .row__label { flex-basis: 100%; }
}

/* Téléphone : cinq liens et la marque ne tiennent pas ensemble ; l'icône
   seule suffit à revenir à l'accueil, d'où le lien Présentation masqué. Le
   choix de langue ne garde que l'autre langue. */
@media (max-width: 480px) {
  .nav__inner { gap: 14px; }
  .nav__brand span { display: none; }
  .nav__links { gap: 14px; }
  .nav__link--home { display: none; }
  .account { padding: 24px 20px 22px; }
  .nav__lang span { display: none; }
}
