/* =====================================================================
   NOUVEAUTÉS (livraison 48) — partie ordinateur seulement.
   Recherche dans les listes, pages vides, tableaux, résumé du jour,
   logo, fiche producteur, premiers pas. Ne touche pas au plan du bâtiment.
   ===================================================================== */

/* ---------- Recherche dans les listes (js/recherche-liste.js) ---------- */
.rl-boite { position: fixed; z-index: 10050; background: #fff; border: 1px solid var(--bord-fort); border-radius: var(--r-s);
  box-shadow: 0 10px 28px rgba(15, 30, 51, .16); overflow-y: auto; padding: 4px; font-size: 14px; }
.rl-titre { font: 600 11px var(--sans); color: var(--sourdine); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px 4px; }
.rl-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px;
  padding: 8px 10px; color: var(--encre); cursor: pointer; font: inherit; }
.rl-item b { font-weight: 700; color: var(--vert-700); }
.rl-item:hover, .rl-item.actif { background: var(--vert-50); }
.rl-item .rl-ico { width: 15px; height: 15px; color: var(--sourdine); flex: none; }
.rl-rien { padding: 10px 12px; color: var(--sourdine); font-size: 13px; }

/* ---------- Pages vides illustrées ---------- */
.vide .vide-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--vert-50); display: grid; place-items: center; }
.vide .vide-ico svg { width: 28px; height: 28px; color: var(--vert-600); }
.vide .vide-txt { color: var(--encre-2); font-weight: 500; max-width: 420px; }
.vide .btn svg { width: 16px; height: 16px; color: currentColor; }
.vide-muet .vide-ico { display: none; }

/* ---------- Tableaux plus lisibles ---------- */
body:not(.tel2-actif) table.tab tbody tr:nth-child(even) > td { background: #f6f8fb; }
body:not(.tel2-actif) table.tab tbody tr:hover > td { background: #f3f6fa; }
body:not(.tel2-actif) table.tab tr.cliquable:hover > td { background: var(--vert-50); }
body:not(.tel2-actif) table.tab tr.tab-total > td,
body:not(.tel2-actif) table.tab tfoot td { font-weight: 700; color: var(--encre); background: var(--page); border-top: 2px solid var(--bord-fort); }
body:not(.tel2-actif) table.tab td.tab-zero { color: var(--sourdine); }
@media (min-width: 701px) {
  body:not(.tel2-actif) .defil.defil-tient { overflow: visible; }
  body:not(.tel2-actif) .defil.defil-tient > table.tab > thead th { position: sticky; top: var(--haut-h, 70px); z-index: 3;
    box-shadow: inset 0 -1px 0 var(--bord); }
}
@media print { .rl-boite { display: none !important; } }

/* ---------- Résumé du jour (js/accueil-jour.js) ---------- */
.aj { background: var(--marine-900); color: #fff; border-radius: var(--r); padding: 18px 20px; margin: 0 0 18px; }
.aj-tete h2 { margin: 0; font-size: 22px; font-weight: 700; color: #fff; }
.aj-tete p { margin: 2px 0 0; color: var(--marine-300); font-size: 13.5px; }
.aj-tuiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.aj-tuile { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-s); padding: 12px 14px; color: #fff; cursor: pointer; font: inherit; }
.aj-tuile:hover { background: rgba(255,255,255,.11); }
.aj-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.aj-ico svg { width: 19px; height: 19px; }
.aj-orange .aj-ico { background: rgba(224,133,47,.2); color: var(--vert-500); }
.aj-bleu .aj-ico { background: rgba(42,120,214,.22); color: #8fbaf0; }
.aj-vert .aj-ico { background: rgba(21,160,90,.2); color: #6fd6a0; }
.aj-rouge .aj-ico { background: rgba(224,71,63,.22); color: #ff9a93; }
.aj-gris .aj-ico { background: rgba(255,255,255,.08); color: var(--marine-300); }
.aj-txt { display: grid; gap: 1px; min-width: 0; }
.aj-lib { font-size: 12.5px; color: var(--marine-300); }
.aj-val { font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.aj-val small { font-size: 14px; font-weight: 600; color: var(--marine-300); }
.aj-pied { font-size: 12px; color: var(--marine-300); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .aj-tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Logo de l'exploitation dans le menu ---------- */
.barre-expl { display: flex; align-items: center; gap: 10px; margin: 4px 14px 10px; padding: 8px 10px; border-radius: var(--r-s); background: rgba(255,255,255,.06); }
.barre-expl img { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; flex: none; }
.barre-expl span { color: #fff; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmr-pied-logo { height: 7mm; width: auto; vertical-align: middle; margin-right: 2mm; }

/* ---------- Fiche producteur (js/bilans.js) ---------- */
.fp { padding: 18px 20px; margin-bottom: 16px; }
.fp-tete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fp-avatar { width: 48px; height: 48px; border-radius: 14px; background: var(--marine-900); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.fp-tete h2 { margin: 0; font-size: 20px; }
.fp-tete p { margin: 2px 0 0; color: var(--sourdine); font-size: 13px; }
.fp-btns { margin-left: auto; display: flex; gap: 8px; }
.fp-chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.fp-chiffres > div { background: var(--page); border-radius: var(--r-s); padding: 10px 12px; display: grid; }
.fp-chiffres > div:first-child { background: var(--vert-50); }
.fp-chiffres span { font-size: 12px; color: var(--encre-2); }
.fp-chiffres b { font-size: 22px; font-variant-numeric: tabular-nums; }
.fp-chiffres small { font-size: 12px; color: var(--sourdine); }
.fp-bas { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; }
.fp h3 { font-size: 13px; margin: 0 0 6px; color: var(--encre-2); }
.fp-cote h3 + * { margin-bottom: 12px; }
.fp-cels { display: flex; flex-wrap: wrap; gap: 6px; }
.fp-cels span { background: var(--page); border: 1px solid var(--bord); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.fp-mv { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 13px; }
.fp-sens { display: inline-block; min-width: 52px; font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 1px 6px; text-align: center; margin-right: 4px; }
.fp-sens.e { background: var(--ok-50); color: var(--ok-800); } .fp-sens.s { background: var(--bleu-50); color: var(--bleu-700); }
.bil-courbe { width: 100%; height: auto; display: block; }
@media (max-width: 1000px) { .fp-bas, .fp-chiffres { grid-template-columns: 1fr 1fr; } .fp-bas { grid-template-columns: 1fr; } }

/* ---------- Feuilles imprimées : en-tête commun, bilan de saison ---------- */
.bilan-feuille, .doc-entete, .doc-pied { display: none; }
@media print {
  body.impression-bilan > *:not(#bilan-feuille) { display: none !important; }
  body.impression-bilan { background: #fff !important; }
  body.impression-bilan #bilan-feuille { display: block !important; font-size: 10pt; color: #111; }
  .doc-entete { display: flex !important; align-items: center; gap: 10px; margin-bottom: 6px; }
  .doc-entete img { height: 14mm; width: auto; max-width: 40mm; object-fit: contain; }
  .doc-entete b { display: block; font-size: 11pt; } .doc-entete span { display: block; font-size: 8.5pt; color: #555; }
  .doc-pied { display: block !important; margin-top: 10px; padding-top: 5px; border-top: 1px solid #bbb; font-size: 8pt; color: #666; text-align: center; }
  #bilan-feuille .bil-tete { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #111; padding-bottom: 6px; margin-bottom: 10px; }
  #bilan-feuille h1 { font-size: 19pt; margin: 0 0 2px; } #bilan-feuille .bil-tete p { margin: 0; font-size: 11.5pt; }
  #bilan-feuille .bil-date { text-align: right; font-size: 9pt; font-weight: 600; } #bilan-feuille .bil-date span { font-weight: 400; color: #555; }
  #bilan-feuille .bil-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
  #bilan-feuille .bil-kpis > div { border: 1px solid #ccc; border-radius: 6px; padding: 5px 8px; display: grid; }
  #bilan-feuille .bil-kpis .fort { border: 1.5px solid #e0852f; background: #fdf4ea; }
  #bilan-feuille .bil-kpis span, #bilan-feuille .bil-kpis small { font-size: 8pt; color: #555; } #bilan-feuille .bil-kpis b { font-size: 13pt; }
  #bilan-feuille h3 { font-size: 10.5pt; margin: 10px 0 4px; break-after: avoid; }
  #bilan-feuille .bil-courbe { max-height: 50mm; }
  #bilan-feuille .bil-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; }
  #bilan-feuille table { width: 100%; border-collapse: collapse; font-size: 9pt; }
  #bilan-feuille th { text-align: left; font-size: 8pt; color: #555; border-bottom: 1px solid #999; padding: 3px 5px; }
  #bilan-feuille td { border-bottom: 1px solid #e3e3e3; padding: 3px 5px; }
  #bilan-feuille tbody tr:nth-child(even) td { background: #f7f7f7; }
  #bilan-feuille tfoot td { border-top: 1.5px solid #111; border-bottom: 0; font-weight: 700; }
  #bilan-feuille .num { text-align: right; white-space: nowrap; }
  #bilan-feuille tr { break-inside: avoid; }
  #bilan-feuille .bil-note { font-size: 8pt; color: #666; margin-top: 8px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Guide de premiers pas ---------- */
.pp { padding: 18px 20px; margin-bottom: 18px; border: 1.5px solid var(--vert-200); }
.pp-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pp-tete h2 { margin: 0; font-size: 18px; } .pp-tete p { margin: 2px 0 0; color: var(--sourdine); font-size: 13px; }
.pp-barre { height: 8px; border-radius: 99px; background: var(--page); margin: 12px 0 6px; overflow: hidden; }
.pp-barre i { display: block; height: 100%; background: var(--vert-600); border-radius: 99px; }
.pp-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pp-liste li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--bord); }
.pp-liste li:last-child { border-bottom: 0; }
.pp-liste li > div { flex: 1; display: grid; } .pp-liste li span:not(.pp-num):not(.pp-ok) { color: var(--sourdine); font-size: 13px; }
.pp-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--page); font-weight: 700; font-size: 13px; color: var(--encre-2); flex: none; }
.pp-num svg { width: 16px; height: 16px; }
.pp-liste li.fait .pp-num { background: var(--ok-100); color: var(--ok-800); }
.pp-liste li.fait b { color: var(--sourdine); text-decoration: line-through; }
.pp-ok { font-size: 12.5px; font-weight: 600; color: var(--ok-700); }

/* ---------- Menus déroulants avec recherche (js/recherche-liste.js) ---------- */
.rs-env { display: inline-grid; position: relative; min-width: 0; max-width: 100%; vertical-align: middle; }
.rs-env.rs-plein { display: grid; width: 100%; }
.rs-env > * { grid-area: 1 / 1; }
select.rs-cache { opacity: 0 !important; pointer-events: none !important; }
/* Barre de recherche (même allure que celle du haut de l'écran) */
input.barre-rech, .champ input.barre-rech { border: 1px solid var(--bord); background-color: #fafbfd; border-radius: var(--r-s);
  padding: 9px 12px 9px 36px; min-width: 0; width: auto; margin: 0; box-sizing: border-box; outline-offset: 0; font-size: 14px; font-weight: 400; color: var(--encre);
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a94a3' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.2-3.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center; background-size: 16px; }
.champ input.barre-rech { width: 100%; }
.rs-env:not(.rs-plein) > input.barre-rech { padding: 7px 8px 7px 30px; background-position: 10px center; background-size: 15px; }
input.barre-rech::placeholder { color: var(--sourdine); }
input.barre-rech:focus { background-color: #fff; border-color: var(--vert-500); }
input.barre-rech:disabled { opacity: .6; cursor: not-allowed; }
.rl-item.off { opacity: .45; cursor: not-allowed; }
.rl-item.choisi { font-weight: 600; }
.rl-item.choisi::after { content: "✓"; margin-left: auto; color: var(--vert-600); }
.saison .rs-env, .outils .rs-env { flex: none; }


/* ---------- Grande page « Voir » : bilan de saison et passeport à l'écran (js/bilans.js) ---------- */
.vue-doc { position: fixed; inset: 0; z-index: 9000; background: #e9edf2; overflow: auto; }
.vue-barre { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 20px;
  background: #fff; border-bottom: 1px solid var(--bord); box-shadow: 0 2px 10px rgba(15,30,51,.06); }
.vue-barre h2 { margin: 0; font-size: 17px; margin-right: auto; }
.vue-barre label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--encre-2); cursor: pointer; }
.vue-barre input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--vert-600); }
.vue-page { width: min(210mm, calc(100vw - 32px)); margin: 24px auto 40px; background: #fff; padding: 14mm 13mm; box-shadow: 0 4px 24px rgba(15,30,51,.12); border-radius: 6px;
  font-size: 10.5pt; color: #111; }
.vue-page #hl-feuille, .vue-page #bilan-feuille, .vue-page .doc-entete, .vue-page .doc-pied { display: block !important; }
.vue-page .doc-entete { display: flex !important; }
body.vue-ouverte { overflow: hidden; }
@media print { .vue-doc { display: none !important; } }
.vue-page #hl-feuille .hlf-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 12px; }
.vue-page #hl-feuille .hlf-marque { font-size: 8.5pt; text-transform: uppercase; letter-spacing: .08em; color: #555; }
.vue-page #hl-feuille h1 { font-size: 19pt; margin: 2px 0 3px; }
.vue-page #hl-feuille .hlf-tete p { margin: 0; font-size: 11pt; }
.vue-page #hl-feuille .hlf-date { text-align: right; font-size: 8.5pt; color: #555; }
.vue-page #hl-feuille table { width: 100%; border-collapse: collapse; font-size: 9pt; display: table !important; }
.vue-page #hl-feuille thead { display: table-header-group !important; } #hl-feuille tbody, #hl-feuille tfoot { display: table-row-group !important; }
.vue-page #hl-feuille tr { display: table-row !important; break-inside: avoid; }
.vue-page #hl-feuille th, .vue-page #hl-feuille td { display: table-cell !important; }
.vue-page #hl-feuille th { text-align: left; font-size: 8pt; color: #555; border-bottom: 1px solid #999; padding: 3px 5px; font-weight: 600; }
.vue-page #hl-feuille td { border-bottom: 1px solid #e3e3e3; padding: 3px 5px; vertical-align: top; }
.vue-page #hl-feuille .num { text-align: right; white-space: nowrap; }
.vue-page #hl-feuille .hlf-resume { margin-bottom: 14px; }
.vue-page #hl-feuille .hlf-resume tfoot td { border-top: 1.5px solid #111; border-bottom: 0; }
.vue-page #hl-feuille .hlf-lot { border-top: 1.5px solid #111; padding-top: 8px; margin-bottom: 14px; }
.vue-page #hl-feuille .hlf-lot h2 { font-size: 12.5pt; margin: 0; display: flex; align-items: center; gap: 6px; break-after: avoid; }
.vue-page #hl-feuille .hlf-etat { margin-left: auto; font-size: 8.5pt; font-weight: 600; border: 1px solid #999; border-radius: 10px; padding: 1px 8px; }
.vue-page #hl-feuille .hlf-sous { margin: 2px 0 6px; color: #555; font-size: 9pt; }
.vue-page #hl-feuille .hlf-chiffres td { width: 25%; border: 1px solid #ccc; padding: 4px 7px; }
.vue-page #hl-feuille .hlf-chiffres span, .vue-page #hl-feuille .hlf-chiffres small { display: block; font-size: 8pt; color: #555; }
.vue-page #hl-feuille .hlf-chiffres b { font-size: 11.5pt; }
.vue-page #hl-feuille h3 { font-size: 10pt; margin: 8px 0 3px; break-after: avoid; }
.vue-page #hl-feuille .hlf-etapes td:first-child { white-space: nowrap; width: 17%; }
.vue-page #hl-feuille .hlf-etapes td:nth-child(2) { width: 33%; }
.vue-page #hl-feuille .hlf-sortie td:nth-child(2) b { color: #b45309; } #hl-feuille .hlf-entree td:nth-child(2) b { color: #15803d; }
.vue-page #hl-feuille .hl-bloc { margin-top: 8px; } #hl-feuille .hl-bloc h3 { margin: 8px 0 3px; }
.vue-page #hl-feuille .hl-temp { break-inside: avoid; margin-bottom: 6px; }
.vue-page #hl-feuille .hl-temp-chiffres { gap: 5px; margin: 3px 0; } #hl-feuille .hl-temp-chiffres span { font-size: 8.5pt; padding: 1px 7px; }
.vue-page #hl-feuille .hl-temp-svg { max-height: 55mm; width: 100%; }
.vue-page #hl-feuille .klimh-legende { font-size: 7.5pt; }
.vue-page #hl-feuille * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.vue-page .doc-entete { display: flex !important; align-items: center; gap: 10px; margin-bottom: 6px; }
.vue-page .doc-entete img { height: 14mm; width: auto; max-width: 40mm; object-fit: contain; }
.vue-page .doc-entete b { display: block; font-size: 11pt; } .doc-entete span { display: block; font-size: 8.5pt; color: #555; }
.vue-page .doc-pied { display: block !important; margin-top: 10px; padding-top: 5px; border-top: 1px solid #bbb; font-size: 8pt; color: #666; text-align: center; }
.vue-page #bilan-feuille .bil-tete { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #111; padding-bottom: 6px; margin-bottom: 10px; }
.vue-page #bilan-feuille h1 { font-size: 19pt; margin: 0 0 2px; } #bilan-feuille .bil-tete p { margin: 0; font-size: 11.5pt; }
.vue-page #bilan-feuille .bil-date { text-align: right; font-size: 9pt; font-weight: 600; } #bilan-feuille .bil-date span { font-weight: 400; color: #555; }
.vue-page #bilan-feuille .bil-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.vue-page #bilan-feuille .bil-kpis > div { border: 1px solid #ccc; border-radius: 6px; padding: 5px 8px; display: grid; }
.vue-page #bilan-feuille .bil-kpis .fort { border: 1.5px solid #e0852f; background: #fdf4ea; }
.vue-page #bilan-feuille .bil-kpis span, .vue-page #bilan-feuille .bil-kpis small { font-size: 8pt; color: #555; } #bilan-feuille .bil-kpis b { font-size: 13pt; }
.vue-page #bilan-feuille h3 { font-size: 10.5pt; margin: 10px 0 4px; break-after: avoid; }
.vue-page #bilan-feuille .bil-courbe { max-height: 50mm; }
.vue-page #bilan-feuille .bil-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; }
.vue-page #bilan-feuille table { width: 100%; border-collapse: collapse; font-size: 9pt; }
.vue-page #bilan-feuille th { text-align: left; font-size: 8pt; color: #555; border-bottom: 1px solid #999; padding: 3px 5px; }
.vue-page #bilan-feuille td { border-bottom: 1px solid #e3e3e3; padding: 3px 5px; }
.vue-page #bilan-feuille tbody tr:nth-child(even) td { background: #f7f7f7; }
.vue-page #bilan-feuille tfoot td { border-top: 1.5px solid #111; border-bottom: 0; font-weight: 700; }
.vue-page #bilan-feuille .num { text-align: right; white-space: nowrap; }
.vue-page #bilan-feuille tr { break-inside: avoid; }
.vue-page #bilan-feuille .bil-note { font-size: 8pt; color: #666; margin-top: 8px; }

/* ---------- Annuler / Refaire (partie ordinateur) — 18/11 ---------- */
.annul-boutons { display: flex; gap: 4px; flex: none; }
.annul-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--bord); border-radius: 10px; background: #fff;
  color: var(--encre-2, #334155); cursor: pointer; padding: 0;
  transition: background .15s, border-color .15s, color .15s;
}
.annul-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.annul-btn:hover:not(:disabled) { background: var(--marine-100, #dde3ec); border-color: var(--bord-fort, #d2d8e0); }
.annul-btn:focus-visible { outline: 2px solid var(--orange-500, #e0852f); outline-offset: 2px; }
.annul-btn:disabled { opacity: .35; cursor: default; }
@media (max-width: 700px) { .annul-boutons { display: none; } }
body.tel2-actif .annul-boutons { display: none; }

/* Œil des mots de passe (page de connexion) */
.mdp-zone { position: relative; display: block; }
.mdp-zone input { width: 100%; padding-right: 46px; box-sizing: border-box; }
.mdp-oeil { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: #6b7280; border-radius: 8px; cursor: pointer; padding: 0; }
.mdp-oeil:hover { color: #0f1e33; background: rgba(15,30,51,.06); }
.mdp-oeil:focus-visible { outline: 2px solid #e0852f; outline-offset: 1px; }
