/* ASDR — gabarit mobile d'abord (cible : Samsung Galaxy A16, ~384 × 832 px CSS, WebView Fully Kiosk). */

:root {
  --bleu: #007898;          /* bleu ASDR assombri : texte blanc ≥ 4,5:1 (WCAG AA) */
  --bleu-logo: #009cc7;
  --vert: #007f36;
  --vert-clair: #8fbc12;
  --gris: #5f6062;
  --rouge: #c62828;
  --orange: #a85300;
  --sur-accent: #ffffff;    /* texte posé sur bleu, vert, rouge */

  --fond: #f3f6f8;
  --surface: #ffffff;
  --texte: #1c2125;
  --texte-doux: #5a6570;
  --bordure: #dde3e8;
  --ombre: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.05);

  --rayon: 14px;
  --tactile: 52px;          /* hauteur minimale d'une zone tactile (gants, une main) */
  --nav-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bleu: #4cc3e6;
    --vert: #4cc27a;
    --rouge: #ff7b72;
    --orange: #f0a04b;
    --gris: #a3afb9;
    --sur-accent: #0b1114;    /* accents clairs en mode sombre : texte foncé (≥ 8:1) */
    --fond: #11161a;
    --surface: #1b2228;
    --texte: #e8edf1;
    --texte-doux: #a3afb9;
    --bordure: #2c363e;
    --ombre: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, "Samsung Sans", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  color: var(--texte);
  background: var(--fond);
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--bordure);
}
.entete img { height: 34px; width: auto; }
.entete .logo-accueil { display: flex; align-items: center; min-height: var(--tactile); margin: -6px 0; padding: 6px 0; border-radius: 8px; }
.entete .logo-accueil:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.entete .titre { font-weight: 700; font-size: 18px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entete .qui { font-size: 14px; color: var(--texte-doux); text-align: right; line-height: 1.2; }

/* ---------- Contenu ---------- */
main {
  max-width: 560px; margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px);
}
h1 { font-size: 22px; margin: 4px 0 12px; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-doux); margin: 22px 0 8px; }
.doux { color: var(--texte-doux); }

/* ---------- Bandeau « intervention en cours » ---------- */
.en-cours {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 16px;
  border-radius: var(--rayon);
  background: var(--bleu); color: var(--sur-accent); text-decoration: none;
  box-shadow: var(--ombre);
}
.en-cours .pastille { width: 12px; height: 12px; border-radius: 50%; background: var(--sur-accent); animation: pulse 1.6s infinite; }
.en-cours .chrono { margin-left: auto; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .en-cours .pastille { animation: none; } }

/* ---------- Tuiles du menu ---------- */
.prochain { display: grid; gap: 10px; margin-bottom: 18px; }
.prochain .sous-titre { margin: 0 2px; }
.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tuile {
  display: flex; flex-direction: column; justify-content: flex-start; gap: 6px;
  min-height: 112px; padding: 16px;
  border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bordure);
  color: var(--texte); text-decoration: none; box-shadow: var(--ombre);
}
.tuile:active { transform: scale(.98); }
.tuile svg { width: 32px; height: 32px; color: var(--bleu); margin-bottom: 6px; }
.tuile .nom { font-weight: 650; font-size: 17px; }
.tuile .info { font-size: 14px; color: var(--texte-doux); }
.tuile.large { grid-column: span 2; min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; }

/* ---------- Listes (planning, patients) ---------- */
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.carte {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px;
  min-height: var(--tactile); padding: 12px 14px;
  border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bordure);
  color: var(--texte); text-decoration: none; box-shadow: var(--ombre);
}
.carte .heure { font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.carte .heure small { display: block; font-weight: 400; color: var(--texte-doux); font-size: 14px; }
.carte .patient { font-weight: 650; }
.carte .detail { font-size: 14px; color: var(--texte-doux); }
.carte.faite { opacity: .6; }
.carte.actuelle { border: 2px solid var(--vert); }
.etiquette { font-size: 13px; font-weight: 650; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.etiquette.soins { background: rgba(0,135,173,.12); color: var(--bleu); }
.etiquette.aide { background: rgba(143,188,18,.18); color: #4d6b00; }
@media (prefers-color-scheme: dark) { .etiquette.aide { color: var(--vert-clair); } }

/* ---------- Formulaires ---------- */
.champ { display: grid; gap: 6px; margin-bottom: 16px; }
.champ label { font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=time], textarea, select {
  width: 100%; min-height: var(--tactile); padding: 12px 14px;
  font: inherit; color: var(--texte); background: var(--surface);
  border: 1.5px solid var(--bordure); border-radius: 12px;
}
input:focus, textarea:focus, select:focus { outline: 3px solid color-mix(in srgb, var(--bleu) 35%, transparent); border-color: var(--bleu); }
.case { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.case input { width: 24px; height: 24px; accent-color: var(--bleu); }

.bouton {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: var(--tactile); padding: 12px 18px;
  font: inherit; font-weight: 700; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--bleu); color: var(--sur-accent); text-decoration: none;
}
/* Bouton principal : bleu du site (Nicolas, 23.11.2026 : pas de gros boutons verts à côté du bleu). */
.bouton.secondaire { background: var(--surface); color: var(--bleu); border: 1.5px solid var(--bordure); }
.bouton:active { filter: brightness(.92); }

.alerte { padding: 12px 14px; border-radius: 12px; background: rgba(198,40,40,.1); color: var(--rouge); margin-bottom: 16px; }
.maquette { font-size: 13px; text-align: center; color: var(--texte-doux); margin-top: 24px; }

/* ---------- Barre de navigation du bas (pouce) ---------- */
.nav-bas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 0 max(0px, calc((100% - 560px) / 2)) env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--bordure);
}
.nav-bas a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--texte-doux); text-decoration: none; font-size: 12.5px; font-weight: 600;
}
.nav-bas a svg { width: 26px; height: 26px; }
.nav-bas a[aria-current=page] { color: var(--bleu); }

/* ---------- Connexion ---------- */
.connexion { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px 20px; max-width: 420px; margin: 0 auto; }
.connexion .logo { width: 150px; margin: 0 auto 24px; display: block; }

/* ---------- Intervention ---------- */
.bandeau-patient {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 16px;
  border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bordure); box-shadow: var(--ombre);
}
.bandeau-patient > div { flex: 1; min-width: 0; }
.bandeau-patient .patient { font-weight: 700; font-size: 18px; }
.bandeau-patient .detail { font-size: 14px; color: var(--texte-doux); }
.bouton.petit { width: auto; min-height: 44px; padding: 8px 14px; font-size: 15px; }
.bouton.grand { min-height: 60px; font-size: 19px; }

.carte-bloc { padding: 4px 14px; margin-bottom: 16px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bordure); }
.ligne-info { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bordure); }
.ligne-info:last-child { border-bottom: 0; }
.ligne-info strong { text-align: right; white-space: nowrap; }

.chrono-grand { display: flex; flex-direction: column; align-items: center; padding: 8px 0 4px; }
.chrono-grand .chrono { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--vert); line-height: 1.1; }

.choix { display: grid; gap: 8px; }
.choix-case {
  display: flex; align-items: center; gap: 12px;
  min-height: var(--tactile); padding: 10px 14px;
  border-radius: 12px; background: var(--surface); border: 1.5px solid var(--bordure); cursor: pointer;
}
.choix-case input { width: 24px; height: 24px; flex: none; accent-color: var(--bleu); }
.choix-case.aide input { accent-color: var(--vert); }
.choix-case .libelle { flex: 1; }
.choix-case .minutes { font-size: 14px; color: var(--texte-doux); white-space: nowrap; }
.choix-case:has(input:checked) { border-color: var(--bleu); background: color-mix(in srgb, var(--bleu) 8%, var(--surface)); }
.choix-case.aide:has(input:checked) { border-color: var(--vert); background: color-mix(in srgb, var(--vert) 8%, var(--surface)); }

/* Barre d'action au-dessus de la navigation, à portée du pouce */
.action-bas {
  position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); z-index: 5;
  margin-top: 20px; padding: 8px 0;
  background: linear-gradient(transparent, var(--fond) 30%);
}
.action-bas.deux { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }

.succes { text-align: center; padding: 24px 0 8px; }
.succes svg { width: 72px; height: 72px; color: var(--vert); }
.succes h1 { margin: 8px 0 4px; }

/* Prestation de base (liste dépliable) et minutes des autres prestations */
.choix-base { margin-bottom: 4px; }
.choix-base summary { list-style: none; }
.choix-base summary::-webkit-details-marker { display: none; }
.choix-base .choisie { border-color: var(--bleu); }
.choix-base .lien { color: var(--bleu); font-weight: 650; font-size: 15px; }
.choix-base[open] .choisie { margin-bottom: 8px; }
.sous-titre { font-size: 13px; font-weight: 700; color: var(--texte-doux); margin: 8px 2px 0; text-transform: uppercase; letter-spacing: .03em; }
.petit-texte { font-size: 14px; margin: 6px 2px 0; }
.avec-minutes { cursor: default; }
.pas-a-pas { display: flex; align-items: center; gap: 6px; }
.pas-a-pas button {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--bordure);
  background: var(--surface); color: var(--bleu); font: 700 22px/1 system-ui; cursor: pointer;
}
.pas-a-pas button:active { background: var(--fond); }
.pas-a-pas output { min-width: 28px; text-align: center; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.pas-a-pas .unite { font-size: 13px; color: var(--texte-doux); margin-left: -4px; }
.ligne-info.total { font-size: 18px; }

/* --- Données réelles : planning, heures, session --- */
.entete details.qui { position: relative; }
.entete details.qui summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
.entete details.qui summary::-webkit-details-marker { display: none; }
.entete details.qui summary span { font-size: 13px; }
.entete details.qui form { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--bordure); border-radius: 12px; padding: 8px; box-shadow: var(--ombre); z-index: 20; }
.carte.coupure { background: transparent; box-shadow: none; border: 1px dashed var(--bordure); opacity: .75; }
/* Tasse de la pause : même largeur que l'étiquette « Soins », centrée sous les étiquettes des visites. */
.etiquette.pause { display: inline-block; min-width: 58px; text-align: center; font-size: 20px; line-height: 1; padding: 0; background: none; }
.carte[aria-disabled="true"] { cursor: default; }
.etiquette.absent { background: rgba(184,92,0,.14); color: var(--orange); }
.vide { text-align: center; padding: 28px 12px; }
.vide p { margin: 4px 0; }
.choix-jour { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.choix-jour strong { font-size: 18px; }
.choix-jour .bouton { min-width: 52px; font-size: 22px; }
.bouton.inactif { opacity: .35; pointer-events: none; }
h2 small { font-weight: 500; font-size: 15px; }

/* --- Espace famille (maquette) --- */
.famille .intro { margin: 0 0 16px; color: var(--texte-doux); }
.famille .carte { grid-template-columns: 78px 1fr auto; }
.famille .entete .qui span { font-weight: 650; color: var(--texte); }
input[type=date] { width: 100%; min-height: var(--tactile); padding: 12px 14px; font: inherit; color: var(--texte); background: var(--surface); border: 1.5px solid var(--bordure); border-radius: 12px; }
.succes-texte { color: var(--vert); font-weight: 600; margin: 12px 2px 0; }
.famille form.carte-bloc { padding: 16px 14px; }
.famille .nav-bas { grid-template-columns: repeat(3, 1fr); }

/* --- Patients et dossier --- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
input[type=search] { width: 100%; min-height: var(--tactile); padding: 12px 14px; font: inherit; color: var(--texte); background: var(--surface); border: 1.5px solid var(--bordure); border-radius: 12px; }
.carte.carte-patient { grid-template-columns: 1fr auto; }
.droite { text-align: right; }
.ligne-info.bloc { display: grid; gap: 2px; justify-content: stretch; }
.tableau-medic { padding: 4px 10px; }
.ligne-medic { display: grid; grid-template-columns: 1fr repeat(4, 44px); gap: 4px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--bordure); text-align: center; font-variant-numeric: tabular-nums; }
.ligne-medic:last-child { border-bottom: 0; }
.ligne-medic > :first-child { text-align: left; }
.entete-medic { font-size: 13px; color: var(--texte-doux); font-weight: 650; padding: 6px 0; }
.note { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 12px 14px; }
.note-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.note-texte { white-space: pre-wrap; margin-bottom: 4px; }

/* --- Intervention réelle --- */
.info-ok { padding: 12px 14px; border-radius: 12px; background: rgba(0,145,58,.1); color: var(--vert); margin-bottom: 16px; font-weight: 600; }
.modifier-debut { margin: -4px 0 12px; }
.modifier-debut summary { color: var(--bleu); font-weight: 600; min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.ligne-form { display: flex; gap: 10px; align-items: center; }
.ligne-form input { flex: 1; }
.autre-ligne { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.autre-ligne select { min-height: 48px; padding: 8px 10px; }
.retirer { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--bordure); background: var(--surface); color: var(--texte-doux); font-size: 22px; line-height: 1; cursor: pointer; }
.grille-moments { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cible-saisie { padding: 10px 14px; }
.cible-saisie summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.question-fin { padding: 14px; margin-bottom: 16px; border-radius: var(--rayon); background: rgba(184,92,0,.10); border: 1.5px solid rgba(184,92,0,.35); }
.question-fin p { margin: 0 0 10px; }
.question-fin label { display: block; font-weight: 650; margin-bottom: 6px; }
.question-fin input[type=time] { width: 100%; }
.en-cours.pause { background: var(--orange); }
.centre { text-align: center; }
.icone-pause { width: 56px; height: 56px; color: var(--bleu); }

/* --- Médicaments --- */
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grille-quantites { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grille-quantites .champ { margin-bottom: 4px; }
.grille-quantites input { text-align: center; padding: 10px 4px; }
.grille-quantites label { font-size: 14px; }
input[type=date] { width: 100%; }
a.ligne-medic, a.ligne-info { color: inherit; text-decoration: none; }
.modifiable { cursor: pointer; }
.modifiable:active { background: color-mix(in srgb, var(--bleu) 8%, transparent); }
.texte-alerte { color: var(--rouge); }
.bouton.danger { background: var(--rouge); }
.supprimer-medic { margin-top: 24px; }
.supprimer-medic summary, .historique summary { color: var(--texte-doux); font-weight: 600; min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.historique { margin-top: 20px; }
.titre-lien { display: flex; justify-content: space-between; align-items: baseline; } .titre-lien a { text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--bleu); font-weight: 650; }
input[type=tel], input[type=email] { width: 100%; min-height: var(--tactile); padding: 12px 14px; font: inherit; color: var(--texte); background: var(--surface); border: 1.5px solid var(--bordure); border-radius: 12px; }
.lien-discret { color: var(--bleu); font-weight: 600; text-decoration: none; }

/* --- Lecteur PDF et documents --- */
.lecteur-barre { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.lecteur-titre { font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.lecteur-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.lecteur-actions form { margin: 0; }
.pdf-pages { display: grid; gap: 12px; justify-items: center; }
.pdf-pages canvas { max-width: 100%; height: auto; background: #fff; box-shadow: var(--ombre); border: 1px solid var(--bordure); }
.doc-nouveau { font-size: 12px; font-weight: 700; color: var(--sur-accent); background: var(--bleu); border-radius: 999px; padding: 2px 8px; }
@media print {
  .entete, .nav-bas, .lecteur-barre, .lecteur-actions, .maquette, .info-ok, .lecteur-pdf > p { display: none !important; }
  main { padding: 0; max-width: none; }
  .pdf-pages { gap: 0; }
  .pdf-pages canvas { box-shadow: none; border: 0; width: 100% !important; page-break-after: always; }
}
.ligne-modif { flex-wrap: wrap; align-items: center; } .case.petite { min-height: 36px; font-size: 14px; gap: 6px; } .case.petite input { width: 20px; height: 20px; }

/* --- Notes et photos --- */
.zone-photo { display: grid; place-items: center; min-height: 220px; border: 2px dashed var(--bordure); border-radius: var(--rayon); background: var(--surface); cursor: pointer; overflow: hidden; margin-bottom: 8px; }
.zone-photo input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.zone-photo span { display: grid; justify-items: center; gap: 8px; color: var(--bleu); }
.zone-photo svg { width: 48px; height: 48px; }
.zone-photo img { width: 100%; height: auto; display: block; }
.photo-note img { display: block; max-width: 100%; border-radius: 10px; margin: 6px 0; }
.note-actions { display: flex; gap: 16px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.note-actions details summary { list-style: none; cursor: pointer; }
.note-actions form { margin-top: 8px; }
.zone-photo [hidden] { display: none !important; }
.bouton:disabled, .bouton[disabled] { opacity: .45; cursor: not-allowed; }
.choix-case.desactive { opacity: .55; }
.carte.ne-pas-passer { background: rgba(184,92,0,.10); border: 2px solid rgba(184,92,0,.45); }
.remarque-absence { color: var(--orange); font-weight: 600; }

/* --- Constantes --- */
.form-constantes { padding: 14px; }
.grille-constantes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.grille-constantes input { width: 100%; min-height: var(--tactile); padding: 10px 12px; font: inherit; font-size: 18px; color: var(--texte); background: var(--surface); border: 1.5px solid var(--bordure); border-radius: 12px; }
.grille-constantes label { font-size: 14px; }
.moments-glycemie { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.historique-constante { padding: 8px 14px; }
.historique-constante summary { min-height: 44px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; cursor: pointer; }

/* Changements de traitement (arrêtés, fin proche, nouveaux, à venir) : bien visibles avant de donner les médicaments. */
.changements-medic { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--rayon); background: rgba(184,92,0,.10); border: 1.5px solid rgba(184,92,0,.40); }
.changements-medic > strong { color: var(--orange); }
.changements-medic ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.changements-medic li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; }
.changements-medic .nom { font-weight: 650; }
.changements-medic .quand { font-size: 15px; color: var(--texte-doux); }
.changements-medic li.arrete .nom { text-decoration: line-through; }
.changements-medic li.arrete .quand { color: var(--rouge); font-weight: 650; }
.changements-medic li.finproche .quand, .changements-medic li.commence .quand { color: var(--orange); font-weight: 650; }
.etiquette.fin-proche { margin-left: 6px; background: rgba(184,92,0,.14); color: var(--orange); }
.etiquette.nouveau { margin-left: 6px; background: rgba(0,127,54,.12); color: var(--vert); }

/* Connexion de développement */
.dev-choix { width: 100%; text-align: left; font: inherit; cursor: pointer; }
@media (min-width: 900px) { body:has(.dev-groupe) main { max-width: 1100px; } }
.dev-filtres { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; margin-bottom: 12px; }
.dev-filtres .champ { flex: 1 1 260px; margin: 0; }
.dev-filtres .bouton { width: auto; min-height: 44px; padding: 8px 16px; }
.dev-case { display: flex; gap: 8px; align-items: center; min-height: 44px; }
.dev-case input { width: 20px; height: 20px; }
.dev-categories { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.dev-puce { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--bordure); background: var(--surface); color: var(--texte); text-decoration: none; font-size: 14px; }
.dev-puce span { color: var(--texte-doux); font-variant-numeric: tabular-nums; }
.dev-puce[aria-current="true"] { background: var(--bleu); border-color: var(--bleu); color: var(--sur-accent); }
.dev-puce[aria-current="true"] span { color: var(--sur-accent); }
.dev-groupe { margin: 18px 0; }
.dev-groupe h2 { font-size: 16px; margin: 0 0 6px; }
/* Liste de la connexion de test : une carte par collaborateur, deux lignes, toute la carte est cliquable (téléphone compris). */
.dev-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 900px) { .dev-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dev-liste form { margin: 0; }
.dev-carte { display: grid; gap: 4px; width: 100%; min-height: var(--tactile); padding: 10px 14px; text-align: left; font: inherit; color: var(--texte);
             background: var(--surface); border: 1px solid var(--bordure); border-radius: 12px; cursor: pointer; }
.dev-carte:hover, .dev-carte:focus-visible { border-color: var(--bleu); }
.dev-ligne1 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dev-ligne1 strong { font-size: 16px; overflow-wrap: anywhere; }
.dev-entrer { flex: none; color: var(--bleu); font-weight: 650; font-size: 14px; }
.dev-ligne2 { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; color: var(--texte-doux); font-variant-numeric: tabular-nums; }
.bandeau-dev { padding: 6px 16px; text-align: center; font-size: 14px; font-weight: 600; background: #7a1fa2; color: #fff; }
.bandeau-dev a { color: #fff; }

/* --- Proches aidants : un seul écran, gros boutons, lisible par tous --- */
.aidant-patients { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.aidant-qui { margin: 0 0 8px; font-size: 18px; }
.aidant-vues { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 12px; }
.aidant-taches { gap: 10px; }
.aidant-tache { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; scroll-margin-top: 80px; }
.aidant-tache.fait { background: rgba(0,127,54,.08); }
.aidant-texte { display: grid; gap: 3px; min-width: 0; font-size: 18px; }
.aidant-texte .doux { font-size: 15px; }
.aidant-action { display: grid; justify-items: end; gap: 6px; flex-shrink: 0; text-align: right; }
.aidant-action form { margin: 0; }
.aidant-fait { min-width: 110px; font-size: 18px; }
.aidant-coche { color: var(--vert); font-weight: 700; font-size: 18px; white-space: nowrap; }
.aidant-note textarea { width: 100%; min-height: 140px; padding: 10px 12px; font: inherit; font-size: 17px; color: var(--texte); background: var(--surface); border: 1.5px solid var(--bordure); border-radius: 12px; margin-bottom: 6px; line-height: 1.5; }
/* Pas la grille des cartes du planning (colonne de 64 px) : la note prend toute la largeur. */
.aidant-note { display: block; padding: 14px; }
.aidant-semaine { overflow-x: auto; margin: 0 0 10px; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); }
.aidant-semaine table { border-collapse: collapse; width: 100%; min-width: 760px; }
.aidant-semaine th, .aidant-semaine td { padding: 8px; border-bottom: 1px solid var(--bordure); text-align: center; vertical-align: middle; }
.aidant-semaine tbody th { text-align: left; font-weight: 600; min-width: 200px; }
.aidant-semaine thead a { color: var(--bleu); font-weight: 650; text-decoration: none; }
.aidant-semaine .aujourdhui { background: rgba(0,120,152,.08); }
.aidant-semaine td form { margin: 4px 0 0; }
@media (min-width: 900px) { body:has(.aidant-semaine) main { max-width: 1100px; } }

/* Mention de l'organisation sous la connexion (Hoparem : distribué par Devecom). */
.mention-org { text-align: center; font-size: 13px; margin-top: 14px; }

/* --- Téléphone : numéro lisible + bouton d'appel --- */
.tel { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tactile); color: var(--texte); text-decoration: none; white-space: nowrap; }
.tel-numero { font-variant-numeric: tabular-nums; font-weight: 600; }
.tel-bouton { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bleu); color: var(--sur-accent); flex: none; }
.tel-bouton svg { width: 20px; height: 20px; }
.tel:hover .tel-bouton, .tel:focus-visible .tel-bouton { filter: brightness(1.1); }
.tel:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; border-radius: 26px; }
.bandeau-patient .tel-numero { font-size: 14px; }

/* --- Cibles : D Données, A Actions, R Résultats --- */
.cible-saisie summary { justify-content: space-between; gap: 10px; }
.cible-dar { display: inline-flex; gap: 4px; flex: none; }
.cible-dar span, .dar-lettre {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; font-size: 13px; font-weight: 800; color: var(--sur-accent);
}
.cible-dar span:nth-child(1), .dar-d .dar-lettre { background: var(--bleu); }
.cible-dar span:nth-child(2), .dar-a .dar-lettre { background: var(--gris); }
.cible-dar span:nth-child(3), .dar-r .dar-lettre { background: var(--orange); }
.champ.dar { border-left: 4px solid var(--bordure); padding-left: 10px; margin-top: 12px; }
.champ.dar-d { border-left-color: var(--bleu); }
.champ.dar-a { border-left-color: var(--gris); }
.champ.dar-r { border-left-color: var(--orange); }
.champ.dar label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.champ.dar small { display: block; margin: 2px 0 6px; }
.champ.dar textarea::placeholder { color: var(--texte-doux); opacity: .8; font-style: italic; }

/* --- Gestion des cibles --- */
.bouton.rouge { background: var(--rouge); color: var(--sur-accent); }
.groupes-cible { border: 1px solid var(--bordure); margin: 12px 0; }
.groupes-cible legend { font-weight: 700; padding: 0 6px; }
.groupe-ligne { display: flex; align-items: center; gap: 12px; min-height: var(--tactile); border-bottom: 1px solid var(--bordure); cursor: pointer; }
.groupe-ligne:last-child { border-bottom: 0; }
.groupe-ligne input { width: 24px; height: 24px; flex: none; }
.cible-ligne { align-items: center; }
.cible-ligne form { margin: 0; }
details.confirmer { flex: none; text-align: right; }
details.confirmer summary { list-style: none; cursor: pointer; }
details.confirmer summary::-webkit-details-marker { display: none; }
details.confirmer[open] summary { display: none; }
.cibles-terminees { margin-top: 16px; }
.cibles-terminees summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }

/* --- Pastilles des documents et communications obligatoires --- */
.compteur { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--bleu); color: var(--sur-accent); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.compteur.urgent { background: var(--rouge); }
.pastille-docs { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--bleu); flex: none; }
.pastille-docs svg { width: 26px; height: 26px; }
.pastille-docs .compteur { position: absolute; top: 0; right: -2px; min-width: 20px; height: 20px; font-size: 12px; box-shadow: 0 0 0 2px var(--surface); }
.tuile-docs { position: relative; }
.tuile-compteur { position: absolute; top: 12px; right: 12px; }
.rappel-obligatoire { display: grid; gap: 2px; padding: 12px 14px; margin-bottom: 16px; border-radius: 12px; border: 1.5px solid var(--rouge); background: color-mix(in srgb, var(--rouge) 8%, var(--surface)); color: var(--texte); text-decoration: none; }
.rappel-obligatoire strong { color: var(--rouge); }
.rappel-obligatoire span { font-size: 14px; color: var(--texte-doux); }
.docs-obligatoires h2 { display: flex; align-items: center; gap: 8px; }
.historique summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.doc-nouveau.urgent { background: var(--rouge); }
.doc-lu { color: var(--vert); font-weight: 600; }
.confirmer-lecture { margin-top: 16px; padding: 14px; border-radius: var(--rayon); background: var(--surface); border: 1.5px solid var(--rouge); display: grid; gap: 10px; }
.confirmer-lecture p { margin: 0; }

/* --- Remarque du bureau sur une intervention refusée ou corrigée --- */
.remarque-bureau { margin: 4px 0 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bleu) 7%, var(--surface)); border-left: 4px solid var(--bleu); display: grid; gap: 4px; }
.remarque-bureau.refus { background: color-mix(in srgb, var(--rouge) 7%, var(--surface)); border-left-color: var(--rouge); }
.remarque-bureau p { margin: 0; }
.remarque-auteur { font-size: 13px; color: var(--texte-doux); }
.remarque-texte { white-space: pre-line; }

/* --- Espace cadre --- */
.onglets { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--bordure); }
.onglets a { padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; color: var(--texte-doux); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.onglets a[aria-current="page"] { color: var(--bleu); border-bottom-color: var(--bleu); }
.decision { padding: 12px 14px; display: grid; gap: 10px; }
.decision-tete { display: grid; gap: 2px; }
.decision-note { margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--fond); white-space: pre-line; }
.decision-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.decision-actions > form { margin: 0; }
.decision-plus { flex: 1 1 100%; }
.decision-plus > summary { list-style: none; display: inline-flex; cursor: pointer; }
.decision-plus > summary::-webkit-details-marker { display: none; }
.decision-plus[open] > summary { margin-bottom: 10px; }
.decision-actions .decision-plus { flex: 0 1 auto; }
.decision-actions .decision-plus[open] { flex: 1 1 100%; }
.deux-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choix-decision { border: 0; padding: 0; margin: 0 0 8px; }
.choix-decision legend { font-weight: 700; margin-bottom: 4px; }
.mois-titre { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 28px; }
.mois-titre span:first-child::first-letter { text-transform: uppercase; }
.mois-nav { display: inline-flex; gap: 6px; }

/* --- Vacances et heures sup. --- */
.solde-chiffre { font-size: 22px; font-variant-numeric: tabular-nums; }
.ligne-info strong.moins { color: var(--rouge); font-variant-numeric: tabular-nums; }
.ligne-info strong.plus { color: var(--texte); font-variant-numeric: tabular-nums; }
.ligne-info.futur { opacity: .7; }
.choix-annee { display: flex; gap: 8px; margin: 12px 0 4px; }
.choix-annee a[aria-current="page"] { background: var(--bleu); color: var(--sur-accent); border-color: var(--bleu); }

/* --- Itinéraire vers le patient (ouvre le GPS du téléphone) --- */
.itineraire { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 2px; color: var(--bleu); font-weight: 600; text-decoration: none; }
.itineraire svg { width: 18px; height: 18px; }

/* Planification du patient : mes passages en évidence */
.passage.moi { border-left: 3px solid var(--bleu, #1e6fd9); padding-left: 8px; }

/* Ligne entière cliquable (listes de l'espace cadre) */
.lien-ligne { color: inherit; text-decoration: none; }
.lien-ligne:hover strong, .lien-ligne:focus-visible strong { text-decoration: underline; }
.alerte-texte { color: var(--rouge, #b3261e); }

/* Temps en attente de validation par un cadre : en italique, étiquette orange, hors du total (Nicolas, 23.11.2026) */
.etiquette.non-valide { margin-left: 8px; font-style: normal; background: rgba(184,92,0,.14); color: var(--orange); vertical-align: middle; }
h2.en-attente, .carte-bloc.en-attente .ligne-info span, .carte-bloc.en-attente .ligne-info strong { font-style: italic; }
.carte-bloc.en-attente { border-left: 4px solid var(--orange); }
.ligne-info.en-attente, .texte-attente { color: var(--orange); font-style: italic; }

/* Intervention refusée par le bureau : en italique, barrée, étiquette rouge « Refusé », hors du total (Nicolas, 23.11.2026).
   La remarque du bureau reste lisible (non barrée). */
.etiquette.refuse { margin-left: 8px; font-style: normal; text-decoration: none; background: rgba(198,40,40,.12); color: var(--rouge); vertical-align: middle; display: inline-block; }
h2.refusee, .carte-bloc.refusee > .ligne-info > span:not(.etiquette), .carte-bloc.refusee > .ligne-info > strong { font-style: italic; text-decoration: line-through; }
h2.refusee small { text-decoration: line-through; }
.carte-bloc.refusee { border-left: 4px solid var(--rouge); }
.ligne-info.refusee { color: var(--rouge); font-style: italic; }

/* Pause en cours : le début d'une prestation est remplacé par ce bloc (Nicolas, 23.11.2026). */
.pause-bloque { margin-top: 16px; padding: 14px 16px; border-radius: var(--rayon); border: 1px solid var(--orange); border-left-width: 5px; background: var(--surface); }
.pause-bloque p { margin: 0 0 6px; }
.pause-bloque .bouton { margin-top: 8px; }

/* Liste des patients : sexe et place de parc (icône IMG_Parking de l'ancien site), à droite. */
.icones-patient { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; margin-right: 6px; }
.icone-sexe { width: 18px; height: 18px; }
.icone-sexe.homme { color: #2f6fb3; }
.icone-sexe.femme { color: #b8457a; }
.icone-parking { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; background: #1f5fbf; color: #fff; font-size: 13px; font-weight: 800; line-height: 1; }
@media (prefers-color-scheme: dark) { .icone-sexe.homme { color: #7fb2ea; } .icone-sexe.femme { color: #e58bb4; } }
/* Secteur / sous-secteur de planification du patient, au-dessus des icônes, aligné à droite. */
.secteur-patient { display: block; font-size: 12px; color: var(--texte-doux); text-align: right; white-space: nowrap; margin-bottom: 2px; }
