/* Maquette de téléphone + kit UI : les écrans de l'app recréés en HTML.
   L'intérieur est dessiné à la taille logique réelle (402 × 874) puis mis à l'échelle. */

.phone {
  --phone-scale: .72;
  --ui-bg: #061A0F;
  --ui-surface: #0E2617;
  --ui-raised: #143423;
  --ui-line: rgba(244, 239, 226, .10);
  --ui-ink: #F4EFE2;
  --ui-soft: #9CAC9E;
  --ui-faint: #6E7F72;
  --ui-accent: #E0B447;
  --ui-accent-ink: #03150C;
  --ui-accent-soft: rgba(224, 180, 71, .16);
  --ui-green: #65C97E;
  --ui-red: #E2725B;

  position: relative;
  flex: none;
  width: calc(402px * var(--phone-scale));
  height: calc(874px * var(--phone-scale));
}
.phone[data-accent="green"] {
  --ui-accent: #65C97E;
  --ui-accent-ink: #03150C;
  --ui-accent-soft: rgba(101, 201, 126, .16);
}

.phone__frame {
  position: absolute;
  top: 0; left: 0;
  width: 402px;
  height: 874px;
  transform: scale(var(--phone-scale));
  transform-origin: 0 0;
  padding: 11px;
  border-radius: 62px;
  background: linear-gradient(155deg, #3A403A 0%, #0B120E 26%, #151C17 55%, #0B120E 78%, #2E342E 100%);
  box-shadow: var(--sh-phone);
}
.phone__screen {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: 51px;
  background: var(--ui-bg);
  color: var(--ui-ink);
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.phone__island {
  position: absolute;
  top: 12px; left: 50%;
  z-index: 6;
  width: 108px; height: 32px;
  margin-left: -54px;
  border-radius: var(--r-pill);
  background: #050906;
}
.phone__glare {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  border-radius: 51px;
  background: linear-gradient(calc(115deg + var(--tilt, 0deg)), transparent 34%, rgba(255, 255, 255, .06) 48%, transparent 62%);
}
.phone__btn {
  position: absolute;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #4A504A, #202621);
}
.phone__btn--power { right: -3px; top: 200px; height: 92px; }
.phone__btn--vol { left: -3px; top: 168px; height: 56px; }

/* ---------- Barre d'état ---------- */
.app-status {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.app-status__icons { display: flex; align-items: center; gap: 6px; }
.app-status svg { width: 17px; height: 17px; }

/* ---------- Couches d'écran ---------- */
.phone__layers { position: absolute; inset: 56px 0 0; }
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s var(--ease-out), visibility 0s linear .45s;
}
.phone[data-screen="home"] .screen[data-screen="home"],
.phone[data-screen="create"] .screen[data-screen="create"],
.phone[data-screen="candidats"] .screen[data-screen="candidats"],
.phone[data-screen="paiement"] .screen[data-screen="paiement"],
.phone[data-screen="checkin"] .screen[data-screen="checkin"],
.phone[data-screen="wallet"] .screen[data-screen="wallet"] {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* ---------- En-tête d'écran ---------- */
.app-head {
  padding: 4px 20px 22px;
  background: var(--ui-accent-soft);
  border-bottom: 1px solid var(--ui-line);
}
.app-head__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-hello { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.app-head__row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.app-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--ui-line);
  border-radius: var(--r-pill);
  background: var(--ui-surface);
  font-size: 14px;
  font-weight: 600;
}
.app-pill svg { width: 15px; height: 15px; color: var(--ui-accent); }
.app-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--ui-surface);
}
.app-bell svg { width: 19px; height: 19px; }
.app-bell b {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 19px;
  padding: 1px 5px;
  border-radius: var(--r-pill);
  background: var(--ui-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

/* Interrupteur C / P de l'app */
.app-cp {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 88px; height: 34px;
  margin-left: auto;
  border-radius: var(--r-pill);
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  font-size: 13px;
  font-weight: 700;
}
.app-cp span { display: grid; place-items: center; position: relative; z-index: 2; color: var(--ui-soft); }
.app-cp::before {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: calc(50% - 3px); height: calc(100% - 6px);
  border-radius: var(--r-pill);
  background: var(--ui-accent);
  transform: translateX(var(--cp-x, 0));
  transition: transform .5s var(--ease-out);
}
.phone[data-accent="green"] .app-cp { --cp-x: 100%; }
.app-cp span:first-child { color: var(--ui-accent-ink); }
.phone[data-accent="green"] .app-cp span:first-child { color: var(--ui-soft); }
.phone[data-accent="green"] .app-cp span:last-child { color: var(--ui-accent-ink); }

/* ---------- Corps ---------- */
.app-body {
  flex: 1;
  min-height: 0;
  padding: 18px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.app-title { font-size: 17px; font-weight: 700; }
.app-sub { font-size: 13px; color: var(--ui-soft); }

.app-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.app-stat {
  padding: 14px 10px;
  border: 1px solid var(--ui-line);
  border-radius: 18px;
  background: var(--ui-surface);
  text-align: center;
}
.app-stat b { display: block; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.app-stat span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ui-soft); }
.app-stat--accent b { color: var(--ui-accent); }
.app-stat--green b { color: var(--ui-green); }

/* ---------- Carte ---------- */
.app-map {
  position: relative;
  overflow: hidden;
  height: 236px;
  border: 1px solid var(--ui-line);
  border-radius: 22px;
  background: var(--ui-surface);
}
.app-map__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .92;
}
.app-radius {
  position: absolute;
  left: 50%; top: 52%;
  width: 150px; height: 150px;
  margin: -75px 0 0 -75px;
  border: 1.5px solid var(--ui-accent);
  border-radius: 50%;
  background: var(--ui-accent-soft);
  opacity: .55;
}
.app-pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--ui-green);
  color: #052A13;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .45);
}
.app-pin span { transform: rotate(45deg); }
.app-pin--me { background: var(--ui-accent); color: var(--ui-accent-ink); }

/* ---------- Listes de jobs ---------- */
.app-list { display: grid; gap: 10px; }
.app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--ui-line);
  border-radius: 18px;
  background: var(--ui-surface);
}
.app-row__body { min-width: 0; flex: 1; }
.app-row b { display: block; font-size: 14.5px; font-weight: 600; }
.app-row small { display: block; margin-top: 2px; font-size: 12px; color: var(--ui-soft); }
.app-row__amount { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.app-row__amount--in { color: var(--ui-green); }
.app-row__amount--out { color: var(--ui-red); }
.app-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--ui-raised);
  color: var(--ui-accent);
  font-size: 13px;
  font-weight: 700;
}
.app-avatar--green { color: var(--ui-green); }
.app-tag {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--ui-accent-soft);
  color: var(--ui-accent);
  font-size: 11px;
  font-weight: 700;
}
.app-tag--wait { background: rgba(226, 114, 91, .16); color: var(--ui-red); }

/* ---------- Création de Job ---------- */
.app-stepper { display: flex; align-items: center; gap: 8px; }
.app-stepper i {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ui-surface);
  color: var(--ui-soft);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}
.app-stepper i[data-on] { background: var(--ui-accent); color: var(--ui-accent-ink); }
.app-stepper em { flex: 1; height: 2px; border-radius: 2px; background: var(--ui-line); }

.app-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  background: var(--ui-surface);
}
.app-option[data-on] { border-color: var(--ui-accent); background: var(--ui-accent-soft); }
.app-option svg { width: 20px; height: 20px; color: var(--ui-accent); flex: none; }
.app-option b { display: block; font-size: 14.5px; font-weight: 600; }
.app-option small { display: block; font-size: 12px; color: var(--ui-soft); }

.app-field { display: grid; gap: 6px; }
.app-field span { font-size: 12.5px; color: var(--ui-soft); }
.app-field div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: var(--ui-surface);
  font-size: 14.5px;
}
.app-field svg { width: 16px; height: 16px; color: var(--ui-faint); }

.app-cta {
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: var(--r-pill);
  background: var(--ui-accent);
  color: var(--ui-accent-ink);
  font-size: 15.5px;
  font-weight: 700;
}
.app-cta--ghost { background: none; border: 1px solid var(--ui-line); color: var(--ui-ink); }

/* ---------- Récapitulatif de paiement ---------- */
.app-recap {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--ui-line);
  border-radius: 20px;
  background: var(--ui-surface);
  font-variant-numeric: tabular-nums;
}
.app-recap div { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--ui-soft); }
.app-recap div b { color: var(--ui-ink); font-weight: 600; }
.app-recap div.total { padding-top: 12px; border-top: 1px solid var(--ui-line); font-size: 15px; color: var(--ui-ink); }
.app-recap div.total b { font-size: 19px; color: var(--ui-accent); }

/* ---------- Check-in / preuves ---------- */
.app-proof { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app-proof figure {
  position: relative;
  margin: 0;
  height: 104px;
  border-radius: 16px;
  border: 1px solid var(--ui-line);
  background:
    repeating-linear-gradient(135deg, rgba(244, 239, 226, .05) 0 8px, transparent 8px 16px),
    var(--ui-surface);
}
.app-proof figcaption {
  position: absolute;
  left: 8px; bottom: 8px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: rgba(3, 21, 12, .7);
  font-size: 11px;
  font-weight: 600;
}
.app-stars { display: flex; gap: 6px; }
.app-stars svg { width: 26px; height: 26px; color: var(--ui-accent); }

/* ---------- Portefeuille ---------- */
.app-balance {
  padding: 20px;
  border: 1px solid var(--ui-line);
  border-radius: 22px;
  background: linear-gradient(150deg, var(--ui-accent-soft), transparent 70%), var(--ui-surface);
  text-align: center;
}
.app-balance span { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ui-soft); }
.app-balance b {
  display: block;
  margin-top: 6px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ui-accent);
}
.app-balance small { display: block; font-size: 13px; color: var(--ui-soft); }

.app-chips { display: flex; gap: 8px; overflow: hidden; }
.app-chip {
  padding: 8px 14px;
  border: 1px solid var(--ui-line);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ui-soft);
  white-space: nowrap;
}
.app-chip[data-on] { background: var(--ui-ink); border-color: var(--ui-ink); color: var(--ui-bg); }

/* ---------- Notification ---------- */
.app-toast {
  position: absolute;
  top: 14px; left: 16px; right: 16px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--ui-line);
  border-radius: 20px;
  background: rgba(14, 38, 23, .96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .5);
  opacity: 0;
  transform: translateY(-130%);
}
.app-toast b { display: block; font-size: 14px; }
.app-toast small { display: block; font-size: 12px; color: var(--ui-soft); }
.app-toast__dot { width: 34px; height: 34px; flex: none; border-radius: 50%; background: rgba(101, 201, 126, .18); display: grid; place-items: center; color: var(--ui-green); }
.app-toast__dot svg { width: 18px; height: 18px; }

/* ---------- Barre d'onglets ---------- */
.app-tabbar {
  position: absolute;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  height: 68px;
  padding: 0 8px;
  border: 1px solid var(--ui-line);
  border-radius: var(--r-pill);
  background: rgba(10, 31, 21, .96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.app-tab { display: grid; justify-items: center; gap: 3px; font-size: 10.5px; color: var(--ui-faint); }
.app-tab svg { width: 21px; height: 21px; }
.app-tab[data-on] { color: var(--ui-accent); }
.app-tab--plus {
  justify-self: center;
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--ui-accent);
  color: var(--ui-accent-ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
}
.app-tab--plus svg { width: 26px; height: 26px; }

.app-body--tabbed { padding-bottom: 100px; overflow: hidden; }

/* ---------- Échelles ---------- */
@media (min-width: 1024px) { .phone { --phone-scale: .84; } }
@media (min-width: 1440px) { .phone { --phone-scale: .9; } }
@media (max-width: 1023px) { .phone { --phone-scale: .78; } }
@media (max-width: 767px) { .phone { --phone-scale: .72; } }
@media (max-width: 380px) { .phone { --phone-scale: .66; } }
.phone--hero { --phone-scale: .9; }
@media (max-width: 1023px) { .phone--hero { --phone-scale: .82; } }
@media (max-width: 767px) { .phone--hero { --phone-scale: .76; } }
@media (max-width: 380px) { .phone--hero { --phone-scale: .68; } }
