/* Habillage de Pelote (leçon 11).
   Couleurs, police et logo de pelote.vet, repris de la maquette A du 21 octobre 2026.
   Une seule feuille pour tout le site, chargée par base.html. */

/* ---------- 1. La police Outfit, servie par Pelote lui-même (licence SIL OFL) ---------- */

@font-face {
  font-family: "Outfit";
  font-weight: 300 800;
  font-display: swap;
  src: url("polices/outfit-300-800-latin.98ccc2b7f189.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Outfit";
  font-weight: 300 800;
  font-display: swap;
  src: url("polices/outfit-300-800-latin-ext.e2b64ddcb351.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- 2. Les couleurs, nommées une fois ---------- */

:root {
  /* Fond blanc, rose réservé à la navigation et aux accents (14 novembre 2026, d'après la
     maquette Figma) : sur du blanc, le rouge de l'allergie, l'orange des rappels et les
     couleurs des cliniques ressortent ; sur du rose, ils se battaient avec le fond. */
  --fond: #ffffff;
  --fond-doux: #fae8f0;
  /* Deux tons (14 novembre 2026) : la barre latérale en rose pâle ; la barre du haut plus claire,
     du même rose que la case « Un animal devant vous ? » de l'accueil */
  --barre: #fcecf4;
  --barre-haut: #fdf5f9;
  --carte: #ffffff;
  --encre: #3a2a33;
  --discret: #7a6672;
  --trait: #eee1e8;
  --rose: #d9548f;
  --rose-fonce: #9e4d72;
  --prune: #7d365a;
  --ok: #2f7f6f;
  --ok-fond: #e6f3f0;
  --erreur: #b42318;
  --erreur-fond: #fef3f2;
  --attention: #8a4b00;
  --attention-fond: #fff4e5;
  --ombre: 0 1px 2px rgb(58 42 51 / .06), 0 4px 14px rgb(58 42 51 / .06);
  --arrondi: 16px;
}

/* ---------- 3. La base ---------- */

* { box-sizing: border-box; }

/* La place de la barre de défilement est toujours réservée : une page courte et une page longue
   ont la même largeur, rien ne se décale quand on change d'onglet dans un dossier */
html { scrollbar-gutter: stable; }

body {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--encre);
  background: var(--fond);
}

a { color: var(--rose-fonce); }
h1, h2, h3 { color: var(--prune); line-height: 1.2; margin: 0 0 8px; }
h1 { font-size: 28px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .04em; }

.conteneur { max-width: 960px; margin: 0 auto; padding: 0 16px; }
main.conteneur { padding-top: 28px; padding-bottom: 48px; }
.discret { color: var(--discret); font-size: 14px; }

/* ---------- 4. L'en-tête ---------- */

.entete { background: var(--carte); border-bottom: 1px solid var(--trait); }
.entete .conteneur { display: flex; align-items: center; gap: 20px; min-height: 64px; max-width: 1120px; }

.marque {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 22px; color: var(--prune); text-decoration: none;
}
.marque img { height: 32px; width: auto; }

.entete nav { display: flex; gap: 2px; }
.entete nav a {
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
  color: var(--discret); font-weight: 500; text-decoration: none;
}
.entete nav a:hover, .entete nav a.actif { background: var(--fond-doux); color: var(--prune); }

/* ---------- 4 bis. Le véto : barre latérale et barre du haut (14 novembre 2026) ---------- */

.app { position: relative; display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.app-contenu { min-width: 0; }
.barre-laterale {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px;
  padding: 20px 12px; background: var(--barre); border-right: 1px solid var(--trait);
}
.barre-laterale .marque { padding: 0 10px; }
.barre-laterale nav { display: flex; flex-direction: column; gap: 4px; }
.barre-laterale nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--encre); font-weight: 500; text-decoration: none; white-space: nowrap;
}
.barre-laterale nav a:hover { background: rgb(255 255 255 / .65); color: var(--prune); }
.barre-laterale nav a.actif { background: var(--carte); color: var(--prune); font-weight: 600; box-shadow: var(--ombre); }
.barre-laterale nav a:focus-visible { outline: 2px solid var(--rose); outline-offset: 1px; }
.barre-laterale svg, .recherche-entete svg {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.barre-laterale .compteur { margin-left: auto; }

/* La barre du haut, d'un rose plus clair que la latérale : la fine ligne entre les deux rend l'écart voulu */
.barre-haut {
  display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 0 32px;
  background: var(--barre-haut); border-bottom: 1px solid var(--trait);
}
.barre-haut .compte .qui small { color: var(--rose-fonce); }
/* Le véto travaille sur grand écran : les pages prennent toute la largeur, jusqu'à 1600 px,
   calées à gauche contre la barre latérale (la convention des logiciels métier) */
.app-contenu main.conteneur { max-width: 1600px; margin: 0; padding: 28px 40px 48px; }

/* Chercher un animal : dans la barre du haut, et en grand sur l'accueil */
.recherche-entete { position: relative; flex: 0 1 26rem; margin: 0; color: var(--discret); }
.recherche-entete svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; }
.barre-haut form.recherche-entete input:not([type="hidden"]) {
  width: 100%; padding: 9px 14px 9px 38px; border-radius: 10px; font-size: 14px;
  background: var(--carte); border: 1px solid var(--trait);
}

.compte { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.compte .bouton { white-space: nowrap; }
.compte .qui { text-align: right; font-weight: 600; line-height: 1.2; }
.compte .qui small { display: block; font-weight: 400; color: var(--discret); }
.compte form { margin: 0; }

/* ---------- 5. Les cartes et les étiquettes ---------- */

.carte {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--arrondi);
  box-shadow: var(--ombre);
  padding: 20px;
  margin-bottom: 16px;
}
.carte.etroite { max-width: 460px; }

.etiquette {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--fond-doux); color: var(--prune); font-size: 13px; font-weight: 500;
}
.etiquette.ok { background: var(--ok-fond); color: var(--ok); }

/* ---------- 6. Les boutons ---------- */

.bouton {
  display: inline-block; padding: 10px 18px; border-radius: 10px;
  font: inherit; font-weight: 600; text-decoration: none; text-align: center;
  border: 1px solid transparent; cursor: pointer;
}
.bouton.principal { background: var(--prune); color: #fff; }
.bouton.second { background: var(--carte); color: var(--prune); border-color: var(--trait); }
.bouton.petit { padding: 6px 12px; font-size: 14px; }
.bouton:hover { filter: brightness(.95); }
.boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- 7. Les formulaires, tels que Django les écrit avec form.as_p ---------- */

form p { margin: 0 0 16px; }
form label { display: block; font-weight: 600; margin-bottom: 4px; }
form input:not([type="hidden"]), form textarea, form select {
  width: 100%; padding: 10px 12px;
  font: inherit; color: var(--encre);
  background: var(--carte); border: 1px solid var(--trait); border-radius: 10px;
}
form textarea { min-height: 160px; resize: vertical; }
form input:focus, form textarea:focus { outline: 2px solid var(--rose); outline-offset: 1px; border-color: transparent; }

/* Le bandeau qui rappelle qu'une proposition de l'IA doit être relue (leçon 13) */
.avertissement {
  background: var(--fond-doux); border-left: 4px solid var(--rose);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 20px;
}

/* Les messages d'erreur : Django les met dans <ul class="errorlist"> */
.errorlist {
  list-style: none; margin: 0 0 8px; padding: 8px 12px;
  background: var(--erreur-fond); color: var(--erreur); border-radius: 10px; font-size: 14px;
}

/* ---------- 8. Le dossier d'un animal ---------- */

.animal { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 20px; margin-bottom: 24px; }
.animal .avatar {
  display: grid; place-items: center; flex: none;
  width: 64px; height: 64px; border-radius: 18px;
  background: var(--fond-doux); color: var(--prune); font-size: 28px; font-weight: 700;
}
.animal .identite { flex: 1; min-width: 200px; }
.animal .identite h1 { margin-bottom: 6px; }
.animal .etiquettes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }

.consultation { display: grid; grid-template-columns: 110px 1fr; gap: 4px 20px; padding: 16px 0; }
.consultation + .consultation { border-top: 1px dashed var(--trait); }
.consultation .quand { font-weight: 700; }
.consultation .qui { color: var(--rose-fonce); font-weight: 500; font-size: 14px; margin-bottom: 6px; }
.consultation .contenu { display: grid; grid-template-columns: 100px 1fr; gap: 4px 12px; margin: 6px 0; }
.consultation .contenu dt { font-weight: 600; font-size: 14px; }
.consultation .contenu dd { margin: 0; }
.origine { margin-top: 8px; font-size: 14px; }
.ligne-jeton { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
.ligne-jeton + .ligne-jeton { border-top: 1px dashed var(--trait); }
code.jeton { word-break: break-all; }
.origine summary { cursor: pointer; color: var(--rose-fonce); }

/* ---------- 8 bis. Le dossier organisé (repris du premier prototype, 14 novembre 2026) ---------- */

.animal .avatar svg { width: 40px; height: 40px; }
.bandeau .animal { margin-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Le petit menu « ••• » : un <details> qui s'ouvre au clic, sans JavaScript */
.menu { position: relative; }
.menu summary { list-style: none; padding-left: 14px; padding-right: 14px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-liste {
  position: absolute; right: 0; z-index: 10; margin-top: 6px; width: 250px;
  background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; box-shadow: var(--ombre); padding: 6px;
}
.menu-liste a { display: block; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--encre); }
.menu-liste a:hover { background: var(--fond-doux); }

.bandeau { padding: 16px 20px; margin-bottom: 14px; }
.bandeau h1 { margin-bottom: 4px; }
.bandeau .identite p { margin-bottom: 4px; }
.bandeau-allergie, .bandeau-rappel {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 10px;
  margin: 10px 0 0; padding: 6px 14px; border-radius: 10px; font-size: 15px;
}
.bandeau-allergie { background: var(--erreur-fond); color: var(--erreur); border: 1px solid #f5c6c2; }
.bandeau-allergie svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.bandeau-rappel { background: var(--attention-fond); color: var(--attention); border: 1px solid #f3d9a4; margin-top: 6px; }

/* « À traiter » : une bande de pastilles, chacune mène au bon onglet */
.a-traiter {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  margin: -6px 0 12px; padding: 8px 14px; border-radius: 12px;
  background: var(--carte); border: 1px solid var(--trait); border-left: 4px solid var(--rose);
}
.a-traiter strong { color: var(--prune); font-size: 14px; margin-right: 2px; }
.a-traiter a.pastille { text-decoration: none; font-size: 13px; padding: 2px 10px; }
.a-traiter a.pastille:hover { background: var(--attention); color: #fff; }

/* L'essentiel : quatre tuiles d'une ligne, deux par ligne sur téléphone */
.essentiel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.tuile-essentiel {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; padding: 8px 12px;
  color: var(--encre); text-decoration: none;
}
.tuile-essentiel:hover { border-color: var(--rose); }
.tuile-essentiel:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.tuile-essentiel .tuile-titre { margin: 0; font-size: 11px; }
/* Une seule ligne, coupée par « … » : le détail est dans l'onglet */
.ligne-tuile { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.ligne-tuile .pastille { font-size: 11px; padding: 0 7px; vertical-align: 1px; }
.chiffres .chiffre { font-size: 24px; font-weight: 700; color: var(--prune); }
@media (max-width: 760px) {
  .essentiel { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

/* Les onglets. Sans JavaScript : de simples liens, et toutes les parties à la suite */
/* La zone des onglets fait au moins la hauteur de l'écran : passer d'un panneau long à un court
   ne raccourcit pas la page sous vos yeux, donc elle ne remonte pas d'un coup */
.avec-onglets { min-height: 100vh; }
/* La barre reste collée en haut de l'écran quand on descend dans un long panneau */
.onglets { position: sticky; top: 0; z-index: 5; margin: 0 -4px 12px; padding: 0 4px; background: var(--fond); }
.onglets [role="tablist"] {
  position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--trait);
}
.onglets [role="tablist"]::-webkit-scrollbar { display: none; }
.onglets [role="tab"] {
  flex: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 10px 14px; margin-bottom: -1px; border-bottom: 3px solid transparent;
  color: var(--discret); font-weight: 600; text-decoration: none;
}
.onglets [role="tab"]:hover { color: var(--encre); }
.onglets [role="tab"][aria-selected="true"] { color: var(--prune); border-bottom-color: var(--rose); }
.onglets [role="tab"]:focus-visible { outline: 2px solid var(--rose); outline-offset: -2px; border-radius: 8px 8px 0 0; }
.onglets .nombre { color: var(--discret); font-weight: 500; font-size: 14px; }
.avec-onglets .panneau:not(.actif) { display: none; }
.panneau { scroll-margin-top: 12px; }
.panneau h3 { margin: 0; font-size: 16px; }
.panneau > h3, .panneau > h2 + h3 { margin-top: 12px; }
.panneau > .liste-carte + h3 { margin-top: 16px; }


.carte-entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 8px; }
.carte-entete h2 { margin: 0; display: flex; align-items: center; gap: 8px; }

.pastille {
  display: inline-block; padding: 1px 9px; border-radius: 999px;
  background: var(--fond-doux); color: var(--prune); font-size: 12px; font-weight: 500;
}
.pastille-ok { background: var(--ok-fond); color: var(--ok); }
.pastille-attention, .etiquette.a-verifier { background: var(--attention-fond); color: var(--attention); }
.pastille-alerte { background: var(--erreur-fond); color: var(--erreur); }
.doc-ORDONNANCE { background: #e8f0fa; color: #2c5d93; }
.doc-ANALYSE { background: var(--ok-fond); color: var(--ok); }
.doc-IMAGERIE { background: #ece9f7; color: #4b3f8c; }
.doc-PHOTO { background: var(--attention-fond); color: var(--attention); }

.liste-carte { list-style: none; margin: 0; padding: 0; }
.liste-carte > li { padding: 8px 0; }
.liste-carte > li + li { border-top: 1px solid var(--trait); }
.defile { max-height: 22rem; overflow-y: auto; }
.ligne-vaccin { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 12px; }
.ligne-vaccin strong { display: inline; }
.petit-texte { font-size: 14px; }
.bloc { display: block; }

/* La frise du parcours de soins : une couleur par clinique */
.frise { list-style: none; margin: 0; padding: 0; }
.frise-etape { display: grid; grid-template-columns: 4.25rem 1rem minmax(0, 1fr); gap: 12px; padding: 12px 0; }
.frise-etape + .frise-etape { border-top: 1px dashed var(--trait); }
.frise-etape time { font-size: 14px; line-height: 1.2; color: var(--discret); }
.frise-etape time b { display: block; font-size: 16px; color: var(--encre); }
.frise-point {
  display: block; width: 12px; height: 12px; margin-top: 6px; border-radius: 50%;
  background: var(--couleur-clinique);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--couleur-clinique) 18%, transparent);
}
.frise-motif { font-weight: 600; }
.frise-ou { display: block; font-size: 14px; font-weight: 600; color: var(--couleur-clinique); }
.frise-etape p { margin: 4px 0 0; }
.clinique-0 { --couleur-clinique: var(--prune); }
.clinique-1 { --couleur-clinique: #2f7f6f; }
.clinique-2 { --couleur-clinique: #3b6ea8; }
.clinique-3 { --couleur-clinique: #b7791f; }
.clinique-4 { --couleur-clinique: #6b5b95; }

/* Les documents, et leur filtre par type sans rechargement */
.filtres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.filtre {
  display: inline-block; cursor: pointer; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--trait); font-size: 14px; font-weight: 500; color: var(--discret); margin: 0;
}
.filtre input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filtre:has(input:checked) { background: var(--prune); border-color: var(--prune); color: #fff; }
.filtre:has(input:focus-visible) { outline: 2px solid var(--rose); outline-offset: 2px; }
.documents:has(input[value="COMPTE_RENDU"]:checked) .ligne-document:not([data-type="COMPTE_RENDU"]),
.documents:has(input[value="ORDONNANCE"]:checked) .ligne-document:not([data-type="ORDONNANCE"]),
.documents:has(input[value="ANALYSE"]:checked) .ligne-document:not([data-type="ANALYSE"]),
.documents:has(input[value="IMAGERIE"]:checked) .ligne-document:not([data-type="IMAGERIE"]),
.documents:has(input[value="FACTURE"]:checked) .ligne-document:not([data-type="FACTURE"]),
.documents:has(input[value="PHOTO"]:checked) .ligne-document:not([data-type="PHOTO"]),
.documents:has(input[value="AUTRE"]:checked) .ligne-document:not([data-type="AUTRE"]) { display: none; }
.liste-documents { list-style: none; margin: 0; padding: 0; }
.ligne-document { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 0; }
.ligne-document + .ligne-document { border-top: 1px solid var(--trait); }
.ligne-document time { width: 6rem; flex: none; font-size: 14px; color: var(--discret); }
.ligne-document .type { width: 7.5rem; flex: none; }
.ligne-document .quoi { flex: 1; min-width: 14rem; }
.ligne-document .quoi > a { font-weight: 600; }
.ligne-document .quoi > .discret { display: block; }
.ligne-document form.verifier { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0; }

/* Le poids et sa courbe */
.poids { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin-bottom: 4px; }
.poids-valeur { font-size: 24px; font-weight: 700; color: var(--prune); }
.courbe { margin: 8px 0 0; color: var(--prune); }
.courbe svg { width: 100%; height: auto; }
.courbe-poids { font-size: 14px; font-weight: 700; fill: var(--encre); }
.courbe-graduation { font-size: 12px; fill: var(--discret); }
.courbe-axe { stroke: #c9b3bf; stroke-width: 1.2; }
.courbe-grille { stroke: var(--trait); stroke-width: 1; }
.courbe-grille-temps { stroke: var(--trait); stroke-width: 1; stroke-dasharray: 3 4; }
.courbe-point { cursor: help; }
.courbe-point:hover { r: 7; }
.courbe figcaption { margin-top: 4px; }

/* Les référés et les observations */
.compteur {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 2px;
  border-radius: 999px; background: var(--rose); color: #fff; font-size: 12px; font-weight: 700;
}
.carte-notification { border-left: 4px solid var(--rose); }
.ligne-refere a { margin-left: 4px; }
.statut-ENVOYE { background: var(--attention-fond); color: var(--attention); }
.statut-ACCEPTE { background: #e8f0fa; color: #2c5d93; }
.statut-DECLINE { background: var(--erreur-fond); color: var(--erreur); }
.statut-TERMINE { background: var(--ok-fond); color: var(--ok); }
.note-reponse { margin-top: 8px; padding: 8px 12px; border-left: 3px solid var(--trait); }
.observation { border-left: 3px solid var(--rose); padding-left: 12px !important; margin: 6px 0; }
.observation + .observation { border-top: 0 !important; }
.media { display: block; margin-top: 8px; max-width: 100%; max-height: 320px; border-radius: 10px; background: #000; }
img.media { background: none; }
form.lettre ul { list-style: none; padding: 0; margin: 0; }
form.lettre ul label { display: flex; gap: 8px; align-items: center; font-weight: 400; }
form.lettre ul input { width: auto; }

/* Le détail d'une consultation */
.colonnes-detail { display: grid; gap: 16px; margin: 20px 0; }
.colonnes-detail .principale { display: grid; gap: 16px; align-content: start; }
@media (min-width: 760px) { .colonnes-detail { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.tuile { background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; padding: 16px; }
.tuile p { margin: 0; }
.tuile-titre { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--discret); }
.tuile-diagnostic { background: var(--attention-fond); border-color: #f3d9a4; }
.diagnostic { font-size: 18px; font-weight: 600; }

/* ---------- 9. Les tableaux ---------- */

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { color: var(--discret); font-size: 13px; font-weight: 600; }

/* ---------- 9 bis. La barre latérale sur écran moyen et sur téléphone ---------- */

/* Écran moyen : la barre se réduit à ses icônes, le nom s'affiche au survol (title) */
@media (max-width: 999px) and (min-width: 760px) {
  .app { grid-template-columns: 72px minmax(0, 1fr); }
  .barre-laterale { padding: 20px 10px; align-items: center; }
  .barre-laterale .marque { padding: 0; }
  .barre-laterale .libelle { display: none; }
  .barre-laterale nav a { justify-content: center; padding: 11px; }
  .barre-laterale .compteur { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; font-size: 11px; }
  .barre-haut, .app-contenu main.conteneur { padding-left: 24px; padding-right: 24px; }
  .compte .qui small { display: none; }
}

/* Téléphone : la barre passe en haut, sur deux lignes (la marque, puis le menu qui défile de côté),
   et la déconnexion se place en haut à droite, comme avant */
@media (max-width: 759px) {
  .app { display: block; }
  .barre-laterale {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px;
    padding: 10px 16px 6px; border-right: 0; border-bottom: 1px solid var(--trait);
  }
  .barre-laterale .marque { padding: 0; }
  .barre-laterale nav { flex-direction: row; flex-basis: 100%; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .barre-laterale nav a { flex: none; padding: 6px 12px; gap: 6px; }
  .barre-laterale nav svg { display: none; }
  /* La recherche reste là, sur sa propre ligne ; la déconnexion remonte en haut à droite */
  .barre-haut { min-height: 0; padding: 8px 16px; }
  .barre-haut .recherche-entete { flex: 1; }
  .barre-haut .compte { position: absolute; top: 10px; right: 16px; }
  .barre-laterale { border-bottom: 0; }
  .app-contenu main.conteneur { padding: 20px 16px 40px; }
}

/* ---------- 10. Sur téléphone (écrans de moins de 640 pixels) ---------- */

@media (max-width: 640px) {
  h1 { font-size: 24px; }
  main.conteneur { padding-top: 20px; }

  /* L'en-tête passe sur deux lignes : la marque et le compte, puis le menu */
  .entete .conteneur { flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; padding-bottom: 8px; }
  .entete nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .entete nav a { flex: none; padding: 6px 12px; }
  /* Le bandeau du dossier, resserré : les onglets doivent apparaître sans avoir à descendre */
  .bandeau { padding: 14px 16px; }
  .bandeau .animal { gap: 10px 12px; }
  .bandeau .animal .avatar { width: 44px; height: 44px; border-radius: 12px; }
  .bandeau .animal .avatar svg { width: 28px; height: 28px; }
  .bandeau .identite { min-width: 0; }
  .bandeau .etiquettes { gap: 4px; }
  .bandeau .etiquette { font-size: 12px; padding: 1px 8px; }
  .bandeau .actions { flex-basis: 100%; }
  .bandeau .actions .bouton { padding: 7px 12px; font-size: 14px; }
  .bandeau-allergie { flex-wrap: nowrap; }
  .compte .qui { display: none; }

  /* Une consultation : la date au-dessus, plus à gauche */
  .consultation { grid-template-columns: 1fr; }
  .frise-etape { grid-template-columns: 3.5rem 1rem minmax(0, 1fr); gap: 8px; }

  /* Le tableau devient une pile de fiches : chaque case affiche son titre devant elle */
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { padding: 10px 0; border-bottom: 1px solid var(--trait); }
  td { border: 0; padding: 2px 0; }
  td::before { content: attr(data-titre) " : "; color: var(--discret); font-size: 13px; }

  .boutons .bouton { flex: 1; }
}

/* L'historique du véto */
.ligne-historique { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.ligne-historique .petit-texte { margin-left: auto; }

/* ---------- 11. L'accueil du véto (14 novembre 2026) ---------- */
/* Une page qui se lit de haut en bas : des sections séparées par de l'espace, pas des cartes */

.accueil { max-width: none; }
/* Grand écran : l'invite à chercher tient sur une ligne. Tout le reste est empilé, sur toute la largeur */
@media (min-width: 1000px) {
  .ouvrir-dossier { display: flex; align-items: center; gap: 32px; }
  .ouvrir-dossier > div { flex: 1 1 20rem; }
  .ouvrir-dossier p { margin: 0; }
  .ouvrir-dossier .recherche-accueil { flex: 1 1 28rem; }
}
.accueil-haut { margin-bottom: 20px; }
.accueil-haut h1 { margin-bottom: 2px; }
.accueil-haut p { margin: 0; }
.accueil-date { color: var(--rose-fonce); font-size: 14px; font-weight: 600; }

/* « Un animal devant vous ? » : un rose pâle et calme, l'action reste le bouton prune */
.ouvrir-dossier {
  margin-bottom: 36px; padding: 22px 24px; border-radius: var(--arrondi);
  background: var(--barre-haut); border: 1px solid #f6dfea;
}
.ouvrir-dossier h2 { font-size: 20px; margin-bottom: 4px; }
.ouvrir-dossier p { color: var(--discret); margin-bottom: 14px; }
.recherche-accueil { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
form.recherche-accueil input { flex: 1 1 14rem; min-width: 0; padding: 12px 14px; font-size: 17px; letter-spacing: .04em; background: var(--carte); }

.accueil-section { margin-bottom: 32px; }
.accueil-section-titre { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; }
.accueil-section-titre h2 { margin: 0; }
.accueil-section > p { margin: 0 0 6px; }

/* « À traiter » : une carte, une ligne par référé (statut, animal et motif, clinique, date, action) */
.fil-accueil { list-style: none; margin: 0; padding: 0; background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; overflow: hidden; }
.fil-accueil li {
  display: grid; grid-template-columns: 9rem minmax(0, 2fr) minmax(0, 1.4fr) 10rem 7rem; align-items: center; gap: 6px 16px;
  padding: 12px 16px; border-bottom: 1px solid var(--trait);
}
.fil-accueil li:last-child { border-bottom: 0; }
.fil-accueil .bouton { justify-self: end; }
@media (max-width: 899px) {
  .fil-accueil li { grid-template-columns: minmax(0, 1fr) auto; }
  .fil-accueil .fil-statut, .fil-accueil .fil-texte, .fil-accueil .fil-qui { grid-column: 1 / -1; }
}
.vide-accueil { margin: 0; padding: 16px; background: var(--carte); border: 1px dashed var(--trait); border-radius: 12px; }
.accueil-section-titre h2 { display: flex; align-items: center; gap: 8px; }

/* Reprendre un dossier : des vignettes, comme des onglets de navigateur rouverts, sur toute la largeur */
.reprendre { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 10px; }
.vignette-dossier {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; min-width: 10rem;
  border: 1px solid var(--trait); border-radius: 12px; background: var(--carte);
  color: var(--encre); text-decoration: none; line-height: 1.25;
}
.vignette-dossier:hover { border-color: var(--rose); }
.vignette-dossier .avatar {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px;
  background: var(--fond-doux); color: var(--prune);
}
.vignette-dossier .avatar svg { width: 26px; height: 26px; }

.equipe-accueil { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; }

/* Les chiffres de la clinique : l'accueil (en bref) et Ma clinique */
.indicateurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 12px; }
.indicateur {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px;
  background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; color: var(--encre); text-decoration: none;
}
a.indicateur:hover { border-color: var(--rose); }
.indicateur-titre { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--discret); }
.indicateur-chiffre { font-size: 30px; font-weight: 700; line-height: 1.1; color: var(--prune); }
.indicateur-chiffre.a-faire { color: var(--rose-fonce); }
.indicateur-detail { font-size: 13px; color: var(--discret); }
.hausse { color: var(--ok); font-weight: 600; }
.baisse { color: var(--erreur); font-weight: 600; }
.initiales { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.initiale {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--fond-doux); color: var(--prune); font-size: 12px; font-weight: 700;
}

/* ---------- 12. L'allure de document médical, sur le dossier et la consultation (14 novembre 2026) ----------
   Seulement là où l'on lit du médical (main.page-dossier) : l'accueil et l'espace propriétaire gardent
   leurs formes douces. Des angles nets, pas d'ombre (le papier n'en a pas), des rubriques en petites
   capitales, des chiffres de largeur fixe pour que les dates s'alignent comme dans un registre. */

.page-dossier { font-variant-numeric: tabular-nums; }
.page-dossier .carte,
.page-dossier .tuile-essentiel,
.page-dossier .a-traiter { border-radius: 6px; box-shadow: none; }
.page-dossier .carte { padding: 16px 20px; }
.page-dossier .pastille,
.page-dossier .etiquette,
.page-dossier .filtre { border-radius: 4px; }
.page-dossier .bandeau-allergie,
.page-dossier .bandeau-rappel { border-radius: 4px; }
.page-dossier .bouton { border-radius: 6px; }
.page-dossier .animal .avatar { border-radius: 8px; }
.page-dossier .media { border-radius: 4px; }

/* Les titres de rubrique en petites capitales, comme sur un compte rendu */
.page-dossier .panneau h2,
.page-dossier .panneau h3,
.page-dossier .a-traiter strong,
.titre-rubrique {
  font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--prune);
}
.page-dossier .panneau > h2, .page-dossier .panneau .carte-entete { margin-bottom: 10px; }
.page-dossier .panneau h3 { color: var(--discret); }
.titre-rubrique { margin: 0 0 4px; color: var(--rose-fonce); }

/* La fiche d'identité : libellé au-dessus, valeur en dessous */
.fiche-identite { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 6px 0 0; }
/* Dans le bandeau du dossier : sur toute la largeur, sous le nom et les boutons */
.bandeau .animal { align-items: center; }
.bandeau .identite h1 { margin: 0; }
.bandeau > .fiche-identite { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--trait); }
.fiche-identite dt { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--discret); }
.fiche-identite dd { margin: 0; font-size: 15px; }
.fiche-identite dd .discret { font-size: 13px; }

/* Le compte rendu d'une consultation : chaque rubrique avec son libellé à gauche */
.compte-rendu { max-width: 1100px; }
.compte-rendu-entete { padding-bottom: 14px; margin-bottom: 4px; border-bottom: 2px solid var(--prune); }
.compte-rendu-entete h1 { margin-bottom: 6px; }
.rubriques { margin: 0; }
.rubriques > div { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; }
.rubriques > div + div { border-top: 1px solid var(--trait); }
.rubriques dt { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--discret); padding-top: 2px; }
.rubriques dd { margin: 0; }
.rubriques .bloc + .bloc { margin-top: 4px; }
.rubrique-diagnostic dt { color: var(--attention); }
@media (max-width: 640px) {
  .rubriques > div { grid-template-columns: 1fr; }
  .fiche-identite { gap: 4px 18px; }
}

/* ---------- 13. Les listes en tableau : référés et historique (14 novembre 2026) ---------- */

/* Pour les lecteurs d'écran seulement : présent dans la page, invisible à l'écran */
.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

/* Un tableau fait de lignes-liens : toute la ligne est cliquable, comme dans une messagerie */
.tableau-liste { border: 1px solid var(--trait); border-radius: 8px; overflow: hidden; background: var(--carte); }
.tableau-entete, .tableau-ligne {
  display: grid; grid-template-columns: 9rem minmax(0, 1.4fr) minmax(0, 1fr) 7rem; gap: 4px 16px; align-items: center;
  padding: 12px 18px;
}
.tableau-entete { background: var(--barre-haut); border-bottom: 1px solid var(--trait); font-size: 13px; font-weight: 600; color: var(--discret); }
.tableau-ligne { color: var(--encre); text-decoration: none; }
.tableau-ligne + .tableau-ligne { border-top: 1px solid var(--trait); }
.tableau-ligne:hover { background: var(--barre-haut); }
.tableau-ligne:focus-visible { outline: 2px solid var(--rose); outline-offset: -2px; }
.tableau-ligne .pastille { margin: 1px 0; }
.tableau-principal strong { color: var(--prune); }
/* Un référé reçu sans réponse se lit en gras, comme un mail non lu */
.tableau-ligne.non-lu { background: #fffaf3; }
.tableau-ligne.non-lu .tableau-principal .bloc { font-weight: 600; }
.vide { padding: 18px 0; }

.tableau-consultations .tableau-entete, .tableau-consultations .tableau-ligne {
  grid-template-columns: 6.5rem minmax(0, 1fr) minmax(0, 2.2fr) 9rem;
}
.tableau-resume { font-size: 14px; color: var(--discret); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tableau-dossiers .tableau-entete, .tableau-dossiers .tableau-ligne { grid-template-columns: minmax(0, 1.5fr) 11rem minmax(0, 1fr); }

/* La barre de recherche et de filtres, au-dessus du tableau */
.barre-filtres {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 14px;
  padding: 12px 14px; border: 1px solid var(--trait); border-radius: 8px; background: var(--barre-haut);
}
.barre-filtres .recherche-entete { flex: 1 1 16rem; }
.barre-filtres .recherche-entete input:not([type="hidden"]) { width: 100%; padding: 8px 12px 8px 38px; font-size: 14px; border-radius: 8px; background: var(--carte); }
/* Les menus des filtres : une flèche dessinée, collée au texte, à la place de celle du navigateur */
.barre-filtres select:not([multiple]) {
  width: auto; height: 38px; padding: 0 32px 0 12px; font-size: 14px; color: var(--encre);
  border: 1px solid var(--trait); border-radius: 999px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: var(--carte) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d365a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
}
.barre-filtres select:not([multiple]):hover { border-color: var(--rose); }
.barre-filtres select:not([multiple]):focus-visible { outline: 2px solid var(--rose); outline-offset: 1px; }
.barre-filtres .recherche-entete input:not([type="hidden"]) { height: 38px; border-radius: 999px; }

/* Sur téléphone, chaque ligne devient une petite fiche ; l'en-tête des colonnes disparaît */
@media (max-width: 760px) {
  .tableau-entete { display: none; }
  .tableau-ligne,
  .tableau-consultations .tableau-ligne,
  .tableau-dossiers .tableau-ligne { grid-template-columns: 1fr; gap: 2px; padding: 12px 14px; }
  .tableau-resume { white-space: normal; }
}

/* ---------- 14. Le menu du profil, en haut à droite (14 novembre 2026) ---------- */

.menu-profil summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  padding: 4px 6px 4px 10px; border-radius: 10px;
}
.menu-profil summary::-webkit-details-marker { display: none; }
.menu-profil summary:hover, .menu-profil[open] summary { background: rgb(255 255 255 / .7); }
.menu-profil summary:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.initiale-profil { width: 36px; height: 36px; font-size: 13px; background: var(--prune); color: #fff; }
.menu-profil .chevron { width: 16px; height: 16px; fill: none; stroke: var(--discret); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu-profil[open] .chevron { transform: rotate(180deg); }
.menu-profil .menu-liste { width: 260px; padding: 6px; }
.menu-entete { margin: 0 0 4px; padding: 8px 10px 10px; border-bottom: 1px solid var(--trait); line-height: 1.3; }
.menu-info { display: flex; justify-content: space-between; margin: 4px 0 0; padding: 7px 10px; border-top: 1px solid var(--trait); }
.menu-pied { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--trait); }
.menu-pied button {
  display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: none;
  font: inherit; text-align: left; color: var(--erreur); cursor: pointer;
}
.menu-pied button:hover { background: var(--erreur-fond); }

/* ---------- 15. Consultation : fil d'Ariane, feuilleter le dossier (14 novembre 2026) ---------- */

.consultation-nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  max-width: 1100px; margin-bottom: 16px;
}
.fil-ariane ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.fil-ariane li + li::before { content: "›"; margin-right: 4px; color: var(--discret); }
.fil-ariane [aria-current] { color: var(--discret); }
.feuilleter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bouton.desactive { opacity: .45; cursor: default; pointer-events: none; }

/* ---------- 16. Le raccourci « dossier ouvert » de la barre latérale, comme dans GMVet (14 novembre 2026) ---------- */

/* Une petite carte aux bords arrondis partout, sous Accueil */
.dossier-ouvert {
  position: relative; display: flex; align-items: center; margin: 2px 0 8px;
  border: 1px solid #f0c9da; border-radius: 12px; background: rgb(255 255 255 / .55);
}
.dossier-ouvert:hover { background: rgb(255 255 255 / .85); }
.dossier-ouvert.actif { border-color: var(--rose); background: var(--carte); box-shadow: var(--ombre); }
.barre-laterale nav .dossier-ouvert a { flex: 1; min-width: 0; padding: 7px 28px 7px 10px; gap: 10px; line-height: 1.2; }
.dossier-ouvert .libelle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dossier-ouvert .petit-texte { color: var(--discret); font-weight: 400; }
.dossier-ouvert .avatar { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--fond-doux); color: var(--prune); }
.dossier-ouvert .avatar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; }
.dossier-ouvert form { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); margin: 0; }
.dossier-ouvert button {
  width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none;
  font-size: 16px; line-height: 1; color: var(--discret); cursor: pointer;
}
.dossier-ouvert button:hover { background: var(--fond-doux); color: var(--prune); }
/* Écran moyen : la barre n'a que des icônes, le raccourci aussi (sans la croix) */
@media (min-width: 760px) and (max-width: 999px) {
  .dossier-ouvert { margin: 2px 0 6px; }
  .barre-laterale nav .dossier-ouvert a { padding: 8px; justify-content: center; }
  .dossier-ouvert form { display: none; }
}
/* Téléphone : la barre passe en haut, le raccourci devient un onglet de plus */
@media (max-width: 759px) {
  .dossier-ouvert { flex: none; margin: 0; }
  .barre-laterale nav .dossier-ouvert a { padding: 4px 26px 4px 6px; }
  .dossier-ouvert .avatar, .dossier-ouvert .petit-texte { display: none; }
}

/* ---------- 17. Ma clinique, comme un écran de gestion (14 novembre 2026) ---------- */

.page-entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.page-entete h1 { margin-bottom: 2px; }
.page-entete p { margin: 0; }
.page-entete .titre-rubrique { margin-bottom: 2px; }
.gestion-grille { display: grid; gap: 0 20px; margin-top: 20px; }
@media (min-width: 1100px) { .gestion-grille { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }

/* Les barres de l'activité */
.barres {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 6px;
  height: 200px; margin: 12px 0 8px; padding: 0 0 4px; list-style: none; border-bottom: 1px solid var(--trait);
}
.barres li { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.barre { display: block; width: 100%; max-width: 34px; min-height: 2px; border-radius: 6px 6px 0 0; background: #e7b7cc; }
.barres li.en-cours .barre { background: var(--prune); }
.barre-valeur { font-size: 12px; font-weight: 600; color: var(--prune); min-height: 16px; }
.barre-date { margin-top: 4px; font-size: 11px; color: var(--discret); white-space: nowrap; }
@media (max-width: 599px) { .barres li:nth-child(odd) .barre-date { visibility: hidden; } }

/* Tableaux de l'équipe et des postes : pas des liens, pas de survol */
.tableau-equipe .tableau-entete, .tableau-equipe .tableau-ligne { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.tableau-postes .tableau-entete, .tableau-postes .tableau-ligne { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.tableau-equipe .tableau-principal { display: flex; align-items: center; gap: 10px; }
div.tableau-ligne:hover { background: none; }

/* ---------- 18. L'onglet Suivi : vaccins, antécédents, poids (retravaillé le 14 novembre 2026) ---------- */

.tableau-vaccins .tableau-entete, .tableau-vaccins .tableau-ligne { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1.4fr) minmax(0, 1.5fr); }
/* Sur téléphone (ou dans un bloc étroit), chaque vaccin sur deux lignes : la valence et le rappel, puis l'injection et le produit */
@media (max-width: 640px) {
  .tableau-vaccins .tableau-entete { display: none; }
  .tableau-vaccins .tableau-ligne { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
  .tableau-vaccins .tableau-ligne > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .tableau-vaccins .tableau-ligne > :nth-child(4) { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; }
  .tableau-vaccins .tableau-ligne > :nth-child(2) { grid-column: 1; grid-row: 2; font-size: 13px; color: var(--discret); }
  .tableau-vaccins .tableau-ligne > :nth-child(3) { grid-column: 1; grid-row: 3; font-size: 13px; }
}
.replie { margin-top: 10px; }
.replie summary { cursor: pointer; font-size: 14px; color: var(--rose-fonce); }

.groupe-antecedents { margin-top: 10px; }
.groupe-antecedents h4 { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--discret); }
.groupe-antecedents ul { margin: 0; padding: 0; list-style: none; }
.groupe-antecedents li { padding: 6px 0; border-bottom: 1px solid var(--trait); }
.groupe-antecedents li:last-child { border-bottom: 0; }
.groupe-allergies { padding: 8px 12px; border-radius: 10px; background: var(--erreur-fond); border: 1px solid #f6cfcb; }
.groupe-allergies h4 { color: var(--erreur); }
.groupe-allergies li { border-bottom-color: #f6cfcb; }

/* Le poids, en petit : la valeur, l'écart, puis la courbe, réduite */
.bloc-poids .poids { gap: 2px 10px; }
.poids-ecart { flex-basis: 100%; color: var(--encre); }
.bloc-poids .courbe { max-width: 640px; }

/* ---------- 19. L'accueil tient sur un écran, sans défiler (14 novembre 2026) ---------- */

.app-contenu main.conteneur:has(.accueil) { padding-top: 20px; padding-bottom: 20px; }
.accueil-haut { margin-bottom: 14px; }
.accueil-haut h1 { font-size: 26px; }
.ouvrir-dossier { margin-bottom: 22px; padding: 14px 20px; }
.ouvrir-dossier h2 { font-size: 18px; margin-bottom: 2px; }
form.recherche-accueil input { padding: 10px 14px; font-size: 16px; }
.accueil-section { margin-bottom: 22px; }

/* À traiter : des lignes fines, sur une seule ligne quand l'écran le permet */
.fil-accueil li { padding: 7px 14px; }
.fil-accueil .fil-texte, .fil-accueil .fil-qui { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fil-suite { margin: 6px 0 0; }

/* Reprendre un dossier : les 5 derniers, sur une seule ligne */
.reprendre { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.vignette-dossier { min-width: 0; padding: 6px 10px 6px 6px; }
.vignette-dossier > span:last-child { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 899px) {
  .reprendre { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(11rem, 1fr); overflow-x: auto; padding-bottom: 4px; }
}

/* La clinique en bref : une ligne de chiffres */
.bref {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; padding: 10px 16px;
  background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; font-size: 14px; color: var(--discret);
}
.bref strong { font-size: 17px; color: var(--prune); }
.bref a { color: var(--discret); text-decoration: none; }
.bref a:hover { color: var(--prune); text-decoration: underline; }
.bref-titre { margin: 0; font-size: 14px; font-weight: 700; color: var(--encre); }
.bref .bref-lien { margin-left: auto; color: var(--rose-fonce); text-decoration: underline; }
.carte-entete-actions { display: inline-flex; align-items: center; gap: 12px; }

/* ---------- 20. Tuile Pathologies : « +N autres » ouvre un encadré par-dessus la page (14 novembre 2026) ---------- */

.tuile-pathologies { position: relative; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.tuile-pathologies .tuile-titre { flex-basis: 100%; color: var(--discret); text-decoration: none; }
.tuile-pathologies .ligne-tuile { flex: 0 1 auto; min-width: 0; }
.tuile-pathologies .ligne-tuile a { color: var(--encre); text-decoration: none; }
.tuile-pathologies .ligne-tuile a:hover { color: var(--prune); text-decoration: underline; }
.menu-tuile { position: static; flex: none; }
.menu-tuile summary {
  padding: 0 8px; border-radius: 999px; background: var(--fond-doux); color: var(--prune);
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.menu-tuile .menu-liste { left: 0; right: auto; top: calc(100% + 6px); width: min(340px, 90vw); padding: 6px; z-index: 30; }
.menu-tuile ul { margin: 0; padding: 0; list-style: none; }
.menu-tuile li a { line-height: 1.3; }
.menu-pied-lien { margin-top: 4px; border-top: 1px solid var(--trait); border-radius: 0 0 8px 8px; color: var(--rose-fonce) !important; font-size: 14px; }

/* ---------- 21. Le propriétaire : menu en haut, onglets en bas sur téléphone (15 novembre 2026) ---------- */

.entete:has(.nav-proprietaire) { background: var(--barre); border-bottom: 1px solid var(--trait); }
.entete .conteneur:has(.nav-proprietaire) { max-width: 1100px; }
.entete .nav-proprietaire { display: flex; gap: 2px; margin-right: auto; margin-left: 24px; }
.entete .nav-proprietaire a, .onglets-bas a {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px;
  color: var(--encre); text-decoration: none; font-weight: 500; white-space: nowrap;
}
.entete .nav-proprietaire a:hover { background: rgb(255 255 255 / .65); color: var(--prune); }
.entete .nav-proprietaire a.actif { background: var(--carte); color: var(--prune); font-weight: 600; box-shadow: var(--ombre); }
.nav-proprietaire svg, .onglets-bas svg {
  width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.onglets-bas { display: none; }
/* Le contenu du propriétaire, centré et plus étroit : un site grand public, pas un poste de travail */
body:has(.nav-proprietaire) main.conteneur { max-width: 1100px; }

@media (max-width: 899px) {
  .entete .nav-proprietaire { display: none; }
  .onglets-bas {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--carte);
    border-top: 1px solid var(--trait); box-shadow: 0 -4px 16px rgb(125 54 90 / .06);
  }
  .onglets-bas a { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 11px; font-weight: 500; color: var(--discret); }
  .onglets-bas a span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .onglets-bas a.actif { color: var(--prune); font-weight: 700; }
  .onglets-bas a.actif svg { stroke-width: 2.3; }
  body:has(.onglets-bas) { padding-bottom: 72px; }
  .entete .menu-profil .qui { display: none; }
}

/* ---------- 22. Les pages du propriétaire (15 novembre 2026) ---------- */

.cartes-animaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); gap: 16px; }
.carte-animal { display: flex; flex-direction: column; background: var(--carte); border: 1px solid var(--trait); border-radius: 16px; overflow: hidden; }
.carte-animal-lien { display: flex; align-items: center; gap: 18px; padding: 22px 24px; color: var(--encre); text-decoration: none; }
.carte-animal-lien:hover { background: #fdfafb; }
.carte-animal-nom { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.carte-animal-nom strong { font-size: 22px; }
.carte-animal-nom .discret { font-size: 15px; }
.carte-animal .avatar { display: grid; place-items: center; flex: none; width: 68px; height: 68px; border-radius: 50%; background: var(--fond-doux); color: var(--prune); }
.carte-animal .avatar svg { width: 42px; height: 42px; }
.chevron-droite { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--discret); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.carte-animal-faits { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 0; padding: 0 24px 18px 110px; }
.carte-animal-partage { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 12px 24px; border-top: 1px solid var(--trait); font-size: 14px; color: var(--discret); }
.carte-animal-partage > span { flex: 1 1 auto; }
.carte-animal-partage form { margin: 0; }
.lien-bouton { padding: 0; border: 0; background: none; font: inherit; color: var(--rose-fonce); text-decoration: underline; cursor: pointer; }
.pastille-neutre { background: #eef0f3; color: #3d4652; }
.ajouter-animal { margin-top: 20px; }
.bouton.lien-discret { background: none; border: 0; color: var(--discret); text-decoration: underline; padding-left: 4px; padding-right: 4px; }
.bouton.lien-discret.danger { color: var(--erreur); }

/* L'espace du propriétaire, plus sobre (15 novembre 2026) : barre du haut rose, cartes blanches, une seule échelle de titres.
   Toute la largeur de l'écran, comme côté véto (15 novembre, retour d'Axel) */
.entete .conteneur:has(.nav-proprietaire) { max-width: none; padding: 0 40px; }
body:has(.nav-proprietaire) main.conteneur { max-width: none; padding: 28px 40px 48px; }
@media (max-width: 760px) {
  .entete .conteneur:has(.nav-proprietaire) { padding: 0 16px; }
  body:has(.nav-proprietaire) main.conteneur { padding: 20px 16px 40px; }
}
body:has(.nav-proprietaire) h1 { font-size: 26px; margin-bottom: 4px; }
body:has(.nav-proprietaire) .accueil-section { margin-bottom: 28px; }
body:has(.nav-proprietaire) .accueil-section-titre h2, body:has(.nav-proprietaire) .accueil-section > h2 { font-size: 18px; margin: 0 0 10px; }
body:has(.nav-proprietaire) main.conteneur > .discret:first-of-type { margin-bottom: 18px; }

/* À venir : une liste de notifications (15 novembre 2026), une carte blanche, une ligne par événement.
   Le rouge seulement pour un rappel dépassé ; la date dite « Dans 3 mois », comme sur un téléphone. */
.evenements { list-style: none; margin: 0; padding: 0; background: var(--carte); border: 1px solid var(--trait); border-radius: 14px; overflow: hidden; }
.evenement + .evenement { border-top: 1px solid var(--trait); }
.evenement-lien { display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--encre); text-decoration: none; }
.evenement-lien:hover { background: #fdf7fa; }
.evenement.en-retard .evenement-lien { background: #fffafa; }
.evenement.en-retard .evenement-lien:hover { background: #fff3f3; }
.evenement-icone { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: #e8f0fa; color: #2c5d93; }
.evenement-vaccin .evenement-icone { background: var(--fond-doux); color: var(--prune); }
.evenement.en-retard .evenement-icone { background: var(--erreur-fond); color: var(--erreur); }
.evenement-icone svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.evenement-texte { flex: 1; min-width: 0; }
.evenement-titre { display: block; }
.evenement-quand { flex: none; font-size: 13px; color: var(--discret); white-space: nowrap; }
.evenement.en-retard .evenement-quand { color: var(--erreur); font-weight: 600; }
.evenement.bientot .evenement-quand { color: var(--rose-fonce); font-weight: 600; }
.evenement-point { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--erreur); }
@media (max-width: 640px) {
  .evenement-lien { flex-wrap: wrap; padding: 12px 14px; gap: 4px 12px; }
  .evenement-texte { flex-basis: calc(100% - 80px); }
  .evenement-quand { order: 3; flex-basis: 100%; padding-left: 52px; }
}

/* Les cliniques : Mes vétérinaires et l'annuaire */
.liste-cliniques { list-style: none; margin: 0; padding: 0; background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; overflow: hidden; }
.ligne-clinique { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 12px 16px; }
.ligne-clinique + .ligne-clinique { border-top: 1px solid var(--trait); }
.ligne-clinique.bloquee { background: #fffafa; }
.ligne-clinique-texte { flex: 1 1 20rem; min-width: 0; }
.ligne-clinique-texte .pastille { margin-left: 4px; }
.ligne-clinique-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ligne-clinique-actions form { margin: 0; }
.tableau-documents .tableau-entete, .tableau-documents .tableau-ligne { grid-template-columns: 7rem minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }

/* ---------- 23. À venir : le calendrier du mois (15 novembre 2026) ---------- */

.calendrier { margin-bottom: 24px; }
.calendrier-entete { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.calendrier-entete h2 { margin: 0; font-size: 18px; min-width: 9rem; text-align: center; }
.calendrier-grille { border: 1px solid var(--trait); border-radius: 12px; overflow: hidden; }
.calendrier-ligne { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendrier-ligne + .calendrier-ligne { border-top: 1px solid var(--trait); }
.calendrier-jour-nom { padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--discret); text-transform: uppercase; background: #fdfafb; }
.calendrier-jour { min-height: 84px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.calendrier-jour + .calendrier-jour { border-left: 1px solid var(--trait); }
.calendrier-jour.hors-mois { background: #fcfbfb; }
.calendrier-jour.hors-mois .calendrier-numero { color: #c4b8be; }
.calendrier-numero { font-size: 13px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.calendrier-jour.aujourdhui .calendrier-numero { background: var(--prune); color: #fff; }
.calendrier-evenement {
  display: block; padding: 2px 6px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--fond-doux); color: var(--prune);
}
.calendrier-evenement.evenement-traitement { background: #e8f0fa; color: #2c5d93; }
.calendrier-evenement.en-retard { background: var(--erreur-fond); color: var(--erreur); }
.calendrier-quoi { font-weight: 400; }
@media (max-width: 699px) {
  .calendrier-jour { min-height: 52px; padding: 4px; }
  .calendrier-jour-nom { padding: 4px; font-size: 10px; text-align: center; }
  .calendrier-numero { margin: 0 auto; }
  /* Sur téléphone, un point par événement : le détail est dans la liste en dessous */
  .calendrier-evenement { width: 8px; height: 8px; padding: 0; margin: 0 auto; border-radius: 50%; font-size: 0; background: var(--prune); }
  .calendrier-evenement.evenement-traitement { background: #2c5d93; }
  .calendrier-evenement.en-retard { background: var(--erreur); }
}
.cartes-cliniques { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 12px; }
.carte-clinique { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--carte); border: 1px solid var(--trait); border-radius: 14px; }
.carte-clinique strong { font-size: 16px; }
.carte-clinique-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.carte-clinique-actions form { margin: 0; }
.lien-bouton.discret { color: var(--discret); }
.lien-acces { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--trait); }

/* ---------- 24. Dossier du propriétaire, onglet À venir : trois blocs distincts (15 novembre 2026) ---------- */

.blocs-a-venir { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 16px; align-items: start; }
.bloc-a-venir { margin: 0; border-top: 4px solid var(--accent-bloc, var(--trait)); }
.bloc-a-venir-titre { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.page-dossier .panneau .bloc-a-venir h3, .bloc-a-venir h3 { margin: 0; font-size: 16px; color: var(--encre); text-transform: none; letter-spacing: 0; }
.bloc-a-venir-icone { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--fond-bloc); color: var(--accent-bloc); }
.bloc-a-venir-icone svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bloc-a-venir p { margin: 4px 0 0; }
.bloc-vaccins { --accent-bloc: var(--prune); --fond-bloc: var(--fond-doux); }
.bloc-rdv { --accent-bloc: #2c5d93; --fond-bloc: #e8f0fa; }
.bloc-docs { --accent-bloc: #a35a00; --fond-bloc: #fdf1e2; }

/* L'onglet Santé du propriétaire : Vaccins et Antécédents côte à côte, le Poids en dessous sur toute la largeur */
.blocs-sante { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.blocs-sante .bloc-poids { grid-column: 1 / -1; }
.page-dossier .panneau .bloc-sante h2 { font-size: 16px; font-weight: 700; color: var(--encre); text-transform: none; letter-spacing: 0; gap: 10px; }
.bloc-antecedents { --accent-bloc: #b4432f; --fond-bloc: #fbe9e5; }
.bloc-sante.bloc-poids { --accent-bloc: #2f7a5b; --fond-bloc: #e4f3ec; }
@media (max-width: 899px) { .blocs-sante { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 25. Ajouter un animal et mes demandes (15 novembre 2026, étape B) ---------- */

.formulaire-etroit { max-width: 640px; }
.etapes-simples { margin: 8px 0 12px; padding-left: 20px; }
.etapes-simples li { margin-bottom: 4px; }
.demandes { margin-top: 28px; }
.demandes .evenement-lien:hover { background: inherit; }
.message-ok { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: #e7f4ec; color: #22603f; }
.bandeau-propriete { margin: 12px 0 0; padding: 12px 14px; border-radius: 8px; border: 1px solid #f0d9a8; background: #fff8e8; }
.bandeau-propriete p { margin: 0 0 8px; }
.bandeau-propriete form { display: inline; margin: 0; }
.bandeau-propriete .boutons-propriete { display: flex; flex-wrap: wrap; gap: 8px; }
.formulaire-etroit .champ { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.formulaire-etroit .champ label { font-weight: 600; }
.formulaire-etroit .champ .aide { font-size: 13px; color: var(--discret); }
.formulaire-etroit .case-a-cocher { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 4px 10px; }
.formulaire-etroit .case-a-cocher input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--prune); }
.formulaire-etroit .case-a-cocher label { flex: 1; font-weight: 500; }
.formulaire-etroit .case-a-cocher .errorlist, .formulaire-etroit .case-a-cocher .aide { flex-basis: 100%; padding-left: 28px; }
.formulaire-etroit .case-a-cocher label { min-width: 0; }

/* ---------- 26. Remboursements : demande, dossier imprimable, vérification (15 novembre 2026) ---------- */

.liste-cases { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
.case-ligne { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--trait); border-radius: 10px; font-weight: 500; cursor: pointer; }
.case-ligne input[type="checkbox"] { width: 18px; height: 18px; padding: 0; margin: 2px 0 0; flex: none; accent-color: var(--prune); }
.case-ligne:has(input:checked) { border-color: var(--prune); background: #fdf7fa; }
.formulaire-etroit fieldset.champ { border: 0; padding: 0; margin: 0 0 14px; }
.formulaire-etroit fieldset.champ legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.formulaire-etroit .champ input[type="text"] { width: 100%; }

.encart-remboursement { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 20px; padding: 14px 16px; border: 1px solid var(--trait); border-radius: 10px; background: #fdf7fa; }
.page-dossier .encart-remboursement h2, .encart-remboursement h2 { margin: 0 0 4px; font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--encre); }
.encart-remboursement p { margin: 0; }

.barre-impression { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; max-width: 900px; margin-bottom: 16px; }
.document-demande { max-width: 900px; }
.demande-entete { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.demande-entete h1 { margin: 2px 0; }
.demande-entete p { margin: 0; }
.code-verification { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 10px 14px; border: 2px solid var(--prune); border-radius: 10px; text-align: right; }
.code-verification strong { font-size: 22px; letter-spacing: .08em; font-variant-numeric: tabular-nums; color: var(--prune); }
.code-verification .adresse { font-weight: 600; word-break: break-all; }
.demande-partie { margin-top: 22px; }
.demande-partie h2 { font-size: 17px; margin: 0 0 8px; }
.demande-partie h3 { font-size: 15px; margin: 12px 0 4px; }
.tableau-simple { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau-simple th, .tableau-simple td { padding: 8px 10px; border-bottom: 1px solid var(--trait); text-align: left; vertical-align: top; }
.tableau-simple thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--discret); }
.tableau-simple tfoot th { border-bottom: 0; }
.nombre-droite { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ligne-empreinte td { padding-top: 0; word-break: break-all; }
.anteriorite-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 8px 24px; }
.liste-simple { margin: 0; padding-left: 18px; font-size: 14px; }
.demande-pied { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--trait); }

.verification .barre-filtres input { flex: 1; min-width: 12rem; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; }
.resultat-verification { margin: 16px 0; padding: 12px 14px; border-radius: 10px; }
.resultat-verification p { margin: 0; }
.resultat-verification.succes { background: #e7f4ec; color: #22603f; }
.resultat-verification.echec { background: var(--erreur-fond); color: var(--erreur); }
.verification h2 { font-size: 17px; margin: 18px 0 8px; }
.verification.formulaire-etroit { max-width: 820px; }

@media print {
  .entete, .onglets-bas, .barre-impression, .barre-laterale, .barre-haut { display: none !important; }
  body { background: #fff; padding: 0 !important; }
  main.conteneur { padding: 0 !important; max-width: none !important; }
  .document-demande { border: 0; box-shadow: none; padding: 0; max-width: none; }
  a { color: inherit; text-decoration: none; }
}


/* ---------- 27. Le référé suivi par le propriétaire (18 novembre 2026) ----------
   Trois étapes comme un suivi de colis : fait (vert), en cours (bleu), à venir (gris), refusé (rouge). */

.suivis-referes { display: grid; gap: 12px; }
.suivi-refere { padding: 12px 14px; border: 1px solid var(--trait); border-radius: 12px; background: var(--carte); }
.suivi-refere.fini { background: #fbfcfc; }
.suivi-refere-haut { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.suivi-refere-haut strong { margin-right: auto; }
.suivi-refere-haut a { color: inherit; }
.etapes-refere { display: flex; list-style: none; margin: 14px 0 10px; padding: 0; }
.etape-refere { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; font-size: 13px; }
/* Le trait qui relie un point au précédent */
.etape-refere + .etape-refere::before { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: var(--trait); }
.etape-refere.etape-fait + .etape-refere::before, .etape-refere + .etape-refere.etape-fait::before { background: var(--ok); }
.etape-point { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--trait); background: var(--carte); color: #fff; font-size: 13px; font-weight: 700; line-height: 1; }
.etape-fait .etape-point { background: var(--ok); border-color: var(--ok); }
.etape-refuse .etape-point { background: var(--erreur); border-color: var(--erreur); }
.etape-en_cours .etape-point { border-color: #2c5d93; box-shadow: 0 0 0 4px #e8f0fa; }
.etape-en_cours .etape-point::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2c5d93; }
.etape-libelle { margin-top: 6px; font-weight: 600; }
.etape-a_venir .etape-libelle { color: var(--discret); font-weight: 500; }
.etape-detail { color: var(--discret); font-size: 12px; padding: 0 4px; overflow-wrap: anywhere; }
.suivi-refere-message { margin: 4px 0 0; }
.suivi-refere-a-faire { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #e8f0fa; color: #1f4570; }
.suivi-refere-a-faire .bouton { background: var(--carte); }
.suivi-refere-transmis { margin-top: 10px; font-size: 14px; }
.suivi-refere-transmis summary { cursor: pointer; color: var(--prune); font-weight: 600; }
.suivi-refere-transmis ul { margin: 6px 0 4px; padding-left: 20px; }
.suivi-refere-transmis p { margin: 0; }
/* Dans le bloc « Rendez-vous chez un confrère » du dossier, la carte du bloc suffit : pas de second cadre */
.bloc-a-venir .suivi-refere { padding: 0; border: 0; background: none; }
.bloc-a-venir .suivi-refere + .suivi-refere { padding-top: 12px; border-top: 1px solid var(--trait); }

/* ---------- 28. En ce moment : le traitement à la maison (18 novembre 2026) ----------
   Pour le propriétaire : « À ne pas faire » en rouge en premier, une carte par médicament avec une grosse case
   par prise du jour, la frise des jours (vert : tout donné, orange : en partie, rouge : rien), puis « À faire ».
   Pour le véto : une ligne par médicament, ce qui a été coché et les oublis. */

.bloc-en-ce-moment { margin-bottom: 16px; border-top: 4px solid var(--rose); }
.bloc-en-ce-moment .carte-entete h3 { margin: 0; font-size: 16px; color: var(--encre); text-transform: none; letter-spacing: 0; }
.en-ce-moment { display: grid; gap: 12px; }
.en-ce-moment-animal + .en-ce-moment-animal, .en-ce-moment-animal + .suivis-referes { margin-top: 16px; }
.en-ce-moment-nom { margin: 0 0 8px; font-size: 16px; }
.en-ce-moment-nom a { color: var(--encre); }

.consignes-a-eviter, .consignes-a-faire { padding: 12px 14px; border-radius: 12px; }
.consignes-a-eviter { background: var(--erreur-fond); border: 1px solid #f6c9c4; color: #7a1a12; }
.consignes-a-faire { background: var(--ok-fond); border: 1px solid #c6e3dc; color: #1d554a; }
.consignes-titre { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 13px; }
.consignes-titre span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 12px; }
.consignes-a-eviter .consignes-titre span { background: var(--erreur); }
.consignes-a-faire .consignes-titre span { background: var(--ok); }
.consignes-a-eviter ul, .consignes-a-faire ul { margin: 0; padding-left: 20px; }
.consignes-a-eviter li + li, .consignes-a-faire li + li { margin-top: 4px; }
.consigne-jusqua { font-size: 13px; opacity: .8; white-space: nowrap; }

.carte-medicament { padding: 14px 16px; border: 1px solid var(--trait); border-radius: 14px; background: var(--carte); box-shadow: var(--ombre); scroll-margin-top: 90px; }
.carte-medicament.fait-aujourdhui { border-color: #bfe0d8; background: linear-gradient(#f4fbf9, var(--carte) 70%); }
.carte-medicament.fini { box-shadow: none; background: #fbfcfc; }
.medicament-haut { display: flex; align-items: center; gap: 12px; }
.medicament-icone { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--fond-doux); color: var(--prune); }
.medicament-icone svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.medicament-nom { flex: 1; min-width: 0; }
.medicament-nom strong { display: block; font-size: 16px; }
.medicament-nom .discret { font-size: 14px; }
.medicament-jour { flex: none; font-size: 13px; color: var(--discret); text-align: right; }
.medicament-jour b { font-size: 20px; color: var(--prune); }
.medicament-progression { height: 6px; margin: 10px 0 0; border-radius: 3px; background: var(--fond-doux); overflow: hidden; }
.medicament-progression span { display: block; height: 100%; border-radius: 3px; background: var(--rose); }
.medicament-consigne-du-jour { margin: 12px 0 6px; font-weight: 600; }
.fait-aujourdhui .medicament-consigne-du-jour { color: var(--ok); }
.medicament-bilan { margin: 10px 0 0; }

.prises-du-jour { display: flex; flex-wrap: wrap; gap: 8px; }
.prises-du-jour form { margin: 0; flex: 1 1 8rem; }
.case-prise { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 14px; border: 2px solid var(--trait); border-radius: 12px; background: var(--carte); color: var(--encre); font: inherit; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.case-prise:hover { border-color: var(--rose); }
.case-prise .case { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border: 2px solid #d9c6d0; border-radius: 8px; color: transparent; font-size: 16px; transition: background .15s, transform .15s; }
.case-prise.cochee { border-color: var(--ok); background: var(--ok-fond); color: #1d554a; }
.case-prise.cochee .case { border-color: var(--ok); background: var(--ok); color: #fff; transform: scale(1.05); }
.prises-du-jour.petites .case-prise { min-height: 38px; font-size: 14px; }
.rattraper-hier { margin-top: 8px; font-size: 14px; }
.rattraper-hier summary { cursor: pointer; color: var(--discret); }
.rattraper-hier .prises-du-jour { margin-top: 8px; }

.frise-prises { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 12px 0 0; padding: 0; }
.jour-prise { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 11px; font-weight: 600; background: #f3edf0; color: var(--discret); }
.jour-complet { background: var(--ok); color: #fff; }
.jour-partiel { background: #f5c77e; color: #5c3600; }
.jour-oublie { background: #f2b8b2; color: #7a1a12; }
.jour-aujourdhui { background: var(--carte); border: 2px solid var(--rose); color: var(--prune); }
.jour-prise.est-aujourdhui.jour-complet { box-shadow: 0 0 0 2px var(--carte), 0 0 0 4px var(--ok); }
.frise-prises.petite { margin-top: 6px; }
.frise-prises.petite .jour-prise { width: 20px; height: 20px; font-size: 10px; }

.medicament-pied { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 10px 0 0; font-size: 14px; }
.serie { padding: 2px 10px; border-radius: 999px; background: #fdf1e2; color: #8a4b00; font-weight: 600; }
.serie::before { content: "★ "; }
.medicament-source { flex-basis: 100%; }
.medicament-arreter { margin: 6px 0 0; }

/* Le véto : À la maison, dans le dossier et sur la page d'une consultation */
.bloc-a-la-maison { margin-bottom: 16px; border-top: 4px solid var(--ok); }
.encart-a-la-maison { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--trait); }
.encart-a-la-maison h2 { margin: 0 0 8px; font-size: 18px; }
.ligne-medicament { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.ligne-medicament.arrete { opacity: .65; }
.ligne-medicament-texte { flex: 1 1 22rem; min-width: 0; }
.ligne-medicament-texte .pastille { margin-right: 4px; }
.ligne-medicament-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ligne-medicament-actions form { margin: 0; }
.observance { font-weight: 600; color: var(--ok); }
.observance.avec-oublis { color: var(--attention); }
.consignes-veto { margin-top: 8px; }
.ajouts-traitement { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 12px; }
.ajout-consigne { flex: 1 1 100%; }
.ajout-consigne summary { list-style: none; display: inline-block; cursor: pointer; }
.ajout-consigne summary::-webkit-details-marker { display: none; }
.ajouts-traitement { flex-wrap: wrap; }
.formulaire-ligne { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-top: 10px; padding: 12px; border: 1px solid var(--trait); border-radius: 12px; }
.formulaire-ligne label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.formulaire-ligne input[type="text"] { min-width: 16rem; }
.choix-genre { display: flex; gap: 12px; margin: 0; padding: 0; border: 0; }
.choix-genre label { flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; }
.choix-genre { flex: none; align-self: center; }
@media (max-width: 640px) {
  .formulaire-ligne input[type="text"] { min-width: 0; width: 100%; }
  .formulaire-ligne label { flex: 1 1 100%; }
}

/* ---------- 29. L'accueil du propriétaire, plusieurs animaux (18 novembre 2026) ----------
   D'après la maquette validée par Axel le 18 novembre. Une couleur par animal (proprietaire/accueil.py),
   reprise sur chaque ligne : pastilles du haut, prises du jour, consignes, À prévoir, Quoi de neuf, cartes. */

.animal-couleur-1 { --animal-fond: #fae8f0; --animal-encre: #9e4d72; }
.animal-couleur-2 { --animal-fond: #fdefd6; --animal-encre: #8a5a00; }
.animal-couleur-3 { --animal-fond: #dff3ec; --animal-encre: #0f6e56; }
.animal-couleur-4 { --animal-fond: #e3eefa; --animal-encre: #1d5d9b; }
.animal-couleur-5 { --animal-fond: #ecebfc; --animal-encre: #534ab7; }

/* Les pastilles du haut : « Tous », puis une par animal ; elles filtrent la page */
.filtre-animaux { display: flex; gap: 8px; overflow-x: auto; margin: -6px 0 18px; padding: 2px 0 4px; scrollbar-width: none; }
.filtre-animal { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 12px 3px 3px; border: 1px solid #dccbd4; border-radius: 999px; background: var(--carte); color: var(--encre); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.filtre-animal.tous { padding: 6px 14px; }
.filtre-animal.choisi { border: 1.5px solid var(--animal-encre, var(--rose)); background: var(--animal-fond, var(--fond-doux)); color: var(--animal-encre, var(--prune)); font-weight: 600; }
.filtre-animal .avatar, .journee-animal .avatar, .mini-animal .avatar { display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--animal-fond); color: var(--animal-encre); }
.filtre-animal .avatar { width: 26px; height: 26px; }
.filtre-animal .avatar svg { width: 17px; height: 17px; }

/* Aujourd'hui : une carte, les prises par moment (une case ronde par prise), puis les consignes */
.journee { padding: 0 14px; border: 1px solid var(--trait); border-radius: 14px; background: var(--carte); }
.journee-moment { margin: 10px 0 0; font-size: 12px; font-weight: 500; color: var(--discret); }
.journee-lignes { list-style: none; margin: 0; padding: 0; }
.journee-ligne { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--trait); }
.journee-lignes:last-child > .journee-ligne:last-child { border-bottom: 0; }
.journee-animal { flex: none; text-decoration: none; }
.journee-animal .avatar { width: 32px; height: 32px; }
.journee-animal .avatar svg { width: 20px; height: 20px; }
.journee-texte { flex: 1; min-width: 0; line-height: 1.35; }
.journee-nom { display: block; font-size: 15px; }
.journee-detail { display: block; font-size: 13px; color: var(--discret); }
.journee-ligne.donnee .journee-nom { color: var(--discret); text-decoration: line-through; }
.serie-courte { color: var(--attention); }
.case-ronde { display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 1.5px solid #bfaab6; border-radius: 50%; background: var(--carte); color: transparent; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.case-ronde:hover { border-color: var(--rose); color: #e6d3dd; }
.case-ronde.cochee { border-color: var(--ok); background: var(--ok); color: #fff; transform: scale(1.05); }
/* Un vrai doigt a besoin de plus que 34 px : la zone qu'on peut toucher déborde du rond */
.case-ronde { position: relative; }
.case-ronde::after { content: ""; position: absolute; inset: -6px; }
.accueil-a-eviter { margin-bottom: 12px; }
.journee-consignes { border-top: 1px solid var(--trait); }
.consigne-icone { display: grid; place-items: center; flex: none; width: 32px; height: 32px; }
.consigne-icone svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.consigne-a-faire .consigne-icone { color: var(--ok); }
.pour-qui { font-weight: 400; }
.journee-bravo { margin: 8px 0 0; text-align: center; color: var(--ok); font-size: 14px; font-weight: 500; }
.journee-note { margin: 8px 0 0; }

/* À prévoir : une carte courte par chose ; en retard, toute la carte passe en rouge avec « Appeler » */
.prevoir { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.prevoir-carte { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 0; border: 1px solid var(--trait); border-radius: 12px; background: var(--carte); }
.prevoir-lien { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 10px 0 10px 12px; color: var(--encre); text-decoration: none; }
.prevoir-icone { display: grid; place-items: center; flex: none; width: 24px; color: var(--prune); }
.prevoir-icone svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.prevoir-texte { min-width: 0; line-height: 1.35; }
.prevoir-texte strong { font-weight: 500; }
.prevoir-detail { color: var(--discret); }
.prevoir-carte.en-retard { background: var(--erreur-fond); border-color: #f5c9c4; }
.prevoir-carte.en-retard .prevoir-lien, .prevoir-carte.en-retard .prevoir-icone, .prevoir-carte.en-retard .prevoir-detail { color: var(--erreur); }
.prevoir-appeler { flex: none; padding: 3px 10px; border: 1px solid currentColor; border-radius: 999px; color: var(--prune); font-size: 13px; text-decoration: none; }
.en-retard .prevoir-appeler { color: var(--erreur); }

/* Quoi de neuf : une icône de la couleur de l'animal, une phrase, qui et quand */
.nouvelles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nouvelle { display: flex; align-items: flex-start; gap: 10px; line-height: 1.35; }
.nouvelle-icone { flex: none; padding-top: 1px; color: var(--animal-encre, var(--discret)); }
.nouvelle-icone svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nouvelle > span > a { color: var(--encre); text-decoration: none; }
.nouvelle > span > a:hover { text-decoration: underline; }

/* Mes animaux : une petite carte par animal, qu'on fait défiler sur le côté */
.mini-animaux { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; }
.mini-animal { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; min-width: 112px; padding: 10px; border: 1px solid var(--trait); border-radius: 14px; background: var(--carte); color: var(--encre); text-align: center; text-decoration: none; }
.mini-animal:hover { border-color: var(--animal-encre); }
.mini-animal strong { font-weight: 500; }
.mini-animal .avatar { width: 44px; height: 44px; }
.mini-animal .avatar svg { width: 28px; height: 28px; }
.mini-animal .pastille { font-size: 12px; }

/* Le menu du propriétaire : quatre entrées ; libellé long sur ordinateur, court sur téléphone */
.nav-libelle-court { display: none; }
@media (max-width: 899px) {
  .onglets-bas { grid-template-columns: repeat(4, 1fr); }
  .nav-libelle-long { display: none; }
  .nav-libelle-court { display: inline; }
}

/* ---------- La démo en libre-service (config/demo.py) ---------- */

/* Le bandeau en haut de chaque page de demo.pelote.vet : personne ne la prend pour le vrai Pelote */
.bandeau-demo { padding: 8px 16px; background: var(--prune); color: #fff; font-size: 14px; line-height: 1.4; text-align: center; }
/* Les boutons « Essayer » sous la connexion */
.essayer-demo { margin-top: 20px; }
.essayer-demo form { margin-top: 16px; }
.essayer-demo form .bouton { width: 100%; }
.essayer-demo form .petit-texte { margin: 6px 0 0; color: var(--discret); }
