:root {
  --fond: #F2F4EF; --surface: #FFFFFF; --texte: #1C2620; --discret: #56615A; --bord: #D9DDD3;
  --vert: #1F4F39; --vert-clair: #E7F0EA; --alerte: #B4472B; --orange-fond: #FBEBDD; --orange: #8A4A12;
  --rayon: 12px;
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte); font-size: 16px; line-height: 1.45; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 26px; letter-spacing: -0.01em; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
a { color: var(--vert); }
.discret { color: var(--discret); }
.petit { font-size: 13px; }
.visuel-masque { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { max-width: 1100px; margin: 0 auto; }
.entete { background: var(--surface); border-bottom: 1px solid var(--bord); padding: 18px 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.entete.fonce { background: #2F6B4F; color: #fff; border: 0; }
.entete.fonce .retour { color: #fff; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.contenu { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.puces { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.puce { flex: none; padding: 8px 12px; border-radius: 999px; border: 1px solid #C9CEC3; text-decoration: none; color: var(--texte); font-size: 14px; }
.puce.active { background: var(--vert); color: #fff; border-color: var(--vert); font-weight: 700; }
.segments { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; background: #ECEFE8; border-radius: 10px; padding: 4px; max-width: 420px; }
.segments button { min-height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--discret); font: inherit; font-size: 14px; cursor: pointer; }
.segments button[aria-pressed="true"] { background: var(--surface); color: var(--texte); font-weight: 700; box-shadow: 0 1px 2px rgba(28, 38, 32, .15); }

.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.planches { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.planche { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 4px; min-height: 130px; padding: 8px 2px; border-radius: 8px; text-decoration: none; text-align: center; border: 1px solid transparent; }
.planche.vide { border: 1px dashed #9AA39C; }
.planche.alerte { outline: 2px dashed var(--alerte); outline-offset: 2px; }
.planche .num { font-size: 12px; font-weight: 700; }
.planche .cult { font-size: 11px; line-height: 1.2; word-break: break-word; }
.planche .toile { font-size: 11px; }
.planche:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #4F7FBF; outline-offset: 2px; }

.legende { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: #3C463F; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid #9AA39C; display: inline-block; }
.legende i.pointille { border: 2px dashed var(--alerte); }

.grille2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.grille3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grille2 > div, .grille3 > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.etiquette { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--discret); }

.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--vert-clair); }
.liste li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.formulaire { display: flex; flex-direction: column; gap: 6px; }
.formulaire label { font-size: 13px; color: var(--discret); margin-top: 4px; }
input, select, textarea { font: inherit; font-size: 16px; padding: 10px; border-radius: 10px; border: 1px solid #C9CEC3; background: var(--surface); color: var(--texte); width: 100%; min-height: 44px; }
button, .bouton { font: inherit; font-size: 15px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid #C9CEC3; background: var(--surface); color: var(--texte); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
button.principal { background: var(--vert); color: #fff; border-color: var(--vert); font-weight: 700; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.lien { border: 0; background: none; color: var(--alerte); padding: 0 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions > * { flex: 1 1 200px; }
.ligne-form { flex-direction: row; margin-top: 8px; }
.ligne-form button { flex: none; }

.tableau { padding: 0; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--bord); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--discret); }
td.d, th.d { text-align: right; }
td.boutons { display: flex; gap: 6px; }
td.boutons button { min-width: 44px; padding: 0; }
tr:last-child td { border-bottom: 0; }
.pastille { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 8px; vertical-align: -1px; }

.surtitre { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--discret); margin-bottom: 8px; }
.liste-travaux { padding: 0; gap: 0; }
.liste-travaux > a, .liste-travaux .tache, .liste-travaux > p { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-bottom: 1px solid #ECEFE8; text-decoration: none; color: var(--texte); margin: 0; }
.liste-travaux .tache { flex-direction: row; align-items: center; gap: 12px; }
.liste-travaux .tache input { width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--vert); }
.liste-travaux > :last-child { border-bottom: 0; }
.fait { text-decoration: line-through; color: var(--discret); }
.badge { align-self: flex-start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--orange-fond); color: var(--orange); font-size: 12px; font-weight: 700; }

.barre { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border-top: 1px solid var(--bord); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); }
.barre a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; text-decoration: none; color: var(--discret); font-size: 12px; }
.barre a.active { color: var(--vert); font-weight: 700; }
.barre svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.jardin { max-width: 640px; }
.contenu { align-items: stretch; }

/* Sélection multiple */
.petit-bouton { min-height: 36px; padding: 0 10px; font-size: 13px; }
.en-selection .planche { cursor: pointer; }
.planche.choisie { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px #4F7FBF; position: relative; }
.planche.choisie::after { content: "✓"; position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: #4F7FBF; color: #fff; font-size: 13px; line-height: 22px; text-align: center; }
.en-selection { padding-bottom: 150px; }
.barre-selection { position: fixed; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 2px solid #4F7FBF; padding: 10px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 -4px 12px rgba(28, 38, 32, .08); z-index: 5; }
.barre-selection .actions > * { flex: 1 1 120px; }
dialog { border: 0; border-radius: var(--rayon); padding: 18px; width: min(440px, calc(100vw - 32px)); color: var(--texte); }
dialog::backdrop { background: rgba(28, 38, 32, .45); }
.case { display: flex; align-items: center; gap: 10px; color: var(--texte) !important; }
.case input { width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--vert); }
#toast { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translate(-50%, -20px); background: #1C2620; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 10; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* Travaux */
.tache-ligne { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #ECEFE8; }
.liste-travaux > .tache-ligne:last-child { border-bottom: 0; }
.tache-ligne > input[type=checkbox] { width: 22px; height: 22px; min-height: 0; flex: none; margin-top: 2px; accent-color: var(--vert); }
.tache-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tache-texte label { cursor: pointer; }
.tache-boutons { display: flex; gap: 4px; flex: none; align-items: center; }
.icone { min-width: 40px; min-height: 40px; padding: 0; }
.icone svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.date-tache input { min-height: 36px; padding: 4px 8px; font-size: 14px; width: auto; max-width: 170px; }
.aide { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* Synchro et connexion */
.sync-etat { position: fixed; top: calc(8px + env(safe-area-inset-top)); right: 12px; z-index: 6; font-size: 12px; padding: 4px 10px 4px 22px; border-radius: 999px; background: var(--surface); border: 1px solid var(--bord); color: var(--discret); }
.sync-etat::before { content: ""; position: absolute; left: 9px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #9AA39C; }
.sync-etat[data-etat="ok"]::before { background: #2F8A57; }
.sync-etat[data-etat="envoi"]::before { background: #C9821E; }
.sync-etat[data-etat="hors"]::before, .sync-etat[data-etat="connexion"]::before { background: var(--alerte); }
.entete { padding-top: calc(42px + env(safe-area-inset-top)); }
.connexion { max-width: 440px; margin: 40px auto 0; }
.erreur { color: var(--alerte); font-size: 14px; margin: 0; min-height: 1em; }

/* Dates et échéances */
.liste li.plantation { flex-direction: column; align-items: stretch; }
.plantation-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plantation-tete > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dates-plantation label { font-size: 12px; color: var(--discret); }
.dates-plantation input { min-height: 40px; padding: 6px 8px; font-size: 15px; }
.echeance { font-weight: 700; color: var(--vert); }
.echeance.proche { color: #8A4A12; }
.echeance.retard { color: var(--alerte); }
.badge.rouge { background: #F6DAD3; color: #8E2F1A; }
.badge.neutre { background: var(--vert-clair); color: var(--vert); }
.champ-court { width: 90px; min-height: 38px; padding: 6px 8px; text-align: right; }
td select { min-height: 38px; padding: 6px 8px; width: auto; }
.segments button { font-size: 13px; }
.echeance.recolte { color: #2D5FA0; }
.grille3.dates-plantation { gap: 8px; }
@media (max-width: 420px) { .grille3.dates-plantation { grid-template-columns: 1fr 1fr; } }

/* Plan : toutes les zones, en-tête fixe */
.entete.collant { position: sticky; top: 0; z-index: 4; padding-top: calc(42px + env(safe-area-inset-top)); padding-bottom: 8px; gap: 8px; box-shadow: 0 2px 8px rgba(28, 38, 32, .06); }
.ligne-outils { display: flex; gap: 8px; align-items: center; }
.ligne-outils .segments { flex: 1; max-width: 460px; }
.ligne-outils .petit-bouton { flex: none; min-height: 48px; }
.entete .legende { flex-wrap: nowrap; overflow-x: auto; font-size: 12px; padding-bottom: 2px; }
.entete .legende span { flex: none; }
.zone { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 220px; }
.zone + .zone { margin-top: 18px; padding-top: 18px; border-top: 2px solid var(--bord); }
.zone-tete { display: flex; flex-direction: column; gap: 2px; }
.zone-tete h2 { font-size: 22px; }
.formulaire.edition { background: var(--surface); border-radius: 8px; padding: 10px; }
.plantation-tete .tache-boutons { align-items: center; }
.ligne-outils .segments button { font-size: 12.5px; padding: 0 2px; }
#form-marge .ligne-form { align-items: center; gap: 8px; flex-wrap: wrap; }

/* Chiffre d'affaires */
.eco { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--bord); padding-top: 8px; }
.eco-ligne { display: grid; grid-template-columns: 70px auto 1fr; gap: 4px 10px; align-items: baseline; }
.eco-ligne .discret { grid-column: 1 / -1; }
@media (min-width: 560px) { .eco-ligne .discret { grid-column: auto; } }
details summary { cursor: pointer; color: var(--vert); font-weight: 700; font-size: 14px; min-height: 36px; display: flex; align-items: center; }
.formulaire.mini { background: var(--surface); border-radius: 8px; padding: 10px; margin-top: 8px; }
.formulaire.mini h4 { margin: 0; font-size: 14px; }
.journal { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.journal li { display: grid; grid-template-columns: 90px 1fr auto; gap: 8px; align-items: center; background: var(--surface); border-radius: 6px; padding: 2px 4px 2px 8px; }
.perte { color: var(--alerte); }
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.chiffre strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.pos { color: #2F8A57; font-weight: 700; } .neg { color: var(--alerte); font-weight: 700; }
tr.total td { font-weight: 700; border-top: 2px solid var(--bord); }
.champ-annee { width: auto; min-height: 40px; }
.barre a { font-size: 11px; }

/* Calendrier */
.calendrier { padding-left: 0; padding-right: 0; }
.cal-defile { overflow-x: auto; }
.cal-grille { position: relative; min-width: 920px; padding: 0 16px 8px 0; }
.cal-ligne { display: grid; grid-template-columns: 84px 1fr; align-items: center; height: 34px; }
.cal-tete { height: 28px; position: sticky; top: 0; background: var(--fond); z-index: 2; }
.cal-tete .cal-piste { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--discret); }
.cal-tete .cal-piste span { border-left: 1px solid var(--bord); padding-left: 4px; }
.cal-nom { position: sticky; left: 0; z-index: 1; background: var(--fond); padding: 0 8px 0 16px; font-size: 12px; color: #3C463F; text-decoration: none; white-space: nowrap; height: 100%; display: flex; align-items: center; }
.cal-groupe { font-weight: 700; font-size: 14px; padding: 10px 16px 2px; position: sticky; left: 0; }
.cal-piste { position: relative; height: 100%; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 12 - 1px), #E3E6DE calc(100% / 12 - 1px), #E3E6DE calc(100% / 12)); border-bottom: 1px solid #ECEFE8; }
.cal-tete .cal-piste { background: none; border: 0; }
.cal-barre { position: absolute; top: 5px; bottom: 5px; min-height: 0; padding: 0 6px; border-radius: 6px; border: 2px solid transparent; font-size: 11px; font-weight: 700; display: flex; align-items: center; gap: 4px; overflow: hidden; justify-content: flex-start; }
.cal-barre.prevu { background: var(--surface); border-style: dashed; color: var(--texte); }
.cal-barre.passe { opacity: .75; }
.cal-texte { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-recolte { position: absolute; top: 0; bottom: 0; right: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.4) 0 3px, transparent 3px 7px); }
.cal-barre.prevu .cal-recolte { background: repeating-linear-gradient(45deg, rgba(28,38,32,.12) 0 3px, transparent 3px 7px); }
.cal-rot { position: relative; flex: none; width: 9px; height: 9px; border-radius: 50%; margin-left: auto; box-shadow: 0 0 0 2px #fff; }
.cal-aujourdhui { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--alerte); pointer-events: none; z-index: 3; }
.cal-aujourdhui span { position: absolute; top: 2px; left: 4px; font-size: 10px; font-weight: 700; color: var(--alerte); white-space: nowrap; }
.legende i.pointille-vert { border: 2px dashed #2F6B4F; background: #fff; }
.legende i.hachure { background: repeating-linear-gradient(45deg, rgba(255,255,255,.5) 0 3px, transparent 3px 6px), #2F6B4F; }
dialog.large { width: min(720px, calc(100vw - 32px)); }
.pv-liste { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.pv-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--bord); border-radius: 8px; color: var(--texte) !important; margin: 0 !important; }
.pv-item input { width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--vert); }
.pv-texte { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pastille-rond { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; vertical-align: -1px; }
.puce { cursor: pointer; font: inherit; font-size: 14px; background: var(--surface); }
/* Étiquettes */
.puces-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid #C9CEC3; background: var(--surface); font-size: 13px; color: var(--discret); display: inline-flex; align-items: center; gap: 4px; }
.tag.actif { background: var(--vert-clair); border-color: var(--vert); color: var(--vert); font-weight: 700; }
.tag.evite.actif { background: #F6DAD3; border-color: var(--alerte); color: #8E2F1A; }
.tag:disabled { opacity: 1; cursor: default; }
.tag-x { border: 0; background: none; min-height: 0; padding: 0 0 0 4px; font-size: 16px; color: inherit; }
.terrain { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-bottom: 1px solid #ECEFE8; }
.terrain-jardin { padding: 4px 0 4px 12px; }
.tableau-regles { display: flex; flex-direction: column; gap: 10px; }
.regle { display: grid; grid-template-columns: 130px 1fr 1fr; gap: 10px; align-items: start; padding-bottom: 10px; border-bottom: 1px solid #ECEFE8; }
.regle > div { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 700px) { .regle { grid-template-columns: 1fr; } }
.barre a { font-size: 10.5px; }
.code-zone { font-size: 14px; font-weight: 700; color: var(--vert); background: var(--vert-clair); border-radius: 6px; padding: 2px 8px; vertical-align: middle; }
.planche .num { font-size: 11.5px; letter-spacing: -.01em; }

/* Onglets internes */
.onglets { display: flex; gap: 4px; background: #ECEFE8; border-radius: 10px; padding: 4px; overflow-x: auto; }
.onglets button { flex: 1 0 auto; min-height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--discret); font: inherit; font-size: 14px; padding: 0 12px; }
.onglets button[aria-selected="true"] { background: var(--surface); color: var(--texte); font-weight: 700; box-shadow: 0 1px 2px rgba(28, 38, 32, .15); }
.onglet-contenu { display: flex; flex-direction: column; gap: 14px; }
.onglet-contenu[hidden] { display: none; }

/* Semis & plants */
.lots { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.lot { gap: 8px; }
.lot-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lot-tete strong { flex: 1; min-width: 0; }
.lot-qte { font-weight: 700; font-variant-numeric: tabular-nums; }
.lot-infos { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.lot-actions > * { flex: 0 1 auto; }
.badge.semis { background: #E3EDF8; color: #2D5FA0; align-self: center; margin: 0; }
.badge.achat { background: #F3E9DC; color: #8A4A12; align-self: center; margin: 0; }
.barre a { font-size: 10px; }
.barre svg { width: 20px; height: 20px; }
.entete .actions > * { flex: 1 1 140px; }
.barre { z-index: 20; }
.a-placer { border: 1px solid #E9C9A6; background: #FDF6EE; border-radius: 10px; padding: 0 10px 6px; }
.a-placer summary { color: #8A4A12; }
.a-placer .liste-travaux { background: var(--surface); border-radius: 8px; }
.a-placer .tache-ligne { align-items: center; }
.pv-outils { display: flex; flex-direction: column; gap: 8px; }
.pv-filtres { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-filtres .tag { gap: 6px; }
.pv-filtres .tag:not(.actif) { opacity: .55; text-decoration: line-through; }
.legende-pastilles { margin: 0; }
.pv-item.occupee { border-style: dashed; background: #FBF1EE; }
.pv-item[hidden] { display: none; }
.cal-barre.sans-fin { border-right-style: none; border-top-right-radius: 0; border-bottom-right-radius: 0; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
a.bouton.petit-bouton { text-decoration: none; }
.pv-item { flex-wrap: wrap; }
.pv-empl { flex-basis: 100%; padding-left: 32px; }
.pv-empl select { min-height: 38px; padding: 6px 8px; font-size: 14px; width: auto; }

/* Compostage */
.bacs-ligne { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.bacs-ligne > .bac { flex: 1 0 200px; }
.bacs-ligne.petits > .bac { flex: 0 1 300px; }
.fleche { align-self: center; font-size: 22px; color: var(--discret); flex: none; }
.bac { border-top: 6px solid var(--coul); gap: 6px; }
.bac-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bac-etat { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.pastille-bac { width: 12px; height: 12px; border-radius: 3px; background: var(--coul); border: 1px solid #9AA39C; }
.jauge { height: 8px; border-radius: 4px; background: #ECEFE8; overflow: hidden; }
.jauge span { display: block; height: 100%; background: var(--coul); }
.bac-actions { margin-top: auto; }
.bac-actions > * { flex: 1 1 auto; }
.bac-actions select { min-height: 38px; }
.cycle { margin-top: 10px; }
.lien-carte { text-decoration: none; color: var(--texte); }

/* Arrosage */
.num-groupe { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #2D5FA0; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.ligne-zone td { background: #ECEFE8; font-weight: 700; font-size: 13px; }
.case-tableau { display: inline-flex; align-items: center; gap: 6px; }
.case-tableau input { width: 20px; height: 20px; min-height: 0; accent-color: var(--vert); }
.champ-entite { min-height: 36px; padding: 4px 8px; font-size: 13px; width: 190px; font-family: ui-monospace, monospace; }
.lien-bouton { border: 0; background: none; color: var(--vert); text-decoration: underline; padding: 0; min-height: 0; font-size: inherit; }

/* Arrosage : jours, pluie */
.jours-arrosage { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.jour-ar { flex-direction: column; gap: 0; padding: 6px 2px; min-height: 64px; font-size: 12px; line-height: 1.25; }
.jour-ar strong { font-size: 17px; }
.jour-ar.vide { color: var(--discret); background: transparent; }
.jour-ar.actif { background: var(--vert); color: #fff; border-color: var(--vert); }
.pause-pluie.active { background: #E6EEF6; border-color: #9DB6CF; }
.pause-pluie .actions-ligne { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pause-pluie .actions-ligne input { width: auto; flex: 1 1 140px; }
/* Placement automatique */
.cal-barre.prevu.auto { background: repeating-linear-gradient(135deg, #FFF8EC 0 6px, #FDEBD3 6px 12px); border-style: dotted; }
.bandeau-auto { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #E9C9A6; background: #FDF6EE; border-radius: 10px; }
.bandeau-auto > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
#dlg-auto .liste-travaux { max-height: 40vh; overflow-y: auto; }
/* Tableau de bord */
.tableau-bord { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.tableau-bord .tb-energie { grid-column: 1 / -1; }
.carte-tb > .ligne { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ordre-tb { display: flex; align-items: center; gap: 6px; padding: 6px 8px; margin: -6px -6px 0; background: var(--vert-clair); border-radius: 8px; }
.ordre-tb span { flex: 1; font-weight: 700; }
.organiser .carte-tb { border-style: dashed; }
.alertes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.alerte { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: var(--vert-clair); }
.alerte > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.alerte a { color: inherit; }
.alerte-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: #2D5FA0; }
.alerte.critique { background: #F6DAD3; } .alerte.critique .alerte-ico { background: var(--alerte); }
.alerte.attention { background: var(--orange-fond); } .alerte.attention .alerte-ico { background: #A9601E; }
.alerte.info { background: #E3EDF8; }
.seq-tb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.seq-tb li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--bord); font-size: 14px; }
.seq-heure { font-weight: 700; font-variant-numeric: tabular-nums; }
.seq-sect { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seq-etat { font-size: 12px; color: var(--discret); }
.seq-tb li.fait { opacity: .6; }
.seq-tb li.cours { border-color: #2D5FA0; background: #E3EDF8; } .seq-tb li.cours .seq-etat { color: #2D5FA0; font-weight: 700; }
.statut-vannes { margin: 0; display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; background: var(--orange-fond); }
.statut-vannes.en-cours { background: #E3EDF8; color: #1E4677; }
.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chiffres div { display: flex; flex-direction: column; background: var(--fond); border-radius: 8px; padding: 8px 10px; }
.chiffres strong { font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.chiffres span { font-size: 12px; color: var(--discret); }
.liste-tb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.liste-tb li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--bord); font-size: 14px; }
.liste-tb .badge { margin: 0; flex: none; }
.meteo-actuel { display: flex; align-items: center; gap: 12px; }
.meteo-temp { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.ico-meteo { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; color: #3C463F; }
.meteo-actuel .ico-meteo { width: 42px; height: 42px; }
.previsions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.prev { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 8px; background: var(--fond); text-align: center; }
.prev.gel { background: #E3EDF8; box-shadow: inset 0 0 0 2px #2D5FA0; }
.prev-pluie { color: #2D5FA0; }
.puces.petites .puce { min-height: 34px; padding: 4px 12px; font-size: 13px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.tuile { display: flex; flex-direction: column; gap: 2px; background: var(--fond); border-radius: 8px; padding: 10px; }
.tuile strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.tuile .pastille-rond { width: 10px; height: 10px; }
.jauge { display: block; height: 6px; border-radius: 3px; background: #E3E6DE; overflow: hidden; margin-top: 4px; }
.jauge span { display: block; height: 100%; background: #8A3F78; border-radius: 3px; }
.petit-titre { font-size: 14px; margin-top: 4px; }
.graphe { position: relative; }
.graphe svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.graphe .grille { stroke: #E3E6DE; stroke-width: 1; }
.graphe .axe { font-size: 11px; fill: var(--discret); font-family: inherit; }
.graphe .curseur { stroke: #8A938D; stroke-width: 1; stroke-dasharray: 3 3; }
.infobulle { position: absolute; top: 0; pointer-events: none; background: var(--surface); border: 1px solid var(--bord); border-radius: 8px; padding: 6px 8px; font-size: 12px; box-shadow: 0 4px 14px rgba(28,38,32,.12); display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.infobulle i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.vide-tb { border: 1px dashed var(--bord); border-radius: 10px; padding: 14px; background: var(--fond); }
.vide-tb p { margin: 0 0 4px; }
.groupe-ha { border: 1px solid var(--bord); border-radius: 10px; padding: 10px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.groupe-ha legend { font-weight: 700; padding: 0 4px; }
.groupe-ha p { margin: 0; }
.champ-ha { display: grid; grid-template-columns: 170px 1fr auto; gap: 8px; align-items: center; }
.champ-ha label { margin: 0; font-size: 14px; }
.valeur-ha { font-size: 13px; font-weight: 700; color: #2F8A57; white-space: nowrap; }
.valeur-ha.absente { color: var(--alerte); }
.case-ligne { display: flex; align-items: center; gap: 10px; }
.case-ligne input { width: 22px; height: 22px; min-height: 0; accent-color: var(--vert); }
@media (max-width: 560px) { .champ-ha { grid-template-columns: 1fr; gap: 4px; } .tableau-bord { grid-template-columns: 1fr; } }
.graphe .cache { display: none; }
.graphes { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) { .graphes { grid-template-columns: 3fr 2fr; } }
.meteo-temp { white-space: nowrap; }
.infobulle[hidden] { display: none; }
.carte-tb p { margin: 0; }
/* Matériel */
.grille-mat { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.carte-mat { gap: 4px; }
.carte-mat .ligne { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stock-piece { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.stock-piece .icone { min-height: 32px; min-width: 32px; font-size: 18px; font-weight: 700; }
tr.ligne-alerte td { background: #FDF3F0; }
.alerte-carte { border-color: #E9B5A6; background: #FDF3F0; }
button.danger { color: var(--alerte); border-color: #E9B5A6; }
details.carte summary { cursor: pointer; font-weight: 700; }
#form-releve { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Intrants */
.sel-planches { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow-y: auto; border: 1px solid var(--bord); border-radius: 10px; padding: 8px; }
.sel-planches summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.sel-jardin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0 6px; border-top: 1px solid #ECEFE8; }
.sel-jardin .puces-tags { flex: 1; }
.sel-jardin .tag { min-height: 34px; padding: 4px 10px; }
.cal-intrant { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; transform: rotate(45deg); background: #6E6A2E; border: 2px solid #fff; z-index: 2; pointer-events: auto; }
.cal-intrant.traitement { background: #2D5FA0; }
.leg-intrant { display: inline-block; width: 9px !important; height: 9px !important; transform: rotate(45deg); background: #6E6A2E; }
.leg-intrant.traitement { background: #2D5FA0; }
p.alerte { margin: 0; display: block; }
table.registre td { font-size: 13px; vertical-align: top; }
table.registre td .discret { display: block; }
.retour-clair { color: var(--vert); text-decoration: none; }
@media print {
  .barre, .sync-etat, .no-print, #toast, .puces { display: none !important; }
  body { padding: 0; background: #fff; }
  .entete, .carte { border: 0; box-shadow: none; }
  .tableau { overflow: visible !important; }
  table.registre td, table.registre th { font-size: 10px; padding: 3px 4px; }
}
.bloc { display: block; }
button.danger-plein { background: var(--alerte); border-color: var(--alerte); color: #fff; }
#dlg-confirmer .actions { justify-content: flex-end; }
/* Huiles, graisses, carburants */
.fluides { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-fluide { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #ECEFE8; color: #2D3530; white-space: nowrap; }
.chip-fluide b { font-weight: 700; }
.chip-fluide.t-carburant { background: #FBEBDD; color: #7A3E0C; }
.chip-fluide.t-huile { background: #F6EFD2; color: #5E4A08; }
.chip-fluide.t-graisse { background: #E3EDF8; color: #1E4677; }
.tache-ligne > .chip-fluide { align-self: center; flex: none; }
