/* Maquette de téléphone CI Job — écrans de l'app recréés en HTML (adapté de CI-Job-site/assets/css/phone.css).
   L'intérieur est dessiné à la taille logique réelle (402 × 874) puis mis à l'échelle via --phone-scale. */

.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;
  --ui-ease: cubic-bezier(.16, 1, .3, 1);

  position: relative;
  flex: none;
  width: calc(402px * var(--phone-scale));
  height: calc(874px * var(--phone-scale));
  font-family: var(--font-body);
}

.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:
    inset 0 0 0 1.5px rgba(255, 255, 255, .08),
    0 60px 120px -30px rgba(0, 0, 0, .85),
    0 30px 60px -20px rgba(224, 180, 71, .12);
}
.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: 9;
  width: 108px; height: 32px;
  margin-left: -54px;
  border-radius: 999px;
  background: #050906;
}
.phone__glare {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  border-radius: 51px;
  background: linear-gradient(calc(115deg + var(--glare, 0deg)), transparent 30%, rgba(255, 255, 255, .07) 46%, 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; }

/* ---------- Écrans ---------- */
.phone__layers { position: absolute; inset: 56px 0 0; }
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(28px) scale(.97);
  filter: blur(6px);
  transition: opacity .5s var(--ui-ease), transform .7s var(--ui-ease), filter .5s var(--ui-ease), visibility 0s linear .5s;
}
.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="wallet"] .screen[data-screen="wallet"] {
  opacity: 1;
  visibility: visible;
  transform: none;
  filter: none;
  transition-delay: 0s;
}

/* Stagger interne : les blocs de l'écran actif arrivent en cascade */
.screen .app-body > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s var(--ui-ease), transform .6s var(--ui-ease);
}
.phone[data-screen="home"] .screen[data-screen="home"] .app-body > *,
.phone[data-screen="create"] .screen[data-screen="create"] .app-body > *,
.phone[data-screen="candidats"] .screen[data-screen="candidats"] .app-body > *,
.phone[data-screen="paiement"] .screen[data-screen="paiement"] .app-body > *,
.phone[data-screen="wallet"] .screen[data-screen="wallet"] .app-body > * {
  opacity: 1;
  transform: none;
}
.screen .app-body > *:nth-child(2) { transition-delay: .07s; }
.screen .app-body > *:nth-child(3) { transition-delay: .14s; }
.screen .app-body > *:nth-child(4) { transition-delay: .21s; }
.screen .app-body > *:nth-child(5) { transition-delay: .28s; }
.screen .app-body > *:nth-child(6) { transition-delay: .35s; }

/* ---------- En-tête ---------- */
.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: 999px;
  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: 999px; background: var(--ui-red); color: #fff;
  font-size: 11px; font-weight: 700; text-align: center;
}

/* ---------- Corps ---------- */
.app-body { flex: 1; min-height: 0; padding: 18px 20px 0; display: flex; flex-direction: column; gap: 16px; }
.app-body--tabbed { padding-bottom: 100px; overflow: hidden; }
.app-title { font-size: 17px; font-weight: 700; }
.app-sub { margin-top: 4px; 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: 250px; margin-top: 10px; 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);
  animation: radar 2.8s var(--ui-ease) infinite;
}
@keyframes radar {
  0% { transform: scale(.35); opacity: .9; }
  100% { transform: scale(1.35); opacity: 0; }
}
.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); z-index: 2; }
.phone[data-screen="home"] .app-pin:not(.app-pin--me) { animation: pin-drop .7s var(--ui-ease) both; }
.phone[data-screen="home"] .app-pin:nth-of-type(3) { animation-delay: .15s; }
.phone[data-screen="home"] .app-pin:nth-of-type(4) { animation-delay: .3s; }
.phone[data-screen="home"] .app-pin:nth-of-type(5) { animation-delay: .45s; }
.phone[data-screen="home"] .app-pin:nth-of-type(6) { animation-delay: .6s; }
@keyframes pin-drop {
  0% { opacity: 0; transform: translateY(-40px) rotate(-45deg); }
  100% { opacity: 1; transform: rotate(-45deg); }
}

/* ---------- Listes ---------- */
.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--pick { border-color: var(--ui-accent); background: linear-gradient(120deg, var(--ui-accent-soft), transparent 70%), 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); font-size: 18px; }

/* ---------- Création ---------- */
.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: 12px 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 b { display: block; font-size: 14.5px; font-weight: 600; }
.app-option small { display: block; font-size: 12px; color: var(--ui-soft); }
.app-op { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; font-size: 14px; font-weight: 800; color: #fff; }
.app-op--wave { background: #1DC4FF; color: #03243A; }
.app-op--orange { background: #FF7900; }
.app-op--mtn { background: #FFCC00; color: #1A1A1A; }

.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: 999px; background: var(--ui-accent); color: var(--ui-accent-ink); font-size: 15.5px; font-weight: 700; }

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

/* ---------- 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; }

/* ---------- Portefeuille ---------- */
.app-balance { padding: 22px; 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; margin-top: 4px; font-size: 13px; color: var(--ui-green); }

/* ---------- Notification ---------- */
.app-toast {
  position: absolute; top: -40px; 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);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .5);
  opacity: 0;
  transform: translateY(-120%);
  transition: opacity .5s var(--ui-ease), transform .8s var(--ui-ease);
}
.phone[data-screen="wallet"] .app-toast { opacity: 1; transform: translateY(0); transition-delay: .55s; }
.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: 999px;
  background: rgba(10, 31, 21, .96);
}
.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; }

@media (prefers-reduced-motion: reduce) {
  .screen, .screen .app-body > *, .app-toast { transition: none !important; filter: none !important; }
  .app-radius, .app-pin { animation: none !important; }
}
