/* UNITÉS EXPRESS — site officiel. Palette alignée sur l'identité de
   l'application (lib/core/theme/app_colors.dart) et sur le design de
   référence validé. */
:root {
  --primary-dark: #064A32;
  --primary: #16A34A;
  --primary-strong: #15803D;
  --primary-light: #E7F6ED;
  --primary-lighter: #F2FAF5;
  --background: #F3F7F4;
  --surface: #FFFFFF;
  --text-primary: #0B3B24;
  --text-secondary: #5B6B63;
  --text-faint: #8FA098;
  --border: #E3EAE6;
  --success: #16A34A;
  --success-bg: #E7F8EC;
  --info: #2563EB;
  --info-bg: #E9F0FE;
  --orange: #F47216;
  --orange-bg: #FDECDD;
  --mtn-yellow: #FFCB05;
  --mtn-text: #1A1A1A;
  --moov-blue: #0057B8;
  --moov-bg: #E4EDFA;
  --radius: 16px;
  --max-width: 1160px;
  --shadow-card: 0 2px 10px rgba(6, 74, 50, 0.06);
  --shadow-float: 0 10px 24px rgba(6, 74, 50, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* Android gonfle automatiquement le texte dans les colonnes étroites
     (comportement invisible dans l'émulateur desktop) : on le désactive
     pour que le texte s'affiche exactement à la taille CSS calculée. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a { color: var(--primary-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.site-header {
  background: var(--primary-dark);
  position: sticky;
  top: 0;
  z-index: 30;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(12px, 3.2vw, 16px) clamp(14px, 4vw, 24px);
  max-width: var(--max-width);
  margin: 0 auto;
  gap: clamp(8px, 2.5vw, 16px);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: clamp(6px, 2vw, 10px);
  color: #fff;
  font-weight: 800;
  font-size: clamp(13px, 3.6vw, 16px);
  letter-spacing: .01em;
  min-width: 0;
}
.nav-brand img { width: clamp(28px, 8vw, 36px); height: clamp(28px, 8vw, 36px); border-radius: 8px; flex-shrink: 0; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: rgba(255,255,255,.82);
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: #fff; text-decoration: none; }
.nav-links a.active { border-bottom-color: var(--primary); }
.nav-extra { display: flex; align-items: center; gap: clamp(6px, 2vw, 10px); flex-shrink: 0; }
.theme-toggle {
  width: clamp(30px, 8vw, 36px); height: clamp(30px, 8vw, 36px); border-radius: 50%;
  background: rgba(255,255,255,.12); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: clamp(13px, 3.4vw, 16px); flex-shrink: 0;
}
.theme-toggle:hover { background: rgba(255,255,255,.2); }
.nav-toggle {
  display: none;
  width: clamp(30px, 8vw, 38px); height: clamp(30px, 8vw, 38px); border-radius: 10px;
  background: rgba(255,255,255,.12); border: none; color: #fff;
  align-items: center; justify-content: center; cursor: pointer; font-size: clamp(15px, 3.8vw, 18px); flex-shrink: 0;
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 6px 24px 16px;
    display: none;
  }
  .nav-links.open { display: flex; z-index: 35; }
  .nav-links a { width: 100%; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-links a.active { border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-toggle { display: flex; }
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--primary-dark) 0%, #0a5c3f 100%);
  color: #fff;
  padding: 48px clamp(16px, 4vw, 24px) 90px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(8px, 3vw, 40px);
  align-items: center;
  position: relative;
  z-index: 1;
}
/* Le bloc gauche est un conteneur de dimensionnement (container query) :
   ses tailles de police/espacements sont calculées à partir de SA propre
   largeur réelle (qui varie selon la place prise par le mockup), et non
   de la largeur du viewport — indispensable dès qu'un mockup à largeur
   fixe se trouve à côté sur la même ligne. */
.hero-content { container-type: inline-size; min-width: 0; }

.badge-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12);
  color: #fff;
  padding: clamp(4px, 1.6cqw, 7px) clamp(8px, 3.5cqw, 14px);
  border-radius: 30px;
  font-size: clamp(9px, 3.8cqw, 12px);
  font-weight: 800;
  letter-spacing: .04em;
  margin-bottom: clamp(10px, 3cqw, 18px);
  white-space: nowrap;
}
.hero h1 {
  font-size: clamp(28px, 7.5vw, 42px);
  margin: 0 0 4px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.hero-content h1 {
  font-size: clamp(22px, 10cqw, 42px);
}
.hero .subtitle {
  font-size: clamp(13px, 6cqw, 22px);
  font-weight: 700;
  margin: 0 0 12px;
  color: rgba(255,255,255,.95);
  line-height: 1.3;
}
.hero p.lead {
  font-size: clamp(12px, 4.8cqw, 15px);
  opacity: .85;
  max-width: 480px;
  margin: 0 0 clamp(14px, 4cqw, 26px);
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: clamp(16px, 4cqw, 28px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 14.5px;
  border: none;
  cursor: pointer;
  max-width: 100%;
  text-align: center;
}
.hero-actions .btn { width: 100%; }
@container (min-width: 340px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
  .hero-actions .btn { width: auto; }
}
/* Boutons du Hero un peu plus compacts sur mobile uniquement, pour
   libérer de la hauteur/largeur visuelle — desktop (>=768px) et les
   boutons des autres pages restent inchangés (.btn reste intact). */
@media (max-width: 767px) {
  .hero-actions .btn { padding: 11px 18px; font-size: 13px; gap: 7px; }
  /* Sur mobile, .hero-grid passe d'une disposition en 2 colonnes
     (texte | téléphone côte à côte) à un empilement vertical : le
     bloc texte (qui se termine par les 3 pastilles opérateurs) passe
     entièrement au-dessus, et le mockup téléphone se retrouve en
     dessous, avec un espace dédié — plus de chevauchement possible.
     Le desktop (>=768px) garde la disposition en 2 colonnes d'origine. */
  .hero-grid { grid-template-columns: 1fr; }
  .phone-wrap { margin-top: 32px; }
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); text-decoration: none; color: #fff; }
.btn-white { background: #fff; color: var(--primary-dark); }
.btn-white:hover { background: var(--primary-lighter); text-decoration: none; }
.btn-whatsapp { background: var(--success); color: #fff; }
.btn-whatsapp:hover { background: #128c3e; text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn-outline:hover { border-color: #fff; text-decoration: none; color: #fff; }
.btn-block { width: 100%; justify-content: center; }

.mini-features {
  display: flex;
  gap: clamp(10px, 4cqw, 22px);
  flex-wrap: wrap;
  margin-bottom: clamp(14px, 4cqw, 26px);
}
.mini-feature { display: flex; align-items: center; gap: clamp(6px, 2cqw, 10px); }
.mini-feature .ico {
  width: clamp(26px, 10cqw, 38px); height: clamp(26px, 10cqw, 38px); border-radius: 12px;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(12px, 4.5cqw, 17px);
  flex-shrink: 0;
}
.mini-feature .txt { display: flex; flex-direction: column; }
.mini-feature .txt b { font-size: clamp(10.5px, 4.4cqw, 13px); }
.mini-feature .txt span { font-size: clamp(9px, 3.8cqw, 11.5px); opacity: .75; }

.operator-row { display: flex; gap: clamp(4px, 3cqw, 12px); flex-wrap: nowrap; }
.operator-pill {
  display: flex; align-items: center; justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  padding: clamp(7px, 3cqw, 10px) clamp(2px, 2cqw, 20px);
  border-radius: 12px;
  font-weight: 800;
  font-size: clamp(10px, 5cqw, 14px);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.operator-pill.orange { background: var(--orange); color: #fff; }
.operator-pill.mtn { background: var(--mtn-yellow); color: var(--mtn-text); }
.operator-pill.moov { background: var(--moov-blue); color: #fff; }

/* Phone mockup — TOUJOURS visible, à droite, sur toutes les largeurs.
   Réduit en bloc entier (cadre + écran + contenu) via zoom pour ne
   jamais casser sa mise en page interne, jamais masqué, jamais empilé. */
.phone-wrap { position: relative; display: flex; justify-content: center; }
.phone-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  top: 20px;
}
.phone {
  position: relative;
  width: 290px;
  background: var(--primary-dark);
  border-radius: 36px;
  padding: 10px;
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
  zoom: 1;
}
@media (max-width: 340px) { .phone, .phone-glow { zoom: 0.40; } }
@media (min-width: 341px) and (max-width: 367px) { .phone, .phone-glow { zoom: 0.47; } }
@media (min-width: 368px) and (max-width: 382px) { .phone, .phone-glow { zoom: 0.54; } }
@media (min-width: 383px) and (max-width: 402px) { .phone, .phone-glow { zoom: 0.65; } }
@media (min-width: 403px) and (max-width: 420px) { .phone, .phone-glow { zoom: 0.71; } }
@media (min-width: 421px) and (max-width: 449px) { .phone, .phone-glow { zoom: 0.78; } }
@media (min-width: 450px) and (max-width: 559px) { .phone, .phone-glow { zoom: 0.89; } }
@media (min-width: 560px) and (max-width: 649px) { .phone, .phone-glow { zoom: 1.03; } }
@media (min-width: 650px) and (max-width: 767px) { .phone, .phone-glow { zoom: 1.13; } }
.phone-screen {
  background: var(--background);
  color: var(--text-primary);
  border-radius: 28px;
  overflow: hidden;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.phone-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}
.phone-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 6px 16px 14px;
  gap: 8px;
}
.phone-header .greet span { display: block; font-size: 10px; color: var(--text-secondary); font-weight: 600; }
.phone-header .greet b { font-size: 14px; }
.phone-header .actions { display: flex; align-items: center; gap: 8px; }
.phone-points {
  display: flex; align-items: center; gap: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #fff; font-size: 9px; font-weight: 800;
  padding: 5px 9px; border-radius: 14px;
}
.phone-bell {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.phone-body { padding: 0 14px 10px; }
.phone-card {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-strong) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
}
.phone-card .top { display: flex; align-items: center; gap: 8px; }
.phone-card .badge {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--moov-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 800;
}
.phone-card .info { flex: 1; min-width: 0; }
.phone-card .info span { display: block; font-size: 8.5px; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-card .info b { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.phone-card .status {
  background: rgba(255,255,255,.16); font-size: 8px; font-weight: 800;
  padding: 3px 7px; border-radius: 10px;
}
.phone-card .cta { margin-top: 8px; font-size: 9.5px; font-weight: 700; opacity: .95; }
.phone-section-title { font-size: 11px; font-weight: 800; margin: 10px 0 8px; }
.phone-ops { display: flex; gap: 7px; margin-bottom: 12px; }
.phone-op {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 9px 4px; text-align: center;
}
.phone-op .logo {
  width: 26px; height: 26px; border-radius: 7px; margin: 0 auto 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 6.5px; font-weight: 800; color: #fff;
}
.phone-op .logo.orange { background: var(--orange); }
.phone-op .logo.mtn { background: var(--mtn-yellow); color: var(--mtn-text); }
.phone-op .logo.moov { background: var(--moov-blue); }
.phone-op span { font-size: 8px; font-weight: 700; }
.phone-promo {
  background: var(--primary); color: #fff;
  border-radius: 12px; padding: 10px; margin-bottom: 12px;
  font-size: 9px; line-height: 1.4;
}
.phone-promo b { display: block; font-size: 9.5px; margin-bottom: 2px; }
.phone-row-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.phone-row-title span:last-child { font-size: 9px; color: var(--primary-strong); font-weight: 700; }
.phone-op-tile {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px 10px; margin-bottom: 7px;
}
.phone-op-tile .logo {
  width: 24px; height: 24px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 6px; font-weight: 800; color: #fff; background: var(--moov-blue);
}
.phone-op-tile .mid { flex: 1; min-width: 0; }
.phone-op-tile .mid b { display: block; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-op-tile .mid span { font-size: 7.5px; color: var(--text-secondary); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-op-tile .end { text-align: right; flex-shrink: 0; }
.phone-op-tile .end b { display: block; font-size: 9px; color: var(--success); }
.phone-op-tile .end span {
  font-size: 6.5px; font-weight: 800; color: var(--success);
  background: var(--success-bg); padding: 2px 6px; border-radius: 8px;
}
.phone-nav {
  display: flex; justify-content: space-around;
  border-top: 1px solid var(--border);
  padding: 10px 0 12px;
  background: var(--surface);
}
.phone-nav .item { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 7.5px; font-weight: 700; color: var(--text-faint); }
.phone-nav .item.active { color: var(--primary-strong); }
.phone-nav .item .dot { font-size: 13px; }

/* Floating download button */
.float-download {
  position: fixed;
  right: max(20px, calc(env(safe-area-inset-right, 0px) + 12px));
  bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 13.5px;
  padding: 14px 20px;
  border-radius: 40px;
  box-shadow: var(--shadow-float);
  max-width: calc(100vw - 32px);
  white-space: nowrap;
  overflow: hidden;
}
.float-download:hover { background: var(--primary-strong); text-decoration: none; color: #fff; }
.float-download svg, .float-download .ico { font-size: 16px; flex-shrink: 0; }
.float-download .label-full,
.float-download .label-short { overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 720px) {
  .float-download {
    padding: 11px 16px;
    font-size: 12px;
    right: max(14px, calc(env(safe-area-inset-right, 0px) + 8px));
    bottom: max(14px, calc(env(safe-area-inset-bottom, 0px) + 8px));
  }
  .float-download .label-full { display: none; }
}
@media (min-width: 721px) {
  .float-download .label-short { display: none; }
}

/* Sections */
section { padding: 60px 24px; }
.section-title { font-size: 26px; font-weight: 800; margin: 0 0 8px; text-align: center; }
.section-subtitle { font-size: 14.5px; color: var(--text-secondary); text-align: center; max-width: 580px; margin: 0 auto 38px; line-height: 1.6; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card .icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--primary-light); color: var(--primary-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; margin-bottom: 14px;
}
.card h3 { font-size: 15px; margin: 0 0 8px; }
.card p { font-size: 13px; color: var(--text-secondary); line-height: 1.55; margin: 0; }

.steps { display: flex; flex-direction: column; gap: 0; max-width: 640px; margin: 0 auto; }
.step { display: flex; gap: 16px; padding: 18px 0; }
.step:not(:last-child) { border-bottom: 1px solid var(--border); }
.step .num {
  flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.step h4 { margin: 4px 0 4px; font-size: 14.5px; }
.step p { margin: 0; font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}
.info-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-secondary); }
.info-row .value { font-weight: 700; }

.callout {
  background: var(--info-bg);
  color: var(--info);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  margin-top: 18px;
}

.legal-doc {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  white-space: pre-wrap;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  box-shadow: var(--shadow-card);
}
.legal-doc h1 { font-size: 20px; color: var(--text-primary); margin-top: 0; white-space: normal; }

.placeholder {
  background: #FEF3E0;
  color: #92600A;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 700;
  white-space: normal;
  display: inline;
}

footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.75);
  padding: 44px 24px 90px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.8;
}
footer a { color: #fff; }
footer .footer-links { margin: 10px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }

@media (max-width: 480px) {
  .panel { padding: 20px; }
  .legal-doc { padding: 20px 18px; }
}
