/* PMSH Sainte-Hélène — back-office, version 3.3.6
   Sobre et fin : traits de 1 px, peu de gras, l'état d'un élément est un point de couleur suivi d'un mot court.
   Système visuel 3.3.6 (un seul jeu de règles) :
   - espacements sur une grille de 4 px : 4 · 8 · 12 · 16 · 24 · 32 (8 / 16 / 24 pour les rythmes courants) ;
   - une seule carte (.bloc = .carte = .carte-cote) : marge intérieure 20 px (16 sur téléphone), titre → contenu 12 px, coins coupés ;
   - deux hauteurs de contrôles : 40 px (boutons, champs, segments) et 32 px (« petit ») ;
   - alignement sur la ligne de base ; points et icônes calés sur la première ligne ;
   - montants : chiffres tabulaires, « FCFA » plus petit et non gras, alignés à droite.
   Organisation : base, composants, écrans, animations, puis les adaptations par largeur d'écran (de la plus large à la plus étroite). */
@font-face { font-family: Plex; src: url(fonts/Plex-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Plex; src: url(fonts/Plex-Italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: Plex; src: url(fonts/Plex-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Plex; src: url(fonts/Plex-SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Plex; src: url(fonts/Plex-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: PlexCond; src: url(fonts/PlexCond-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: PlexCond; src: url(fonts/PlexCond-SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: PlexCond; src: url(fonts/PlexCond-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --nav: #132B4F; --nav-actif: #24467A; --nav-txt: #C3CEDF; --nav-w: 264px;
  --navy: #1E3A6E; --deep: #0F2747; --lien: #1E4C8F; --green: #7DA83A; --dgreen: #3F5F1F; --sur: #4E6B2A;
  --ink: #14213D; --grey: #334155; --soft: #5B6577; --line: #E6EAF0; --line2: #D9DFE8; --line3: #EEF1F5; --bord: #E1E6EE;
  --bg: #F5F7FA; --card: #FFFFFF; --navy-bg: #EEF2F8; --survol: #F6F8FB; --entete: #FAFBFC; --piste: #EBEFF4;
  --ok: #3F8F3A; --ok-fg: #2C5A1C; --ok-bg: #EEF6EB; --warn: #D99A1E; --amber: #7A4A00; --amber-bg: #FFF8EC;
  --red: #C8372B; --red-fg: #9C2318; --red-bg: #FDF1EF; --info: #3B6FC0; --info-fg: #1C4382; --info-bg: #EEF3FB;
  --rose: #C2508A; --rose-fg: #8E2A5E; --gris: #A8B3C3; --bad: #9C2318;
  --r: 10px; --rc: 14px; --ombre: 0 16px 40px rgba(15, 39, 71, .12);
  --sortie: .16s; --doux: cubic-bezier(.2, .7, .3, 1); --courbe: cubic-bezier(.22, 1, .36, 1);
  /* échelle d'espacement (grille de 4 px) et hauteurs de contrôles */
  --e1: 4px; --e2: 8px; --e3: 12px; --e4: 16px; --e5: 24px; --e6: 32px;
  --h: 40px; --hp: 32px; --pad: 20px;
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 Plex, system-ui, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--lien); text-decoration-color: rgba(30, 76, 143, .3); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--deep); margin: 0; }
h1 { font: 600 30px/40px PlexCond, Plex, sans-serif; }
h2 { font: 600 16px/24px Plex, sans-serif; }
h3 { font: 500 14px/20px Plex, sans-serif; color: var(--grey); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lien); outline-offset: 2px; }
/* l'attribut hidden l'emporte toujours sur l'affichage donné par une classe */
[hidden] { display: none !important; }
strong, b { font-weight: 500; }
details summary { cursor: pointer; color: var(--lien); }
p { margin: 0 0 var(--e3); }
p:last-child { margin-bottom: 0; }
/* identifiants (DOS, FAC, ORD…) : même police que le texte, chiffres tabulaires */
.mono { font-variant-numeric: tabular-nums; font-family: inherit; }
.muted { color: var(--soft); }
.small, small { font-size: 13px; line-height: 20px; }
.nowrap, .pill, .chip, .btn, .seg button, .tab { white-space: nowrap; }
.nb { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rose { color: var(--rose-fg); }
.pousse-droite { margin-left: auto; }
.defil { overflow-x: auto; }
/* surtitre en capitales : un seul réglage partout */
.sur, .sect-titre, .items-section h3, .ex .sect, .deroulant .titre-res, .pub-tag, .connexion .lieu, .barre .lieu, .titre-suite {
  font: 500 12px/16px Plex, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--sur);
}
/* montant : chiffres tabulaires, unité plus petite et non grasse, même ligne de base */
.montant { white-space: nowrap; font-variant-numeric: tabular-nums; }
.montant .m-u { margin-left: 4px; font-size: 12px; font-weight: 400; color: var(--soft); letter-spacing: .02em; }
.montant.grand .m-v { font: 500 30px/36px Plex, sans-serif; color: var(--deep); }
.montant.grand .m-u { font-size: 14px; }
.montant.moyen .m-v { font: 500 24px/32px Plex, sans-serif; }
.montant.moyen .m-u { font-size: 13px; }

/* =========================================================
   Boutons : 40 px, « petit » 32 px ; bouton icône seul pour les actions universelles
   ========================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); min-height: var(--h); padding: 0 16px; border: 1px solid var(--navy); border-radius: 9px; background: var(--navy); color: #fff; font-weight: 500; font-size: 14px; line-height: 20px; text-decoration: none; cursor: pointer; }
.btn svg { flex: none; }
.btn:hover { background: var(--deep); border-color: var(--deep); }
.btn.sec { background: #fff; color: var(--ink); border-color: var(--line2); font-weight: 400; }
.btn.sec:hover { border-color: #9FB0C8; background: var(--survol); }
.btn.danger { background: #fff; color: var(--red-fg); border-color: #F0C8C3; font-weight: 400; }
.btn.danger:hover { background: var(--red-bg); }
.btn.carre, .btn.ico { width: var(--h); min-width: var(--h); padding: 0; }
.btn.ico.sec { color: var(--grey); }
.btn:disabled { cursor: not-allowed; background: #C3CCDA; border-color: #C3CCDA; color: #fff; }
.btn.sec:disabled { background: #fff; color: var(--soft); border-color: var(--line2); opacity: .6; }
.btn.petit { height: var(--hp); min-height: var(--hp); padding: 0 12px; font-size: 13px; }
.btn.petit.carre, .btn.petit.ico { width: var(--hp); min-width: var(--hp); padding: 0; }
.btn.grand { font-size: 15px; padding: 0 20px; }
/* bouton présenté comme un lien */
.btn.lien { height: auto; min-height: 0; padding: 0; border: 0; background: none; color: var(--lien); font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }
.btn.lien:hover { background: none; color: var(--deep); }
.btn.lien.petit { height: auto; min-height: 0; font-size: 13px; }
.icone-btn { position: relative; width: var(--h); height: var(--h); border: 1px solid var(--line2); border-radius: 10px; background: #fff; cursor: pointer; color: var(--grey); display: grid; place-items: center; flex: none; }
.icone-btn:hover { background: var(--survol); }
.icone-btn .badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #C2410C; color: #fff; font-size: 11px; font-weight: 600; line-height: 16px; border: 2px solid #fff; }
.fermer { display: grid; place-items: center; border: 0; background: none; cursor: pointer; color: var(--soft); width: var(--hp); height: var(--hp); border-radius: 8px; flex: none; }
.fermer:hover { background: var(--survol); color: var(--ink); }
/* icône « i » : l'explication s'ouvre dans une bulle au survol ou au toucher */
button.info { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--soft); cursor: help; vertical-align: middle; }
button.info:hover, button.info:focus-visible { color: var(--navy); background: var(--navy-bg); }
.bulle-info { max-width: min(320px, calc(100vw - 24px)); padding: 10px 12px; border-radius: 10px; background: var(--deep); color: #fff; font-size: 13px; line-height: 20px; box-shadow: var(--ombre); white-space: normal; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e2); margin-top: var(--e5); }
.champ + .actions, .grille2 + .actions, .grille3 + .actions { margin-top: var(--e2); }
.actions-ligne { display: inline-flex; align-items: center; gap: var(--e2); justify-content: flex-end; }
.actions-ligne .btn.carre, .actions-ligne .btn.ico { width: var(--hp); min-width: var(--hp); height: var(--hp); min-height: var(--hp); }
.aligne-bas { align-items: end; }
.aligne-bas > div > .btn { margin-bottom: var(--e4); }

/* =========================================================
   Champs : 40 px, intitulé 4 px au-dessus, aide 4 px dessous, 16 px entre deux champs
   ========================================================= */
.champ { display: block; margin: 0 0 var(--e4); }
.champ:last-child { margin-bottom: 0; }
.champ > span, .dob legend, .lbl { display: block; font-size: 13px; line-height: 20px; color: var(--grey); margin: 0 0 var(--e1); }
.champ > small, .champ > .aide { display: block; margin-top: var(--e1); font-size: 13px; line-height: 18px; color: var(--soft); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=search], input[type=datetime-local], input[type=date], input[type=time], input[type=url], input:not([type]), select, textarea { width: 100%; min-height: var(--h); padding: 8px 12px; border: 1px solid var(--line2); border-radius: 9px; background: #fff; font-size: 15px; line-height: 22px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=search], input[type=datetime-local], input[type=date], input[type=time], input[type=url], input:not([type]), select { height: var(--h); padding-top: 0; padding-bottom: 0; }
input[type=date], input[type=datetime-local], input[type=time] { -webkit-appearance: none; appearance: none; }
input::-webkit-date-and-time-value { text-align: left; }
textarea { min-height: 84px; resize: vertical; line-height: 1.5; padding: 8px 12px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30, 58, 110, .12); }
input.err, select.err, textarea.err { border-color: var(--red); }
input.nb, .montant-champ { text-align: right; font-variant-numeric: tabular-nums; }
::placeholder { color: #8A94A6; }
.grille2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e4); margin-bottom: var(--e4); }
.grille3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--e4); margin-bottom: var(--e4); }
.grille2:last-child, .grille3:last-child { margin-bottom: 0; }
.grille2 > .champ, .grille3 > .champ, .grille2 > div > .champ { margin: 0; }
.case { display: flex; align-items: flex-start; gap: var(--e3); cursor: pointer; line-height: 20px; }
.case input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.dob { border: 0; padding: 0; margin: 0 0 var(--e4); display: flex; gap: var(--e2); }
.dob label { flex: 1; }
.dob label.an { flex: 1.5; }
.dob label span { font-size: 12px; color: var(--soft); display: block; margin-bottom: var(--e1); }
.dob input { text-align: center; }
.ligne-champ { display: flex; gap: var(--e2); margin-top: var(--e3); flex-wrap: wrap; }
.ligne-champ input { flex: 1; min-width: 180px; }
/* interrupteurs */
.interrupteur { display: inline-flex; align-items: center; gap: var(--e3); cursor: pointer; white-space: nowrap; font-size: 14px; }
.interrupteur.eteint { color: #9AA5B5; }
.interrupteur input { appearance: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line2); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.interrupteur input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s; }
.interrupteur input:checked { background: var(--navy); }
.interrupteur input:checked::after { left: 18px; }
.interrupteur input:disabled { opacity: .5; cursor: not-allowed; }
/* options à cocher avec une explication (l'explication passe sous l'intitulé, jamais un « · » orphelin) */
.opts { display: flex; flex-direction: column; gap: var(--e3); }
.opt { display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: var(--e3); align-items: baseline; font-size: 14px; line-height: 20px; }
.opt input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--navy); align-self: start; margin-top: 2px; }
.opt > .muted { grid-column: 2; font-size: 13px; }
.opt input.mini { width: 90px; height: var(--hp); display: inline-block; }

/* =========================================================
   Choix (seg) : choix de formulaire (boutons à bord) et contrôle segmenté unifié (onglets, filtres)
   ========================================================= */
.seg { display: inline-flex; flex-wrap: wrap; gap: var(--e2); }
.seg button { height: var(--h); min-height: var(--h); padding: 0 14px; border: 1px solid var(--line2); border-radius: 9px; background: #fff; cursor: pointer; color: var(--grey); display: inline-flex; align-items: center; justify-content: center; gap: var(--e2); font-size: 14px; }
.seg button:hover { border-color: #9FB0C8; }
.seg button[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg.orange button[aria-pressed=true] { background: var(--red); border-color: var(--red); }
.seg.plein { display: flex; width: 100%; flex-wrap: nowrap; }
.seg.plein button { flex: 1 1 0; min-width: 0; padding: 0 8px; }
/* contrôle segmenté : piste grise, pouce blanc qui glisse sous le choix (position calculée par P.seg), compteur à droite */
.seg.segmente { position: relative; isolation: isolate; display: inline-flex; flex-wrap: nowrap; gap: 0; height: var(--h); padding: 3px; border-radius: 10px; background: var(--piste); max-width: 100%; vertical-align: middle; }
.seg.segmente button { height: 34px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--grey); font-size: 14px; gap: 6px; }
.seg.segmente button:hover { color: var(--ink); border: 0; }
.seg.segmente button[aria-pressed=true], .seg.segmente button[aria-pressed=true]:hover { background: transparent; color: var(--ink); font-weight: 500; }
.seg.segmente.plein { display: flex; width: 100%; }
.seg.segmente.plein button { flex: 1 1 0; min-width: 0; padding: 0 6px; }
.seg.segmente.petit { height: var(--hp); padding: 2px; }
.seg.segmente.petit button { height: 28px; min-height: 28px; font-size: 13px; padding: 0 10px; }
.seg-l { overflow: hidden; text-overflow: ellipsis; }
.seg-n { font-size: 12px; color: var(--soft); font-weight: 400; font-variant-numeric: tabular-nums; }
.seg-n:empty { display: none; }
.seg-n.alerte { color: var(--red-fg); font-weight: 600; }
.seg-ico { display: inline-flex; color: var(--navy); }
.seg-ico svg { display: block; }
.seg.glisse::before { content: ''; position: absolute; z-index: -1; left: 0; top: 0; width: var(--sw, 0); height: var(--sh, 0); transform: translate(var(--sx, 0), var(--sy, 0)); border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(15, 39, 71, .14), 0 0 0 .5px rgba(15, 39, 71, .06); pointer-events: none; }
.seg.glisse.pret::before { transition: transform .22s var(--doux), width .22s var(--doux), height .22s var(--doux); }

/* =========================================================
   États : point de couleur + mot court, point calé sur la première ligne (ligne de base)
   ========================================================= */
.pill, .dot { display: inline-flex; align-items: baseline; gap: 7px; line-height: 20px; color: var(--grey); max-width: 100%; }
.pill { font-size: 13px; }
.dot { font-size: 14px; white-space: nowrap; }
.pill::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--gris); }
.dot i { flex: none; display: block; width: 7px; height: 7px; border-radius: 50%; }
.pill.ok { color: var(--ok-fg); }
.pill.ok::before { background: var(--ok); }
.pill.warn { color: var(--amber); }
.pill.warn::before { background: var(--warn); }
.pill.bad, .pill.red { color: var(--red-fg); }
.pill.bad::before, .pill.red::before { background: var(--red); }
.pill.red { font-weight: 500; }
.pill.bleu { color: var(--info-fg); }
.pill.bleu::before { background: var(--info); }
.pill.gris { color: var(--soft); }
.pill.rose { color: var(--rose-fg); }
.pill.rose::before { background: var(--rose); }
.pill + .pill, .dot + .pill, .pill + .dot { margin-left: var(--e4); }
.dot.warn { color: var(--amber); }
.dot.red { color: var(--red-fg); }
.dot.bleu { color: var(--info-fg); }
.dot.gris { color: var(--soft); }
.dot.rose { color: var(--rose-fg); }
.dot.ok { color: var(--ok-fg); }
.dot.fort { font-weight: 500; }
.dot.multi { white-space: normal; }
.tag { display: inline-block; padding: 0 8px; border: 1px solid var(--line2); border-radius: 6px; font-size: 12px; line-height: 20px; color: var(--grey); white-space: nowrap; background: #fff; }
.num { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 12px; border: 1px solid var(--navy); color: var(--navy); font: 500 12px/1 Plex, sans-serif; font-variant-numeric: tabular-nums; flex: none; margin: 0; }
.avatar, .av { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.av.clair { width: 36px; height: 36px; background: #fff; border: 1px solid var(--bord); color: var(--grey); font-size: 13px; }
.av.grand { width: 48px; height: 48px; font-size: 16px; font-weight: 500; background: #fff; color: var(--grey); border: 1px solid var(--bord); }

/* =========================================================
   Encarts
   ========================================================= */
.encart { border-radius: var(--r); padding: var(--e3) var(--e4); margin: 0; border: 1px solid; font-size: 14px; line-height: 20px; }
.encart p { margin: var(--e1) 0 0; }
.encart.ok { background: var(--ok-bg); border-color: #CFE5C6; color: var(--ok-fg); }
.encart.erreur { background: var(--red-bg); border-color: #F0C8C3; color: var(--red-fg); }
.encart.attention { background: var(--amber-bg); border-color: #F3DDB0; color: var(--amber); }
.encart.info { background: var(--info-bg); border-color: #D3E0F4; color: var(--deep); }
.encart > strong:first-child { display: block; font-weight: 600; }
.bc > * + .encart, .bc > .encart + *, .carte > * + .encart, .carte > .encart + *, .fc > * + .encart, .fc > .encart + * { margin-top: var(--e4); }

/* =========================================================
   Pages publiques (lien patient, vérification d'un document)
   ========================================================= */
body.pub { display: flex; flex-direction: column; min-height: 100vh; background: #fff; }
.pub-in { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; }
.pub-tete { border-bottom: 3px solid var(--green); padding: 16px 0 12px; }
.pub-tete .pub-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pub-logo { height: 48px; width: auto; }
.pub-tag { color: var(--dgreen); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pub-tag .trait { width: 24px; height: 2px; background: var(--green); display: inline-block; }
.pub-main { flex: 1; padding-top: 28px; padding-bottom: 40px; }
.pub-main h1 { margin-bottom: 12px; }
.pub-main .surtitre { margin: 0 0 4px; font: 500 12px/16px Plex, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--sur); }
.pub-pied { border-top: 1px solid var(--line); padding: 16px 0 20px; font-size: 13px; line-height: 1.6; color: var(--soft); }
.pub-pied strong { color: var(--grey); font-weight: 500; }
.intro { color: var(--grey); margin: 0 0 16px; }
.note { color: var(--soft); font-size: 13px; margin-top: 16px; }
.retour { margin-top: 24px; }
.choix { display: grid; gap: 12px; }
.choix-c { display: block; padding: 16px; border: 1px solid var(--line2); border-radius: 12px; text-decoration: none; color: var(--ink); background: #fff; }
.choix-c:hover { border-color: var(--navy); background: var(--survol); }
.choix-c strong { display: block; font-size: 16px; font-weight: 500; color: var(--deep); margin-bottom: 4px; }
.choix-c span { color: var(--grey); font-size: 14px; }
.fichier { display: flex; align-items: center; justify-content: center; min-height: 92px; border: 1.5px dashed var(--line2); border-radius: 12px; margin-bottom: 16px; cursor: pointer; color: var(--lien); text-align: center; padding: 12px; position: relative; }
.fichier:hover { border-color: var(--navy); background: var(--survol); }
.fichier input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fiche { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 16px 0; padding: 16px; background: var(--bg); border-radius: 10px; }
.fiche dt { color: var(--soft); font-size: 13px; }
.fiche dd { margin: 0; }

/* =========================================================
   Connexion
   ========================================================= */
.connexion { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(180deg, var(--nav) 0 38%, var(--bg) 38%); }
.connexion .carte { width: 100%; max-width: 420px; padding: 28px; box-shadow: var(--ombre); }
.connexion .carte .logo { height: 60px; display: block; margin: 0 auto 8px; }
.connexion .lieu { text-align: center; color: var(--dgreen); margin-bottom: 24px; }
.connexion h1 { font-size: 24px; line-height: 32px; margin-bottom: 16px; text-align: center; }
.connexion .btn { width: 100%; }
.code-totp { font: 400 28px/1 Plex, monospace; letter-spacing: .4em; text-align: center; }
.connexion input.code-totp { height: 52px; }
.qr { display: grid; place-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin: 12px auto; width: fit-content; }
.qr svg { width: 190px; height: 190px; }
.secret { font: 400 15px monospace; letter-spacing: .08em; text-align: center; background: var(--bg); padding: 8px; border-radius: 8px; user-select: all; word-break: break-all; }

/* =========================================================
   Cadre du back-office : barre du haut, menu latéral, contenu
   ========================================================= */
.app { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); grid-template-rows: 68px 1fr; min-height: 100vh; transition: grid-template-columns .18s ease; }
.app.replie { --nav-w: 68px; }
.barre { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--e3); padding: 0 24px 0 0; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.barre .marque { flex: none; width: 264px; height: 100%; display: flex; align-items: center; justify-content: center; gap: 14px; text-decoration: none; }
.barre .logo { height: 42px; width: auto; display: block; }
.barre .trait-v { width: 2px; height: 32px; background: var(--green); border-radius: 1px; flex: none; }
.barre .lieu { line-height: 16px; color: var(--dgreen); white-space: nowrap; }
.burger { display: none; }
.profil { display: flex; align-items: center; gap: var(--e2); height: var(--h); padding: 0 8px 0 4px; border: 1px solid var(--line2); border-radius: 10px; background: #fff; cursor: pointer; flex: none; }
.profil:hover { background: var(--survol); }
.profil .nom-u { font-size: 14px; font-weight: 500; white-space: nowrap; }
.profil svg { color: var(--soft); }
.nav { background: var(--nav); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 68px; height: calc(100vh - 68px); overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.nav a { display: flex; align-items: center; gap: var(--e3); height: var(--h); padding: 0 12px; border-radius: 9px; color: var(--nav-txt); text-decoration: none; white-space: nowrap; flex: none; font-size: 15px; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.actif { background: var(--nav-actif); color: #fff; }
.nav a svg { flex: none; }
.nav a .txt { overflow: hidden; text-overflow: ellipsis; }
.nav a .nb { margin-left: auto; font-variant-numeric: tabular-nums; color: #8FA3C4; font-size: 13px; }
.nav a .nb.alerte { color: #F2C46B; font-weight: 600; }
.nav .sep { height: 1px; background: rgba(255, 255, 255, .08); flex: none; margin: 12px 4px; }
.nav .replier { margin-top: auto; display: flex; align-items: center; gap: var(--e3); height: var(--h); padding: 0 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 9px; background: transparent; color: var(--nav-txt); cursor: pointer; font-size: 14px; white-space: nowrap; overflow: hidden; flex: none; }
.nav .replier:hover { color: #fff; border-color: rgba(255, 255, 255, .25); }
/* menu replié : icônes seules, compteurs réduits à une pastille */
.app.replie .nav a, .app.replie .nav .replier { width: 44px; padding: 0 12px; justify-content: flex-start; }
.app.replie .nav .txt, .app.replie .nav .replier span { display: none; }
.app.replie .nav .replier svg { transform: scaleX(-1); }
.app.replie .nav a { position: relative; }
.app.replie .nav a .nb:not([hidden]) { display: block; position: absolute; top: 8px; right: 6px; width: 8px; height: 8px; padding: 0; border-radius: 50%; background: #8FA3C4; font-size: 0; overflow: hidden; }
.app.replie .nav a .nb.alerte:not([hidden]) { background: #F2C46B; }
/* contenu : une pile verticale, 16 px entre deux éléments, 24 px sous l'en-tête de page */
.contenu { min-width: 0; max-width: none; width: 100%; padding: 28px 32px 40px; display: flex; flex-direction: column; gap: var(--e4); }
.contenu > * { margin-top: 0; margin-bottom: 0; min-width: 0; }
.contenu > .btn, .contenu > a.btn, .contenu > .seg:not(.plein) { align-self: flex-start; }
.contenu > .chargement { align-self: stretch; }
/* zone rechargée à l'intérieur de la page (Marges…) : mêmes 16 px entre ses blocs qu'entre les blocs de la page */
.pile { display: flex; flex-direction: column; gap: var(--e4); min-width: 0; }
/* en-tête de page : hauteur fixe (surtitre réservé même vide), retour au-dessus, actions centrées sur la ligne du titre */
.page-tete { display: flex; flex-direction: column; gap: var(--e2); margin-bottom: var(--e2); }
.pt-ligne { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--e3) var(--e4); flex-wrap: wrap; min-width: 0; }
.pt-titres { min-width: 0; }
.page-tete .sur { height: 16px; margin-bottom: var(--e1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-tete h1 { overflow-wrap: anywhere; }
.pt-actions { display: flex; align-items: center; gap: var(--e2); flex-wrap: wrap; min-height: var(--h); }
.retour-lien { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 20px; font-size: 14px; line-height: 20px; color: var(--soft); text-decoration: none; }
.retour-lien:hover { color: var(--ink); }
.retour-lien svg { flex: none; }
.chargement { padding: 40px; text-align: center; color: var(--soft); }
.spin { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: tour .7s linear infinite; vertical-align: -3px; }

/* =========================================================
   Menus flottants : profil, notifications, « … », recherche
   ========================================================= */
.menu { position: fixed; right: 16px; top: 62px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--ombre); min-width: 260px; z-index: 30; padding: 4px; animation: pa-menu .16s var(--doux) backwards; transform-origin: top right; }
.menu [role=menuitem], .menu a { display: flex; align-items: baseline; gap: var(--e3); width: 100%; min-height: var(--h); text-align: left; padding: 10px 12px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: 14px; line-height: 20px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.menu [role=menuitem] svg { align-self: center; flex: none; color: var(--soft); }
.menu [role=menuitem]:hover, .menu a:hover { background: var(--survol); }
.menu [role=menuitem].danger { color: var(--red-fg); }
.menu [role=menuitem].danger svg { color: var(--red-fg); }
.menu [role=menuitem].sep-haut { border-top: 1px solid var(--line3); border-radius: 0 0 8px 8px; margin-top: 4px; }
.menu .tete { padding: 8px 12px 12px; border-bottom: 1px solid var(--line3); margin-bottom: 4px; cursor: default; }
.menu .sep { height: 1px; background: var(--line3); margin: 4px 0; }
.menu .droite { margin-left: auto; }
.menu.u { width: 260px; }
.menu.points { min-width: 230px; }
.menu.points .sep { margin: 4px -4px; }
/* notifications : point sur la première ligne, date sous le message */
.notifs { width: 380px; max-width: calc(100vw - 24px); max-height: 70vh; overflow: auto; }
.notifs-tete { display: flex; justify-content: space-between; align-items: baseline; gap: var(--e3); }
.notif { display: grid; grid-template-columns: 7px minmax(0, 1fr); column-gap: var(--e3); align-items: baseline; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 8px; background: #fff; cursor: pointer; font-size: 14px; line-height: 20px; color: var(--ink); white-space: normal; }
.notif:hover { background: var(--survol); }
.notif-point { display: block; width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.notif.non-lu { font-weight: 500; }
.notif.non-lu .notif-point { background: var(--info); }
.notif small { color: var(--soft); display: block; margin-top: 2px; font-weight: 400; }
/* liste de résultats (recherche globale) */
.deroulant { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--ombre); max-height: 70vh; overflow: auto; z-index: 30; padding: 4px 0; }
.deroulant .titre-res { padding: 8px 16px 4px; color: var(--soft); }
.deroulant .titre-res + .res { border-top: 0; }
.deroulant .res { display: flex; align-items: baseline; gap: var(--e3); width: 100%; text-align: left; padding: 8px 16px; border: 0; background: #fff; cursor: pointer; font-size: 14px; line-height: 20px; color: var(--ink); }
.deroulant .res .av { flex: none; width: 32px; height: 32px; font-size: 12px; align-self: center; }
.deroulant .res .res-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deroulant .res > .muted { line-height: 20px; }
.deroulant .res:hover, .deroulant .res:focus, .deroulant .res.actif { background: var(--survol); outline: none; }
.deroulant .vide { padding: 16px; color: var(--soft); }
.deroulant .aide-res { display: flex; gap: 16px; padding: 8px 16px 4px; border-top: 1px solid var(--line3); margin-top: 4px; font-size: 12px; color: var(--soft); }
.rg-invite { padding: 16px; color: var(--soft); font-size: 14px; }

/* =========================================================
   Fenêtres et bulles de confirmation
   ========================================================= */
.voile { position: fixed; inset: 0; background: rgba(15, 39, 71, .4); display: grid; place-items: center; padding: 16px; z-index: 50; animation: pa-fondu .24s ease backwards; }
.voile.verrou { background: var(--deep); }
.fenetre { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, .22); animation: pa-fenetre .24s var(--courbe) backwards; }
.fenetre:focus { outline: none; }
.fenetre.large { max-width: 880px; }
.fenetre .ft { display: flex; justify-content: space-between; align-items: center; gap: var(--e3); min-height: 64px; padding: 16px 16px 16px 20px; border-bottom: 1px solid var(--line3); position: sticky; top: 0; background: #fff; z-index: 1; }
.fenetre .ft h2 { line-height: 24px; }
.fenetre .fc { padding: 20px; }
.fenetre .fp { display: flex; justify-content: flex-end; gap: var(--e2); padding: 16px 20px; border-top: 1px solid var(--line3); position: sticky; bottom: 0; background: #fff; flex-wrap: wrap; }
.fenetre .fc > p:first-child, .fenetre .fc > div > p:first-child { margin-top: 0; }
.loupe img { max-width: 100%; display: block; margin: 0 auto; }
/* bulle de validation : blanche, liseré fin teinté, icône sur la première ligne */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: var(--e2); z-index: 60; width: min(520px, calc(100vw - 32px)); }
.toast { display: inline-flex; align-items: flex-start; gap: var(--e2); max-width: 100%; padding: 10px 16px 10px 12px; border-radius: 12px; background: #fff; border: 1px solid #CBD8EA; color: var(--info-fg); box-shadow: 0 8px 24px rgba(15, 39, 71, .12); font-size: 14px; font-weight: 500; line-height: 20px; animation: pa-monte .2s var(--doux) backwards; }
.toast svg { flex: none; margin-top: 1.5px; }
.toast.ok { border-color: #C5DEBF; color: var(--ok-fg); }
.toast.erreur { border-color: #EDC2BC; color: var(--red-fg); }
/* focus clavier (lignes cliquables, menus) */
tr.cliquable:focus-visible, .menu [role=menuitem]:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }

/* =========================================================
   Une seule carte : .bloc (avec .bt / .bc), .carte, .carte-cote
   marge intérieure 20 px, titre → contenu 12 px, coins coupés (aucun enfant ne dépasse)
   ========================================================= */
.bloc, .carte { background: var(--card); border: 1px solid var(--line); border-radius: var(--rc); margin: 0; overflow: hidden; overflow: clip; }
.carte, .carte-cote, .d-tete-carte { padding: var(--pad); }
/* en-tête de bloc : titre à gauche (avec son « i »), actions à droite ; les contrôles de 40 px débordent sur les marges pour garder la ligne du titre */
.bloc > .bt { display: flex; align-items: baseline; justify-content: flex-start; flex-wrap: wrap; gap: var(--e4) var(--e3); padding: var(--pad) var(--pad) var(--e3); min-width: 0; }
.bloc > .bt > h2 { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bloc > .bt > .seg.segmente, .bloc > .bt > .btn, .bloc > .bt > .bt-actions, .bloc > .bt > .periodes, .bloc > .bt > input, .bloc > .bt > select, .bloc > .bt > .liste-deroulante, .bloc > .bt > .nav-jour, .bloc > .bt > .actions { margin-block: -8px; }
.bloc > .bt:has(> .seg.segmente, > .btn, > .bt-actions, > .periodes, > input, > select, > .nav-jour, > .actions) { padding-bottom: var(--pad); }
.bloc > .bt > .compte, .bt .compte { font-size: 13px; color: var(--soft); white-space: nowrap; }
.bt-actions { display: flex; align-items: center; gap: var(--e2); margin-left: auto; flex-wrap: wrap; align-self: center; }
.bloc > .bt > .info, .bloc > .bt > .btn.ico, .bloc > .bt > .btn.carre, .bloc > .bt > .nav-jour { align-self: center; }
.bloc > .bt > .pousse-droite, .bloc > .bt > .btn { margin-left: auto; }
.bloc > .bt > .btn ~ .btn { margin-left: 0; }
.bt .pousse-droite .dot, .bt .pousse-droite { white-space: normal; min-width: 0; }
.bloc > .bc { padding: 0 var(--pad) var(--pad); }
.bloc > .bc:first-child { padding-top: var(--pad); }
.bloc > .bc.nopad { padding: 0; }
.bloc > .bc + .bc { padding-top: var(--pad); border-top: 1px solid var(--line3); }
.bloc > .bc.nopad + .bc:not(.nopad) { border-top: 1px solid var(--line3); }
.bloc > .note-bas { margin: 0; padding: var(--e3) var(--pad); font-size: 13px; color: var(--soft); border-top: 1px solid var(--line3); }
/* titre de carte (.carte) : même dessin que .bt */
.titre-carte { display: flex; align-items: center; gap: var(--e3); font: 600 16px/24px Plex, sans-serif; color: var(--deep); margin: 0 0 var(--e3); white-space: nowrap; }
.tete-carte { display: flex; align-items: center; gap: var(--e3); flex-wrap: wrap; margin-bottom: var(--e3); }
.tete-carte .titre-carte { margin: 0; }
.tete-carte > .btn, .tete-carte > .bt-actions { margin-block: -8px; margin-left: auto; }
.carte-cote > h2, .carte-cote > .cc-tete { margin-bottom: var(--e3); }
.titre-ligne { display: flex; align-items: baseline; gap: var(--e3); flex-wrap: wrap; }
.sect-titre, .items-section h3 { margin: 0 0 var(--e2); }
.sep-texte { display: flex; align-items: center; gap: var(--e3); margin: var(--e4) 0 var(--e3); color: var(--soft); font-size: 13px; white-space: nowrap; }
.sep-texte::before, .sep-texte::after { content: ""; flex: 1; height: 1px; background: var(--line3); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 14px; line-height: 20px; margin: 0; }
.kv dt { color: var(--soft); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.puces { display: flex; flex-wrap: wrap; gap: var(--e2); }
/* chiffres clés : une bande de cases séparées par un trait fin ; libellés réservés sur 2 lignes au téléphone */
.chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--rc); overflow: hidden; }
.chiffres.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chiffres.cinq { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.chiffre { background: #fff; display: flex; flex-direction: column; min-width: 0; padding: var(--pad); text-decoration: none; color: inherit; }
.chiffre .l { font-size: 14px; line-height: 20px; color: var(--soft); overflow-wrap: anywhere; }
.chiffre .v { font: 500 30px/36px Plex, sans-serif; color: var(--deep); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: var(--e1); }
.chiffre .v small { color: var(--soft); font-weight: 400; margin-left: 4px; font-size: 14px; }
.chiffre .s { margin-top: var(--e1); font-size: 13px; line-height: 20px; min-height: 20px; text-decoration: none; }
.chiffre .s .dot { font-size: 13px; }
a.chiffre .s, .chiffre a.s:hover { text-decoration: none; }
.chiffre.alerte .v { color: var(--red-fg); }
/* filtres : contrôle segmenté + menus déroulants */
.filtres { display: flex; flex-wrap: wrap; gap: var(--e2); align-items: center; padding: var(--e3) var(--pad); border-bottom: 1px solid var(--line3); }
.filtres .droite { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--e2); }
/* barre de filtres posée directement sur la page : alignée sur les cartes */
.contenu > .filtres { padding: 0; border-bottom: 0; }
.tab { height: var(--hp); padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font-size: 14px; color: var(--grey); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { background: var(--survol); }
.tab[aria-pressed=true], .tab[aria-selected=true] { background: var(--navy-bg); color: var(--deep); font-weight: 500; }
.tab .n { color: var(--soft); font-weight: 400; font-variant-numeric: tabular-nums; }
.tab .n.alerte { color: var(--red-fg); font-weight: 600; }
.liste-deroulante { position: relative; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: var(--hp); padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2); background: #fff; cursor: pointer; font-size: 14px; color: var(--grey); }
.chip:hover { border-color: #9FB0C8; }
.chip b { font-weight: 500; color: var(--ink); }
.chip[aria-pressed=true], .chip.actif { border-color: var(--navy); color: var(--deep); background: var(--navy-bg); }
.chip[aria-pressed=true] b { color: var(--deep); }
.chip.alerte { border-color: #F0C8C3; color: var(--red-fg); }
.chip .x { color: var(--soft); font-size: 15px; line-height: 1; }
.chip:hover .x { color: var(--red); }
.flt { display: inline-flex; align-items: center; gap: 6px; height: var(--h); padding: 0 12px; border: 1px solid var(--line2); border-radius: 9px; background: #fff; font-size: 14px; color: var(--grey); cursor: pointer; white-space: nowrap; }
.flt:hover { border-color: #9FB0C8; }
.flt.actif { border-color: var(--navy); background: var(--navy-bg); color: var(--deep); }
.flt .x { color: var(--soft); font-size: 15px; line-height: 1; margin-left: 2px; }
/* puces de filtre (choix unique ou multiple, sans pouce) */
.filtre-puce { display: inline-flex; align-items: center; gap: 6px; height: var(--hp); padding: 0 12px; border: 1px solid var(--line2); border-radius: 999px; background: #fff; color: var(--grey); font-size: 13px; cursor: pointer; white-space: nowrap; }
.filtre-puce:hover { border-color: #9FB0C8; }
.filtre-puce[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: #fff; }
.choix-filtre { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--ombre); padding: 4px; z-index: 15; }
.choix-filtre.droite { left: auto; right: 0; }
.choix-filtre button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; height: var(--hp); padding: 0 12px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: 14px; color: var(--ink); white-space: nowrap; }
.choix-filtre button:hover { background: var(--survol); }
.choix-filtre button[aria-pressed=true] { background: var(--navy-bg); font-weight: 500; }
.choix-filtre button .n { color: var(--soft); font-variant-numeric: tabular-nums; }
.choix-filtre button .n.alerte { color: var(--red-fg); font-weight: 600; }
.choix-filtre button:disabled { opacity: .45; cursor: default; }
.choix-filtre .dates-filtre { padding: 8px 8px 4px; border-top: 1px solid var(--line3); margin-top: 4px; }
/* menus posés par-dessus la page (filtres, dates, réactions) par P.placer : jamais coupés par une carte */
.flottant { z-index: 45; }
.dates-filtre { display: flex; align-items: center; gap: var(--e2); }
.dates-filtre input { flex: 1; min-width: 0; width: 150px; }
.periodes { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--piste); }
.periodes .tab { height: 34px; padding: 0 12px; }
.periodes .tab[aria-pressed=true] { background: #fff; box-shadow: 0 1px 2px rgba(15, 39, 71, .14); color: var(--ink); }
/* tableaux : première et dernière colonnes alignées sur le titre des cartes (20 px), lignes alignées sur la ligne de base */
table.liste { width: 100%; border-collapse: collapse; }
table.liste th { text-align: left; font: 500 12px/16px Plex, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); padding: 8px 16px; border-bottom: 1px solid var(--line3); background: var(--entete); white-space: nowrap; vertical-align: bottom; }
table.liste td { padding: 12px 16px; border-bottom: 1px solid var(--line3); vertical-align: baseline; line-height: 20px; }
table.liste td .small, table.liste td small { display: block; }
table.liste td .small.inline, table.liste td span.small { display: inline; }
table.liste th:first-child, table.liste td:first-child { padding-left: var(--pad); }
table.liste th:last-child, table.liste td:last-child { padding-right: var(--pad); }
table.liste th.nb, table.liste td.nb { text-align: right; }
table.liste td.nb .montant { display: inline-block; }
table.liste td .mono:first-child { white-space: nowrap; }
table.liste td > .btn, table.liste td .actions-ligne { vertical-align: middle; }
table.liste tr:last-child td { border-bottom: 0; }
table.liste tr.cliquable { cursor: pointer; }
table.liste tr.cliquable:hover td { background: var(--survol); }
table.liste tr.crit td:first-child { box-shadow: inset 2px 0 0 var(--red); }
/* état en colonne (règle unique 3.3.7) : le point est au bord gauche de la colonne, sous la première lettre de l'intitulé, le mot juste après */
td.col-actions, th.col-actions { text-align: right; width: 1%; white-space: nowrap; }
.patient-cel { display: flex; align-items: flex-start; gap: var(--e3); min-width: 0; }
.patient-cel > .av { margin-top: -6px; }
.patient-cel > div { align-self: baseline; min-width: 0; }
.patient-cel .nom { font-weight: 500; font-size: 15px; line-height: 20px; overflow-wrap: anywhere; }
.patient-cel .sous { font-size: 13px; line-height: 20px; color: var(--soft); }
.examens-court { color: var(--grey); font-size: 13px; line-height: 20px; max-width: 420px; }
.examens-court .tag { margin: 0 4px 4px 0; }
.vide-liste { padding: var(--e6) var(--pad); text-align: center; color: var(--soft); font-size: 14px; line-height: 20px; }
.vide-liste .btn { margin-top: var(--e4); }
.ligne-outils { display: flex; align-items: center; justify-content: space-between; gap: var(--e3); flex-wrap: wrap; margin-top: var(--e4); padding-top: var(--e4); border-top: 1px solid var(--line3); }
.ligne-outils .groupe { display: flex; align-items: center; gap: var(--e2); }
.ligne-outils .groupe select { width: 200px; }
.ligne-outils .groupe.etire { flex: 1; min-width: 220px; }
.pages-liste { display: flex; justify-content: center; gap: var(--e2); padding: var(--e3) var(--pad); border-top: 1px solid var(--line3); }

/* =========================================================
   À traiter : liste des dossiers
   ========================================================= */
.liste-dossiers .filtres { padding: var(--e3) var(--pad); gap: var(--e2); border-bottom: 0; }
.rangee { display: grid; grid-template-columns: minmax(0, 2.8fr) minmax(0, 2.4fr) minmax(max-content, 1.35fr) repeat(2, minmax(0, 1.1fr)); gap: 16px; align-items: baseline; padding: 16px var(--pad); border-top: 1px solid var(--line3); color: inherit; text-decoration: none; }
a.rangee:hover { background: #FAFBFD; }
.rangee.entete { font: 500 12px/16px Plex, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); padding-top: 8px; padding-bottom: 8px; background: var(--entete); }
.rangee.crit { box-shadow: inset 2px 0 0 var(--red); }
.rangee .examens-court { line-height: 20px; }
.rangee .examens-court .tag { margin: 0 4px 0 0; vertical-align: baseline; }
/* 3.3.8 : groupes par étape (en-tête discret : point d'état, libellé en surtitre, compteur gris, chevron) */
.groupe-etape { display: flex; align-items: baseline; gap: 7px; width: 100%; padding: 16px var(--pad) 8px; border: 0; border-top: 1px solid var(--line3); background: #fff; font: 500 12px/16px Plex, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); text-align: left; cursor: pointer; }
.groupe-etape:hover { background: var(--survol); }
.groupe-etape i { flex: none; display: block; width: 7px; height: 7px; border-radius: 50%; }
.groupe-etape .n { font-weight: 400; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.groupe-etape svg { flex: none; align-self: center; margin-left: -2px; transition: transform .15s; }
.groupe-etape[aria-expanded=false] svg { transform: rotate(-90deg); }
/* anneau de progression (saisie partielle) : à la place du point, au même bord gauche */
.dot.anneau { font-variant-numeric: tabular-nums; }
.dot.anneau svg { flex: none; display: block; position: relative; top: 3px; }
.anneau circle { fill: none; stroke-width: 1.75; }
.anneau .piste { stroke: var(--line2); }
.anneau .part { stroke: var(--navy); }
.liste-suite { padding: var(--e3) var(--pad); text-align: center; border-top: 1px solid var(--line3); display: flex; gap: var(--e3); justify-content: center; align-items: center; flex-wrap: wrap; }

/* =========================================================
   Fiche dossier
   ========================================================= */
.d-tete-carte { display: flex; gap: var(--e4); flex-wrap: wrap; align-items: flex-start; }
.d-tete-carte > .av { margin-top: -4px; }
.d-identite { flex: 1; min-width: 300px; }
.d-identite h1 { line-height: 40px; white-space: nowrap; }
.d-identite h1 a { color: inherit; text-decoration: none; }
.d-infos { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; margin-top: var(--e1); font-size: 14px; line-height: 20px; color: var(--grey); }
.d-infos a { white-space: nowrap; text-decoration: none; }
.d-num { text-align: right; font-size: 13px; color: var(--soft); line-height: 20px; white-space: nowrap; padding-top: 10px; }
.d-num .mono { color: var(--grey); }
.d-actions { display: flex; gap: var(--e2); align-self: flex-start; }
.d-grille { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--e4); align-items: start; }
.d-col { display: flex; flex-direction: column; gap: var(--e4); min-width: 0; }
.d-col > .bloc, .d-col > .encart, .d-grille > .d-col > * { margin: 0; }
.res-l { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr) minmax(0, 1.4fr) 120px; gap: var(--e3); align-items: baseline; padding: var(--e3) var(--pad); border-top: 1px solid var(--line3); font-size: 14px; line-height: 20px; }
.res-l.entete { font: 500 12px/16px Plex, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); background: var(--entete); padding-top: 8px; padding-bottom: 8px; }
.res-l .v { font-weight: 500; font-variant-numeric: tabular-nums; }
.res-l.anormal { background: #FFFBF2; }
.res-l.anormal .v { font-weight: 600; color: var(--amber); white-space: nowrap; }
.res-l.simple { grid-template-columns: minmax(0, 1fr) auto; }
.voir-plus { display: block; width: 100%; height: var(--h); border: 0; border-top: 1px solid var(--line3); background: #fff; font-size: 14px; color: var(--lien); cursor: pointer; }
.voir-plus:hover { background: var(--survol); }
/* ce qui s'est passé */
.chrono { list-style: none; margin: 0; padding: 0 var(--pad) var(--pad); font-size: 14px; line-height: 20px; display: grid; grid-template-columns: max-content 12px minmax(0, 1fr); column-gap: var(--e3); }
.chrono li { display: contents; }
.chrono li .t { color: var(--soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chrono li .p { display: flex; flex-direction: column; align-items: center; }
.chrono li .p::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--c, var(--navy)); }
.chrono li .p::after { content: ""; flex: 1; width: 1px; background: var(--line2); min-height: 16px; }
.chrono li:last-child .p::after { display: none; }
.chrono li .x { padding-bottom: var(--e3); }
/* colonne de droite : facture, documents */
.cc-tete { display: flex; align-items: baseline; justify-content: space-between; gap: var(--e3); }
.cc-tete .mono { font-size: 13px; white-space: nowrap; }
.cc-texte { display: flex; flex-direction: column; gap: var(--e3); }
.cc-texte p { margin: 0; font-size: 14px; color: var(--grey); line-height: 20px; }
.cc-texte .dot { font-size: 14px; white-space: normal; }
.cc-texte .actions { margin-top: var(--e1); }
.f-lignes { display: grid; gap: var(--e2); }
.f-l { display: flex; justify-content: space-between; align-items: baseline; gap: var(--e3); font-size: 14px; line-height: 20px; }
.f-l > :first-child { min-width: 0; }
.f-l.muted { color: var(--soft); }
.f-l .fort { color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.f-l .dot { white-space: normal; }
.f-inclus { margin-top: var(--e1); font-size: 13px; color: var(--soft); }
.f-inclus summary { color: var(--lien); }
.f-inclus div { padding: 4px 0 0 16px; line-height: 20px; }
.f-sep { height: 1px; background: var(--line3); margin: var(--e4) 0; }
.f-pile { display: grid; gap: var(--e2); }
.reste-l { display: flex; justify-content: space-between; align-items: baseline; gap: var(--e3); margin-top: var(--e4); padding-top: var(--e4); border-top: 1px solid var(--line3); }
.reste-l > span:first-child { font-size: 14px; color: var(--grey); }
.reste-l .montant .m-v { font: 500 24px/32px Plex, sans-serif; }
.reste-l .montant .m-u { font-size: 13px; }
.reste.du .m-v { color: var(--amber); }
.reste.ok .m-v { color: var(--ok-fg); }
.montant.fort .m-v { font-weight: 500; color: var(--ink); }
.page-tete.seul { margin-bottom: calc(-1 * var(--e2)); }
.f-actions { display: flex; gap: var(--e2); margin-top: var(--e4); flex-wrap: wrap; align-items: center; }
.f-actions > .btn:first-child:not(.sec) { flex: 1; }
.f-actions .info { margin-left: auto; }
.paiements { border-top: 1px solid var(--line3); }
.paiement-l { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line3); font-size: 14px; }
.paiement-l .mono { white-space: nowrap; }
.docs { display: flex; flex-direction: column; }
.docs .doc { display: flex; align-items: center; gap: var(--e3); padding: var(--e3) 0; font-size: 14px; line-height: 20px; border-top: 1px solid var(--line3); }
.docs .doc:first-child { border-top: 0; padding-top: 0; }
.docs .doc:last-child { padding-bottom: 0; }
.docs .doc .doc-txt { flex: 1; min-width: 0; }
.docs .doc.ancien { color: var(--soft); }
.docs .doc .ico-pdf { display: grid; place-items: center; flex: none; width: 32px; height: 40px; border: 1px solid var(--bord); border-radius: 5px; font-size: 11px; font-weight: 500; color: var(--red-fg); }
/* mesures de l'accueil */
.mesures-tete { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: var(--e3); margin-bottom: var(--e3); }
.mesures-tete .mesures-titre { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.mesures-tete .titre-carte { margin: 0; }
.mesures-tete > .btn { width: auto; flex: none; margin-block: -8px; }
.mesures-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--e4) var(--e4); }
.mesure { display: flex; flex-direction: column; gap: 0; line-height: 20px; }
.mesure strong { font-weight: 500; font-size: 15px; color: var(--deep); font-variant-numeric: tabular-nums; }
.mesures-nd > summary { cursor: pointer; display: flex; align-items: center; gap: var(--e3); list-style: none; margin: 0; }
.mesures-nd > summary::-webkit-details-marker { display: none; }
.mesures-nd > summary::before { content: "+"; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--navy); color: var(--navy); display: inline-grid; place-items: center; font-size: 14px; line-height: 1; flex: none; }
.mesures-nd[open] > summary::before { content: "−"; }
.mesures-nd[open] > summary { margin-bottom: var(--e4); }
.mesures-nd .grille3 { gap: 0 var(--e4); }
/* demande de paiement en ligne */
.demande-paiement { display: flex; flex-direction: column; gap: var(--e4); }
.demande-op { border: 1px solid var(--line); border-radius: 12px; padding: var(--e4); }
.demande-op h3 { display: flex; align-items: center; gap: var(--e3); margin: 0 0 var(--e2); font: 600 15px/24px Plex, sans-serif; color: var(--deep); }
.demande-op h3 svg { color: var(--navy); flex: none; }
.demande-op > p { margin: 0 0 var(--e3); }
/* compte rendu pour un confrère : liste des envois */
.cr-envois { border-top: 1px solid var(--line); }
.cr-envoi { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto; gap: 8px 16px; align-items: baseline; padding: var(--e3) 0; border-bottom: 1px solid var(--line); }
.cr-envoi strong, .cr-envoi .small { overflow-wrap: anywhere; }

/* =========================================================
   Nouveau dossier
   ========================================================= */
.nd-grille { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: var(--e4); align-items: start; }
.nd-grille .champ > span { color: var(--grey); }
/* champ de recherche : un seul dessin (loupe, 40 px, bord fin) */
.recherche-champ, .recherche-patient label, .cherche-examen { display: flex; align-items: center; gap: var(--e2); height: var(--h); padding: 0 12px; border-radius: 9px; border: 1px solid var(--line2); background: #fff; color: var(--soft); }
.recherche-champ:focus-within, .recherche-patient label:focus-within, .cherche-examen:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30, 58, 110, .12); }
.recherche-champ input, .recherche-patient input, .cherche-examen input { flex: 1; min-width: 0; height: 38px; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none !important; font-size: 15px; }
.recherche-patient .indice { font-size: 13px; color: var(--soft); white-space: nowrap; }
.patients-trouves { margin-top: var(--e2); border: 1px solid var(--bord); border-radius: 10px; overflow: hidden; }
.patients-trouves button { display: flex; width: 100%; align-items: center; gap: var(--e3); padding: var(--e2) 12px; border: 0; border-top: 1px solid var(--line3); background: #fff; text-align: left; cursor: pointer; font-size: 14px; line-height: 20px; }
.patients-trouves button:first-child { border-top: 0; background: var(--survol); }
.patients-trouves button:hover { background: #F3F6FA; }
.patients-trouves .av { width: 32px; height: 32px; font-size: 12px; }
.patients-trouves .qui { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.patients-trouves strong { font-weight: 600; }
.patients-trouves .lien { font-size: 13px; color: var(--lien); white-space: nowrap; }
.patients-trouves .vide { padding: 12px; color: var(--soft); font-size: 14px; }
/* patient choisi : identité lisible, bouton « Changer » à sa taille */
.patient-choisi { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--e3); padding: var(--e3); border-radius: 10px; border: 1px solid var(--line2); background: var(--survol); }
.patient-choisi .pc-info { flex: 1 1 200px; min-width: 0; line-height: 20px; }
.patient-choisi .pc-info strong { display: block; overflow-wrap: anywhere; }
.patient-choisi .pc-contact { overflow-wrap: anywhere; }
.patient-choisi .btn { width: auto; flex: none; }
.patient-choisi .case { margin-top: var(--e2); }
/* packs et examens */
.tete-carte .cherche-examen { margin-left: auto; min-width: 260px; margin-block: -8px; }
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e2); align-items: stretch; }
.pack { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--e3); align-items: baseline; align-content: start; padding: var(--e3) var(--e3) var(--e3) var(--e3); border: 1px solid var(--bord); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; }
.pack:hover { border-color: #9FB0C8; }
.pack[aria-pressed=true] { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #FBFCFE; }
.pack .pg { display: flex; flex-direction: column; min-width: 0; }
.pack .pn { font: 500 15px/20px Plex, sans-serif; color: var(--deep); white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pack .pp { font: 400 15px/20px Plex, sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pack .pc { color: var(--soft); font-size: 12px; line-height: 16px; margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
/* coche de sélection : posée dans le coin, elle ne déplace jamais le prix */
.pack .coche { position: absolute; right: 6px; bottom: 6px; display: none; width: 16px; height: 16px; border-radius: 50%; background: var(--navy); color: #fff; place-items: center; }
.pack[aria-pressed=true] .coche { display: grid; }
.pack .tag { align-self: flex-start; margin-top: 4px; }
/* liste des examens : colonnes automatiques, une catégorie peut se couper (jamais un examen), titre répété « …, suite » */
.items-col { columns: 2; column-gap: var(--e6); }
.items-col.trois { columns: 3; }
.items-section { margin: 0; }
.items-section + .items-section { margin-top: var(--e4); }
.items-section h3 { break-after: avoid; padding-top: 2px; }
.items-section.coupee-garder { break-inside: avoid; }
.titre-suite { display: block; margin: 0 0 var(--e2); color: var(--soft); text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 400; }
.item { display: flex; align-items: flex-start; gap: var(--e3); padding: 10px 2px; border-bottom: 1px solid #F1F3F7; font-size: 14px; line-height: 20px; cursor: pointer; break-inside: avoid; }
.item:hover { background: var(--survol); }
.item input[type=checkbox] { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.item .in { flex: 1; min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--e2); }
.item .ip { margin-left: auto; color: var(--grey); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.item .qte { width: 56px; height: 28px; min-height: 28px; margin-top: -4px; padding: 0 4px; border-radius: 7px; font-size: 13px; text-align: center; }
.item .sexe { font-size: 12px; color: var(--rose-fg); white-space: nowrap; }
.item.inclus { cursor: default; color: var(--soft); }
.item.inclus .ip { color: var(--ok-fg); font-size: 13px; }
.item.interdit { opacity: .4; cursor: not-allowed; }
.arrivee { margin-top: var(--e4); font-size: 13px; color: var(--soft); }
.arrivee summary { color: var(--lien); }
.arrivee .grille3 { margin-top: var(--e3); }
/* carte 2 : packs, options, examens, arrivée */
.sous-titre { margin: 0 0 var(--e3); }
.options-packs { margin-top: var(--e4); display: flex; flex-direction: column; gap: var(--e2); }
.items-zone { margin-top: var(--e5); }
.bloc > .bt > h2:has(.num) { display: flex; align-items: center; gap: var(--e3); }
/* boîte « À payer » : total dans l'en-tête, lignes fines, deux valeurs d'espacement (8 dans un groupe, 16/24 entre groupes) */
.recap { position: sticky; top: 92px; }
.recap.carte { display: flex; flex-direction: column; gap: var(--e4); }
.recap > * { margin: 0; }
.recap-tete { display: flex; align-items: baseline; justify-content: space-between; gap: var(--e3); }
.recap-tete h2 { margin: 0; }
.recap-lignes { display: flex; flex-direction: column; gap: var(--e1); margin-top: calc(-1 * var(--e1)); }
.r-l { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--e3); align-items: baseline; font-size: 14px; line-height: 20px; }
.r-l > :first-child { min-width: 0; }
.r-l .montant { text-align: right; }
.r-l.inclus { color: var(--soft); font-size: 13px; padding-left: var(--e3); }
.r-l.remise .montant .m-v::before { content: ''; }
.r-l.sous-total { color: var(--soft); padding-top: var(--e2); margin-top: var(--e1); border-top: 1px solid var(--line3); }
.recap-vide { margin: 0; font-size: 13px; color: var(--soft); }
.r-l.remise { align-items: center; min-height: var(--hp); }
.remise-saisie { display: inline-flex; align-items: center; gap: var(--e2); }
.remise-saisie .moins { color: var(--soft); }
.remise-saisie input { width: 112px; height: var(--hp); min-height: var(--hp); font-size: 14px; }
.remise-zone { display: flex; flex-direction: column; gap: var(--e2); }
.remise-zone input { height: var(--hp); min-height: var(--hp); font-size: 14px; }
.tel-btn { width: 100%; }
.tel-btn[aria-pressed=true] { border-color: var(--navy); background: var(--navy-bg); color: var(--deep); font-weight: 500; }
.tel-btn svg { color: var(--navy); }
.remise-aide { grid-column: 1 / -1; margin: 0; font-size: 13px; line-height: 18px; color: var(--soft); }
.recap-sep { height: 1px; background: var(--line3); margin: 0 calc(-1 * var(--pad)); }
.recap-groupe { display: flex; flex-direction: column; gap: var(--e2); }
.recap-groupe > .lbl { margin: 0; }
.recap-partie { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--e3); align-items: end; }
.recap-partie .champ { margin: 0; }
.recap-reste { display: flex; flex-direction: column; align-items: flex-end; gap: var(--e1); line-height: 20px; }
.recap-reste .lbl { margin: 0; }
.recap-reste .montant { display: flex; align-items: baseline; height: var(--h); padding-top: 4px; }
.recap .montant-champ { font-size: 15px; }
.recap-tel { display: flex; flex-direction: column; gap: var(--e2); }
.recap-check { list-style: none; display: flex; flex-wrap: wrap; gap: var(--e2); margin: 0; padding: 0; }
.recap-check button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 6px; border: 1px solid var(--line2); border-radius: 999px; background: #fff; color: var(--grey); font-size: 13px; cursor: pointer; }
.recap-check button svg { flex: none; color: var(--gris); }
.recap-check button.fait { border-color: transparent; background: var(--navy-bg); color: var(--deep); }
.recap-check button.fait svg { color: var(--navy); }
.recap .btn.envoyer { width: 100%; }
.recap-barre { display: none; }

/* =========================================================
   Saisie des résultats : une ligne de paramètre = 4 colonnes alignées sur la ligne de base, une taille de texte
   ========================================================= */
.ex { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; overflow: clip; }
.ex + .ex { margin-top: var(--e4); }
.ex > .ext { display: flex; align-items: flex-start; gap: var(--e3); padding: var(--e3) var(--e4); border-bottom: 1px solid var(--line3); flex-wrap: wrap; }
.ex > .ext .num { margin-top: 18px; }
.ex > .ext h3 { font: 500 15px/20px Plex, sans-serif; color: var(--deep); flex: 1; min-width: 200px; }
.ex > .ext h3 .sect { display: block; margin-bottom: 2px; white-space: nowrap; }
.ex > .ext .pill { align-self: center; }
.ex .meta { color: var(--soft); font-size: 13px; line-height: 20px; padding: var(--e2) var(--e4) 0; }
.ex .grp-t { font: 500 13px/20px Plex, sans-serif; color: var(--deep); padding: var(--e3) var(--e4) 0; }
.ex .grp-n { color: var(--soft); font-size: 13px; line-height: 20px; padding: 0 var(--e4); }
.ex-pied { height: var(--e2); }
.ch { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(300px, 2.2fr) minmax(80px, .8fr) 110px; gap: var(--e3); align-items: baseline; padding: 4px var(--e4); font-size: 14px; line-height: 20px; }
.ch:hover { background: #FAFBFD; }
.ch .cl { font-size: 14px; }
.ch .cv { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: baseline; gap: var(--e2); min-width: 0; }
.ch .cv > :nth-child(n+3) { grid-column: 1 / -1; justify-self: start; }
.ch .cv > .seg { justify-self: start; }
.ch .cv > input, .ch .cv > select { height: var(--hp); min-height: var(--hp); padding: 0 10px; font-size: 14px; min-width: 0; width: 100%; }
.ch .cv .seg { gap: 4px; flex-wrap: nowrap; }
.ch .cv .seg button { height: var(--hp); min-height: var(--hp); padding: 0 10px; font-size: 14px; }
.ch .cv .u { color: var(--soft); font-size: 13px; white-space: nowrap; }
.ch .cn { color: var(--soft); font-size: 13px; }
.ch .cs { text-align: right; }
.ch.long { grid-template-columns: minmax(140px, 1.1fr) 3fr; }
.ch.long textarea { min-height: 60px; }
.ch.anormal .cv input, .ch.anormal .cv select { border-color: var(--warn); background: var(--amber-bg); font-weight: 600; }
.ch.critique .cv input { border-color: var(--red); background: var(--red-bg); }
.ch.ia .cv input, .ch.ia .cv select, .ch.ia textarea { box-shadow: inset 2px 0 0 var(--info); }
table.mob { border-collapse: collapse; margin: var(--e2) var(--e4) var(--e3); }
table.mob th, table.mob td { padding: 4px 8px; text-align: left; font-size: 14px; }
table.mob th { color: var(--soft); font-weight: 400; }
table.mob input { width: 84px; height: var(--hp); min-height: var(--hp); padding: 0 8px; text-align: right; }
table.mob td.somme { font-variant-numeric: tabular-nums; }
table.mob td.somme.faux { color: var(--red); }
.controles { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--e2); }
.controles li { display: flex; align-items: baseline; gap: var(--e3); padding: 8px 12px; border-radius: 8px; font-size: 14px; line-height: 20px; }
.controles li.bloquant, .controles li.critique { background: var(--red-bg); color: var(--red-fg); }
.controles li.alerte { background: var(--amber-bg); color: var(--amber); }
.controles li.info { background: var(--info-bg); color: var(--deep); }
.controles li b { white-space: nowrap; min-width: 72px; }
.controles li.bloquant b, .controles li.critique b { font-weight: 600; }
.sauve { font-size: 13px; color: var(--soft); white-space: nowrap; }
.sauve.ok { color: var(--ok-fg); }
.barre-valid { position: sticky; bottom: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(4px); border-top: 1px solid var(--line); padding: var(--e3) var(--pad); display: flex; gap: var(--e3); align-items: center; flex-wrap: wrap; }
/* dépôt de photos ou de PDF */
.deux-choix { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e4); }
.gros-choix { display: flex; flex-direction: column; align-items: flex-start; gap: var(--e2); padding: var(--pad); border: 1px solid var(--line2); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; }
.gros-choix:hover { border-color: var(--navy); background: var(--survol); }
.gros-choix strong { font: 500 16px/24px Plex, sans-serif; color: var(--deep); }
.gros-choix span { color: var(--grey); font-size: 14px; }
.gros-choix svg { color: var(--navy); }
.depot { border: 1.5px dashed var(--line2); border-radius: 12px; padding: var(--e5); text-align: center; color: var(--grey); cursor: pointer; transition: background .15s; }
.depot.survol, .depot:hover { border-color: var(--navy); background: var(--survol); }
.depot strong { color: var(--lien); }
.vignettes { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--e3); margin-top: var(--e3); }
.vignette { position: relative; flex: 0 0 116px; width: 116px; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center; font-size: 12px; color: var(--soft); }
.vignette img { width: 100%; height: 100%; object-fit: contain; background: #fff; cursor: zoom-in; }
.vignette .x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(15, 39, 71, .8); color: #fff; cursor: pointer; font-size: 15px; line-height: 1; }

/* =========================================================
   Catalogue
   ========================================================= */
.normes-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.normes-t th { text-align: left; color: var(--soft); font-weight: 400; padding: 4px; }
.normes-t td { padding: 4px; }
.normes-t input, .normes-t select { height: var(--hp); min-height: var(--hp); padding: 0 8px; font-size: 13px; }
.json { font: 13px/1.45 ui-monospace, Menlo, monospace; min-height: 300px; }
table.liste.cat td:nth-child(2) { width: 30%; }
table.liste.cat td:nth-child(3) { width: 150px; }
table.liste.cat td:nth-child(4):empty { width: 0; padding: 0; }
.param-ligne { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: var(--e2); align-items: center; padding: var(--e2) var(--e4) 4px; }
.param-bas { padding: 0 var(--e4) var(--e3); }
.param-cases { display: flex; gap: var(--e2) var(--e4); flex-wrap: wrap; margin-top: var(--e2); }

/* =========================================================
   Rendez-vous
   ========================================================= */
.rdv-filtres { display: flex; align-items: center; flex-wrap: wrap; gap: var(--e2); }
.nav-jour { display: flex; align-items: center; gap: var(--e2); flex-wrap: nowrap; }
.nav-jour input[type=date] { width: 180px; }
table.liste.horaires td { vertical-align: middle; }
table.liste.horaires td:first-child { width: 34%; }
table.liste.horaires input[type=time] { max-width: 160px; }
table.liste.horaires input:disabled { opacity: .45; }
.case-jour { display: inline-flex; align-items: center; gap: var(--e3); cursor: pointer; white-space: nowrap; }
.case-jour input { width: 16px; height: 16px; accent-color: var(--navy); }
.grille-prestations { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e4); }
.prestation { border: 1px solid var(--line); border-radius: 10px; padding: var(--e4); }
.prestation .champ:last-child { margin-bottom: 0; }
.prestation-tete { display: flex; align-items: center; gap: var(--e2); margin-bottom: var(--e2); font-size: 13px; color: var(--soft); }

/* =========================================================
   Gestion
   ========================================================= */
.gestion-ligne { display: flex; flex-wrap: wrap; gap: var(--e4); }
.gestion-ligne > .bloc { margin: 0; }
.gestion-ligne > .bloc:first-child { flex: 999 1 520px; min-width: 0; }
.gestion-ligne > .bloc:last-child { flex: 1 1 300px; min-width: 0; }
.histo { height: 180px; display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--line2); margin-top: var(--e4); }
.barre-j { flex: 1; background: #C9D6EA; border-radius: 3px 3px 0 0; min-width: 2px; }
.barre-j.max { background: var(--navy); }
/* repères sous l'histogramme : le premier calé à gauche, le dernier à droite, les autres centrés sur leur barre */
.reperes { position: relative; height: 20px; margin-top: var(--e2); font-size: 12px; color: var(--soft); }
.reperes span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.reperes span:first-child { transform: none; }
.reperes span:last-child { transform: translateX(-100%); }
.empile { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; }
.modes-l { display: flex; flex-direction: column; gap: var(--e3); margin-top: var(--e4); font-size: 14px; line-height: 20px; }
.modes-l > div { display: flex; align-items: baseline; gap: var(--e3); }
.modes-l > div > .dot, .modes-l > div > :first-child { margin-right: auto; }
.modes-l .chf:last-child { width: 44px; }
.modes-l.frais { margin-top: var(--e3); border-top: 1px solid var(--line); padding-top: var(--e3); }
.chf { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.top-l { display: grid; grid-template-columns: minmax(0, 3fr) 50px repeat(3, minmax(0, 1.2fr)); gap: var(--e3); align-items: baseline; padding: var(--e3) var(--pad); border-top: 1px solid var(--line3); font-size: 14px; line-height: 20px; }
.top-l.entete { font: 500 12px/16px Plex, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); background: var(--entete); padding-top: 8px; padding-bottom: 8px; }
.export-ligne { display: flex; flex-wrap: wrap; gap: var(--e2); align-items: center; margin-top: var(--e4); }
/* Exports pour la comptabilité : [exports de la période] │ Mois [liste] [↓] sur une ligne ; titre → boutons 16 px */
.export-zone { container-type: inline-size; }
.bloc > .bc.export-zone { padding-top: var(--e1); }
.export-zone > .export-ligne { margin-top: 0; flex-wrap: nowrap; }
.export-groupe { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e2); min-width: 0; }
.export-mois { flex: none; flex-wrap: nowrap; padding-left: var(--e3); margin-left: var(--e1); border-left: 1px solid var(--line2); }
.export-mois > span { font-size: 14px; color: var(--soft); white-space: nowrap; }
@container (max-width: 900px) {
  .export-zone > .export-ligne { flex-direction: column; align-items: stretch; gap: var(--e3); }
  .export-mois { padding: var(--e3) 0 0; margin: 0; border-left: 0; border-top: 1px solid var(--line3); }
}
@container (max-width: 560px) {
  .export-zone .export-groupe.periode { display: grid; grid-template-columns: 1fr 1fr; }
  .export-zone .export-groupe.periode .btn { padding: 0 10px; }
  .export-mois select { flex: 1; min-width: 0; }
}

/* =========================================================
   Réglages
   ========================================================= */
.reglages-grille { display: grid; grid-template-columns: 200px minmax(0, 900px); gap: var(--e5); align-items: start; }
.sous-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 92px; margin-top: 12px; }
.sous-nav a, .sous-nav button { display: flex; align-items: center; height: var(--h); text-align: left; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--grey); text-decoration: none; font-size: 14px; white-space: nowrap; cursor: pointer; font-family: inherit; }
.sous-nav [aria-current=true] { background: #fff; border-color: var(--line); color: var(--deep); font-weight: 500; }
.sous-nav a:hover, .sous-nav button:hover { background: var(--navy-bg); }
.reglages-corps { gap: var(--e4); }
.reglages-corps .btn { width: auto; }
/* écrans intégrés (Journal, Sauvegardes, Automatismes) : même pile que la page */
.reglages-integre { display: flex; flex-direction: column; gap: var(--e4); min-width: 0; }
.reglages-integre table.liste td:nth-child(2) { white-space: nowrap; }
.intro-reglage { margin: 0; font-size: 14px; color: var(--grey); line-height: 20px; }
.ligne-auto { display: flex; align-items: center; gap: var(--e3); min-height: var(--h); }
.ligne-auto .btn { margin-left: auto; }
/* paiement en ligne */
.op-tete { display: flex; align-items: center; gap: var(--e3); flex-wrap: wrap; margin-bottom: var(--e4); }
.op-tete h2 { margin: 0; white-space: nowrap; }
.adresse-op { display: flex; align-items: center; gap: var(--e2) var(--e3); margin-top: var(--e1); font-size: 13px; color: var(--soft); flex-wrap: wrap; }
.adresse-op code, code.adresse { font-family: inherit; font-size: 13px; background: #F3F5F8; border-radius: 6px; padding: 4px 8px; color: var(--grey); overflow-wrap: anywhere; }
.conditions-manquent { display: flex; align-items: baseline; gap: var(--e3); margin-top: var(--e4); font-size: 13px; color: var(--amber); flex-wrap: wrap; }
.conditions-manquent .dot { white-space: normal; }


/* =========================================================
   3.3.6 — gabarits communs des fiches et petits composants
   ========================================================= */
/* en-tête de fiche (consultation, ordonnance, bon de commande) : infos à gauche, états à droite, lignes de base communes */
.entete-fiche { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--e3) var(--e5); flex-wrap: wrap; }
.ef-infos, .ef-etat { display: flex; flex-direction: column; gap: var(--e1); line-height: 20px; min-width: 0; }
.ef-etat { align-items: flex-end; text-align: right; }
.lien-discret, .d-infos a, .ef-infos a { text-decoration: none; }
.lien-discret:hover, .d-infos a:hover, .ef-infos a:hover { text-decoration: underline; }
.med-carte .tete-carte { justify-content: space-between; }
.cr-zone { margin-top: var(--e5); }
.historique + .historique { margin-top: var(--e2); }
.historique > div { margin-top: var(--e2); }
.reception-ligne { padding: var(--e3) 0; border-bottom: 1px solid var(--line3); }
.reception-ligne .titre-ligne { margin-bottom: var(--e2); }
.reception-ligne .grille3 { margin-bottom: var(--e2); }
.dates-page { gap: var(--e2); }
.dates-page input { width: 180px; }
.total-delivrer { line-height: 24px; }
.total-delivrer .montant.moyen .m-v { font-size: 20px; line-height: 24px; }
.jour-titre { margin: 0; padding: 0 var(--pad) var(--e3); font-size: 14px; color: var(--grey); }
.ligne-outils.sans-trait { margin-top: 0; padding-top: 0; border-top: 0; }
.actions.fin { justify-content: flex-end; margin-top: 0; }
.actions.sans-marge, .bc .actions:first-child { margin-top: 0; }
.actions-bc { display: flex; gap: var(--e2); flex-wrap: wrap; }
.cases-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--e3) var(--e4); margin-bottom: var(--e4); }
.def-bloc { margin-top: var(--e2); }
.def-bloc > .seg { margin-bottom: var(--e2); }
.info-paire { margin-bottom: var(--e3); }
.info-paire > div { line-height: 20px; }
.journal-outils .recherche-champ { width: 280px; }
.journal-outils input[type=date] { width: 170px; }
.aligne-champ { margin-top: 24px; }
.btn.gauche svg { transform: rotate(90deg); }
.btn.droite svg { transform: rotate(-90deg); }
/* « i » dans un intitulé de champ ou un titre : calé sur la ligne du texte */
.champ > span .info, .lbl .info, .titre-carte .info, .titre-ligne .info { width: 20px; height: 20px; margin: -2px 0 0; }
.titre-carte .compte { font: 400 13px/20px Plex, sans-serif; color: var(--soft); }
.export-ligne select { width: auto; }
@media (max-width: 640px) {
  .ef-etat { align-items: flex-start; text-align: left; }
  .journal-outils, .journal-outils .recherche-champ { width: 100%; }
  .journal-outils input[type=date] { width: auto; flex: 1; }
  .dates-page input { width: auto; flex: 1; min-width: 0; }
}

/* =========================================================
   Animations : courtes et discrètes (neutralisées si le système demande moins d'animations, voir en fin de fichier)
   ========================================================= */
@keyframes tour { to { transform: rotate(360deg); } }
@keyframes pa-fondu { from { opacity: 0; } }
@keyframes pa-monte { from { opacity: 0; transform: translateY(6px); } }
@keyframes pa-pose { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes pa-menu { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
@keyframes pa-pop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
@keyframes pa-cloche { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-11deg); } 60% { transform: rotate(7deg); } 80% { transform: rotate(-4deg); } }
@keyframes pa-liseré { 0% { box-shadow: 0 0 0 0 rgba(63, 143, 58, 0); border-color: var(--line); } 25% { box-shadow: 0 0 0 3px rgba(63, 143, 58, .16); border-color: #8CC084; } 100% { box-shadow: 0 0 0 0 rgba(63, 143, 58, 0); border-color: var(--line); } }
@keyframes pa-eclaire { 0%, 100% { background-color: transparent; } 20% { background-color: #FFF4D6; } }
@keyframes pa-fenetre { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes pa-fenetre-sortie { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes pa-entre { from { opacity: 0; transform: translateY(8px); } }
@keyframes pa-deploie { from { clip-path: inset(0 0 0 100% round 16px); opacity: .4; } to { clip-path: inset(0 0 0 0 round 16px); opacity: 1; } }
/* pages : le contenu arrive en fondu ; premières lignes des listes en cascade */
.contenu > * { animation: pa-entre .34s var(--courbe) backwards; }
.contenu > :nth-child(2) { animation-delay: .04s; }
.contenu > :nth-child(3) { animation-delay: .08s; }
.contenu > :nth-child(4) { animation-delay: .12s; }
.contenu > :nth-child(n+5) { animation-delay: .16s; }
.contenu > .chargement { animation: pa-fondu .3s .15s backwards; }
table.liste tbody tr { animation: pa-fondu .22s ease backwards; }
table.liste tbody tr:nth-child(2) { animation-delay: .02s; }
table.liste tbody tr:nth-child(3) { animation-delay: .04s; }
table.liste tbody tr:nth-child(4) { animation-delay: .06s; }
table.liste tbody tr:nth-child(5) { animation-delay: .08s; }
table.liste tbody tr:nth-child(6) { animation-delay: .1s; }
table.liste tbody tr:nth-child(7) { animation-delay: .12s; }
table.liste tbody tr:nth-child(8) { animation-delay: .14s; }
table.liste tbody tr:nth-child(n+9) { animation-delay: .16s; }
details[open] > :not(summary) { animation: pa-monte .2s var(--doux) backwards; }
/* fermetures : la même animation à l'envers (classe .sortie posée par P.sortir / P.cacher) */
.voile.sortie { animation: pa-fondu .19s ease-in reverse both; pointer-events: none; }
.voile.sortie .fenetre { animation: pa-fenetre-sortie .19s cubic-bezier(.4, 0, 1, 1) both; }
.flottant:not([hidden]) { animation: pa-menu .16s var(--doux) backwards; transform-origin: top left; }
.menu.sortie, .flottant.sortie { animation: pa-menu .12s ease reverse both; pointer-events: none; }
.toast.sortie { animation: pa-monte var(--sortie) ease reverse both; }
/* résultats de la recherche en cascade */
.rg-res > * { animation: pa-monte .18s var(--doux) backwards; }
.rg-res > :nth-child(2) { animation-delay: .025s; }
.rg-res > :nth-child(3) { animation-delay: .05s; }
.rg-res > :nth-child(4) { animation-delay: .075s; }
.rg-res > :nth-child(5) { animation-delay: .1s; }
.rg-res > :nth-child(n+6) { animation-delay: .12s; }
/* boutons : enfoncement au clic, coche après un enregistrement réussi (P.agir) */
.btn, .seg button, .icone-btn, .profil, .nav a, .menu [role=menuitem], .rg-pilule, .auto-ligne, .auj-carte { transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .18s var(--courbe); }
.btn:active:not(:disabled), .seg:not(.segmente) button:active, .icone-btn:active, .profil:active, .nav a:active, .menu [role=menuitem]:active { transform: scale(.98); transition-duration: .08s; }
.btn.fait { pointer-events: none; }
.btn.fait svg { animation: pa-pop .3s ease; }
.bloc.enregistre, .carte.enregistre { animation: pa-liseré 1.1s ease; }
/* compteurs et cloche */
.icone-btn .badge.pop, .nav a .nb.pop { animation: pa-pop .35s ease; }
.icone-btn.sonne svg { animation: pa-cloche .7s ease; transform-origin: 50% 3px; }

/* =========================================================
   Adaptations par largeur d'écran
   ========================================================= */
@media (min-width: 1500px) {
  .items-col.auto-trois { columns: 3; }
}
@media (max-width: 1100px) {
  .d-grille, .nd-grille { grid-template-columns: minmax(0, 1fr); }
  .recap { position: static; }
  .packs { grid-template-columns: 1fr 1fr; }
  .chiffres.cinq { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* 3.3.8 — liste « À traiter » sur écran moyen : mêmes colonnes pour toutes les lignes (points sous l'intitulé), mots longs sur deux lignes */
  .rangee { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.9fr) repeat(3, minmax(0, 1.3fr)); }
  .rangee > .dot { white-space: normal; }
  .rangee .examens-court .tag { max-width: 100%; white-space: normal; }
  /* boîte « À payer » : barre fixe en bas de l'écran (total, liste de contrôle, bouton) tant que la boîte n'est pas visible */
  .recap-barre { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; align-items: center; gap: var(--e3); padding: var(--e3) var(--e4) calc(var(--e3) + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); backdrop-filter: blur(4px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(15, 39, 71, .08); transition: transform .2s var(--doux); }
  .recap-barre.cachee { transform: translateY(110%); }
  .recap-barre .rb-total { display: flex; flex-direction: column; min-width: 0; line-height: 20px; }
  .recap-barre .rb-total .lbl { margin: 0; font-size: 12px; }
  .recap-barre .montant .m-v { font: 500 20px/24px Plex, sans-serif; color: var(--deep); }
  .recap-barre .btn { margin-left: auto; }
  .contenu:has(.recap-barre:not(.cachee)) { padding-bottom: 96px; }
}
/* tablette */
@media (max-width: 900px) {
  .chiffres { grid-template-columns: 1fr 1fr; }
  /* liste À traiter : nom, examens, puis les trois états côte à côte avec leur intitulé */
  .rangee { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e2) var(--e3); padding: var(--e3) var(--e4); align-items: start; }
  .rangee > :first-child, .rangee > :nth-child(2) { grid-column: 1 / -1; }
  .rangee.entete { display: none; }
  .rangee > .dot { display: block; white-space: normal; line-height: 20px; overflow-wrap: anywhere; }
  .rangee > .dot i { display: inline-block; margin-right: 6px; vertical-align: 1px; }
  .rangee > .dot.anneau svg { display: inline-block; margin-right: 6px; top: 0; vertical-align: -2px; }
  .groupe-etape { padding: var(--e4) var(--e4) var(--e2); }
  .rangee > .dot::before { display: block; font-size: 12px; line-height: 16px; color: var(--soft); margin-bottom: 2px; }
  .rangee > :nth-child(3)::before { content: 'Paiement'; }
  .rangee > :nth-child(4)::before { content: 'Résultats'; }
  .rangee > :nth-child(5)::before { content: 'Envoi'; }
  /* réglages : rubriques au-dessus, sur une ligne qui défile */
  .reglages-grille { grid-template-columns: 1fr; row-gap: var(--e4); }
  .sous-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .sous-nav::-webkit-scrollbar { display: none; }
  .sous-nav a, .sous-nav button { flex: none; }
}
/* menu latéral escamotable */
@media (max-width: 860px) {
  .app, .app.replie { grid-template-columns: 1fr; grid-template-rows: 60px 1fr; }
  .barre { gap: var(--e2); padding: 0 12px; }
  .barre .marque { width: auto; gap: 10px; }
  .barre .lieu, .barre .trait-v { display: none; }
  .barre .logo { height: 34px; }
  .burger { display: grid; order: -1; }
  .profil { padding: 0; width: var(--h); justify-content: center; }
  .profil .nom-u, .profil > svg { display: none; }
  .nav { position: fixed; top: 60px; left: 0; bottom: 0; width: 264px; height: auto; z-index: 25; transform: translateX(-100%); transition: transform .2s; }
  .nav.ouvert { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .nav .replier { display: none; }
  .app.replie .nav a { width: auto; }
  .app.replie .nav .txt { display: inline; }
  .app.replie .nav a .nb:not([hidden]) { position: static; width: auto; height: auto; font-size: 12px; background: none; margin-left: auto; }
  table.liste .masq { display: none; }
  table.liste td, table.liste th { padding-left: 12px; padding-right: 12px; }
  table.liste th:first-child, table.liste td:first-child { padding-left: var(--pad); }
  table.liste th:last-child, table.liste td:last-child { padding-right: var(--pad); }
}
@media (max-width: 760px) {
  .chiffres.trois, .chiffres.cinq { grid-template-columns: 1fr; }
  .top-l { grid-template-columns: minmax(0, 1fr) repeat(2, auto); }
  .top-l > :nth-child(2), .top-l > :nth-child(4) { display: none; }
  .ligne-outils, .ligne-outils .groupe { width: 100%; }
  .ligne-outils .groupe select { flex: 1; width: auto; }
  .ligne-outils > .btn { width: 100%; }
  .bloc > .bt .nav-jour { width: 100%; }
  /* sélecteur et ligne de date l’un sous l’autre : un vrai espace entre les deux (sans les remontées prévues pour l’alignement côte à côte) */
  .bloc > .bt:has(> .nav-jour) { row-gap: 10px; }
  .bloc > .bt:has(> .nav-jour) > .seg.segmente, .bloc > .bt > .nav-jour { margin-block: 0; }
  .nav-jour { flex-wrap: wrap; }
  .nav-jour input[type=date] { flex: 1; width: auto; }
  .grille-prestations { grid-template-columns: 1fr; }
  table.liste.cat td:nth-child(2) { display: none; }
  table.liste.cat td:nth-child(3) { width: auto; white-space: nowrap; }
  table.liste.horaires { table-layout: fixed; width: 100%; }
  table.liste.horaires th, table.liste.horaires td { padding: 8px 6px; }
  table.liste.horaires td:first-child, table.liste.horaires th:first-child { width: 31%; padding-left: var(--pad); }
  table.liste.horaires td:last-child, table.liste.horaires th:last-child { padding-right: var(--pad); }
  table.liste.horaires input[type=time] { max-width: none; min-width: 0; padding: 0 4px; }
}
@media (max-width: 720px) {
  .ch { grid-template-columns: 1fr auto; gap: 4px var(--e3); padding: var(--e2) var(--e4); }
  .ch .cl, .ch .cv { grid-column: 1 / -1; }
  .ch .cn { grid-column: 1; }
  .ch .cs { grid-column: 2; grid-row: 3; }
  .ch .cv .seg { flex-wrap: wrap; }
  .ch .cv > input, .ch .cv > select, .ch .cv .seg button { height: var(--h); min-height: var(--h); }
  .ch.long { grid-template-columns: 1fr; }
}
/* téléphone : compact, aligné, sans zoom automatique (champs à 16 px) */
@media (max-width: 640px) {
  :root { --pad: 16px; }
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; }
  h1, .page-tete h1 { font-size: 24px; line-height: 32px; }
  .pt-actions { min-height: var(--h); }
  .pt-ligne { align-items: center; }
  h2 { overflow-wrap: anywhere; }
  .contenu { padding: 16px 16px 32px; gap: var(--e4); }
  .page-tete { margin-bottom: 0; }
  .bloc > .bt > h2 { overflow-wrap: anywhere; white-space: normal; }
  .grille2, .grille3, .deux-choix { grid-template-columns: 1fr; }
  .dot { white-space: normal; }
  /* textes longs (noms, e-mails, numéros) : passage à la ligne au lieu de déborder */
  .d-identite, .patient-cel, .res-t, .pc-info { overflow-wrap: anywhere; }
  /* contrôle segmenté qui ne tient pas : il glisse du doigt */
  .seg.segmente:not(.plein) { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .seg.segmente:not(.plein)::-webkit-scrollbar { display: none; }
  .seg.segmente:not(.plein) button { flex: none; }
  .bloc > .bt > .seg.segmente { max-width: 100%; }
  /* tableaux en fiches : titre sur toute la largeur, puis les informations sur deux colonnes, libellé au-dessus */
  table.liste.cartes, table.liste.cartes tbody, table.liste.cartes tr, table.liste.cartes td { display: block; width: auto; }
  table.liste.cartes thead { display: none; }
  table.liste.cartes tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--e2) var(--e3); padding: var(--e3) var(--pad); border-bottom: 1px solid var(--line3); }
  table.liste.cartes td, table.liste.cartes td:first-child, table.liste.cartes td:last-child { min-width: 0; min-height: 0; padding: 0; border: 0; text-align: left; white-space: normal; font-size: 14px; overflow-wrap: anywhere; }
  table.liste.cartes td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--soft); font-size: 12px; line-height: 16px; }
  table.liste.cartes td:first-child { grid-column: 1 / -1; font-weight: 500; }
  table.liste.cartes td[data-label=""] { grid-column: 1 / -1; }
  table.liste.cartes td:first-child::before, table.liste.cartes td[data-label=""]::before { display: none; }
  table.liste.cartes td:empty { display: none; }
  table.liste.cartes td > .pill:first-child, table.liste.cartes td > .dot:first-child { margin-left: 0; }
  table.liste.cartes td .btn { width: auto; }
  table.liste.cartes td .actions, table.liste.cartes td:last-child:has(.btn) { justify-content: flex-start; }
  table.liste.cartes tr.cliquable:hover td { background: none; }
  /* petit tableau sans en-tête : une ligne compacte */
  table.liste.mini, table.liste.mini tbody { display: block; }
  table.liste.mini tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--e3); padding: var(--e3) var(--pad); border-bottom: 1px solid var(--line3); }
  table.liste.mini td, table.liste.mini td:first-child, table.liste.mini td:last-child { display: block; padding: 0; border: 0; }
  table.liste.mini td:nth-child(2) { color: var(--soft); font-size: 13px; text-align: right; }
  table.liste.mini td:nth-child(3) { grid-column: 1 / -1; }
  table.liste.mini td > .pill:first-child { margin-left: 0; }
  .sous-nav a, .sous-nav button { padding: 0 10px; font-size: 14px; }
  /* chiffres clés : libellés réservés sur deux lignes, la valeur reste sur la même ligne d'une case à l'autre */
  .chiffre { padding: var(--e4); }
  .chiffres:not(.trois):not(.cinq) .chiffre .l { min-height: 40px; }
  .chiffre .v { font-size: 24px; line-height: 32px; }
  .chiffre .dot, .chiffre .s { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
  /* liste « À traiter » */
  .filtres { padding: var(--e3) var(--pad); }
  .filtres .droite { margin-left: 0; width: 100%; gap: var(--e2); }
  .rangee { padding: var(--e3) var(--pad); }
  .groupe-etape { padding-left: var(--pad); padding-right: var(--pad); }
  /* dossier */
  .d-tete-carte { gap: var(--e3); }
  .d-tete-carte .d-identite { flex: 1 1 calc(100% - 64px); }
  .d-tete-carte .d-num { flex: 1 1 100%; white-space: normal; padding-top: 0; }
  .d-identite { min-width: 0; }
  .d-identite h1 { white-space: normal; }
  .d-num { text-align: left; }
  .res-l { grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--e2); }
  .res-l > :nth-child(3) { display: none; }
  .mesures-tete .mesures-titre { flex-direction: column; align-items: flex-start; gap: 0; }
  .cr-envoi { grid-template-columns: minmax(0, 1fr); }
  /* nouveau dossier */
  .packs { grid-template-columns: 1fr; }
  .tete-carte .cherche-examen { min-width: 0; width: 100%; margin: 0; }
  .items-col, .items-col.trois { columns: 1; }
  .recap-partie { grid-template-columns: 1fr 1fr; }
  /* saisie : barre de validation pleine largeur */
  .barre-valid { padding: var(--e3) var(--pad); }
  .barre-valid .btn { flex: 1 1 100%; }
  /* lignes d'outils (essai d'e-mail…) : chaque groupe sur sa ligne, champ et bouton pleine largeur */
  .ligne-outils { flex-direction: column; align-items: stretch; }
  .ligne-outils .groupe, .ligne-outils .groupe.etire { flex-wrap: wrap; min-width: 0; }
  .ligne-outils .groupe input { flex: 1 1 100%; min-width: 0; }
  .ligne-outils .groupe .btn { flex: 1 1 auto; }
  /* réglages */
  .op-tete .interrupteur { margin-left: 0; width: 100%; justify-content: space-between; }
  .ligne-auto { flex-wrap: wrap; }
  .reglages-corps .champ input, .reglages-corps .champ select { min-width: 0; width: 100%; }
  .reglages-integre table.liste td:nth-child(2) { white-space: normal; }
  /* horaires : champs d'heure entiers */
  table.liste.horaires { font-size: 14px; }
  table.liste.horaires td:first-child, table.liste.horaires th:first-child { width: 38%; padding-left: var(--pad); }
  table.liste.horaires td:first-child label { white-space: nowrap; gap: 8px; }
  table.liste.horaires input[type=time] { padding: 0 6px; text-align: center; }
  table.liste.horaires input[type=time]::-webkit-calendar-picker-indicator { display: none; }
  /* fenêtres */
  .fenetre .ft { padding: 12px 12px 12px 16px; min-height: 56px; }
  .fenetre .fc { padding: 16px; }
  .fenetre .fp { padding: 12px 16px; }
}
/* petit téléphone : la barre du haut garde la place d'afficher la recherche */
@media (max-width: 420px) {
  .barre { gap: 6px; padding: 0 8px; }
  .barre .logo { height: 28px; }
}
@media print {
  .barre, .nav { display: none; }
  .app { display: block; }
}
/* le système demande moins d'animations : tout devient instantané */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* 3.3.6 — automatismes (Réglages → Automatismes), clôture de caisse */
.auto-carte { display: flex; flex-direction: column; gap: var(--e3); }
.auto-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--e3); }
.auto-tete h2 { margin: 0; }
.auto-tete .auto-actions { margin-block: -8px; }
.auto-actions { display: flex; align-items: center; gap: var(--e2); flex: none; }
.auto-corps { display: flex; flex-direction: column; gap: var(--e3); }
.auto-texte { margin: 0; font-size: 14px; line-height: 20px; }
.auto-eteint .auto-texte, .auto-eteint .auto-pied { opacity: .6; }
.auto-params { margin: 0; }
.auto-params > summary { cursor: pointer; font-size: 14px; color: var(--navy); width: max-content; }
.auto-params > div { margin-top: var(--e3); }
.auto-params textarea.mono { font-size: 13px; }
.auto-extra { margin: 0; }
.auto-liste { margin: 0; padding-left: 18px; font-size: 14px; line-height: 24px; }
.auto-pied { margin: 0; }
.encart-caisse .bc { display: flex; flex-wrap: wrap; gap: var(--e2) var(--e4); align-items: center; padding: var(--e3) var(--pad); }
.encart-caisse input { width: 160px; }
@media (max-width: 640px) {
  .auto-tete { align-items: flex-start; }
  .encart-caisse input { flex: 1 1 140px; width: auto; }
  .auto-params textarea.mono { font-size: 16px; }
}
.titre-carte .muted, .titre-carte .compte { font-weight: 400; }
.res-l > * { min-width: 0; }
.res-l > :nth-child(4) { justify-self: start; }
@media (max-width: 900px) { .sous-nav { margin-top: 0; } }

/* ===== 3.3.7 A : encarts « en attente » du dossier, suggestion d'adresse e-mail, connexion interrompue ===== */
.encart .actions { margin-top: var(--e2); display: flex; flex-wrap: wrap; gap: var(--e2); }
.suggestion-email { margin: 4px 0 var(--e2); color: var(--soft); }
.suggestion-email .btn.lien { font-size: inherit; }
.encart.coupure { max-width: 560px; }

/* ===== 3.3.9 — page « Vérifier l'authenticité de résultats » ===== */
.verif-in { max-width: 720px; }
.verif-bande { background: var(--deep); color: #fff; padding: 36px 0 40px; overflow: hidden; position: relative; }
.verif-bande::after { content: ""; position: absolute; right: -120px; top: -140px; width: 380px; height: 380px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 0 0 60px rgba(255,255,255,.025), 0 0 0 130px rgba(255,255,255,.02); pointer-events: none; }
.verif-bande .verif-in { display: flex; align-items: center; gap: 22px; position: relative; z-index: 1; }
.verif-bande .surtitre { margin: 0 0 6px; font: 500 12px/16px Plex, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.verif-bande h1 { margin: 0 0 8px; color: #fff; font-size: clamp(24px, 4.4vw, 32px); line-height: 1.15; font-weight: 500; }
.verif-accroche { margin: 0; color: rgba(255,255,255,.8); font-size: 15px; line-height: 1.5; }
.bouclier { flex: none; width: 72px; height: 72px; color: #fff; }
.verif-bande .bouclier { padding: 14px; border-radius: 20px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); box-sizing: content-box; width: 56px; height: 56px; }
.bouclier-contour { stroke-dasharray: 170; stroke-dashoffset: 170; animation: v-trace 1.1s cubic-bezier(.22,1,.36,1) .15s forwards; }
.bouclier-coche { stroke-dasharray: 32; stroke-dashoffset: 32; animation: v-trace .5s ease-out 1.05s forwards; color: var(--green); stroke: var(--green); }
@keyframes v-trace { to { stroke-dashoffset: 0; } }
.verif { padding-top: 28px; }
.verif > * { animation: v-monte .6s cubic-bezier(.22,1,.36,1) both; }
.verif > *:nth-child(2) { animation-delay: .08s; }
.verif > *:nth-child(3) { animation-delay: .16s; }
@keyframes v-monte { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.verif-choix { gap: 12px; }
.verif-choix .choix-c { display: grid; grid-template-columns: 52px 1fr 20px; align-items: center; gap: 16px; padding: 18px; border-radius: 16px; transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s ease, border-color .2s ease; }
.verif-choix .choix-c:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15,39,71,.08); }
.choix-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--navy-bg); color: var(--navy); }
.choix-txt strong { display: block; margin-bottom: 2px; }
.choix-txt > span { color: var(--grey); font-size: 14px; }
.choix-fl { color: var(--soft); transition: transform .25s ease, color .2s ease; }
.choix-c:hover .choix-fl { transform: translateX(3px); color: var(--navy); }

.garanties { list-style: none; margin: 28px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.garanties li { display: grid; gap: 10px; align-content: start; }
.garanties svg { color: var(--navy); }
.garanties strong { display: block; color: var(--deep); font-size: 14px; font-weight: 500; line-height: 1.35; }
.garanties span { display: block; margin-top: 2px; color: var(--soft); font-size: 13px; line-height: 1.45; }

.verif-carte { padding: 22px; border: 1px solid var(--line2); border-radius: 16px; background: #fff; }
.depot { flex-direction: column; gap: 6px; min-height: 170px; border-radius: 14px; background: var(--survol); transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
.depot-ico { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 4px; border-radius: 50%; background: #fff; color: var(--navy); box-shadow: 0 6px 16px rgba(15,39,71,.08); transition: transform .3s cubic-bezier(.22,1,.36,1); }
.depot-titre { color: var(--deep); font-weight: 500; font-size: 15px; word-break: break-all; }
.depot-sous { color: var(--soft); font-size: 13px; }
.depot.is-survol { border-color: var(--navy); background: var(--navy-bg); transform: scale(1.01); }
.depot.is-survol .depot-ico, .depot:hover .depot-ico { transform: translateY(-3px); }
.depot.is-pret { border-style: solid; border-color: var(--navy); background: #fff; }
.depot.is-manque { animation: v-secoue .4s ease; }
@keyframes v-secoue { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.btn-verif { width: 100%; height: 48px; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn-verif.is-analyse { opacity: 1; }
.analyse-anneau { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: v-tourne .8s linear infinite; }
@keyframes v-tourne { to { transform: rotate(360deg); } }
.verif-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 14px 0 0; color: var(--soft); font-size: 13px; text-align: center; }
.verif-note svg { flex: none; color: var(--navy); }
.code-verif { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }

.verdict { display: grid; justify-items: center; gap: 16px; text-align: center; }
.verdict-signe { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; animation: v-pop .5s cubic-bezier(.34,1.56,.64,1) both; }
.verdict-signe svg { width: 52px; height: 52px; }
.verdict--ok .verdict-signe { background: var(--ok-bg); color: var(--ok); }
.verdict--attention .verdict-signe { background: var(--amber-bg); color: var(--warn); }
.verdict--erreur .verdict-signe { background: var(--red-bg); color: var(--red); }
.verdict-cercle { stroke-dasharray: 64; stroke-dashoffset: 64; animation: v-trace .6s ease-out .15s forwards; }
.verdict-trace { stroke-dasharray: 24; stroke-dashoffset: 24; animation: v-trace .4s ease-out .6s forwards; }
@keyframes v-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.verdict .encart { width: 100%; text-align: left; }
.certificat { margin-top: 18px; border: 1px solid var(--line2); border-radius: 16px; overflow: hidden; background: #fff; animation: v-monte .6s cubic-bezier(.22,1,.36,1) .35s both; }
.certificat-tete { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--deep); color: #fff; }
.certificat-tete .bouclier { width: 40px; height: 40px; }
.certificat-tete strong { display: block; font-weight: 500; }
.certificat-tete span { display: block; font-size: 13px; color: rgba(255,255,255,.75); }
.certificat .fiche { margin: 0; border-radius: 0; background: #fff; padding: 18px; }
.verif .retour { text-align: center; margin-top: 22px; }

@media (max-width: 620px) {
  .verif-bande { padding: 26px 0 30px; }
  .verif-bande .verif-in { flex-direction: column; align-items: flex-start; gap: 16px; }
  .verif-bande .bouclier { width: 44px; height: 44px; padding: 10px; border-radius: 14px; }
  .garanties { grid-template-columns: 1fr; gap: 14px; }
  .garanties li { grid-template-columns: 24px 1fr; gap: 12px; }
  .verif-choix .choix-c { grid-template-columns: 44px 1fr 18px; gap: 12px; padding: 14px; }
  .choix-ico { width: 44px; height: 44px; border-radius: 12px; }
  .verif-carte { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .bouclier-contour, .bouclier-coche, .verdict-cercle, .verdict-trace { animation: none; stroke-dashoffset: 0; }
  .verif > *, .verdict-signe, .certificat { animation: none; }
  .analyse-anneau { animation-duration: 2s; }
}
.verif-note { justify-content: flex-start; text-align: left; align-items: flex-start; }
.verif-note svg { margin-top: 1px; }
@media (max-width: 620px) {
  .pub-tag { white-space: normal; font-size: 10px; line-height: 15px; letter-spacing: .08em; }
  .pub-tete .pub-in { flex-wrap: wrap; }
}

/* =========================================================
   3.4.0 B — recherche globale, « Aujourd'hui », Automatismes, ajustement des tarifs, mouvements
   ========================================================= */
/* fenêtres : la hauteur suit le contenu (P.fenetre) ; pendant l'animation, pas de barre de défilement qui clignote */
.fenetre.anime-h { overflow: hidden; }
.fenetre .ft h2 { will-change: opacity; }
/* listes et cartes : apparition échelonnée discrète (classe posée sur le conteneur) */
.echelonne > * { animation: pa-entre .32s var(--courbe) backwards; }
.echelonne > :nth-child(2) { animation-delay: .035s; }
.echelonne > :nth-child(3) { animation-delay: .07s; }
.echelonne > :nth-child(4) { animation-delay: .105s; }
.echelonne > :nth-child(5) { animation-delay: .14s; }
.echelonne > :nth-child(n+6) { animation-delay: .175s; }
/* mise à jour sur place (même écran redessiné) : rien ne rejoue son apparition */
.contenu.calme > *, .contenu.calme .echelonne > *, .contenu.calme table.liste tbody tr { animation: none; }

/* ----- recherche globale : pilule au centre exact de la barre (ordinateur) ----- */
.rg-espace { flex: 1 1 auto; min-width: 0; }
.rg-bouton { display: none; }
.rg { position: absolute; left: 50%; top: 50%; width: var(--rg-ferme, 300px); transform: translate(-50%, -50%); z-index: 3; transition: width .38s var(--courbe); }
.rg.ouvert { width: var(--rg-ouvert, 560px); }
.rg-ligne { display: flex; align-items: center; gap: 8px; }
.rg-pilule { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 40px; margin: 0; padding: 0 6px 0 14px; border: 1px solid var(--line2); border-radius: 20px; background: var(--bg); color: var(--soft); cursor: text; }
.rg-pilule:hover { background: #fff; border-color: #C9D3E0; }
.rg.ouvert .rg-pilule { background: #fff; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30, 58, 110, .1), 0 10px 28px rgba(15, 39, 71, .1); }
.rg-pilule svg { flex: none; }
.rg input.rg-input { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 38px; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 15px; color: var(--ink); outline: none; }
.rg input.rg-input:focus { box-shadow: none; border: 0; }
.rg input.rg-input::placeholder { color: var(--soft); opacity: 1; }
.rg-input::-webkit-search-cancel-button, .rg-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.rg-kbd { flex: none; font: 12px/18px Plex, sans-serif; border: 1px solid var(--line2); border-radius: 6px; padding: 0 7px; color: var(--soft); background: #fff; white-space: nowrap; transition: opacity .2s; }
.rg-annuler { display: none; }
.deroulant.rg-res { position: absolute; left: 0; right: 0; top: calc(100% + 8px); max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain; border-radius: 14px; box-shadow: 0 24px 60px rgba(15, 39, 71, .18); z-index: 4;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.985); transform-origin: top center; pointer-events: none; transition: opacity .18s ease, transform .28s var(--courbe), visibility 0s .28s; }
.rg.ouvert .deroulant.rg-res { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .22s ease, transform .34s var(--courbe), visibility 0s; }
.rg-res .res { align-items: center; }
.rg-res .res .btn.petit { flex: none; }
.rg-invite { padding: 16px; color: var(--soft); font-size: 14px; }
.rg-fond { position: fixed; inset: 68px 0 0 0; z-index: 19; background: rgba(15, 39, 71, .16); opacity: 0; transition: opacity .24s ease; }
.rg-fond.visible { opacity: 1; }

/* ----- « Aujourd'hui » ----- */
.auj-grille { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--e5, 24px); align-items: stretch; }
.auj-grille > .bloc { min-width: 0; margin: 0; }
.auj-liste { list-style: none; margin: 0; padding: 0; }
.auj-ligne { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 60px; padding: 10px var(--pad); border-top: 1px solid var(--line3); }
.auj-ligne:first-child { border-top: 0; }
.auj-ligne.sans-heure { grid-template-columns: minmax(0, 1fr) auto; }
.auj-ligne.lien { cursor: pointer; text-decoration: none; color: inherit; transition: background-color .2s; }
.auj-ligne.lien:hover { background: var(--survol); }
.auj-heure { white-space: nowrap; font: 500 15px/20px Plex, sans-serif; font-variant-numeric: tabular-nums; color: var(--deep); }
.auj-t { min-width: 0; }
.auj-t .nom { font-size: 15px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auj-t .sous { font-size: 13px; line-height: 18px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auj-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.auj-montant { font-variant-numeric: tabular-nums; white-space: nowrap; }
.auj-vide { padding: 20px var(--pad); color: var(--soft); font-size: 14px; }
.auj-sous-titre { padding: 14px var(--pad) 6px; border-top: 1px solid var(--line3); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.auj-sous-titre + .auj-ligne { border-top: 0; }
.bloc > .bt > .seg.segmente.auj-seg { margin-left: auto; }

/* ----- Automatismes : par thème, une ligne par automatisme, interrupteurs dans une seule colonne à droite ----- */
.auto-themes { display: flex; flex-direction: column; gap: var(--e5, 24px); }
.auto-theme > .bt h2 { font-size: 17px; }
.auto-ligne { display: grid; grid-template-columns: minmax(0, 1fr) 40px 52px; column-gap: 12px; align-items: start; padding: 16px var(--pad); border-top: 1px solid var(--line3); }
.auto-ligne:first-child { border-top: 0; }
.auto-ligne .auto-g { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.auto-ligne h3 { margin: 0; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--ink); }
.auto-ligne .auto-texte { margin: 0; font-size: 14px; line-height: 20px; color: var(--soft); }
.auto-ligne .auto-pied { margin: 0; font-size: 13px; color: var(--soft); }
.auto-ligne .auto-menu { grid-column: 2; justify-self: center; align-self: start; }
.auto-ligne .auto-menu .btn.carre { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; border-color: transparent; background: transparent; }
.auto-ligne .auto-menu .btn.carre:hover { border-color: var(--line2); background: #fff; }
.auto-ligne .auto-inter { grid-column: 3; justify-self: end; align-self: start; height: 36px; display: flex; align-items: center; }
.auto-ligne .auto-inter .interrupteur input { width: 44px; height: 26px; border-radius: 13px; transition: background-color .25s var(--courbe); }
.auto-ligne .auto-inter .interrupteur input::after { width: 22px; height: 22px; transition: left .3s var(--courbe); }
.auto-ligne .auto-inter .interrupteur input:checked::after { left: 20px; }
.auto-ligne .auto-toujours { grid-column: 2 / 4; justify-self: end; align-self: start; height: 36px; display: flex; align-items: center; font-size: 13px; color: var(--soft); white-space: nowrap; }
.auto-ligne.auto-eteint .auto-texte, .auto-ligne.auto-eteint .auto-pied, .auto-ligne.auto-eteint h3 { opacity: .55; transition: opacity .25s; }
.auto-deplier { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0; border: 0; background: none; color: var(--lien); font-size: 14px; cursor: pointer; }
.auto-deplier svg { transition: transform .3s var(--courbe); }
.auto-deplier[aria-expanded=true] svg { transform: rotate(180deg); }
.auto-ligne > .auto-panneau { grid-column: 1 / -1; overflow: hidden; }
.auto-panneau > div { max-width: 760px; }
.auto-panneau > div { padding-top: 6px; display: flex; flex-direction: column; gap: var(--e3); }
.auto-panneau .actions { display: flex; gap: var(--e2); }

/* ----- ajustement des tarifs ----- */
.tarifs-resume { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 var(--e4); font-size: 14px; color: var(--soft); }
.tarifs-resume strong { font-weight: 500; color: var(--ink); }
.tarifs-table { max-height: min(52vh, 460px); overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.tarifs-table table.liste { margin: 0; }
.tarifs-table td.nb, .tarifs-table th.nb { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tarifs-table .fleche { color: var(--soft); padding: 0 4px; }
.tarifs-table .groupe td { background: var(--entete); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); padding-top: 8px; padding-bottom: 8px; }
.tarifs-fait { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 12px 0 4px; }
.tarifs-fait .rond-ok { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); animation: v-pop .42s var(--courbe) backwards; }
.tarifs-fait p { margin: 0; color: var(--soft); }

@media (max-width: 1100px) {
  .auj-grille { grid-template-columns: minmax(0, 1fr); }
  /* une colonne : rendez-vous, préconsultations, paiements, tâches */
  .auj-grille > :nth-child(2) { order: 1; }
  .auj-grille > :nth-child(4) { order: 2; }
}
@media (max-width: 860px) {
  /* recherche : loupe dans le groupe de droite ; le champ couvre toute la barre, avec « Annuler » */
  .rg-bouton { display: grid; }
  .rg, .rg.ouvert { left: 0; right: 0; top: 0; bottom: 0; width: auto; transform: none; visibility: hidden; pointer-events: none; transition: visibility 0s .34s; }
  .rg.ouvert { visibility: visible; pointer-events: auto; transition: visibility 0s; }
  .rg-ligne { height: 100%; padding: 0 12px; background: #fff; clip-path: inset(0 0 0 var(--rg-x, 100%)); transition: clip-path .34s var(--courbe); }
  .rg.ouvert .rg-ligne { clip-path: inset(0 0 0 0); }
  .rg-pilule { height: 40px; background: var(--bg); }
  .rg.ouvert .rg-pilule { box-shadow: none; border-color: var(--line2); background: var(--bg); }
  .rg input.rg-input { font-size: 16px; }
  .rg-kbd, .rg-res .aide-res { display: none; }
  .rg-annuler { display: block; flex: none; height: 40px; padding: 0 4px; border: 0; background: none; color: var(--lien); font-size: 15px; cursor: pointer; }
  .deroulant.rg-res { position: fixed; top: 60px; left: 0; right: 0; max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px); border-radius: 0 0 14px 14px; border-left: 0; border-right: 0; }
  .rg-fond { inset: 60px 0 0 0; }
  .auto-ligne { grid-template-columns: minmax(0, 1fr) 36px 48px; column-gap: 8px; padding: 14px var(--pad); }
}
@media (max-width: 640px) {
  .auj-ligne { grid-template-columns: 64px minmax(0, 1fr); row-gap: 8px; }
  .auj-ligne.sans-heure { grid-template-columns: minmax(0, 1fr) auto; }
  .auj-ligne > .auj-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .auj-ligne.sans-heure > .auj-actions { grid-column: auto; }
  .tarifs-table .masq { display: none; }
  .auj-t .nom, .auj-t .sous { white-space: normal; }
  /* « À venir / Arrivés / Absents » sur toute la largeur */
  .bloc > .bt > .seg.segmente.auj-seg { flex: 1 0 100%; display: flex; margin: 0; }
  .bloc > .bt > .seg.segmente.auj-seg button { flex: 1 1 0; min-width: 0; padding: 0 6px; }
}

/* =========================================================
   3.4.1 — Lien personnel du traitement minceur (t.php)
   Une seule couleur d'accent (marine) ; vert seulement pour l'état « disponible » et l'acompte reçu ; bordures 1 px.
   Apparition échelonnée, dépliage animé en hauteur (traitement.js), appui tactile ; mouvement réduit respecté.
   ========================================================= */
.trt { display: grid; gap: 16px; }
.trt > * { animation: trt-monte .5s var(--courbe) both; }
.trt > *:nth-child(2) { animation-delay: .07s; }
.trt > *:nth-child(3) { animation-delay: .14s; }
@keyframes trt-monte { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.trt form.carte { padding: 20px; }
.trt .intro { margin: 0; }
.trt-carte, .trt-bloc { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 18px 20px; }
.trt-tete { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line3); }
.trt-ico { width: 40px; height: 40px; flex: none; color: var(--navy); padding: 9px; border-radius: 12px; border: 1px solid var(--line); box-sizing: border-box; }
.trt-nom { margin: 0; font-size: 16px; line-height: 22px; font-weight: 500; color: var(--deep); }
.trt-sous { margin: 2px 0 0; font-size: 13px; line-height: 18px; color: var(--soft); }
.trt-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; font-size: 15px; }
.trt-ligne + .trt-ligne { border-top: 1px solid var(--line3); }
.trt-ligne > span:first-child { color: var(--soft); }
.trt-ligne strong { font-weight: 500; color: var(--deep); font-variant-numeric: tabular-nums; }
.trt-etat { display: inline-flex; align-items: center; gap: 8px; color: var(--grey); }
.trt-etat i { width: 8px; height: 8px; border-radius: 50%; background: var(--gris); }
.trt-etat.ok i { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.trt-titre { margin: 0 0 10px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.trt-note { margin: 6px 0 0; font-size: 13px; line-height: 19px; color: var(--soft); }
.trt-ok { border-color: #CFE5C6; }
.trt-ok .trt-titre { color: var(--ok-fg); }
.trt .btn { transition: transform .18s var(--courbe), background .2s ease, border-color .2s ease, opacity .2s ease; }
.trt .btn:active:not([disabled]) { transform: scale(.98); }
.trt .btn[disabled] { opacity: .45; cursor: default; }
.trt-plein { width: 100%; height: 48px; margin-top: 14px; font-size: 15px; border-radius: 12px; }
.trt-depli { overflow: hidden; }
.trt-depli-in { padding-top: 16px; }
.trt-moyens { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trt-moyens:has(> :only-child) { grid-template-columns: 1fr; }
.trt-moyen { display: grid; grid-template-columns: 18px 1fr; column-gap: 10px; align-items: center; text-align: left; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 12px;
  background: #fff; font-size: 15px; color: var(--deep); cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .18s var(--courbe); }
.trt-moyen small { grid-column: 2; font-size: 12px; line-height: 16px; color: var(--soft); }
.trt-moyen:hover { border-color: #9FB0C8; }
.trt-moyen:active { transform: scale(.98); }
.trt-rond { grid-row: 1 / span 2; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line2); position: relative; transition: border-color .2s ease; }
.trt-rond::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--navy); transform: scale(0); transition: transform .28s var(--courbe); }
.trt-moyen[aria-pressed="true"] { border-color: var(--navy); background: var(--navy-bg); }
.trt-moyen[aria-pressed="true"] .trt-rond { border-color: var(--navy); }
.trt-moyen[aria-pressed="true"] .trt-rond::after { transform: scale(1); }
.trt-tel { margin: 14px 0 0; }
.trt-tel input { width: 100%; height: 44px; font-size: 16px; }
.trt-erreur { margin: 12px 0 0; color: var(--red-fg); font-size: 14px; }
.trt-cond { margin-top: 12px; font-size: 13px; color: var(--soft); }
.trt-cond p { margin: 8px 0 0; }
.trt-attente { display: flex; align-items: center; gap: 12px; color: var(--grey); }
.trt-attente p { margin: 0; }
.trt-spin { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--navy); animation: trt-tourne .9s linear infinite; }
@keyframes trt-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .trt > * { animation: trt-fondu .2s ease both; animation-delay: 0s !important; }
  .trt .btn, .trt-moyen, .trt-rond::after { transition: none; }
  .trt-spin { animation-duration: 2.4s; }
}
@keyframes trt-fondu { from { opacity: 0; } to { opacity: 1; } }
