/*
 * MOBIKISI — Main Stylesheet
 * Imports the design system, then adds app-specific layout.
 * Copyright (c) 2025 MOA Digital Agency LLC
 */

@import url('design-system/tokens.css');
@import url('design-system/typography.css');
@import url('design-system/glassmorphism.css');
@import url('design-system/animations.css');
@import url('design-system/components.css');

/* ══ RESET ══════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
svg { display: inline-block; vertical-align: middle; }

/* ══ SCROLLBAR ══════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.28); }

/* ══ PAGE SYSTEM (SPA) ══════════════════════ */
body { min-height: 100vh; overflow-x: hidden; }

.page { display: none; min-height: 100vh; }
.page.active { display: block; animation: fade-in 200ms both; }

.view { display: none; }
.view.active { display: block; animation: fade-in 180ms both; }

/* ══ LANDING PAGE ════════════════════════════ */
#landing-page {
  min-height: 100vh;
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse at 8% 12%, rgba(200,220,255,0.75) 0%, transparent 50%),
    radial-gradient(ellipse at 92% 88%, rgba(255,200,210,0.65) 0%, transparent 50%),
    radial-gradient(ellipse at 55% 45%, rgba(230,240,255,0.45) 0%, transparent 65%),
    radial-gradient(ellipse at 85% 8%,  rgba(215,235,255,0.55) 0%, transparent 40%);
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

/* Landing nav */
.landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  justify-content: center;
  padding: 0.85rem 2rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.landing-logo img { height: 32px; }
.landing-logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.landing-nav-actions { display: flex; align-items: center; gap: var(--sp-3); }

/* Hero */
.landing-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 2rem 4rem;
  position: relative;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px 14px;
  border-radius: var(--r-full);
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--sp-5);
  animation: slide-down 400ms both;
}
.hero-label svg { width: 12px; height: 12px; }
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  max-width: 800px;
  margin-bottom: var(--sp-5);
  animation: slide-up 500ms 100ms both;
}
.hero-headline em {
  font-style: italic;
  color: var(--brand);
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: var(--sp-8);
  animation: slide-up 500ms 200ms both;
}
.hero-actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  justify-content: center;
  animation: slide-up 500ms 300ms both;
}
.hero-badge {
  margin-top: var(--sp-10);
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
  justify-content: center;
  animation: fade-in 600ms 600ms both;
}
.hero-badge-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.hero-badge-item svg { width: 14px; height: 14px; color: var(--success); }

/* Decorative orbs on hero */
.hero-orb-1 {
  position: absolute; top: 15%; left: 5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(200,16,46,0.12), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}
.hero-orb-2 {
  position: absolute; bottom: 20%; right: 5%;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(37,99,235,0.12), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  animation: float 8s ease-in-out infinite reverse;
}

/* Features section */
.landing-features {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Bandes de fond pleine largeur (alternance entre sections) ── */
.card-showcase, .how-it-works, .security-section { position: relative; }
.card-showcase::before, .how-it-works::before, .security-section::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
}
/* Bande blanche franche : la section "carte" et "comment ça marche" */
.card-showcase::before,
.how-it-works::before {
  background: #FFFFFF;
  box-shadow: 0 1px 0 rgba(17,24,39,0.04), 0 -1px 0 rgba(17,24,39,0.04);
}
/* Section "sécurité" : canvas aplat (PemaTrack, pas de dégradé) */
.security-section::before {
  background: var(--canvas);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-label {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--sp-3);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: var(--sp-10);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-5);
}
.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  border-radius: var(--r-xl);
  padding: var(--sp-8) var(--sp-6);
  transition: box-shadow var(--t-fast), border-color var(--t-fast);
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-200);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-5);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-icon-brand  { background: var(--brand-light); color: var(--brand); }
.feature-icon-accent { background: var(--accent-light); color: var(--accent); }
.feature-icon-success { background: var(--success-bg); color: var(--success); }
.feature-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
}
.feature-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Landing footer CTA */
.landing-cta {
  text-align: center;
  padding: 5rem 2rem;
}
.landing-footer {
  text-align: center;
  padding: var(--sp-6) 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Sélecteur de langue (nav) ──────────────── */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  overflow: hidden;
  background: var(--bg-elevated);
}
.lang-opt {
  border: none;
  background: transparent;
  padding: 5px 12px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}
.lang-opt:hover { color: var(--brand); }
.lang-opt.active { background: var(--brand); color: #fff; }

/* Sélecteur de langue (dropdown) — landing, dashboard, mobile */
.lang-switch {
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  background-color: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 30px 6px 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 9px center;
  transition: all var(--t-fast);
}
.lang-switch:hover, .lang-switch:focus { border-color: var(--brand); color: var(--brand); outline: none; }
.sidebar-footer .lang-switch { width: 100%; }

/* ── Hero : fond pleine largeur, contenu centré ── */
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}
.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: var(--sp-16);
  text-align: left;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.hero-split .hero-label { margin-top: 0; }
.hero-text { position: relative; z-index: 1; }
.hero-split .hero-headline,
.hero-split .hero-sub { max-width: none; }
.hero-split .hero-actions,
.hero-split .hero-badge { justify-content: flex-start; }
.hero-split .hero-headline em { display: inline; }

.hero-card-visual {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  animation: float 7s ease-in-out infinite;
}
.hero-card-visual img,
.hero-card-visual picture {
  width: 100%;
  max-width: 520px;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(31, 38, 135, 0.28));
}

/* ── Section "La carte de santé d'urgence" ──── */
.card-showcase {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.card-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: center;
}
.card-showcase-visual {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.card-face {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  transition: box-shadow var(--t-fast);
}
.card-face:hover { box-shadow: 0 16px 40px -8px rgba(94,7,21,0.22); }
.card-face:first-child { transform: rotate(-1.5deg); }
.card-face:last-child { transform: rotate(1.5deg); }
.card-showcase-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-6);
}
.card-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.card-bullets li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.5;
}
.card-bullets li svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
  flex-shrink: 0;
  margin-top: 1px;
}

@media (max-width: 880px) {
  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--sp-10);
  }
  .hero-split .hero-actions,
  .hero-split .hero-badge { justify-content: center; }
  /* Mobile : on masque la carte du hero (allègement visuel) */
  .hero-card-visual { display: none; }
  .card-showcase-grid { grid-template-columns: 1fr; gap: var(--sp-8); }
  .card-showcase-text { text-align: center; }
  .card-bullets li { text-align: left; }
}

/* ── Hero "wow" : mesh coloré, glow, chips, titre gradient ── */
.hero-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(40% 50% at 12% 20%, rgba(200,16,46,0.18), transparent 70%),
    radial-gradient(45% 55% at 88% 30%, rgba(37,99,235,0.16), transparent 70%),
    radial-gradient(50% 60% at 70% 85%, rgba(255,138,165,0.20), transparent 70%),
    radial-gradient(40% 50% at 25% 90%, rgba(99,102,241,0.14), transparent 70%);
}
.hero-orb-3 {
  position: absolute; top: 45%; left: 42%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,138,165,0.22), transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  animation: float 9s ease-in-out infinite;
}
.grad-text {
  font-style: normal;
  background: linear-gradient(100deg, var(--brand) 0%, #FF5C8A 45%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-headline { line-height: 1.04; }

/* Glow + chips flottants autour de la carte hero */
.hero-card-visual { position: relative; }
.hero-card-glow {
  position: absolute;
  inset: 8% 10%;
  z-index: 0;
  background: radial-gradient(circle at 50% 50%, rgba(200,16,46,0.28), rgba(37,99,235,0.18) 55%, transparent 72%);
  filter: blur(48px);
  border-radius: 50%;
  animation: pulse-glow 5s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { opacity: .75; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}
.hero-card-visual picture { position: relative; z-index: 1; }
.hero-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--r-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}
.hero-chip svg { width: 15px; height: 15px; }
.hero-chip.chip-1 { top: 6%;  left: -4%;  color: var(--brand);   animation: float 6s ease-in-out infinite; }
.hero-chip.chip-2 { top: 38%; right: -6%; color: var(--accent);  animation: float 7s ease-in-out infinite reverse; }
.hero-chip.chip-3 { bottom: 8%; left: 6%;  color: var(--success); animation: float 8s ease-in-out infinite; }

/* ── Carte recto/verso : flip 3D au clic ──────── */
.flip-card {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1011 / 638;
  perspective: 1400px;
  cursor: pointer;
  outline: none;
  margin: 0 auto;
}
.flip-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 6px; border-radius: var(--r-lg); }
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform var(--t-spring);
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-card-face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.flip-card-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flip-card-back { transform: rotateY(180deg); }
.flip-card:hover .flip-card-inner { box-shadow: none; }
.flip-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: var(--sp-5) auto 0;
  padding: 7px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.flip-hint:hover { color: var(--brand); border-color: var(--brand); }
.flip-hint svg { width: 16px; height: 16px; }
.card-showcase-visual { align-items: center; }

/* ── Footer élaboré (panneau sombre brandé) ──── */
.site-footer {
  margin-top: var(--sp-12);
  background: linear-gradient(160deg, #2A0710 0%, #5E0715 50%, #3A0A14 100%);
  color: rgba(255,255,255,0.78);
  padding: var(--sp-16) 2.5rem var(--sp-8);
}
.footer-main {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: var(--sp-10);
}
.footer-brand img { height: 34px; filter: brightness(0) invert(1); margin-bottom: var(--sp-4); }
.footer-tagline { font-size: 0.9rem; line-height: 1.7; color: rgba(255,255,255,0.68); max-width: 320px; }
.footer-badges { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-5); }
.footer-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-full);
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16);
  font-size: 0.76rem; font-weight: 700; color: #fff;
}
.footer-badge svg { width: 14px; height: 14px; }
.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 700; color: #fff;
  margin-bottom: var(--sp-4);
}
.footer-col a {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.72);
  font-size: 0.875rem;
  text-decoration: none;
  padding: 5px 0;
  transition: color var(--t-fast);
}
.footer-col a:hover { color: #fff; }
.footer-col a svg { width: 15px; height: 15px; opacity: .8; }
.footer-lang { display: inline-flex; margin-top: var(--sp-3); border: 1px solid rgba(255,255,255,0.22); border-radius: var(--r-full); overflow: hidden; }
.footer-lang .lang-opt { color: rgba(255,255,255,0.75); background: transparent; }
.footer-lang .lang-opt.active { background: #fff; color: var(--brand); }
.footer-bottom {
  max-width: 1100px;
  margin: var(--sp-10) auto 0;
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255,255,255,0.14);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--sp-3);
  font-size: 0.8rem; color: rgba(255,255,255,0.6);
}
.footer-bottom strong { color: rgba(255,255,255,0.85); font-weight: 700; }
.footer-bottom-left, .footer-bottom-right { display: inline-flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.footer-dot { opacity: .5; }
.footer-version { font-family: var(--font-mono); }

@media (max-width: 880px) {
  .hero-chip.chip-1 { left: 2%; }
  .hero-chip.chip-2 { right: 0; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .footer-main { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── Sécurité : 3 piliers développés + bandeau réassurance ── */
.security-head { text-align: center; max-width: 720px; margin: 0 auto var(--sp-10); }
.security-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-top: var(--sp-2);
}
.security-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  align-items: stretch;
}
.security-pillar {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  border-radius: var(--r-xl);
  padding: var(--sp-8) var(--sp-6) var(--sp-6);
  overflow: hidden;
  transition: box-shadow var(--t-fast), border-color var(--t-fast);
}
.security-pillar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--brand);
  opacity: 0.9;
}
.security-pillar-accent::before  { background: var(--accent); }
.security-pillar-success::before { background: var(--success); }
.security-pillar:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-200);
}
.security-pillar-icon {
  width: 58px; height: 58px;
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-5);
  background: var(--brand-light);
  color: var(--brand);
}
.security-pillar-accent  .security-pillar-icon { background: var(--accent-light); color: var(--accent); }
.security-pillar-success .security-pillar-icon { background: var(--success-bg);  color: var(--success); }
.security-pillar-icon svg { width: 27px; height: 27px; }
.security-pillar-title {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-3);
}
.security-pillar-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-5);
}
.security-pillar-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.security-pillar-list li {
  display: flex; align-items: flex-start; gap: var(--sp-2);
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.5;
}
.security-pillar-list svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--success);
}
.security-assurance {
  display: flex; align-items: center; gap: var(--sp-3);
  max-width: 760px;
  margin: var(--sp-8) auto 0;
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  box-shadow: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.55;
}
.security-assurance svg {
  width: 26px; height: 26px;
  flex-shrink: 0;
  color: var(--brand);
}
@media (max-width: 980px) {
  .security-pillars { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
}

/* ── CTA "Prêt à commencer" : bannière dégradée ── */
.landing-cta { padding: 5rem 2rem; }
.cta-banner {
  position: relative;
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: var(--r-xl);
  background: linear-gradient(120deg, var(--brand) 0%, #E11D48 38%, #7C3AED 100%);
  box-shadow: 0 30px 70px rgba(124, 58, 237, 0.30);
  padding: var(--sp-12) var(--sp-12);
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  align-items: center;
  gap: var(--sp-10);
  color: #fff;
}
.cta-orb { position: absolute; border-radius: 50%; filter: blur(50px); pointer-events: none; }
.cta-orb-a { width: 320px; height: 320px; background: rgba(255,255,255,0.22); top: -120px; right: 10%; }
.cta-orb-b { width: 260px; height: 260px; background: rgba(37,99,235,0.35); bottom: -120px; left: -40px; }
.cta-banner-text { position: relative; z-index: 1; }
.cta-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: var(--r-full);
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.28);
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: var(--sp-4);
}
.cta-eyebrow svg { width: 14px; height: 14px; }
.cta-banner-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.1;
  color: #fff; margin-bottom: var(--sp-3);
}
.cta-banner-text p { color: rgba(255,255,255,0.88); font-size: 1.02rem; line-height: 1.6; max-width: 460px; margin-bottom: var(--sp-6); }
.cta-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.btn-cta-light { background: #fff; color: var(--brand); box-shadow: var(--shadow-md); }
.btn-cta-light:hover { box-shadow: var(--shadow-lg); background: #fff; }
.btn-cta-ghost { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.40); }
.btn-cta-ghost:hover { background: rgba(255,255,255,0.22); }
.cta-banner-visual { position: relative; z-index: 1; display: flex; justify-content: center; }
.cta-banner-visual img {
  width: 100%; max-width: 340px; height: auto;
  border-radius: var(--r-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.30);
  transform: rotate(-4deg);
  transition: transform var(--t-slow);
}
.cta-banner-visual img:hover { transform: rotate(0deg) scale(1.03); }

@media (max-width: 820px) {
  .cta-banner { grid-template-columns: 1fr; text-align: center; padding: var(--sp-10) var(--sp-6); }
  .cta-actions { justify-content: center; }
  .cta-banner-text p { margin-left: auto; margin-right: auto; }
  .cta-banner-visual { order: -1; }
  .cta-banner-visual img { max-width: 260px; }
}

/* ── Mention "Made in DRC · by Congolese" ───── */
.made-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: var(--sp-5);
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.20);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.90);
}
.made-flag {
  position: relative;
  width: 24px; height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
  background:
    linear-gradient(45deg,
      transparent 40%, #FCD116 40%, #FCD116 45%,
      #CE1021 45%, #CE1021 55%,
      #FCD116 55%, #FCD116 60%, transparent 60%),
    #0085CA;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.30);
}
.made-flag::before {
  content: '★';
  position: absolute;
  top: -1px; left: 2px;
  font-size: 8px;
  line-height: 1;
  color: #FCD116;
}
.made-text { display: inline-flex; align-items: baseline; gap: 2px; }
.made-tm { font-size: 0.7em; opacity: 0.75; }

/* ── Badges de rôle manquants ───────────────── */
.role-doctor { background: var(--accent-light); color: var(--accent-600); border: 1px solid rgba(37,99,235,0.22); }
.role-staff  { background: #EEF2FF; color: #4338CA; border: 1px solid #C7D2FE; }

/* ── Salutation dashboard ───────────────────── */
.greeting-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  margin-bottom: var(--sp-5);
  border-radius: var(--r-lg);
  background:
    radial-gradient(60% 45% at 88% 8%, rgba(37,99,235,0.30) 0%, transparent 62%),
    radial-gradient(52% 40% at 6% 96%, rgba(37,99,235,0.14) 0%, transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 34px),
    linear-gradient(155deg, var(--brand-700) 0%, var(--brand-900) 55%, #3A0A14 100%);
  border: 1px solid rgba(255,255,255,0.12);
}
.greeting-avatar {
  width: 52px; height: 52px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.35);
  color: #fff;
  font-weight: 700; font-size: 1.1rem; flex-shrink: 0;
}
.greeting-hello { font-family: var(--font-display); font-size: 1.35rem; color: #fff; }
.greeting-sub { display: flex; align-items: center; gap: var(--sp-3); margin-top: 4px; flex-wrap: wrap; }
.greeting-affil { display: inline-flex; align-items: center; gap: 5px; font-size: 0.85rem; color: rgba(255,255,255,0.78); }
.greeting-affil svg { width: 14px; height: 14px; }

/* ── Dashboard patient : infos vitales & pills ── */
.vital-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--sp-3);
}
.vital-chip {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}
.vital-chip-brand { background: var(--brand-light); border-color: var(--brand-200); }
.vital-chip-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.vital-chip-value { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--text-primary); margin-top: 2px; }
.vital-chip-brand .vital-chip-value { color: var(--brand); }
.dash-sub-label { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); margin-bottom: var(--sp-2); }
.pill-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
/* .pill : définie une seule fois dans design-system/components.css (pastilles PemaTrack) */
.pill:not([class*="pill-"]) { background: #F4EEEF; color: #4A3B3E; border-color: #EBE1E2; }
.pill-ok { background: #ECFDF5; color: #047857; border-color: #A7F3D0; }

/* ── Item box (validations / invitations) ───── */
.item-box {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  background: var(--bg-elevated);
}
.item-header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.item-header h4 { display: inline-flex; align-items: center; gap: 6px; font-size: 0.95rem; }
.item-header h4 svg { width: 16px; height: 16px; color: var(--brand); }
.item-detail { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-secondary); margin: 2px 0; }
.item-detail svg { width: 14px; height: 14px; }

/* ── Vue API & Intégrations ─────────────────── */
.api-example {
  background: #1E1B2E;
  color: #E9E6F5;
  border-radius: var(--r-md);
  padding: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
}
.scope-list { display: flex; flex-direction: column; gap: var(--sp-2); max-height: 280px; overflow-y: auto; padding: var(--sp-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.scope-check { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: 0.85rem; cursor: pointer; padding: 5px; border-radius: var(--r-sm); }
.scope-check:hover { background: var(--bg-subtle); }
.scope-check input { margin-top: 3px; flex-shrink: 0; }
.scope-check code { background: var(--neutral-bg); padding: 2px 6px; border-radius: var(--r-xs); font-size: 0.78rem; color: var(--brand); flex-shrink: 0; }
.scope-check span { color: var(--text-secondary); }
.token-reveal {
  background: var(--bg-subtle);
  border: 1px dashed var(--brand-200);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  word-break: break-all;
}
.token-reveal code { font-family: var(--font-mono); font-size: 0.9rem; color: var(--brand-700); }

/* ── Dossier patient : grille de cartes PemaTrack (une carte par rubrique) ── */
/* Masonry (colonnes CSS) : chaque carte prend sa hauteur réelle, aucun trou sous les
   cartes courtes. break-inside:avoid empêche une carte d'être coupée entre deux colonnes. */
.record-grid { column-count: 3; column-gap: 16px; }
.record-grid > .card { break-inside: avoid; display: block; width: 100%; margin: 0 0 16px; }
@media (max-width: 1280px) { .record-grid { column-count: 2; } }
@media (max-width: 860px)  { .record-grid { column-count: 1; } }
.detail-card { min-width: 0; }
.detail-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.detail-card-head h3 { font-size: 1rem; font-weight: 700; color: var(--ink); margin: 0; }

/* Fil d'Ariane */
.breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 0.75rem; color: var(--muted); margin-bottom: 16px;
}
.breadcrumb button {
  border: none; background: none; padding: 0; cursor: pointer;
  font-family: var(--font-body); font-size: 0.75rem; color: var(--muted);
}
.breadcrumb button:hover { color: var(--brand); }
.breadcrumb svg { width: 14px; height: 14px; color: #B4A3A6; }
.breadcrumb-current { font-weight: 600; color: var(--ink); font-family: var(--font-mono); }

/* Carte d'en-tête du dossier */
.record-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.record-head-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.record-head-txt { min-width: 0; }
.record-head-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.record-head-line h1 { font-size: 1.5rem; font-weight: 800; line-height: 1.2; color: var(--ink); letter-spacing: -0.01em; }
.record-head-meta { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; margin-top: 4px; font-size: 0.875rem; color: var(--muted); }
.record-head-code { font-family: var(--font-mono); font-weight: 700; color: var(--brand); }

/* Bannière lecture seule */
.readonly-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--sp-5);
}
.readonly-banner svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ══ CONNEXION / INSCRIPTION (écran scindé PemaTrack, rouge Mobikisi) ═══ */
.auth-body { min-height: 100vh; background: var(--canvas); }
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-panel {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 56px;
  color: #fff;
  background: linear-gradient(180deg, #A50D26 0%, #6E0A1A 55%, #3A0711 100%);
}
.auth-panel-dots {
  position: absolute; inset: 0; opacity: .05; pointer-events: none;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px); background-size: 24px 24px;
}
.auth-panel-blob { position: absolute; border-radius: 999px; filter: blur(64px); pointer-events: none; }
.auth-panel-blob-a { width: 384px; height: 384px; right: -96px; bottom: -96px; background: rgba(229,51,79,0.25); }
.auth-panel-blob-b { width: 288px; height: 288px; left: -40px; top: -64px; background: rgba(255,255,255,0.06); }
.auth-brand { position: relative; display: flex; align-items: center; gap: 14px; }
.auth-brand img { height: 36px; filter: brightness(0) invert(1); }
.auth-brand-sub { font-size: .875rem; color: rgba(255,255,255,0.6); border-left: 1px solid rgba(255,255,255,0.2); padding-left: 14px; }
.auth-hero { position: relative; max-width: 32rem; }
.auth-kicker {
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
  color: #FDA4AF; margin-bottom: 12px;
}
.auth-title { font-size: 2.6rem; font-weight: 800; line-height: 1.1; margin-bottom: 20px; letter-spacing: -0.01em; }
.auth-accent { color: #FDA4AF; }
.auth-desc { color: rgba(255,255,255,0.7); line-height: 1.65; margin-bottom: 32px; font-size: 1rem; }
.auth-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.auth-feature { border-radius: 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10); padding: 14px; }
.auth-feature-ico { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; margin-bottom: 8px; }
.auth-feature-ico svg { width: 16px; height: 16px; }
.auth-feature-ico-a { background: rgba(229,51,79,0.28); color: #FECDD3; }
.auth-feature-ico-b { background: rgba(37,99,235,0.28); color: #BFDBFE; }
.auth-feature-ico-c { background: rgba(245,158,11,0.25); color: #FCD34D; }
.auth-feature-title { font-size: .875rem; font-weight: 600; }
.auth-feature-desc { font-size: .6875rem; color: rgba(255,255,255,0.55); margin-top: 4px; line-height: 1.4; }
.auth-panel-foot { position: relative; display: flex; align-items: center; justify-content: space-between; font-size: .75rem; color: rgba(255,255,255,0.6); }
.auth-panel-foot > span { display: inline-flex; align-items: center; gap: 8px; }
.auth-panel-foot svg { width: 16px; height: 16px; color: #FDA4AF; }
.auth-moa {
  width: 20px; height: 20px; border-radius: 4px; background: #fff; color: var(--brand-700);
  display: grid; place-items: center; font-size: .6875rem; font-weight: 900;
}

.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--canvas); }
.auth-form-col { width: 100%; max-width: 24rem; }
.auth-mobile-brand { display: none; margin-bottom: 32px; }
.auth-mobile-brand img { height: 32px; }
.auth-lock {
  width: 48px; height: 48px; border-radius: 999px; margin-bottom: 20px;
  background: var(--brand-50); border: 1px solid var(--brand-100);
  display: grid; place-items: center; color: var(--brand);
}
.auth-lock svg { width: 24px; height: 24px; }
.auth-h1 { font-size: 1.5rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.auth-sub { font-size: .875rem; color: var(--muted); margin-bottom: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field-req::after { content: " *"; color: var(--danger); }
.input-pad-right { padding-right: 40px !important; }
.input-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: none; border-radius: 6px; background: transparent;
  color: #94A3B8; cursor: pointer; display: grid; place-items: center;
}
.input-eye:hover { color: var(--ink); background: var(--canvas); }
.input-eye svg { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.auth-form .error-message:empty { display: none; }
.auth-terms { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 28px; font-size: .75rem; color: var(--muted); text-align: center; }
.auth-terms svg { width: 14px; height: 14px; color: #059669; flex-shrink: 0; }
.auth-version { margin-top: 16px; font-size: .6875rem; color: #A8989B; text-align: center; }

.demo-accounts {
  margin-top: 16px; padding: 8px; border-radius: .875rem;
  background: #fff; border: 1px solid var(--line);
}
.demo-accounts-title { font-size: .6875rem; font-weight: 700; color: var(--muted); padding: 6px 8px 8px; }
.demo-account-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 8px; border: none; border-radius: 8px; background: transparent;
  cursor: pointer; text-align: left; font-family: var(--font-body); font-size: .8125rem;
}
.demo-account-btn:hover { background: var(--row-hover); }
.demo-account-email { color: var(--ink); font-weight: 500; }

@media (max-width: 1024px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-panel { display: none; }
  .auth-mobile-brand { display: inline-block; }
  .auth-main { padding: 24px; }
}

/* ══ APP LAYOUT (anatomie PemaTrack, rouge Mobikisi) ═══════════ */
#dashboard-page {
  display: none;
  min-height: 100vh;
  background: var(--canvas);
}
#dashboard-page.active { display: flex; }

/* Sidebar : coque sombre (sidebar-bg PemaTrack), degrade marque */
.app-sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  background: linear-gradient(180deg, #A50D26 0%, #6E0A1A 55%, #3A0711 100%);
  display: flex;
  flex-direction: column;
  z-index: var(--z-sidebar);
  overflow: hidden;
}
.sidebar-logo {
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  flex-shrink: 0;
}
.sidebar-logo img { height: 26px; filter: brightness(0) invert(1); }
.sidebar-logo-sub {
  font-size: 0.6875rem;
  line-height: 1.2;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  display: block;
}
.sidebar-nav {
  flex: 1;
  padding: 8px 8px 24px;
  overflow-y: auto;
}
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
  flex-shrink: 0;
}
/* "Édité par" (anatomie PemaTrack) */
.sidebar-partner-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin: 0 4px 8px;
}
.sidebar-partner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  margin-bottom: 12px;
}
.sidebar-partner-mark {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--brand-700);
  display: grid; place-items: center;
  font-size: 0.6875rem; font-weight: 900;
}
.sidebar-partner-text { font-size: 0.75rem; font-weight: 600; line-height: 1.2; color: rgba(255,255,255,0.85); }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 0;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.sidebar-user .avatar {
  width: 32px; height: 32px; font-size: 0.75rem;
  background: var(--brand-bright); color: #fff;
}
.sidebar-user-info { flex: 1; min-width: 0; line-height: 1.25; }
.sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role { font-size: 0.6875rem; color: rgba(255,255,255,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout {
  margin-left: auto;
  width: 30px; height: 30px; flex-shrink: 0;
  display: grid; place-items: center;
  border: none; border-radius: 6px;
  background: transparent; color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.sidebar-logout:hover { background: rgba(255,255,255,0.10); color: #fff; }
.sidebar-logout svg { width: 16px; height: 16px; }

/* Main content */
.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.main-content {
  padding: 24px;
  width: 100%;
  flex: 1;
}

/* En-tête de page PemaTrack : titre 18px gras + sous-titre gris, actions à droite */
.view-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.view-header > :last-child:not(:first-child) { margin-left: auto; }
.view-header h1 {
  font-size: 1.125rem;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
}
.view-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
}
.view-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 1px;
}
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

/* Cards grid (patients) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-4);
}

/* Two column dashboard */
.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
  margin-top: var(--sp-5);
}
@media (max-width: 900px) {
  .dashboard-row { grid-template-columns: 1fr; }
}

/* Patient detail */
.patient-detail-container {
  display: grid;
  gap: var(--sp-5);
}
.patient-detail-header-card {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex-wrap: wrap;
}
.patient-detail-actions { margin-left: auto; display: flex; gap: var(--sp-3); }

/* ══ DASHBOARD ENRICHI ═══════════════════════ */
.stats-grid-6 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.dashboard-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-5);
  margin-bottom: var(--sp-5);
}
@media (max-width: 1100px) {
  .dashboard-row-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .dashboard-row-3 { grid-template-columns: 1fr; }
}

/* ── Dashboard refondu : tuiles ajustées, max 4 colonnes ── */
.dash-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: .95rem; font-weight: 700; color: var(--text-primary);
  margin: 0 0 var(--sp-3);
}
.dash-section-title svg { width: 17px; height: 17px; color: var(--brand); }
/* Badge de périmètre des statistiques (rôle) */
.stats-scope {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(200,16,46,0.08); color: var(--brand);
  border: 1px solid rgba(200,16,46,0.16); border-radius: 999px;
  padding: 6px 14px; font-size: .8rem; font-weight: 600; margin-bottom: var(--sp-5);
}
.stats-scope svg { width: 15px; height: 15px; }
.dash-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Pile verticale du tableau de bord (space-y-5 PemaTrack) */
.dash-stack { display: flex; flex-direction: column; gap: 20px; }
.dash-row-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.dash-span-2 { grid-column: span 2; }
@media (max-width: 1200px) { .dash-row-3 { grid-template-columns: 1fr; } .dash-span-2 { grid-column: auto; } }

/* Lien d'en-tête de carte (« Voir tout » PemaTrack) */
.card-link {
  border: none; background: none; padding: 0; cursor: pointer;
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; color: var(--brand);
}
.card-link:hover { color: var(--brand-700); }

/* Élément de liste PemaTrack : pastille ronde teintée + titre + sous-titre */
.list-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 0;
  border: none; background: none; text-align: left;
  font-family: var(--font-body);
  cursor: pointer;
}
.list-item + .list-item { border-top: 1px solid var(--row-line); }
.list-item-static { cursor: default; }
.list-item:not(.list-item-static):hover .list-title { color: var(--brand); }
.list-ico {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 999px;
  display: grid; place-items: center;
}
.list-ico svg { width: 17px; height: 17px; }
.list-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.list-title { font-size: 0.875rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.list-sub { font-size: 0.6875rem; color: var(--muted); margin-top: 1px; line-height: 1.35; }
.btn-count {
  margin-left: 2px; padding: 0 6px; border-radius: 999px;
  background: rgba(255,255,255,0.25); font-size: 0.6875rem; font-weight: 700;
}

/* Tuile KPI (anatomie PemaTrack : card p-4, pastille 44px ronde, libellé MAJ, valeur 24px) */
.dash-stat {
  background: #fff;
  border: 1px solid var(--line); border-radius: 0.875rem;
  box-shadow: 0 1px 2px 0 rgba(94,7,21,0.05), 0 1px 3px 0 rgba(94,7,21,0.04);
  padding: 16px; transition: box-shadow .18s ease, border-color .18s ease;
}
.dash-stat:hover { box-shadow: 0 8px 24px -6px rgba(94,7,21,0.14); border-color: var(--brand-200); }
.dash-stat-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.dash-stat-ico { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; }
.dash-stat-ico svg { width: 20px; height: 20px; }
.dash-stat-lbl { font-size: 0.6875rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .025em; line-height: 1.25; }
.dash-stat-val { font-size: 1.5rem; font-weight: 800; line-height: 1.3; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 4px; }
.dash-stat-sub { font-size: 0.6875rem; color: var(--muted); }

/* Tuile action rapide */
.dash-action {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-lg, 16px); padding: var(--sp-4);
  cursor: pointer; text-align: left; transition: box-shadow var(--t-fast), border-color var(--t-fast);
  font-family: var(--font-body); width: 100%;
}
.dash-action:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.dash-action.primary { background: linear-gradient(135deg, var(--brand), #9B0D22); border-color: transparent; }
.dash-action.primary .dash-action-ico { background: rgba(255,255,255,.22); color: #fff; }
.dash-action.primary .dash-action-lbl { color: #fff; }
.dash-action.primary .dash-action-sub { color: rgba(255,255,255,.82); }
.dash-action-ico { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.dash-action-ico svg { width: 20px; height: 20px; }
.dash-action-txt { min-width: 0; }
.dash-action-lbl { font-size: .9rem; font-weight: 700; color: var(--text-primary); }
.dash-action-sub { font-size: .73rem; color: var(--text-muted); margin-top: 1px; }
.dash-action-badge { margin-left: auto; background: var(--warning); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; flex-shrink: 0; }

/* Aperçus : activité (large) + colonne latérale (genre + alertes) */
.dash-insights { display: grid; grid-template-columns: 1.7fr 1fr; gap: var(--sp-5); align-items: start; }
.dash-insights-side { display: flex; flex-direction: column; gap: var(--sp-5); }
@media (max-width: 980px) { .dash-insights { grid-template-columns: 1fr; } }

/* Activity timeline */
.activity-timeline { display: flex; flex-direction: column; gap: 0; }
.activity-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}
.activity-timeline-item:last-child { border-bottom: none; }
.timeline-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  margin-top: 5px;
}
.timeline-dot-accent { background: var(--accent); }
.timeline-dot-success { background: var(--success); }
.timeline-dot-neutral { background: var(--text-muted); }
.timeline-content { flex: 1; min-width: 0; }
.timeline-action { font-size: .875rem; font-weight: 500; color: var(--text-primary); }
.timeline-meta { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.timeline-time { font-size: .72rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

/* Quick actions grid */
.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background-color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}
.quick-action-btn:hover {
  border-color: var(--brand-200);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.quick-action-btn svg { width: 20px; height: 20px; }
.quick-action-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
}

/* Alert items */
.alert-row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-2);
  font-size: .825rem;
}
.alert-row:last-child { margin-bottom: 0; }
.alert-row-warning { background: var(--warning-bg); color: var(--warning); }
.alert-row-danger  { background: var(--danger-bg);  color: var(--danger); }
.alert-row-success { background: var(--success-bg); color: var(--success); }
.alert-row svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Donut SVG */
.donut-wrapper { display: flex; flex-direction: column; align-items: center; gap: var(--sp-4); }
.donut-legend { width: 100%; display: flex; flex-direction: column; gap: var(--sp-2); }
.donut-legend-item {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: .8rem; color: var(--text-secondary);
}
.donut-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Recent patients mini */
.recent-patient-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--t-fast);
}
.recent-patient-item:last-child { border-bottom: none; }
.recent-patient-item:hover { opacity: .75; }
.recent-patient-name { font-size: .875rem; font-weight: 500; color: var(--text-primary); }
.recent-patient-meta { font-size: .75rem; color: var(--text-muted); }

/* ══ PROFILE RICHE ════════════════════════════ */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--sp-5);
}
@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
}
.permission-list { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-4); }
.permission-item {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: .825rem; color: var(--text-secondary);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.permission-item:last-child { border-bottom: none; }
.permission-item svg { width: 14px; height: 14px; color: var(--success); flex-shrink: 0; }
.security-status { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-3); }
.security-status-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .85rem; padding: var(--sp-2) 0; border-bottom: 1px solid var(--border-subtle);
}
.security-status-row:last-child { border-bottom: none; }

/* ══ NOUVELLES VUES ═══════════════════════════ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--sp-5);
}

.settings-grid > .card { min-width: 0; }
@media (max-width: 700px) { .settings-grid { grid-template-columns: 1fr; } }

.security-check-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: .875rem;
}
.security-check-row:last-child { border-bottom: none; }
.check-ok   { color: var(--success); display: flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; }
.check-warn { color: var(--warning); display: flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; }
.check-ok svg, .check-warn svg { width: 14px; height: 14px; }

.db-stat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); margin-top: var(--sp-4);
}
.db-stat-item {
  padding: var(--sp-4); border-radius: var(--r-md);
  background: rgba(255,255,255,.55); border: 1px solid var(--border-subtle);
  text-align: center;
}
.db-stat-value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; color: var(--text-primary); }
.db-stat-label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }

.how-it-works { padding: 5rem 2rem; max-width: 1000px; margin: 0 auto; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
@media (max-width: 700px) { .steps-grid { grid-template-columns: 1fr; } }
.step-item { text-align: center; }
.step-number {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand);
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-4);
}
.step-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin-bottom: var(--sp-2); }
.step-desc { font-size: .875rem; color: var(--text-secondary); line-height: 1.6; }
.step-connector { display: none; }

.security-section { padding: 4rem 2rem; max-width: 1140px; margin: 0 auto; }

/* ══ PATIENTS — anatomie PemaTrack ══════════ */
/* Carte de filtres : libellé au-dessus de chaque champ */
.filter-card {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(140px, 1fr));
  gap: 12px 16px;
  align-items: end;
  margin-bottom: 20px;
}
.filter-field .field-label { margin-bottom: .35rem; }
.filter-field .input-field { min-height: 44px; }
.input-ico { position: relative; }
.input-ico > svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #94A3B8; pointer-events: none;
}
.input-ico > .input-field { padding-left: 38px; }
@media (max-width: 1100px) { .filter-card { grid-template-columns: 1fr 1fr; } .filter-field-wide { grid-column: 1 / -1; } }
@media (max-width: 560px)  { .filter-card { grid-template-columns: 1fr; } }

/* Mini-indicateurs (pastille ronde à gauche, libellé MAJ + valeur) */
.mini-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1100px) { .mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mini-kpi {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: .875rem;
  box-shadow: 0 1px 2px 0 rgba(94,7,21,0.05), 0 1px 3px 0 rgba(94,7,21,0.04);
  padding: 16px;
}
.mini-kpi-ico { width: 44px; height: 44px; flex-shrink: 0; border-radius: 999px; display: grid; place-items: center; }
.mini-kpi-ico svg { width: 20px; height: 20px; }
.mini-kpi-lbl { font-size: .6875rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .025em; }
.mini-kpi-val { font-size: 1.5rem; font-weight: 800; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; }

.view-toggle {
  display: inline-flex;
  background: rgba(0,0,0,0.04);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.view-toggle button {
  width: 34px; height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--t-fast);
}
.view-toggle button svg { width: 16px; height: 16px; }
.view-toggle button:hover { color: var(--text-primary); }
.view-toggle button.active {
  background: #fff;
  color: var(--brand);
  box-shadow: var(--shadow-xs);
}

/* Liste patients : carte PemaTrack, en-tête puis tableau collé aux bords */
.patients-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .875rem;
  box-shadow: 0 1px 2px 0 rgba(94,7,21,0.05), 0 1px 3px 0 rgba(94,7,21,0.04);
  overflow-x: auto;
}
.patients-table-wrap .data-table { display: table; }
.patients-table-wrap > .data-table { width: 100%; }
.table-scroll { overflow-x: auto; }
.table-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 16px 12px;
}
.table-card-head h3 { font-size: 1rem; font-weight: 700; color: var(--ink); margin: 0; }
.count-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--head-bg); border: 1px solid var(--line);
  font-size: .6875rem; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.count-chip svg { width: 12px; height: 12px; }
.cell-name { font-weight: 600; color: var(--ink); }
.cell-code { font-family: var(--font-mono); font-size: .6875rem; color: var(--muted); margin-top: 1px; }
.patient-row-actions { display: flex; gap: 2px; justify-content: flex-end; }

/* ══ DOSSIER PATIENT — ONGLETS SOULIGNÉS (.tabs PemaTrack) ════ */
.record-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.record-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.2rem;
  margin: 0 0.8rem -1px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.record-tab:first-child { margin-left: 0; }
.record-tab svg { width: 15px; height: 15px; }
.record-tab:hover { color: var(--ink); }
.record-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* Sections cliniques : grille 2 colonnes */
/* Sections cliniques : masonry 2 colonnes (même principe que la fiche Profil) */
#clinical-sections { column-count: 2; column-gap: 16px; margin-bottom: 16px; }
#clinical-sections > .card { break-inside: avoid; display: block; width: 100%; margin: 0 0 16px; min-width: 0; }
@media (max-width: 1000px) { #clinical-sections { column-count: 1; } }
.patient-detail-container { display: block; }
.patient-detail-container > .card { margin-bottom: var(--sp-5); }
/* Le bloc Documents est plein largeur et clairement séparé */
.patient-detail-container > .card[data-tab="documents"] { margin-top: var(--sp-2); }
.section-items { display: flex; flex-direction: column; gap: var(--sp-3); }

/* ══ FORMULAIRES 2 COLONNES ══════════════════ */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3) var(--sp-4);
}
.form-grid-2 .form-group { margin-bottom: 0; }
.form-grid-2 textarea { min-height: 60px; }
@media (max-width: 560px) { .form-grid-2 { grid-template-columns: 1fr; } }
.form-section-label {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--sp-2);
}
.form-section-label:first-child { border-top: none; padding-top: 0; margin-top: 0; }

/* Modale élargie quand elle contient un formulaire 2 colonnes */
.modal-glass:has(.form-grid-2) { max-width: 720px; }

/* ══ PIÈCES JOINTES (fichiers chiffrés) ══════ */
.attach-list {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.attach-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.attach-label svg { width: 12px; height: 12px; }
.attach-chip {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  font-size: 0.8rem;
}
.attach-chip > i { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.attach-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.attach-size { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; }
.attach-act {
  width: 26px; height: 26px;
  border: none; background: transparent; cursor: pointer;
  border-radius: var(--r-xs); color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--t-fast); flex-shrink: 0;
}
.attach-act svg { width: 14px; height: 14px; }
.attach-act:hover { background: rgba(0,0,0,0.06); color: var(--text-primary); }
.attach-del:hover { background: var(--danger-bg); color: var(--danger); }

/* ══ PHOTO PATIENT ═══════════════════════════ */
.patient-photo-holder {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
}
/* Vignette du dossier (tuile dégradée PemaTrack, 56px) */
.patient-photo-avatar {
  width: 56px; height: 56px;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--brand-bright), #7A0A1C);
  box-shadow: 0 4px 12px rgba(200,16,46,0.30);
  display: grid; place-items: center;
  font-size: 1.15rem; font-weight: 800; color: #fff;
  overflow: hidden; flex-shrink: 0;
}
.patient-photo-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ══ LOGO ENTÊTE DES PRESCRIPTIONS (Paramètres) ══════════════ */
.letterhead-logo-preview {
  width: 84px; height: 84px;
  border-radius: var(--r-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); overflow: hidden; flex-shrink: 0;
}
.letterhead-logo-preview img { width: 100%; height: 100%; object-fit: contain; }

/* ══ CHRONOLOGIE / TIMELINE ══════════════════ */
.timeline-track {
  position: relative;
  padding-left: var(--sp-6);
}
.timeline-track::before {
  content: '';
  position: absolute;
  left: 15px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--brand-light), var(--border));
}
.timeline-event {
  position: relative;
  display: flex;
  gap: var(--sp-4);
  padding-bottom: var(--sp-5);
}
.timeline-event:last-child { padding-bottom: 0; }
.timeline-event-dot {
  position: absolute;
  left: -28px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}
.timeline-event-dot svg { width: 15px; height: 15px; }
.timeline-event-body {
  flex: 1;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
}
.timeline-event-head {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-bottom: 2px;
}
.timeline-event-date { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.timeline-event-label { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.timeline-event-detail { font-size: 0.82rem; color: var(--text-secondary); margin-top: 2px; }

/* ══ PARTAGE D'ACCÈS — onglets ═══════════════ */
.share-tabs {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  background: rgba(0,0,0,0.04);
  padding: 4px;
  border-radius: var(--r-md);
}
.share-tabs button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.share-tabs button svg { width: 15px; height: 15px; }
.share-tabs button.active {
  background: #fff;
  color: var(--brand);
  box-shadow: var(--shadow-xs);
  font-weight: 600;
}

/* ══ TOPBAR (buildTopbar PemaTrack) ═══════════════════════════ */
.app-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: var(--z-navbar);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.topbar-burger {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-left: -8px;
  border: none; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.topbar-burger:hover { background: var(--row-hover); color: var(--ink); }
.topbar-burger svg { width: 20px; height: 20px; }
.topbar-search { flex: 1; display: flex; justify-content: flex-start; min-width: 0; }
.topbar-search-wrap {
  display: flex; align-items: center; gap: 8px;
  width: 100%; max-width: 576px; height: 40px;
  padding: 0 12px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: text;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.topbar-search-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(200,16,46,0.15);
}
.topbar-search-wrap svg { width: 16px; height: 16px; color: #94A3B8; flex-shrink: 0; }
.topbar-search-wrap input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-family: var(--font-body); font-size: 0.875rem; color: var(--ink);
}
.topbar-search-wrap input::placeholder { color: #94A3B8; }
.topbar-search-wrap input::-webkit-search-cancel-button { -webkit-appearance: none; }
.topbar-search-kbd {
  flex-shrink: 0; font-family: var(--font-mono); font-size: 0.6875rem; color: #94A3B8;
  border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; background: #fff;
}
.topbar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: auto; }
.topbar-divider { width: 1px; height: 28px; background: var(--line); margin: 0 4px; }
/* Sélecteur de langue segmenté (lang-switch PemaTrack) */
.lang-seg {
  display: inline-flex; overflow: hidden;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.lang-seg .lang-opt {
  padding: 5px 9px; border: none; background: transparent; cursor: pointer;
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; line-height: 1;
  letter-spacing: 0; color: var(--muted);
  transition: background-color .15s ease, color .15s ease;
}
.lang-seg .lang-opt:hover { background: var(--row-hover); color: var(--ink); }
.lang-seg .lang-opt.active { background: var(--brand); color: #fff; }
.topbar-user { display: flex; align-items: center; gap: 8px; padding-left: 4px; }
.topbar-avatar {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 999px;
  background: var(--shell-950); color: #fff;
  display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 700;
}
.topbar-user-info { line-height: 1.25; padding-right: 4px; }
.topbar-user-name { font-size: 0.875rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.topbar-user-role { font-size: 0.6875rem; font-weight: 500; color: var(--brand); white-space: nowrap; }

/* Barre supérieure mobile + backdrop (cachés en desktop) */
.sidebar-backdrop { display: none; }

@media (max-width: 768px) {
  /* Sidebar → tiroir coulissant */
  .app-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform var(--t-base);
    z-index: 210;
  }
  .app-sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,0.18); }
  .sidebar-backdrop {
    position: fixed; inset: 0;
    background: rgba(17,24,39,0.45);
    z-index: 200;
  }
  .sidebar-backdrop.show { display: block; }

  /* Barre supérieure mobile (PemaTrack) : burger + recherche compacte + langue + avatar */
  .app-topbar { padding: 0 16px; gap: 8px; }
  .topbar-burger { display: inline-flex; }
  .topbar-search { justify-content: center; }
  .topbar-search-kbd, .topbar-user-info, .topbar-divider { display: none; }
  .topbar-search-wrap { padding: 0 10px; }

  .app-main { width: 100%; }
  .main-content { padding: 16px; }
  /* En-tête PemaTrack mobile : titre + sous-titre, puis actions en ligne (jamais pleine largeur) */
  .view-header > :last-child:not(:first-child) { margin-left: 0; }
  .landing-nav { padding: 0.75rem 1rem; }
  /* Sur mobile : on masque les ancres, on garde logo + langue + connexion */
  .landing-nav-actions .btn-ghost { display: none; }
  .landing-nav-actions { gap: var(--sp-2); }
  .landing-hero { padding-top: 6rem; }

  /* Dossier patient : les onglets défilent horizontalement proprement */
  .record-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .record-tabs .record-tab { flex: 0 0 auto; }
}

/* ── Calendrier de réservation RDV (jour → créneau) ── */
.appt-cal-wrap { display: flex; gap: var(--sp-5); align-items: flex-start; }
.appt-cal-grid-col { flex: 0 0 auto; }
.appt-cal-header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.appt-cal-month-label { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); text-transform: capitalize; }
.appt-cal-widget { width: 280px; }
.appt-cal-dow-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.appt-cal-dow { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); text-align: center; }
.appt-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.appt-cal-cell { aspect-ratio: 1; }
.appt-cal-cell-blank { visibility: hidden; }
.appt-cal-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 100%; height: 100%; border: 1px solid transparent; border-radius: var(--r-sm);
  background: var(--bg-subtle); cursor: pointer; font-family: inherit; padding: 0;
}
.appt-cal-day-num { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.appt-cal-day-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.appt-cal-day-has-slots:hover:not(.appt-cal-day-selected) { border-color: var(--brand-200); background: var(--brand-light); }
.appt-cal-day-today .appt-cal-day-num { color: var(--brand); }
.appt-cal-day-selected { background: var(--brand); border-color: var(--brand); }
.appt-cal-day-selected .appt-cal-day-num { color: #fff; }
.appt-cal-day-selected .appt-cal-day-dot { background: #fff; }
.appt-cal-day-disabled { cursor: not-allowed; opacity: 0.35; }
.appt-cal-day-disabled .appt-cal-day-dot { display: none; }
.appt-cal-slots { flex: 1 1 220px; min-width: 200px; border-left: 1px solid var(--border); padding-left: var(--sp-5); }
.appt-cal-slots h4 { font-size: 0.9rem; margin-bottom: var(--sp-2); color: var(--text-primary); }
.appt-cal-hint { color: var(--text-secondary); font-size: 0.875rem; }
.modal-glass:has(.appt-cal-wrap) { max-width: 620px; }

/* ── Suivi médical : sous-groupes par épisode À L'INTÉRIEUR d'une section (Traitements,
   Biologie, Imagerie restent 3 sections distinctes — seul leur contenu est organisé par
   épisode, cf. retour utilisateur explicite sur la version précédente qui les fusionnait). ── */
.section-items-grouped { display: flex; flex-direction: column; gap: var(--sp-4); }
.suivi-episode-group + .suivi-episode-group { border-top: 1px solid var(--border-subtle); padding-top: var(--sp-4); }
.suivi-episode-group-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: var(--sp-2); }
.suivi-episode-group-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .02em; }
.suivi-episode-group-label svg { width: 14px; height: 14px; color: var(--brand); }
.suivi-episode-group-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.suivi-episode-group-actions .btn-icon { width: 28px; height: 28px; }
.suivi-episode-group-items { display: flex; flex-direction: column; gap: var(--sp-2); }

/* ── Suivi médical : cartes conteneur (bons de prescription/labo/imagerie) ── */
.suivi-container-card { border: 1px solid var(--border-subtle); border-radius: var(--r-md); padding: var(--sp-3); margin-bottom: var(--sp-3); }
.suivi-container-card.suivi-container-orphan { opacity: .85; }
.suivi-container-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: var(--sp-2); }
.suivi-container-label { font-weight: 600; font-size: .85rem; }
.suivi-container-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.suivi-container-actions .btn-icon { width: 28px; height: 28px; }
.suivi-container-items { display: flex; flex-direction: column; gap: var(--sp-2); }
.badge-pending { background: color-mix(in srgb, #D97706 15%, transparent); color: #D97706; }

/* ── Tables → cartes empilées sur petit écran (liste patients, etc.) ── */
@media (max-width: 640px) {
  .patients-table-wrap { overflow-x: visible; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody { display: block; width: 100%; }
  .data-table tr {
    display: block; border: 1px solid var(--border-subtle); border-radius: 14px;
    background: var(--bg-subtle); margin-bottom: var(--sp-3); padding: 12px 14px;
  }
  .data-table td {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 5px 0; border: none; text-align: right;
  }
  .data-table td::before {
    content: attr(data-label); font-size: .7rem; font-weight: 700; text-align: left;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em;
  }
  .data-table td.td-patient { padding: 0 0 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border-subtle); }
  .data-table td.td-patient::before,
  .data-table td.td-actions::before { content: none; }
  .data-table td.td-actions { justify-content: flex-end; padding-top: 10px; }

  /* Modals : feuille pleine largeur, confortable au pouce */
  .modal { align-items: flex-end; }
  .modal-glass { width: 100% !important; max-width: 100% !important; max-height: 92vh;
                 border-radius: 20px 20px 0 0; margin: 0; }

  /* En-têtes de cartes : titre + bouton sur deux lignes si serré */
  .card-header { flex-wrap: wrap; gap: var(--sp-2); }

  /* Calendrier RDV : calendrier + créneaux empilés, plein largeur, pouce confortable */
  .appt-cal-wrap { flex-direction: column; }
  .appt-cal-grid-col { width: 100%; }
  .appt-cal-widget { width: 100%; }
  .appt-cal-cell { aspect-ratio: auto; height: 40px; }
  .appt-cal-slots { border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: var(--sp-4); margin-top: var(--sp-2); width: 100%; }

  /* Suivi médical : en-tête de sous-groupe empilé (libellé au-dessus des actions) */
  .suivi-episode-group-header { flex-direction: column; align-items: flex-start; }
}

/* ══ PARAMÈTRES (anatomie PemaTrack : menu Sections à gauche, cartes à droite) ══ */
.settings-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.settings-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.settings-nav-card { padding: 16px; }
.settings-nav-label {
  font-size: .6875rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); margin: 0 4px 8px;
}
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: .55rem .75rem;
  border: 1px solid transparent; border-radius: .625rem; background: transparent;
  font-family: var(--font-body); font-size: .875rem; font-weight: 500; color: #4A3B3E;
  text-align: left; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.settings-nav-item svg { width: 17px; height: 17px; color: var(--muted); flex-shrink: 0; }
.settings-nav-item:hover { background: var(--row-hover); color: var(--ink); }
.settings-nav-item.active { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); font-weight: 600; }
.settings-nav-item.active svg { color: var(--brand); }
.settings-about-txt { font-size: .8125rem; color: var(--muted); margin-top: 10px; }
.settings-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.settings-card { scroll-margin-top: 84px; }
@media (max-width: 1100px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-side { position: static; }
  .settings-about { display: none; }
  .settings-nav { flex-direction: row; overflow-x: auto; }
  .settings-nav-item { width: auto; white-space: nowrap; }
}

/* ══ RÈGLES GLOBALES PemaTrack ══════════════════════════════ */
/* Boutons d'en-tête de page : toujours en taille « sm » (comme PemaTrack) */
.view-header .btn:not(.btn-lg) { padding: .4rem .65rem; font-size: .8125rem; border-radius: .5rem; }
.view-header .btn svg { width: 15px; height: 15px; }
/* Tableau seul dans une carte : collé aux bords, en-tête teinté pleine largeur */
.card:has(> [id$="-list"] > .data-table),
.card:has(> [id$="-list"] > div > .data-table) { padding: 0; overflow: hidden; }
.card:has(> [id$="-list"] > .data-table) .data-table thead th:first-child,
.card:has(> [id$="-list"] > .data-table) .data-table tbody td:first-child { padding-left: 20px; }
.card:has(> [id$="-list"] > .data-table) .data-table thead th:last-child,
.card:has(> [id$="-list"] > .data-table) .data-table tbody td:last-child { padding-right: 20px; }
.empty-note { font-size: .875rem; color: var(--muted); }
.cell-mono { font-family: var(--font-mono); font-size: .8125rem; color: var(--ink); }
.patients-table-wrap + *, * + .patients-table-wrap { margin-top: 0; }
#appointments-content > .dash-grid { margin-bottom: 20px; }
.filter-card-2 { grid-template-columns: minmax(220px, 2fr) minmax(180px, 1fr); }
@media (max-width: 560px) { .filter-card-2 { grid-template-columns: 1fr; } }
.table-card-note:not(:empty) { padding: 0 16px 12px; }
.badge { text-transform: none; letter-spacing: 0; }
.view > [id$="-content"] > .empty-state { background: #fff; border: 1px solid var(--line); border-radius: .875rem; padding: 48px 16px; }

/* ══ LANDING — langage visuel PemaTrack (panneau sombre, kicker mono, mot accent) ══ */
#landing-page { background: var(--canvas); }
#landing-page .landing-nav { height: 64px; padding: 0 2rem; display: flex; align-items: center; }
#landing-page .landing-hero {
  min-height: auto;
  padding: 9rem 2rem 6rem;
  background: linear-gradient(180deg, #A50D26 0%, #6E0A1A 55%, #3A0711 100%);
  color: #fff;
  overflow: hidden;
}
#landing-page .hero-mesh {
  opacity: .05;
  background: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 24px 24px;
}
#landing-page .hero-orb-1 { background: rgba(229,51,79,0.25); width: 384px; height: 384px; top: auto; bottom: -96px; left: auto; right: -96px; border-radius: 999px; filter: blur(64px); animation: none; }
#landing-page .hero-orb-2 { background: rgba(255,255,255,0.06); width: 288px; height: 288px; top: -64px; left: -40px; bottom: auto; right: auto; border-radius: 999px; filter: blur(64px); animation: none; }
#landing-page .hero-orb-3, #landing-page .hero-card-glow { display: none; }
#landing-page .hero-label {
  background: none; border: none; padding: 0; border-radius: 0;
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: #FDA4AF;
}
#landing-page .hero-label svg { display: none; }
#landing-page .hero-headline { color: #fff; font-weight: 800; font-size: clamp(2.4rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -0.015em; }
#landing-page .grad-text {
  background: none; -webkit-text-fill-color: currentColor; color: #FDA4AF; font-style: normal;
}
#landing-page .hero-sub { color: rgba(255,255,255,0.72); font-size: 1.05rem; line-height: 1.65; }
#landing-page .landing-hero .btn-primary { background: #fff; color: var(--brand-700); box-shadow: 0 4px 14px rgba(0,0,0,0.18); }
#landing-page .landing-hero .btn-primary:hover { background: #FFF1F2; }
#landing-page .landing-hero .btn-secondary { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.22); color: #fff; }
#landing-page .landing-hero .btn-secondary:hover { background: rgba(255,255,255,0.12); }
#landing-page .hero-badge-item { color: rgba(255,255,255,0.7); }
#landing-page .hero-badge-item svg { color: #FDA4AF; }
#landing-page .hero-card-visual img { filter: drop-shadow(0 30px 60px rgba(0,0,0,0.45)); }

#landing-page .section-label {
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .1em; color: var(--brand);
}
#landing-page .section-title { font-weight: 800; font-size: clamp(1.6rem, 2.6vw, 2.25rem); letter-spacing: -0.01em; color: var(--ink); }
#landing-page .feature-card { border-radius: .875rem; padding: 20px; }
#landing-page .feature-icon { width: 44px; height: 44px; border-radius: 999px; }
#landing-page .feature-icon svg { width: 20px; height: 20px; }
#landing-page .feature-title { font-size: 1rem; font-weight: 700; }

#landing-page .cta-banner {
  background: linear-gradient(180deg, #A50D26 0%, #6E0A1A 55%, #3A0711 100%);
  box-shadow: 0 20px 50px rgba(94,7,21,0.30);
  border-radius: 1rem;
}
#landing-page .cta-orb-b { background: rgba(229,51,79,0.30); }
#landing-page .cta-eyebrow {
  background: none; border: none; padding: 0;
  font-family: var(--font-mono); font-weight: 500; letter-spacing: .1em; color: #FDA4AF;
}
#landing-page .cta-eyebrow svg { display: none; }
#landing-page .landing-nav .lang-seg { margin-right: 4px; }
@media (max-width: 768px) {
  #landing-page .landing-hero { padding: 6.5rem 1.25rem 4rem; }
  #landing-page .landing-nav { padding: 0 1rem; }
}

/* ══ INSCRIPTION — même écran scindé que la connexion (PemaTrack) ══
   « html body » : l'emporte sur le <style> propre à chaque gabarit d'inscription. */
html body .reg-page { display: block; padding: 0; min-height: 100vh; background: var(--canvas); background-image: none; }
html body .reg-page:not(:has(.reg-wrapper)) { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
html body .reg-wrapper {
  max-width: none; min-height: 100vh;
  border: none; border-radius: 0; box-shadow: none; background: var(--canvas);
}
html body .reg-brand {
  background: linear-gradient(180deg, #A50D26 0%, #6E0A1A 55%, #3A0711 100%);
  padding: 84px 56px 56px;
}
html body .reg-form-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px max(40px, 7%);
  background: var(--canvas);
}
html body .reg-form-panel h1, html body .reg-shell h1 { font-size: 1.5rem; font-weight: 700; color: var(--ink); letter-spacing: 0; }
html body .reg-page:has(.reg-wrapper) .reg-back { color: rgba(255,255,255,0.8); }
html body .reg-page:has(.reg-wrapper) .reg-back:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Sections cliniques : titre avec pastille d'icône ronde, actions d'en-tête en contour */
#clinical-sections .card-header h3,
.patient-detail-container > .card .card-header h3 { display: flex; align-items: center; gap: 12px; }
#clinical-sections .card-header h3 > svg:first-child,
.patient-detail-container > .card .card-header h3 > svg:first-child {
  width: 36px; height: 36px; padding: 9px; box-sizing: border-box; flex-shrink: 0;
  border-radius: 999px; background: var(--brand-50); color: var(--brand);
}
#clinical-sections .card-header .btn-primary,
.patient-detail-container > .card .card-header .btn-primary {
  background: #fff; color: var(--brand); border-color: var(--brand-200); box-shadow: none;
}
#clinical-sections .card-header .btn-primary:hover,
.patient-detail-container > .card .card-header .btn-primary:hover { background: var(--brand-50); }

/* ══ TABLEAU DE BORD : bloc salutation + actions rapides (style PemaTrack) ══ */
#dashboard-greeting:not(:empty) { margin-bottom: 20px; }
.greet-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.greet-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.greet-avatar {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 1rem;
  background: linear-gradient(135deg, var(--brand-bright), #7A0A1C);
  box-shadow: 0 4px 12px rgba(200,16,46,0.30);
  display: grid; place-items: center;
  font-size: 1.15rem; font-weight: 800; color: #fff;
}
.greet-txt { min-width: 0; }
.greet-date { font-size: .75rem; color: var(--muted); }
.greet-hello { font-size: 1.375rem; font-weight: 500; color: var(--ink); line-height: 1.3; margin: 2px 0 6px; }
.greet-hello strong { font-weight: 800; }
.greet-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.greet-affil { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--muted); }
.greet-affil svg { width: 15px; height: 15px; }
.greet-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.greet-note { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; color: var(--muted); }
.greet-note svg { width: 13px; height: 13px; }
@media (max-width: 640px) { .greet-side { align-items: flex-start; } }

.quick-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .quick-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .quick-tiles { grid-template-columns: 1fr; } }
.quick-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: .75rem;
  background: var(--bg-subtle); border: 1px solid var(--line);
  font-family: var(--font-body); text-align: left; cursor: pointer; color: var(--muted);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.quick-tile:hover { background: #fff; border-color: var(--brand-200); box-shadow: 0 8px 24px -6px rgba(94,7,21,0.14); color: var(--brand); }
.quick-tile-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 999px; display: grid; place-items: center; }
.quick-tile-ico svg { width: 19px; height: 19px; }
.quick-tile-txt { display: flex; flex-direction: column; min-width: 0; }
.quick-tile-title { font-size: .875rem; font-weight: 700; color: var(--ink); }
.quick-tile-sub { font-size: .6875rem; color: var(--muted); margin-top: 1px; }
.quick-tile.primary { background: var(--brand); border-color: var(--brand); color: rgba(255,255,255,0.85); }
.quick-tile.primary:hover { background: var(--brand-700); color: #fff; }
.quick-tile.primary .quick-tile-ico { background: rgba(255,255,255,0.2); color: #fff; }
.quick-tile.primary .quick-tile-title { color: #fff; }
.quick-tile.primary .quick-tile-sub { color: rgba(255,255,255,0.75); }
.quick-tile-badge {
  margin-left: auto; flex-shrink: 0; padding: 1px 8px; border-radius: 999px;
  background: var(--warning); color: #fff; font-size: .6875rem; font-weight: 700;
}

/* Landing — étapes en cartes PemaTrack (pastille ronde + kicker mono) */
#landing-page .how-it-works { background: #fff; }
#landing-page .steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 1100px; margin: 0 auto; }
#landing-page .step-item {
  text-align: left; background: #fff; border: 1px solid var(--line); border-radius: .875rem;
  box-shadow: 0 1px 2px 0 rgba(94,7,21,0.05), 0 1px 3px 0 rgba(94,7,21,0.04);
  padding: 20px;
}
#landing-page .step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
#landing-page .step-ico { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
#landing-page .step-ico svg { width: 20px; height: 20px; }
#landing-page .step-kicker { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
#landing-page .step-title { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
#landing-page .step-desc { font-size: .875rem; color: var(--muted); line-height: 1.6; }
@media (max-width: 860px) { #landing-page .steps-grid { grid-template-columns: 1fr; } }

/* Landing — piliers sécurité : sans liseré coloré, pastille ronde */
#landing-page .security-pillar::before { display: none; }
#landing-page .security-pillar { border-radius: .875rem; padding: 20px; }
#landing-page .security-pillar-icon { width: 44px; height: 44px; border-radius: 999px; }
#landing-page .security-pillar-icon svg { width: 20px; height: 20px; }
#landing-page .security-pillar-title { font-size: 1rem; font-weight: 700; }
#landing-page .security-pillar-desc { font-size: .875rem; color: var(--muted); }

/* Landing — pied de page : coque sombre de la sidebar, mentions en texte simple */
#landing-page .site-footer { background: linear-gradient(180deg, #6E0A1A 0%, #3A0711 100%); }
#landing-page .footer-badge { background: none; border: none; padding: 0; color: rgba(255,255,255,0.7); }
#landing-page .footer-badge svg { color: #FDA4AF; }
#landing-page .made-badge { background: none; border: none; padding: 0; margin-top: 14px; }
.lang-seg-dark { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); margin-top: 12px; }
.lang-seg-dark .lang-opt { color: rgba(255,255,255,0.7); }
.lang-seg-dark .lang-opt:hover { background: rgba(255,255,255,0.1); color: #fff; }
.lang-seg-dark .lang-opt.active { background: #fff; color: var(--brand-700); }

/* Page publique de vérification du carnet international */
.verify-wrap { max-width: 760px; margin: 0 auto; padding: 40px 16px; }
.verify-logo { height: 32px; margin: 0 auto 6px; }
.verify-domain { text-align: center; font-family: var(--font-mono); font-size: .75rem; color: var(--muted); margin-bottom: 20px; }
.verify-ok { margin-bottom: 12px; }
.verify-title { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.verify-sub { font-family: var(--font-mono); font-size: .8125rem; color: var(--brand); margin: 2px 0 12px; }
.verify-table { margin-top: 16px; }

/* Carnet international de vaccination (dossier) */
.intl-cert-no { font-family: var(--font-mono); margin: -8px 0 12px; }
#intl-vax-card .card-header h3 .pill { margin-left: 4px; }
.intl-vax-head-right { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
#intl-yf-note { margin: -4px 0 14px; }
