/* Motag — site de présentation. Mêmes couleurs que l'app : « Plein soleil » en clair,
   « Nuit de route » en sombre. Aucune dépendance externe : police servie avec le site. */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('fonts/space-grotesk-latin-wght-normal.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --ground: #f7f3ea;
  --ground-deep: #efe8da;
  --surface: #ffffff;
  --sunken: #ede6d8;
  --line: #e7e0d2;
  --line-strong: #d6cfc2;
  --ink: #1c1917;
  --ink-soft: #44403c;
  --muted: #57534e;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --primary-tint: #e3f5f0;
  --on-primary: #ffffff;
  --raised: #1c1917;
  --on-raised: #ffffff;
  --on-raised-muted: #d6d3d1;
  --amber: #f59e0b;
  --amber-tint: #fef3c7;
  --amber-ink: #78350f;
  --glow: rgb(15 118 110 / 0.22);
  --phone-bezel: #1c1917;
  --shadow: 0 30px 60px -30px rgb(28 25 23 / 0.45), 0 12px 24px -12px rgb(28 25 23 / 0.2);
  --radius: 28px;
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #071214;
    --ground-deep: #0a1a1c;
    --surface: #0e1e21;
    --sunken: #1a3134;
    --line: #1f3638;
    --line-strong: #2f4a4c;
    --ink: #e8f3f0;
    --ink-soft: #c9d8d5;
    --muted: #9db5b0;
    --primary: #45e3b5;
    --primary-strong: #7ff0cf;
    --primary-tint: #11302e;
    --on-primary: #0e1e21;
    --raised: #10302c;
    --on-raised: #f2fffb;
    --on-raised-muted: #9db5b0;
    --amber: #ffc857;
    --amber-tint: #2a220c;
    --amber-ink: #ffc857;
    --glow: rgb(69 227 181 / 0.2);
    --phone-bezel: #020809;
    --shadow: 0 30px 60px -30px rgb(0 0 0 / 0.8), 0 12px 24px -12px rgb(0 0 0 / 0.5);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-underline-offset: 0.2em;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--raised);
  color: var(--on-raised);
  font-weight: 700;
}
.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(1180px, 100% - 2rem);
  margin-inline: auto;
}

/* ── En-tête ──────────────────────────────────────────────────────────────── */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.top-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.nav {
  display: none;
  gap: 1.75rem;
  margin-left: auto;
}
.nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.nav a:hover {
  color: var(--ink);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--sunken);
  font-size: 0.8rem;
  font-weight: 700;
}
.lang a,
.lang span {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
}
.lang [aria-current] {
  background: var(--raised);
  color: var(--on-raised);
}
@media (min-width: 900px) {
  .nav {
    display: flex;
  }
  .top-actions {
    margin-left: 1.5rem;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 10px 30px -10px var(--glow);
}
.btn-primary:hover {
  background: var(--primary-strong);
}
.btn-ghost {
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.btn-ghost:hover {
  background: var(--sunken);
}
.btn-small {
  min-height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.9rem;
}

/* ── Accroche ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto 30%;
  height: 120%;
  background:
    radial-gradient(closest-side, var(--glow), transparent 70%),
    radial-gradient(closest-side at 70% 60%, rgb(245 158 11 / 0.12), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 700;
}
.eyebrow b {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--amber-tint);
  color: var(--amber-ink);
}
.hero h1 {
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  font-weight: 700;
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
}
.lead {
  max-width: 34rem;
  margin-top: 1.5rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.chips svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 520px;
}
.hero-visual .phone:first-child {
  z-index: 2;
}
.hero-visual .phone:last-child {
  position: absolute;
  top: 3.5rem;
  left: calc(50% + 3rem);
  z-index: 1;
  display: none;
  transform: rotate(5deg);
}
@media (min-width: 560px) {
  .hero-visual .phone:first-child {
    transform: translateX(-4.5rem) rotate(-3deg);
  }
  .hero-visual .phone:last-child {
    display: block;
    left: calc(50% - 1rem);
  }
}
@media (min-width: 1000px) {
  .hero-grid {
    grid-template-columns: 1.05fr 1fr;
  }
}

/* ── Téléphone ────────────────────────────────────────────────────────────── */

.phone {
  width: min(280px, 72vw);
  padding: 10px;
  border-radius: 46px;
  background: var(--phone-bezel);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1.5px rgb(255 255 255 / 0.08);
}
.phone img {
  width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  object-position: top;
  border-radius: 36px;
  background: var(--sunken);
}
.phone-sm {
  width: min(230px, 62vw);
  border-radius: 40px;
}
.phone-sm img {
  border-radius: 31px;
}

/* ── Sections ─────────────────────────────────────────────────────────────── */

section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}
.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.kicker {
  display: block;
  margin-bottom: 0.85rem;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-head h2 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
}
.section-head p {
  margin-top: 1rem;
  font-size: 1.15rem;
}
.band {
  background: var(--ground-deep);
  border-block: 1px solid var(--line);
}

/* Grille « bento » des fonctions du propriétaire */
.bento {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(1, 1fr);
}
.tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.6rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tile h3 {
  font-size: 1.35rem;
}
.tile p {
  font-size: 1rem;
}
.tile .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 0.4rem;
  border-radius: 14px;
  background: var(--primary-tint);
  color: var(--primary);
}
.tile .icon svg {
  width: 24px;
  height: 24px;
}
.tile-dark {
  background: var(--raised);
  box-shadow: none;
  color: var(--on-raised-muted);
}
.tile-dark h3 {
  color: var(--on-raised);
}
.tile-dark .icon {
  background: rgb(255 255 255 / 0.08);
  color: var(--amber);
}
.tile-shot {
  margin: 1.25rem -0.4rem -12rem;
  align-self: center;
}
.big-number {
  margin-top: auto;
  color: var(--on-raised);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.big-number small {
  font-size: 0.4em;
  color: var(--on-raised-muted);
}
.bar {
  height: 10px;
  margin-top: 0.75rem;
  border-radius: 99px;
  background: rgb(255 255 255 / 0.15);
}
.bar span {
  display: block;
  width: 87%;
  height: 100%;
  border-radius: inherit;
  background: var(--amber);
}
@media (min-width: 720px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1040px) {
  .bento {
    grid-template-columns: repeat(4, 1fr);
  }
  .tile {
    min-height: 220px;
  }
  .tile-wide {
    min-height: 0;
  }
  .span-2 {
    grid-column: span 2;
  }
  .row-2 {
    grid-row: span 2;
  }
}

/* Côte à côte : texte et capture */
.split {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.split-visual {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.split-visual .phone:nth-child(2) {
  margin-top: 3rem;
}
.checks {
  display: grid;
  gap: 1.1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.checks li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.85rem;
}
.checks svg {
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 9px;
  background: var(--primary-tint);
  color: var(--primary);
}
.checks b {
  display: block;
  color: var(--ink);
}
@media (min-width: 960px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split.reverse .split-text {
    order: 2;
  }
}

/* Étapes */
.steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 1rem;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
}
.steps h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}
@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Installation */
.install {
  display: grid;
  gap: 1rem;
}
.install article {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.install h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}
.install ol {
  margin: 0;
  padding-left: 1.25rem;
}
.install li + li {
  margin-top: 0.4rem;
}
@media (min-width: 860px) {
  .install {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Sécurité */
.trust {
  display: grid;
  gap: 1rem;
}
.trust div {
  padding: 1.5rem;
  border-left: 3px solid var(--primary);
}
.trust b {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
}
@media (min-width: 760px) {
  .trust {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .trust {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Questions */
.faq {
  max-width: 50rem;
}
.faq details {
  border-bottom: 1px solid var(--line-strong);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sunken);
  color: var(--ink);
  font-size: 1.3rem;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  padding-bottom: 1.4rem;
}

/* Appel final */
.final {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  border-radius: calc(var(--radius) + 8px);
  background: var(--raised);
  color: var(--on-raised-muted);
  text-align: center;
}
.final::before {
  content: '';
  position: absolute;
  inset: -40% 20% auto;
  height: 100%;
  background: radial-gradient(closest-side, rgb(69 227 181 / 0.25), transparent);
}
.final > * {
  position: relative;
}
.final h2 {
  color: var(--on-raised);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
}
.final p {
  max-width: 36rem;
  margin: 1rem auto 0;
}
.final .cta-row {
  justify-content: center;
}
.final .btn-ghost {
  color: var(--on-raised);
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.3);
}
.final .btn-ghost:hover {
  background: rgb(255 255 255 / 0.08);
}

/* Pied de page */
.foot {
  padding: 3rem 0 2.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.foot a {
  color: var(--ink-soft);
  text-decoration: none;
}
.foot a:hover {
  text-decoration: underline;
}

/* Page de texte (confidentialité) */
.doc {
  max-width: 46rem;
  padding: clamp(2.5rem, 6vw, 4rem) 0 4rem;
}
.doc h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}
.doc h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
}
.doc p,
.doc ul {
  margin-top: 1rem;
}
.doc li + li {
  margin-top: 0.35rem;
}
.doc .note {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: var(--amber-tint);
  color: var(--amber-ink);
  font-weight: 600;
}

/* Apparition au défilement, seulement si le navigateur sait le faire et si l'on n'a pas
   demandé à limiter les animations. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}

/* Utilitaires (aucun style en ligne : la politique de sécurité du site les interdit) */
.title-lg {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
}
.title-md,
.section-head h2.title-md {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.spaced {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.more {
  margin-top: 2rem;
}
.flush-top {
  padding-top: 0;
}

/* Grille des fonctions : chiffre clé lisible, tuile pleine largeur */
.tile .big-number {
  font-size: clamp(2.6rem, 5vw, 3.6rem);
}
@media (min-width: 1040px) {
  .span-4 {
    grid-column: 1 / -1;
  }
  .tile-wide {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 1.25rem;
    align-items: center;
  }
  .tile-wide .icon {
    grid-row: span 2;
    margin: 0;
  }
}
@media (min-width: 1040px) {
  .tile-wide {
    align-content: center;
    row-gap: 0.35rem;
  }
}

/* Deux captures côte à côte : chacune prend au plus la moitié de la largeur. */
.split-visual .phone {
  width: min(230px, calc(50% - 0.5rem));
  padding: 6px;
  border-radius: 30px;
}
.split-visual .phone img {
  border-radius: 25px;
}
@media (min-width: 560px) {
  .split-visual .phone {
    padding: 10px;
    border-radius: 40px;
  }
  .split-visual .phone img {
    border-radius: 31px;
  }
}
.split-visual {
  align-items: flex-start;
}

/* En-tête : « Essayer » à côté de « Se connecter » seulement quand la place le permet. */
.wide-only {
  display: none;
}
@media (min-width: 520px) {
  .wide-only {
    display: inline-flex;
  }
}
