/* ================================================================
   Famille Recettes (super juice, acides, sirop, batch, dilution, pression, mousses).
   Pose sur tools.css, chargee par ces pages seulement. Ce qui servira
   aux autres familles est note pour le socle (outils-recettes.md).
   ================================================================ */

/* unite collee au chiffre, dans l'afficheur et la barre resultat */
.metric .v .u,.dwd-res .v .u{margin-left:4px;font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--mute-d)}
.metric.kpi .v .u{font-size:13px}

/* texte d'un repli (methode, sources) */
details.more .txt{display:grid;gap:10px;margin:2px 16px 16px;font-size:14.5px;line-height:1.55;color:var(--mute-c)}
details.more .txt b{color:var(--ink)}

/* deux ou quatre cases sous le kpi : deux par ligne, pas de case vide ni d'orpheline */
.card .metrics:has(>.metric:nth-child(3):last-child),.card .metrics:has(>.metric:nth-child(5):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
.card .metrics:has(>.metric:nth-child(5):last-child)>.metric:nth-child(4){border-left:0}

/* ligne d'alerte sous la reco */
.reco .sub{margin-top:8px}
.reco .bad{color:var(--bad)}
.reco .warn{color:var(--warn)}

/* l'etat pose sur le span du chiffre (et pas sur .v) allume aussi le voyant */
.metric.kpi:has(.v .good) .k::after{color:var(--good);background:currentColor}
.metric.kpi:has(.v .warn) .k::after{color:var(--warn);background:currentColor}
.metric.kpi:has(.v .bad) .k::after{color:var(--bad);background:currentColor}
.metric:not(.kpi) .v .good{color:var(--good)}.metric:not(.kpi) .v .warn{color:var(--warn)}.metric:not(.kpi) .v .bad{color:var(--bad)}

/* liste d'ingredients dosee (sirop, pression) : un filet, la quantite en chiffres */
.ingl{display:grid}
.ingl .r{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:10px 2px;border-bottom:1px solid var(--line);font-size:15px}
.ingl .r b{font-family:var(--num);font-variant-numeric:tabular-nums;font-weight:800;font-size:21px;color:var(--amb-c);white-space:nowrap}
.ingl .r b .u{margin-left:4px;font-family:var(--mono);font-size:10px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.ingl:empty{display:none}

/* methode du moment, sous l'afficheur */
.method{margin-top:18px;font-size:15px;line-height:1.55;color:var(--mute-c)}
.method:empty{display:none}
.method b{display:block;margin-bottom:4px;font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:var(--ink)}
.params .wide{grid-column:1/-1}

/* ligne d'ingredient a une seule pastille (batch) : la pastille prend la ligne */
.ing:not(:has(.pill+.pill)) .pill{grid-column:1/-1}
/* deux pastilles (dilution, pression) : deux colonnes, le cout et la croix au bout du nom */
.ing:has(.pill+.pill):not(:has(.pill+.pill+.pill)){grid-template-columns:repeat(2,minmax(0,1fr))}
.ing:has(.pill+.pill):not(:has(.pill+.pill+.pill)) :is(.del,.cost){grid-column:2}
.ing:not(:has(.cost)) .nm{padding-right:56px}

/* cinq cases sous le kpi : la derniere prend le reste de la ligne */
.card .metrics:has(>.metric:nth-child(6):last-child)>.metric:last-child{grid-column:span 2}

/* consigne de securite : visible, sans cadre */
.alert{margin-top:12px;font-size:14px;line-height:1.5;color:var(--bad)}
/* le nom s arrete avant le total, coupe proprement s il est long */
.card .ing:has(.cost) .nm{padding-right:128px;text-overflow:ellipsis}
