
:root {
  /* Palette inspirée de l'image : bleu cloche + fond pastel */
  --primary-50:  #F0F8FE;
  --primary-100: #DCEEFB;
  --primary-200: #B8DDF7;
  --primary-300: #8FC7F1;
  --primary-400: #6DB8EC;     /* la cloche */
  --primary-500: #4DAEEC;     /* boutons primaires */
  --primary-600: #2493DC;
  --primary-700: #1376BB;
  --primary-800: #0F5C92;

  /* Fond pastel comme l'image */
  --bg-pastel-top:    #E5F1FB;
  --bg-pastel-mid:    #DCEAF7;
  --bg-pastel-bot:    #C9DFF1;

  --med-500:  #16A34A;
  --med-100:  #DCFCE7;
  --warn-500: #F59E0B;
  --warn-100: #FEF3C7;
  --danger-500: #DC2626;
  --danger-100: #FEE2E2;
  --success-500: #16A34A;

  --ink-900: #0F1B2D;
  --ink-700: #2A3B52;
  --ink-500: #5B6A82;
  --ink-300: #9CA8BC;
  --ink-200: #C8D1DE;
  --ink-100: #E8ECF3;
  --ink-50:  #F1F4F9;
  --bg-soft: #F6F8FB;
  --white:   #FFFFFF;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;

  --r-sm: 12px; --r-md: 16px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;

  --shadow-sm: 0 2px 6px rgba(15, 27, 45, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 27, 45, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 27, 45, 0.12);
  --shadow-xl: 0 30px 80px rgba(15, 27, 45, 0.18);
  --shadow-primary: 0 8px 24px rgba(77, 174, 236, 0.4);
  --shadow-primary-lg: 0 12px 36px rgba(77, 174, 236, 0.5);
  --shadow-med: 0 8px 24px rgba(22, 163, 74, 0.28);
  --shadow-danger: 0 8px 24px rgba(220, 38, 38, 0.32);

  --t-xs: 13px;
  --t-sm: 15px;
  --t-base: 17px;
  --t-md: 19px;
  --t-lg: 22px;
  --t-xl: 28px;
  --t-2xl: 36px;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  --font-arabic: 'Cairo', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
html, body {
  font-family: var(--font-body);
  font-size: var(--t-base);
  color: var(--ink-900);
  background:
    radial-gradient(circle at 12% 8%, rgba(143, 199, 241, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 88% 92%, rgba(77, 174, 236, 0.18) 0%, transparent 50%),
    linear-gradient(135deg, #ecf3fb 0%, #dde9f6 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================================
   DEMO STAGE LAYOUT
   ======================================== */
.stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 32px;
  padding: 32px 40px;
  align-items: start;
}

/* LEFT — Brand + now showing */
.stage-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 32px;
}
.brand-card {
  background: white;
  border-radius: 24px;
  padding: 26px 22px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,0.6);
}
.brand-card .brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.brand-card .brand-logo {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
}
.brand-card .brand-logo svg { width: 100%; height: 100%; }
.brand-card .brand-name {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-500);
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-card .brand-name + .brand-tag {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-500);
  margin-top: 2px;
}
.brand-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-600);
  margin-bottom: 8px;
}
.brand-card .lead {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.55;
}

.now-showing {
  background: white;
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ink-100);
}
.now-showing .ns-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-300);
  margin-bottom: 8px;
}
.now-showing .ns-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.now-showing .ns-desc {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.5;
  margin-bottom: 10px;
}
.ns-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.ns-badge.flow { background: var(--primary-100); color: var(--primary-700); }
.ns-badge.new { background: var(--med-100); color: #166534; }
.ns-badge.fix { background: var(--warn-100); color: #92400E; }
.ns-badge.pivot { background: var(--danger-100); color: #991B1B; }
.ns-badge.empty { background: var(--ink-50); color: var(--ink-500); }
.ns-badge.error { background: var(--danger-100); color: #991B1B; }

/* CENTER — Phone */
.stage-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.phone {
  width: 380px;
  height: 800px;
  background: var(--white);
  border-radius: 48px;
  border: 12px solid #1a1f2e;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.05) inset;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone .notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 26px;
  background: #1a1f2e;
  border-radius: 14px;
  z-index: 100;
}
.status-bar {
  height: 46px;
  padding: 16px 26px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
  flex-shrink: 0;
  z-index: 50;
}
.status-bar.dark { color: white; }
.status-bar .right { display: flex; gap: 6px; align-items: center; font-size: 11px; }

.screen-host {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform: translateX(20px);
}
.screen::-webkit-scrollbar { display: none; }
.screen.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  z-index: 5;
}
.screen.leaving {
  opacity: 0;
  transform: translateX(-20px);
  z-index: 1;
}

.phone-hint {
  font-size: 13px;
  color: var(--ink-500);
  text-align: center;
  max-width: 360px;
  line-height: 1.5;
  background: rgba(255,255,255,0.7);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.5);
}
.phone-hint kbd {
  background: white;
  border: 1px solid var(--ink-200);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink-700);
  margin: 0 2px;
}

/* RIGHT — Menu */
.menu-card {
  background: white;
  border-radius: 24px;
  padding: 22px 18px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 32px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}
.menu-card::-webkit-scrollbar { width: 6px; }
.menu-card::-webkit-scrollbar-thumb { background: var(--ink-100); border-radius: 3px; }
.menu-card .menu-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.menu-card .menu-sub {
  font-size: 12px;
  color: var(--ink-500);
  margin-bottom: 14px;
  line-height: 1.4;
}
.menu-section {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-300);
  margin: 12px 0 6px;
  padding: 0 4px;
}
.menu-section:first-of-type { margin-top: 0; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  line-height: 1.3;
}
.menu-item:hover { background: var(--bg-soft); }
.menu-item:active { transform: scale(0.98); }
.menu-item.active {
  background: var(--primary-50);
  color: var(--primary-700);
}
.menu-item .ico { font-size: 13px; width: 16px; text-align: center; flex-shrink: 0; }
.menu-item .name { flex: 1; }

.reset-btn {
  margin-top: 16px;
  width: 100%;
  padding: 11px;
  background: var(--bg-soft);
  border: 1px solid var(--ink-100);
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
}
.reset-btn:hover { background: var(--ink-100); }

@media (max-width: 1280px) {
  .stage {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 20px;
  }
  .stage-side, .menu-card { position: static; max-height: none; }
  .stage-phone { order: -1; }
}

/* ========================================
   SHARED UI — bottoms, buttons, top-bars
   ======================================== */
.top-bar {
  padding: var(--s-3) var(--s-5) var(--s-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.top-bar .back-btn {
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-700);
  font-size: 22px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  flex-shrink: 0;
}
.top-bar .back-btn:hover { background: var(--ink-100); }
.top-bar .back-btn:active { transform: scale(0.92); }
.top-bar h2 {
  font-family: var(--font-display);
  font-size: var(--t-lg);
  font-weight: 600;
  color: var(--ink-900);
  flex: 1;
  text-align: center;
}
.top-bar .voice-btn {
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: var(--primary-100);
  color: var(--primary-600);
  border: none;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  animation: pulse-voice 2.4s ease-in-out infinite;
}
@keyframes pulse-voice {
  0%, 100% { box-shadow: 0 0 0 0 rgba(77, 174, 236, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(77, 174, 236, 0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 18px 24px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: var(--t-md);
  font-weight: 700;
  line-height: 1;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  min-height: 60px;
  width: 100%;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--primary-500);
  color: white;
  box-shadow: var(--shadow-primary);
}
.btn-secondary {
  background: var(--white);
  color: var(--primary-600);
  border: 2px solid var(--primary-200);
}
.btn-success {
  background: var(--success-500);
  color: white;
  box-shadow: var(--shadow-med);
}
.btn-danger {
  background: var(--danger-500);
  color: white;
  box-shadow: var(--shadow-danger);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-700);
  font-size: var(--t-base);
  font-weight: 600;
}
.btn-ghost.danger { color: var(--danger-500); }

.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 76px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--ink-100);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: 14px;
  z-index: 40;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ink-300);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  background: none;
  border: none;
  font-family: inherit;
  transition: color 0.15s, transform 0.1s;
}
.nav-item .ico { font-size: 22px; line-height: 1; }
.nav-item.active { color: var(--primary-500); }
.nav-item:active { transform: scale(0.92); }

/* Generic field input */
.field { margin: 0 20px 14px; }
.field label {
  display: block;
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.field-input {
  background: white;
  border: 2px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border 0.15s;
}
.field-input:focus-within { border-color: var(--primary-400); }
.field-input .icon {
  color: var(--primary-500);
  font-size: 22px;
  font-style: normal;
}
.field-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--t-md);
  font-weight: 600;
  color: var(--ink-900);
  background: transparent;
  font-family: inherit;
  width: 100%;
  min-width: 0;
}
.field-input input::placeholder {
  color: var(--ink-300);
  font-weight: 500;
}

/* CTA stuck at bottom of scrollable content */
.bottom-cta {
  position: sticky;
  bottom: 0; left: 0; right: 0;
  padding: 16px 20px 24px;
  background: linear-gradient(0deg, var(--bg-soft) 60%, transparent);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Cards — generic */
.card {
  background: white;
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

/* ========================================
   SVG LOGO — the "Dwaya bell"
   ======================================== */
.dwaya-bell {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   SCREEN: SPLASH  (matches the image)
   ======================================== */
.splash {
  height: 100%;
  background:
    linear-gradient(180deg, var(--bg-pastel-top) 0%, var(--bg-pastel-mid) 60%, var(--bg-pastel-bot) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 32px 36px;
  position: relative;
  overflow: hidden;
}
.splash-bg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
}
.splash-bg-pattern svg { width: 100%; height: 100%; }
.splash-logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
  justify-content: center;
  gap: 20px;
}
.splash-bell {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 12px 24px rgba(77, 174, 236, 0.35));
}
.splash-bell svg { width: 100%; height: 100%; }
.splash-name {
  font-family: var(--font-display);
  font-size: 78px;
  font-weight: 700;
  color: var(--primary-500);
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 4px 14px rgba(77, 174, 236, 0.18);
}
.splash-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 2;
}
.splash-actions .btn { font-size: var(--t-md); }

/* ========================================
   SCREEN: LANGUE
   ======================================== */
.lang-screen {
  height: 100%;
  background:
    linear-gradient(180deg, var(--bg-pastel-top) 0%, white 80%);
  padding: 36px 24px 32px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.lang-header {
  text-align: center;
  margin-bottom: 28px;
}
.lang-header .glob {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--primary-100);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 40px;
}
.lang-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.lang-header .ar {
  font-family: var(--font-arabic);
  font-size: 18px;
  color: var(--ink-500);
}
.lang-tile {
  background: white;
  border: 2px solid var(--ink-100);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: left;
  transition: all 0.2s;
}
.lang-tile.selected {
  border-color: var(--primary-500);
  background: var(--primary-50);
  box-shadow: var(--shadow-primary);
}
.lang-tile .flag { font-size: 36px; line-height: 1; flex-shrink: 0; }
.lang-tile .nm { flex: 1; }
.lang-tile .nm .n {
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 2px;
}
.lang-tile .nm .n.arabic { font-family: var(--font-arabic); font-size: 22px; }
.lang-tile .nm .s {
  font-size: var(--t-sm);
  color: var(--ink-500);
}
.lang-tile .check {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--ink-200);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: transparent;
}
.lang-tile.selected .check {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
}
.lang-tile.selected .check::before { content: '✓'; font-weight: 700; }

/* ========================================
   SCREEN: ONBOARDING (3 steps)
   ======================================== */
.onb-screen {
  height: 100%;
  background:
    linear-gradient(180deg, var(--bg-pastel-top) 0%, white 70%);
  padding: 36px 28px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
}
.onb-skip {
  position: absolute;
  top: 28px; right: 24px;
  background: none;
  border: none;
  color: var(--ink-500);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 10px;
}
.onb-illust {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 12px;
}
.onb-illust .big-emoji {
  font-size: 130px;
  line-height: 1;
  filter: drop-shadow(0 18px 40px rgba(77, 174, 236, 0.25));
}
.onb-illust h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink-900);
  text-align: center;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.onb-illust p {
  font-size: var(--t-md);
  color: var(--ink-500);
  text-align: center;
  line-height: 1.5;
}
.onb-listen {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-100);
  color: var(--primary-700);
  border: none;
  border-radius: var(--r-pill);
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin: 0 auto;
}
.onb-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 22px 0;
}
.onb-dots .d {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ink-200);
}
.onb-dots .d.active {
  background: var(--primary-500);
  width: 28px;
  border-radius: 5px;
}

/* ========================================
   SCREEN: PERMISSIONS (notif, camera)
   ======================================== */
.perm-screen {
  height: 100%;
  background: linear-gradient(180deg, var(--bg-pastel-top) 0%, white 60%);
  padding: 40px 28px 32px;
  display: flex;
  flex-direction: column;
}
.perm-illust {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
}
.perm-icon-circle {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: var(--primary-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
  position: relative;
}
.perm-icon-circle::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px dashed var(--primary-300);
  opacity: 0.6;
}
.perm-illust h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.perm-illust p {
  font-size: var(--t-base);
  color: var(--ink-500);
  line-height: 1.55;
  max-width: 280px;
}
.perm-bullets {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}
.perm-bullet {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: var(--r-md);
  padding: 14px 16px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ink-100);
}
.perm-bullet .ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.perm-bullet .tx {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-700);
  line-height: 1.4;
}

/* ========================================
   AUTH — login, signup, forgot, verify
   ======================================== */
.auth-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 32px;
}
.auth-hero {
  background: linear-gradient(180deg, var(--bg-pastel-top) 0%, var(--bg-pastel-mid) 100%);
  padding: 32px 24px 24px;
  position: relative;
  overflow: hidden;
}
.auth-hero .bell-mini {
  width: 70px; height: 70px;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
}
.auth-hero h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink-900);
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.auth-hero p {
  font-size: var(--t-sm);
  color: var(--ink-500);
  text-align: center;
}
.auth-form {
  padding-top: 24px;
}
.auth-link {
  text-align: center;
  font-size: var(--t-sm);
  color: var(--ink-500);
  margin-top: 14px;
}
.auth-link a {
  color: var(--primary-600);
  font-weight: 700;
  cursor: pointer;
}
.auth-forgot {
  display: block;
  text-align: right;
  margin: -4px 20px 16px;
  font-size: 13px;
  color: var(--primary-600);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

/* OTP Boxes */
.otp-boxes {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 12px 20px 24px;
}
.otp-boxes input {
  width: 48px; height: 56px;
  border: 2px solid var(--ink-100);
  border-radius: 14px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--ink-900);
  background: white;
  outline: none;
  transition: border 0.15s;
}
.otp-boxes input:focus { border-color: var(--primary-500); }
.otp-boxes input.filled { border-color: var(--primary-500); background: var(--primary-50); }

/* Success card */
.auth-success {
  text-align: center;
  padding: 40px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.success-circle {
  width: 110px; height: 110px;
  border-radius: 50%;
  background: var(--success-500);
  display: flex; align-items: center; justify-content: center;
  font-size: 60px;
  color: white;
  margin: 0 auto 24px;
  box-shadow: var(--shadow-med);
  animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop-in {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.auth-success h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.auth-success p {
  font-size: var(--t-md);
  color: var(--ink-500);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* MODE selection (patient / aidant) */
.mode-screen {
  height: 100%;
  background: linear-gradient(180deg, var(--bg-pastel-top) 0%, white 60%);
  padding: 32px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.mode-screen h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  text-align: center;
  margin-bottom: 6px;
}
.mode-screen .sub {
  font-size: var(--t-sm);
  color: var(--ink-500);
  text-align: center;
  margin-bottom: 24px;
}
.mode-card {
  background: white;
  border: 2px solid var(--ink-100);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  margin-bottom: 14px;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all 0.2s;
}
.mode-card.selected {
  border-color: var(--primary-500);
  background: var(--primary-50);
  box-shadow: var(--shadow-primary);
}
.mode-card .ic {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--primary-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
}
.mode-card .info { flex: 1; }
.mode-card .info .t {
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 4px;
}
.mode-card .info .d {
  font-size: var(--t-sm);
  color: var(--ink-500);
  line-height: 1.5;
}

/* ========================================
   SCREEN: HOME — "Aujourd'hui"
   ======================================== */
.home {
  height: 100%;
  overflow-y: auto;
  background: var(--bg-soft);
  padding-bottom: 96px;
}
.home-hero {
  background: linear-gradient(160deg, var(--primary-400) 0%, var(--primary-600) 100%);
  padding: 16px 24px 36px;
  border-radius: 0 0 32px 32px;
  color: white;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.home-greeting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  position: relative;
}
.home-greeting .greet-text .hello {
  font-size: var(--t-sm);
  color: rgba(255,255,255,0.85);
  margin-bottom: 2px;
}
.home-greeting .greet-text .name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
}
.home-greeting .actions { display: flex; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 20px;
  border: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn .badge-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 10px; height: 10px;
  background: #FCA5A5;
  border-radius: 50%;
  border: 2px solid var(--primary-500);
}

.next-rappel-card {
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--r-lg);
  padding: 16px;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s;
}
.next-rappel-card:active { transform: scale(0.98); }
.nrc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 6px;
}
.nrc-time {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 10px;
}
.nrc-meds {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nrc-meds .pill-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.22);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.nrc-meds .info { flex: 1; }
.nrc-meds .info .n1 { font-weight: 700; font-size: var(--t-base); }
.nrc-meds .info .n2 { font-size: 12px; color: rgba(255,255,255,0.78); margin-top: 2px; }

.home-quickactions {
  padding: 22px 20px 12px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.qa-tile {
  background: white;
  border-radius: var(--r-md);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
}
.qa-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.qa-tile:active { transform: scale(0.96); }
.qa-tile .qa-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin: 0 auto 8px;
}
.qa-tile.med .qa-icon { background: var(--med-100); color: var(--med-500); }
.qa-tile.rdv .qa-icon { background: var(--primary-100); color: var(--primary-600); }
.qa-tile.sos .qa-icon { background: var(--danger-100); color: var(--danger-500); }
.qa-tile .qa-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-900);
}

.home-section { padding: 8px 20px 16px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.section-head h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-900);
}
.section-head a {
  color: var(--primary-600);
  font-size: var(--t-sm);
  font-weight: 600;
  cursor: pointer;
}

.med-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: white;
  border-radius: var(--r-md);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s;
  border: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
}
.med-row:active { transform: scale(0.98); }
.med-row .left-bar { width: 4px; height: 40px; border-radius: 2px; }
.med-row.taken .left-bar { background: var(--success-500); }
.med-row.upcoming .left-bar { background: var(--warn-500); }
.med-row.miss .left-bar { background: var(--danger-500); }
.med-row .info { flex: 1; }
.med-row .info .n {
  font-size: var(--t-base);
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 2px;
}
.med-row .info .s { font-size: var(--t-sm); color: var(--ink-500); }
.med-row .status-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}
.med-row.taken .status-pill { background: var(--med-100); color: #166534; }
.med-row.upcoming .status-pill { background: var(--warn-100); color: #92400E; }
.med-row.miss .status-pill { background: var(--danger-100); color: #991B1B; }

.rdv-card {
  background: white;
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s;
  width: 100%;
  border: none;
  font-family: inherit;
  text-align: left;
}
.rdv-card:active { transform: scale(0.98); }
.rdv-card .doc-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-300), var(--primary-500));
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 22px;
  flex-shrink: 0;
}
.rdv-card .info { flex: 1; }
.rdv-card .info .n { font-size: var(--t-base); font-weight: 700; color: var(--ink-900); }
.rdv-card .info .s { font-size: var(--t-sm); color: var(--ink-500); margin-top: 2px; }
.rdv-card .arrow { color: var(--primary-500); font-size: 20px; }

/* ========================================
   LISTE MEDICAMENTS / RDV
   ======================================== */
.list-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 96px;
}
.list-header {
  padding: 16px 20px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.list-header h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.list-add {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary-500);
  color: white;
  border: none;
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  display: flex; align-items: center; justify-content: center;
}
.list-tabs {
  display: flex;
  gap: 8px;
  padding: 0 20px 12px;
}
.list-tab {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: white;
  border: 1px solid var(--ink-100);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
  font-family: inherit;
}
.list-tab.active {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
}
.list-content { padding: 0 20px; }
.list-day-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-300);
  margin: 14px 0 8px;
}

.med-card {
  background: white;
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.15s;
  border: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
}
.med-card:active { transform: scale(0.98); }
.med-card .pill-img {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fee, #fbbf24);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.med-card .info { flex: 1; }
.med-card .info .n {
  font-size: var(--t-base);
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 2px;
}
.med-card .info .s {
  font-size: var(--t-sm);
  color: var(--ink-500);
  line-height: 1.4;
}
.med-card .info .t {
  font-size: 12px;
  color: var(--primary-600);
  font-weight: 600;
  margin-top: 4px;
}
.med-card .arrow { color: var(--ink-300); font-size: 22px; }

/* ========================================
   DETAIL MEDIC / RDV
   ======================================== */
.detail-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 100px;
}
.detail-hero {
  background: linear-gradient(160deg, var(--primary-400), var(--primary-600));
  padding: 24px 24px 32px;
  border-radius: 0 0 32px 32px;
  color: white;
  text-align: center;
}
.detail-hero .pill-img-lg {
  width: 90px; height: 90px;
  border-radius: 22px;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  margin: 0 auto 16px;
}
.detail-hero h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.detail-hero .sub {
  font-size: var(--t-sm);
  color: rgba(255,255,255,0.85);
}
.detail-hero .top-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.detail-hero .top-row .back-btn {
  background: rgba(255,255,255,0.2);
  color: white;
}
.detail-hero .top-row .back-btn:hover { background: rgba(255,255,255,0.3); }
.detail-hero .top-row .actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.detail-hero .top-row .icon-btn {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.2);
}

.detail-info-grid {
  margin: 20px 20px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.info-tile {
  background: white;
  border-radius: var(--r-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.info-tile .lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-300);
  margin-bottom: 6px;
}
.info-tile .val {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
  display: flex;
  align-items: center;
  gap: 6px;
}
.info-tile .val .em { font-size: 18px; }

.detail-section {
  margin: 24px 20px 0;
}
.detail-section .section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 10px;
}
.detail-time-list {
  background: white;
  border-radius: var(--r-md);
  padding: 4px 16px;
  box-shadow: var(--shadow-sm);
}
.time-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-100);
}
.time-row:last-child { border: none; }
.time-row .em { font-size: 22px; }
.time-row .lbl { flex: 1; font-weight: 700; color: var(--ink-700); }
.time-row .hh {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-600);
}

.detail-actions {
  margin: 24px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.danger-zone {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--ink-100);
}

/* RDV detail map */
.detail-map {
  margin: 16px 20px 0;
  height: 160px;
  border-radius: var(--r-md);
  background:
    linear-gradient(135deg, #cfe5f7 0%, #b8d8ed 100%);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ink-100);
}
.detail-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, transparent 0 30px, rgba(255,255,255,0.18) 30px 31px),
    repeating-linear-gradient(-45deg, transparent 0 40px, rgba(255,255,255,0.12) 40px 41px);
}
.detail-map .pin {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -100%);
  font-size: 40px;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.25));
  animation: pin-bounce 1.6s ease-in-out infinite;
}
@keyframes pin-bounce {
  0%, 100% { transform: translate(-50%, -100%); }
  50% { transform: translate(-50%, -106%); }
}
.detail-map .pin-shadow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0,0,0,0.25);
  filter: blur(2px);
}

/* ========================================
   POSOLOGIE / SCAN / RDV form
   ======================================== */
.scan-screen {
  height: 100%;
  background: #0a0e15;
  color: white;
  display: flex;
  flex-direction: column;
  position: relative;
}
.scan-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.5), transparent);
  z-index: 10;
}
.scan-header .close {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: white;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.scan-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}
.scan-viewport {
  flex: 1;
  background: linear-gradient(135deg, #1a2332 0%, #0a0e15 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.scan-mockbox {
  width: 220px; height: 280px;
  background: linear-gradient(135deg, #fee, #fed);
  border-radius: 8px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  position: relative;
  transform: rotate(-3deg);
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.scan-mockbox .pharma-tag {
  color: #c00;
  font-size: 11px;
  font-weight: 800;
}
.scan-mockbox .brand {
  font-family: var(--font-display);
  color: #c00;
  font-size: 26px;
  font-weight: 700;
  margin-top: 8px;
}
.scan-mockbox .desc { color: #555; font-size: 9px; margin-top: 4px; }
.scan-mockbox .img-area {
  flex: 1;
  background: linear-gradient(135deg, #fdba74 0%, #fbbf24 100%);
  border-radius: 4px;
  margin-top: 12px;
  position: relative;
}
.scan-mockbox .img-area::after {
  content: '💊';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
}
.scan-frame {
  position: absolute;
  inset: 80px 40px 200px;
  border: 3px solid white;
  border-radius: 24px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.4);
  pointer-events: none;
}
.scan-frame .corner {
  position: absolute;
  width: 32px; height: 32px;
  border: 4px solid var(--primary-400);
}
.scan-frame .corner.tl { top: -3px; left: -3px; border-right: none; border-bottom: none; border-radius: 24px 0 0 0; }
.scan-frame .corner.tr { top: -3px; right: -3px; border-left: none; border-bottom: none; border-radius: 0 24px 0 0; }
.scan-frame .corner.bl { bottom: -3px; left: -3px; border-right: none; border-top: none; border-radius: 0 0 0 24px; }
.scan-frame .corner.br { bottom: -3px; right: -3px; border-left: none; border-top: none; border-radius: 0 0 24px 0; }
.scan-helper {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-500);
  color: white;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  z-index: 5;
  animation: pulse-helper 2s ease-in-out infinite;
}
@keyframes pulse-helper {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.05); }
}
.scan-controls {
  padding: 24px 24px 32px;
  background: linear-gradient(0deg, rgba(0,0,0,0.7), transparent);
  z-index: 10;
}
.scan-instruction { text-align: center; margin-bottom: 22px; }
.scan-instruction .t1 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}
.scan-instruction .t2 {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}
.scan-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}
.scan-buttons .side-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 22px;
  border: none;
  cursor: pointer;
}
.scan-shutter {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: white;
  border: 5px solid rgba(255,255,255,0.3);
  cursor: pointer;
  position: relative;
}
.scan-shutter::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  animation: pulse-ring 2s ease-in-out infinite;
}
@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 0; }
}
.scan-manual-link {
  text-align: center;
  margin-top: 14px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* POSOLOGIE */
.pos-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 100px;
  position: relative;
}
.pos-product-card {
  margin: 0 20px 20px;
  background: white;
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.pos-product-card .img {
  width: 60px; height: 60px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fee, #fbbf24);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
}
.pos-product-card .info { flex: 1; }
.pos-product-card .info .n { font-size: 18px; font-weight: 700; color: var(--ink-900); }
.pos-product-card .info .s { font-size: 14px; color: var(--ink-500); margin-top: 2px; }
.pos-product-card .edit { color: var(--primary-500); font-weight: 700; font-size: 13px; cursor: pointer; }
.pos-section-title {
  padding: 0 20px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 12px;
}
.pos-times {
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.pos-time {
  background: white;
  border: 2px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: 14px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.pos-time.active {
  border-color: var(--primary-500);
  background: var(--primary-50);
  box-shadow: var(--shadow-primary);
}
.pos-time .emoji { font-size: 28px; margin-bottom: 4px; }
.pos-time .label { font-size: 13px; font-weight: 700; color: var(--ink-700); }
.pos-time.active .label { color: var(--primary-600); }
.pos-time .time { font-size: 11px; color: var(--ink-500); margin-top: 2px; }
.pos-quantity {
  margin: 0 20px 22px;
  background: white;
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.pos-quantity .label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-500);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pos-quantity .controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.pos-quantity .qbtn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--primary-100);
  color: var(--primary-600);
  border: none;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s;
}
.pos-quantity .qbtn:active { transform: scale(0.92); }
.pos-quantity .qval {
  font-family: var(--font-display);
  font-size: 50px;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1;
}
.pos-quantity .qunit { font-size: 13px; color: var(--ink-500); margin-top: 4px; }
.pos-meal {
  margin: 0 20px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pos-meal-opt {
  background: white;
  border: 2px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
}
.pos-meal-opt.active {
  border-color: var(--primary-500);
  background: var(--primary-50);
}
.pos-meal-opt .emoji { font-size: 26px; margin-bottom: 4px; }
.pos-meal-opt .label { font-weight: 700; color: var(--ink-700); }
.pos-duration {
  margin: 0 20px 22px;
  background: white;
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.pos-duration .opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ink-100);
  cursor: pointer;
}
.pos-duration .opt:last-child { border: none; }
.pos-duration .opt .icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.pos-duration .opt .label { flex: 1; font-weight: 700; color: var(--ink-700); }
.pos-duration .opt .arrow { color: var(--ink-300); }
.pos-duration .opt.selected .icon { background: var(--primary-100); color: var(--primary-600); }
.pos-duration .opt.selected .label { color: var(--primary-600); }

/* RDV form */
.rdv-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 100px;
}
.rdv-doctor-card {
  margin: 0 20px 20px;
  background: white;
  border-radius: var(--r-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.rdv-doctor-card .avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-300), var(--primary-500));
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 38px;
  box-shadow: var(--shadow-primary);
}
.rdv-time-slots { margin: 14px 20px 22px; }
.rdv-time-slots .label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.rdv-time-slots .slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.rdv-slot {
  background: white;
  border: 2px solid var(--ink-100);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  font-weight: 700;
  color: var(--ink-700);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.rdv-slot.active {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
  box-shadow: var(--shadow-primary);
}

/* ========================================
   RAPPEL (lockscreen)
   ======================================== */
.rappel-screen {
  height: 100%;
  background:
    radial-gradient(circle at 30% 20%, #1e3a5f 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, #2d4a6f 0%, transparent 50%),
    linear-gradient(180deg, #0f1b2d 0%, #1a2942 100%);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 60px 20px 40px;
  position: relative;
}
.rappel-time { text-align: center; margin-bottom: 8px; }
.rappel-time .h {
  font-family: var(--font-display);
  font-size: 88px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}
.rappel-time .d {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
}
.rappel-spacer { flex: 1; }
.rappel-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 14px;
}
.rappel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.rappel-header .pulse {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary-400);
  box-shadow: 0 0 0 6px rgba(77, 174, 236, 0.3);
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 6px rgba(77, 174, 236, 0.3); }
  50% { box-shadow: 0 0 0 14px rgba(77, 174, 236, 0); }
}
.rappel-header .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}
.rappel-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 14px;
}
.rappel-meds {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 12px;
}
.rappel-meds .img {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fee, #fbbf24);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.rappel-meds .info { flex: 1; }
.rappel-meds .info .n { font-weight: 700; font-size: 16px; }
.rappel-meds .info .s { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.rappel-meds .audio-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--primary-500);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}
.rappel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.rappel-action {
  padding: 16px;
  border-radius: 16px;
  border: none;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 60px;
  font-family: inherit;
}
.rappel-action.taken {
  background: var(--success-500);
  color: white;
  box-shadow: var(--shadow-med);
}
.rappel-action.snooze {
  background: rgba(255,255,255,0.15);
  color: white;
}
.rappel-call-family {
  text-align: center;
  margin-top: 16px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 600;
}
.rappel-call-family a { color: var(--primary-300); text-decoration: underline; cursor: pointer; }

/* ========================================
   HISTORIQUE (calendrier observance)
   ======================================== */
.hist-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 96px;
}
.hist-stats {
  margin: 0 20px 22px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: var(--r-lg);
  padding: 22px;
  color: white;
  position: relative;
  overflow: hidden;
}
.hist-stats::before {
  content: '';
  position: absolute;
  top: -30%; right: -10%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
}
.hist-stats .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 6px;
}
.hist-stats .pct {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 6px;
}
.hist-stats .desc { font-size: 14px; color: rgba(255,255,255,0.85); }
.hist-stats .trend {
  position: absolute;
  bottom: 20px; right: 20px;
  background: rgba(255,255,255,0.22);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
}
.hist-month {
  margin: 0 20px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hist-month h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-900);
}
.hist-month .arrows { display: flex; gap: 6px; }
.hist-month .arrow-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--ink-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-700);
  font-size: 16px;
  cursor: pointer;
}
.hist-cal {
  margin: 0 20px 22px;
  background: white;
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.hist-cal .week-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 8px;
}
.hist-cal .week-days span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-300);
  text-transform: uppercase;
}
.hist-cal .days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.hist-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
}
.hist-day.empty { color: var(--ink-200); }
.hist-day.full { background: var(--success-500); color: white; }
.hist-day.partial { background: var(--warn-500); color: white; }
.hist-day.miss { background: var(--danger-100); color: var(--danger-500); }
.hist-day.today {
  border: 2px solid var(--primary-500);
  background: var(--primary-50);
  color: var(--primary-600);
}
.hist-legend {
  margin: 0 20px 16px;
  display: flex;
  gap: 14px;
  justify-content: center;
  font-size: 12px;
  color: var(--ink-500);
}
.hist-legend .item { display: flex; align-items: center; gap: 6px; }
.hist-legend .item .dot { width: 10px; height: 10px; border-radius: 3px; }

/* ========================================
   BILAN — graph adhérence
   ======================================== */
.bilan-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 96px;
}
.bilan-hero {
  background: linear-gradient(160deg, var(--primary-400), var(--primary-600));
  margin: 0;
  padding: 0 24px 36px;
  border-radius: 0 0 32px 32px;
  color: white;
}
.bilan-big {
  text-align: center;
  margin-top: 16px;
}
.bilan-big .lbl {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-bottom: 4px;
}
.bilan-big .pct {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.bilan-big .sub {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  margin-top: 6px;
}
.bilan-chart {
  margin: 22px 20px 0;
  background: white;
  border-radius: var(--r-lg);
  padding: 20px 16px 16px;
  box-shadow: var(--shadow-sm);
}
.bilan-chart h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 14px;
}
.bilan-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  height: 140px;
  padding: 0 4px;
  border-bottom: 1px dashed var(--ink-100);
}
.bilan-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.bilan-bar .col {
  width: 100%;
  background: linear-gradient(180deg, var(--primary-400), var(--primary-600));
  border-radius: 6px 6px 0 0;
  position: relative;
  transition: height 0.4s ease;
}
.bilan-bar .col::after {
  content: attr(data-pct) '%';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-500);
}
.bilan-bar .lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-500);
  margin-top: 4px;
}
.bilan-stat-grid {
  margin: 16px 20px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat-card {
  background: white;
  border-radius: var(--r-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.stat-card .em { font-size: 24px; margin-bottom: 6px; }
.stat-card .val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink-900);
}
.stat-card .lbl { font-size: 11px; color: var(--ink-500); margin-top: 2px; }

/* ========================================
   SOS — urgence
   ======================================== */
.sos-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 96px;
}
.sos-banner {
  margin: 0 20px 16px;
  background: linear-gradient(135deg, var(--danger-500), #B91C1C);
  border-radius: var(--r-lg);
  padding: 22px;
  color: white;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-danger);
  cursor: pointer;
}
.sos-banner .ic {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  animation: sos-pulse 1.6s ease-in-out infinite;
}
@keyframes sos-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.5); }
  50% { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
}
.sos-banner .info { flex: 1; }
.sos-banner .info .t { font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.sos-banner .info .s { font-size: 13px; opacity: 0.9; }
.contact-section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-900);
  margin: 16px 20px 12px;
}
.contact-card {
  margin: 0 20px 10px;
  background: white;
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s;
  border: none;
  width: calc(100% - 40px);
  font-family: inherit;
  text-align: left;
}
.contact-card:active { transform: scale(0.98); }
.contact-card .ic {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--primary-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.contact-card.med-doc .ic { background: var(--primary-100); color: var(--primary-600); }
.contact-card.fam .ic { background: #FFE0E0; color: var(--danger-500); }
.contact-card .info { flex: 1; }
.contact-card .info .n { font-size: 16px; font-weight: 700; color: var(--ink-900); margin-bottom: 2px; }
.contact-card .info .s { font-size: 13px; color: var(--ink-500); }
.contact-card .call { font-size: 22px; color: var(--success-500); }

/* PHARMA */
.pharma-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 96px;
}
.pharma-banner {
  margin: 0 20px 16px;
  background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
  border-radius: var(--r-lg);
  padding: 20px;
  text-align: center;
  border: 2px solid var(--primary-200);
}
.pharma-banner .em { font-size: 36px; margin-bottom: 8px; }
.pharma-banner h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 4px;
}
.pharma-banner p { font-size: 14px; color: var(--ink-500); }
.pharma-card {
  margin: 0 20px 10px;
  background: white;
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: none;
  width: calc(100% - 40px);
  font-family: inherit;
  text-align: left;
  transition: transform 0.15s;
}
.pharma-card:active { transform: scale(0.98); }
.pharma-card .ic {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--med-100);
  color: var(--med-500);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.pharma-card .info { flex: 1; }
.pharma-card .info .n { font-size: 16px; font-weight: 700; color: var(--ink-900); margin-bottom: 2px; }
.pharma-card .info .a { font-size: 13px; color: var(--ink-500); }
.pharma-card .right { text-align: right; flex-shrink: 0; }
.pharma-card .right .badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  display: inline-block;
  margin-bottom: 4px;
}
.pharma-card .right .badge.open { background: var(--med-100); color: #166534; }
.pharma-card .right .badge.garde { background: var(--warn-100); color: #92400E; }
.pharma-card .right .dist { font-size: 12px; color: var(--ink-500); font-weight: 600; }

/* ========================================
   PROFIL & RÉGLAGES
   ======================================== */
.profile-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 96px;
}
.profile-card {
  margin: 0 20px 16px;
  background: white;
  border-radius: var(--r-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.profile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-300), var(--primary-500));
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  box-shadow: var(--shadow-primary);
}
.profile-card .name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 4px;
}
.profile-card .phone { font-size: 14px; color: var(--ink-500); margin-bottom: 14px; }

.settings-list {
  margin: 0 20px 14px;
  background: white;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ink-100);
  cursor: pointer;
  background: white;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s;
}
.settings-item:last-child { border-bottom: none; }
.settings-item:hover { background: var(--bg-soft); }
.settings-item .ic {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.settings-item.s-bilan .ic { background: var(--primary-100); color: var(--primary-600); }
.settings-item.s-hist .ic { background: var(--primary-100); color: var(--primary-600); }
.settings-item.s-fam .ic { background: var(--warn-100); color: #92400E; }
.settings-item.s-sos .ic { background: var(--danger-100); color: var(--danger-500); }
.settings-item.s-lang .ic { background: var(--med-100); color: var(--med-500); }
.settings-item.s-notif .ic { background: var(--primary-100); color: var(--primary-600); }
.settings-item.s-help .ic { background: #F0EBFF; color: #7B61FF; }
.settings-item .info { flex: 1; }
.settings-item .info .n { font-size: 15px; font-weight: 700; color: var(--ink-900); }
.settings-item .info .s { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.settings-item .arrow { color: var(--ink-300); font-size: 20px; }

.logout-btn {
  margin: 14px 20px 0;
  background: white;
  border: 2px solid var(--danger-100);
  color: var(--danger-500);
  border-radius: var(--r-md);
  padding: 14px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 40px);
}

/* SETTINGS - notif */
.notif-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 32px;
}
.notif-group {
  margin: 0 20px 16px;
  background: white;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.notif-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ink-100);
}
.notif-row:last-child { border: none; }
.notif-row .info { flex: 1; }
.notif-row .info .n { font-size: 15px; font-weight: 700; color: var(--ink-900); margin-bottom: 2px; }
.notif-row .info .s { font-size: 12px; color: var(--ink-500); }
.switch {
  width: 50px; height: 30px;
  background: var(--ink-200);
  border-radius: 15px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  border: none;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 24px; height: 24px;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.switch.on { background: var(--primary-500); }
.switch.on::after { transform: translateX(20px); }

.notif-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-300);
  margin: 14px 20px 8px;
}

/* HELP */
.help-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 32px;
}
.help-banner {
  margin: 0 20px 16px;
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  color: white;
  border-radius: var(--r-lg);
  padding: 22px;
  text-align: center;
}
.help-banner .em { font-size: 40px; margin-bottom: 8px; }
.help-banner h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}
.help-banner p { font-size: 13px; opacity: 0.9; line-height: 1.4; }
.faq-item {
  margin: 0 20px 10px;
  background: white;
  border-radius: var(--r-md);
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.faq-item .q {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.faq-item.open .q .arrow { transform: rotate(180deg); }
.faq-item .q .arrow { color: var(--ink-300); transition: transform 0.2s; }
.faq-item .a {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.5;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--ink-100);
  display: none;
}
.faq-item.open .a { display: block; }

.contact-help {
  margin: 16px 20px 0;
  background: white;
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.contact-help .row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-100);
}
.contact-help .row:last-child { border: none; }
.contact-help .ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--primary-600);
}
.contact-help .info { flex: 1; }
.contact-help .info .n { font-size: 14px; font-weight: 700; color: var(--ink-900); }
.contact-help .info .s { font-size: 12px; color: var(--ink-500); margin-top: 1px; }

/* FAMILY */
.fam-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 100px;
}
.fam-banner {
  margin: 0 20px 16px;
  background: white;
  border-radius: var(--r-lg);
  padding: 18px;
  border: 2px solid var(--primary-200);
  box-shadow: var(--shadow-sm);
}
.fam-banner .icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  background: var(--primary-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--primary-600);
  margin-bottom: 10px;
}
.fam-banner h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 6px;
}
.fam-banner p { color: var(--ink-500); font-size: 13px; line-height: 1.5; }
.fam-banner .control-line {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--ink-100);
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 700;
}
.fam-pref {
  margin: 0 20px 10px;
  background: white;
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.fam-pref .info { flex: 1; }
.fam-pref .info .n { font-size: 14px; font-weight: 700; color: var(--ink-900); margin-bottom: 2px; }
.fam-pref .info .s { font-size: 12px; color: var(--ink-500); line-height: 1.4; }
.fam-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900);
  margin: 14px 20px 10px;
}
.fam-add {
  margin: 14px 20px;
  background: white;
  border: 2px dashed var(--primary-200);
  border-radius: var(--r-md);
  padding: 16px;
  text-align: center;
  color: var(--primary-600);
  font-weight: 700;
  cursor: pointer;
}

/* ADD PROCHE */
.addproche-screen {
  height: 100%;
  background: var(--bg-soft);
  overflow-y: auto;
  padding-bottom: 100px;
}
.proche-illust {
  text-align: center;
  padding: 20px 24px 8px;
}
.proche-illust .em { font-size: 60px; margin-bottom: 10px; }
.proche-illust h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 6px;
}
.proche-illust p {
  font-size: 14px;
  color: var(--ink-500);
  line-height: 1.5;
}

/* EMPTY STATES */
.empty-screen {
  height: 100%;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  padding-bottom: 96px;
}
.empty-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}
.empty-content .big {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: var(--primary-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
  margin-bottom: 22px;
}
.empty-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.empty-content p {
  font-size: 15px;
  color: var(--ink-500);
  line-height: 1.55;
  max-width: 280px;
  margin-bottom: 24px;
}

/* ERROR STATES */
.error-screen {
  height: 100%;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  padding-bottom: 32px;
}
.error-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  gap: 18px;
}
.error-icon {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--danger-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
}
.error-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 6px;
}
.error-content p {
  font-size: 15px;
  color: var(--ink-500);
  line-height: 1.55;
  max-width: 260px;
}
.error-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 24px 24px;
}

/* ========================================
   TOAST inside phone
   ======================================== */
.phone-toast {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: var(--ink-900);
  color: white;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s;
  white-space: nowrap;
  max-width: 320px;
  opacity: 0;
  pointer-events: none;
}
.phone-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.phone-toast .ico {
  width: 18px; height: 18px;
  background: var(--success-500);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.phone-toast.warn .ico { background: var(--warn-500); }
.phone-toast.danger .ico { background: var(--danger-500); }

/* ========================================
   CALL OVERLAY
   ======================================== */
.call-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #1a4a3f 0%, #0f2e26 100%);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 80px 32px 60px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}
.call-overlay.show { opacity: 1; visibility: visible; }
.caller-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 70px;
  color: white;
  font-weight: 700;
  font-family: var(--font-display);
  box-shadow: 0 20px 60px rgba(34, 197, 94, 0.4);
  animation: caller-pulse 2s ease-in-out infinite;
}
@keyframes caller-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.end-call {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--danger-500);
  color: white;
  border: none;
  font-size: 30px;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(220, 38, 38, 0.45);
  transition: transform 0.15s;
  transform: rotate(135deg);
}
.end-call:active { transform: rotate(135deg) scale(0.92); }

/* ========================================
   MODAL — confirmation suppression
   ======================================== */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 45, 0.55);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-card {
  background: white;
  border-radius: 24px;
  padding: 28px 24px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.show .modal-card { transform: scale(1); }
.modal-icon {
  width: 80px; height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--danger-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.modal-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.modal-card p {
  font-size: 14px;
  color: var(--ink-500);
  line-height: 1.5;
  margin-bottom: 22px;
}
.modal-card .btn { font-size: 17px; }
.modal-card .btn:first-of-type { margin-bottom: 8px; }

