/* ════════════════════════════════════════════════════════════════
   MonOrdonnance — thème « Officine »
   D'après la maquette client : blanc, vert pharmacie, cartes douces.
   Clair, rassurant, lisible. Plus Jakarta Sans.
   (L'ancien thème « La Garde » est conservé : theme-la-garde.css.bak)
   ════════════════════════════════════════════════════════════════ */

:root {
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* ── Clair (référence maquette) ── */
  --c-bg: #F5F8F6;
  --c-bg-2: #EEF3F0;
  --c-surface: #FFFFFF;
  --c-surface-2: #F3F8F4;
  --c-ink: #16201A;
  --c-muted: #6B7770;
  --c-line: #E4EAE6;
  /* Vert pharmacie. La maquette du client donnait #2E9E57 : joli, mais du
     blanc dessus ne fait que 3,42 — sous le seuil AA (4,5). Comme c'est la
     couleur du bouton principal de toute l'application, on l'a assombri
     jusqu'à 4,96. L'écart se voit à peine ; la lisibilité, elle, change. */
  --c-primary: #24803F;
  --c-primary-ink: #FFFFFF;
  --c-primary-dim: #1B6E3C;      /* survol : un cran plus profond encore */
  --c-primary-soft: #E9F5EC;
  /* Vert LISIBLE pour du petit texte posé sur --c-primary-soft ou --c-surface-2,
     où même le vert assombri reste juste sous le seuil (4,42). */
  --c-primary-text: #1F7A45;
  --c-muted-strong: #5F6B64;     /* --c-muted ne passe pas sur --c-surface-2 */
  --c-accent: #D98324;           /* ambre discret (alertes douces) */
  --c-accent-ink: #FFFFFF;
  --c-accent-soft: #FCF1E2;
  --c-info: #3B82F6;
  --c-info-soft: #EFF6FF;
  --c-danger: #C4362B;
  --c-danger-soft: #FDECEA;
  --c-whatsapp: #128C50;

  --text-glow: none;
  --glow: 0 6px 16px -8px rgba(46, 158, 87, .45);
  --glow-strong: 0 10px 24px -8px rgba(46, 158, 87, .55);
  --shadow: 0 1px 2px rgba(22, 32, 26, .04), 0 10px 24px -14px rgba(22, 32, 26, .16);
  --shadow-lg: 0 2px 4px rgba(22, 32, 26, .04), 0 22px 44px -20px rgba(22, 32, 26, .22);
  --ring: rgba(46, 158, 87, .18);

  /* vignettes / teintes */
  --tint-green-bg: #E9F5EC; --tint-green-ink: #1F7A45;
  --tint-mango-bg: #FCF1E2; --tint-mango-ink: #9A6212;
  --tint-terra-bg: #FBEAE3; --tint-terra-ink: #A3452154;
  --tint-terra-ink: #A34521;
  --tint-sky-bg: #E8F1FA;   --tint-sky-ink: #245B87;
  --tint-rose-bg: #FBE9EF;  --tint-rose-ink: #97325A;
  --tint-sand-bg: #F4F0E4;  --tint-sand-ink: #71622C;

  --radius: 12px;
  --radius-lg: 16px;
}

[data-theme="dark"] {
  /* Variante nuit sobre (même langage, pas de néon) */
  --c-bg: #121714;
  --c-bg-2: #171E1A;
  --c-surface: #1B231E;
  --c-surface-2: #212B24;
  --c-ink: #E9EFEA;
  --c-muted: #9AA79F;
  --c-line: #2B362E;
  --c-primary: #4CBB74;
  --c-primary-ink: #08150C;
  --c-primary-dim: #3EA463;
  --c-primary-soft: #1C2E22;
  /* En sombre, le vert et le gris courants passent déjà largement AA
     (5,9 et 5,8) : les variables lisibles reprennent les mêmes valeurs. */
  --c-primary-text: #4CBB74;
  --c-muted-strong: #9AA79F;
  --c-accent: #E0A057;
  --c-accent-soft: #2C2317;
  --c-info: #6BA5F8;
  --c-info-soft: #18242F;
  --c-danger: #E8695C;
  --c-danger-soft: #2C1B19;

  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 28px -16px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.35), 0 26px 52px -22px rgba(0,0,0,.7);

  --tint-green-bg: #1C2E22; --tint-green-ink: #7FD8A0;
  --tint-mango-bg: #2C2317; --tint-mango-ink: #E5B978;
  --tint-terra-bg: #2E1D18; --tint-terra-ink: #E0A48C;
  --tint-sky-bg: #16232E;   --tint-sky-ink: #8FC0E8;
  --tint-rose-bg: #2A1A20;  --tint-rose-ink: #E0A0B8;
  --tint-sand-bg: #262316;  --tint-sand-ink: #D2C48C;
}

/* ── Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* L'attribut `hidden` du navigateur ne pose qu'un `display:none` de faible
   priorite : n'importe quelle classe qui declare un `display` (.btn, .pt-*)
   le bat et l'element reste VISIBLE. On le rend non negociable. */
[hidden] { display: none !important; }

/* Un <fieldset> ne se comporte pas comme un bloc ordinaire : il se
   dimensionne sur son CONTENU et son min-width vaut min-content. Résultat,
   il se recroqueville dans un formulaire large et déborde dans un étroit.
   On le normalise ici plutôt que dans chaque composant. */
fieldset { min-width: 0; width: 100%; }

body {
  margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  color: var(--c-ink); background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
img { max-width: 100%; display: block; }
/* La couleur des liens suit --c-primary (qui change selon le thème).
   ⚠️ Ne jamais ajouter `[data-theme="dark"] a { color: … }` : sa spécificité
   écraserait les classes de composants et casserait leurs contrastes. */
a { color: var(--c-primary); text-decoration: none; font-weight: 600; }
a:hover { color: var(--c-primary-dim); }

h1, h2, h3, h4 {
  font-family: var(--font-display); font-weight: 800; line-height: 1.22;
  letter-spacing: -.02em; margin: 0 0 .4em; color: var(--c-ink);
}
h1 em, h2 em { font-style: normal; color: var(--c-primary); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 900px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--c-primary);
  color: #fff; padding: 10px 18px; z-index: 1000; border-radius: 0 0 10px 0; }
.skip-link:focus { left: 0; }

/* ── Boutons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  padding: 12px 20px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink);
  transition: background .18s, border-color .18s, box-shadow .2s, transform .15s;
}
.btn:hover { border-color: color-mix(in srgb, var(--c-primary) 45%, var(--c-line)); color: var(--c-ink); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-primary); color: var(--c-primary-ink); border-color: transparent; box-shadow: var(--glow); }
.btn-primary:hover { background: var(--c-primary-dim); color: var(--c-primary-ink); box-shadow: var(--glow-strong); }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-block { width: 100%; }
/* Un bouton désactivé doit se voir. Sans cette règle il gardait l'aspect
   d'un bouton actif — le livreur cliquait dans le vide sans comprendre. */
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
/* …et il ne doit pas s'animer au survol, sinon il a l'air cliquable. */
.btn-primary:disabled:hover { background: var(--c-primary); box-shadow: none; }
.btn-whatsapp { background: var(--c-whatsapp); color: #fff; border-color: transparent; }
.btn-whatsapp:hover { background: #0E7442; color: #fff; }

/* ── Header ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--c-surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-cross { color: var(--c-primary); display: grid; place-items: center; }
.brand-dot { fill: #fff; }
.brand-name { font-family: var(--font-display); font-size: 19px; font-weight: 800; color: var(--c-ink); letter-spacing: -.03em; }
.brand-name em { font-style: normal; color: var(--c-primary); }

.main-nav { display: flex; gap: 2px; }
.main-nav a { padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14.5px; color: var(--c-muted); }
.main-nav a:hover { background: var(--c-surface-2); color: var(--c-ink); }
.main-nav a.active { color: var(--c-primary); background: var(--c-primary-soft); }
.nav-new { font-size: 9px; font-weight: 800; letter-spacing: .05em; color: var(--c-primary); margin-left: 2px; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn, .cart-btn {
  position: relative; display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; border: 1px solid var(--c-line); background: var(--c-surface);
  color: var(--c-ink); cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .15s;
}
.icon-btn:hover, .cart-btn:hover { border-color: var(--c-primary); color: var(--c-primary); box-shadow: var(--shadow); }
.icon-moon { display: block; } .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; } [data-theme="dark"] .icon-sun { display: block; }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center; background: var(--c-primary); color: #fff;
  border-radius: 999px; font-size: 11px; font-weight: 800; border: 2px solid var(--c-surface);
}
.cart-count.bump { animation: bump .4s ease; }
@keyframes bump { 0%{transform:scale(1);} 40%{transform:scale(1.4);} 100%{transform:scale(1);} }

/* Cloche de notifications */
.bell-btn { position: relative; }
.bell-dot { position: absolute; top: 7px; right: 9px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-primary); border: 2px solid var(--c-surface); }
.bell-dot[hidden] { display: none; }
.bell-count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center; background: var(--c-primary); color: #fff;
  border-radius: 999px; font-size: 11px; font-weight: 800; border: 2px solid var(--c-surface); }
.bell-count[hidden] { display: none; }
.bell-count.bump { animation: bump .4s ease; }

/* Liste des notifications */
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif { display: flex; align-items: flex-start; gap: 14px; padding: 15px 18px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); transition: border-color .2s, transform .16s; }
.notif:hover { border-color: var(--c-primary); transform: translateY(-2px); }
.notif.is-unread { background: var(--c-primary-soft); border-color: color-mix(in srgb, var(--c-primary) 30%, transparent); }
.notif-emoji { font-size: 20px; width: 42px; height: 42px; flex-shrink: 0; display: grid;
  place-items: center; border-radius: 12px; background: var(--c-surface); }
.notif-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-body b { font-size: 14.5px; color: var(--c-ink); }
.notif-body small { font-size: 13px; color: var(--c-muted); }
.notif-body time { font-size: 11.5px; color: var(--c-muted); margin-top: 3px; }
.notif-pastille { width: 9px; height: 9px; border-radius: 50%; background: var(--c-primary);
  flex-shrink: 0; align-self: center; }

.account-menu { display: flex; align-items: center; gap: 6px; }
.account-btn { display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px;
  border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface);
  color: var(--c-ink); font-weight: 700; font-size: 13.5px; transition: border-color .2s, box-shadow .2s; }
.account-btn:hover { border-color: var(--c-primary); color: var(--c-ink); box-shadow: var(--shadow); }
.account-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--c-primary-soft); color: var(--c-primary); font-weight: 800; font-size: 13px; }
.account-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-btn { width: 40px; height: 40px; }
.account-login { padding: 9px 18px; font-size: 13.5px; }
@media (max-width: 620px) { .account-name { display: none; } .account-btn { padding: 5px; } }
/* Téléphone étroit : logo + quatre boutons doivent tenir sur une ligne. */
@media (max-width: 420px) {
  .header-actions { gap: 6px; }
  .icon-btn, .cart-btn, .logout-btn { width: 36px; height: 36px; }
  .account-btn { padding: 3px; }
  .account-avatar { width: 28px; height: 28px; }
  .account-login { padding: 8px 12px; }
  .brand { gap: 6px; }
  .brand-cross svg { width: 24px; height: 24px; }
  .brand-name { font-size: 17px; }
}

/* ── Bandeau défilant ───────────────────────────────────────────── */
.ticker { overflow: hidden; white-space: nowrap; background: var(--c-primary-soft); color: var(--c-primary);
  font-size: 12.5px; font-weight: 700; padding: 8px 0; border-bottom: 1px solid var(--c-line); }
.ticker-track { display: inline-flex; align-items: center; gap: 24px; animation: ticker 34s linear infinite; padding-left: 24px; }
.ticker-track i { font-style: normal; opacity: .5; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ── Accueil (maquette client) ─────────────────────────────────── */
.home { padding: 34px 0 60px; }
.home-head { margin-bottom: 22px; }
.home-head h1 { font-size: clamp(28px, 4.4vw, 38px); line-height: 1.2; margin-bottom: 12px; }
.home-head h1 em { display: inline-block; color: var(--c-primary); font-style: normal; }
.home-lead { color: var(--c-muted); font-size: 15.5px; margin: 0; max-width: 46ch; }
.home-lead b { color: var(--c-ink); }

/* Recherche produit */
.home-search {
  display: flex; align-items: center; gap: 10px; margin-bottom: 24px;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: 999px; padding: 6px 8px 6px 18px; box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.home-search:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--ring); }
.home-search .hs-icon { color: var(--c-muted); flex-shrink: 0; }
.home-search input {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font-family: var(--font-body); font-size: 15.5px; color: var(--c-ink); padding: 8px 0;
}
.home-search input::placeholder { color: var(--c-muted); }
.hs-rayons {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  background: var(--c-primary); color: #fff; border-radius: 999px;
  padding: 10px 18px 10px 14px; font-size: 14.5px; font-weight: 600; white-space: nowrap;
  transition: background .18s, box-shadow .2s;
}
.hs-rayons:hover { background: var(--c-primary-dim); color: #fff; box-shadow: var(--glow); }
/* Téléphone : la place va au texte du champ, pas aux icônes. */
@media (max-width: 420px) {
  .home-search { padding-left: 14px; }
  .home-search .hs-icon, .hs-rayons svg { display: none; }
  .hs-rayons { padding: 10px 14px; font-size: 13.5px; }
}

/* Recherche en direct : les produits apparaissent au fil des lettres. */
.home-search, .listing-search { position: relative; }
.suggest-panel {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 8px);
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  max-height: 70vh; overflow-y: auto; padding: 6px; text-align: left;
}
.suggest-panel[hidden] { display: none; }
.suggest-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius); color: var(--c-ink); font-weight: 400;
}
.suggest-item:hover, .suggest-item:focus { background: var(--c-surface-2); outline: none; }
.suggest-nom { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.suggest-nom b { font-size: 15px; font-weight: 700; }
.suggest-nom small { font-size: 12.5px; color: var(--c-muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.suggest-prix { font-weight: 700; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.suggest-etat { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.suggest-etat.disponible { background: var(--c-primary-soft); color: var(--c-primary-text); }
.suggest-etat.ordonnance { background: var(--c-accent-soft); color: var(--tint-mango-ink); }
.suggest-etat.rupture { background: var(--c-surface-2); color: var(--c-muted); }
.suggest-vide, .suggest-tout {
  display: block; padding: 11px 12px; font-size: 14px; color: var(--c-muted);
}
.suggest-tout { font-weight: 700; color: var(--c-primary-text); text-align: center; }
@media (max-width: 480px) { .suggest-etat { display: none; } }

/* Carte « Nos gammes » */
.gammes-card {
  position: relative; background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px 22px;
  margin: 22px 0 8px;
}
.gammes-card[hidden] { display: none; }
.gammes-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--c-line); background: var(--c-surface);
  color: var(--c-muted); font-size: 14px; transition: background .18s, color .18s;
}
.gammes-close:hover { background: var(--c-surface-2); color: var(--c-ink); }
.gammes-badge {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; background: var(--c-primary); color: #fff;
  border-radius: 999px; padding: 4px 11px; margin-bottom: 12px;
}
.gammes-card h2 { font-size: 20px; margin: 0 0 6px; }
.gammes-lead { color: var(--c-muted); font-size: 14px; margin: 0 0 18px; }
.gammes-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

/* Bandeau pleine largeur : fond teinté, texte à gauche, photo qui déborde à droite. */
.gamme-banner {
  display: flex; align-items: stretch; min-height: 104px;
  border-radius: var(--radius); overflow: hidden;
  transition: transform .18s, box-shadow .22s;
}
.gamme-banner:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.gamme-banner-texte {
  flex: 1 1 56%; min-width: 0; display: flex; flex-direction: column;
  justify-content: space-between; gap: 8px; padding: 14px 12px 12px 16px;
}
.gamme-banner-info { display: flex; flex-direction: column; gap: 3px; }
.gamme-banner-info b { font-size: 14.5px; line-height: 1.25; }
.gamme-banner-info small { font-size: 11.5px; font-weight: 500; line-height: 1.35; opacity: .82; }
.gamme-fleche {
  align-self: flex-start; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--c-primary); color: #fff; font-size: 13px; flex-shrink: 0;
}
.gamme-banner-photo { flex: 0 0 36%; position: relative; overflow: hidden; }
/* La photo remplit sa colonne sans jamais décider de la hauteur du bandeau :
   sinon une image haute étire la carte, et le texte reste minuscule. */
.gamme-banner-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; display: block;
}

/* Grand écran : le texte suit la largeur du bandeau au lieu de rester à la
   taille d'un téléphone au milieu d'un grand cadre vide. */
@media (min-width: 720px) {
  .gammes-card { padding: 30px 32px; }
  .gammes-card h2 { font-size: 26px; max-width: 30ch; margin-bottom: 18px; }
  .gammes-grid { gap: 16px; }
  .gamme-banner { min-height: 150px; }
  .gamme-banner-texte { padding: 22px 20px 20px 26px; flex-basis: 58%; }
  .gamme-banner-info { gap: 6px; }
  .gamme-banner-info b { font-size: 21px; }
  .gamme-banner-info small { font-size: 15px; }
  .gamme-fleche { width: 38px; height: 38px; font-size: 16px; }
  .gamme-banner-photo { flex-basis: 42%; }
}
.gamme-banner-photo-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px;
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.gammes-conseil {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--c-whatsapp);
}
.home-block { margin-top: 40px; }

/* Signature de marque dans l'en-tête */
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-tagline { font-size: 10.5px; color: var(--c-muted); font-weight: 500; }
@media (max-width: 520px) { .brand-tagline { display: none; } }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero { position: relative; padding: 54px 0 60px; background: var(--c-bg); }
.hero::before { content: none; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.hero-kicker {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--c-primary); background: var(--c-primary-soft);
  padding: 5px 12px; border-radius: 999px; margin: 0 0 16px;
  animation: fadeUp .5s ease both;
}
.hero h1 { font-size: clamp(32px, 4.6vw, 46px); margin-bottom: 14px; animation: fadeUp .5s .07s ease both; }
.hero h1 .glow, .hero h1 em { color: var(--c-primary); }
.hero-sub { font-size: 16.5px; color: var(--c-muted); max-width: 50ch; margin: 0 0 24px; animation: fadeUp .5s .14s ease both; }

.hero-search {
  display: flex; align-items: center; gap: 10px; max-width: 540px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 14px;
  padding: 6px 6px 6px 16px; box-shadow: var(--shadow);
  animation: fadeUp .5s .21s ease both; transition: border-color .2s, box-shadow .2s;
}
.hero-search:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--ring); }
.hero-search svg { color: var(--c-muted); flex-shrink: 0; }
.hero-search input { flex: 1; min-width: 0; border: none; background: none; outline: none;
  font-family: var(--font-body); font-size: 15.5px; color: var(--c-ink); }
.hero-search input::placeholder { color: var(--c-muted); }
.hero-search button { border: none; cursor: pointer; background: var(--c-primary); color: #fff;
  font-family: var(--font-body); font-weight: 700; font-size: 15px; padding: 12px 22px; border-radius: 10px;
  transition: background .18s; }
.hero-search button:hover { background: var(--c-primary-dim); }

.hero-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; animation: fadeUp .5s .28s ease both; }
.chips-label { font-weight: 700; color: var(--c-muted); font-size: 14px; margin-right: 2px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  background: var(--c-surface); border: 1px solid var(--c-line);
  color: var(--c-muted); font-size: 13.5px; font-weight: 600;
  transition: border-color .18s, color .18s, background .18s, transform .18s;
}
.chip:hover { border-color: var(--c-primary); background: var(--c-primary-soft); color: var(--c-primary); transform: translateY(-1px); }
.chip-active { background: var(--c-primary); border-color: transparent; color: #fff; }
.chip-active:hover { background: var(--c-primary-dim); color: #fff; }
.chip-sm { font-size: 12.5px; padding: 5px 11px; }

/* CTA d'upload */
.upload-cta {
  position: relative; display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; margin: 6px 0 18px; border-radius: var(--radius-lg);
  background: var(--c-surface); border: 1px solid var(--c-line);
  color: var(--c-ink); box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .22s, border-color .2s;
  animation: fadeUp .5s .24s ease both;
}
.upload-cta::after { content: none; }
.upload-cta:hover { transform: translateY(-2px); border-color: var(--c-primary); box-shadow: var(--shadow-lg); color: var(--c-ink); }
.upload-cta-icon {
  display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 14px; background: var(--c-primary); color: #fff; font-size: 24px;
}
.upload-cta-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.upload-cta-text b { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.upload-cta-text small { font-size: 13px; color: var(--c-muted); }
.upload-cta-arrow {
  display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary); font-size: 16px;
  transition: transform .2s, background .2s, color .2s;
}
.upload-cta:hover .upload-cta-arrow { transform: translateX(3px); background: var(--c-primary); color: #fff; }

.hero-secondary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; animation: fadeUp .5s .3s ease both; }
.hero-browse { font-weight: 600; color: var(--c-muted); font-size: 14.5px; }
.hero-browse:hover { color: var(--c-primary); }

/* Carte « comment ça marche » */
.hero-flow {
  justify-self: center; width: min(360px, 92vw);
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); padding: 24px 26px; box-shadow: var(--shadow-lg);
  animation: fadeUp .6s .3s ease both;
}
.hero-flow .flow-head { font-weight: 700; font-size: 13px; color: var(--c-muted);
  text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.flow-cross { color: var(--c-primary); font-size: 16px; }
.flow-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.flow-steps li { display: flex; align-items: center; gap: 14px; }
.flow-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--c-primary-soft); color: var(--c-primary); font-weight: 800; font-size: 14px; flex-shrink: 0; }
.flow-steps b { display: block; font-size: 14.5px; }
.flow-steps small { color: var(--c-muted); font-size: 13px; }

/* Panneau « ticket » (récapitulatifs) */
.hero-ticket { position: relative; justify-self: center; animation: fadeUp .6s .25s ease both; }
.ticket { background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); padding: 22px 24px; width: min(330px, 90vw); box-shadow: var(--shadow-lg); }
.ticket-head { display: flex; align-items: center; gap: 12px; }
.ticket-cross { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--c-primary-soft); color: var(--c-primary); font-size: 20px; }
.ticket-head strong { font-family: var(--font-display); display: block; font-size: 15px; font-weight: 800; }
.ticket-head small { color: var(--c-muted); font-size: 12px; }
.ticket-stamp { margin-left: auto; font-size: 10.5px; font-weight: 800; text-align: center; line-height: 1.25;
  color: var(--c-primary); background: var(--c-primary-soft); border-radius: 8px; padding: 5px 9px; }
.ticket-sep { border-top: 1px solid var(--c-line); margin: 16px 0; }
.ticket-lines { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.ticket-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; }
.ticket-lines b { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.ticket-delivery { color: var(--c-muted); }
.ticket-total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-display); font-size: 19px; font-weight: 800; }
.ticket-total b { font-variant-numeric: tabular-nums; color: var(--c-primary); }
.ticket-total small { font-size: 11px; color: var(--c-muted); font-weight: 500; }
.ticket-paid { margin-top: 14px; text-align: center; font-weight: 700; font-size: 13px;
  color: var(--c-primary); background: var(--c-primary-soft); border-radius: 10px; padding: 9px; }
.ticket-shadow { display: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ── Étapes ─────────────────────────────────────────────────────── */
.steps { padding: 40px 0 8px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { position: relative; background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); padding: 26px 22px 20px; box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .22s; }
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.step-num { position: absolute; top: -14px; left: 20px; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%; font-weight: 800; font-size: 14px;
  background: var(--c-primary); color: #fff; }
.step h3 { font-size: 17px; margin: 6px 0; }
.step p { margin: 0; color: var(--c-muted); font-size: 14.5px; }

/* ── Sections ───────────────────────────────────────────────────── */
section { scroll-margin-top: 84px; }
.section-head { margin-bottom: 24px; }
.section-head h2 { font-size: clamp(23px, 3vw, 30px); }
.section-head p { color: var(--c-muted); margin: 6px 0 0; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.link-arrow { font-weight: 700; white-space: nowrap; font-size: 14.5px; }
.symptoms-section, .featured-section, .categories-section { padding: 40px 0; }

/* ── Symptômes ──────────────────────────────────────────────────── */
.symptom-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.symptom-card { display: flex; align-items: center; gap: 12px; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--radius); padding: 15px 16px;
  color: var(--c-ink); font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow);
  transition: border-color .2s, transform .18s, box-shadow .22s;
  animation: fadeUp .45s calc(var(--i) * .04s) ease both; }
.symptom-card:hover { border-color: var(--c-primary); transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--c-ink); }
.symptom-emoji { font-size: 22px; }
.symptom-name { flex: 1; }
.symptom-arrow { color: var(--c-primary); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; }
.symptom-card:hover .symptom-arrow { opacity: 1; transform: translateX(0); }

/* ── Cartes produit ────────────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product-card { display: flex; flex-direction: column; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .24s, border-color .2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c-primary) 35%, var(--c-line)); }
.card-media { position: relative; display: grid; place-items: center; aspect-ratio: 5 / 3.4; overflow: hidden; }
.card-media::before { content: none; }
.card-emoji { font-size: 48px; transition: transform .28s ease; }
.product-card:hover .card-emoji { transform: scale(1.1); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.tint-green { background: var(--tint-green-bg); color: var(--tint-green-ink); }
.tint-mango { background: var(--tint-mango-bg); color: var(--tint-mango-ink); }
.tint-terra { background: var(--tint-terra-bg); color: var(--tint-terra-ink); }
.tint-sky   { background: var(--tint-sky-bg);   color: var(--tint-sky-ink); }
.tint-rose  { background: var(--tint-rose-bg);  color: var(--tint-rose-ink); }
.tint-sand  { background: var(--tint-sand-bg);  color: var(--tint-sand-ink); }

.stamp { position: absolute; top: 10px; right: 10px; font-size: 10.5px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 8px;
  background: var(--c-surface); color: var(--c-accent); box-shadow: var(--shadow); }
.stamp-rx { color: var(--c-accent); }
.stamp-low { color: var(--c-accent); }
.stamp-lg { font-size: 12px; padding: 6px 12px; }

.card-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.card-category { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); margin: 0 0 5px; }
.card-title { font-size: 15.5px; margin: 0 0 2px; line-height: 1.3; }
.card-title a { color: var(--c-ink); }
.card-title a:hover { color: var(--c-primary); }
.card-generic { font-size: 12.5px; color: var(--c-muted); margin: 0; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--c-line); }
.price { display: flex; flex-direction: column; gap: 1px; }
.price-fc { font-family: var(--font-display); font-weight: 800; font-size: 16.5px; font-variant-numeric: tabular-nums; color: var(--c-primary); }
.price-usd { font-size: 11px; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.add-btn { border: none; background: var(--c-primary); color: #fff;
  font-family: var(--font-body); font-weight: 700; font-size: 12.5px;
  padding: 9px 15px; border-radius: 10px; cursor: pointer; white-space: nowrap;
  transition: background .18s, transform .16s, box-shadow .2s; }
.add-btn:hover { background: var(--c-primary-dim); transform: translateY(-1px); box-shadow: var(--glow); }
.js-add-to-cart .add-done { display: none; }
.js-add-to-cart.added { background: var(--c-primary-dim); }
.js-add-to-cart.added .add-label { display: none; }
.js-add-to-cart.added .add-done { display: inline; }
.rx-lock { font-size: 19px; opacity: .8; cursor: help; }
.out-of-stock { font-size: 12.5px; font-weight: 700; color: var(--c-danger); }

/* ── Rayons ─────────────────────────────────────────────────────── */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.category-card { display: flex; align-items: center; gap: 15px; border-radius: var(--radius-lg);
  padding: 18px 20px; background: var(--c-surface); border: 1px solid var(--c-line);
  box-shadow: var(--shadow); transition: transform .18s, box-shadow .22s, border-color .2s; }
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--c-primary); }
.category-emoji { font-size: 24px; width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 12px; background: color-mix(in srgb, currentColor 14%, transparent); }
.category-card h3 { font-size: 15.5px; margin: 0; color: var(--c-ink); }
.category-card p { margin: 3px 0 0; font-size: 12.5px; color: var(--c-muted); line-height: 1.45; }

/* ── Packs ─────────────────────────────────────────────────────── */
.packs-section { padding: 44px 0; }
.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pack-card { display: flex; flex-direction: column; gap: 4px; padding: 22px 20px;
  border-radius: var(--radius-lg); min-height: 196px; position: relative; overflow: hidden;
  background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .24s, border-color .2s; }
.pack-card::after { content: none; }
.pack-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: currentColor; }
.pack-emoji { font-size: 30px; width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: 16px; background: color-mix(in srgb, currentColor 15%, transparent); }
.pack-card h3 { font-size: 18px; margin: 14px 0 0; color: var(--c-ink); }
.pack-card p { margin: 4px 0 0; font-size: 13.5px; color: var(--c-muted); flex: 1; line-height: 1.5; }
.pack-count { font-weight: 700; font-size: 12.5px; color: currentColor; margin-top: 10px; }
/* En-tête d'une gamme : la photo occupe tout un côté, pas une vignette.
   Sur téléphone, elle passe au-dessus du texte, sur toute la largeur. */
.pack-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  border-radius: var(--radius-lg); margin: 6px 0 20px; overflow: hidden; min-height: 260px;
}
.pack-hero-texte { display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 32px 34px; min-width: 0; }
.pack-hero h1 { margin: 0; color: inherit; font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.12; overflow-wrap: anywhere; hyphens: auto; }
.pack-hero p { margin: 0; opacity: .85; color: inherit; font-size: 16px; }
.pack-hero .pack-hero-promesse { font-weight: 700; opacity: 1; margin-top: 4px; }
.pack-hero-media { position: relative; min-height: 220px; }
.pack-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; }
.pack-hero-emoji { display: grid; place-items: center; font-size: 72px;
  background: color-mix(in srgb, currentColor 12%, transparent); }
@media (max-width: 680px) {
  .pack-hero { grid-template-columns: 1fr; min-height: 0; }
  .pack-hero-media, .pack-hero-emoji { order: -1; aspect-ratio: 16 / 10; min-height: 0; }
  .pack-hero-emoji { aspect-ratio: auto; padding: 26px 0; font-size: 56px; }
  .pack-hero-texte { padding: 20px 20px 24px; }
}
.pack-desc { color: var(--c-muted); max-width: 64ch; margin: 0 0 22px; }
.home-symptom-chips { margin-bottom: 22px; }

/* ── Bandeau ordonnance ────────────────────────────────────────── */
.coming-soon { margin: 44px 0 0; padding: 56px 0; position: relative;
  background: var(--c-primary-soft); border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.coming-soon::before { content: none; }
.coming-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.coming-soon h2 { font-size: clamp(24px, 3.2vw, 34px); }
.coming-soon h2 em { color: var(--c-primary); }
.coming-soon p { color: var(--c-muted); max-width: 58ch; }
.coming-cta { background: var(--c-primary); color: #fff; border-color: transparent; margin-top: 6px; }
.coming-cta:hover { background: var(--c-primary-dim); color: #fff; }
.coming-find { display: block; margin-top: 14px; font-weight: 600; }

.rx-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0;
  font-size: 14.5px; border-bottom: 1px solid var(--c-line); }
.rx-line em { font-style: normal; font-size: 12px; font-weight: 700; }
.rx-done em { color: var(--c-primary); } .rx-wait em { color: var(--c-accent); } .rx-wait span { color: var(--c-muted); }
.rx-progress { height: 8px; border-radius: 999px; background: var(--c-surface-2); margin: 16px 0 8px; overflow: hidden; }
.rx-progress i { display: block; height: 100%; background: var(--c-primary); border-radius: 999px; }
.rx-note { color: var(--c-muted); font-size: 12.5px; }

/* ── Listing ────────────────────────────────────────────────────── */
.listing { padding: 36px 0 60px; }
.listing-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.listing-head h1 { font-size: clamp(26px, 3.6vw, 36px); margin: 0; }
.listing-count { color: var(--c-muted); font-size: 14px; font-weight: 600; }
.listing-search { display: flex; align-items: center; gap: 10px; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: 999px; padding: 4px 6px 4px 16px; max-width: 520px;
  margin-bottom: 22px; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.listing-search:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--ring); }
.listing-search svg { color: var(--c-muted); flex-shrink: 0; }
.listing-search input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-family: var(--font-body); font-size: 15px; color: var(--c-ink); }
.listing-search button { border: none; cursor: pointer; background: var(--c-primary); color: #fff;
  font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 999px; font-family: var(--font-body); }
.filter-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); margin-right: 4px; flex-shrink: 0; }

/* ── Fiche produit ─────────────────────────────────────────────── */
.detail { padding: 28px 0 60px; }
.breadcrumb { font-size: 13.5px; color: var(--c-muted); margin-bottom: 22px; }
.breadcrumb span { color: var(--c-ink); }
.detail-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; margin-bottom: 52px; }
.detail-media { position: relative; display: grid; place-items: center; border-radius: var(--radius-lg);
  min-height: 360px; overflow: hidden; }
.detail-media::before { content: none; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-emoji { font-size: 100px; }
.detail-info h1 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 4px; }
.detail-generic { color: var(--c-muted); font-size: 15.5px; margin: 0 0 4px; }
.detail-presentation { font-size: 14px; color: var(--c-muted); margin: 0; }
.detail-price { display: flex; align-items: baseline; gap: 14px; margin: 20px 0; padding: 16px 20px;
  background: var(--c-primary-soft); border-radius: var(--radius); width: fit-content; }
.detail-price .price-fc { font-size: 28px; }
.detail-price .price-usd { font-size: 14px; }
.detail-buy { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.qty-picker { display: inline-flex; align-items: center; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface); overflow: hidden; }
.qty-btn { border: none; background: none; cursor: pointer; width: 42px; height: 46px; font-size: 20px; color: var(--c-ink); transition: background .15s, color .15s; }
.qty-btn:hover { background: var(--c-primary-soft); color: var(--c-primary); }
.qty-picker input { width: 46px; text-align: center; border: none; background: none; outline: none;
  font-family: var(--font-body); font-size: 16px; font-weight: 700; color: var(--c-ink); -moz-appearance: textfield; appearance: textfield; }
.qty-picker input::-webkit-outer-spin-button, .qty-picker input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-sm .qty-btn { width: 34px; height: 38px; font-size: 17px; } .qty-sm input { width: 36px; font-size: 14.5px; }
.rx-notice { background: var(--c-accent-soft); border: 1px solid color-mix(in srgb, var(--c-accent) 30%, transparent);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 24px; }
.rx-notice strong { color: var(--c-accent); }
.rx-notice p { margin: 8px 0 12px; font-size: 14.5px; color: var(--c-muted); }
.detail-block { margin-bottom: 20px; }
.detail-block h3 { font-size: 15.5px; margin-bottom: 6px; }
.detail-block p { margin: 0; color: var(--c-ink); font-size: 15px; }
.detail-block small { color: var(--c-muted); font-size: 12.5px; }
.related-head { margin-top: 20px; }

/* ── Panier ─────────────────────────────────────────────────────── */
.cart-page, .checkout-page, .confirm-page { padding: 36px 0 68px; }
.cart-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: start; }
.cart-lines { display: flex; flex-direction: column; gap: 12px; }
.cart-line { display: flex; align-items: center; gap: 16px; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 14px 18px 14px 14px;
  box-shadow: var(--shadow); transition: opacity .3s, transform .3s; }
.cart-line.removing { opacity: 0; transform: translateX(20px); }
.cart-thumb { display: grid; place-items: center; width: 62px; height: 62px; flex-shrink: 0;
  border-radius: 12px; font-size: 26px; overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-info h3 { font-size: 15.5px; margin: 0; } .cart-line-info h3 a { color: var(--c-ink); }
.cart-line-info p { margin: 0; font-size: 12.5px; color: var(--c-muted); }
.cart-unit { font-variant-numeric: tabular-nums; }
.cart-line-actions { display: flex; align-items: center; gap: 14px; }
.cart-line-total { font-family: var(--font-display); font-weight: 800; font-size: 15.5px;
  font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; color: var(--c-primary); }
.remove-btn { border: 1px solid var(--c-line); background: var(--c-surface); cursor: pointer; color: var(--c-muted);
  font-size: 14px; width: 32px; height: 32px; border-radius: 50%; transition: background .15s, color .15s, border-color .2s; }
.remove-btn:hover { background: var(--c-danger-soft); color: var(--c-danger); border-color: var(--c-danger); }
.cart-summary { width: 100%; background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px 24px; }
.cart-summary h2 { font-size: 19px; margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; font-size: 15px; }
.summary-row b { font-variant-numeric: tabular-nums; }
.summary-usd { color: var(--c-muted); font-size: 13px; }
.summary-hint { color: var(--c-muted); font-size: 13px; font-style: italic; }
.cart-summary .btn { margin-top: 14px; }
.continue-link { display: block; text-align: center; margin-top: 14px; font-size: 14px; font-weight: 600; }

/* ── Checkout ──────────────────────────────────────────────────── */
.checkout-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: start; }
.checkout-form fieldset { border: 1px solid var(--c-line); background: var(--c-surface);
  border-radius: var(--radius-lg); padding: 20px 22px 22px; margin: 0 0 18px; box-shadow: var(--shadow); }
.checkout-form legend { font-family: var(--font-display); font-weight: 800; font-size: 16px; padding: 0 8px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field label small { color: var(--c-muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--c-ink);
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--ring); }
.field input::placeholder, .field textarea::placeholder { color: var(--c-muted); }
.field .errorlist { color: var(--c-danger); font-size: 13px; margin: 4px 0 0; padding-left: 0; list-style: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Moyens de paiement */
.pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-option { position: relative; display: flex; align-items: center; gap: 10px; border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 13px 15px; cursor: pointer; font-weight: 600; font-size: 14.5px;
  background: var(--c-surface); transition: border-color .2s, background .2s, box-shadow .2s; }
.pay-option:hover { border-color: var(--c-primary); }
.pay-option input { position: absolute; opacity: 0; }
.pay-option-dot { width: 12px; height: 12px; border-radius: 50%; margin-left: auto; flex-shrink: 0; }
.pay-opt-mpesa .pay-option-dot { background: #E60000; } .pay-opt-orange .pay-option-dot { background: #FF7900; }
.pay-opt-airtel .pay-option-dot { background: #ED1C24; } .pay-opt-visa .pay-option-dot { background: #1A1F71; }
.pay-opt-cash .pay-option-dot { background: var(--c-primary); }
.pay-option:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); box-shadow: 0 0 0 3px var(--ring); }
.pay-note { font-size: 13px; color: var(--c-muted); margin: 12px 0 0; }
.checkout-ticket { position: sticky; top: 90px; }
.secure-note { text-align: center; font-size: 12.5px; color: var(--c-muted); margin: 10px 0 0; }

/* Mode de réception : livraison / retrait */
.fulfil-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.fulfil-option { position: relative; display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--c-line); border-radius: var(--radius); padding: 15px 16px; cursor: pointer;
  background: var(--c-surface); transition: border-color .2s, background .2s, box-shadow .2s; }
.fulfil-option:hover { border-color: var(--c-primary); }
.fulfil-option input { position: absolute; opacity: 0; }
.fulfil-emoji { font-size: 24px; line-height: 1; flex-shrink: 0; }
.fulfil-body { display: flex; flex-direction: column; gap: 1px; }
.fulfil-body b { font-size: 14.5px; }
.fulfil-body small { font-size: 12.5px; color: var(--c-muted); }
.fulfil-option:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); box-shadow: 0 0 0 3px var(--ring); }
.fulfil-option:has(input:checked) .fulfil-body small { color: var(--c-primary); }
.fulfil-panel[hidden] { display: none; }
.pickup-info { background: var(--c-primary-soft); border-radius: var(--radius); padding: 16px 18px; }
.pickup-info p { margin: 0 0 6px; font-size: 14.5px; } .pickup-info p:last-child { margin: 0; }
.pickup-address { font-weight: 700; }
.pickup-hint { color: var(--c-muted); font-size: 13.5px !important; }
@media (max-width: 620px) { .fulfil-options { grid-template-columns: 1fr; } }

/* ── Confirmation ──────────────────────────────────────────────── */
.confirm-page .confirm-card { max-width: 520px; margin: 0 auto; text-align: center; padding: 38px 34px 42px; }
.confirm-stamp { width: 74px; height: 74px; margin: 0 auto 18px; display: grid; place-items: center;
  border-radius: 50%; background: var(--c-primary); color: #fff; font-size: 34px; font-weight: 800;
  animation: pop .45s cubic-bezier(.2,1.5,.5,1) both; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.confirm-card h1 { font-size: 28px; }
.confirm-number { color: var(--c-muted); } .confirm-number b { color: var(--c-ink); font-variant-numeric: tabular-nums; }
.confirm-card .ticket-lines { text-align: left; }
.confirm-payment { text-align: left; background: var(--c-primary-soft); border-radius: var(--radius);
  padding: 16px 18px; margin: 18px 0; font-size: 14.5px; }
.confirm-payment p { margin: 0 0 8px; } .confirm-payment p:last-child { margin: 0; }
.confirm-delay { color: var(--c-muted); font-size: 13.5px; }

/* ── États vides & messages ────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; background: var(--c-surface);
  border: 1px dashed var(--c-line); border-radius: var(--radius-lg); }
.empty-emoji { font-size: 42px; display: block; margin-bottom: 12px; }
.empty-state h2 { font-size: 20px; }
.empty-state p { color: var(--c-muted); max-width: 46ch; margin: 0 auto 20px; }
.flash { padding: 13px 18px; border-radius: var(--radius); margin: 16px 0 0; font-weight: 600; font-size: 14.5px;
  background: var(--c-info-soft); color: var(--c-ink); border: 1px solid color-mix(in srgb, var(--c-info) 25%, transparent); }
.flash a { color: var(--c-primary); }
.flash-error { background: var(--c-danger-soft); color: var(--c-danger); border-color: color-mix(in srgb, var(--c-danger) 30%, transparent); }
.flash-error a { color: var(--c-danger); }
.flash-success { background: var(--c-primary-soft); border-color: color-mix(in srgb, var(--c-primary) 28%, transparent); }

/* ── Footer ─────────────────────────────────────────────────────── */
/* Un bandeau vert profond, identique dans les deux thèmes : il ferme la
   page sans dépendre du fond. Ses couleurs sont donc locales. */
.site-footer {
  --f-bg: #0E2318; --f-bg-2: #15301F; --f-ink: #F2F7F3; --f-muted: #A9BDB0;
  --f-line: rgba(255, 255, 255, .1); --f-accent: #7FD8A0;
  margin-top: 64px; background: var(--f-bg); color: var(--f-muted);
  padding: 34px 0 22px; font-size: 14px;
}
[data-theme="dark"] .site-footer { --f-bg: #0A1710; --f-bg-2: #112418; }
.footer-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: var(--f-bg-2); border: 1px solid var(--f-line); border-radius: var(--radius-lg);
  padding: 20px 24px; margin-bottom: 38px;
}
.footer-cta b { color: var(--f-ink); font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.footer-cta p { margin: 4px 0 0; color: var(--f-muted); font-size: 14px; }
.footer-cta-btn {
  display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0;
  background: var(--c-whatsapp); color: #fff; font-weight: 700; font-size: 14.5px;
  padding: 12px 20px; border-radius: 999px; transition: transform .15s, filter .2s;
}
.footer-cta-btn:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.1fr 1.1fr; gap: 32px; padding-bottom: 30px; }
.footer-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--f-accent); }
.footer-logo span { font-family: var(--font-display); font-size: 21px; font-weight: 800;
  color: var(--f-ink); letter-spacing: -.03em; }
.footer-logo em { font-style: normal; color: var(--f-accent); }
.footer-brand-col p { margin: 14px 0 16px; line-height: 1.6; max-width: 38ch; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-contact li { display: flex; align-items: center; gap: 10px; }
.footer-contact svg { color: var(--f-accent); flex-shrink: 0; }
.footer-contact a { color: var(--f-ink); font-weight: 600; }
.footer-col h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--f-ink); margin: 4px 0 14px; font-weight: 800; }
.footer-col a, .soon-item { display: block; padding: 5px 0; color: var(--f-muted); font-weight: 500; }
.footer-col a:hover, .footer-contact a:hover { color: var(--f-accent); }
.soon-item em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  background: rgba(242, 169, 59, .16); color: #F2C27A; border-radius: 999px;
  padding: 2px 8px; margin-left: 6px; text-transform: uppercase; }
.footer-pay { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 18px 0; border-top: 1px solid var(--f-line); }
.footer-pay-label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--f-ink); }
.pay-badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pay-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700;
  color: var(--f-ink); background: rgba(255, 255, 255, .06); border: 1px solid var(--f-line);
  border-radius: 999px; padding: 6px 12px; }
.pay-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pay-mpesa::before { background: #E60000; } .pay-orange::before { background: #FF7900; }
.pay-airtel::before { background: #ED1C24; } .pay-visa::before { background: #4A6CF7; }
.pay-cash::before { background: var(--f-accent); }
.footer-legal { border-top: 1px solid var(--f-line); padding-top: 18px; }
.footer-avertissement { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px;
  font-size: 13px; line-height: 1.55; color: var(--f-muted); }
.footer-avertissement svg { color: var(--f-accent); flex-shrink: 0; margin-top: 2px; }
.footer-bas { display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap;
  font-size: 12.5px; color: rgba(169, 189, 176, .8); }
.pwa-install-btn { margin-top: 14px; font-size: 13px; padding: 8px 16px; }
/* Lien WhatsApp en ligne, utilisé hors du pied de page (suivi, vérification…). */
.whatsapp-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--c-whatsapp); font-size: 14px; }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px 20px; }
  .footer-brand-col { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .site-footer { padding-top: 26px; }
  .footer-cta { padding: 18px; margin-bottom: 30px; }
  .footer-cta-btn { width: 100%; justify-content: center; }
  .footer-bas { flex-direction: column; }
}

/* ── Authentification ──────────────────────────────────────────── */
.auth-page { padding: 44px 0 68px; }
.auth-card { max-width: 480px; margin: 0 auto; background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 32px 32px 34px; }
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-cross { display: inline-grid; place-items: center; width: 54px; height: 54px; margin-bottom: 12px;
  border-radius: 16px; background: var(--c-primary-soft); color: var(--c-primary); font-size: 25px; }
.auth-head h1 { font-size: 24px; }
.auth-head p { color: var(--c-muted); margin: 4px 0 0; font-size: 14.5px; }
.auth-card form { margin-top: 8px; } .auth-card .btn { margin-top: 10px; }
.auth-alt { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--c-line); text-align: center; }
.auth-alt p { margin: 6px 0; font-size: 14px; color: var(--c-muted); }

/* ── Tableau de bord ───────────────────────────────────────────── */
.dashboard { padding: 36px 0 68px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.dash-head h1 { font-size: clamp(24px, 3.2vw, 34px); margin: 6px 0 0; }
.dash-kicker { margin-bottom: 0; }
.dash-hello { color: var(--c-muted); margin: 8px 0 0; }
.dash-ipu { font-weight: 700; color: var(--c-primary); background: var(--c-primary-soft);
  padding: 2px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; font-size: 14px; }
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dash-card { display: flex; align-items: flex-start; gap: 14px; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .22s, border-color .2s; }
a.dash-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--c-primary); }
.dash-card.is-soon { opacity: .62; border-style: dashed; box-shadow: none; }
.dash-emoji { font-size: 26px; line-height: 1; width: 46px; height: 46px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 12px; background: var(--c-primary-soft); }
.dash-card-body { flex: 1; }
.dash-card h3 { font-size: 15.5px; margin: 0 0 4px; color: var(--c-ink); }
.dash-card p { margin: 0; font-size: 13px; color: var(--c-muted); }
.dash-card:hover h3 { color: var(--c-primary); }
.dash-soon { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: var(--c-surface-2); color: var(--c-muted); border-radius: 5px; padding: 2px 6px; margin-left: 4px; vertical-align: middle; }
.dash-go { align-self: center; flex-shrink: 0; font-size: 16px; color: var(--c-primary); }

/* ── Consultation ──────────────────────────────────────────────── */
.medecin-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.medecin-card { position: relative; display: flex; align-items: center; gap: 14px; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 16px 18px; cursor: pointer;
  box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s, transform .16s; }
.medecin-card:hover { border-color: var(--c-primary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.medecin-card input { position: absolute; opacity: 0; }
.medecin-avatar { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary); font-weight: 800; font-size: 18px; }
.medecin-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.medecin-info b { font-size: 15.5px; } .medecin-info span { font-size: 13px; color: var(--c-muted); }
.medecin-zone { color: var(--c-primary) !important; }
.medecin-check { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0;
  border: 1px solid var(--c-line); border-radius: 50%; color: transparent; font-weight: 800; }
.medecin-card:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); box-shadow: 0 0 0 3px var(--ring); }
.medecin-card:has(input:checked) .medecin-check { background: var(--c-primary); border-color: transparent; color: #fff; }

.rdv-card { display: flex; align-items: center; gap: 16px; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 12px;
  box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.rdv-card:hover { border-color: color-mix(in srgb, var(--c-primary) 40%, var(--c-line)); }
.rdv-card.is-done { opacity: .68; box-shadow: none; }
.rdv-when { display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 74px; padding: 8px 10px; background: var(--c-primary-soft); color: var(--c-primary);
  border-radius: 12px; text-align: center; flex-shrink: 0; }
.rdv-when b { font-size: 12.5px; text-transform: uppercase; line-height: 1.1; font-weight: 800; }
.rdv-when span { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rdv-info { flex: 1; min-width: 0; }
.rdv-info h3 { font-size: 15.5px; margin: 0 0 2px; color: var(--c-ink); }
.rdv-info p { margin: 0 0 6px; font-size: 13px; color: var(--c-muted); }
a.rdv-card:hover .rdv-info h3 { color: var(--c-primary); }
.rdv-action { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; align-items: flex-end; }
.rdv-action .btn { padding: 8px 14px; font-size: 12.5px; }
.rdv-status { display: inline-block; font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; }
.rdv-requested { background: var(--c-accent-soft); color: var(--c-accent); }
.rdv-confirmed { background: var(--c-info-soft); color: var(--c-info); }
.rdv-done, .rdv-validated, .rdv-delivered { background: var(--c-primary-soft); color: var(--c-primary); }
.rdv-cancelled, .rdv-rejected { background: var(--c-danger-soft); color: var(--c-danger); }
.rdv-submitted, .rdv-in_review, .rdv-pending, .rdv-delivering { background: var(--c-surface-2); color: var(--c-muted); }
.agenda-sub { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; margin: 22px 0 14px;
  color: var(--c-muted); font-weight: 800; }
.agenda-sub:first-of-type { margin-top: 8px; }

.rx-src-badge { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  background: var(--c-primary-soft); color: var(--c-primary); border-radius: 999px; padding: 2px 8px;
  margin-left: 6px; vertical-align: middle; }
.rx-src-badge.alt { background: var(--c-info-soft); color: var(--c-info); }
.rx-source-note { color: var(--c-muted); font-weight: 500; margin-top: 12px; }

.rx-editor { width: 100%; border-collapse: collapse; margin-top: 6px; }
.rx-editor th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--c-muted); padding: 6px; border-bottom: 1px solid var(--c-line); }
.rx-editor td { padding: 6px; vertical-align: middle; }
.rx-editor select, .rx-editor input[type=text], .rx-editor input[type=number] {
  width: 100%; border: 1px solid var(--c-line); border-radius: 10px; padding: 9px 10px;
  font-family: var(--font-body); font-size: 14px; background: var(--c-surface); color: var(--c-ink); outline: none; }
.rx-editor select:focus, .rx-editor input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--ring); }
.rx-editor .rx-qty { width: 74px; } .rx-editor .rx-frac { width: 44px; text-align: center; }
.rx-editor .rx-frac input { width: auto; accent-color: var(--c-primary); }
/* ── Composer le devis (pharmacien) ────────────────────────────── */
.rx-photo-link { display: block; position: relative; margin-bottom: 18px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--c-line); max-height: 260px; }
.rx-photo-link img { width: 100%; height: 260px; object-fit: cover; }
.rx-photo-link span { position: absolute; bottom: 10px; right: 10px; background: var(--c-surface);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; box-shadow: var(--shadow); }

.lignes { display: flex; flex-direction: column; gap: 14px; }
.ligne { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px;
  background: var(--c-bg); position: relative; }
.ligne[hidden] { display: none; }
.ligne.is-indispo { opacity: .72; border-style: dashed; }
.ligne-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ligne-num { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary);
  font-weight: 800; font-size: 13px; margin-top: 22px; }
.ligne-produit { flex: 1; min-width: 0; }
.ligne-produit > label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.ligne-suppr { flex-shrink: 0; width: 32px; height: 32px; margin-top: 20px; border-radius: 50%;
  border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-muted);
  cursor: pointer; font-size: 13px; transition: background .16s, color .16s, border-color .16s; }
.ligne-suppr:hover { background: var(--c-danger-soft); color: var(--c-danger); border-color: var(--c-danger); }

.prod-pick { position: relative; }
.prod-search { width: 100%; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 11px 14px; font-family: var(--font-body); font-size: 14.5px;
  background: var(--c-surface); color: var(--c-ink); outline: none; transition: border-color .2s, box-shadow .2s; }
.prod-search:focus { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--ring); }
.prod-search:disabled { background: var(--c-surface-2); color: var(--c-muted); }
.prod-hidden { display: none; }
.prod-results { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; padding: 6px; }
.prod-results[hidden] { display: none; }
.prod-item { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left;
  border: none; background: none; cursor: pointer; padding: 9px 10px; border-radius: 8px;
  font-family: var(--font-body); color: var(--c-ink); }
.prod-item:hover { background: var(--c-primary-soft); }
.prod-item b { font-size: 14px; font-weight: 700; }
.prod-item small { font-size: 12px; color: var(--c-muted); flex: 1; }
.prod-item em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--c-primary); margin-left: auto; }
.prod-empty { padding: 10px; font-size: 13px; color: var(--c-muted); }
.prod-absent { display: inline-block; margin-top: 8px; border: none; background: none; cursor: pointer;
  padding: 0; font-family: var(--font-body); font-size: 12.5px; font-weight: 700; color: var(--c-primary); }
.prod-absent:hover { text-decoration: underline; }

.ligne-champs { display: grid; grid-template-columns: 1fr 90px 150px; gap: 12px; margin-bottom: 10px; }
.ligne-champs:last-of-type { grid-template-columns: 1fr auto; margin-bottom: 0; }
.ligne-champs .field { margin-bottom: 0; }
.ligne-champs label { font-size: 12.5px; }
.ligne-options { display: flex; align-items: flex-end; gap: 14px; padding-bottom: 10px; }
.ligne-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ligne-check input { accent-color: var(--c-primary); width: 15px; height: 15px; }
.ligne-delete { display: none; }

.lignes-vide { text-align: center; padding: 28px 16px; border: 1px dashed var(--c-line);
  border-radius: var(--radius); color: var(--c-muted); }
.lignes-vide[hidden] { display: none; }
.lignes-vide span { font-size: 30px; display: block; margin-bottom: 6px; }
.lignes-vide p { margin: 0; font-size: 14px; }
.btn-ajout { margin-top: 14px; width: 100%; border-style: dashed; color: var(--c-primary);
  border-color: color-mix(in srgb, var(--c-primary) 45%, transparent); background: var(--c-surface); }
.btn-ajout:hover { background: var(--c-primary-soft); border-color: var(--c-primary); color: var(--c-primary); }
.lignes-total { margin-top: 14px; text-align: right; font-size: 14.5px; color: var(--c-muted); }
.lignes-total b { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--c-primary); }

/* Modale */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 26, 20, .55); backdrop-filter: blur(2px); }
.modal-box { position: relative; width: min(520px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 26px 26px 24px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-muted); cursor: pointer; }
.modal-close:hover { background: var(--c-surface-2); color: var(--c-ink); }
.modal-box h2 { font-size: 19px; margin: 0 0 6px; padding-right: 30px; }
.modal-lead { color: var(--c-muted); font-size: 14px; margin: 0 0 16px; }
.modal-similar { background: var(--c-primary-soft); border-radius: var(--radius); padding: 12px; margin-bottom: 14px; }
.modal-similar[hidden] { display: none; }
.modal-similar > p { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; color: var(--c-primary); }
.modal-note { font-size: 12.5px; color: var(--c-muted); background: var(--c-info-soft);
  border-radius: var(--radius); padding: 10px 12px; margin: 4px 0 14px; }
.modal-error[hidden] { display: none; }
.modal-box .btn { margin-top: 4px; }

@media (max-width: 620px) {
  .ligne-champs, .ligne-champs:last-of-type { grid-template-columns: 1fr; }
  .ligne-options { padding-bottom: 0; }
}

.rx-decision { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.rx-decision .btn { flex: 1; min-width: 200px; }
.rx-reject-btn { background: var(--c-surface); color: var(--c-danger); border-color: var(--c-danger); }
.rx-reject-btn:hover { background: var(--c-danger); color: #fff; border-color: transparent; }

/* ── Livraison ──────────────────────────────────────────────────── */
.affect-form, .mission-action { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; min-width: 200px; }
.affect-form select, .mission-action textarea { border: 1px solid var(--c-line); border-radius: 10px;
  padding: 10px 12px; font-family: var(--font-body); font-size: 14px; background: var(--c-surface); color: var(--c-ink); outline: none; }
.affect-form select:focus, .mission-action textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--ring); }
.affect-form .btn, .mission-action .btn { padding: 9px 14px; font-size: 12.5px; }
.mission-items { list-style: none; padding: 0; margin: 6px 0; }
.mission-items li { font-size: 13px; font-weight: 500; padding: 3px 0; border-bottom: 1px solid var(--c-line); }
.track-note { font-size: 13px; font-weight: 600; color: var(--c-muted); margin: 6px 0 0 !important; }
.track-note.ok { color: var(--c-primary); }
@media (max-width: 620px) { .affect-form, .mission-action { width: 100%; min-width: 0; } }

/* ── Suivi d'ordonnance ────────────────────────────────────────── */
.rx-tracking { padding: 36px 0 68px; }
.rx-tracking-head { justify-content: space-between; align-items: center; }
.rx-owner { color: var(--c-muted); font-size: 14px; margin: 2px 0 0; }
.rx-save-notice { margin-bottom: 22px; }
.rx-timeline { display: flex; gap: 8px; list-style: none; margin: 0 0 26px; padding: 0; flex-wrap: wrap; }
.rx-timeline li { flex: 1; min-width: 140px; display: flex; align-items: center; gap: 9px; padding: 11px 14px;
  border-radius: var(--radius); background: var(--c-surface); border: 1px solid var(--c-line);
  font-size: 13px; font-weight: 600; color: var(--c-muted); }
.rx-timeline li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--c-surface-2); color: var(--c-muted); font-size: 12px; font-weight: 800; flex-shrink: 0; }
.rx-timeline li.done { color: var(--c-ink); border-color: color-mix(in srgb, var(--c-primary) 35%, var(--c-line)); background: var(--c-primary-soft); }
.rx-timeline li.done span { background: var(--c-primary); color: #fff; }
.rx-timeline li.rejected { color: var(--c-danger); border-color: var(--c-danger); background: var(--c-danger-soft); }
.rx-timeline li.rejected span { background: var(--c-danger); color: #fff; }
.rx-waiting .rx-thumb { max-width: 240px; max-height: 300px; object-fit: cover; margin: 20px auto 0;
  border-radius: 12px; border: 1px solid var(--c-line); box-shadow: var(--shadow); }
.rx-rejected { border-color: var(--c-danger); } .rx-rejected strong { color: var(--c-danger); } .rx-rejected .btn { margin-top: 12px; }
.rx-progress-band { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  padding: 16px 20px; margin-bottom: 22px; box-shadow: var(--shadow); }
.rx-progress-info { font-size: 14.5px; margin-bottom: 10px; }
.rx-progress-hint { display: block; color: var(--c-muted); font-size: 13px; margin-top: 2px; }
.confirm-rx { text-align: left; margin: 18px 0; } .confirm-rx .continue-link { text-align: left; margin-top: 10px; }
.rx-lines { display: flex; flex-direction: column; gap: 12px; }
.rx-buy-line { display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  padding: 16px 18px; flex-wrap: wrap; box-shadow: var(--shadow); }
.rx-buy-line.is-served { opacity: .6; box-shadow: none; } .rx-buy-line.is-missing { border-style: dashed; box-shadow: none; }
.rx-buy-info h3 { font-size: 15.5px; margin: 0; } .rx-buy-info p { margin: 2px 0 0; font-size: 13px; color: var(--c-muted); }
.rx-full-badge { display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; color: var(--c-accent); background: var(--c-accent-soft); border-radius: 999px; padding: 3px 10px; }
.rx-buy-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rx-unit { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--c-muted); }
.rx-line-state { font-weight: 700; font-size: 13px; }
.rx-line-state.ok { color: var(--c-primary); } .rx-line-state.off { color: var(--c-muted); font-weight: 500; font-style: italic; }
.rx-all-toggle { display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px; border: 1px solid var(--c-line);
  border-radius: var(--radius); cursor: pointer; font-weight: 600; font-size: 13.5px; background: var(--c-surface); transition: border-color .2s; }
.rx-all-toggle:hover { border-color: var(--c-primary); }
.rx-all-toggle:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); color: var(--c-primary); }
.rx-all-toggle input[type=checkbox] { accent-color: var(--c-primary); width: 16px; height: 16px; }
.rx-pharm-note { margin-top: 18px; background: var(--c-primary-soft); border-color: color-mix(in srgb, var(--c-primary) 25%, transparent); }
.rx-pharm-note strong { color: var(--c-primary); }
.rx-selection-bar { position: sticky; bottom: 14px; z-index: 50; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; margin-top: 22px; padding: 14px 20px;
  background: var(--c-surface); border: 1px solid var(--c-primary); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.rx-selection-bar > div { display: flex; flex-direction: column; }
#rx-sel-count { font-size: 13px; color: var(--c-muted); }
#rx-sel-total { font-family: var(--font-display); font-size: 21px; font-weight: 800;
  font-variant-numeric: tabular-nums; color: var(--c-primary); }
.rx-history { margin-top: 26px; }
.rx-order-link { display: block; padding: 11px 15px; margin-top: 10px; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--radius); font-size: 14px;
  font-variant-numeric: tabular-nums; color: var(--c-ink); transition: border-color .2s; }
.rx-order-link:hover { border-color: var(--c-primary); color: var(--c-ink); }

/* ── Envoi d'ordonnance (2 étapes) ─────────────────────────────── */
.rx-upload-page, .rx-find-page { padding: 38px 0 68px; }
.rx-upload-head { text-align: center; max-width: 600px; margin: 0 auto 26px; }
.rx-upload-head h1 { font-size: clamp(26px, 3.8vw, 38px); margin-bottom: 12px; }
.rx-upload-lead { color: var(--c-muted); font-size: 15.5px; margin: 0; }
.rx-upload-lead b { color: var(--c-ink); }
.rx-upload-form { max-width: 600px; margin: 0 auto; }
.rx-step { position: relative; background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px 24px 22px; margin-bottom: 16px; }
.rx-step-chip { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--c-primary-soft); color: var(--c-primary); border-radius: 999px; padding: 5px 14px;
  font-size: 12px; font-weight: 700; white-space: nowrap; }
.rx-step-2 { transition: opacity .3s, filter .3s; }
.rx-step-2.is-locked { opacity: .45; filter: saturate(.4); pointer-events: none; }
.rx-step-2 h2 { font-size: 17px; margin: 6px 0 16px; }
.dropzone { position: relative; display: block; border: 1.5px dashed color-mix(in srgb, var(--c-primary) 40%, var(--c-line));
  border-radius: var(--radius); background: var(--c-bg); min-height: 210px; margin-bottom: 16px;
  cursor: pointer; overflow: hidden; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.dragover { border-color: var(--c-primary); background: var(--c-primary-soft); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; text-align: center; pointer-events: none; padding: 18px; }
.dropzone-inner b { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--c-ink); }
.dropzone-inner small { color: var(--c-muted); font-size: 13px; }
.dropzone-medallion { display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 8px;
  border-radius: 50%; background: var(--c-primary); color: #fff; box-shadow: var(--glow); }
#dropzone-preview { width: 100%; max-height: 280px; object-fit: contain; background: var(--c-surface-2); }
.dropzone.has-photo .dropzone-inner { inset: auto 0 0 0; flex-direction: row; gap: 10px; justify-content: center;
  background: color-mix(in srgb, var(--c-surface) 92%, transparent); backdrop-filter: blur(6px);
  padding: 10px; border-top: 1px solid var(--c-line); }
.dropzone.has-photo .dropzone-inner b { font-size: 14px; color: var(--c-primary); }
.rx-source-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rx-source { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 16px;
  border-radius: var(--radius); cursor: pointer; font-family: var(--font-body); text-align: left;
  border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink);
  transition: transform .18s, box-shadow .2s, border-color .2s, background .2s; }
.rx-source span { display: flex; flex-direction: column; line-height: 1.25; }
.rx-source b { font-size: 14px; font-weight: 700; }
.rx-source small { font-size: 12px; color: var(--c-muted); }
.rx-source:hover { transform: translateY(-2px); border-color: var(--c-primary); box-shadow: var(--shadow); }
.rx-source-cam { background: var(--c-primary); color: #fff; border-color: transparent; }
.rx-source-cam small { color: rgba(255,255,255,.85); }
.rx-source-cam:hover { background: var(--c-primary-dim); box-shadow: var(--glow); }
.rx-assurances { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 18px;
  padding-top: 16px; border-top: 1px solid var(--c-line); font-size: 12.5px; color: var(--c-muted); }

/* Envoi en un clic : apparaît dès qu'une photo est choisie */
.rx-envoi { margin-top: 16px; animation: fadeUp .35s ease both; }
.rx-envoi[hidden] { display: none; }
.rx-envoi-note { text-align: center; font-size: 13px; color: var(--c-muted); margin: 10px 0 0; }
.rx-coord-toggle { display: block; width: 100%; margin-top: 12px; border: 1px dashed var(--c-line);
  background: none; border-radius: var(--radius); padding: 11px; cursor: pointer;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600; color: var(--c-muted);
  transition: border-color .18s, color .18s; }
.rx-coord-toggle:hover { border-color: var(--c-primary); color: var(--c-primary); }
.rx-coord-toggle span { font-weight: 400; }
.rx-coord-toggle.is-open { border-style: solid; color: var(--c-ink); }
.rx-coord { margin-top: 12px; }
.rx-coord[hidden] { display: none; }
.rx-coord-aide { font-size: 12.5px; color: var(--c-muted); margin: 0 0 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }
.rx-how { max-width: 600px; margin: 24px auto 0; padding-left: 0; list-style: none; counter-reset: rxstep; }
.rx-how li { counter-increment: rxstep; position: relative; padding: 9px 0 9px 44px; color: var(--c-muted); font-size: 14.5px; }
.rx-how li b { color: var(--c-ink); }
.rx-how li::before { content: counter(rxstep); position: absolute; left: 0; top: 7px; width: 28px; height: 28px;
  display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 13px;
  background: var(--c-primary-soft); color: var(--c-primary); }
.rx-trust { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--c-muted); }
.rx-step .field { margin-top: 14px; } .rx-step .btn { margin-top: 18px; }
.rx-find-card { max-width: 460px; margin: 0 auto; background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 30px 30px; }
.rx-find-card h1 { font-size: 24px; } .rx-find-sub { color: var(--c-muted); font-size: 14.5px; margin-bottom: 18px; }
@media (max-width: 560px) { .rx-source-buttons { grid-template-columns: 1fr; } .rx-step { padding: 26px 18px 20px; } }

/* ── Gammes par préoccupation de santé ─────────────────────────── */
.gammes-page-head { display: block; margin-bottom: 20px; }
.gammes-page-lead { color: var(--c-muted); font-size: 15px; margin: 6px 0 0; }
.gammes-list { display: flex; flex-direction: column; gap: 16px; }

.gamme-row {
  display: grid; grid-template-columns: 240px 1fr; gap: 0;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .18s, box-shadow .22s, border-color .2s;
}
.gamme-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: currentColor; }

/* Photo à gauche — repli élégant tant qu'il n'y en a pas */
.gamme-photo { display: block; position: relative; min-height: 168px; overflow: hidden;
  background: color-mix(in srgb, currentColor 14%, var(--c-surface)); }
.gamme-photo img { width: 100%; height: 100%; object-fit: cover; }
.gamme-photo-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 54px;
  background:
    radial-gradient(circle at 70% 25%, color-mix(in srgb, currentColor 26%, transparent), transparent 60%),
    color-mix(in srgb, currentColor 12%, var(--c-surface));
}

.gamme-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 2px; }
.gamme-icone {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 8px;
  border-radius: 50%; font-size: 20px;
  background: color-mix(in srgb, currentColor 16%, transparent);
}
.gamme-body h2 { font-size: 19px; margin: 0; }
.gamme-body h2 a { color: var(--c-ink); }
.gamme-body h2 a:hover { color: var(--c-primary); }
.gamme-mots { color: var(--c-muted); font-size: 13.5px; margin: 4px 0 0; }
.gamme-promesse { color: var(--c-ink); font-size: 13.5px; font-weight: 600; margin: 2px 0 0; }
.gamme-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }

.gamme-wa {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--c-whatsapp) 40%, transparent);
  color: var(--c-whatsapp); font-weight: 700; font-size: 13.5px;
  transition: background .18s, border-color .18s;
}
.gamme-wa:hover { background: color-mix(in srgb, var(--c-whatsapp) 10%, transparent);
  border-color: var(--c-whatsapp); color: var(--c-whatsapp); }
.gamme-wa em { font-style: normal; }
.gamme-voir { font-size: 13.5px; font-weight: 600; color: var(--c-muted); }
.gamme-voir:hover { color: var(--c-primary); }
.pack-detail-wa { margin-bottom: 22px; }


@media (max-width: 680px) {
  .gamme-row { grid-template-columns: 1fr; }
  .gamme-photo { min-height: 150px; }
  .gamme-body { padding: 18px; }
}

/* ── Devis (maquette client) ───────────────────────────────────── */
.devis-head { text-align: center; margin-bottom: 22px; }
.devis-medallion { display: inline-grid; place-items: center; width: 52px; height: 52px;
  border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary); margin-bottom: 12px; }
.devis-chip { position: static; transform: none; display: inline-block; margin-bottom: 12px; }
.devis-head h1 { font-size: clamp(24px, 3.4vw, 32px); margin-bottom: 8px; }
.devis-lead { color: var(--c-muted); font-size: 15px; margin: 0 auto; max-width: 44ch; }

.devis-source { display: flex; align-items: center; gap: 14px; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 16px 20px; margin-bottom: 16px; flex-wrap: wrap; }
.devis-source-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 12px; background: var(--c-primary-soft); font-size: 20px; }
.devis-source-info { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
.devis-source-info b { font-size: 15.5px; }
.devis-source-info small { color: var(--c-muted); font-size: 12.5px; }
.devis-source-total { text-align: right; }
.devis-source-total small { display: block; color: var(--c-muted); font-size: 12.5px; }
.devis-source-total b { font-family: var(--font-display); font-size: 21px; font-weight: 800;
  color: var(--c-primary); font-variant-numeric: tabular-nums; }

.devis-card { background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px; }
.devis-card h2 { font-size: 18px; margin-bottom: 14px; }

.devis-table { display: flex; flex-direction: column; }
.devis-row { display: grid; grid-template-columns: 2.6fr 1fr 1.35fr 1fr;
  align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--c-line); }
.devis-row:last-child { border-bottom: 0; }
.devis-row-head { padding: 0 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--c-muted); }
.devis-row.is-excluded { opacity: .5; }
.devis-row.is-served, .devis-row.is-missing { opacity: .6; }
.dc-med { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dc-thumb { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 10px; font-size: 20px; overflow: hidden; background: var(--c-surface-2); }
.dc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dc-med-text { display: flex; flex-direction: column; min-width: 0; }
.dc-med-text b { font-size: 14.5px; line-height: 1.3; }
.dc-med-text small { font-size: 12px; color: var(--c-muted); }
.dc-badge { display: inline-block; margin-top: 4px; font-size: 10.5px; font-weight: 700;
  color: var(--c-accent); background: var(--c-accent-soft); border-radius: 999px; padding: 2px 8px; width: fit-content; }
.dc-pu { font-size: 14px; color: var(--c-muted-strong); font-variant-numeric: tabular-nums; }
.dc-qte { font-size: 14px; color: var(--c-ink); }
.dc-tot { font-size: 14.5px; font-weight: 800; color: var(--c-primary); font-variant-numeric: tabular-nums; }
.dc-inc { display: flex; justify-content: center; }
.dc-state { grid-column: 2 / -1; font-size: 13px; color: var(--c-muted); font-style: italic; }
.dc-state.ok { color: var(--c-primary); font-style: normal; font-weight: 700; }

.dc-check { position: relative; display: inline-grid; place-items: center; cursor: pointer; }
.dc-check input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.dc-box { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  border: 1.5px solid var(--c-line); background: var(--c-surface);
  color: transparent; font-size: 15px; font-weight: 800; transition: background .16s, border-color .16s, color .16s; }
.dc-check input:checked + .dc-box { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.dc-check input:focus-visible + .dc-box { box-shadow: 0 0 0 4px var(--ring); }

.devis-recap { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 16px; align-items: center;
  background: var(--c-primary-soft); border-radius: var(--radius); padding: 16px 18px; margin-top: 16px; }
.devis-recap-item small { display: block; color: var(--c-muted); font-size: 12.5px; margin-bottom: 2px; }
.devis-recap-item b { font-family: var(--font-display); font-size: 20px; font-weight: 800;
  font-variant-numeric: tabular-nums; }
.devis-recap-item b.is-eco { color: var(--c-primary); }
.devis-recap-wa { display: flex; align-items: center; gap: 10px; color: var(--c-whatsapp);
  border-left: 1px solid color-mix(in srgb, var(--c-primary) 25%, transparent); padding-left: 16px; }
.devis-recap-wa span { display: flex; flex-direction: column; flex: 1; line-height: 1.25; }
.devis-recap-wa b { font-size: 13.5px; } .devis-recap-wa small { font-size: 12px; color: var(--c-muted); }
.devis-recap-wa em { font-style: normal; font-size: 17px; }

.devis-info { display: flex; gap: 10px; font-size: 13px; color: var(--c-muted);
  background: var(--c-info-soft); border-radius: var(--radius); padding: 12px 14px; margin: 16px 0 0; }

/* Barre collante « Total à payer » */
.devis-bar { position: sticky; bottom: 12px; z-index: 50; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; margin-top: 18px; padding: 14px 20px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.devis-bar small { display: block; color: var(--c-muted); font-size: 12.5px; }
.devis-bar #rx-bar-total { font-family: var(--font-display); font-size: 24px; font-weight: 800;
  color: var(--c-primary); font-variant-numeric: tabular-nums; }
.devis-bar #rx-sel-count { display: block; font-size: 12.5px; color: var(--c-muted); }
.devis-bar .btn:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 720px) {
  .devis-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .devis-row-head { display: none; }
  .dc-med { grid-column: 1 / 2; }
  .dc-qte, .dc-pu, .dc-tot { grid-column: 1 / -1; display: flex; align-items: center;
    justify-content: space-between; font-size: 13px; }
  .dc-qte { flex-wrap: wrap; gap: 6px; }
  .dc-sur { margin-top: 0; }
  .dc-qte::before { content: attr(data-label); color: var(--c-muted); }
  .dc-pu::before { content: attr(data-label); color: var(--c-muted); }
  .dc-tot::before { content: attr(data-label); color: var(--c-muted); font-weight: 500; }
  .devis-recap { grid-template-columns: 1fr 1fr; }
  .devis-recap-wa { grid-column: 1 / -1; border-left: 0; padding-left: 0;
    border-top: 1px solid color-mix(in srgb, var(--c-primary) 25%, transparent); padding-top: 12px; }
  .devis-source-total { text-align: left; width: 100%; }
}

/* ── Espace Gestion ─────────────────────────────────────────────── */
.gestion-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); padding: 6px; box-shadow: var(--shadow); }
.gestion-nav a { padding: 10px 16px; border-radius: var(--radius); font-size: 14px;
  font-weight: 600; color: var(--c-muted); }
.gestion-nav a:hover { background: var(--c-surface-2); color: var(--c-ink); }
.gestion-nav a.actif { background: var(--c-primary); color: #fff; }

.kpi-attente b { color: var(--c-accent) !important; }
.bloc-aide { font-size: 12.5px; color: var(--c-muted); margin: 0 0 14px; }

/* Tuiles « à traiter » */
.actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.action-tuile { display: flex; flex-direction: column; gap: 2px; padding: 16px;
  border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-bg);
  transition: transform .16s, border-color .2s, box-shadow .2s; }
.action-tuile:hover { transform: translateY(-2px); border-color: var(--c-primary); box-shadow: var(--shadow); }
.at-nb { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--c-muted); line-height: 1.1; }
.at-lib { font-size: 12.5px; color: var(--c-muted); }
.action-tuile.is-actif { background: var(--c-primary-soft); border-color: color-mix(in srgb, var(--c-primary) 35%, transparent); }
.action-tuile.is-actif .at-nb { color: var(--c-primary); }
.action-tuile.is-actif .at-lib { color: var(--c-ink); font-weight: 600; }

/* Lignes d'alerte */
.alerte-ligne { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 6px; font-size: 13.5px;
  background: var(--c-bg); color: var(--c-ink); border: 1px solid var(--c-line); }
.alerte-ligne:hover { border-color: var(--c-primary); color: var(--c-ink); }
.alerte-ligne b { font-size: 12.5px; white-space: nowrap; }
.alerte-ligne.is-rupture b { color: var(--c-danger); }
.alerte-ligne.is-bas b { color: var(--c-accent); }
.alerte-ligne.is-brouillon b { color: var(--c-muted); }

/* Catalogue éditable */
.cat-filtres { margin-bottom: 12px; }
.cat-filtres .listing-search { margin-bottom: 12px; }
.cat-table { background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.cat-row { display: grid; grid-template-columns: 2.4fr 1.2fr .9fr .8fr .7fr .8fr;
  gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--c-line); }
.cat-row:last-child { border-bottom: 0; }
.cat-head { font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--c-muted); font-weight: 700; background: var(--c-surface-2); }
.cat-prod { display: flex; flex-direction: column; min-width: 0; }
.cat-prod b { font-size: 14px; }
.cat-prod small { font-size: 12px; color: var(--c-muted); }
.cat-cat { font-size: 12.5px; color: var(--c-muted); }
.cat-input { width: 100%; border: 1px solid var(--c-line); border-radius: 8px; padding: 7px 9px;
  font-family: var(--font-body); font-size: 13.5px; text-align: right; background: var(--c-surface);
  color: var(--c-ink); outline: none; transition: border-color .18s, box-shadow .18s; }
.cat-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--ring); }
.cat-input.est-enregistre { border-color: var(--c-primary); background: var(--c-primary-soft); }
.cat-input.est-erreur { border-color: var(--c-danger); background: var(--c-danger-soft); }
.etat { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.etat-ok { background: var(--c-primary-soft); color: var(--c-primary); }
.etat-bas { background: var(--c-accent-soft); color: var(--c-accent); }
.etat-rupture { background: var(--c-danger-soft); color: var(--c-danger); }
.cat-edit { font-size: 13px; font-weight: 600; }
.tag-brouillon, .tag-rx { font-style: normal; font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px; margin-left: 5px; }
.tag-brouillon { background: var(--c-accent-soft); color: var(--c-accent); }
.tag-rx { background: var(--c-info-soft); color: var(--c-info); }

/* Paramètres */
.taux-field { display: flex; align-items: center; gap: 10px; }
.taux-field label { margin: 0; white-space: nowrap; font-weight: 700; }
.taux-field input { max-width: 160px; text-align: right; font-family: var(--font-display);
  font-size: 20px; font-weight: 800; }
.taux-unite { font-weight: 700; color: var(--c-muted); }
.taux-apercu { font-size: 13px; color: var(--c-muted); margin: 10px 0 0; }
.zone-table { border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.zone-row { display: grid; grid-template-columns: 1.3fr .9fr 1.2fr .7fr; gap: 12px;
  align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--c-line); }
.zone-row:last-child { border-bottom: 0; }
.zone-head { font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--c-muted); font-weight: 700; background: var(--c-surface-2); }
.cases { display: flex; flex-wrap: wrap; gap: 14px 20px; }
.cases-sym ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.cases-sym li label { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; cursor: pointer; }
.cases-sym input { accent-color: var(--c-primary); }

@media (max-width: 900px) {
  .cat-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cat-head { display: none; }
  .cat-prod, .cat-cat { grid-column: 1 / -1; }
  .zone-row { grid-template-columns: 1fr 1fr; }
  .zone-head { display: none; }
}

/* ── Rapports ───────────────────────────────────────────────────── */
.rapport-filtres { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.rapport-filtres .field { margin-bottom: 0; }
.rapport-filtres input { min-width: 160px; }

/* auto-fit plutôt que 4 colonnes fixes : le tableau de bord porte
   maintenant cinq indicateurs, et en portera d'autres. */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 16px; margin-bottom: 24px; }
.kpi { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 18px 20px; }
.kpi small { display: block; font-size: 12px; color: var(--c-muted); text-transform: uppercase;
  letter-spacing: .05em; font-weight: 700; margin-bottom: 6px; }
.kpi b { display: block; font-family: var(--font-display); font-size: 25px; font-weight: 800;
  color: var(--c-primary); font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi span { display: block; font-size: 12px; color: var(--c-muted); margin-top: 4px; }

.rapport-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.rapport-bloc { background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 16px; }
.rapport-bloc h2 { font-size: 16px; margin-bottom: 14px; }
.barre { margin-bottom: 14px; }
.barre:last-child { margin-bottom: 0; }
.barre-tete { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 5px; }
.barre-tete b { font-variant-numeric: tabular-nums; }
.barre-piste { height: 8px; border-radius: 999px; background: var(--c-surface-2); overflow: hidden; }
.barre-piste i { display: block; height: 100%; background: var(--c-primary); border-radius: 999px; }
.barre small { display: block; font-size: 11.5px; color: var(--c-muted); margin-top: 4px; }
.barre-jour .barre-tete span { text-transform: capitalize; }

.rapport-table { width: 100%; border-collapse: collapse; }
.rapport-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--c-muted); padding: 8px 10px; border-bottom: 1px solid var(--c-line); }
.rapport-table td { padding: 11px 10px; border-bottom: 1px solid var(--c-line); font-size: 14px; }
.rapport-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vide { color: var(--c-muted); font-size: 13.5px; text-align: center; padding: 12px; }
.statuts { display: flex; flex-wrap: wrap; gap: 8px; }
.statut-pill { background: var(--c-primary-soft); color: var(--c-primary); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; }
.statut-pill b { font-variant-numeric: tabular-nums; }

/* Boutons d'impression sur les commandes */
.print-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.print-actions .btn { padding: 9px 16px; font-size: 13px; }

@media (max-width: 900px) { .kpi-grid { grid-template-columns: 1fr 1fr; } .rapport-cols { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .kpi-grid { grid-template-columns: 1fr; } }

/* ── Chat ───────────────────────────────────────────────────────── */
.chat-page { padding: 32px 0 60px; }
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.chat-head h1 { font-size: clamp(22px, 3vw, 30px); margin: 4px 0 0; }
.chat-sub { color: var(--c-muted); margin: 6px 0 0; font-size: 14.5px; }
.chat-head-actions { display: flex; align-items: center; gap: 10px; }
.chat-head-actions .btn { padding: 8px 14px; font-size: 12.5px; }
.chat-status { font-size: 12.5px; font-weight: 700; color: var(--c-primary); background: var(--c-primary-soft);
  padding: 4px 10px; border-radius: 999px; }
.chat-box { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.chat-thread { display: flex; flex-direction: column; gap: 10px; padding: 20px; min-height: 340px;
  max-height: 55vh; overflow-y: auto; background: var(--c-bg); scroll-behavior: smooth; }
.chat-msg { align-self: flex-start; max-width: min(78%, 520px); background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: 16px 16px 16px 4px; padding: 11px 15px 8px; }
.chat-msg.is-mine { align-self: flex-end; border-radius: 16px 16px 4px 16px;
  background: var(--c-primary); border-color: transparent; color: #fff; }
.chat-msg p { margin: 0; font-size: 14.5px; line-height: 1.5; word-wrap: break-word; }
.chat-author { display: block; font-size: 11.5px; font-weight: 800; color: var(--c-primary); margin-bottom: 3px; }
.chat-time { display: block; text-align: right; font-size: 10.5px; color: var(--c-muted); margin-top: 3px; }
.chat-msg.is-mine .chat-time { color: rgba(255,255,255,.75); }
.chat-empty { margin: auto; text-align: center; color: var(--c-muted); }
.chat-empty .empty-emoji { font-size: 36px; }
.chat-empty p { font-size: 14px; max-width: 34ch; margin: 6px auto 0; }
.chat-closed { padding: 10px 20px; font-size: 13.5px; color: var(--c-muted); background: var(--c-surface-2); border-top: 1px solid var(--c-line); }
.chat-form { display: flex; align-items: flex-end; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--c-line); }
.chat-form textarea { flex: 1; resize: none; border: 1px solid var(--c-line); border-radius: 14px;
  padding: 12px 16px; font-family: var(--font-body); font-size: 15px; background: var(--c-bg);
  color: var(--c-ink); outline: none; max-height: 120px; transition: border-color .2s, box-shadow .2s; }
.chat-form textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--ring); }
.chat-form .btn { flex-shrink: 0; width: 46px; height: 46px; padding: 0; border-radius: 50%; font-size: 17px; }
.chat-hint { text-align: center; font-size: 12px; color: var(--c-muted); margin: 0; padding: 0 16px 14px; }
.chat-row { text-decoration: none; }
.chat-avatar { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%;
  background: var(--c-primary-soft); color: var(--c-primary); font-weight: 800; font-size: 17px; }
.chat-preview { color: var(--c-muted); }
.chat-when { font-size: 12px; color: var(--c-muted); flex-shrink: 0; align-self: flex-start; }
.chat-unread { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--c-primary); color: #fff; border-radius: 999px; font-size: 11.5px; font-weight: 800; margin-left: 6px; vertical-align: middle; }
@media (max-width: 620px) { .chat-thread { padding: 16px; max-height: 60vh; } .chat-msg { max-width: 88%; } }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1020px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .symptom-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .hero { padding: 40px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-ticket { display: none; }
  .hero-flow { display: block; margin-top: 8px; }
  .pack-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 22px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .detail-media { min-height: 240px; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .checkout-ticket { position: static; }
  /* Petit écran : le menu passe sous le logo, sur une ligne qui défile au
     doigt. Le masquer laissait le visiteur sans aucune navigation. */
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 10px; row-gap: 6px; column-gap: 8px; }
  .main-nav {
    order: 3; width: 100%; overflow-x: auto; scrollbar-width: none;
    margin: 0 -4px; padding: 0 4px 8px; -webkit-overflow-scrolling: touch;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { flex-shrink: 0; white-space: nowrap; padding: 7px 12px; font-size: 14px; }
  .rx-tracking-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .rx-buy-line { flex-direction: column; align-items: stretch; }
  .rx-buy-actions { justify-content: space-between; }
  .dash-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .symptom-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .category-grid { grid-template-columns: 1fr; }
  .card-emoji { font-size: 38px; }
  .field-row { grid-template-columns: 1fr; }
  .pay-options { grid-template-columns: 1fr; }
  .cart-line { flex-wrap: wrap; }
  .cart-line-actions { width: 100%; justify-content: space-between; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .coming-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .rdv-card { flex-wrap: wrap; }
  .rdv-action { width: 100%; align-items: stretch; flex-direction: row; }
  .container { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════════════════════════
   ESPACE MÉDECIN — rédiger et transmettre l'ordonnance numérique
   Aucune couleur en dur : tout passe par les variables de thème, pour
   que le mode sombre suive sans règle supplémentaire.
   ═══════════════════════════════════════════════════════════════════ */
.rx-write, .rx-sent { padding: 26px 0 60px; }
.rx-write-head { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.rx-write-head h1 { font-size: 27px; margin: 8px 0 6px; }
.rx-write-chip { display: inline-block; background: var(--c-primary-soft); color: var(--c-primary-text);
  border-radius: 999px; padding: 5px 13px; font-size: 11.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em; }
.rx-write-lead { color: var(--c-muted-strong); font-size: 14.5px; max-width: 52ch; margin: 0; }

.rx-card { background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 20px 20px 22px; margin: 0 0 18px; }
.rx-card > legend { display: flex; align-items: center; gap: 9px; font-size: 15px;
  font-weight: 800; color: var(--c-ink); padding: 0 4px; margin-left: -4px; }
.rx-legend-ico { display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 9px; background: var(--c-primary-soft); font-size: 15px; }

.rx-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; margin-top: 16px; }
.rx-col-2 { grid-column: span 2; }
.field-hint { display: block; color: var(--c-muted); font-size: 12px; margin-top: 5px; }

.rx-firmes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--c-surface-2); border-radius: 10px; padding: 10px 13px;
  font-size: 13px; color: var(--c-muted-strong); margin: 14px 0 16px; }
.rx-firmes b { color: var(--c-ink); font-weight: 700; }
.rx-firmes-all { margin-left: auto; background: none; border: 1px solid var(--c-line);
  color: var(--c-primary-text); font: inherit; font-weight: 700; font-size: 12.5px;
  border-radius: 999px; padding: 5px 12px; cursor: pointer; transition: background .15s, border-color .15s; }
.rx-firmes-all:hover { background: var(--c-primary-soft); border-color: var(--c-primary); }
.rx-firmes-all[aria-pressed="true"] { background: var(--c-primary); border-color: var(--c-primary);
  color: var(--c-primary-ink); }

.med-picked { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.med-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; background: var(--c-primary-soft); color: var(--c-primary-text); }
.med-tag.alt { background: var(--c-surface-2); color: var(--c-muted-strong); }
.prod-item.med-item b { font-size: 13.5px; }
.rx-entier { margin-top: 12px; }

.rx-write-bar { display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 16px 18px; }
.rx-write-note { margin: 0; font-size: 12.5px; color: var(--c-muted); max-width: 46ch; }

/* ── Écran de transmission ── */
.rx-sent-head { text-align: center; margin-bottom: 24px; }
.rx-sent-check { display: inline-grid; place-items: center; width: 62px; height: 62px;
  border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary); margin-bottom: 14px; }
.rx-sent-head h1 { font-size: 26px; margin: 0 0 6px; }
.rx-sent-lead { color: var(--c-muted); font-size: 14.5px; margin: 0; }
.rx-sent-card { background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.rx-sent-card h2 { font-size: 16px; margin: 0 0 6px; }
.rx-sent-help { color: var(--c-muted); font-size: 13.5px; margin: 0 0 16px; }

.rx-wa-btn { display: flex; align-items: center; gap: 13px; background: var(--c-whatsapp);
  color: #fff; border-radius: 12px; padding: 15px 18px; text-decoration: none;
  transition: filter .15s; }
.rx-wa-btn:hover { filter: brightness(1.07); color: #fff; }
.rx-wa-btn span { display: flex; flex-direction: column; line-height: 1.3; }
.rx-wa-btn b { font-size: 15px; }
.rx-wa-btn small { opacity: .85; font-size: 12.5px; }
.rx-wa-btn em { margin-left: auto; font-style: normal; font-size: 19px; }

.rx-link-row { display: flex; gap: 9px; margin-top: 14px; }
.rx-link-row input { flex: 1; min-width: 0; font-size: 12.5px; color: var(--c-muted);
  background: var(--c-surface-2); border: 1px solid var(--c-line); border-radius: 10px;
  padding: 10px 12px; }
#btn-copier-lien.is-ok { background: var(--c-primary); border-color: var(--c-primary);
  color: var(--c-primary-ink); }

.rx-recap { list-style: none; margin: 0; padding: 0; counter-reset: rx; }
.rx-recap li { counter-increment: rx; position: relative; padding: 13px 0 13px 34px;
  border-bottom: 1px solid var(--c-line); }
.rx-recap li:last-child { border-bottom: 0; padding-bottom: 0; }
.rx-recap li::before { content: counter(rx); position: absolute; left: 0; top: 13px;
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  background: var(--c-surface-2); color: var(--c-muted); font-size: 11.5px; font-weight: 800; }
.rx-recap-med { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rx-recap-info { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 5px;
  font-size: 12.5px; color: var(--c-muted); }
.rx-recap-note { margin: 16px 0 0; font-size: 13.5px; color: var(--c-muted);
  background: var(--c-surface-2); border-radius: 10px; padding: 11px 13px; }
.rx-sent-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ── Liste des ordonnances du médecin ── */
.rx-mine-head { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; }
.rx-mine-meds { font-size: 12.5px; color: var(--c-muted); margin: 4px 0 8px; }
.rdv-partial { background: var(--c-accent-soft); color: var(--c-accent); }
.rdv-waiting { background: var(--c-surface-2); color: var(--c-muted); }

@media (max-width: 640px) {
  .rx-grid { grid-template-columns: 1fr; }
  .rx-col-2 { grid-column: span 1; }
  .rx-write-bar { flex-direction: column; align-items: stretch; }
  .rx-write-bar .btn { width: 100%; }
  .rx-firmes-all { margin-left: 0; }
}

/* Consignes du médecin sur le devis — teinte info, pour la distinguer
   au premier coup d'œil de la note du pharmacien (qui est verte). */
.rx-presc-note { margin-top: 18px; background: var(--c-info-soft);
  border-color: color-mix(in srgb, var(--c-info) 25%, transparent); }
.rx-presc-note strong { color: var(--c-info); }
.dc-poso { color: var(--c-primary-text); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════
   ESPACE PHARMACIE PARTENAIRE — recevoir, accepter ou refuser
   ═══════════════════════════════════════════════════════════════════ */
.pt-page { padding: 24px 0 60px; }
.pt-head { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.pt-head h1 { font-size: 25px; margin: 0 0 5px; }
.pt-lead { color: var(--c-muted-strong); font-size: 14px; margin: 0; max-width: 58ch; }
.pt-officine { display: flex; align-items: center; gap: 11px; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: 12px; padding: 10px 14px; }
.pt-officine-ico { display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; background: var(--c-primary-soft); font-size: 17px; }
.pt-officine > span:last-child { display: flex; flex-direction: column; }
.pt-officine b { font-size: 14px; }
.pt-officine small { color: var(--c-muted-strong); font-size: 12px; }

.pt-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pt-nav-item { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px;
  border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface);
  color: var(--c-ink); text-decoration: none; font-size: 13.5px; font-weight: 700;
  transition: border-color .15s, background .15s; }
.pt-nav-item:hover { border-color: var(--c-primary); color: var(--c-ink); }
.pt-nav-item.is-on { background: var(--c-primary); border-color: var(--c-primary);
  color: var(--c-primary-ink); }
.pt-nav-pastille { background: var(--c-accent); color: #fff; border-radius: 999px;
  padding: 1px 7px; font-size: 11px; }

.pt-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--c-line);
  margin-bottom: 18px; }
.pt-tab { padding: 9px 14px; font-size: 13.5px; font-weight: 700; text-decoration: none;
  color: var(--c-muted-strong); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pt-tab:hover { color: var(--c-ink); }
.pt-tab.is-on { color: var(--c-primary-text); border-bottom-color: var(--c-primary); }
/* Un onglet qui porte du travail en attente doit se remarquer même quand
   on ne le regarde pas : c'est là que le parcours s'arrêtait. */
.pt-tab-actif b { background: var(--c-accent); color: #fff; }
.pt-tab b { background: var(--c-surface-2); border-radius: 999px; padding: 1px 7px;
  font-size: 11.5px; margin-left: 5px; }
.pt-tab.is-on b { background: var(--c-primary-soft); color: var(--c-primary-text); }

.pt-split { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px;
  align-items: start; }
.pt-liste { display: flex; flex-direction: column; gap: 8px; max-height: 78vh;
  overflow-y: auto; }
.pt-item { display: block; padding: 13px 15px; border-radius: 12px; text-decoration: none;
  background: var(--c-surface); border: 1px solid var(--c-line); color: var(--c-ink);
  transition: border-color .15s, box-shadow .15s; }
.pt-item:hover { border-color: var(--c-primary); color: var(--c-ink); }
.pt-item.is-on { border-color: var(--c-primary); box-shadow: 0 0 0 1px var(--c-primary) inset; }
.pt-item-haut { display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 5px; }
.pt-item-haut b { font-size: 14px; }
.pt-item-bas { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px;
  color: var(--c-muted-strong); }
.pt-item-total { margin-left: auto; font-weight: 700; color: var(--c-ink); }
.pt-chrono { margin-top: 7px; font-size: 11.5px; font-weight: 700;
  color: var(--c-primary-text); }
.pt-chrono.is-urgent { color: var(--c-danger); }
.pt-vide { padding: 30px 16px; }

.pt-badge { font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pt-attente { background: var(--c-accent-soft); color: var(--c-accent); }
.pt-acceptee { background: var(--c-primary-soft); color: var(--c-primary-text); }
.pt-refusee, .pt-expiree { background: var(--c-danger-soft); color: var(--c-danger); }
.pt-annulee { background: var(--c-surface-2); color: var(--c-muted-strong); }

.pt-detail { background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 20px; }
.pt-detail-head h2 { font-size: 18px; margin: 0 0 5px; display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap; }
.pt-detail-meta { font-size: 12.5px; color: var(--c-muted-strong); margin: 0 0 16px; }
.pt-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
  margin-bottom: 20px; }
.pt-bloc { background: var(--c-surface-2); border-radius: 12px; padding: 14px 16px; }
.pt-bloc h3 { font-size: 13px; margin: 0 0 10px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--c-muted-strong); }
.pt-bloc p { font-size: 13.5px; margin: 0 0 6px; }
.pt-muted { color: var(--c-muted-strong); }
.pt-alerte { color: var(--c-accent); font-weight: 600; }
.pt-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0;
  font-size: 13.5px; }
.pt-dl dt { color: var(--c-muted-strong); font-size: 12px; }
.pt-dl dd { margin: 0; font-weight: 600; }
.pt-titre-table { font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--c-muted-strong); margin: 0 0 10px; }

.pt-table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: 12px; }
.pt-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.pt-table th { text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--c-muted-strong); padding: 10px 12px;
  background: var(--c-surface-2); border-bottom: 1px solid var(--c-line); font-weight: 800; }
.pt-table td { padding: 11px 12px; border-bottom: 1px solid var(--c-line);
  vertical-align: middle; }
.pt-table tbody tr:last-child td { border-bottom: 0; }
.pt-table .num { text-align: right; }
.pt-table td small { display: block; color: var(--c-muted-strong); font-size: 11.5px; }
.pt-table tfoot td { background: var(--c-surface-2); font-weight: 700; }
.pt-vide-cell { text-align: center; color: var(--c-muted-strong); padding: 26px 12px; }

.pt-dispo { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; white-space: nowrap; }
.pt-dispo-ok { background: var(--c-primary-soft); color: var(--c-primary-text); }
.pt-dispo-bas { background: var(--c-accent-soft); color: var(--c-accent); }
.pt-dispo-rupture { background: var(--c-danger-soft); color: var(--c-danger); }

.pt-info { display: flex; gap: 10px; align-items: flex-start; background: var(--c-info-soft);
  border-radius: 11px; padding: 12px 14px; font-size: 13px; margin: 18px 0 14px;
  color: var(--c-ink); }
.pt-info-ok { background: var(--c-primary-soft); }
.pt-info-ko { background: var(--c-danger-soft); }

.pt-actions { margin: 0; }
.pt-refus { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center;
  background: var(--c-danger-soft); border-radius: 11px; padding: 13px 15px;
  margin-bottom: 12px; }
.pt-refus label { grid-column: 1 / -1; font-size: 13px; font-weight: 700;
  color: var(--c-danger); }
.pt-boutons { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.pt-btn-refus, .pt-btn-confirme-refus { border-color: var(--c-danger); color: var(--c-danger); }
.pt-btn-refus:hover, .pt-btn-confirme-refus:hover { background: var(--c-danger);
  color: #fff; border-color: var(--c-danger); }
.pt-btn-ok.is-pale { opacity: .5; }

.pt-alerte-stock { display: flex; gap: 11px; align-items: flex-start;
  background: var(--c-accent-soft); border-radius: 12px; padding: 13px 16px;
  margin-bottom: 16px; }
.pt-alerte-stock p { margin: 0; font-size: 13px; }
.pt-filtres { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px; }
.pt-filtres input[type="search"] { flex: 1; min-width: 200px; }
.pt-chip { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--c-line);
  background: var(--c-surface); font-size: 12.5px; font-weight: 700;
  color: var(--c-muted-strong); text-decoration: none; }
.pt-chip.is-on { background: var(--c-primary); border-color: var(--c-primary);
  color: var(--c-primary-ink); }
.pt-chip b { margin-left: 5px; }
.pt-qte { width: 78px; text-align: right; padding: 6px 9px; font-size: 13px;
  border: 1px solid var(--c-line); border-radius: 8px; background: var(--c-surface);
  color: var(--c-ink); }
.pt-qte:focus { border-color: var(--c-primary); outline: none; }
.pt-qte.is-envoi { opacity: .55; }
.pt-qte.is-ok { border-color: var(--c-primary); background: var(--c-primary-soft); }
.pt-qte.is-ko { border-color: var(--c-danger); background: var(--c-danger-soft); }
.pt-reserve { color: var(--c-muted-strong); }
.pt-note { font-size: 12.5px; color: var(--c-muted-strong); margin-top: 14px; }

@media (max-width: 1000px) {
  .pt-split { grid-template-columns: 1fr; }
  .pt-liste { max-height: none; flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .pt-item { min-width: 250px; }
  .pt-cols { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .pt-boutons { flex-direction: column-reverse; }
  .pt-boutons .btn { width: 100%; }
  .pt-refus { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   INSCRIPTION MÉDECIN — assistant en 4 étapes
   ═══════════════════════════════════════════════════════════════════ */
.wz-page { padding: 26px 0 60px; }
.wz-head { margin-bottom: 20px; }
.wz-head h1 { font-size: 26px; margin: 0 0 6px; }
.wz-lead { color: var(--c-muted-strong); font-size: 14.5px; margin: 0; max-width: 56ch; }

.wz-frise { display: flex; list-style: none; margin: 0 0 22px; padding: 18px 16px;
  gap: 6px; background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); overflow-x: auto; }
.wz-etape { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0;
  position: relative; padding-right: 6px; }
.wz-etape:not(:last-child)::after { content: ''; flex: 1; height: 2px; min-width: 16px;
  background: var(--c-line); border-radius: 2px; }
.wz-etape.is-faite:not(:last-child)::after { background: var(--c-primary); }
.wz-pastille { display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--c-surface-2); color: var(--c-muted-strong);
  font-weight: 800; font-size: 13px; flex: none; }
.wz-etape.is-active .wz-pastille { background: var(--c-primary); color: var(--c-primary-ink); }
.wz-etape.is-faite .wz-pastille { background: var(--c-primary-soft); color: var(--c-primary-text); }
.wz-libelle { font-size: 12px; font-weight: 700; color: var(--c-muted-strong);
  line-height: 1.25; }
.wz-etape.is-active .wz-libelle { color: var(--c-ink); }

.wz-form { margin: 0; }
.wz-radios { display: flex; gap: 16px; flex-wrap: wrap; }
.wz-radios label { display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; }
.wz-jours { display: flex; gap: 8px; flex-wrap: wrap; }
.wz-jours label { display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border: 1px solid var(--c-line); border-radius: 999px;
  font-size: 13px; font-weight: 700; background: var(--c-surface); cursor: pointer; }
.wz-jours label:has(input:checked) { border-color: var(--c-primary);
  background: var(--c-primary-soft); color: var(--c-primary-text); }
.wz-horaires { display: grid; grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 14px; margin-top: 14px; }

.wz-firmes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 9px; margin-top: 6px; }
.wz-firmes label { display: flex; align-items: center; gap: 9px; padding: 11px 13px;
  border: 1px solid var(--c-line); border-radius: 11px; background: var(--c-surface);
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: border-color .15s, background .15s; }
.wz-firmes label:hover { border-color: var(--c-primary); }
.wz-firmes label:has(input:checked) { border-color: var(--c-primary);
  background: var(--c-primary-soft); color: var(--c-primary-text); }
.wz-firmes-aide { display: flex; align-items: center; gap: 12px; margin: 14px 0 0;
  font-size: 12.5px; color: var(--c-muted-strong); }
.wz-tout { background: none; border: 0; font: inherit; font-weight: 700;
  color: var(--c-primary-text); cursor: pointer; text-decoration: underline; padding: 0; }

.wz-info { display: flex; gap: 11px; align-items: flex-start; background: var(--c-info-soft);
  border-radius: 12px; padding: 13px 16px; margin-bottom: 18px; }
.wz-info p { margin: 0; font-size: 13.5px; }

.wz-recap { margin-bottom: 14px; }
.wz-recap h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--c-muted-strong); margin: 0 0 12px; }

.wz-barre { display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.wz-barre-centre { justify-content: center; }
.wz-aide { text-align: center; font-size: 12.5px; color: var(--c-muted-strong);
  margin-top: 22px; }

.wz-fin { text-align: center; padding: 34px 24px; }
.wz-fin h1 { font-size: 24px; margin: 6px 0; }
.wz-fin .wz-lead { margin: 0 auto 20px; }
.wz-identifiant { display: inline-flex; flex-direction: column; gap: 3px;
  background: var(--c-primary-soft); border-radius: 12px; padding: 14px 24px;
  margin-bottom: 22px; }
.wz-identifiant b { font-size: 19px; color: var(--c-primary-text); letter-spacing: .01em; }
.wz-identifiant small { font-size: 11.5px; color: var(--c-muted-strong); }
.wz-suite { text-align: left; max-width: 46ch; margin: 0 auto; padding-left: 20px;
  font-size: 13.5px; color: var(--c-muted-strong); }
.wz-suite li { margin-bottom: 8px; }
.wz-suite b { color: var(--c-ink); }

@media (max-width: 720px) {
  .wz-frise { padding: 14px 12px; }
  .wz-libelle { display: none; }
  .wz-etape.is-active .wz-libelle { display: block; }
  .wz-horaires { grid-template-columns: 1fr 1fr; }
  .wz-barre { flex-direction: column-reverse; align-items: stretch; }
  .wz-barre .btn { width: 100%; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════════
   ORDONNANCE NUMÉRIQUE — document A4 imprimable, et sa vérification
   ═══════════════════════════════════════════════════════════════════ */
.doc-actions { display: flex; gap: 10px; justify-content: center; padding: 20px 16px 0;
  flex-wrap: wrap; }

.ord { max-width: 780px; margin: 20px auto 60px; background: #fff; color: #16201A;
  border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 34px 38px; font-size: 13px; line-height: 1.5; }
.ord-tete { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--c-primary); }
.ord-prescripteur h1 { font-size: 19px; margin: 0 0 3px; color: #16201A; }
.ord-qualite { font-weight: 700; color: var(--c-primary-text); margin: 0 0 6px; }
.ord-prescripteur p { margin: 0; font-size: 12px; color: #4A5852; }
.ord-marque { display: flex; flex-direction: column; align-items: flex-end;
  text-align: right; gap: 2px; }
.ord-croix { font-size: 22px; color: var(--c-primary); line-height: 1; }
.ord-marque b { font-size: 14px; }
.ord-marque small { font-size: 11px; color: #4A5852; max-width: 22ch; }

.ord-bandeau { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  background: #F3F8F4; border-radius: 10px; padding: 13px 16px; margin: 16px 0 20px; }
.ord-bandeau > div { display: flex; flex-direction: column; }
.ord-bandeau small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em;
  color: #5F6B64; font-weight: 700; }
.ord-bandeau b { font-size: 14px; }

.ord-titre { font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: #5F6B64; margin: 0 0 8px; }
.ord-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ord-table th { text-align: left; font-size: 10px; text-transform: uppercase;
  letter-spacing: .04em; color: #5F6B64; padding: 8px 9px; border-bottom: 1.5px solid #16201A; }
.ord-table td { padding: 10px 9px; border-bottom: 1px solid #E4EAE6; vertical-align: top; }
.ord-table td small { display: block; color: #5F6B64; font-size: 11px; font-style: italic; }
.ord-num { width: 30px; text-align: center; color: #5F6B64; }
.ord-qte { width: 68px; text-align: center; }

.ord-note { margin-top: 16px; background: #F3F8F4; border-left: 3px solid var(--c-primary);
  border-radius: 0 8px 8px 0; padding: 11px 14px; }
.ord-note b { display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: .05em; color: #5F6B64; margin-bottom: 4px; }
.ord-note p { margin: 0; font-size: 12.5px; }

.ord-pied { display: flex; justify-content: space-between; align-items: flex-end;
  gap: 30px; margin-top: 30px; padding-top: 18px; border-top: 1px solid #E4EAE6; }
.ord-verif { display: flex; gap: 14px; align-items: center; }
.ord-verif b { display: block; font-size: 12px; margin-bottom: 3px; }
.ord-verif p { margin: 0; font-size: 11px; color: #4A5852; }
.ord-code { font-family: 'Consolas', ui-monospace, monospace; font-size: 15px !important;
  font-weight: 700; letter-spacing: .08em; color: #16201A !important; margin-top: 4px !important; }
.ord-signature { text-align: center; min-width: 180px; }
.ord-signature img { max-height: 88px; max-width: 200px; }
.ord-signature-vide { height: 68px; border-bottom: 1px solid #16201A; }
.ord-signature small { display: block; margin-top: 5px; font-size: 11px; color: #4A5852; }
.ord-mention { margin: 22px 0 0; font-size: 10.5px; color: #5F6B64; text-align: center;
  line-height: 1.45; }

/* Impression : le document seul, sur une page A4 propre. */
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body { background: #fff; }
  .site-header, .site-footer, .doc-actions, .flash, .messages { display: none !important; }
  .ord { margin: 0; border: 0; border-radius: 0; padding: 0; max-width: none;
    font-size: 11.5px; }
  .ord-table { page-break-inside: auto; }
  .ord-table tr { page-break-inside: avoid; }
  .ord-pied { page-break-inside: avoid; }
}

/* ── Page publique de vérification ── */
.vf-page { padding: 34px 0 60px; }
.vf-head { text-align: center; margin-bottom: 24px; }
.vf-ico { display: inline-grid; place-items: center; width: 56px; height: 56px;
  border-radius: 50%; background: var(--c-primary-soft); font-size: 24px; margin-bottom: 12px; }
.vf-head h1 { font-size: 25px; margin: 0 0 6px; }
.vf-lead { color: var(--c-muted-strong); font-size: 14px; margin: 0 auto; max-width: 46ch; }

.vf-form { background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.vf-form label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 8px; }
.vf-saisie { display: flex; gap: 9px; }
.vf-saisie input { flex: 1; min-width: 0; font-size: 17px; letter-spacing: .12em;
  text-transform: uppercase; font-family: 'Consolas', ui-monospace, monospace; }
.vf-form small { display: block; margin-top: 8px; font-size: 12px;
  color: var(--c-muted-strong); }

.vf-resultat { border-radius: var(--radius); padding: 22px; text-align: center; }
.vf-resultat h2 { font-size: 19px; margin: 10px 0 16px; }
.vf-verdict { display: inline-grid; place-items: center; width: 46px; height: 46px;
  border-radius: 50%; font-size: 24px; font-weight: 800; }
.vf-ok { background: var(--c-primary-soft); }
.vf-ok .vf-verdict { background: var(--c-primary); color: var(--c-primary-ink); }
.vf-ok h2 { color: var(--c-primary-text); }
.vf-ok .pt-dl { text-align: left; max-width: 400px; margin: 0 auto;
  grid-template-columns: auto 1fr; }
.vf-ko { background: var(--c-danger-soft); }
.vf-ko .vf-verdict { background: var(--c-danger); color: #fff; }
.vf-ko h2 { color: var(--c-danger); }
.vf-ko p { font-size: 13.5px; max-width: 46ch; margin: 0 auto 14px; }
.vf-note { display: flex; gap: 11px; align-items: flex-start; margin-top: 16px;
  background: var(--c-surface-2); border-radius: 12px; padding: 13px 16px; }
.vf-note p { margin: 0; font-size: 12.5px; color: var(--c-muted-strong); }
.vf-note b { color: var(--c-ink); }

@media (max-width: 640px) {
  .ord { padding: 20px; }
  .ord-tete, .ord-pied { flex-direction: column; align-items: flex-start; }
  .ord-marque { align-items: flex-start; text-align: left; }
  .ord-bandeau { grid-template-columns: 1fr; gap: 10px; }
  .vf-saisie { flex-direction: column; }
}
.rx-doc-lien { display: flex; align-items: center; gap: 13px; margin-top: 12px;
  background: var(--c-surface-2); border: 1px solid var(--c-line); border-radius: 12px;
  padding: 13px 16px; text-decoration: none; color: var(--c-ink);
  transition: border-color .15s; }
.rx-doc-lien:hover { border-color: var(--c-primary); color: var(--c-ink); }
.rx-doc-lien span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.3; }
.rx-doc-lien small { color: var(--c-muted-strong); font-size: 12px; }
.rx-doc-lien em { margin-left: auto; font-style: normal; font-size: 18px;
  color: var(--c-primary-text); }
.devis-doc { margin: 14px 0 0; font-size: 13.5px; }

/* ── Registre des commissions ── */
.cm-totaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin-bottom: 20px; }
.cm-tuile { background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; }
.cm-tuile small { font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--c-muted-strong); font-weight: 700; }
.cm-tuile b { font-size: 24px; margin: 4px 0 2px; }
.cm-tuile span { font-size: 12px; color: var(--c-muted-strong); }
.cm-du { border-color: var(--c-accent); background: var(--c-accent-soft); }
.cm-du b { color: var(--c-accent); }
.cm-medecins { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px; margin-bottom: 20px; }
.cm-medecin { display: flex; flex-direction: column; gap: 2px; padding: 13px 15px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 12px;
  text-decoration: none; color: var(--c-ink); transition: border-color .15s; }
.cm-medecin:hover { border-color: var(--c-primary); color: var(--c-ink); }
.cm-medecin span { font-size: 17px; font-weight: 800; color: var(--c-accent); }
.cm-medecin small { font-size: 11.5px; color: var(--c-muted-strong); }
.cm-payer { display: flex; gap: 6px; }
.cm-payer input { width: 120px; font-size: 12px; padding: 6px 9px; }
.cm-payer .btn { font-size: 12px; padding: 6px 11px; white-space: nowrap; }

/* ── Poste de relais des sollicitations ── */
.so-alerte { display: flex; flex-direction: column; align-items: center;
  background: var(--c-danger-soft); border-radius: 12px; padding: 10px 18px; }
.so-alerte b { font-size: 22px; color: var(--c-danger); line-height: 1; }
.so-alerte span { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--c-danger); }
.so-retard { background: var(--c-danger-soft); }
.so-wa { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px;
  border-radius: 999px; background: var(--c-whatsapp); color: #fff;
  font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: filter .15s; }
.so-wa:hover { filter: brightness(1.08); color: #fff; }
.so-sans-num { color: var(--c-muted-strong); font-size: 11.5px; }
.pt-info code { background: var(--c-surface-2); border-radius: 5px; padding: 1px 5px;
  font-size: 11.5px; }

/* ── Mon établissement (partenaire) ── */
.et-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px; margin-bottom: 18px; }
.et-chiffre { background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; }
.et-chiffre b { font-size: 24px; line-height: 1.1; }
.et-chiffre small { font-size: 11.5px; color: var(--c-muted-strong); margin-top: 3px; }
.et-ok b { color: var(--c-primary-text); }
.et-ko b { color: var(--c-danger); }
.et-fige { margin-top: 14px; }
.et-fige dd { color: var(--c-muted-strong); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════
   RECHERCHES — prescripteur et stocks partenaire
   ═══════════════════════════════════════════════════════════════════ */

/* ── Prescripteur : filtres, attente, surlignage, cible clavier ── */
.rx-classes { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 0 16px; }
.rx-classe { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--c-line);
  background: var(--c-surface); font: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--c-muted-strong); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s; }
.rx-classe:hover { border-color: var(--c-primary); color: var(--c-ink); }
.rx-classe.is-on { background: var(--c-primary); border-color: var(--c-primary);
  color: var(--c-primary-ink); }

.med-spin { position: absolute; right: 12px; top: 50%; width: 15px; height: 15px;
  margin-top: -7px; border: 2px solid var(--c-line);
  border-top-color: var(--c-primary); border-radius: 50%;
  animation: med-tourne .7s linear infinite; pointer-events: none; }
@keyframes med-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .med-spin { animation-duration: 2.4s; }
}

.prod-item.is-cible { background: var(--c-primary-soft); }
.prod-item mark { background: color-mix(in srgb, var(--c-primary) 26%, transparent);
  color: inherit; border-radius: 3px; padding: 0 1px; font-weight: 800; }
.prod-elargir { display: block; margin-top: 9px; background: none; border: 0;
  font: inherit; font-size: 12.5px; font-weight: 700; color: var(--c-primary-text);
  text-decoration: underline; cursor: pointer; padding: 0; text-align: left; }

/* ── Stocks : barre de recherche ── */

.st-raz { font-size: 12.5px; font-weight: 700; color: var(--c-primary-text);
  text-decoration: none; margin-left: 4px; }
.st-raz:hover { text-decoration: underline; color: var(--c-primary-text); }
.st-lien { background: none; border: 0; font: inherit; font-weight: 700;
  color: var(--c-primary-text); text-decoration: underline; cursor: pointer;
  padding: 0; margin-top: 8px; }

/* ── Stocks : compteur − / + ── */
.st-compteur { display: inline-flex; align-items: center; gap: 4px; }
.st-pas { width: 28px; height: 30px; border: 1px solid var(--c-line);
  background: var(--c-surface); color: var(--c-ink); border-radius: 8px;
  font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: border-color .15s, background .15s; }
.st-pas:hover { border-color: var(--c-primary); background: var(--c-primary-soft);
  color: var(--c-primary-text); }
.st-compteur .pt-qte { width: 64px; }
.st-message td { background: var(--c-danger-soft); color: var(--c-danger);
  font-size: 12.5px; font-weight: 600; }

/* ── Stocks : ajouter une référence ── */
.st-ajout { background: var(--c-surface); border: 1px solid var(--c-primary);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.st-ajout-tete { display: flex; justify-content: space-between; align-items: center;
  gap: 12px; }
.st-ajout-tete h2 { font-size: 16px; margin: 0; }
.st-fermer { background: none; border: 0; font-size: 17px; cursor: pointer;
  color: var(--c-muted-strong); padding: 4px 7px; border-radius: 7px; line-height: 1; }
.st-fermer:hover { background: var(--c-surface-2); color: var(--c-ink); }
.st-ajout-aide { font-size: 13px; color: var(--c-muted-strong); margin: 6px 0 14px; }
.st-ajout-champ { position: relative; }
.st-ajout-champ input { width: 100%; }
.st-cat-res { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 5px);
  max-height: 320px; overflow-y: auto; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: 12px; box-shadow: var(--shadow-lg); }
.st-cat-item { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--c-line);
  flex-wrap: wrap; }
.st-cat-item:last-child { border-bottom: 0; }
.st-cat-item > span:first-child { display: flex; flex-direction: column;
  min-width: 0; flex: 1; }
.st-cat-item b { font-size: 13.5px; }
.st-cat-item small { font-size: 11.5px; color: var(--c-muted-strong); }
.st-cat-actions { display: flex; gap: 7px; align-items: center; }
.st-cat-qte { width: 72px; text-align: right; padding: 6px 9px; font-size: 13px;
  border: 1px solid var(--c-line); border-radius: 8px; background: var(--c-surface);
  color: var(--c-ink); }
.st-cat-ok { font-size: 12.5px; padding: 7px 13px; white-space: nowrap; }
.st-cat-item.is-ajoute { background: var(--c-primary-soft); }
.st-cat-fait { font-size: 12.5px; font-weight: 700; color: var(--c-primary-text); }
.st-cat-erreur { flex-basis: 100%; margin: 6px 0 0; font-size: 12px;
  color: var(--c-danger); }

@media (max-width: 640px) {
  .st-cat-item { flex-direction: column; align-items: stretch; }
  .st-cat-actions { justify-content: flex-end; }
}

/* Le champ du prescripteur : même mise en forme que celui du pharmacien,
   avec une loupe intégrée (SVG en fond, aucun fichier à servir). */
.med-search { width: 100%; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 12px 38px 12px 42px; font-family: var(--font-body); font-size: 14.5px;
  background: var(--c-surface); color: var(--c-ink); outline: none;
  transition: border-color .2s, box-shadow .2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F6B64' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 13px center; background-size: 18px; }
.med-search:focus { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--ring); }
.med-search::placeholder { color: var(--c-muted-strong); }
[data-theme="dark"] .med-search {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239AA79F' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }

/* ── Stocks : barre d'outils refaite ────────────────────────────────
   Un seul champ, large, avec ses commandes DEDANS ; un seul bouton
   d'action à côté. Deux boutons de même poids se disputaient l'œil. */
.st-rappel { display: flex; gap: 10px; align-items: flex-start;
  background: var(--c-accent-soft); border-radius: 10px; padding: 10px 14px;
  margin: 0 0 16px; font-size: 12.5px; line-height: 1.45; }
.st-rappel b { color: var(--c-ink); }

.st-outils { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap;
  margin-bottom: 12px; }
.st-champ { position: relative; display: flex; align-items: center;
  flex: 1 1 340px; min-width: 0; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--radius);
  transition: border-color .18s, box-shadow .18s; }
.st-champ:focus-within { border-color: var(--c-primary);
  box-shadow: 0 0 0 4px var(--ring); }
.st-loupe { display: flex; padding: 0 0 0 14px; color: var(--c-muted-strong);
  pointer-events: none; flex: none; }
.st-champ input[type="search"] { flex: 1; min-width: 0; border: 0; outline: none;
  background: none; color: var(--c-ink); font-family: var(--font-body);
  font-size: 14.5px; padding: 12px 10px; }
.st-champ input[type="search"]::placeholder { color: var(--c-muted-strong); }
.st-champ input[type="search"]::-webkit-search-cancel-button { display: none; }

.st-vider, .st-lancer { flex: none; display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; }
.st-vider { width: 26px; height: 26px; border-radius: 50%; font-size: 13px;
  color: var(--c-muted-strong); line-height: 1; }
.st-vider:hover { background: var(--c-surface-2); color: var(--c-ink); }
.st-lancer { width: 42px; align-self: stretch; color: var(--c-primary-text);
  border-left: 1px solid var(--c-line); border-radius: 0 var(--radius) var(--radius) 0;
  margin-left: 6px; transition: background .15s, color .15s; }
.st-lancer:hover { background: var(--c-primary); color: var(--c-primary-ink); }
.st-ajout-btn { flex: none; white-space: nowrap; }

.st-chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 16px; }
.st-compte { margin-left: auto; font-size: 12.5px; color: var(--c-muted-strong); }
.st-compte b { color: var(--c-ink); }
.st-compte em { font-style: normal; color: var(--c-accent); }

/* La colonne « Réservé » est presque toujours à zéro : on l'atténue pour
   que l'œil aille d'abord sur ce qui compte, le disponible. */
.pt-reserve { color: var(--c-muted-strong); font-variant-numeric: tabular-nums; }
.pt-table-stock td.num { font-variant-numeric: tabular-nums; }
.pt-table-stock .js-dispo b { font-size: 14px; }

@media (max-width: 700px) {
  .st-outils { flex-direction: column; }
  .st-ajout-btn { width: 100%; }
  .st-compte { margin-left: 0; width: 100%; }
}

/* ── Devis : choisir la quantité, pas seulement inclure ou exclure ── */
.dc-pas { display: inline-flex; align-items: center; gap: 4px; }
.dc-moins, .dc-plus { width: 30px; height: 32px; flex: none; display: grid;
  place-items: center; border: 1px solid var(--c-line); background: var(--c-surface);
  color: var(--c-ink); border-radius: 9px; font-size: 17px; font-weight: 700;
  line-height: 1; cursor: pointer; transition: border-color .15s, background .15s; }
.dc-moins:hover:not(:disabled), .dc-plus:hover:not(:disabled) {
  border-color: var(--c-primary); background: var(--c-primary-soft);
  color: var(--c-primary-text); }
.dc-moins:disabled, .dc-plus:disabled { opacity: .35; cursor: default; }
.js-rx-qte { width: 54px; height: 32px; text-align: center; border: 1px solid var(--c-line);
  border-radius: 9px; background: var(--c-surface); color: var(--c-ink);
  font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0 4px; }
.js-rx-qte:focus { border-color: var(--c-primary); outline: none;
  box-shadow: 0 0 0 3px var(--ring); }
.dc-sur { display: block; margin-top: 4px; font-size: 11px; color: var(--c-muted-strong); }
.dc-check-entier { display: inline-flex; align-items: center; gap: 8px; }
.dc-cure { font-size: 12.5px; font-weight: 700; color: var(--c-muted-strong);
  white-space: nowrap; }
.devis-row.is-partiel { background: color-mix(in srgb, var(--c-accent) 7%, transparent); }
.devis-row.is-partiel .dc-tot { color: var(--c-accent); }
.devis-reste { display: block; margin-top: 5px; font-size: 12.5px;
  color: var(--c-muted-strong); }

/* Page de verrouillage après trop de tentatives de connexion */
.vr-bloc { text-align: center; }
.vr-bloc p { max-width: 48ch; margin: 0 auto 14px; font-size: 14px; }
.vr-detail { color: var(--c-muted-strong); font-size: 13px !important; }
.vr-retour { text-align: center; margin-top: 18px; }

/* ═══════════════════════════════════════════════════════════════════
   Pages d'atterrissage (/medecins/, /partenaires/)
   Une seule colonne, un seul appel à l'action par écran : ces pages
   sont lues sur téléphone, souvent en 3G, souvent debout.
   ═══════════════════════════════════════════════════════════════════ */
.vt-hero { padding: 56px 0 44px; text-align: center;
  background: linear-gradient(180deg, var(--c-primary-soft), transparent); }
.vt-chip { display: inline-block; padding: 5px 13px; border-radius: 999px;
  background: var(--c-surface); border: 1px solid var(--c-line);
  color: var(--c-primary-text); font-size: 12.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; }
.vt-hero h1 { margin: 16px 0 0; font-size: clamp(27px, 4.4vw, 42px);
  line-height: 1.18; letter-spacing: -.02em; }
.vt-lead { max-width: 60ch; margin: 16px auto 0; font-size: 16.5px;
  line-height: 1.65; color: var(--c-muted-strong); }
.vt-actions { display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center; margin-top: 26px; }
.vt-gratuit { margin-top: 14px; font-size: 13px; color: var(--c-muted); }

.vt-section { padding: 46px 0; }
.vt-alt { background: var(--c-bg-2); }
.vt-section h2 { margin: 0 0 26px; font-size: clamp(21px, 3vw, 27px);
  text-align: center; letter-spacing: -.01em; }

.vt-grille { display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.vt-carte { padding: 22px 20px; border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); background: var(--c-surface); }
.vt-ico { display: block; font-size: 26px; line-height: 1; margin-bottom: 12px; }
.vt-carte h3 { margin: 0 0 8px; font-size: 16.5px; }
.vt-carte p { margin: 0; font-size: 14.5px; line-height: 1.6;
  color: var(--c-muted-strong); }

.vt-etapes { max-width: 62ch; margin: 0 auto; padding-left: 22px;
  display: grid; gap: 14px; }
.vt-etapes li { font-size: 15.5px; line-height: 1.65; color: var(--c-muted-strong); }
.vt-etapes b { color: var(--c-ink); }

.vt-note { max-width: 62ch; margin: 26px auto 0; padding: 16px 18px;
  border-left: 3px solid var(--c-accent); border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--c-accent-soft); font-size: 14.5px; line-height: 1.6;
  color: var(--c-ink); }

.vt-faq { max-width: 62ch; margin: 0 auto; }
.vt-faq details { border-bottom: 1px solid var(--c-line); padding: 4px 0; }
.vt-faq summary { padding: 13px 2px; font-weight: 700; font-size: 15.5px;
  cursor: pointer; list-style: none; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; }
.vt-faq summary::-webkit-details-marker { display: none; }
.vt-faq summary::after { content: '+'; font-size: 20px; font-weight: 600;
  color: var(--c-primary-text); line-height: 1; }
.vt-faq details[open] summary::after { content: '−'; }
.vt-faq details p { margin: 0 2px 15px; font-size: 14.5px; line-height: 1.65;
  color: var(--c-muted-strong); }

.vt-final { padding: 52px 0 60px; text-align: center;
  background: var(--c-primary-soft); }
.vt-final h2 { margin: 0 0 8px; font-size: clamp(21px, 3vw, 27px); }
.vt-final .vt-lead { margin-bottom: 22px; }

/* ═══════════════════════════════════════════════════════════════════
   Pages d'erreur (404, 403, 400)
   Une erreur ne doit pas ressembler à une panne : on dit ce qui s'est
   passé, puis on propose une sortie.
   ═══════════════════════════════════════════════════════════════════ */
.err-page { padding: 64px 0 72px; text-align: center; }
.err-code { display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--c-primary-soft); color: var(--c-primary-text);
  font-size: 12.5px; font-weight: 800; letter-spacing: .08em; }
.err-page h1 { margin: 18px 0 0; font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2; letter-spacing: -.02em; }
.err-lead { max-width: 52ch; margin: 16px auto 0; font-size: 16px;
  line-height: 1.65; color: var(--c-muted-strong); }
.err-actions { display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center; margin-top: 28px; }
.err-pistes { max-width: 44ch; margin: 42px auto 0; padding: 22px 24px;
  border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  background: var(--c-surface); text-align: left; }
.err-pistes h2 { margin: 0 0 12px; font-size: 15px; }
.err-pistes ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.err-pistes li { font-size: 14.5px; line-height: 1.5; }
.err-aide { margin-top: 18px; font-size: 13.5px; line-height: 1.6;
  color: var(--c-muted-strong); }

/* Erreurs de formulaire regroupées en tête de page */
.form-erreurs { margin: 0 0 20px; padding: 14px 18px;
  border-left: 3px solid var(--c-danger);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--c-danger-soft); color: var(--c-ink); font-size: 14.5px; }
.form-erreurs ul { margin: 8px 0 0; padding-left: 20px; }
.form-erreurs li { line-height: 1.5; }

.param-logo { display: block; max-width: 260px; height: auto; margin: 0 0 10px;
  border: 1px solid var(--c-line); border-radius: var(--radius); }

/* ═══════════════════════════════════════════════════════════════════
   Paiement — l'état de l'argent, distinct de l'état de la commande
   ═══════════════════════════════════════════════════════════════════ */
.btn-sm { padding: 7px 14px; font-size: 13.5px; }
/* Alerte sonore des postes de travail : toujours visible, en bas d'écran. */
.alerte-son {
  position: fixed; z-index: 90; left: 12px; right: 12px; bottom: 12px;
  max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius-lg);
  background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: var(--shadow-lg);
  font-size: 14px; font-weight: 600;
}
.alerte-son[hidden] { display: none; }
.alerte-son > span { flex: 1 1 220px; }
.alerte-son-active { background: var(--c-danger-soft); border-color: var(--c-danger); color: var(--c-danger); }
@media (prefers-reduced-motion: no-preference) {
  .alerte-son-active { animation: alerte-pulse 1.2s ease-in-out infinite; }
}
@keyframes alerte-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c-danger) 25%, transparent); } }

/* Dotation professionnelle (page médecin) */
.dot-actuel { background: var(--tint-mango-bg); border: 1px solid color-mix(in srgb, var(--tint-mango-ink) 30%, transparent);
  border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 18px; }
.dot-actuel-titre, .dot-surtitre { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--c-muted-strong); margin-bottom: 12px; }
.dot-actuel-corps { display: flex; gap: 18px; align-items: center; }
.dot-actuel-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dot-actuel-texte b { font-size: 19px; }
.dot-actuel-texte p { margin: 2px 0 8px; color: var(--c-muted-strong); font-size: 14px; }
.dot-actuel-texte small { color: var(--c-muted); font-size: 12.5px; }
.dot-visuel { display: grid; place-items: center; width: 96px; height: 96px; flex-shrink: 0;
  border-radius: 14px; background: var(--c-surface); overflow: hidden; font-size: 40px; }
.dot-visuel img { width: 100%; height: 100%; object-fit: contain; }
.dot-fond { background: var(--c-surface-2); }
.dot-barre { display: block; height: 10px; border-radius: 999px; background: var(--c-surface-2); overflow: hidden; }
.dot-barre > span { display: block; height: 100%; border-radius: inherit; background: var(--c-primary); }
.dot-barre-mini { height: 6px; width: 80%; }
.dot-compte { font-size: 20px; color: var(--c-primary-text); margin: 0 0 6px; }
.dot-section { font-size: 19px; margin: 26px 0 12px; }
.dot-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 20px; }
.dot-carte { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 14px 10px; }
.dot-carte b { font-size: 13.5px; line-height: 1.3; }
.dot-carte .dot-visuel { width: 72px; height: 72px; font-size: 32px; }
.dot-carte.dot-progression { background: var(--tint-mango-bg); }
.dot-carte.dot-a_venir { opacity: .75; }
.dot-a-venir { background: var(--c-surface-2); color: var(--c-muted); }
.dot-apropos { background: var(--c-primary-soft); border-radius: var(--radius-lg); padding: 14px 18px; margin: 10px 0; }
.dot-apropos p { margin: 6px 0 0; font-size: 13.5px; color: var(--c-muted-strong); }
.dot-annuler { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.dot-annuler input { font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--c-line);
  border-radius: var(--radius); background: var(--c-surface); color: var(--c-ink); min-width: 0; }
@media (max-width: 520px) { .dot-actuel-corps { flex-direction: column; align-items: flex-start; } }

/* Dotation côté gestion : le modèle chiffré, les totaux, le relevé. */
.dot-modele-etapes { margin: 8px 0 16px; padding-left: 20px; display: flex; flex-direction: column;
  gap: 6px; font-size: 14px; color: var(--c-muted-strong); }
.dot-modele-etapes b { color: var(--c-ink); }
.dot-modele-exemple { background: var(--c-surface-2); border-radius: var(--radius); padding: 14px 16px; }
.dot-modele-exemple p { margin: 12px 0 0; font-size: 14px; }
.dot-equation { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.dot-equation span { display: flex; flex-direction: column; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--radius); padding: 8px 12px; }
.dot-equation small { font-size: 11.5px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.dot-equation b { font-size: 16px; font-variant-numeric: tabular-nums; }
.dot-equation i { font-style: normal; font-weight: 800; color: var(--c-muted); }
.dot-equation .dot-equation-resultat { background: var(--c-primary-soft); border-color: var(--c-primary); }
.dot-equation-resultat b { color: var(--c-primary-text); }
.dot-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.dot-chiffres div { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.dot-chiffres small { font-size: 12px; color: var(--c-muted); font-weight: 700; }
.dot-chiffres b { font-size: 20px; font-variant-numeric: tabular-nums; }
.dot-registre { overflow-x: auto; }
.dot-registre-ligne { display: grid; grid-template-columns: 90px minmax(140px, 1.4fr) repeat(4, minmax(80px, 1fr));
  gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--c-line); font-size: 13.5px; min-width: 620px; }
.dot-registre-ligne.est-masquee { opacity: .55; text-decoration: line-through; }
.dot-registre-tete { border-top: 0; font-size: 11.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; color: var(--c-muted); }
.dot-registre-ligne .num { text-align: right; font-variant-numeric: tabular-nums; }
.dot-registre-ligne small { color: var(--c-muted); }
@media (max-width: 560px) { .dot-chiffres { grid-template-columns: 1fr; } }

/* Listes du back-office : gammes, équipe, invitations */
.gestion-liste { background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); padding: 4px 20px; box-shadow: var(--shadow); }
.gestion-ligne { display: flex; align-items: center; gap: 14px; padding: 14px 0; flex-wrap: wrap; }
.gestion-ligne + .gestion-ligne { border-top: 1px solid var(--c-line); }
.gestion-ligne.est-masquee { opacity: .6; }
.gestion-ligne-texte { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gestion-ligne-texte b { font-size: 15px; }
.gestion-ligne-texte small { color: var(--c-muted); font-size: 13px; overflow-wrap: anywhere; }
.gestion-ligne-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.gestion-ligne-actions form { margin: 0; }
.gestion-vignette { display: grid; place-items: center; width: 64px; height: 64px; flex-shrink: 0;
  border-radius: 12px; overflow: hidden; font-size: 28px; }
.gestion-vignette img { width: 100%; height: 100%; object-fit: cover; }
.equipe-titre { font-size: 17px; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.equipe-nb { font-size: 12px; font-weight: 700; background: var(--c-surface-2); color: var(--c-muted);
  border-radius: 999px; padding: 2px 9px; }
.equipe-alerte { border-color: color-mix(in srgb, var(--c-accent) 55%, var(--c-line)); }
.equipe-lien { width: 100%; margin-top: 8px; font: inherit; font-size: 12.5px; color: var(--c-muted-strong);
  background: var(--c-surface-2); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 8px 10px; }
.equipe-invitation .btn { margin-top: 4px; }
.cat-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 480px) { .cat-head-actions { width: 100%; } .cat-head-actions .btn { flex: 1; } }

.paie { display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.paie-ok { background: var(--tint-green-bg); color: var(--tint-green-ink); }
.paie-cash { background: var(--c-accent-soft); color: var(--tint-mango-ink); }
.paie-attente { background: var(--c-danger-soft); color: var(--c-danger); }
.paie-ref { font-weight: 500; opacity: .8; }

.paie-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 8px; }
.paie-form input { flex: 1 1 190px; min-width: 0; height: 34px;
  padding: 0 11px; border: 1px solid var(--c-line); border-radius: 9px;
  background: var(--c-surface); color: var(--c-ink); font-size: 13.5px; }
.paie-form input:focus { border-color: var(--c-primary); outline: none;
  box-shadow: 0 0 0 3px var(--ring); }

/* Carte de mission du livreur : l'information qu'il lit avant de sonner */
.mission-paie { margin-top: 8px !important; padding: 9px 13px;
  border-radius: var(--radius); font-size: 14px; font-weight: 600; }
.mission-paie-cash { background: var(--c-accent-soft); color: var(--tint-mango-ink); }
.mission-paie-ok { background: var(--tint-green-bg); color: var(--tint-green-ink); }
.mission-paie-attente { background: var(--c-danger-soft); color: var(--c-danger); }
.mission-encaisse { display: flex; align-items: center; gap: 9px;
  margin: 4px 0 2px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* Remise au comptoir : confirmer l'encaissement avant de lâcher la boîte */
.pt-encaisse { display: flex; align-items: center; gap: 10px;
  margin: 12px 0 4px; padding: 11px 14px;
  border: 1px solid var(--c-accent); border-radius: var(--radius);
  background: var(--c-accent-soft); color: var(--c-ink);
  font-size: 14.5px; font-weight: 700; cursor: pointer; }

/* ═══════════════════════════════════════════════════════════════════
   Paiement mobile money — l'écran que le patient regarde en saisissant
   son code PIN. Il doit être lisible à une main, sur un téléphone,
   dans la rue.
   ═══════════════════════════════════════════════════════════════════ */
.kp-bloc { margin: 20px 0; padding: 20px; border-radius: var(--radius-lg);
  border: 1px solid var(--c-primary); background: var(--c-primary-soft); }
.kp-titre { margin: 0 0 6px; font-size: 16.5px; }
.kp-aide { margin: 0 0 16px; font-size: 13.5px; line-height: 1.6;
  color: var(--c-muted-strong); }
.kp-label { display: block; margin-bottom: 6px; font-size: 13px;
  font-weight: 700; color: var(--c-muted-strong); }
.kp-form input { width: 100%; height: 48px; padding: 0 14px; margin-bottom: 12px;
  border: 1px solid var(--c-line); border-radius: var(--radius);
  background: var(--c-surface); color: var(--c-ink);
  font-size: 17px; font-variant-numeric: tabular-nums; }
.kp-form input:focus { border-color: var(--c-primary); outline: none;
  box-shadow: 0 0 0 3px var(--ring); }

.kp-attente { text-align: center; padding: 8px 0 2px; }
.kp-attente p { margin: 10px 0 0; font-size: 15px; line-height: 1.6; }
.kp-petit { font-size: 13px !important; color: var(--c-muted-strong); }
.kp-spin { display: inline-block; width: 30px; height: 30px;
  border: 3px solid var(--c-line); border-top-color: var(--c-primary);
  border-radius: 50%; animation: kp-tourne 1s linear infinite; }
@keyframes kp-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .kp-spin { animation-duration: 3s; } }

.kp-ok p, .kp-ok-statique { margin: 0; padding: 13px 16px;
  border-radius: var(--radius); background: var(--tint-green-bg);
  color: var(--tint-green-ink); font-size: 15px; font-weight: 600; }
.kp-ok-statique { margin: 16px 0; }
.kp-erreur { margin: 12px 0 0; padding: 11px 14px; border-radius: var(--radius);
  background: var(--c-danger-soft); color: var(--c-danger);
  font-size: 14px; line-height: 1.55; }

/* Attente d'un devis : dire que la page travaille toute seule */
.rx-attente-auto { display: flex; align-items: center; justify-content: center;
  gap: 9px; margin: 16px auto 6px !important; padding: 11px 16px;
  max-width: 42ch; border-radius: var(--radius);
  background: var(--c-primary-soft); color: var(--c-primary-text);
  font-size: 14.5px; line-height: 1.5; }
.rx-attente-pastille { flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: var(--c-primary); animation: rx-battement 1.8s ease-in-out infinite; }
@keyframes rx-battement {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.75); }
}
@media (prefers-reduced-motion: reduce) {
  .rx-attente-pastille { animation: none; }
}
.rx-attente-partir { max-width: 46ch; margin: 0 auto !important;
  font-size: 13.5px !important; color: var(--c-muted-strong); }
