/* WSC Ferme — espace « Carte de la ferme » (lot K, maquette 14 et 14-modifier). Styles rangés sous .lk ; composants
   repris de docs/maquettes/maquettes-plan2.css (étiquettes de la ferme, légende, feuille du bas, outils de la carte).
   Les couleurs d'état ne servent qu'à leur sens ; l'orange reste à la ferme (choix, tracé en cours) et à ses actions. */

.page.page-large { max-width: 1320px; }
.lk { gap: 16px; }
.lk .lk-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.lk .lk-tete .pile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lk .lk-puces { display: flex; gap: 8px; flex-wrap: wrap; }
.lk .lk-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lk .segment { display: inline-flex; padding: 3px; border-radius: 14px; background: var(--gris-clair); gap: 2px; }
.lk .segment button { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 12px; border: 0;
	border-radius: 11px; background: none; color: var(--gris); font-weight: 700; font-size: 14px; cursor: pointer; }
.lk .segment button .ic { width: 17px; height: 17px; }
.lk .segment button[aria-pressed="true"] { background: var(--blanc); color: var(--encre); box-shadow: 0 1px 3px rgba(31, 26, 21, .12); }

.lk .lk-disposition { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 16px; align-items: start; }
.lk .lk-carte-plan { padding: 0; overflow: hidden; }
.lk .lk-c-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 18px 12px; }
.lk .lk-c-pied { padding: 12px 18px 14px; border-top: 1px solid var(--trait); }
.lk .lk-colonne { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* le plan et ses outils */
.lk .plan { position: relative; overflow: hidden; background: #F4EEE4; border-top: 1px solid var(--trait); height: 610px; }
.lk .plan > .fond-carte { position: absolute; inset: 0; }
.lk .plan .maplibregl-map { font-family: Figtree, system-ui, sans-serif; }
.lk .plan .outils { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.lk .plan .outil { width: 44px; height: 44px; border-radius: 12px; background: var(--blanc); border: 1px solid var(--trait-fort);
	display: grid; place-items: center; box-shadow: var(--ombre); color: var(--encre); padding: 0; cursor: pointer; }
.lk .plan .groupe-zoom { display: flex; flex-direction: column; border-radius: 12px; background: var(--blanc);
	border: 1px solid var(--trait-fort); box-shadow: var(--ombre); overflow: hidden; }
.lk .plan .groupe-zoom button { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center;
	padding: 0; cursor: pointer; color: var(--encre); }
.lk .plan .groupe-zoom button + button { border-top: 1px solid var(--trait); }
.lk .nord { position: absolute; left: 14px; top: 14px; z-index: 2; width: 42px; height: 42px; border-radius: 50%;
	background: var(--blanc); border: 1px solid var(--trait-fort); box-shadow: var(--ombre); display: grid; place-items: center;
	font-size: 12px; font-weight: 800; }
.lk .nord::before { content: ""; position: absolute; top: 5px; border: 5px solid transparent; border-bottom: 8px solid var(--orange-fonce); border-top: 0; }
.lk .nord span { margin-top: 8px; }
.lk .plan .maplibregl-ctrl-scale { border: 2px solid #8A7F73; border-top: 0; color: #4F463D; background: rgba(255, 255, 255, .88);
	font: 700 11px Figtree, sans-serif; padding: 1px 6px 0; }
.lk .plan .maplibregl-ctrl-attrib { font: 600 11px Figtree, sans-serif; background: rgba(255, 255, 255, .85); color: #4F463D; border-radius: 8px 0 0 0; }
.lk .plan .maplibregl-ctrl-attrib a { color: #4F463D; }
.lk .plan .maplibregl-ctrl-bottom-left .maplibregl-ctrl { margin: 0 0 12px 14px; }
.lk .plan-indisponible { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--gris); }

/* étiquettes de la ferme posées sur la carte (marqueurs MapLibre) */
.lk .etiq-carte { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; background: rgba(255, 255, 255, .97);
	border: 1px solid var(--trait-fort); border-radius: 999px; box-shadow: 0 1px 2px rgba(31, 26, 21, .10), 0 3px 10px rgba(31, 26, 21, .08);
	font: 400 12.5px/1.2 Figtree, system-ui, sans-serif; white-space: nowrap; color: var(--encre); cursor: pointer; min-height: 26px; }
.lk .etiq-carte b { font-weight: 800; }
.lk .etiq-carte .detail { color: var(--gris); font-weight: 600; }
.lk .etiq-carte.etat-ko .detail { color: var(--ko); }
.lk .etiq-carte.etat-attente .detail { color: #6E645A; }
.lk .pastille-carte { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.lk .pastille-carte .ic { width: 11px; height: 11px; stroke-width: 3; }
.lk .etiq-carte.choisie { border: 2px solid var(--orange-fonce); padding: 2px 9px 2px 3px; box-shadow: 0 0 0 4px rgba(254, 215, 170, .9), 0 4px 14px rgba(31, 26, 21, .14); }
.lk .etiq-carte.petite { padding: 2px 8px; font-size: 11.5px; background: rgba(255, 255, 255, .9); border-color: var(--trait); box-shadow: none; }
.lk .etiq-carte.petite b { font-weight: 700; color: var(--gris); }
.lk .etiq-carte.zone { border-radius: 12px; padding: 6px 10px 6px 6px; align-items: flex-start; background: rgba(255, 255, 255, .93); }
.lk .etiq-carte.zone .textes { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.lk .etiq-carte.zone .textes span { color: var(--gris); font-weight: 600; font-size: 12px; }
.lk .etiq-carte .echeance { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px;
	background: var(--orange-clair); color: var(--orange-nuit); font-weight: 700; font-size: 11.5px; }
.lk .etiq-carte .echeance.verrou { background: var(--ko-clair); color: var(--ko); }
.lk .etiq-carte .echeance.vide { background: var(--info-clair); color: var(--info); }
.lk .etiq-carte .echeance .ic { width: 12px; height: 12px; }
.lk .etiq-carte.cachee { visibility: hidden; }
.lk .hors-ligne-carte { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 4px 12px; border-radius: 999px;
	background: var(--ok-clair); color: var(--ok); font-size: 12.5px; font-weight: 700; }
.lk .hors-ligne-carte.info { background: var(--info-clair); color: var(--info); }
.lk .hors-ligne-carte.neutre { background: var(--gris-clair); color: var(--gris); }
.lk .hors-ligne-carte .ic { width: 15px; height: 15px; stroke-width: 2.5; }
.lk .hors-ligne-carte span { color: #3F6B4E; font-weight: 600; }
.lk .hors-ligne-carte.info span, .lk .hors-ligne-carte.neutre span { color: inherit; }

/* légende */
.lk .legende-etats { display: flex; flex-wrap: wrap; gap: 6px; }
.lk .legende-etats > span { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; border-radius: 999px;
	background: var(--blanc); border: 1px solid var(--trait); font-size: 13px; font-weight: 700; }
.lk .legende-etats b { font-variant-numeric: tabular-nums; }
.lk .legende-etats .ic { width: 15px; height: 15px; }
.lk .pastille { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.lk .pastille.ok { background: var(--ok); } .lk .pastille.ko { background: var(--ko); }
.lk .pastille.neutre { background: #B9AEA2; } .lk .pastille.attente { background: #8A7F73; }
.lk .pastille.occupe { background: var(--orange); } .lk .pastille.culture { background: #5B9E70; }
.lk .hachure { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--info); flex: none;
	background: repeating-linear-gradient(135deg, var(--info-clair) 0 3px, #B8C7DE 3px 4.5px); }

/* fiche de l'élément choisi (poste) */
.lk .lk-fiche { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.lk .lk-fiche.etat-ko { border: 2px solid #F3C1BB; }
.lk .lk-fiche.etat-vide { border: 2px solid #C9D5E8; }
.lk .lk-fiche h2 { font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.lk .lk-fiche-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.lk .lk-fiche-tete .lk-qui { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.lk .lk-fiche-tete .lk-qui > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lk .icone-rond { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--gris-clair); color: var(--gris); }
.lk .icone-rond.ko { background: var(--ko-clair); color: var(--ko); }
.lk .icone-rond.ok { background: var(--ok-clair); color: var(--ok); }
.lk .icone-rond.vide { background: var(--info-clair); color: var(--info); }
.lk .icone-rond.marque { background: var(--orange-clair); color: var(--orange-fonce); }
.lk .bandeau { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.lk .bandeau .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.lk .bandeau.ko { background: var(--ko-clair); color: var(--ko); }
.lk .bandeau.info { background: var(--info-clair); color: var(--info); }
.lk .bandeau.ok { background: var(--ok-clair); color: var(--ok); }
.lk .encart { background: var(--fond); border: 1px solid var(--trait); border-radius: 12px; padding: 2px 12px; font-size: 14px; }
.lk .ligne { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--trait); }
.lk .encart .ligne:first-child { border-top: 0; }
.lk .ligne > :last-child { text-align: right; }
.lk .ligne b { font-variant-numeric: tabular-nums; }
.lk .ligne.alerte b { color: var(--ko); }
.lk .rapide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.lk .rapide a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 58px;
	padding: 8px 0; border-radius: 12px; border: 1px solid var(--trait); background: var(--fond); font-size: 12.5px; font-weight: 700;
	color: var(--encre); text-decoration: none; }
.lk .rapide a .ic { color: var(--orange-fonce); }
.lk .rapide.un { grid-template-columns: 1fr; }
.lk .rapide.un a { flex-direction: row; gap: 8px; min-height: 48px; }
.lk .lk-boutons { display: flex; gap: 8px; }
.lk .lk-boutons .bouton { flex: 1; }
.lk .lk-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.lk .lk-liste li { display: flex; gap: 8px; align-items: flex-start; }
.lk .lk-liste .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--ko); }
.lk .lk-liste.infos .ic { color: var(--gris); }
.lk .jourx { 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; }
.lk .jourx small { display: block; font-size: 11px; text-transform: uppercase; color: var(--gris); letter-spacing: .4px; }
.lk .semaine .ligne { justify-content: flex-start; padding: 10px 0; }
.lk .semaine .ligne > :last-child { text-align: left; }
.lk .semaine .element { display: block; color: var(--gris); font-size: 12.5px; font-weight: 600; }
.lk .jourx.ko { background: var(--ko-clair); color: var(--ko); }
.lk .jourx.ko small { color: var(--ko); }
.lk .semaine .ligne:first-child { border-top: 0; }
.lk .semaine button.ligne { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; cursor: pointer;
	font: inherit; color: inherit; }
.lk .semaine button.ligne:first-child { border-top: 0; }
.lk .lk-carte-titre { font-size: 16px; font-weight: 800; }
.lk .a-placer { display: flex; flex-wrap: wrap; gap: 6px; }

/* mode « modifier le plan » */
.lk .palette { position: absolute; left: 14px; top: 14px; z-index: 2; background: var(--blanc); border: 1px solid var(--trait-fort);
	border-radius: 16px; box-shadow: var(--ombre); padding: 8px; display: flex; flex-direction: column; gap: 2px; width: 150px; }
.lk .palette .surtitre { font-size: 10.5px; padding: 6px 6px 4px; }
.lk .palette button { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 8px; border-radius: 10px; border: 0;
	background: none; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; color: var(--encre); }
.lk .palette button .ic { width: 17px; height: 17px; color: var(--gris); }
.lk .palette button[aria-pressed="true"] { background: var(--orange-clair); color: var(--orange-nuit); }
.lk .palette button[aria-pressed="true"] .ic { color: var(--orange-fonce); }
.lk .palette button[disabled] { opacity: .45; cursor: not-allowed; }
.lk .palette hr { border: 0; border-top: 1px solid var(--trait); margin: 4px 2px; width: auto; }
.lk .fond-vue { position: absolute; right: 70px; top: 14px; z-index: 2; }
.lk .fond-vue .segment { background: rgba(255, 255, 255, .95); box-shadow: var(--ombre); }
.lk .consigne { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2; display: flex; gap: 8px; align-items: center;
	background: var(--encre); color: #fff; border-radius: 999px; padding: 6px 6px 6px 14px; font-size: 13.5px; font-weight: 600;
	box-shadow: 0 4px 14px rgba(31, 26, 21, .25); max-width: calc(100% - 28px); }
.lk .consigne .bouton { min-height: 36px; border-radius: 999px; }
.lk .sommet { width: 14px; height: 14px; border-radius: 4px; background: #fff; border: 3px solid var(--orange-fonce);
	box-shadow: 0 1px 3px rgba(31, 26, 21, .25); cursor: grab; padding: 0; }
.lk .sommet.milieu { width: 10px; height: 10px; border-radius: 50%; border-width: 2px; }
.lk .pastille-surface { background: var(--orange-fonce); color: #fff; font-weight: 800; font-size: 14px; padding: 5px 12px; border-radius: 999px;
	box-shadow: 0 2px 8px rgba(31, 26, 21, .2); white-space: nowrap; pointer-events: none; }
.lk .pastille-surface small { font-weight: 700; margin-left: 4px; font-size: 12px; }
.lk .champ { display: flex; flex-direction: column; gap: 6px; }
.lk .champ .etiquette { font-size: 13px; font-weight: 700; color: var(--gris); }
.lk .champ input, .lk .champ select { min-height: 48px; border: 1px solid var(--trait-fort); border-radius: 12px; padding: 0 14px; background: var(--blanc);
	font-size: 15px; font-weight: 600; width: 100%; }
.lk .saisie-lue { min-height: 48px; border: 1px solid var(--trait-fort); border-radius: 12px; padding: 0 14px; display: flex; align-items: center;
	justify-content: space-between; gap: 8px; font-weight: 700; background: var(--fond); }
.lk .saisie-lue.vive { border: 2px solid var(--orange-fonce); background: var(--blanc); }
.lk .saisie-lue small { color: var(--gris); font-weight: 600; font-size: 12.5px; }
.lk .note { display: flex; gap: 8px; align-items: flex-start; background: var(--info-clair); color: var(--info); border-radius: 12px; padding: 10px 12px;
	font-size: 13px; font-weight: 600; }
.lk .note .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.lk .changement { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0;
	border-top: 1px solid var(--trait); font-size: 14px; }
.lk .changement:first-child { border-top: 0; }
.lk .changement .icone-rond { width: 34px; height: 34px; border-radius: 10px; }
.lk .changement .icone-rond .ic { width: 17px; height: 17px; }
.lk .changement > span { display: flex; flex-direction: column; min-width: 0; }
.lk .historique .ligne { align-items: flex-start; font-size: 13.5px; }

/* téléphone : carte d'abord, feuille de l'élément choisi en bas */
@media (max-width: 899px) {
	.lk { gap: 0; margin: -14px -16px 0; }
	.lk .lk-tel-tete { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 10px; background: var(--blanc); border-bottom: 1px solid var(--trait); }
	.lk .lk-tel-tete h1 { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
	.lk .lk-tel-puces { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
	.lk .lk-tel-puces::-webkit-scrollbar { display: none; }
	.lk .lk-tel-puces > * { flex: none; }
	.lk .lk-tel-puces .lecture { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
		border: 1px solid var(--encre); background: var(--encre); color: #fff; font-weight: 700; font-size: 14px; }
	.lk .lk-tel-puces .lecture .ic { width: 15px; height: 15px; }
	.lk .lk-tel-puces > span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 999px;
		border: 1px solid var(--trait); background: var(--blanc); font-size: 13.5px; font-weight: 700; }
	.lk .lk-tel-bandeau { padding: 9px 16px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
	.lk .lk-tel-bandeau.ok { background: var(--ok-clair); color: var(--ok); }
	.lk .lk-tel-bandeau.info { background: var(--info-clair); color: var(--info); }
	.lk .lk-tel-bandeau.neutre { background: var(--gris-clair); color: var(--gris); }
	.lk .lk-tel-bandeau .ic { width: 17px; height: 17px; flex: none; margin-top: 1px; }
	.lk .plan { height: max(300px, calc(100vh - 560px)); border-top: 0; }
	.lk .plan .outils { right: 12px; top: 12px; }
	.lk .plan .groupe-zoom { flex-direction: row; }
	.lk .plan .groupe-zoom button + button { border-top: 0; border-left: 1px solid var(--trait); }
	.lk .nord { left: auto; right: 12px; top: 66px; }
	.lk .fond-tel { position: absolute; left: 12px; top: 12px; z-index: 2; }
	.lk .fond-tel .segment { background: rgba(255, 255, 255, .94); box-shadow: var(--ombre); }
	.lk .fond-tel .segment button { min-height: 44px; padding: 0 11px; font-size: 13px; }
	.lk .plan .maplibregl-ctrl-bottom-left, .lk .plan .maplibregl-ctrl-bottom-right { bottom: 22px; }
	.lk .feuille { background: var(--blanc); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 28px rgba(31, 26, 21, .12);
		padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 10px; position: relative; margin-top: -22px; z-index: 3; }
	.lk .feuille::before { content: ""; width: 40px; height: 5px; border-radius: 9px; background: var(--trait-fort); align-self: center; margin-bottom: 2px; }
	.lk .feuille h2 { font-size: 19px; font-weight: 800; }
	.lk .feuille .lk-fiche-tete .lk-qui > span > .alerte { color: var(--ko); font-weight: 700; font-size: 13.5px; }
	.lk .feuille .encart { font-size: 13.5px; }
	.lk .lk-tel-bas { padding: 12px 16px 4px; display: flex; flex-direction: column; gap: 12px; }
	.lk .palette { width: auto; right: 12px; left: 12px; top: auto; bottom: 12px; flex-direction: row; flex-wrap: wrap; padding: 6px; }
	.lk .palette .surtitre, .lk .palette hr { display: none; }
	.lk .palette button { min-height: 44px; }
	.lk .consigne { bottom: auto; top: 12px; }
	.lk .fond-vue { display: none; }
}
@media (max-width: 380px) {
	.lk .rapide a { font-size: 12px; }
	.lk .lk-tel-tete h1 { font-size: 20px; }
}
