/* WSC Ferme — espace Santé (lot C). Système visuel des maquettes validées (06 : programme présenté comme modèle ;
   08 : vente bloquée par un délai d'attente ; 03 : « Vente permise ») : cartes blanches, titres de carte 15 px gras,
   gros chiffres, puces d'état (rouge = vente bloquée, vert = vente permise, orange clair = à valider ou aujourd'hui).
   Toutes les classes commencent par « sante- » : aucune règle ne touche l'écran d'un autre lot. Téléphone d'abord
   pour la vétérinaire de passage (360 à 412 px, cibles ≥ 44 px) ; poste 1366×768 pour le gérant et le propriétaire. */

.sante-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sante-note { display: flex; gap: 8px; align-items: flex-start; border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.sante-note .ic { margin-top: 1px; }
.sante-note.info { background: var(--info-clair); color: var(--info); }
.sante-note.ko { background: var(--ko-clair); color: var(--ko); }
.sante-reperes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.sante-lien { color: var(--orange-nuit); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px;
	text-underline-offset: 3px; text-decoration-color: var(--orange-trait); }
.sante-lien:hover { text-decoration-color: currentColor; }
.sante-vide { color: var(--gris); font-size: 14px; padding: 6px 0 2px; }

/* chiffres clés : quatre cartes, comme les maquettes 06 et 08 */
.sante-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sante-kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.sante-kpi strong { font-size: 30px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.sante-kpi-bas { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sante-kpi .puce, .sante-objet .puce, .sante-rangee-texte .puce { white-space: normal; max-width: 100%; }
.sante-retour { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-size: 14px; font-weight: 700;
	color: var(--orange-nuit); text-decoration: none; align-self: flex-start; }
.sante-retour:hover { text-decoration: underline; }

/* cartes à titre, rangées */
.sante-grille { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.sante-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sante-carte { padding: 0; }
.sante-carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; flex-wrap: wrap; }
.sante-carte-titre { font-size: 15px; font-weight: 800; }
.sante-carte-corps { padding: 10px 18px 16px; display: flex; flex-direction: column; gap: 0; }
.sante-carte-corps > .sante-note { margin-top: 10px; }
.sante-rangee { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--trait); min-width: 0; }
.sante-carte-corps > .sante-rangee:first-child, .sante-groupe .sante-rangee:first-of-type, .sante-pas > .sante-rangee:first-child { border-top: 0; }
.sante-rangee-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sante-rangee-texte strong { font-size: 15px; font-weight: 700; }
.sante-rangee-texte small { font-size: 13px; line-height: 1.4; }
.sante-rangee-droite { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; max-width: 60%; }
.sante-rangee-droite .puce { white-space: normal; text-align: left; }
.sante-rangee-lien { text-decoration: none; color: var(--encre); border-radius: 10px; }
.sante-rangee-lien > .ic { color: var(--gris); flex: none; }
.sante-rangee-lien:hover strong { color: var(--orange-nuit); }
.sante-jours { font-size: 20px; font-weight: 800; min-width: 64px; text-align: right; }
.sante-stock { font-size: 15px; font-weight: 800; white-space: nowrap; }
.sante-stock.ko { color: var(--ko); }
.sante-boutons { display: inline-flex; gap: 2px; }
.sante-groupe { display: flex; flex-direction: column; }
.sante-groupe + .sante-groupe { margin-top: 6px; }
.sante-groupe-titre { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--gris); padding: 8px 0 2px; }
.sante-groupe-titre.ko { color: var(--ko); }

/* lots et animaux */
.sante-objets { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; padding-top: 4px; }
.sante-objet { display: flex; align-items: center; gap: 12px; border: 1px solid var(--trait); border-radius: 14px; padding: 12px 14px; text-decoration: none;
	color: var(--encre); min-height: 64px; }
.sante-objet > .ic { color: var(--gris); }
.sante-objet:hover { border-color: var(--orange-trait); }
.sante-objet-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.sante-objet-texte strong { font-size: 15px; font-weight: 800; }
.sante-objet-texte small { font-size: 13px; }
.sante-details { margin-top: 12px; }
.sante-details summary { cursor: pointer; font-weight: 700; font-size: 14px; min-height: 44px; display: flex; align-items: center; color: var(--orange-nuit); }

/* tableaux (poste) et listes (téléphone) */
table.sante-table, table.sante-edition { width: 100%; border-collapse: collapse; font-size: 14px; }
table.sante-table th, table.sante-edition th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--gris);
	padding: 8px 10px; border-bottom: 1px solid var(--trait-fort); white-space: nowrap; }
table.sante-table td { padding: 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
table.sante-table tr:last-child td { border-bottom: 0; }
table.sante-table td:first-child { white-space: nowrap; }
table.sante-edition td { padding: 6px 4px; vertical-align: middle; }
table.sante-edition .saisie { min-height: 44px; font-size: 15px; padding: 0 10px; }
table.sante-edition select.saisie { padding: 0 6px; }
.sante-court { max-width: 92px; }
table.sante-edition input[data-champ="intervention"] { min-width: 220px; }
.sante-defile { overflow-x: auto; }
.sante-liste-tel { display: none; }

/* historique */
.sante-tete { align-items: flex-end; }
.sante-tete .tete-texte { gap: 6px; }
.sante-tete .sante-actions { justify-content: flex-end; }
.sante-permise { display: flex; gap: 8px; align-items: flex-start; color: var(--ok); font-weight: 600; font-size: 14px; padding: 6px 0 2px; }
.sante-journal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sante-evenement { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--trait); }
.sante-evenement:first-child { border-top: 0; }
.sante-evenement .picto { width: 34px; height: 34px; border-radius: 10px; background: var(--gris-clair); color: var(--gris); }
.sante-evenement.traitement .picto { background: var(--orange-clair); color: var(--orange-nuit); }
.sante-evenement.gel .picto, .sante-evenement.maladie .picto, .sante-evenement.mort .picto { background: var(--ko-clair); color: var(--ko); }
.sante-evenement.degel .picto, .sante-evenement.guerison .picto { background: var(--ok-clair); color: var(--ok); }
.sante-source { padding: 0 4px; }

/* formulaires dans les modales */
.modale.sante-modale { max-width: 560px; }
.sante-champ select.saisie, .sante-champ input.saisie { width: 100%; }
.sante-modale select.saisie { appearance: auto; padding: 0 10px; min-height: 48px; }
.sante-ligne-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sante-avec-unite { display: flex; align-items: center; gap: 8px; }
.sante-unite { font-weight: 600; color: var(--gris); white-space: nowrap; }
.sante-aide { font-size: 13px; color: var(--gris); margin-top: -8px; line-height: 1.45; }
.sante-case { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; min-height: 44px; cursor: pointer; }
.sante-case input { width: 22px; height: 22px; accent-color: var(--orange-fonce); flex: none; }
.sante-apercu { display: flex; gap: 8px; align-items: flex-start; border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 700; }
.sante-apercu:empty { display: none; }
.sante-apercu.ok { background: var(--ok-clair); color: var(--ok); }
.sante-apercu.ko { background: var(--ko-clair); color: var(--ko); }

/* poste étroit (rail visible, 900 à 1180 px) */
@media (max-width: 1180px) {
	.sante-grille { grid-template-columns: minmax(0, 1fr) 340px; }
	.sante-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* téléphone */
@media (max-width: 899px) {
	.sante-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.sante-kpi { padding: 12px 14px; }
	.sante-kpi strong { font-size: 26px; }
	.sante-grille { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.sante-col { gap: 12px; }
	.sante-carte-tete { padding: 14px 14px 0; }
	.sante-carte-corps { padding: 8px 14px 14px; }
	.sante-rangee { flex-wrap: wrap; align-items: flex-start; }
	.sante-rangee-droite { max-width: 100%; justify-content: flex-start; }
	.sante-rangee-droite .bouton.petit { min-height: 44px; }
	.sante-boutons .bouton.fantome { width: 44px; }
	.sante-objets { grid-template-columns: minmax(0, 1fr); }
	.sante-actions { width: 100%; }
	.sante-actions .bouton { flex: 1 1 auto; }
	.sante-tete .sante-actions .bouton.plein { flex-basis: 100%; }
	table.sante-table { display: none; }
	.sante-liste-tel { display: flex; flex-direction: column; }
	.sante-liste-tel .sante-rangee:first-child { border-top: 0; }
	.sante-ligne-champs { grid-template-columns: minmax(0, 1fr); }
	.sante-jours { font-size: 17px; min-width: 0; }
}
@media (max-width: 380px) {
	.sante-kpis { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------------------------------------------------------
   Plan 3, lot S (maquettes 19 et 20) : programme périodique des reproducteurs, actes notés ensemble, fiches des
   produits sanitaires. Mêmes cartes, mêmes puces ; l'orange marque ce qui est proche, le vert ce qui est fait. */
.sante-compte { min-height: 20px; padding: 0 7px; font-size: 12px; }
.sante-creer { align-self: flex-start; margin-top: 10px; }
.sante-groupe-titre.marque { color: var(--orange-nuit); }

/* animaux d'un geste groupé : une case par animal, décochable (aussi dans « Aujourd'hui ») */
.sante-betes { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.sante-bete { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border: 1px solid var(--trait-fort); border-radius: 12px;
	background: var(--blanc); font-weight: 800; font-variant-numeric: tabular-nums; cursor: pointer; }
.sante-bete input { width: 20px; height: 20px; accent-color: var(--orange-fonce); flex: none; }
.sante-bete:has(input:not(:checked)) { background: var(--fond); border-style: dashed; color: var(--gris); }
.sante-betes-mini { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sante-betes-mini .sante-lien { display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px; border-radius: 7px; background: var(--fond);
	border: 1px solid var(--trait); font-size: 12.5px; text-decoration: none; color: var(--encre); font-variant-numeric: tabular-nums; }

/* programme périodique : les quatre déclencheurs, les lignes, le calendrier par animal */
.sante-quands { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sante-quand { padding: 14px 16px; display: grid; grid-template-columns: 36px 1fr; gap: 2px 12px; align-items: start; }
.sante-quand .picto { width: 36px; height: 36px; border-radius: 10px; grid-row: span 2; background: var(--orange-clair); color: var(--orange-fonce); }
.sante-quand strong { font-size: 15px; }
.sante-quand small { font-size: 13px; line-height: 1.4; }
.sante-quand.vide { background: var(--fond); box-shadow: none; }
.sante-quand.vide .picto { background: var(--gris-clair); color: var(--gris); }
.sante-quand-l { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; background: var(--gris-clair); font-weight: 800;
	font-size: 13px; white-space: nowrap; }
.sante-quand-l.cycle { background: var(--orange-clair); color: var(--orange-nuit); }
.sante-prochain { display: flex; flex-direction: column; font-weight: 700; white-space: nowrap; }
.sante-prochain small { color: var(--gris); font-weight: 600; }
table.sante-matrice td, table.sante-matrice th { white-space: nowrap; }
.sante-case-d { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sante-case-d.fait { color: var(--ok); }
.sante-case-d.proche { color: var(--orange-nuit); font-weight: 800; }
.sante-case-d.ko { color: var(--ko); }
.sante-case-d.loin { color: var(--gris); font-weight: 600; }
.sante-case-d.sans { color: var(--gris); font-weight: 500; }
.sante-bete-l { display: inline-flex; gap: 6px; align-items: center; padding: 3px 8px; border-radius: 8px; background: var(--fond); font-size: 13px; }
.sante-acte-g { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--trait); }
.sante-groupe .sante-acte-g:first-of-type { border-top: 0; }
.sante-acte-g .sante-betes-mini, .sante-acte-g > .bouton { grid-column: 1 / -1; }
.sante-acte-g > .bouton { justify-self: start; }
.sante-lignes-edition { display: flex; flex-direction: column; gap: 12px; }
.sante-ligne-edition { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: none; }

/* fiche d'un produit et son formulaire (maquette 20) */
.sante-proposition { border: 2px solid var(--orange-fonce); box-shadow: 0 0 0 3px var(--orange-clair); }
.sante-proposition .sante-carte-corps { gap: 10px; }
.sante-changement { padding: 10px 12px; border-radius: 12px; background: var(--orange-clair); color: var(--orange-nuit); font-size: 14px; }
.sante-changements { display: flex; flex-direction: column; gap: 8px; }
.sante-mot { font-size: 14px; background: var(--fond); border-radius: 12px; padding: 10px 12px; }
.sante-propose { color: var(--orange-nuit); font-weight: 800; white-space: nowrap; }
.sante-actions-pleines .bouton { flex: 1 1 220px; }
.sante-dl { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 14px; }
.sante-dl dt { color: var(--gris); font-weight: 700; }
.sante-dl dd { margin: 0; font-weight: 600; }
.sante-section { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.sante-section-titre { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.sante-section-titre .ic { color: var(--orange-fonce); }
.sante-section .sante-champ { display: flex; flex-direction: column; gap: 6px; }
.sante-section input.saisie, .sante-section select.saisie, .sante-section textarea.saisie { width: 100%; }
.sante-section select.saisie { appearance: auto; padding: 0 10px; min-height: 48px; }
.sante-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.sante-choix-b { min-height: 44px; border-radius: 12px; border: 1px solid var(--trait-fort); background: var(--blanc); font-weight: 700; font-size: 14px; }
.sante-choix-b[aria-checked="true"] { border: 2px solid var(--orange-fonce); background: var(--orange-clair); color: var(--orange-nuit); }
.sante-especes { display: flex; flex-direction: column; }
.sante-espece { display: grid; grid-template-columns: minmax(0, 1fr) 104px 104px 104px; gap: 6px 10px; align-items: center; padding: 8px 0;
	border-top: 1px solid var(--trait); }
.sante-espece.tete { border-top: 0; padding: 0 0 4px; font-size: 12px; font-weight: 800; color: var(--gris); text-transform: uppercase; letter-spacing: .4px; }
.sante-espece .sante-case { min-height: 44px; }
.sante-jours-na { color: var(--gris); text-align: center; }
input.saisie.sante-jours-in { min-height: 44px; width: 100%; font-weight: 800; font-variant-numeric: tabular-nums; }
.sante-espece.change input.saisie.sante-jours-in { border: 2px solid var(--orange-fonce); box-shadow: 0 0 0 3px var(--orange-clair); }
.sante-etait { grid-column: 2 / -1; color: var(--orange-nuit); font-weight: 700; font-size: 12px; }
.sante-etait:empty { display: none; }
.sante-fixe { min-height: 48px; display: flex; align-items: center; font-weight: 700; }

.sante-note.chaude { background: var(--orange-clair); color: var(--orange-nuit); }
.sante-bloc { display: block; margin-top: 2px; }
.sante-maigre { font-weight: 500; font-size: 13px; }
.sante-cal { display: grid; font-size: 14px; }
.sante-cal-ligne { display: contents; }
.sante-cal-ligne > span { padding: 10px 8px; border-top: 1px solid var(--trait); min-width: 0; }
.sante-cal-tete > span { border-top: 0; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--gris);
	padding-top: 4px; line-height: 1.3; }
.sante-cal-puces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sante-cal-puce { display: inline-flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: 10px; background: var(--fond); max-width: 100%; }
.sante-cal-puce small { color: var(--gris); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input.saisie.sante-jours-in:disabled { border-style: dashed; background: var(--fond); }

@media (max-width: 1180px) {
	.sante-quands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
	.sante-cal { display: none; }
	.sante-col-actions { order: -1; }
	.sante-acte-g .bouton.petit, .sante-rangee .bouton.petit, .sante-ligne-edition .bouton.petit { min-height: 44px; }
	.sante-quands { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.sante-quand { padding: 12px 14px; }
	.sante-espece { grid-template-columns: minmax(0, 1fr) 72px 72px 72px; gap: 6px; }
	.sante-espece .sante-unite { display: none; }
	.sante-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.sante-dl dd { margin-bottom: 8px; }
	.sante-section { padding: 14px; }
	.sante-actions-pleines .bouton { flex-basis: 100%; }
}
