/* ---------------------------------------------------------------------------
   Système de design MediClinic — source unique de vérité.

   Une seule famille de marque (le vert #1e4d40), une seule famille de neutres
   (froids, slate), quatre couleurs sémantiques. Une couleur écrite en dur dans
   un composant est un bug : elle ne suit pas le thème sombre et elle échappe à
   toute correction ultérieure. L'audit du 2026-09-01 a trouvé six palettes
   concurrentes et ~500 hex en dur, voir
   docs/superpowers/plans/2026-09-01-audit-ui-ux-antislop.md.

   Les polices sont chargées depuis index.html (preconnect + stylesheet) et non
   plus par un @import ici : un @import en tête de feuille sérialise la requête
   et bloque le rendu.
   --------------------------------------------------------------------------- */

:root {
  /* --- Échelle de marque, hsl(163 44% L) dérivée de #1e4d40 --------------- */
  --brand-50:  hsl(163, 40%, 96%);
  --brand-100: hsl(163, 38%, 91%);
  --brand-200: hsl(163, 34%, 81%);
  --brand-300: hsl(163, 36%, 66%);
  --brand-400: hsl(163, 40%, 48%);
  --brand-500: hsl(163, 44%, 36%);
  --brand-600: hsl(163, 44%, 28%);
  --brand-700: hsl(163, 44%, 21%); /* #1e4d40 — la couleur de marque */
  --brand-800: hsl(163, 42%, 16%);
  --brand-900: hsl(163, 40%, 11%);

  /* --- Rôles de marque ---------------------------------------------------
     Le remplissage et l'encre sont deux tokens distincts : une même valeur ne
     peut pas servir à la fois de fond de bouton et de texte sur la page dans
     les deux thèmes. Confondre les deux est exactement ce qui rendait les
     pastilles illisibles en mode sombre. */
  --brand-fill: var(--brand-700);
  --brand-fill-hover: var(--brand-800);
  --brand-fill-fg: #ffffff;
  --brand-soft: var(--brand-50);
  --brand-soft-ink: var(--brand-700);
  --brand-line: var(--brand-200);

  /* --primary reste l'ENCRE d'accent (texte, icônes, bordures) : c'est son
     usage majoritaire dans le dépôt. Pour un fond, utiliser --brand-fill. */
  --primary-h: 163;
  --primary-s: 44%;
  --primary-l: 24%;
  --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
  --primary-rgb: 30, 77, 64;
  --primary-hover: var(--brand-700);
  --primary-light: var(--brand-50);
  --primary-light-hover: var(--brand-100);
  --primary-glow: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.25);

  --secondary: #0f172a;
  --secondary-rgb: 15, 23, 42;

  /* --- Neutres : une seule famille, froide ------------------------------- */
  --bg-primary: #f7f9fb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eef2f7;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  /* #8a99ad ne donnait que 2,9:1 sur blanc, sous le minimum AA de 4,5:1, et
     c'est le token le plus répandu de l'application (libellés de cartes,
     sous-titres, métadonnées). #64748b donne 4,8:1. */
  --text-muted: #64748b;

  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.4);

  /* Glassmorphism system */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(30, 77, 64, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(30, 77, 64, 0.04);

  /* --- Sémantiques -------------------------------------------------------
     Chaque couleur a trois rôles : la teinte pleine (--x), le fond teinté
     (--x-surface) et l'encre lisible sur ce fond (--x-ink). Les trois sont
     redéfinis en thème sombre, ce que les anciens rgba() ne faisaient pas. */
  --success: #10b981;
  --success-surface: hsl(152, 55%, 95%);
  --success-ink: hsl(152, 60%, 24%);
  --success-light: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-surface: hsl(38, 92%, 95%);
  --warning-ink: hsl(30, 80%, 30%);
  --warning-light: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-surface: hsl(0, 86%, 96%);
  --danger-ink: hsl(0, 65%, 40%);
  --danger-light: rgba(239, 68, 68, 0.15);
  --info: #0284c7;
  --info-surface: hsl(199, 89%, 95%);
  --info-ink: hsl(201, 90%, 27%);
  --info-light: rgba(2, 132, 199, 0.15);

  /* Shadows and Offsets */
  --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.04);
  --shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 16px -6px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 20px 30px -10px rgba(15, 23, 42, 0.09), 0 10px 20px -8px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 30px 50px -15px rgba(15, 23, 42, 0.13), 0 15px 30px -10px rgba(15, 23, 42, 0.07);

  /* --- Rayons : trois paliers utiles, plus la pastille ------------------- */
  --radius-sm: 8px;   /* contrôles : champs, petits boutons */
  --radius-md: 14px;  /* cartes, pastilles de statut */
  --radius-lg: 20px;  /* conteneurs, modales */
  --radius-xl: 28px;  /* images de la vitrine */
  --radius-full: 9999px;

  /* --- Échelle typographique --------------------------------------------
     Six paliers. Les tailles improvisées (0,72 / 0,78 / 0,82 / 0,925 rem…)
     sont à remplacer par ces tokens au fil des passages. */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;

  /* --- Barre latérale ----------------------------------------------------
     Elle reste sombre dans les deux thèmes, c'est un choix assumé. Ses valeurs
     sont dérivées de la même échelle de marque : elle avait jusqu'ici son
     propre vert (#162a26, #1c4436, #1f3a33) et ses propres gris verdâtres. */
  --sidebar-bg: var(--brand-900);
  --sidebar-surface: var(--brand-800);
  --sidebar-active: var(--brand-700);
  --sidebar-fg: hsl(163, 14%, 72%);
  --sidebar-fg-strong: #ffffff;
  --sidebar-muted: hsl(163, 12%, 50%);

  /* Fonts */
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-secondary: 'Plus Jakarta Sans', 'Outfit', sans-serif;

  /* Skeleton loading (see components/Skeleton.tsx) */
  --skeleton-base: #e3ecf3;
  --skeleton-sheen: rgba(255, 255, 255, 0.75);

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Sizing */
  --sidebar-width: 260px;
  --header-height: 70px;
}

/* Premium Dark Mode ("fond un peu noir" theme) */
[data-theme="dark"] {
  --bg-primary: #05080f; /* Rich deep black-blue */
  --bg-secondary: #0b111e; /* Sleek dark card container */
  --bg-tertiary: #131c2e; /* Slate/dark-blue accent background */

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  /* #64748b ne donnait que 3,95:1 sur --bg-secondary, sous le minimum AA. */
  --text-muted: #94a3b8;

  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --border-focus: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.6);

  /* L'encre d'accent s'éclaircit, le remplissage reste un vert soutenu qui
     porte encore du texte blanc. Les deux tokens divergent ici : c'est tout
     l'intérêt de les avoir séparés. */
  --primary-s: 40%;
  --primary-l: 62%;
  --brand-fill: hsl(163, 44%, 30%);
  --brand-fill-hover: hsl(163, 44%, 36%);
  --brand-fill-fg: #ffffff;
  --brand-soft: hsl(163, 34%, 13%);
  --brand-soft-ink: hsl(163, 42%, 72%);
  --brand-line: hsl(163, 30%, 26%);
  --primary-hover: hsl(163, 40%, 72%);
  --primary-light: hsl(163, 34%, 13%);
  --primary-light-hover: hsl(163, 32%, 17%);

  --success-surface: hsl(152, 40%, 13%);
  --success-ink: hsl(152, 50%, 64%);
  --warning-surface: hsl(35, 45%, 14%);
  --warning-ink: hsl(38, 80%, 65%);
  --danger-surface: hsl(0, 40%, 15%);
  --danger-ink: hsl(0, 80%, 74%);
  --info-surface: hsl(201, 45%, 14%);
  --info-ink: hsl(199, 80%, 68%);

  --glass-bg: rgba(11, 17, 30, 0.7);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

  --skeleton-base: #17202f;
  --skeleton-sheen: rgba(255, 255, 255, 0.07);

  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 16px -6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 20px 30px -10px rgba(0, 0, 0, 0.6), 0 10px 20px -8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 30px 50px -15px rgba(0, 0, 0, 0.7), 0 15px 30px -10px rgba(0, 0, 0, 0.5);
}

html, body {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Resets & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Focus clavier : une seule règle pour toute l'application. Il n'en existait
   qu'une (.input-control), face à 21 « outline: none » — un utilisateur au
   clavier perdait le curseur dès qu'il quittait un champ de formulaire.
   :focus-visible ne s'affiche pas au clic à la souris, donc rien ne change
   pour les autres. */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Les éléments qui posent eux-mêmes « outline: none » en inline gardent une
   marque visible via l'ombre portée. */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--border-focus);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
}

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-semibold { font-weight: 500; }
.text-bold { font-weight: 700; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.truncate-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Common Layout Containers */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.main-content {
  flex-grow: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    padding-bottom: 64px; /* room for the fixed mobile quick-actions bar */
  }
}

/* ===== Mobile quick-actions bar (Patient / Rendez-vous / Dépôt) ===== */
.mobile-quick-actions {
  display: none;
}

@media (max-width: 768px) {
  .mobile-quick-actions {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  }

  .mobile-quick-actions-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    background: none;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
  }

  .mobile-quick-actions-btn:active {
    background-color: var(--bg-tertiary);
    color: var(--primary);
  }
}

.page-container {
  padding: 2rem;
  flex-grow: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .page-container {
    padding: 1rem 0.75rem;
  }
}

/* Header & Card styles */
.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.2);
}

/* ===== Global ripple effect (see utils/ripple.ts) ===== */
@keyframes ripple-anim {
  from { transform: scale(0); opacity: 0.35; }
  to { transform: scale(1); opacity: 0; }
}

.ripple-span {
  position: absolute;
  border-radius: 50%;
  background-color: currentColor;
  transform: scale(0);
  opacity: 0.35;
  animation: ripple-anim 600ms ease-out forwards;
  pointer-events: none;
}

/* ===== Stat card entrance + hover lift (Dashboard, Accounting journal, etc.) ===== */
@keyframes stat-card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.stat-card-animate {
  animation: stat-card-in 450ms ease-out both;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card-animate:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
}
.stat-card-animate:nth-child(1) { animation-delay: 0ms; }
.stat-card-animate:nth-child(2) { animation-delay: 60ms; }
.stat-card-animate:nth-child(3) { animation-delay: 120ms; }
.stat-card-animate:nth-child(4) { animation-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  .ripple-span { animation: none; display: none; }
  .stat-card-animate { animation: none; }
}

/* ===== Skeleton loading placeholders (see components/Skeleton.tsx) =====
   Un seul bloc gris qui balaie une lueur — pas de librairie, pas d'image.
   Les couleurs viennent de --skeleton-* pour suivre le thème clair/sombre. */
@keyframes skeleton-shimmer {
  from { background-position: -150% 0; }
  to { background-position: 250% 0; }
}

.skeleton {
  display: block;
  background-color: var(--skeleton-base);
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    var(--skeleton-sheen) 50%,
    transparent 100%
  );
  background-size: 40% 100%;
  background-repeat: no-repeat;
  background-position: -150% 0;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
  /* rien de lisible ni de sélectionnable dans un placeholder */
  color: transparent;
  user-select: none;
  pointer-events: none;
}

.skeleton-line { height: 0.8rem; border-radius: var(--radius-full); }
.skeleton-circle { border-radius: 50%; }

/* La lueur qui balaie est purement décorative : sans elle le bloc gris
   reste visible et lisible comme placeholder statique. */
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; background-image: none; }
}

/* Texte réservé aux lecteurs d'écran (annonce « Chargement… » pendant que
   les skeletons, eux, sont aria-hidden). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.25);
}

.grid-cols-1 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
  .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
}

/* ===== Reusable "main content + narrow side panel" split (form pages, detail pages) ===== */
.side-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 992px) {
  .side-panel-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Wider variant for dense two-column detail views (timeline + action widgets) */
.detail-split-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .detail-split-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Small 3-across grid for compact numeric inputs (vitals, etc.) */
.compact-3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

@media (max-width: 480px) {
  .compact-3-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full); /* Rounded Pill! */
  font-weight: 600;
  font-family: var(--font-secondary);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
  font-size: 0.875rem;
}

.btn-primary {
  background-color: var(--brand-fill);
  color: var(--brand-fill-fg);
  box-shadow: 0 4px 14px 0 rgba(var(--primary-rgb), 0.25);
}
.btn-primary:hover {
  background-color: var(--brand-fill-hover);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(var(--primary-rgb), 0.35);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover {
  background-color: var(--border);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(239, 68, 68, 0.3);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Badges / Chips */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success { background-color: var(--success-light); color: var(--success); }
.badge-warning { background-color: var(--warning-light); color: var(--warning); }
.badge-danger { background-color: var(--danger-light); color: var(--danger); }
.badge-info { background-color: var(--info-light); color: var(--info); }

/* Tables */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
}

.custom-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background-color: var(--bg-tertiary);
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.custom-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.9375rem;
}

@media (max-width: 640px) {
  .custom-table th, .custom-table td {
    padding: 0.75rem 0.875rem;
    font-size: 0.85rem;
  }
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tbody tr:hover {
  background-color: var(--bg-primary);
}

/* Inputs & Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-control {
  width: 100%;
  max-width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.input-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--border-focus);
}

.input-control::placeholder {
  color: var(--text-muted);
}

/* Phone input with country/dial-code selector (react-phone-number-input) */
.phone-input-wrapper .PhoneInput {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg-secondary);
  transition: var(--transition);
}

.phone-input-wrapper .PhoneInput--focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--border-focus);
}

.phone-input-wrapper .PhoneInputCountry {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 0.5rem;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.phone-input-wrapper .PhoneInputCountrySelect {
  background: none;
  border: none;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

/* The dropdown popup is rendered natively by the OS/browser with a light
   background regardless of page theme — force readable dark-on-light text
   for the option list itself, independent of the (invisible) closed select. */
.phone-input-wrapper .PhoneInputCountrySelect option {
  color: #111827;
  background-color: #ffffff;
}

.phone-input-wrapper .PhoneInputCountryIcon {
  width: 22px;
  box-shadow: none;
}

.phone-input-wrapper .PhoneInputCountrySelectArrow {
  color: var(--text-muted);
  opacity: 1;
}

.phone-input-wrapper .PhoneInputInput {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  padding: 0.125rem 0;
}

.phone-input-wrapper .PhoneInputInput::placeholder {
  color: var(--text-muted);
}

.phone-input-wrapper .PhoneInput--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Modal backdrop & animations */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
  padding: 1rem;
  overflow-y: auto;
}

.modal-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Many modals wrap .modal-body + .modal-footer in a <form> that's a direct
   child of .modal-content. .modal-content is a flex column, but <form>
   defaults to display:block, which breaks the flex chain — .modal-body's
   flex/overflow-y rules below only apply when it's an actual flex item, so
   without this the body never scrolls and .modal-content's overflow:hidden
   just silently clips content instead (footer can end up squeezed/hidden).
   This keeps the flex column going through the <form>. */
.modal-content > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.rx-med-line-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr 0.8fr 30px;
  gap: 8px;
  align-items: center;
}

@media (max-width: 640px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }
  .modal-backdrop {
    padding: 0.5rem;
  }
  .modal-content {
    max-height: 95vh;
  }
  .modal-header, .modal-body, .modal-footer {
    padding: 1rem;
  }
  .modal-footer {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }
  .modal-footer .btn {
    width: 100%;
  }
  .rx-med-line-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .rx-med-line-grid > div:nth-child(1) {
    grid-column: 1 / -1;
  }
  .rx-med-line-grid > .rx-med-line-remove {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: var(--bg-tertiary);
  flex-shrink: 0;
}

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes logoPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.92); }
}
.app-loading-logo {
  animation: logoPulse 1.6s ease-in-out infinite;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Utility Flex */
.flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }

/* Alerts banner */
.alert-banner {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid transparent;
}
.alert-banner-danger {
  background-color: var(--danger-light);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}
.alert-banner-warning {
  background-color: var(--warning-light);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}
.alert-banner-info {
  background-color: var(--info-light);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--info);
}

/* Responsive Sidebar toggling */
.sidebar {
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
  .sidebar {
    width: min(78vw, 240px) !important;
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle-btn {
    display: flex !important;
  }

  .sidebar-close-btn {
    display: flex !important;
  }
}

/* ===== Shared root page wrapper (Patients, Pharmacy, Laboratory, Prescriptions) ===== */
.app-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background-color: var(--bg-primary);
  min-height: calc(100vh - var(--header-height));
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .app-page {
    padding: 1rem 0.875rem;
    gap: 1.15rem;
  }
}

/* ===== Shared page-header primary CTA button (Ajouter/Nouveau buttons) ===== */
@media (max-width: 640px) {
  .page-cta-btn {
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
  }
}

/* ===== Shared page-header search/actions toolbar (Patients, Pharmacy, Laboratory, Prescriptions) ===== */
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-search-box {
  position: relative;
  width: 280px;
  max-width: 100%;
}

@media (max-width: 640px) {
  .page-header-actions {
    width: 100%;
  }
  .page-search-box {
    flex: 1 1 auto;
    width: auto;
  }
}

/* ===== Dashboard Mobile Responsive Styles ===== */
.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background-color: var(--bg-primary);
  min-height: calc(100vh - var(--header-height));
  box-sizing: border-box;
}

.dashboard-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-top-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard-quick-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.dashboard-appt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.dashboard-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.dashboard-appt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  transition: var(--transition);
}

/* Media Queries for Mobile & Tablet */
@media (max-width: 992px) {
  .dashboard-container {
    padding: 1rem !important;
  }
  .dashboard-main-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
  }
}

@media (max-width: 640px) {
  .dashboard-top-bar {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .dashboard-top-right {
    width: 100% !important;
  }
  .dashboard-top-right > div:first-child {
    flex: 1 !important;
    width: 100% !important;
  }
  .dashboard-quick-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }
  .dashboard-quick-actions button {
    width: 100% !important;
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
    justify-content: center !important;
  }
  .dashboard-trial-badge {
    grid-column: 1 / -1 !important;
    margin-left: 0 !important;
  }
  .dashboard-stats-grid {
    grid-template-columns: 1fr !important;
  }
  .dashboard-legend {
    display: none !important;
  }
  .dashboard-appt-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .dashboard-appt-row {
    padding: 10px 12px !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
}

/* ===== Platform Admin — Banani pixel-parity tokens =====
   Fixed light palette independent of the app-wide dark/light toggle: this is
   a separate operator console (own dark sidebar already, see
   PlatformAdminPage.tsx), not a clinic-facing themed page, so it doesn't
   need to track the visitor's theme preference the way the rest of the app
   does. Values copied verbatim from the Banani flow's shared style.css. */
.platform-admin-shell {
  --bg-primary: #F4F3F0;
  --bg-secondary: #FFFFFF;
  --text-primary: #1E2A2A;
  --text-secondary: #1E2A2A;
  --text-muted: #7A8585;
  --border: #D6D2CB;
  --border-focus: rgba(61, 107, 94, 0.35);
  --success: hsl(163, 40%, 36%);
  --success-light: rgba(61, 138, 106, 0.15);
  --warning: hsl(30, 65%, 43%);
  --warning-light: rgba(212, 129, 58, 0.15);
  --danger: hsl(6, 64%, 45%);
  --danger-light: rgba(192, 57, 43, 0.15);
  --info: var(--primary);
  --info-light: var(--brand-50);

  /* La console est claire en permanence : elle doit donc redéclarer les fonds
     sémantiques, sinon le thème sombre de l'application lui envoie ses propres
     surfaces foncées à l'intérieur d'une interface claire. */
  --success-surface: hsl(152, 55%, 95%);
  --success-ink: hsl(152, 60%, 24%);
  --warning-surface: hsl(38, 92%, 95%);
  --warning-ink: hsl(30, 80%, 30%);
  --danger-surface: hsl(0, 86%, 96%);
  --danger-ink: hsl(0, 65%, 40%);
  --info-surface: hsl(199, 89%, 95%);
  --info-ink: hsl(201, 90%, 27%);
  --brand-soft: var(--brand-50);
  --brand-soft-ink: var(--brand-700);
  --brand-line: var(--brand-200);

  /* La console garde son fond papier, hérité de la maquette Banani et assumé :
     c'est l'outil de l'exploitant, pas une page vue par une clinique. En
     revanche elle ne garde plus son propre vert ni sa propre police. Elle
     avait hsl(163 27% 33%) là où l'application a hsl(163 44% 24%) : deux verts
     à un clic d'écart, pour aucune raison. */
  --primary-h: 163;
  --primary-s: 44%;
  --primary-l: 24%;
  --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
  --primary-rgb: 30, 77, 64;
  --primary-hover: var(--brand-700);
  --primary-light: var(--brand-50);
}

/* Console dense : une carte qui contient un tableau de vingt lignes ne doit
   pas sauter de 4px au survol (.card:hover global). Le relief au survol reste,
   par l'ombre seule. */
.platform-admin-shell .card:hover {
  transform: none;
}

/* .table-container apporte sa propre bordure + rayon + ombre ; posé dans une
   .card qui en a déjà, cela dessinait un double cadre. */
.platform-admin-shell .card > .table-container {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
}

.platform-admin-shell input,
.platform-admin-shell select,
.platform-admin-shell button {
  font-family: var(--font-primary);
}

/* Banani badges/pills are rounded-md (6px), not the app-wide full-pill shape */
.platform-admin-shell .badge {
  border-radius: 6px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
  font-size: 0.72rem;
}

.platform-admin-shell .filter-pill {
  border-radius: 6px !important;
}

/* Real <th>/<td> styling — these tables are bare <table> elements (no
   .custom-table class), so without this they fall back to UA defaults */
.platform-admin-shell table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.platform-admin-shell thead tr {
  background-color: #ECEAE5; /* Banani --color-input */
}
.platform-admin-shell th {
  padding: 0.75rem 1.1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.platform-admin-shell td {
  padding: 0.75rem 1.1rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}
.platform-admin-shell tbody tr:last-child td {
  border-bottom: none;
}

/* Stat-card icon box — Banani wraps each stat icon in a small tinted square */
.platform-admin-shell .stat-icon-box {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  background-color: #D4E0DC;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Barre latérale collante à partir de 900px. La liste des cliniques dépasse
   de loin la hauteur d'un écran, et la nav défilait avec la page : au milieu
   du tableau il ne restait qu'une colonne sombre vide, et il fallait remonter
   tout en haut pour changer de section. align-self: flex-start est
   indispensable — un élément flex étiré (comportement par défaut, stretch) ne
   peut pas coller. overflow-y sur la barre elle-même : sur un écran de 600px
   de haut, les neuf entrées plus le pied dépassent les 100vh. */
@media (min-width: 900px) {
  .platform-admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
    overflow-y: auto;
  }
}

@media (max-width: 640px) {
  .platform-admin-shell th,
  .platform-admin-shell td {
    padding: 0.6rem 0.7rem;
    font-size: 0.78rem;
  }
  /* Les cartes sans padding en ligne (Rapports, Sécurité, Config. système)
     gardaient les 1.75rem de .card : 56px de marges perdues sur 375px. */
  .platform-admin-shell .card {
    padding: 1rem;
  }
  /* Cibles tactiles : les pastilles de filtre et les boutons « Gérer » des
     tableaux tombaient autour de 24-30px de haut, sous le minimum de 44px. */
  .platform-admin-shell .filter-pill,
  .platform-admin-shell .btn-outline,
  .platform-admin-shell .page-cta-btn {
    min-height: 40px;
  }
}

/* Sous 640px, les tableaux d'exploitation (.platform-table) deviennent des
   fiches empilées. Le défilement horizontal reste la solution pour les
   journaux de Sécurité et Rapports — données courtes et chronologiques, qui se
   lisent en grille — mais sur huit colonnes et 375px de large il ne se lit
   pas, il se déchiffre : on fait glisser pour trouver le statut, puis on
   revient pour savoir de quelle clinique il s'agissait.
   Chaque cellule porte son intitulé en data-label, repris ici en ::before :
   pas de second balisage mobile à maintenir en parallèle du tableau. */
@media (max-width: 640px) {
  .platform-admin-shell .platform-table {
    min-width: 0 !important;
  }
  .platform-admin-shell .platform-table thead {
    display: none;
  }
  .platform-admin-shell .platform-table,
  .platform-admin-shell .platform-table tbody,
  .platform-admin-shell .platform-table tr,
  .platform-admin-shell .platform-table td {
    display: block;
    width: 100%;
  }
  .platform-admin-shell .platform-table tr {
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid var(--border);
  }
  .platform-admin-shell .platform-table tbody tr:last-child {
    border-bottom: none;
  }
  .platform-admin-shell .platform-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
    border: none;
    font-size: 0.82rem;
  }
  .platform-admin-shell .platform-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
  }
  /* Première cellule = titre de la fiche : le nom de la clinique ou le sujet
     du ticket se passe d'intitulé. */
  .platform-admin-shell .platform-table td:first-child {
    display: block;
    font-size: 0.9rem;
    padding-bottom: 6px;
  }
  .platform-admin-shell .platform-table td:first-child::before {
    content: none;
  }
  /* Cellule vide — colonne « Illimité » d'une clinique ordinaire, colonne
     d'action sur sa propre ligne : pas de ligne fantôme réduite à son
     intitulé. */
  .platform-admin-shell .platform-table td:empty {
    display: none;
  }
  /* Les lignes dépliées par « Gérer » couvrent toutes les colonnes : elles
     gardent leur bloc de commandes, la mise en fiche n'a pas de sens ici. */
  .platform-admin-shell .platform-table td[colspan] {
    display: block;
  }
  .platform-admin-shell .platform-table td[colspan]::before {
    content: none;
  }
}

/* Mobile-first responsive shell — Banani's mockup is desktop-only
   (screenSize: 'desktop'), so this collapse pattern is our own design
   decision: sidebar becomes a horizontal scrollable icon strip under
   900px instead of a fixed 240px column, matching the mobile nav pattern
   already used by the real clinic Sidebar (MobileQuickActionsBar). */
@media (max-width: 899px) {
  .platform-admin-shell {
    flex-direction: column !important;
  }
  .platform-admin-sidebar {
    width: 100% !important;
    min-height: auto !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    /* Même raison qu'en desktop : la nav doit rester atteignable en cours de
       défilement d'un tableau. 50 passe sous la barre d'actions mobile (90)
       et sous les toasts (1000). */
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
  }
  /* Le bloc qui porte l'en-tête et la nav est un élément flex comme un autre :
     sans ceci il se comprimait au lieu de laisser la barre défiler, et les
     libellés se tronquaient au milieu. */
  .platform-admin-sidebar > div {
    flex-shrink: 0;
  }
  .platform-admin-sidebar-header {
    display: none !important;
  }
  .platform-admin-sidebar-nav {
    flex-direction: row !important;
    padding: 0.5rem 0.6rem !important;
    gap: 4px !important;
  }
  .platform-admin-sidebar-nav button,
  .platform-admin-sidebar-nav .coming-soon-item {
    flex-direction: column !important;
    gap: 3px !important;
    font-size: 0.62rem !important;
    padding: 8px !important;
    white-space: nowrap !important;
    text-align: center !important;
    flex-shrink: 0 !important;
    min-height: 44px;
    justify-content: center !important;
  }
  .platform-admin-sidebar-divider {
    display: none !important;
  }
  /* Footer stays visible (it's the only way to exit the console / log out)
     but becomes a compact horizontal action pair instead of a stacked block */
  .platform-admin-sidebar-footer {
    flex-direction: row !important;
    border-top: none !important;
    padding: 0.5rem 0.6rem !important;
    gap: 4px !important;
    flex-shrink: 0;
  }
  .platform-admin-sidebar-footer button {
    flex-direction: column !important;
    gap: 3px !important;
    font-size: 0.58rem !important;
    line-height: 1.15 !important;
    padding: 6px 6px !important;
    white-space: normal !important;
    text-align: center !important;
    max-width: 72px !important;
    flex-shrink: 0 !important;
    min-height: 44px;
    justify-content: center !important;
  }
  .platform-admin-sidebar-username {
    display: none !important;
  }
  .platform-admin-main-header {
    padding: 1rem 1.25rem !important;
  }
  .platform-admin-main-body {
    padding: 1rem 1.25rem !important;
  }
}

/* Un libellé de mois sur deux sous 480px (voir BarChart.tsx). visibility et
   non display : la largeur de chaque case reste celle de sa barre, sinon les
   libellés restants se décalent par rapport aux barres qu'ils nomment. */
@media (max-width: 480px) {
  .bar-chart-labels span:nth-child(even) {
    visibility: hidden;
  }
}

/* Après le bloc 899px, et pas avant : à spécificité et !important égaux,
   c'est l'ordre du fichier qui tranche — placé plus haut, ce padding se
   faisait écraser par celui de 1.25rem ci-dessus. */
@media (max-width: 480px) {
  .platform-admin-main-header,
  .platform-admin-main-body {
    padding: 0.85rem !important;
  }
}

/* geist-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* geist-cyrillic-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* geist-vietnamese-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* geist-latin-ext-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* geist-latin-wght-normal */
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-latin-wght-normal-BgDaEnEv.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* geist-mono-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* geist-mono-cyrillic-wght-normal */
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* geist-mono-symbols2-wght-normal */
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2) format('woff2-variations');
  unicode-range: U+2000-2001,U+2004-2008,U+200A,U+23B8-23BD,U+2500-259F;
}

/* geist-mono-vietnamese-wght-normal */
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* geist-mono-latin-ext-wght-normal */
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* geist-mono-latin-wght-normal */
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* Vitrine, connexion et CGU : un système visuel à part, déclaré sous .site.
   Rien ici ne s'applique à l'application connectée, qui garde index.css.
   Toutes les classes portent le préfixe vt- : index.css définit déjà .btn et
   .btn-primary, et un nom générique finirait par entrer en collision.
   Conception : docs/superpowers/specs/2026-10-05-vitrine-refonte-design.md */

.site {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-2: #eef2f0;
  --ink: #0f1a17;
  --ink-2: #3a4743;
  --muted: #5b6762;
  --line: #e0e6e3;
  --line-2: #ccd6d1;
  /* Bord des champs de saisie : 3,26:1 sur blanc et 3,03:1 sur --bg, le
     minimum demandé pour la limite d'un champ (WCAG 1.4.11). --line-2 n'en
     donne que 1,49:1. */
  --field-line: #86918c;
  --brand: #1e4d40;
  --brand-hover: #163a30;
  --brand-soft: #e4eee9;
  --brand-soft-2: #d3e5dc;
  --on-brand-muted: #c4dbd1;
  --r-ctl: 10px;
  --r-panel: 16px;
  --r-shot: 12px;
  /* Formes, règle unique (spec) : 10 px les contrôles, 16 px les panneaux,
     12 px les captures et le cadre des sélecteurs à onglets, 20 px le panneau
     d'appel final (16 px sur téléphone), aucune pilule. Un élément logé dans
     un autre prend --r-sm : onglet (12 px moins 4 px de retrait), puce, œil du
     mot de passe, adresse de la capture, coins de la feuille imprimée. Le cadre
     de téléphone imite un appareil : --r-device et --device-frame. */
  --r-sm: 8px;
  --r-closing: 20px;
  --r-device: 22px;
  --device-frame: #13241f;
  --gutter: 56px;
  --shot-shadow: 0 44px 90px -36px rgba(20, 62, 50, 0.3), 0 10px 26px -14px rgba(20, 62, 50, 0.14);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'Geist Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono Variable', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}

/* index.css pose la police de l'application sur chaque élément (*) et une
   couleur sur les titres : sans ces deux règles, Geist ne s'appliquerait à
   aucun enfant, et les titres deviendraient blancs en thème sombre. */
.site,
.site * { font-family: var(--font); }
.site :is(h1, h2, h3, h4) { color: var(--ink); font-weight: 600; line-height: 1.2; }
.site img { display: block; max-width: 100%; height: auto; }
.site button { cursor: pointer; }
.site :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; box-shadow: none; }
/* Un numéro de téléphone ne se coupe pas en fin de ligne. */
.site .vt-nowrap { white-space: nowrap; }
.site .vt-mono { font-family: var(--font-mono); font-size: 0.92em; color: var(--ink); }

/* Ancres : la barre collante ne masque pas le titre visé. index.css met
   overflow-x: hidden sur html et body, ce qui fait de body un conteneur de
   défilement et décolle la navigation ; clip coupe sans cet effet. */
html:has(.site) { scroll-padding-top: 84px; }
html:has(.site),
html:has(.site) body { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html:has(.site) { scroll-behavior: auto; }
}

.vt-skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--r-ctl); background: var(--brand); color: #fff; font-weight: 500; }
.vt-skip:focus { top: 12px; }
.vt-plain { background: none; border: 0; padding: 0; }

.vt-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.vt-section { padding: 120px 0; }
.vt-section-tight { padding-top: 0; }
.site h2 { font-size: 44px; line-height: 1.08; letter-spacing: -0.035em; text-wrap: balance; max-width: 22ch; }
.site h3 { font-size: 20px; line-height: 1.3; letter-spacing: -0.015em; }
.vt-lead { margin-top: 18px; font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 58ch; text-wrap: pretty; }

/* ----- Boutons : une seule forme, 10 px partout ----- */
.vt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 22px; border-radius: var(--r-ctl); border: 1px solid transparent; font-size: 16px; font-weight: 500; line-height: 1; white-space: nowrap; transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.12s var(--ease); }
.vt-btn:active { transform: translateY(1px); }
.vt-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.vt-btn-primary { background: var(--brand); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(15, 26, 23, 0.25); }
.vt-btn-primary:hover { background: var(--brand-hover); }
.vt-btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.vt-btn-ghost:hover { border-color: #9fb0a8; }
.vt-btn-sm { height: 38px; padding: 0 15px; font-size: 14px; }
.vt-btn-block { width: 100%; }

/* Logo WhatsApp officiel en masque : il prend la couleur qu'on lui donne. */
.vt-wa { display: inline-block; width: 18px; height: 18px; flex-shrink: 0; background-color: currentColor; -webkit-mask: url('/brand/whatsapp.svg') center / contain no-repeat; mask: url('/brand/whatsapp.svg') center / contain no-repeat; }
.vt-btn-ghost .vt-wa { background-color: var(--brand); }

/* ----- Navigation ----- */
.vt-nav { position: sticky; top: 0; z-index: 50; background: rgba(245, 247, 246, 0.86); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.vt-nav-bar { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.vt-nav-logo { flex-shrink: 0; }
.vt-nav-logo img { height: 28px; width: auto; }
.vt-nav-links { display: flex; gap: 32px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.vt-nav-right { display: flex; align-items: center; gap: 20px; }
.vt-nav-login,
.vt-terms-back { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.vt-nav-links a:hover,
.vt-nav-login:hover,
.vt-terms-back:hover { color: var(--ink); }
.vt-nav-burger { display: none; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
.vt-menu { border-top: 1px solid var(--line); background: var(--surface); }
.vt-menu nav { display: grid; padding-top: 8px; padding-bottom: 16px; }
.vt-menu a,
.vt-menu button { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 16px; font-weight: 500; color: var(--ink); text-align: left; }
.vt-menu nav > :last-child { border-bottom: 0; }
.vt-menu .vt-wa { background-color: var(--brand); }
.vt-menu .vt-menu-cta { justify-content: center; margin-top: 12px; padding: 0 22px; border: 0; border-radius: var(--r-ctl); background: var(--brand); color: #fff; }

/* ----- Héros ----- */
.vt-hero { overflow: hidden; padding: 88px 0 96px; }
.vt-hero-grid { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 64px; align-items: start; }
.vt-hero-eyebrow { margin-bottom: 22px; font-size: 15px; font-weight: 500; color: var(--brand); }
.site .vt-hero h1 { font-size: 56px; line-height: 1.02; letter-spacing: -0.042em; text-wrap: balance; }
.vt-hero .vt-lead { margin-top: 24px; }
.vt-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.vt-hero-shot { width: 900px; margin-top: -8px; }

/* ----- Captures dans leur cadre de navigateur ----- */
.vt-shot { margin: 0; border-radius: var(--r-shot); overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shot-shadow); }
.vt-shot-bar { height: 30px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.site .vt-shot-bar span { padding: 3px 16px; border-radius: var(--r-sm); background: var(--surface); font-family: var(--font-mono); font-size: 11px; color: #69766f; }
.vt-shot picture,
.vt-shot img { display: block; width: 100%; }
.vt-shot img { aspect-ratio: 1440 / 900; object-fit: cover; object-position: top; }

/* ----- Mouvement : entrée du héros, apparition au défilement, onglets ----- */
@media (prefers-reduced-motion: no-preference) {
  .vt-rise { opacity: 0; transform: translateY(10px); animation: vt-rise 0.7s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms + 80ms); }
  @keyframes vt-rise { to { opacity: 1; transform: none; } }
  .site.vt-js .vt-reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
  .site.vt-js .vt-reveal.is-visible { opacity: 1; transform: none; }
  .vt-panel:not([hidden]) { animation: vt-fade 0.45s var(--ease); }
  @keyframes vt-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ----- Faits ----- */
.vt-facts { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vt-facts ul { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vt-facts li { display: flex; gap: 14px; padding: 30px 28px; border-left: 1px solid var(--line); }
.vt-facts li:first-child { border-left: 0; padding-left: 0; }
.vt-facts svg { flex-shrink: 0; margin-top: 3px; color: var(--brand); }
.vt-facts strong { display: block; font-size: 16px; font-weight: 600; line-height: 1.35; }
.vt-facts span { display: block; margin-top: 3px; font-size: 14.5px; line-height: 1.45; color: var(--muted); }

/* ----- Parcours (onglets) ----- */
.vt-tabs { display: inline-flex; gap: 4px; max-width: 100%; margin-top: 44px; padding: 4px; overflow-x: auto; scrollbar-width: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-shot); }
.vt-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: var(--r-sm); background: transparent; font-size: 15px; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: background-color 0.2s var(--ease), color 0.2s var(--ease); }
.vt-tab[aria-selected='true'] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 26, 23, 0.08), 0 0 0 1px var(--line); }
.vt-panel { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 56px; align-items: center; margin-top: 40px; }
.vt-panel[hidden] { display: none; }
.site .vt-panel h3 { font-size: 26px; line-height: 1.2; letter-spacing: -0.025em; }
.vt-panel ul { list-style: none; display: grid; gap: 14px; margin-top: 22px; }
.vt-panel li { display: flex; gap: 12px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.vt-panel li svg { flex-shrink: 0; margin-top: 3px; color: var(--brand); }
.vt-caption { margin-top: 22px; font-size: 14px; color: var(--muted); }

/* ----- Documents ----- */
.vt-docs { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vt-docs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: 64px; align-items: center; }
.vt-docs-points { display: grid; gap: 22px; margin-top: 36px; }
.vt-docs-points div { padding-left: 18px; border-left: 2px solid var(--brand-soft-2); }
.vt-docs-points dt { font-size: 16px; font-weight: 600; }
.vt-docs-points dd { margin-top: 2px; font-size: 15.5px; color: var(--muted); }
.vt-paper-stage { padding: 44px 44px 0; overflow: hidden; border-radius: var(--r-panel); background: var(--brand-soft); }
.vt-paper { margin: 0; aspect-ratio: 1640 / 1080; overflow: hidden; border-radius: var(--r-sm) var(--r-sm) 0 0; background: #fff; box-shadow: 0 30px 60px -28px rgba(20, 62, 50, 0.35), 0 0 0 1px rgba(20, 62, 50, 0.06); }
.vt-paper picture,
.vt-paper img { width: 100%; height: 100%; }
.vt-paper img { object-fit: cover; object-position: top; }

/* ----- Photo réelle (facultative) ----- */
.vt-field-photo { margin: 0; }
.vt-field-photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }

/* ----- « Fait pour les cliniques d'ici » ----- */
.vt-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: 'phone roles roles' 'phone money secure'; gap: 16px; margin-top: 48px; }
.vt-cell { display: flex; flex-direction: column; gap: 10px; padding: 32px; overflow: hidden; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--surface); }
.vt-cell p { font-size: 15.5px; line-height: 1.55; color: var(--muted); }
.vt-cell-phone { grid-area: phone; container-type: inline-size; padding-bottom: 0; background: var(--brand); border-color: var(--brand); }
.site .vt-cell-phone h3 { color: #fff; }
/* Le téléphone reste posé sur le bord bas de la carte. Quand la grille l'étire
   à la hauteur des cartes voisines (deux colonnes, vers 1024 px), il grandit et
   montre plus d'écran, jusqu'au ratio de la capture (390 × 844, soit 168cqi pour
   une largeur de 78cqi) : au-delà, elle serait rognée sur les côtés. */
.vt-cell-phone p { margin-bottom: 16px; color: var(--on-brand-muted); }
.vt-phone-shot { align-self: center; flex: 1 0 auto; width: 78%; max-height: 168cqi; margin: auto 0 0; aspect-ratio: 390 / 560; overflow: hidden; border: 6px solid var(--device-frame); border-bottom: 0; border-radius: var(--r-device) var(--r-device) 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25); }
.vt-phone-shot picture,
.vt-phone-shot img { width: 100%; height: 100%; }
.vt-phone-shot img { object-fit: cover; object-position: top; }
.vt-cell-roles { grid-area: roles; }
.vt-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.vt-chips li { padding: 7px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.vt-cell-money { grid-area: money; background: var(--brand-soft); border-color: var(--brand-soft-2); }
.vt-cell .vt-amount { margin-top: auto; padding-top: 18px; font-size: 34px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
.vt-amount small { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.vt-cell-secure { grid-area: secure; }
.vt-cell-secure ul { list-style: none; display: grid; gap: 12px; margin-top: 8px; }
.vt-cell-secure li { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.vt-cell-secure li svg { flex-shrink: 0; margin-top: 2px; color: var(--brand); }

/* ----- Tarifs ----- */
.vt-pricing { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vt-trial { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 48px; padding: 26px 30px; border-radius: var(--r-panel); border: 1px solid var(--brand-soft-2); background: var(--brand-soft); }
.vt-trial strong { display: block; font-size: 18px; font-weight: 600; }
.vt-trial span { display: block; margin-top: 2px; font-size: 15.5px; color: var(--ink-2); }
.vt-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.vt-plan { padding: 34px 30px; border-radius: var(--r-panel); border: 1px solid var(--line-2); background: var(--surface); }
.vt-plan-for { margin-top: 4px; font-size: 15.5px; color: var(--muted); }
.vt-price { display: flex; align-items: baseline; gap: 8px; margin-top: 26px; }
.vt-price-amount { font-size: 52px; font-weight: 600; line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.vt-price-unit { font-size: 15.5px; font-weight: 500; color: var(--muted); }
.vt-plan ul { list-style: none; display: grid; gap: 10px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.vt-plan li,
.vt-included li { display: flex; gap: 10px; font-size: 16px; color: var(--ink-2); }
.vt-plan li svg,
.vt-included li svg { flex-shrink: 0; margin-top: 3px; color: var(--brand); }
.vt-included { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 40px; margin-top: 48px; }
.site .vt-included h3 { font-size: 17px; }
.vt-included ul { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; }
.vt-included li { font-size: 15.5px; }
.vt-pay-note { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }

/* ----- Fondateur ----- */
.vt-founder-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 72px; align-items: center; }
.vt-portrait { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-panel); background: var(--surface-2); }
.vt-portrait img { width: 100%; height: 100%; object-fit: cover; }
.vt-founder blockquote { margin: 0; max-width: 30ch; font-size: 30px; font-weight: 500; line-height: 1.3; letter-spacing: -0.025em; text-wrap: balance; color: var(--ink); }
.vt-who { margin-top: 26px; color: var(--ink-2); }
.vt-who strong { font-weight: 600; color: var(--ink); }
.vt-founder .vt-btn { margin-top: 28px; }

/* ----- Questions ----- */
.vt-faq-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 72px; align-items: start; }
.vt-faq-side { position: sticky; top: 108px; }
.vt-faq-side p { margin-top: 16px; font-size: 16px; color: var(--muted); }
.vt-faq-side a,
.vt-faq details a { font-weight: 500; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.vt-faq details { border-bottom: 1px solid var(--line); }
.vt-faq details:first-child { border-top: 1px solid var(--line); }
.vt-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; list-style: none; cursor: pointer; font-size: 17.5px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.vt-faq summary::-webkit-details-marker { display: none; }
.vt-faq summary svg { flex-shrink: 0; color: var(--muted); transition: transform 0.25s var(--ease); }
.vt-faq details[open] summary svg { transform: rotate(45deg); }
.vt-faq details p { padding: 0 48px 24px 0; font-size: 16px; line-height: 1.65; color: var(--ink-2); }

/* ----- Appel final ----- */
.vt-closing-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; padding: 72px 64px; border-radius: var(--r-closing); background: var(--brand); }
.site .vt-closing-panel h2 { max-width: 24ch; color: #fff; }
.vt-closing-panel .vt-lead { color: var(--on-brand-muted); }
.vt-closing-ctas { display: flex; flex-direction: column; gap: 12px; min-width: 260px; }
.vt-closing-panel .vt-btn-primary { background: #fff; color: var(--brand); box-shadow: none; }
.vt-closing-panel .vt-btn-primary:hover { background: #eef5f1; }
.vt-closing-panel .vt-btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.vt-closing-panel .vt-btn-ghost:hover { border-color: rgba(255, 255, 255, 0.6); }
.vt-closing-panel .vt-btn-ghost .vt-wa { background-color: currentColor; }

/* ----- Pied de page ----- */
.vt-footer { padding: 64px 0 40px; border-top: 1px solid var(--line); }
.vt-footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.vt-footer-brand img { height: 26px; width: auto; }
.vt-footer-brand p { max-width: 32ch; margin-top: 16px; font-size: 15px; color: var(--muted); }
.site .vt-footer-title { max-width: none; margin-bottom: 14px; font-size: 14px; line-height: 1.4; letter-spacing: 0; }
.vt-footer ul { list-style: none; display: grid; gap: 10px; }
.vt-footer ul a,
.vt-footer ul button { padding: 0; border: 0; background: none; font-size: 15px; color: var(--ink-2); text-align: left; }
.vt-footer ul a:hover,
.vt-footer ul button:hover { color: var(--ink); }
.vt-footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* ----- Connexion et inscription ----- */
.vt-auth { display: grid; grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); }
.vt-auth-aside { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 48px 0 0 48px; overflow: hidden; background: var(--surface); border-right: 1px solid var(--line); }
/* .site img impose height: auto, et la colonne flexible étirerait le logo. */
.site .vt-auth-logo { align-self: flex-start; width: auto; height: 28px; }
.site .vt-auth-aside h1 { max-width: 15ch; padding-right: 48px; font-size: 40px; line-height: 1.06; letter-spacing: -0.04em; text-wrap: balance; }
.vt-auth-trial { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 15px; color: var(--ink-2); }
.vt-auth-trial svg { color: var(--brand); }
.vt-auth-shot { width: 720px; max-width: none; border-bottom: 0; border-right: 0; border-radius: var(--r-shot) 0 0 0; }
.vt-auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 96px 24px 48px; }
.vt-auth-back { position: absolute; top: 28px; left: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.vt-auth-back:hover { color: var(--ink); }
.vt-auth-card { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 420px; }
.site .vt-auth-card h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.03em; }
.vt-auth-sub { margin-top: 6px; font-size: 15px; color: var(--muted); }
.vt-auth-switch { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-shot); border: 1px solid var(--line); background: var(--surface-2); }
.vt-auth-switch button { flex: 1; height: 38px; border: 0; border-radius: var(--r-sm); background: transparent; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.vt-auth-switch button[aria-pressed='true'] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 26, 23, 0.08), 0 0 0 1px var(--line); }
.vt-form { display: flex; flex-direction: column; gap: 16px; }
.vt-field { display: flex; flex-direction: column; gap: 6px; }
.vt-field-label { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.vt-field-control { position: relative; display: flex; align-items: center; }
.vt-field-control > svg { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.vt-field-control input { width: 100%; height: 48px; padding: 0 14px 0 42px; border-radius: var(--r-ctl); border: 1px solid var(--field-line); background: var(--surface); font-size: 16px; color: var(--ink); transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.vt-field-control input.vt-has-toggle { padding-right: 48px; }
/* 4,62:1 sur blanc : un exemple de saisie reste du texte à lire. */
.vt-field-control input::placeholder { color: #6e7773; }
.vt-field-control input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30, 77, 64, 0.14); }
.vt-field-toggle { position: absolute; right: 6px; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); }
.vt-field-phone { padding: 4px; border-radius: var(--r-ctl); border: 1px solid var(--field-line); background: var(--surface); }
.vt-link { align-self: flex-end; padding: 0; border: 0; background: none; font-size: 14px; font-weight: 500; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.vt-link-center { align-self: center; }
.vt-or { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.vt-or::before,
.vt-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.vt-google { display: flex; justify-content: center; min-height: 44px; }
.vt-auth-text { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.vt-auth-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; color: var(--muted); text-align: center; }
.vt-auth-secure { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-ctl); border: 1px solid var(--brand-soft-2); background: var(--brand-soft); font-size: 13.5px; font-weight: 500; color: var(--brand); }
.vt-auth-help { font-size: 14px; color: var(--ink-2); text-align: center; }
.vt-auth-help a { font-weight: 500; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* ----- CGU ----- */
.vt-terms-main { padding-top: 64px; padding-bottom: 96px; }
.vt-terms-header { max-width: 720px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.site .vt-terms-header h1 { font-size: 44px; line-height: 1.08; letter-spacing: -0.035em; text-wrap: balance; }
.vt-terms-header p { margin-top: 14px; font-size: 15px; color: var(--muted); }
.vt-terms-layout { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 64px; align-items: start; margin-top: 48px; }
.vt-terms-toc { position: sticky; top: 100px; display: grid; gap: 8px; font-size: 14.5px; }
.vt-terms-toc-title { margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.vt-terms-toc a { color: var(--ink-2); }
.vt-terms-toc a:hover { color: var(--brand); }
.vt-terms-content { display: grid; gap: 36px; max-width: 72ch; }
.vt-terms-warning { display: flex; gap: 12px; padding: 18px 20px; border-radius: var(--r-panel); border: 1px solid var(--brand-soft-2); background: var(--brand-soft); }
.vt-terms-warning svg { flex-shrink: 0; margin-top: 3px; color: var(--brand); }
.vt-terms-warning p { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.site .vt-terms-section h2,
.site .vt-terms-contact h2 { max-width: none; font-size: 20px; line-height: 1.3; letter-spacing: -0.015em; }
.vt-terms-section p { margin-top: 10px; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.vt-terms-contact { padding: 26px 28px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--surface); }
.vt-terms-contact > p { margin-top: 8px; font-size: 15px; color: var(--muted); }
.vt-terms-contact ul { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 14px; font-size: 15px; }
.vt-terms-contact li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.vt-terms-contact svg { color: var(--brand); }
.vt-terms-contact a { font-weight: 500; color: var(--brand); }
.vt-terms-footer { margin-top: 0; padding-top: 0; border-top: 0; }

/* ===================== Tablette ===================== */
@media (max-width: 1080px) {
  .site h2 { font-size: 38px; }
  .site .vt-hero h1 { font-size: 48px; }
  .vt-hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .vt-hero-copy { max-width: 640px; }
  .vt-hero-shot { width: 100%; margin: 0; }
  .vt-facts ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vt-facts li { border-left: 0; padding: 22px 0; }
  .vt-panel,
  .vt-docs-grid,
  .vt-faq-grid,
  .vt-founder-grid { grid-template-columns: 1fr; gap: 40px; }
  .vt-faq-side { position: static; }
  /* Rôles en pleine largeur : trois cartes empilées à droite étireraient la
     carte du téléphone bien au-delà de ce que la capture peut remplir. */
  .vt-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: 'roles roles' 'phone money' 'phone secure'; }
  .vt-included { grid-template-columns: 1fr; gap: 20px; }
  .vt-closing-panel { grid-template-columns: 1fr; }
  .vt-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vt-terms-layout { grid-template-columns: 1fr; gap: 32px; }
  .vt-terms-toc { position: static; }
}

@media (max-width: 960px) {
  .vt-auth { grid-template-columns: 1fr; }
  .vt-auth-aside { display: none; }
}

@media (min-width: 641px) {
  .vt-menu { display: none; }
}

/* ===================== Téléphone ===================== */
@media (max-width: 640px) {
  .site { --gutter: 20px; font-size: 16px; }
  .vt-section { padding: 72px 0; }
  .vt-section-tight { padding-top: 0; }
  .site h2 { font-size: 30px; line-height: 1.12; }
  .vt-lead { font-size: 17px; }
  .vt-nav-bar { height: 60px; }
  .vt-nav-links,
  .vt-nav-login { display: none; }
  .vt-nav-burger { display: inline-flex; }
  .vt-nav-right { gap: 10px; }
  .vt-terms-back { width: 40px; height: 40px; justify-content: center; }
  .vt-terms-back span { display: none; }
  .vt-hero { padding: 40px 0 0; }
  .vt-hero-eyebrow { margin-bottom: 14px; font-size: 14px; }
  .site .vt-hero h1 { font-size: 38px; line-height: 1.05; }
  .vt-hero .vt-lead { margin-top: 18px; }
  .vt-hero-ctas { flex-direction: column; margin-top: 28px; }
  .vt-hero-ctas .vt-btn { width: 100%; }
  /* Sous 640 px, les captures passent en version téléphone, dans un cadre de téléphone. */
  .vt-shot .vt-shot-bar { display: none; }
  .vt-shot img { aspect-ratio: 390 / 620; }
  .vt-hero-shot { width: 86%; margin: 8px auto 0; border: 7px solid var(--device-frame); border-bottom: 0; border-radius: var(--r-device) var(--r-device) 0 0; box-shadow: 0 -12px 40px -10px rgba(20, 62, 50, 0.35); }
  .vt-panel .vt-shot { width: 78%; margin: 0 auto; border: 6px solid var(--device-frame); border-bottom: 0; border-radius: var(--r-device) var(--r-device) 0 0; }
  .vt-facts ul { grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .vt-facts li { flex-direction: column; gap: 8px; padding: 20px 0; }
  .vt-facts span { font-size: 13.5px; }
  .vt-tabs { width: calc(100% + 2 * var(--gutter)); max-width: none; margin: 32px 0 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter); border-radius: 0; border-left: 0; border-right: 0; }
  .vt-panel { margin-top: 28px; gap: 28px; }
  .site .vt-panel h3 { font-size: 22px; }
  .vt-paper-stage { padding: 24px 24px 0; }
  .vt-bento { grid-template-columns: 1fr; grid-template-areas: 'phone' 'roles' 'money' 'secure'; }
  .vt-cell { padding: 26px 22px; }
  .vt-cell-phone { padding-bottom: 0; }
  .vt-trial { flex-direction: column; align-items: stretch; padding: 22px; }
  .vt-trial .vt-btn { width: 100%; }
  .vt-plans { grid-template-columns: 1fr; }
  .vt-price-amount { font-size: 44px; }
  .vt-included ul { grid-template-columns: 1fr; }
  .vt-founder blockquote { font-size: 23px; }
  .vt-portrait { max-width: 240px; }
  .vt-faq summary { padding: 18px 0; font-size: 16.5px; }
  .vt-faq details p { padding-right: 0; }
  .vt-closing-panel { padding: 40px 24px; border-radius: var(--r-panel); }
  .vt-closing-ctas { min-width: 0; }
  .vt-closing-ctas .vt-btn { width: 100%; }
  .vt-footer-grid { grid-template-columns: 1fr 1fr; }
  .vt-footer-brand { grid-column: 1 / -1; }
  .vt-auth-main { padding: 80px 20px 32px; }
  .vt-auth-back { top: 20px; left: 20px; }
  .vt-terms-main { padding-top: 40px; }
  .site .vt-terms-header h1 { font-size: 30px; }
}

/* Petits téléphones Android (360 px, très courants en Côte d'Ivoire) : la barre
   resserrée garde le logo, l'essai gratuit et le menu sur une seule ligne. */
@media (max-width: 400px) {
  .vt-nav-bar { gap: 12px; }
  .site .vt-nav-logo img { height: 24px; }
  .vt-nav-right { gap: 8px; }
  .vt-nav-right .vt-btn-sm { padding: 0 12px; font-size: 13px; }
  .vt-nav-burger { width: 40px; height: 40px; }
}

/* En dessous (320 px), l'essai gratuit quitte la barre : le menu le propose. */
@media (max-width: 359px) {
  .vt-nav-right .vt-btn-sm { display: none; }
}
