﻿/* ================== FSN FUTUR — App Mobile (Usager) ==================
   Design system adapté du projet SunuONAS, recoloré aux teintes
   du Fonds de Solidarité Nationale (vert solidarité + or Sénégal).
   ===================================================================== */
:root {
  /* --- Couleur primaire = Vert FSN --- */
  --navy: #0a6c3e;
  --navy-2: #0e8a4d;
  --navy-deep: #063a22;
  /* --- Couleur secondaire = Or Sénégal --- */
  --orange: #f3c64a;
  --orange-2: #f6d472;
  --orange-soft: #fef3d6;
  /* --- Fonds dérivés = Vert pâle FSN --- */
  --blue-bg: #e5f4ec;
  --blue-pale: #f0faf4;
  /* --- Sémantiques --- */
  --green: #2EB872;
  --green-soft: #E0F4EA;
  --red: #ce1126;
  --red-soft: #FDE5E7;
  --amber: #F4B740;
  --amber-soft: #FEF3D7;
  /* --- Aliases FSN explicites --- */
  --fsn-vert: #0a6c3e;
  --fsn-vert-clair: #0e8a4d;
  --fsn-vert-fonce: #063a22;
  --fsn-or: #f3c64a;
  --fsn-or-fonce: #c89e2c;
  --fsn-rouge: #ce1126;
  /* --- Neutres --- */
  --ink: #14202E;
  --ink-2: #4A5868;
  --ink-3: #8794A4;
  --line: #E2E8F0;
  --line-2: #CBD5E1;
  --bg: #F7F9FC;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(6, 58, 34, 0.08);
  --shadow-md: 0 4px 12px rgba(6, 58, 34, 0.10);
  --shadow-lg: 0 8px 28px rgba(6, 58, 34, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at 30% 0%, #0a6c3e 0%, #053a23 50%, #021a10 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Stage ===== */
.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  gap: 30px;
  position: relative;
}

.stage-info {
  position: fixed;
  top: 24px;
  left: 24px;
  color: white;
  z-index: 5;
}
.stage-info .ti { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; }
.stage-info .ti span { color: var(--orange); }
.stage-info .su { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 2px; }

.stage-controls {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  gap: 8px;
  z-index: 5;
  flex-wrap: wrap;
  max-width: 360px;
}
.stage-btn {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  color: white;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.stage-btn:hover { background: rgba(255,255,255,0.15); }
.stage-btn.active { background: var(--orange); border-color: var(--orange); }

.persona-tag {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  gap: 6px;
  z-index: 5;
}

/* ===== Phone ===== */
.phone {
  width: 380px;
  height: 800px;
  background: #0a0a0a;
  border-radius: 48px;
  padding: 9px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 0 0 2px #1f1f1f;
  position: relative;
  flex: 0 0 auto;
}

/* [v142] FULLSCREEN — actif sur APK Capacitor OU petits écrans (vrais mobiles).
   Retire le cadre "coque iPhone" et fait remplir tout l'écran. */
body.is-capacitor .phone,
body.is-fullscreen .phone {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}
body.is-capacitor .phone-screen,
body.is-fullscreen .phone-screen {
  border-radius: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
body.is-capacitor .app-stage,
body.is-fullscreen .app-stage {
  padding: 0 !important;
  background: #063a22;
  min-height: 100vh;
}
@media (max-width: 480px) {
  body .phone {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
  }
  body .phone-screen {
    border-radius: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }
  body .app-stage {
    padding: 0 !important;
    background: #063a22;
  }
}
/* Notch / dynamic-island désactivée — encombrait visuellement les écrans
   et masquait le haut de la status bar. À garder décommentée si on veut
   restaurer le rendu iPhone. */
/*
.phone::after {
  content: "";
  position: absolute;
  top: 24px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 30px;
  background: #000;
  border-radius: 0 0 18px 18px;
  z-index: 100;
  pointer-events: none;
}
*/
.phone-screen {
  width: 100%; height: 100%;
  background: var(--white);
  border-radius: 40px;
  overflow: hidden;
  position: relative;
}

.status-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 28px 6px;
  font-size: 13px;
  font-weight: 700;
  color: white;
  z-index: 50;
  pointer-events: none;
  /* [v125] Status bar TOUJOURS bleu marine ONAS pour matcher l'app */
  background: linear-gradient(180deg, #0a6c3e 0%, #0a6c3e 88%, transparent 100%);
}
.status-bar.dark { color: white; }
.status-bar .ic-stat { display: inline-flex; gap: 4px; align-items: center; }

/* ===== Page container ===== */
.page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: white;
  overflow: hidden;
}
.page.with-tabs { padding-bottom: 78px; }
.page-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: 44px;
}
.page-scroll::-webkit-scrollbar { width: 0; }

.page-enter { animation: slideIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.page-enter.back { animation: slideInBack 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.page-enter.modal { animation: slideUp 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideInBack {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== App bar ===== */
.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 14px;
  background: white;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.appbar.navy { background: var(--navy); color: white; border: none; }
.appbar.navy ~ .page-scroll { padding-top: 0; }
.appbar .back, .appbar .ico-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.04);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  cursor: pointer;
  border: none;
  flex: 0 0 auto;
}
.appbar.navy .back, .appbar.navy .ico-btn {
  background: rgba(255,255,255,0.15); color: white;
}
.appbar h1 {
  font-size: 16px;
  font-weight: 700;
  flex: 1;
  text-align: center;
  margin: 0 8px;
}
.appbar .right-w { display: flex; gap: 8px; }
.appbar.with-status { padding-top: 50px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--navy); color: white; }
.btn-primary:hover { background: var(--navy-2); }
.btn-accent { background: var(--orange); color: white; }
.btn-accent:hover { background: var(--orange-2); }
.btn-success { background: var(--green); color: white; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-2); }
.btn-soft { background: var(--blue-bg); color: var(--navy); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 20px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Cards ===== */
.card {
  background: white;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  padding: 14px;
}
.card-flat { box-shadow: none; }
.card-pad { padding: 16px; }

/* ===== Pills / badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--blue-bg);
  color: var(--navy);
  white-space: nowrap;
}
.badge.orange { background: var(--orange-soft); color: var(--orange); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.amber { background: var(--amber-soft); color: #B7820B; }
.badge.dark { background: var(--navy); color: white; }

/* ===== Inputs ===== */
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink);
  transition: border 0.15s;
}
.field:focus-within { border-color: var(--navy); }
.field .icn { color: var(--ink-3); flex: 0 0 auto; }
.field input, .field select, .field textarea {
  border: none; outline: none; flex: 1; background: transparent;
  font-family: inherit; font-size: 14px; color: var(--ink);
  resize: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
  display: block;
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  background: white;
  white-space: nowrap;
  transition: all 0.15s;
}
.chip.selected { background: var(--navy); color: white; border-color: var(--navy); }

/* Compact chip variant — used in History filters to fit a row inside the phone */
.chip-sm {
  padding: 6px 10px;
  font-size: 11px;
  border-width: 1.2px;
}

/* History filter row — scrollable horizontally, no overflow */
.history-filters {
  display: flex;
  gap: 6px;
  padding: 0 14px 12px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;        /* Firefox */
}
.history-filters::-webkit-scrollbar { display: none; }  /* Chrome/Safari */
.history-filters .chip { flex: 0 0 auto; text-align: center; white-space: nowrap; font-size: 11px; padding: 6px 10px; }

/* Detail row — used in RequestDetailScreen */
.detail-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
}
.detail-row:first-child { border-top: none; padding-top: 0; }
.detail-row > svg { margin-top: 3px; flex: 0 0 auto; }

/* ===== Bottom nav ===== */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 78px;
  background: white;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  padding: 8px 12px 22px;
  z-index: 40;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.04);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--ink-3);
  cursor: pointer;
  flex: 1;
  font-weight: 600;
  background: transparent;
  border: none;
  font-family: inherit;
}
.nav-item.active { color: var(--navy); }
.nav-item.active .ic-wrap { background: var(--blue-bg); }
.ic-wrap {
  width: 32px; height: 32px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.nav-item.fab .ic-wrap {
  width: 48px; height: 48px;
  background: var(--orange);
  color: white;
  border-radius: 16px;
  margin-top: -10px;
  box-shadow: 0 6px 14px rgba(243, 198, 74, 0.4);
}
.nav-item.fab.active .ic-wrap { background: var(--orange); }

/* ===== Avatar ===== */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex: 0 0 auto;
}
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.navy { background: linear-gradient(135deg, var(--navy), var(--navy-2)); }
.avatar.green { background: linear-gradient(135deg, var(--green), #4cc488); }

/* ===== Stepper (with glow + labels) ===== */
.stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 22px 22px 18px;
  background: white;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.stepper .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}
.stepper .step .label {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.stepper .step.active .label { color: #2C72B7; }
.stepper .step.done   .label { color: var(--ink-2); }

.stepper .st {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #E5EDF5;
  color: var(--ink-3);
  font-size: 13px; font-weight: 800;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}
.stepper .st.done {
  background: linear-gradient(135deg, #2C72B7 0%, #1F5A93 100%);
  color: white;
  box-shadow: 0 4px 10px -2px rgba(14, 138, 77, 0.4);
}
.stepper .st.active {
  background: linear-gradient(135deg, #4A95E0 0%, #2C72B7 100%);
  color: white;
  box-shadow:
    0 0 0 4px rgba(14, 138, 77, 0.18),
    0 0 0 10px rgba(14, 138, 77, 0.08),
    0 0 22px 2px rgba(14, 138, 77, 0.55);
  animation: stepGlow 1.8s ease-in-out infinite;
}
@keyframes stepGlow {
  0%, 100% {
    box-shadow:
      0 0 0 4px rgba(14, 138, 77, 0.18),
      0 0 0 10px rgba(14, 138, 77, 0.08),
      0 0 18px 2px rgba(14, 138, 77, 0.5);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(14, 138, 77, 0.22),
      0 0 0 12px rgba(14, 138, 77, 0.1),
      0 0 28px 4px rgba(14, 138, 77, 0.7);
  }
}

/* Connecting line between steps */
.stepper .bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: #E5EDF5;
  margin: 14px 6px 0;
  position: relative;
  align-self: flex-start;
  overflow: hidden;
}
.stepper .bar.done {
  background: linear-gradient(90deg, #2C72B7, #4A95E0);
  box-shadow: 0 0 8px rgba(14, 138, 77, 0.4);
}

/* ===== Service tile ===== */
.svc-tile {
  background: white;
  border-radius: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-family: inherit;
}
.svc-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.svc-tile:active { transform: scale(0.98); }
.svc-tile .svc-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.svc-tile h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-deep);
  line-height: 1.25;
}
.svc-tile p {
  font-size: 11px;
  color: var(--ink-2);
  line-height: 1.4;
}

/* ===== Hero card ===== */
.hero-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: white;
  border-radius: 18px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 198, 74, 0.4) 0%, transparent 70%);
}

/* ===== Map ===== */
.map-h {
  position: relative;
  background:
    radial-gradient(circle at 30% 30%, #C9DDF0 0 60px, transparent 61px),
    radial-gradient(circle at 70% 60%, #D1E5C9 0 80px, transparent 81px),
    radial-gradient(circle at 50% 80%, #E8DCC4 0 50px, transparent 51px),
    linear-gradient(135deg, #E8EFF7 0%, #DBE7F0 100%);
  overflow: hidden;
}
.map-h::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,0.5) 50%, transparent 50.5%) 0 0 / 40% 100%,
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,0.4) 50%, transparent 50.5%) 0 0 / 70% 100%,
    linear-gradient(0deg, transparent 49.5%, rgba(255,255,255,0.5) 50%, transparent 50.5%) 0 0 / 100% 35%;
  pointer-events: none;
}
.map-pin, .map-truck {
  position: absolute;
  z-index: 3;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}
.map-pin { transform: translate(-50%, -100%); }
.map-truck { transform: translate(-50%, -50%); animation: bobble 1.4s infinite ease-in-out; }
@keyframes bobble {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, -55%); }
}

/* ===== QR ===== */
.qr-block {
  background: white;
  border: 2px solid var(--navy);
  border-radius: 12px;
  padding: 8px;
  position: relative;
  width: 180px; height: 180px;
}
.qr-block::before, .qr-block::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 2.5px solid var(--orange);
}
.qr-block::before { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.qr-block::after { bottom: -2px; right: -2px; border-left: none; border-top: none; }
.qr-svg { width: 100%; height: 100%; }

/* ===== Toggle ===== */
.toggle {
  width: 44px; height: 26px;
  border-radius: 999px;
  background: var(--line-2);
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.2s;
  border: none;
}
.toggle.on { background: var(--green); }
.toggle::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left 0.2s;
}
.toggle.on::after { left: 21px; }

/* ===== Timeline ===== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 22px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 9px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--line);
}
.tl-item { position: relative; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -20px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--line-2);
  z-index: 1;
}
.tl-item.done::before { background: var(--green); border-color: var(--green); }
.tl-item.active::before {
  background: var(--orange); border-color: var(--orange);
  box-shadow: 0 0 0 5px rgba(243, 198, 74, 0.2);
  animation: pulseRing 1.6s infinite;
}
@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 0 5px rgba(243, 198, 74, 0.2); }
  50% { box-shadow: 0 0 0 9px rgba(243, 198, 74, 0); }
}

/* ===== Toast ===== */
.toast {
  position: absolute;
  bottom: 96px;
  left: 16px; right: 16px;
  background: var(--navy-deep);
  color: white;
  padding: 14px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: toastIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast .ic-toast {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.toast .ic-toast.warn { background: var(--amber); }
.toast .msg { font-size: 13px; flex: 1; }
@keyframes toastIn {
  from { transform: translateY(80px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== Modal sheet ===== */
.sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 90;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }
.sheet {
  background: white;
  width: 100%;
  border-radius: 24px 24px 0 0;
  padding: 12px 18px 28px;
  animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet .grabber {
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--line-2);
  margin: 0 auto 14px;
}

/* ===== Splash ===== */
.splash {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.splash .logo-mk {
  width: 96px; height: 96px;
  border-radius: 28px;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(243, 198, 74, 0.4);
  animation: logoFloat 2s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* === Splash with pipe-mesh background — same look as the launcher === */
.splash.splash-mesh {
  background: linear-gradient(160deg, #F4F6F9 0%, #E9EFF7 60%, #DCE6F1 100%);
  color: var(--navy-deep);
  overflow: hidden;
  gap: 18px;
}
.splash-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.7;
  pointer-events: none;
}
.splash-center {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.splash-logo-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 20px 50px -12px rgba(6, 58, 34, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.7);
  animation: splashLogoIn 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.splash-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px dashed rgba(14, 138, 77, 0.45);
  animation: splashRing 8s linear infinite;
}
.splash-logo-wrap::after {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 1px dashed rgba(243, 198, 74, 0.35);
  animation: splashRing 14s linear infinite reverse;
}
@keyframes splashLogoIn {
  0%   { opacity: 0; transform: scale(0.6); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes splashRing {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.splash-title {
  margin-top: 64px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.6px;
  background: linear-gradient(90deg, #0a6c3e 0%, #2C72B7 45%, #f3c64a 65%, #e8bb2e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: splashFade 0.9s 0.2s ease-out both;
}
.splash-sub {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.2px;
  max-width: 260px;
  animation: splashFade 0.9s 0.4s ease-out both;
}
.splash-dots {
  position: relative;
  z-index: 2;
  margin-top: 4px;
}
@keyframes splashFade {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.dots-load {
  display: inline-flex; gap: 6px;
}
.dots-load .d {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange);
  animation: dotPulse 1.2s infinite;
}
.dots-load .d:nth-child(2) { animation-delay: 0.2s; }
.dots-load .d:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ===== Generic helpers ===== */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-3); }
.bold { font-weight: 700; }
.ink-deep { color: var(--navy-deep); }
.ink-orange { color: var(--orange); }
.ink-green { color: var(--green); }
.text-center { text-align: center; }
.gap-2 { gap: 6px; }
.gap-3 { gap: 10px; }
.gap-4 { gap: 14px; }
.gap-5 { gap: 18px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.mt-2 { margin-top: 6px; }
.mt-3 { margin-top: 10px; }
.mt-4 { margin-top: 14px; }
.mt-5 { margin-top: 20px; }

.f10 { font-size: 10px; }
.f11 { font-size: 11px; }
.f12 { font-size: 12px; }
.f13 { font-size: 13px; }
.f14 { font-size: 14px; }
.f15 { font-size: 15px; }
.f16 { font-size: 16px; }
.f18 { font-size: 18px; }
.f20 { font-size: 20px; }
.f24 { font-size: 24px; }
.f28 { font-size: 28px; }

.divider { height: 1px; background: var(--line); margin: 8px 0; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: white;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: inherit;
  width: 100%;
}
.list-item:hover { background: var(--blue-pale); }
.list-item:active { background: var(--blue-bg); }

/* shake for errors */
.shake { animation: shake 0.4s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* ============================================================
   [v444] BID SHEET — Responsive grid (1 col mobile, 2 cols tablette)
   PrestaBidSheet enveloppe son contenu (Map+Recap | Form) dans
   .bid-sheet-grid. Scope au mode LOCKED fullscreen pour ne pas
   casser le rendu dans le phone-frame du web unifie.
   Mobile (<768px ou web phone-frame) : 1 colonne empilee.
   Tablette+ (≥768px en mode LOCKED)  : 2 colonnes cote a cote,
                                        sheet centree max-width 760px.
   ============================================================ */
.bid-sheet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.bid-sheet-col {
  display: flex;
  flex-direction: column;
  min-width: 0; /* empeche overflow horizontal des enfants */
}
@media (min-width: 768px) {
  .mobile-stage-fullscreen .sheet-overlay {
    align-items: center;
  }
  .mobile-stage-fullscreen .sheet {
    max-width: 760px;
    width: calc(100% - 32px);
    margin: 0 auto;
    border-radius: 24px;
    padding: 18px 24px 24px;
    max-height: 92vh;
    overflow-y: auto;
  }
  .mobile-stage-fullscreen .bid-sheet-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }
}

/* ============================================================
   [v448] PRESTA MISSION CARDS GRID — Liste des demandes en grille responsive
   Scope a .mobile-stage-fullscreen pour ne pas casser le phone-frame web unifie.
   - mobile (<768px)      : 1 colonne (stack vertical)
   - tablette (>=768px)   : 2 colonnes
   - desktop (>=1200px)   : 3 colonnes
   ============================================================ */
/* [v467] Grid responsive avec breakpoints explicites :
   <540px = 1 col, 540-767 = 2 cols, 768-1099 = 3 cols, 1100-1499 = 4 cols,
   >=1500 = 5 cols. Scope a .mobile-stage-fullscreen (LOCKED APK). */
.presta-mission-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 540px) {
  .mobile-stage-fullscreen .presta-mission-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}
@media (min-width: 768px) {
  .mobile-stage-fullscreen .presta-mission-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}
@media (min-width: 1100px) {
  .mobile-stage-fullscreen .presta-mission-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}
@media (min-width: 1500px) {
  .mobile-stage-fullscreen .presta-mission-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }
}
/* Les cards a l'interieur de la grid n'ont plus besoin de marginBottom
   (la grid gere le gap). Override pour .presta-card ET .card (historique). */
.presta-mission-grid > .presta-card,
.presta-mission-grid > .card,
.presta-mission-grid > button.card {
  margin-bottom: 0 !important;
}
