/* WSC Ferme — espace conseiller et partages de la ferme (plan 2, lot E, maquette 18) : alertes du jour de plusieurs
   fermes, la liste des fermes et leur état, bandes comparées, visites ; côté ferme, chaque partage, ce qu'il montre, ses
   lectures et sa coupure. Système visuel des maquettes, cibles de 44 px au téléphone. */

.cs { display: flex; flex-direction: column; gap: 16px; }
.cs .cs-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cs .cs-tete-texte { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cs .cs-tete-texte .titre { font-size: 28px; font-weight: 800; letter-spacing: -.4px; }
.cs .cs-tete-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cs .cs-puces { display: flex; flex-wrap: wrap; gap: 6px; }
.cs .cs-deux { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.cs .cs-carte { padding: 0; min-width: 0; }
.cs .cs-c-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 18px 0; flex-wrap: wrap; }
.cs .cs-c-titre { font-size: 15px; font-weight: 800; margin: 0; }
.cs .cs-c-corps { padding: 12px 18px 18px; display: flex; flex-direction: column; }
.cs .cs-retour { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; min-height: 32px; }

.cs .cs-alerte { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 0;
	border-top: 1px solid var(--trait); }
.cs .cs-alerte:first-child { border-top: 0; padding-top: 2px; }
.cs .cs-rond { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--orange-clair); color: var(--orange-fonce); }
.cs .cs-rond.ko { background: var(--ko-clair); color: var(--ko); }
.cs .cs-rond.neutre { background: var(--gris-clair); color: var(--gris); }
.cs .cs-alerte-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cs .cs-alerte h3 { margin: 2px 0 3px; font-size: 16px; font-weight: 800; }
.cs .cs-ferme { font-size: 13px; font-weight: 700; color: var(--gris); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cs .cs-actions { display: flex; gap: 6px; }
.cs .cs-actions .bouton { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; text-decoration: none; }
.cs .cs-fictive { min-height: 20px; font-size: 11px; padding: 0 7px; }
.cs .cs-vide { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px; color: var(--gris); text-align: center; }
.cs .cs-vide .ic { width: 28px; height: 28px; color: var(--ok); }

.cs .cs-ferme-l { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 0; border-top: 1px solid var(--trait);
	color: inherit; text-decoration: none; }
.cs .cs-ferme-l:first-child { border-top: 0; padding-top: 0; }
.cs .cs-ferme-l:hover b { color: var(--orange-nuit); }
.cs .cs-especes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; color: var(--gris); font-size: 12.5px; align-items: center; }
.cs .cs-especes span { display: inline-flex; align-items: center; gap: 4px; }
.cs .cs-especes .ic { width: 14px; height: 14px; }
.cs .cs-perimetre { background: var(--fond); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--gris); display: flex; gap: 8px;
	align-items: flex-start; margin: 10px 0 0; }
.cs .cs-perimetre .ic { width: 17px; height: 17px; flex: none; margin-top: 1px; }

.cs .cs-cadre-table { overflow-x: auto; }
.cs table.cs-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.cs table.cs-t th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--gris);
	padding: 8px; border-bottom: 1px solid var(--trait-fort); white-space: nowrap; }
.cs table.cs-t td { padding: 11px 8px; border-bottom: 1px solid var(--trait); white-space: nowrap; }
.cs table.cs-t tbody tr:last-child td { border-bottom: 0; }
.cs table.cs-t .d { text-align: right; }
.cs table.cs-t td.fort { font-weight: 800; }
.cs table.cs-t td.ko { color: var(--ko); font-weight: 700; }
.cs table.cs-t td.cs-nom { white-space: normal; min-width: 150px; }
.cs .cs-bande { display: flex; flex-direction: column; line-height: 1.25; }
.cs .cs-bande small { font-size: 12px; }
.cs .cs-cartes-tel { display: none; }

.cs .cs-visite { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--trait); }
.cs .cs-visite:first-child { border-top: 0; }
.cs .cs-visite-texte { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cs .cs-jour { width: 46px; flex: none; text-align: center; border-radius: 10px; background: var(--gris-clair); padding: 5px 0; font-weight: 800;
	line-height: 1.1; font-size: 17px; }
.cs .cs-jour small { display: block; font-size: 11px; text-transform: uppercase; color: var(--gris); letter-spacing: .4px; }
.cs .cs-jour.chaud { background: var(--orange-fonce); color: #fff; }
.cs .cs-jour.chaud small { color: #fff; }
.cs .cs-ligne { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--trait); font-size: 14px; }
.cs .cs-ligne:first-of-type { border-top: 0; }
.cs .cs-deux-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modale .cs-deux-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* partages (côté ferme) */
.pt { display: flex; flex-direction: column; gap: 14px; }
.pt .pt-intro { display: flex; gap: 10px; align-items: flex-start; background: var(--blanc); border: 1px solid var(--trait); border-radius: 14px;
	padding: 12px 14px; color: var(--gris); font-size: 14px; margin: 0; }
.pt .pt-intro .ic { color: var(--ok); flex: none; }
.pt .pt-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.pt .pt-partage { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }
.pt .pt-partage.pt-ferme { background: var(--fond); }
.pt .pt-entre { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.pt .pt-qui { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pt .pt-qui h2 { margin: 0; font-size: 17px; font-weight: 800; }
.pt .pt-rond { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--orange-clair); color: var(--orange-fonce); flex: none; }
.pt .pt-puces { display: flex; flex-wrap: wrap; gap: 6px; }
.pt .pt-lignes { display: flex; flex-direction: column; }
.pt .pt-lignes div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--trait); font-size: 14px; }
.pt .pt-lignes div:first-child { border-top: 0; }
.pt .pt-traces summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 6px; list-style: none; }
.pt .pt-traces summary::-webkit-details-marker { display: none; }
.pt .pt-traces summary .ic { transition: transform .15s; }
.pt .pt-traces[open] summary .ic { transform: rotate(180deg); }
.pt .pt-traces ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pt .pt-traces li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.pt .pt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pt .pt-vide { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; color: var(--gris); }
.pt .pt-vide .ic { width: 28px; height: 28px; color: var(--orange); }
.pt .pt-surtitre { margin-top: 6px; }
.pt .ko-texte { color: var(--ko); }
.pt-modale .pt-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pt-modale .pt-cases { border: 0; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.pt-modale .pt-cases legend { font-weight: 800; margin-bottom: 6px; }
.pt-modale .pt-case { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--trait); border-radius: 12px; cursor: pointer; }
.pt-modale .pt-case input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--orange-fonce); flex: none; }
.pt-modale .pt-case span { display: flex; flex-direction: column; gap: 2px; }
.pt-modale .pt-case small { color: var(--gris); font-size: 13px; }
.pt-modale .pt-jamais { background: var(--fond); cursor: default; }
.pt-modale .pt-apercu h3 { font-size: 14px; font-weight: 800; margin: 12px 0 4px; }
.pt-modale .pt-apercu ul { margin: 0; padding-left: 18px; }
.modale .pt-avertissement { display: flex; gap: 10px; align-items: flex-start; background: var(--orange-clair); color: var(--orange-nuit); border-radius: 12px;
	padding: 10px 12px; font-weight: 600; }
.modale .pt-code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 13px; word-break: break-all; }

@media (max-width: 1100px) {
	.cs .cs-deux { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
	.cs .cs-tete-texte .titre { font-size: 23px; }
	.cs .cs-retour { min-height: 44px; }
	.cs .cs-tete-actions { width: 100%; }
	.cs .cs-tete-actions .bouton { flex: 1 1 auto; justify-content: center; }
	.cs .cs-alerte { grid-template-columns: 36px minmax(0, 1fr); }
	.cs .cs-alerte .cs-rond { width: 36px; height: 36px; }
	.cs .cs-alerte .cs-actions { grid-column: 2; }
	.cs .cs-actions .bouton { min-height: 44px; }
	.cs .cs-cadre-table { display: none; }
	.cs .cs-cartes-tel { display: flex; flex-direction: column; gap: 8px; }
	.cs .cs-carte-tel { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--trait); border-radius: 14px; }
	.cs .cs-carte-tel-tete { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
	.cs .cs-carte-tel-chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
	.cs .cs-carte-tel-chiffres span { display: flex; flex-direction: column; justify-content: space-between; gap: 2px; }
	.cs .cs-carte-tel-chiffres small { color: var(--gris); font-size: 12px; }
	.cs .cs-carte-tel-chiffres strong { font-size: 16px; font-weight: 800; }
	.pt .pt-liste { grid-template-columns: minmax(0, 1fr); }
	.pt .pt-actions .bouton { flex: 1 1 auto; justify-content: center; }
	.pt-modale .pt-deux, .modale .cs-deux-champs { grid-template-columns: minmax(0, 1fr); }
}
