/* Vue d'en haut — partagée par /elevage (inc/elevage/carte.php) et /gerer
   (inc/panel/carte.php) : extraite d'elevage-panel.css le 24/10/2026. */
/* ============================================================================
   MonHaras — Panneau élevage (/elevage)
   Complément à assets/css/panel.css, chargé uniquement par elevage.php.
   Feuille séparée à dessein : panel.css est partagé avec le panneau écurie
   (/gerer), et y toucher risquerait des régressions ailleurs.
   ========================================================================= */

/* ---------------------------------------------------------------------------
   Tableaux empilables sur mobile.

   panel.css impose `.pnl-tablewrap table { min-width: 720px }` : sur un
   téléphone, les tableaux débordaient donc de l'écran et les colonnes de
   droite (généalogie, boutons Modifier/Archiver, type d'acte) étaient
   inatteignables — on ne voyait que « Père × Mère (père de mère : Père de r… »
   coupé net au bord. Un éleveur consulte ces fiches dans l'écurie, sur son
   téléphone : le défilement horizontal n'est pas acceptable ici.

   Les tableaux marqués .elv-stack se transforment en cartes empilées sous
   700px, chaque cellule reprenant son intitulé de colonne via data-label.
   ------------------------------------------------------------------------- */
@media (max-width: 700px) {
  .pnl-tablewrap .elv-stack { min-width: 0; }
  .elv-stack, .elv-stack tbody, .elv-stack tr, .elv-stack td { display: block; width: 100%; }
  .elv-stack thead { display: none; }

  .elv-stack tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 15px;
    margin-bottom: 10px;
    background: var(--card);
  }
  .elv-stack tr:last-child { margin-bottom: 0; }
  .elv-stack tbody tr:hover { background: var(--card); }   /* pas de survol au doigt */

  .elv-stack td { border: none; padding: 5px 0; }
  .elv-stack td:first-child { padding-top: 0; }
  .elv-stack td:last-child { padding-bottom: 0; }

  /* Intitulé de colonne rappelé au-dessus de la valeur */
  .elv-stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: .68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: 3px;
  }
  /* Cellule vide : on masque tout le bloc plutôt que d'afficher un intitulé
     suivi de rien (fréquent sur « Rappel » ou « Généalogie » non renseignés). */
  .elv-stack td:empty { display: none; }

  /* Colonne d'actions : les boutons passent en pleine largeur, alignés à
     gauche comme le reste de la carte (ils étaient poussés hors écran). */
  .elv-stack td.elv-act { text-align: left; padding-top: 11px; }
  .elv-stack td.elv-act::before { display: none; }
  .elv-stack td.elv-act > * { display: inline-block; vertical-align: middle; }
  .elv-stack td.elv-act form { margin: 0; }
  /* Boutons d'action d'une carte : même largeur, texte et icône centrés
     (« Fiche », lien, était décalé par rapport aux <button> voisins). */
  .elv-stack td.elv-act { display: flex !important; flex-wrap: wrap; gap: 8px; white-space: normal !important; }
  .elv-stack td.elv-act > * { flex: 1 1 0; min-width: 0; }
  .elv-stack td.elv-act form > .pnl-btn { width: 100%; }
  .elv-stack td.elv-act .pnl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; line-height: 1.1; text-align: center; }
  .elv-stack td.elv-act .pnl-btn { margin: 0 6px 0 0; }
}

/* ---------------------------------------------------------------------------
   Tableau « libellé / valeur » des réglages : deux colonnes serrées.
   Sur mobile, la valeur débordait (« Élevage des Trois », « TOM GUILLEMIN ( »,
   « — régime non déc » tronqués). On garde deux colonnes mais on autorise le
   retour à la ligne et on rééquilibre les largeurs.
   ------------------------------------------------------------------------- */
.pnl-tablewrap .elv-kv { min-width: 0; }
.elv-kv td { vertical-align: top; }
.elv-kv td:first-child { width: 38%; color: var(--muted); }
.elv-kv td:last-child { text-align: right; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .elv-kv td:first-child { width: 42%; }
  .elv-kv td, .elv-kv th { padding: 9px 0; }
}

/* ---------------------------------------------------------------------------
   Barre d'actions de section : sur mobile, le bouton principal se plaçait
   au ras du bord gauche et débordait. On le contient et on lui donne de l'air.
   ------------------------------------------------------------------------- */
@media (max-width: 700px) {
  .pnl-top { flex-wrap: wrap; }
  .pnl-head-actions { width: 100%; justify-content: flex-start; }
  .pnl-head-actions .pnl-btn { max-width: 100%; }
}

/* ---------------------------------------------------------------------------
   Fiche cheval : en-tête et blocs d'historique.
   ------------------------------------------------------------------------- */
.elv-horse-head {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px;
  margin-bottom: 4px;
}
.elv-horse-head .elv-horse-id { flex: 1 1 260px; min-width: 0; }
.elv-horse-head h2 { margin: 0 0 4px; }
.elv-horse-meta { color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* Généalogie en arbre simple, lisible sans dessin */
.elv-ped { display: grid; gap: 8px; margin-top: 4px; }
.elv-ped-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.elv-ped-row > span:first-child {
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
}
.elv-ped-row b { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .elv-ped-row { grid-template-columns: 1fr; gap: 1px; }
}

/* Frise verticale des événements d'un cheval (soins + reproduction mêlés) */
.elv-timeline { display: grid; gap: 0; margin-top: 6px; }
.elv-tl-item {
  position: relative;
  padding: 0 0 16px 26px;
  border-left: 2px solid var(--line);
}
.elv-tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.elv-tl-item::before {
  content: ""; position: absolute; left: -6px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brass-2, #C8973F);
  box-shadow: 0 0 0 3px var(--card);
}
.elv-tl-item.is-due::before { background: #C0392B; }
.elv-tl-date {
  font-size: .74rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
}
.elv-tl-body { margin-top: 2px; font-size: .93rem; line-height: 1.5; }
.elv-tl-body .muted { color: var(--muted); font-size: .84rem; }

/* ---------------------------------------------------------------------------
   Galerie photo d'un cheval
   ------------------------------------------------------------------------- */
.elv-photos {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(130px, 100%), 1fr));
}
.elv-photo { position: relative; margin: 0; }
.elv-photo img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--line); display: block;
}
.elv-photo form { position: absolute; top: 6px; right: 6px; margin: 0; }
.elv-photo-x {
  width: 26px; height: 26px; border-radius: 50%;
  border: none; cursor: pointer; line-height: 1;
  background: rgba(20, 28, 48, .72); color: #fff; font-size: 1rem;
}
.elv-photo-x:hover { background: rgba(192, 57, 43, .9); }
.elv-photo .elv-photo-rot { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; }
.elv-photo .elv-photo-rot form { position: static; }
.elv-photo .elv-photo-rot .elv-photo-x:hover { background: rgba(20, 28, 48, .95); }
.elv-photo figcaption { font-size: .78rem; color: var(--muted, #6B7280); margin-top: 4px; }
.elv-photo figcaption form { position: static; }
.elv-photo figcaption input[type=date] { border: none; background: transparent; font: inherit; color: inherit; padding: 0; width: auto; }

/* ---------------------------------------------------------------------------
   Impression du registre d'élevage.
   Un contrôle des services vétérinaires se présente sur papier : la page doit
   sortir lisible, sans menu, sans boutons, et sans couper une ligne en deux.
   ------------------------------------------------------------------------- */
@media print {
  .pnl-side, .pnl-top, .pnl-backdrop, .elv-no-print,
  .pnl-btn, .pnl-flash, dialog { display: none !important; }
  .pnl-app { display: block; }
  .pnl-content { padding: 0; max-width: none; }
  .pnl-card {
    box-shadow: none; border: 1px solid #ccc;
    break-inside: avoid; page-break-inside: avoid;
    margin-bottom: 14px;
  }
  .elv-print-block tr { break-inside: avoid; page-break-inside: avoid; }
  /* En impression on repasse en vrai tableau : l'empilement mobile gâcherait
     le papier, et une feuille A4 est plus large qu'un téléphone. */
  .elv-stack, .elv-stack tbody, .elv-stack tr, .elv-stack td { display: revert; }
  .elv-stack thead { display: table-header-group; }
  .elv-stack td[data-label]::before { display: none; }
  a { text-decoration: none; color: #000; }
  body { background: #fff; }
}

/* ---------------------------------------------------------------------------
   Arbre généalogique : une colonne par génération, chaque colonne comptant
   deux fois plus de cases que la précédente. Défilement horizontal assumé —
   au-delà de 3 générations, aucun écran de téléphone ne suffit.
   ------------------------------------------------------------------------- */
.elv-tree-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.elv-tree { display: grid; gap: 8px; min-width: 620px; }
.elv-tree-col { display: grid; gap: 6px; align-content: stretch; }
.elv-tree-cell {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; font-size: .84rem; line-height: 1.3;
  background: var(--card); display: flex; flex-direction: column; justify-content: center;
  overflow-wrap: anywhere;
}
/* Liseré de couleur pour distinguer lignée paternelle et maternelle d'un coup d'œil */
.elv-tree-cell.sire { border-left: 3px solid #3E6DA8; }
.elv-tree-cell.dam  { border-left: 3px solid #B0662F; }
.elv-tree-cell.empty { color: var(--muted); background: transparent; border-style: dashed; text-align: center; }
.elv-tree-cell em { display: block; font-style: normal; font-size: .72rem; color: var(--muted); margin-top: 2px; }

/* ===========================================================================
   VUE D'EN HAUT — PALETTE (refonte 3D, novembre 2026)
   Toutes les couleurs de la carte passent par ces variables : herbe, sable, bois, toit,
   laiton, alerte. Le plan à plat et la scène en relief puisent au même endroit.
   ========================================================================= */
:root {
  /* plan à plat */
  --vh-white: #fff; --vh-brass: #c99a3e; --vh-brass-lite: #e2b45c; --vh-wood-old: #7a5a36; --vh-cream: #f4ecdc; --vh-straw: #e9c46f; --vh-straw-lite: #f3d58e; --vh-straw-dark: #d9b25c; --vh-warn: #d9822b; --vh-dash: #c4b291; --vh-grass-1: #b9d08a; --vh-grass-2: #9fbd6c; --vh-grass-3: #87a85a; --vh-grass-edge: #b9c79c; --vh-field-1: #8fbf55; --vh-field-2: #6f9d3c; --vh-field-3: #7fae46; --vh-moss: #3b4a22; --vh-navy: #13213d; --vh-navy-ink: #eaf0fa; --vh-ring-bg: #e9e2d2; --vh-barn: #e8dcc4; --vh-sand-1: #dcc28f; --vh-sand-2: #c2a46b; --vh-sand-3: #cfb27c; --vh-aisle-1: #cdbd9c; --vh-aisle-2: #c6b592; --vh-aisle-ink: #8b7a58; --vh-target: #b5e08a; --vh-target-2: #7fa65a; --vh-mare: #b0623e; --vh-mare-2: #7b3b20; --vh-free-ink: #a39272; --vh-roof: #8f3f2b; --vh-roof-2: #7c3524; --vh-horse: #8a5a33; --vh-horse-2: #5e3a1d; --vh-geld: #6f7f5a; --vh-geld-2: #48553a; --vh-stal: #2c3f63; --vh-lbl-ink: #6d5a3a;
  /* signaux */
  --vh-alert: #d9453b; --vh-rose: #e0709a; --vh-blue: #3b7bb5; --vh-violet: #7a5cc4; --vh-teal: #2f9c95; --vh-ok: #3d9a5b;
  /* interface flottante */
  --vh-glass: rgba(255,253,248,.82); --vh-glass-strong: rgba(255,253,248,.94); --vh-glass-b: rgba(255,255,255,.6);
  --vh-ui-shadow: 0 10px 30px -12px rgba(30,40,30,.35), 0 2px 6px rgba(30,40,30,.12);
  /* scène en relief : terrain */
  --vh-g1: #9bcd6a; --vh-g2: #7bb957; --vh-g3: #5e9c44; --vh-g4: #3f7a34; --vh-soil: #7b5636; --vh-soil2: #5a3d26; --vh-soil3: #46301e;
  --vh-f1: #8fcb5f; --vh-f2: #6eac4d; --vh-pad1: #cdb98a; --vh-pad2: #b69f6c; --vh-sand3d1: #ecdcae; --vh-sand3d2: #d5bf88;
  --vh-gravel1: #dcd4c3; --vh-gravel2: #c4baa4; --vh-leaf1: #6fb85c; --vh-leaf2: #4f9a45; --vh-leaf3: #3a7f39;
  /* scène en relief : bâti */
  --vh-wall: #d9c39a; --vh-wall-2: #c9a56e; --vh-wood: #b98552; --vh-wood-2: #9a6a3c; --vh-wood-dark: #7a4f2c; --vh-rail: #a97a4a;
  --vh-plaster: #ece0c8; --vh-roof3d: #b9533b; --vh-brick: #8f4a37; --vh-hay: #dcb94f; --vh-straw3d: #ecd884;
  --vh-planks: repeating-linear-gradient(90deg, rgba(0,0,0,.1) 0 1px, transparent 1px 10px);
  --vh-planks-h: repeating-linear-gradient(0deg, rgba(0,0,0,.1) 0 1px, transparent 1px 10px);
  --vh-cobble: repeating-linear-gradient(0deg, rgba(0,0,0,.1) 0 1px, transparent 1px 14px), repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 1px, transparent 1px 22px), linear-gradient(135deg, #d8d1c3, #bdb4a2);
  --vh-straw-tex: repeating-linear-gradient(35deg, rgba(190,140,40,.5) 0 2px, transparent 2px 6px), repeating-linear-gradient(-30deg, rgba(240,200,100,.6) 0 2px, transparent 2px 7px), linear-gradient(#e6c878, #e6c878);
  --vh-sky-midi: linear-gradient(180deg, #6fb2ea 0%, #a9d5f4 58%, #def0fa 100%);
  /* robe par défaut (bai) */
  --vh-c-bai: #8b4a2b; --vh-c-bai2: #6a3820; --vh-c-bai-m: #2a1710;
}

/* ===========================================================================
   VUE D'EN HAUT (inc/elevage/carte.php)
   L'élevage vu du ciel : herbe texturée, ombres de nuages qui passent,
   écurie aux box pleins / libres, pâtures clôturées où les chevaux broutent
   en dérivant doucement. Entrées échelonnées via --i.
   ========================================================================= */
.elv-map-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.elv-kpi { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 14px; box-shadow: var(--shadow); font-size: .86rem; line-height: 1.25; animation: elvRise .5s both; }
.elv-kpi:nth-child(2) { animation-delay: .06s } .elv-kpi:nth-child(3) { animation-delay: .12s } .elv-kpi:nth-child(4) { animation-delay: .18s }
.elv-kpi b { font-family: 'Fraunces', Georgia, serif; font-size: 1.15rem; color: var(--ink); }
.elv-kpi small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.elv-kpi .ico { font-size: 1.4rem; flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--card-2); }
.elv-kpi.warn .ico { background: var(--brass-soft); }
.elv-kpi.alert { border-color: var(--danger-soft); } .elv-kpi.alert .ico { background: var(--danger-soft); }
.elv-kpi .ring { --p: 0; flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--brass-2) calc(var(--p) * 1%), var(--vh-ring-bg) 0); animation: elvRing 1.1s cubic-bezier(.3,.8,.3,1) both; }
.elv-kpi .ring b { width: 36px; height: 36px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font: 700 .72rem/1 Inter, system-ui, sans-serif; }
@property --p { syntax: '<number>'; initial-value: 0; inherits: false; }
@keyframes elvRing { from { --p: 0; } }
@keyframes elvRise { from { opacity: 0; transform: translateY(10px); } }

.elv-map { position: relative; overflow: hidden; isolation: isolate; border-radius: 20px; padding: 22px; margin-bottom: 18px;
  display: flex; flex-direction: column; gap: 18px; border: 1px solid var(--vh-grass-edge);
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.18) 0 1px, transparent 2px) 0 0 / 22px 22px,
    radial-gradient(circle at 70% 60%, rgba(40,70,20,.12) 0 1px, transparent 2px) 0 0 / 17px 17px,
    radial-gradient(120% 90% at 10% 0%, var(--vh-grass-1) 0%, var(--vh-grass-2) 45%, var(--vh-grass-3) 100%);
  box-shadow: inset 0 0 80px rgba(40,60,20,.25), var(--shadow); }
/* Ombres de nuages qui glissent sur le domaine. */
.elv-cloud { position: absolute; z-index: 3; pointer-events: none; width: 340px; height: 180px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20,40,10,.20), transparent); filter: blur(6px); animation: elvCloud 38s linear infinite; }
.elv-cloud.c1 { top: 4%; left: -40%; }
.elv-cloud.c2 { top: 52%; left: -40%; width: 260px; height: 140px; animation-duration: 52s; animation-delay: -21s; }
@keyframes elvCloud { to { transform: translateX(calc(100vw + 400px)); } }
.elv-sun { position: absolute; z-index: 0; top: -120px; right: -120px; width: 320px; height: 320px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,236,170,.55), transparent); animation: elvSun 8s ease-in-out infinite alternate; }
@keyframes elvSun { to { transform: scale(1.15); opacity: .7; } }

/* ---- Écurie : toit, deux rangées de box face à face, allée au milieu ---- */
.elv-barn { position: relative; z-index: 1; background: var(--vh-barn); border-radius: 14px; padding: 0 10px 10px;
  box-shadow: 0 14px 26px rgba(40,50,20,.35), 0 0 0 4px var(--vh-wood-old), 0 0 0 5px rgba(0,0,0,.15); animation: elvDrop .6s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes elvDrop { from { opacity: 0; transform: translateY(-14px) scale(.98); } }
.elv-barn-roof { display: flex; justify-content: space-between; align-items: center; margin: 0 -10px 10px; padding: 9px 14px; border-radius: 14px 14px 0 0;
  background: repeating-linear-gradient(90deg, var(--vh-roof) 0 14px, var(--vh-roof-2) 14px 16px); color: var(--vh-white); font-weight: 700; font-size: .86rem; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.elv-barn-roof em { font-style: normal; background: rgba(0,0,0,.25); padding: 2px 9px; border-radius: 999px; font-size: .78rem; }
.elv-boxes { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .elv-boxes { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); } }
.elv-aisle { margin: 8px 0; height: 22px; border-radius: 6px; display: grid; place-items: center;
  background: repeating-linear-gradient(90deg, var(--vh-aisle-1) 0 8px, var(--vh-aisle-2) 8px 16px); color: var(--vh-aisle-ink); font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; }
.elv-box { position: relative; min-height: 78px; border-radius: 9px; padding: 22px 7px 7px; display: flex; flex-direction: column; gap: 4px; justify-content: center;
  animation: elvPop .45s cubic-bezier(.3,1.5,.5,1) both; animation-delay: calc(var(--i, 0) * 40ms + .15s); scroll-margin-top: 90px; }
@keyframes elvPop { from { opacity: 0; transform: scale(.85); } }
.elv-box .lbl { position: absolute; top: 5px; left: 8px; right: 8px; font-size: .68rem; font-weight: 700; color: var(--vh-lbl-ink); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.elv-box.is-full { background: radial-gradient(circle at 50% 120%, var(--vh-straw-lite), var(--vh-straw) 70%); box-shadow: inset 0 0 0 2px var(--vh-brass), 0 3px 8px rgba(120,80,20,.25); }
.elv-box.is-full::after { content: ''; position: absolute; inset: auto 6px 4px; height: 6px; border-radius: 3px;  /* litière de paille */
  background: repeating-linear-gradient(60deg, var(--vh-straw-dark) 0 3px, var(--vh-brass) 3px 5px); opacity: .7; }
.elv-box.is-empty { background: var(--vh-cream); border: 2px dashed var(--vh-dash); }
.elv-box .free { text-align: center; color: var(--vh-free-ink); font-size: .76rem; font-weight: 600; }
.elv-box:target, .elv-field:target { animation: elvTarget 1.6s ease 2; }
@keyframes elvTarget { 50% { box-shadow: 0 0 0 4px var(--vh-white), 0 0 0 8px var(--brass-2); } }

/* ---- Cheval (avatar + nom) ---- */
.elv-hz { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); min-width: 0;
  background: rgba(255,255,255,.85); border-radius: 999px; padding: 3px 9px 3px 3px; font-size: .78rem; font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,.12); transition: transform .2s ease, box-shadow .2s ease; }
.elv-hz:hover, .elv-hz:focus-visible { transform: translateY(-2px) scale(1.04); box-shadow: 0 6px 14px rgba(0,0,0,.2); color: var(--ink); z-index: 4; }
.elv-hz .av { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--vh-white); font-size: .74rem; font-weight: 700;
  background: linear-gradient(135deg, var(--vh-horse), var(--vh-horse-2)); }
.elv-hz.sx-jument .av { background: linear-gradient(135deg, var(--vh-mare), var(--vh-mare-2)); }
.elv-hz.sx-etalon .av { background: linear-gradient(135deg, var(--vh-stal), var(--vh-navy)); }
.elv-hz.sx-hongre .av { background: linear-gradient(135deg, var(--vh-geld), var(--vh-geld-2)); }
.elv-hz .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.elv-hz .fl { display: inline-flex; gap: 1px; font-size: .74rem; }
.elv-hz .fl i { font-style: normal; animation: elvBlink 1.8s ease-in-out infinite; }
@keyframes elvBlink { 50% { transform: scale(1.25); } }
.elv-hz .fl i { display: inline-block; }

/* ---- Pâtures & paddocks : prés clôturés, taille selon la surface ---- */
.elv-fields { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 16px; }
.elv-field { --g: 2; position: relative; flex: var(--g) 1 190px; min-height: calc(120px + var(--g) * 14px); border-radius: 18px 26px 16px 30px; padding: 30px 10px 10px;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.07) 0 10px, transparent 10px 22px),
    radial-gradient(circle at 30% 30%, var(--vh-field-1), var(--vh-field-2) 75%);
  border: 3px dashed var(--vh-cream); outline: 3px solid var(--vh-wood-old); outline-offset: 2px;
  box-shadow: 0 10px 20px rgba(30,50,10,.3); animation: elvPop .55s cubic-bezier(.3,1.4,.5,1) both; animation-delay: calc(var(--i, 0) * 70ms + .2s); scroll-margin-top: 90px; }
.elv-field.k-paddock { border-radius: 12px; background: repeating-linear-gradient(35deg, rgba(255,255,255,.08) 0 6px, transparent 6px 14px), radial-gradient(circle at 40% 30%, var(--vh-sand-1), var(--vh-sand-2) 80%); }
.elv-field.is-over { outline-color: var(--vh-warn); box-shadow: 0 0 0 6px rgba(217,130,43,.25), 0 10px 20px rgba(30,50,10,.3); }
.elv-field.is-empty { filter: saturate(.75); }
.elv-field .lbl { position: absolute; top: 7px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 8px; color: var(--vh-white); font-weight: 700; font-size: .82rem; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.elv-field .lbl em { font-style: normal; font-weight: 600; background: rgba(0,0,0,.25); padding: 1px 8px; border-radius: 999px; font-size: .74rem; white-space: nowrap; align-self: flex-start; line-height: 1.5; flex-shrink: 0; }
.elv-field .herd { position: relative; min-height: calc(80px + var(--g) * 14px); display: flex; flex-wrap: wrap; align-content: space-evenly; align-items: flex-start; justify-content: space-around; gap: 10px 6px; padding: 4px 0; }
.elv-field .free { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.85); font-size: .8rem; font-style: italic; }
/* Les chevaux broutent : petite dérive, chacun à son rythme (--d, --dl). */
.graze { position: relative; margin-top: var(--j, 0); margin-left: var(--jx, 0); animation: elvGraze var(--d, 8s) ease-in-out infinite alternate; animation-delay: var(--dl, 0s); }
.graze:hover, .graze:focus-within { animation-play-state: paused; z-index: 5; }
@keyframes elvGraze { 0% { translate: 0 0; } 35% { translate: 10px -4px; } 70% { translate: -6px 5px; } 100% { translate: 4px 2px; } }
.elv-box .elv-hz { border-radius: 12px; }
.elv-box .elv-hz .nm { white-space: normal; line-height: 1.1; overflow-wrap: anywhere; }
.elv-box .elv-hz .fl { position: absolute; top: -10px; right: -4px; background: var(--vh-white); border-radius: 999px; padding: 0 3px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.elv-hz.mini { padding: 2px 7px 2px 2px; font-size: .72rem; }
.elv-hz.mini .av { width: 20px; height: 20px; font-size: .66rem; }
.elv-hz.mini .nm { max-width: 90px; }

.elv-tray { position: relative; z-index: 1; background: rgba(255,255,255,.55); border: 2px dashed rgba(255,255,255,.8); border-radius: 14px; padding: 10px 12px; backdrop-filter: blur(3px); }
.elv-tray .lbl { display: block; font-weight: 700; font-size: .8rem; color: var(--vh-moss); margin-bottom: 7px; }
.elv-tray > div { display: flex; flex-wrap: wrap; gap: 6px; }
.elv-legend { position: relative; z-index: 1; list-style: none; margin: 0; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 14px;
  background: rgba(255,255,255,.75); border-radius: 12px; font-size: .74rem; color: var(--ink-2); }
.elv-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.lg.full { background: var(--vh-straw); box-shadow: inset 0 0 0 2px var(--vh-brass); } .lg.empty { border: 2px dashed var(--vh-dash); background: var(--vh-cream); }
.lg.grass { background: var(--vh-field-3); } .lg.sand { background: var(--vh-sand-3); }

/* ---- Écran de démarrage (aucun lieu) ---- */
.elv-map-start { text-align: center; overflow: hidden; }
.elv-map-start h2 { justify-content: center; }
.elv-map-start p { max-width: 520px; margin: 0 auto 16px; font-size: .9rem; }
.elv-map-start-art { position: relative; height: 110px; margin: -6px auto 8px; max-width: 320px; border-radius: 16px; background: linear-gradient(135deg, var(--vh-grass-1), var(--vh-grass-3)); overflow: hidden; }
.elv-map-start-art .b { position: absolute; top: 18px; width: 34px; height: 30px; border-radius: 5px; background: var(--vh-straw); box-shadow: inset 0 0 0 2px var(--vh-brass); animation: elvPop .5s cubic-bezier(.3,1.5,.5,1) both; }
.elv-map-start-art .b:nth-child(1) { left: 24px; } .elv-map-start-art .b:nth-child(2) { left: 64px; animation-delay: .1s; }
.elv-map-start-art .b:nth-child(3) { left: 104px; animation-delay: .2s; background: var(--vh-cream); box-shadow: inset 0 0 0 2px var(--vh-dash); } .elv-map-start-art .b:nth-child(4) { left: 144px; animation-delay: .3s; }
.elv-map-start-art .p { position: absolute; right: 20px; top: 14px; width: 110px; height: 80px; border-radius: 20px 28px 16px 30px; background: var(--vh-field-2); outline: 3px solid var(--vh-wood-old); outline-offset: 2px; animation: elvPop .6s .4s both; }
.elv-map-start-art .p2 { right: 150px; top: 60px; width: 90px; height: 40px; animation-delay: .5s; background: var(--vh-field-3); }
.elv-map-quick { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 12px; }
.elv-map-quick .pnl-field { width: 120px; margin: 0; text-align: left; }
.elv-map-quick .pnl-field span { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 5px; color: var(--ink-2); }

/* ---- Répartition ---- */
.elv-assign { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.elv-assign-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); }
.elv-assign-row .nm { display: flex; flex-direction: column; min-width: 0; font-size: .88rem; }
.elv-assign-row .nm small { font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.elv-assign-row select { flex: none; max-width: 52%; border: 1px solid var(--line); border-radius: 9px; padding: 8px; font: inherit; font-size: .84rem; background: var(--card); color: var(--ink); }

@media (max-width: 900px) { .elv-map-kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .elv-map { padding: 14px; border-radius: 16px; gap: 14px; }
  .elv-boxes { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
  .elv-box { min-height: 70px; }
  .elv-field { flex-basis: 100%; }
  .elv-kpi { padding: 10px; gap: 9px; font-size: .8rem; }
  .elv-kpi .ico, .elv-kpi .ring { width: 38px; height: 38px; font-size: 1.1rem; }
  .elv-kpi .ring b { width: 30px; height: 30px; }
  .elv-assign { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .elv-map *, .elv-map, .elv-kpi, .elv-kpi .ring { animation: none !important; }
}

/* ===========================================================================
   VUE D'EN HAUT — déplacer un cheval (assets/js/elevage-carte.js)
   ========================================================================= */
.elv-map-tip { margin: -4px 0 10px; font-size: .82rem; color: var(--muted); }
.elv-map .elv-hz[data-hid] { cursor: pointer; }
.elv-box .lbl .cnt { margin-left: 5px; font-size: .64rem; background: var(--vh-wood-old); color: var(--vh-white); border-radius: 999px; padding: 0 5px; }
.elv-box .lbl .cnt:empty { display: none; }
.elv-box.is-over { box-shadow: inset 0 0 0 2px var(--vh-warn), 0 3px 8px rgba(120,80,20,.25); }

/* Cheval soulevé */
.vh.is-moving .graze { animation-play-state: paused; }
.elv-hz.is-picked { z-index: 6; transform: translateY(-5px) scale(1.12); background: var(--vh-white);
  box-shadow: 0 0 0 3px var(--brass-2), 0 12px 24px rgba(0,0,0,.28); animation: elvPicked 1s ease-in-out infinite alternate; }
@keyframes elvPicked { to { transform: translateY(-9px) scale(1.14); box-shadow: 0 0 0 4px var(--vh-brass-lite), 0 18px 30px rgba(0,0,0,.22); } }

/* Places possibles */
.vh.is-moving [data-place] { transition: transform .2s, box-shadow .2s, filter .2s, opacity .2s; }
.vh.is-moving .is-target { cursor: pointer; animation: elvTargetGlow 1.4s ease-in-out infinite; }
.vh.is-moving .elv-box.is-target { box-shadow: inset 0 0 0 2px var(--vh-target-2), 0 0 0 3px rgba(127,166,90,.35); }
.vh.is-moving .elv-field.is-target { outline-color: var(--vh-target); }
.vh.is-moving .is-target.is-crowded { animation-name: elvTargetWarm; }
.vh.is-moving .elv-box.is-target.is-crowded { box-shadow: inset 0 0 0 2px var(--vh-warn), 0 0 0 3px rgba(217,130,43,.3); }
.vh.is-moving .is-target:hover { transform: scale(1.03); filter: brightness(1.06); }
.vh.is-moving .is-from { opacity: .55; }
@keyframes elvTargetGlow { 50% { filter: brightness(1.08) drop-shadow(0 0 8px rgba(181,224,138,.75)); } }
@keyframes elvTargetWarm { 50% { filter: brightness(1.05) drop-shadow(0 0 8px rgba(217,130,43,.6)); } }
.elv-tray.is-empty { display: none; }
.vh.is-moving .elv-tray.is-empty { display: block; }
.vh.is-moving .elv-tray.is-empty .elv-tray-list::before { content: 'Déposez ici pour retirer le cheval de la carte'; font-size: .78rem; color: var(--vh-moss); font-style: italic; }

/* En vol */
.elv-flyer { position: fixed; z-index: 1000; margin: 0; pointer-events: none; transform-origin: 50% 80%;
  box-shadow: 0 0 0 3px var(--brass-2), 0 22px 30px rgba(0,0,0,.3); background: var(--vh-white); }
.elv-hoof { position: fixed; z-index: 999; width: 7px; height: 10px; margin: -5px 0 0 -3px; border-radius: 50% 50% 45% 45%; pointer-events: none;
  background: rgba(92,64,34,.55); transform: rotate(12deg); animation: elvHoof 1.3s ease-out forwards; }
.elv-hoof.l { transform: rotate(-12deg); }
@keyframes elvHoof { 0% { opacity: 0; scale: .4; } 15% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: .9; } }
.elv-puff { position: fixed; z-index: 999; width: 46px; height: 18px; margin: -9px 0 0 -23px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(214,190,140,.85), rgba(214,190,140,0)); animation: elvPuff .75s ease-out forwards; }
@keyframes elvPuff { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.9) translateY(-6px); } }
.elv-hz.is-landed { animation: elvLand .65s cubic-bezier(.3,1.6,.5,1); }
@keyframes elvLand { 0% { transform: scale(1.18, .82); } 40% { transform: scale(.92, 1.1) translateY(-4px); } 100% { transform: none; } }

/* Barre « où va-t-il ? » */
.elv-move-bar { position: fixed; left: 50%; bottom: 22px; z-index: 1001; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px);
  padding: 10px 10px 10px 16px; border-radius: 999px; background: rgba(19,33,61,.96); color: var(--vh-navy-ink); font-size: .86rem;
  box-shadow: 0 14px 36px rgba(0,0,0,.3); transform: translate(-50%, 140%); transition: transform .35s cubic-bezier(.3,1.4,.5,1); }
.elv-move-bar.on { transform: translate(-50%, 0); }
.elv-move-bar .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.elv-move-bar b { color: var(--vh-brass-lite); }
.elv-move-bar .f, .elv-move-bar .x { flex: none; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: .8rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.elv-move-bar .f { color: var(--vh-white); border: 1px solid rgba(255,255,255,.25); }
.elv-move-bar .x { border: 0; background: var(--vh-brass-lite); color: var(--vh-navy); }
@media (max-width: 700px) {
  .elv-move-bar { bottom: calc(80px + env(safe-area-inset-bottom)); border-radius: 16px; font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) { .elv-hz.is-picked, .vh.is-moving .is-target { animation: none; } }
.elv-flyer { white-space: nowrap; }
.elv-flyer .nm { overflow: visible; }

/* ===========================================================================
   VUE D'EN HAUT — icônes, signaux, onglets, filtres, fiche éclair (à plat ET en relief)
   ========================================================================= */
.vh-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.vh-i { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -.14em; }
.vh { position: relative; margin-bottom: 18px; --az: 0deg; --el: 0deg; --sx: .12; --sy: .2; --so: .3; --lamp: 0; --cloud: .12;
  --coat: var(--vh-c-bai); --coat2: var(--vh-c-bai2); --mane: var(--vh-c-bai-m); }
.vh[hidden], .vh [hidden], .vh-tabs[hidden], .vh-panel[hidden] { display: none !important; }
.vh-stage { position: relative; }
.vh .elv-map { margin-bottom: 0; }
.elv-map-tip .vh-i { color: var(--vh-brass); }

/* Ce qui n'existe qu'en relief est absent du plan à plat ; les enveloppes y sont transparentes. */
.vh-sky, .vh-vol, .vh-door, .vh-fp, .vh-slab, .vh-table, .vh-tree, .vh-lamp, .vh-motes, .vh-smoke, .vh-jump, .vh-cloudsh, .vh-trail,
.vh-tint, .vh-fx, .vh-sh, .vh-gr, .vh-hs, .vh-only3d, .vh-camtools, .vh-wx, .vh [data-vh-full] { display: none; }
.vh-hb, .vh-tag, .vh-sign, .vh-plate, .vh-pill, .vh-cap { display: contents; }
.vh-sign .t { display: inline-flex; align-items: center; gap: 6px; }

/* Signaux : anneau de couleur + icône (remplace les émojis clignotants) */
.elv-hz .fl { order: 3; gap: 2px; }
.elv-hz .fl i, .fl-lg { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: var(--vh-white); background: var(--fc, var(--vh-alert)); font-size: 10px; animation: none; }
.fl-lg { margin-right: 5px; vertical-align: -3px; }
.f-late { --fc: var(--vh-alert); } .f-preg { --fc: var(--vh-brass); } .f-foal { --fc: var(--vh-rose); } .f-client { --fc: var(--vh-blue); }
.f-rest { --fc: var(--vh-violet); } .f-treat { --fc: var(--vh-teal); } .f-dp { --fc: var(--vh-ok); }
.elv-hz .fl i.f-late, .elv-hz .fl i.f-foal { animation: vhRing 2s infinite; }
@keyframes vhRing { 0% { box-shadow: 0 0 0 0 var(--fc); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }
.elv-hz .ph { flex: none; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.elv-hz:has(.ph) .av { display: none; }
.elv-hz.mini .ph { width: 20px; height: 20px; }
.elv-kpi .ico .vh-i { font-size: 1.25rem; color: var(--ink-2, var(--vh-moss)); }
.elv-kpi.alert .ico .vh-i { color: var(--vh-alert); }
.elv-map-kpis.vh-hud { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.elv-desk .ic .vh-i { font-size: 1.3rem; color: var(--vh-brass); }

/* Onglets : Carte · Prés · Plan d'accès · Lieux */
.vh-tabs { display: flex; gap: 6px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.vh-tabs button { flex: none; border: 0; border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer;
  background: var(--card-2, var(--vh-cream)); color: var(--muted, var(--vh-lbl-ink)); transition: background .2s, color .2s; }
.vh-tabs button[aria-pressed="true"] { background: var(--ink, var(--vh-navy)); color: var(--vh-white); }
.vh-qui > summary { cursor: pointer; list-style: none; }
.vh-qui > summary::-webkit-details-marker { display: none; }
.vh-qui > summary h2 { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.vh-qui > summary h2::after { content: '▾'; margin-left: auto; color: var(--muted); transition: rotate .2s; }
.vh-qui[open] > summary h2::after { rotate: 180deg; }
.vh-qui > summary small { font: 400 .8rem/1.2 Inter, system-ui, sans-serif; }
.vh-qui[open] > summary { margin-bottom: 14px; }

/* Outils et filtres */
.vh-tools { display: flex; justify-content: flex-end; gap: 8px; margin: 0 0 10px; }
.vh-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--vh-glass); border: 1px solid var(--vh-glass-b); box-shadow: var(--vh-ui-shadow); }
.vh-seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; border-radius: 999px; padding: 6px 13px; font: inherit; font-weight: 700; font-size: .82rem; color: var(--vh-lbl-ink); cursor: pointer; }
.vh-seg button[aria-pressed="true"] { background: var(--vh-navy); color: var(--vh-white); }
.vh-btn, .vh-camtools button { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--vh-glass-b); background: var(--vh-glass); color: var(--vh-navy);
  box-shadow: var(--vh-ui-shadow); cursor: pointer; font-size: 17px; transition: transform .2s; }
.vh-btn:hover, .vh-camtools button:hover { transform: scale(1.08); }
.vh-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.vh-filters > button, .vh-search { border: 1px solid var(--vh-glass-b); background: var(--vh-glass); border-radius: 999px; box-shadow: var(--vh-ui-shadow); color: var(--vh-navy); }
.vh-filters > button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; font: inherit; font-weight: 700; font-size: .8rem; cursor: pointer; transition: transform .25s, background .25s, color .25s; }
.vh-filters > button:hover { transform: translateY(-2px); }
.vh-filters > button[aria-pressed="true"] { background: var(--vh-navy); color: var(--vh-white); transform: translateY(-2px); }
.vh-filters .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--fc); }
.vh-filters .dot.late { --fc: var(--vh-alert); } .vh-filters .dot.client { --fc: var(--vh-blue); } .vh-filters .dot.free { --fc: var(--vh-ok); } .vh-filters .dot.preg { --fc: var(--vh-brass); }
.vh-search { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; }
.vh-search .vh-i { color: var(--vh-lbl-ink); }
.vh-search input { border: 0; outline: 0; background: transparent; width: 140px; font: inherit; font-weight: 600; font-size: .82rem; color: inherit; transition: width .3s; }
.vh-search:focus-within { box-shadow: 0 0 0 3px var(--vh-blue), var(--vh-ui-shadow); }
.vh-search:focus-within input { width: 190px; }
.vh-count { background: var(--vh-navy); color: var(--vh-white); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: .76rem; }

/* Filtres à plat : le reste s'estompe */
.vh:not(.is-3d) .elv-hz { transition: transform .2s ease, box-shadow .2s ease, opacity .4s, filter .4s; }
.vh:not(.is-3d)[data-f="late"] .elv-hz:not([data-t~="late"]), .vh:not(.is-3d)[data-f="client"] .elv-hz:not([data-t~="client"]),
.vh:not(.is-3d)[data-f="preg"] .elv-hz:not([data-t~="preg"]), .vh:not(.is-3d)[data-f="free"] .elv-hz { opacity: .3; filter: grayscale(1); }
.vh:not(.is-3d)[data-f="free"] :is(.elv-box.is-empty, .elv-field.is-empty) { box-shadow: 0 0 0 3px var(--vh-ok), 0 0 0 7px rgba(61,154,91,.25); }
.vh:not(.is-3d) .elv-hz:is([data-hit], .is-on) { background: var(--vh-white); box-shadow: 0 0 0 3px var(--vh-brass), 0 8px 18px rgba(0,0,0,.25); z-index: 5; }

/* Fiche éclair */
.vh-peek { position: fixed; z-index: 1002; right: 18px; bottom: 18px; width: 300px; max-width: calc(100vw - 16px); padding: 16px; border-radius: 20px;
  background: var(--vh-glass-strong); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border: 1px solid var(--vh-glass-b); box-shadow: 0 18px 40px -14px rgba(20,30,20,.5), 0 2px 8px rgba(20,30,20,.15);
  color: var(--vh-navy); translate: 0 calc(100% + 40px); opacity: 0; visibility: hidden; transition: translate .5s cubic-bezier(.22,.9,.28,1.04), opacity .3s, visibility 0s .5s; }
.vh-peek.open { translate: 0 0; opacity: 1; visibility: visible; transition: translate .5s cubic-bezier(.22,.9,.28,1.04), opacity .3s, visibility 0s; }
.vh-peek .x { position: absolute; right: 10px; top: 10px; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(29,42,35,.08); color: inherit; cursor: pointer; font-size: 13px; }
.vh-peek .pk-head { display: flex; align-items: center; gap: 12px; padding-right: 30px; }
.vh-peek .pk-av { flex: none; display: grid; place-items: end center; width: 72px; height: 66px; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, var(--vh-grass-1), var(--vh-grass-3)); }
.vh .vh-peek .pk-av .vh-hs { display: block; position: static; inset: auto; width: 70px; height: 62px; margin-bottom: -2px; filter: none; animation: none; pointer-events: none; }
.vh-peek .pk-av .vh-hs * { animation: none !important; }
.vh-peek .pk-av .vh-hs .legs-w { opacity: 0 !important; } .vh-peek .pk-av .vh-hs .legs-s { opacity: 1 !important; }
.vh-peek .pk-av img { width: 100%; height: 100%; object-fit: cover; }
.vh-peek h3 { margin: 0; font-size: 1.25rem; line-height: 1.15; }
.vh-peek .pk-head p { margin: 2px 0 0; font-size: .8rem; opacity: .7; }
.vh-peek .pk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 2px; }
.vh-peek .pk-chips span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 4px; border-radius: 999px; background: rgba(29,42,35,.07); font-size: .76rem; font-weight: 700; }
.vh-peek .pk-chips i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--vh-white); background: var(--fc, var(--vh-alert)); font-size: 10px; }
.vh-peek dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0 14px; font-size: .82rem; }
.vh-peek dt { opacity: .65; font-weight: 600; } .vh-peek dd { margin: 0; font-weight: 700; }
.vh-peek .pk-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.vh-peek .pk-acts .pnl-btn { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 700px) { .vh-peek { left: 8px; right: 8px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom)); } }
.elv-move-bar kbd { font: 700 .62rem ui-monospace, monospace; padding: 1px 5px; border-radius: 4px; background: rgba(0,0,0,.14); margin-left: 4px; }
.vh.is-flying .is-dest { z-index: 6; }

/* ===========================================================================
   VUE D'EN HAUT — LE RELIEF (classe .is-3d, posée par assets/js/elevage-carte.js)
   Une maquette posée sur la table : le sol s'incline (rotateX / rotateZ), les textes jamais
   (chaque étiquette est contre-pivotée). Tout est en CSS, sans WebGL. Les volumes n'ont que
   leurs trois faces visibles : l'élément est le dessus, ::before la face avant, ::after la face gauche.
   Règle d'or : ni opacity, ni filter, ni overflow sur un élément qui porte du relief, sinon il s'aplatit.
   ========================================================================= */
.vh.is-3d { --az: -32deg; --el: 58deg; --sx: .25; --sy: .5; --so: .36; }
.vh.is-3d.is-soft { --el: 48deg; }
.vh.is-3d .vh-stage { height: clamp(520px, 78vh, 760px); border-radius: 22px; overflow: hidden; overflow: clip; isolation: isolate; background: var(--vh-sky-midi);
  box-shadow: 0 10px 30px -12px rgba(30,40,30,.35), 0 2px 6px rgba(30,40,30,.12); touch-action: none; -webkit-user-select: none; user-select: none; }
.vh.is-3d .vh-stage:fullscreen { height: 100vh; border-radius: 0; }
.vh.is-3d :is(.vh-vol, .vh-door, .vh-fp, .vh-slab, .vh-table, .vh-tree, .vh-lamp, .vh-motes, .vh-smoke, .vh-jump, .vh-cloudsh, .vh-trail, .vh-tint, .vh-fx, .vh-sh, .vh-gr, .vh-hs, .vh-sky) { display: block; }
.vh.is-3d .vh-only3d { display: inline; }
.vh.is-3d :is(.vh-camtools, .vh-wx) { display: flex; }
.vh.is-3d [data-vh-full] { display: grid; }
.vh.is-3d :is(.elv-cloud, .elv-sun) { display: none; }

/* ---- Ciel ---- */
.vh-sky { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.vh-sky .s { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s linear; }
.vh-sky .s-matin { background: linear-gradient(180deg, #8fb6e0 0%, #f4c9a2 60%, #ffe3bd 100%); }
.vh-sky .s-midi { background: var(--vh-sky-midi); }
.vh-sky .s-soir { background: linear-gradient(180deg, #4d5da8 0%, #e5817a 56%, #ffc27a 100%); }
.vh-sky .s-nuit { background: linear-gradient(180deg, #0b1330 0%, #1b2b5c 60%, #2e4377 100%); }
.t-matin .s-matin, .t-midi .s-midi, .t-soir .s-soir, .t-nuit .s-nuit { opacity: 1; }
.vh-sky .stars { position: absolute; inset: 0 0 40% 0; opacity: 0;
  background: radial-gradient(1.5px 1.5px at 8% 20%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 22% 55%, #fff 50%, transparent 52%), radial-gradient(1.5px 1.5px at 37% 14%, #fff 50%, transparent 52%),
    radial-gradient(1px 1px at 52% 40%, #fff 50%, transparent 52%), radial-gradient(1.5px 1.5px at 66% 18%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 78% 50%, #fff 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 91% 24%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 14% 80%, #fff 50%, transparent 52%), radial-gradient(1.5px 1.5px at 85% 68%, #fff 50%, transparent 52%);
  animation: vhTwinkle 4s ease-in-out infinite; }
@keyframes vhTwinkle { 50% { filter: brightness(1.6); } }
.t-nuit .vh-sky .stars { opacity: .95; }
.vh-sky .orb { position: absolute; left: 62%; top: 4%; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fffbe6, #ffe27a 55%, #ffc94a); box-shadow: 0 0 80px 30px rgba(255,214,110,.55); }
.t-matin .vh-sky .orb { left: 12%; top: 22%; background: radial-gradient(circle at 40% 40%, #fff1d6, #ffc58a 60%, #ff9f5a); box-shadow: 0 0 90px 36px rgba(255,170,100,.5); }
.t-soir .vh-sky .orb { left: 84%; top: 26%; background: radial-gradient(circle at 40% 40%, #ffe9c4, #ff9a5a 60%, #ff6a3c); box-shadow: 0 0 100px 40px rgba(255,110,60,.5); }
.t-nuit .vh-sky .orb { left: 24%; top: 10%; width: 64px; height: 64px; background: radial-gradient(circle at 36% 36%, #fff, #dfe6f5 60%, #b9c4de); box-shadow: 0 0 60px 18px rgba(190,205,255,.35); }
.vh-sky .cl { position: absolute; left: -30%; height: 46px; border-radius: 999px; background: rgba(255,255,255,.85); box-shadow: 30px -16px 0 -4px rgba(255,255,255,.85), -26px -10px 0 -8px rgba(255,255,255,.8); animation: vhDrift linear infinite; }
.vh-sky .c1 { width: 130px; top: 10%; animation-duration: 90s; }
.vh-sky .c2 { width: 90px; top: 24%; animation-duration: 120s; animation-delay: -50s; opacity: .8; }
.vh-sky .c3 { width: 160px; top: 6%; animation-duration: 150s; animation-delay: -95s; opacity: .7; }
@keyframes vhDrift { to { transform: translateX(170vw); } }
.t-nuit .vh-sky .cl { opacity: .18; } .t-soir .vh-sky .cl { opacity: .55; }
:is(.w-couvert, .w-pluie, .w-brume) .vh-sky .cl { background: rgba(170,180,190,.9); box-shadow: 30px -16px 0 -4px rgba(170,180,190,.9), -26px -10px 0 -8px rgba(160,170,180,.9); }
:is(.w-pluie, .w-couvert) .vh-sky { filter: saturate(.45) brightness(.82); }
.w-brume .vh-sky { filter: saturate(.3) brightness(1.05); }
:is(.w-pluie, .w-couvert) .vh-sky .orb { opacity: .25; } .w-brume .vh-sky .orb { opacity: .45; }

/* ---- Lumière : une seule direction (--sx, --sy) pour toutes les ombres portées ---- */
.vh.is-3d.t-matin { --sx: .95; --sy: .4; --so: .34; --tint: rgba(255,196,140,.34); --lamp: .1; }
.vh.is-3d.t-midi  { --sx: .22; --sy: .42; --so: .36; --tint: rgba(255,255,255,0); --lamp: 0; }
.vh.is-3d.t-soir  { --sx: -.9; --sy: .5; --so: .34; --tint: rgba(255,170,120,.4); --lamp: .6; }
.vh.is-3d.t-nuit  { --sx: 0; --sy: 0; --so: 0; --tint: rgba(112,132,208,.7); --lamp: 1; }
.vh.is-3d.w-couvert { --cloud: .3; --so: .16; } .vh.is-3d.w-pluie { --cloud: .34; --so: .1; } .vh.is-3d.w-gel { --cloud: .06; }
.vh.is-3d.w-canicule { --cloud: .03; } .vh.is-3d.w-brume { --cloud: .2; --so: .12; }
.vh.is-3d.t-nuit { --so: 0; }
.vh.is-3d:is(.w-pluie, .w-couvert, .w-brume):is(.t-matin, .t-soir) { --tint: rgba(255,214,190,.2); }
.vh-tint { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: var(--tint, transparent); mix-blend-mode: multiply; }
:is(.w-pluie, .w-couvert) .vh-tint { -webkit-backdrop-filter: saturate(.6) brightness(.86); backdrop-filter: saturate(.6) brightness(.86); }
.w-brume .vh-tint { -webkit-backdrop-filter: saturate(.55) brightness(1.07) contrast(.9); backdrop-filter: saturate(.55) brightness(1.07) contrast(.9); }
.vh-fx { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; opacity: 0; }
.vh.is-3d.w-pluie .vh-fx.rain, .vh.is-3d.w-gel .vh-fx.frost, .vh.is-3d.w-canicule .vh-fx.heat, .vh.is-3d.w-brume .vh-fx.fog { opacity: 1; }
.vh-fx.rain i { position: absolute; inset: -40px; background-image: repeating-linear-gradient(104deg, transparent 0 17px, rgba(220,235,255,.55) 17px 18px, transparent 18px 34px); background-size: 160px 220px; animation: vhFall .5s linear infinite; }
.vh-fx.rain i:nth-child(2) { background-size: 100px 140px; opacity: .55; animation-duration: .38s; }
.vh-fx.rain i:nth-child(3) { background-size: 220px 300px; opacity: .8; animation-duration: .65s; }
@keyframes vhFall { to { background-position: -50px 220px; } }
.vh-fx.frost { background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(210,235,255,.55) 100%), linear-gradient(rgba(190,225,255,.18), rgba(190,225,255,.1)); mix-blend-mode: screen; }
.vh-fx.frost i { position: absolute; inset: 0; animation: vhTwinkle 2.2s ease-in-out infinite;
  background: radial-gradient(2px 2px at 12% 30%, #fff 50%, transparent 55%), radial-gradient(2px 2px at 34% 62%, #fff 50%, transparent 55%), radial-gradient(3px 3px at 58% 38%, #fff 50%, transparent 55%),
    radial-gradient(2px 2px at 76% 70%, #fff 50%, transparent 55%), radial-gradient(3px 3px at 88% 26%, #fff 50%, transparent 55%), radial-gradient(2px 2px at 46% 82%, #fff 50%, transparent 55%); }
.vh-fx.heat { background: radial-gradient(80% 70% at 85% 4%, rgba(255,226,140,.8), transparent 72%), linear-gradient(rgba(255,170,60,.22), rgba(255,140,30,.3)); mix-blend-mode: screen; }
.vh-fx.heat i { position: absolute; right: 8%; top: 2%; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,230,.8), rgba(255,220,120,.2) 40%, transparent 68%); animation: vhFlare 4s ease-in-out infinite; }
@keyframes vhFlare { 50% { scale: 1.14; opacity: .75; } }
.vh-fx.fog i { position: absolute; left: -30%; top: 8%; width: 160%; height: 55%; background: radial-gradient(ellipse at 50% 50%, rgba(240,244,246,.92), rgba(240,244,246,0) 68%); animation: vhFog 26s ease-in-out infinite alternate; }
.vh-fx.fog i:nth-child(2) { top: 44%; animation-duration: 34s; animation-direction: alternate-reverse; opacity: .85; }
@keyframes vhFog { to { transform: translateX(18%); } }

/* ---- Caméra et plateau ---- */
.vh.is-3d .vh-vp { position: absolute; inset: 0; z-index: 1; perspective: 3200px; perspective-origin: 50% 40%; cursor: grab; }
.vh.is-3d .vh-vp.is-drag { cursor: grabbing; }
/* La caméra ne capte pas les clics : sinon son plan (z = 0) masque la moitié lointaine du plateau. */
.vh.is-3d .vh-cam { position: absolute; inset: 0; pointer-events: none; transform-style: preserve-3d; transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(var(--z, 1)); }
.vh.is-3d .vh-cam.fly { transition: transform .95s cubic-bezier(.3,.7,.2,1); }
.vh.is-3d .elv-map { pointer-events: auto; position: absolute; left: 50%; top: 50%; width: 1260px; margin: 0 0 0 -630px; padding: 44px;
  display: grid; grid-template-columns: 240px 290px minmax(0, 1fr); gap: 30px 34px; align-items: start;
  overflow: visible; isolation: auto; border: 0; border-radius: 14px; box-shadow: none; transform-style: preserve-3d;
  transform: translateY(-50%) rotateX(var(--el)) rotateZ(var(--az));
  background:
    radial-gradient(60% 40% at 18% 30%, rgba(255,255,255,.12), transparent 70%), radial-gradient(40% 30% at 82% 70%, rgba(0,60,0,.1), transparent 70%),
    radial-gradient(2px 2px at 30% 40%, rgba(0,60,0,.1) 50%, transparent 52%) 0 0 / 37px 41px, radial-gradient(2px 2px at 60% 70%, rgba(255,255,255,.1) 50%, transparent 52%) 0 0 / 53px 47px,
    linear-gradient(135deg, var(--vh-g1), var(--vh-g2) 55%, var(--vh-g3)); }
.vh.is-3d .elv-barn { grid-column: 1 / span 2; }
.vh.is-3d .elv-office { grid-column: 1; }
.vh.is-3d .elv-grange { grid-column: 2; }
.vh.is-3d .elv-fields { grid-column: 3; grid-row: 1 / span 4; }
.vh.is-3d .elv-tray { grid-column: 1 / span 2; }
.vh.is-3d .elv-map:not(:has(.elv-barn)) .elv-fields { grid-column: 1 / -1; }
.vh.is-3d .elv-map:not(:has(.elv-fields)) .elv-barn { grid-column: 1 / -1; }
.vh-slab { position: absolute; transform-origin: 0 0; }
.vh-slab.f { left: 0; top: 100%; width: 100%; height: 34px; transform: rotateX(-90deg); background: linear-gradient(180deg, var(--vh-g4) 0 7px, var(--vh-soil) 7px, var(--vh-soil2)); box-shadow: inset 0 -10px 18px rgba(0,0,0,.25); }
.vh-slab.l { left: 0; top: 0; width: 34px; height: 100%; transform: rotateY(90deg); background: linear-gradient(90deg, var(--vh-g4) 0 7px, var(--vh-soil2) 7px, var(--vh-soil3)); }
.vh-table { position: absolute; inset: -6px; transform: translateZ(-34px); background: rgba(20,30,20,.5); filter: blur(26px); border-radius: 30px; pointer-events: none; }
.vh-cloudsh { position: absolute; inset: 0; overflow: hidden; border-radius: 14px; transform: translateZ(1.1px); pointer-events: none; }
.vh-cloudsh b { position: absolute; left: -420px; border-radius: 50%; background: rgba(15,35,20,var(--cloud)); filter: blur(22px); animation: vhCloud linear infinite; }
.vh-cloudsh b:nth-child(1) { top: 12%; width: 320px; height: 200px; animation-duration: 46s; }
.vh-cloudsh b:nth-child(2) { top: 56%; width: 220px; height: 150px; animation-duration: 58s; animation-delay: -22s; }
.vh-cloudsh b:nth-child(3) { top: 34%; width: 280px; height: 170px; animation-duration: 70s; animation-delay: -40s; }
@keyframes vhCloud { to { transform: translateX(1900px); } }
.vh-trail { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; transform: translateZ(1.4px); pointer-events: none; }

/* ---- Tout ce qui porte du relief garde sa profondeur et perd ses effets à plat ---- */
.vh.is-3d :is(.elv-barn, .elv-boxes, .elv-box, .elv-aisle, .elv-office, .elv-grange, .elv-grange-body, .elv-heap, .pile, .elv-fields, .elv-field, .herd, .graze, .elv-tray, .elv-tray-list, .elv-hz, .vh-jump, .vh-tree, .vh-lamp) {
  transform-style: preserve-3d; transform: none; opacity: 1; filter: none; -webkit-backdrop-filter: none; backdrop-filter: none; animation: none; overflow: visible; }

/* ---- Volumes : dessus + face avant + face gauche ---- */
.vh.is-3d :is(.vh-vol, .pile i.on) { position: absolute; margin: 0; opacity: 1; filter: none; animation: none; border-radius: 0; box-shadow: none;
  transform-style: preserve-3d; transform: translateZ(calc(var(--z0, 0px) + var(--h, 20px)));
  background: linear-gradient(135deg, rgba(255,255,255,.22), transparent 45%), var(--texT, none), var(--c, var(--vh-wall)); }
.vh.is-3d :is(.vh-vol, .pile i.on)::before { content: ''; position: absolute; left: 0; top: 100%; width: 100%; height: var(--h, 20px); transform-origin: 0 0; transform: rotateX(-90deg);
  background: linear-gradient(rgba(8,14,10,.12), rgba(8,14,10,.3)), var(--texF, none), var(--c, var(--vh-wall)); }
.vh.is-3d :is(.vh-vol, .pile i.on)::after { content: ''; position: absolute; left: 0; top: 0; width: var(--h, 20px); height: 100%; transform-origin: 0 0; transform: rotateY(90deg);
  background: linear-gradient(90deg, rgba(8,14,10,.3), rgba(8,14,10,.42)), var(--texL, none), var(--c, var(--vh-wall)); }
.vh.is-enter :is(.vh-vol, .pile i.on) { animation: vhRise 1s cubic-bezier(.22,.9,.28,1.04) backwards; animation-delay: var(--dl, .25s); }
@keyframes vhRise { from { transform: translateZ(-2px); } }
.vh.is-enter .elv-map { animation: vhBoardIn 1.1s cubic-bezier(.22,.9,.28,1.04) backwards; }
@keyframes vhBoardIn { from { transform: translateY(-50%) rotateX(var(--el)) rotateZ(var(--az)) translateZ(-150px); } }

/* ---- Étiquettes face à l'écran : un point d'ancrage contre-pivoté, une pastille dedans ---- */
.vh.is-3d :where(.elv-barn-roof, .elv-office-roof, .elv-grange-roof, .elv-field > .lbl, .elv-tray > .lbl, .elv-box > .lbl, .elv-box > .free, .herd > .free, .vh-hb, .vh-tree > b, .vh-lamp > b, .vh-smoke, .vh-motes) {
  display: block; position: absolute; inset: auto; left: 50%; top: 0; width: 0; height: 0; margin: 0; padding: 0; border: 0; background: none; overflow: visible; text-shadow: none; text-transform: none; letter-spacing: 0;
  pointer-events: none; transform-style: flat; transform-origin: 0 0; transform: translateZ(var(--bz, 0px)) rotateZ(calc(var(--az) * -1)) rotateX(calc(var(--el) * -1)); }
.vh.is-3d :is(.vh-sign, .vh-plate, .vh-pill, .vh-tag) { display: inline-flex; align-items: center; gap: 5px; position: absolute; left: 0; bottom: 0; white-space: nowrap; pointer-events: auto;
  transform-origin: 50% 100%; transform: translate(-50%, 0) scale(var(--ls, 1)); padding: 3px 10px; border-radius: 999px; font: 700 12px/1.35 Inter, system-ui, sans-serif; color: var(--vh-navy);
  background: var(--vh-glass); border: 1px solid var(--vh-glass-b); box-shadow: 0 3px 10px -4px rgba(0,0,0,.45); }
.vh.is-3d .vh-sign em { font-style: normal; font-weight: 600; background: none; padding: 0; opacity: .7; font-size: 11px; }
.vh.is-3d .vh-sign .n { font-weight: 700; }
.vh.is-3d .vh-sign::after { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: 12px; margin-left: -1px; background: linear-gradient(var(--vh-glass), transparent); }
.vh.is-3d .vh-sign .vh-i { color: var(--vh-brass); }
.vh.is-3d .vh-plate { padding: 1px 7px; font-size: 10px; }
.vh.is-3d .vh-plate .cnt { margin: 0 0 0 2px; }
.vh.is-3d .vh-pill { padding: 2px 9px; font-size: 11px; color: var(--vh-white); background: var(--vh-ok); border-color: transparent; }
.vh.is-3d .herd .vh-pill { background: rgba(20,40,20,.55); font-style: italic; font-weight: 600; }
.vh.is-3d:is(.zlow, .is-dense) .vh-plate { display: none; }
/* Vue d'ensemble chargée : on ne garde que les anneaux de signal ; le nom revient au survol, à la sélection ou en zoomant. */
.vh.is-3d.is-dense .elv-hz:not(.is-on, [data-hit], .is-picked, :hover, :focus-visible) .vh-tag .nm { display: none; }
.vh.is-3d.is-dense .elv-hz:not(.is-on, [data-hit], .is-picked, :hover, :focus-visible) .vh-tag:not(:has(.fl)) { display: none; }
.vh.is-3d.is-dense .elv-hz:not(.is-on, [data-hit], .is-picked, :hover, :focus-visible) .vh-tag { padding: 2px; }
.vh.is-3d.is-dense .elv-box > .free { display: none; }
.vh.is-enter :is(.vh-sign, .vh-plate, .vh-pill, .vh-tag, .vh-hs) { animation: vhPop .6s cubic-bezier(.22,.9,.28,1.04) backwards; animation-delay: 1s; }
@keyframes vhPop { from { opacity: 0; translate: 0 10px; } }

/* ---- Écurie à toit ouvert ---- */
.vh.is-3d .elv-barn { position: relative; padding: 8px; border-radius: 4px; background: var(--vh-cobble);
  box-shadow: calc(var(--sx) * 46px) calc(var(--sy) * 46px) 22px rgba(10,20,10,var(--so)); }
.vh.is-3d .elv-barn-roof { top: 6px; --bz: 62px; }
.vh.is-3d .vh-w { --c: var(--vh-wall); --texF: var(--vh-planks); --texL: var(--vh-planks-h); --dl: .2s; }
.vh.is-3d .vh-w.n { left: 0; top: 0; width: 100%; height: 8px; --h: 52px; }
.vh.is-3d .vh-w.e { right: 0; top: 0; width: 8px; height: 100%; --h: 38px; }
.vh.is-3d .vh-w.w { left: 0; top: 0; width: 8px; height: 100%; --h: 14px; }
.vh.is-3d .vh-w.s { left: 0; bottom: 0; width: 100%; height: 8px; --h: 10px; }
.vh.is-3d .elv-boxes { gap: 0; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.vh.is-3d .elv-box { position: relative; min-height: 92px; padding: 0; border: 0; border-radius: 0; gap: 16px; align-items: center; justify-content: center; cursor: default;
  background: var(--vh-straw-tex); box-shadow: inset 0 0 0 1px rgba(90,60,10,.14); }
.vh.is-3d .elv-box.is-empty { background: linear-gradient(rgba(255,255,255,.42), rgba(255,255,255,.42)), var(--vh-straw-tex); }
.vh.is-3d .elv-box::after { content: none; }
.vh.is-3d .elv-box > .lbl { --bz: 24px; }
.vh.is-3d .north > .elv-box > .lbl { top: calc(100% - 3px); }
.vh.is-3d .south > .elv-box > .lbl { top: 3px; }
.vh.is-3d .elv-box > .free { top: 54%; --bz: 3px; }
.vh.is-3d .vh-part { right: -2px; top: 0; width: 4px; height: 100%; --h: 26px; --c: var(--vh-wood); --texL: var(--vh-planks-h); --dl: .4s; }
.vh-door { position: absolute; left: 4px; right: 4px; height: 22px; transform-origin: 0 0; transform: rotateX(90deg); border-bottom: 4px solid var(--vh-wood-dark); border-radius: 0 0 3px 3px;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.2) 0 2px, transparent 2px 9px), linear-gradient(0deg, var(--vh-wood), var(--vh-wood-2)); transition: height .9s cubic-bezier(.22,.9,.28,1.04); }
.vh.is-3d .north .vh-door { top: 100%; } .vh.is-3d .south .vh-door { top: 0; }
.vh.is-3d .elv-box.is-empty .vh-door { height: 4px; }
.vh.is-3d .elv-aisle { position: relative; height: 46px; margin: 0; border-radius: 0; background: var(--vh-cobble); }
.vh.is-3d .elv-aisle > span { display: none; }
.vh.is-3d .vh-post { top: calc(50% - 3px); width: 6px; height: 6px; --h: 92px; --c: var(--vh-wood-dark); --dl: .55s; }
.vh.is-3d .vh-post.p1 { left: 0; } .vh.is-3d .vh-post.p2 { left: calc(50% - 3px); } .vh.is-3d .vh-post.p3 { right: 0; }
.vh.is-3d .vh-ridge { left: 0; top: calc(50% - 3px); width: 100%; height: 6px; --h: 7px; --z0: 92px; --c: var(--vh-wood-dark); --dl: .9s; }
.vh-lamp { position: absolute; top: 50%; width: 0; height: 0; } .vh-lamp.l1 { left: 25%; } .vh-lamp.l2 { left: 75%; }
.vh.is-3d .vh-lamp > b { left: 0; --bz: 76px; }
.vh-lamp > b::before { content: ''; position: absolute; left: -5px; top: 0; width: 10px; height: 14px; border-radius: 3px; background: #ffd98a; border: 1.6px solid var(--vh-wood-dark); }
.vh-lamp > b::after { content: ''; position: absolute; left: -70px; top: -60px; width: 140px; height: 140px; border-radius: 50%; mix-blend-mode: screen; opacity: calc(var(--lamp) * .9);
  background: radial-gradient(circle, rgba(255,210,120,.85), rgba(255,190,90,.25) 50%, transparent 70%); }
.vh.is-3d .vh-motes { left: 8%; top: 50%; --bz: 14px; }
.vh-motes b { position: absolute; top: 0; width: 3px; height: 3px; border-radius: 50%; background: rgba(255,244,210,.95); box-shadow: 0 0 6px 2px rgba(255,236,170,.6); opacity: 0; animation: vhMote 7s ease-in-out infinite; }
.vh-motes b:nth-child(1) { left: 10px; } .vh-motes b:nth-child(2) { left: 80px; top: -8px; animation-delay: -1.2s; } .vh-motes b:nth-child(3) { left: 150px; top: 6px; animation-delay: -2.6s; }
.vh-motes b:nth-child(4) { left: 230px; top: -4px; animation-delay: -3.9s; } .vh-motes b:nth-child(5) { left: 300px; top: 8px; animation-delay: -5s; } .vh-motes b:nth-child(6) { left: 380px; top: -10px; animation-delay: -6.1s; }
@keyframes vhMote { 0%, 100% { opacity: 0; translate: 0 0; } 20% { opacity: .9; } 60% { opacity: .5; translate: 18px -30px; } 85% { opacity: 0; translate: 30px -46px; } }

/* ---- Bureau ---- */
.vh.is-3d .elv-office { position: relative; min-height: 124px; padding: 0; border-radius: 4px; background: none; box-shadow: calc(var(--sx) * 44px) calc(var(--sy) * 44px) 20px rgba(10,20,10,var(--so)); }
.vh.is-3d .vh-bld { inset: 7px; --h: 46px; --c: var(--vh-plaster); --dl: .5s;
  --texF: linear-gradient(rgba(255,214,130,var(--lamp)), rgba(255,214,130,var(--lamp))) 16px 12px / 28px 22px no-repeat, linear-gradient(135deg, #bfe2f4, #6fa6cc) 16px 12px / 28px 22px no-repeat,
          linear-gradient(rgba(255,214,130,var(--lamp)), rgba(255,214,130,var(--lamp))) 60px 12px / 28px 22px no-repeat, linear-gradient(135deg, #bfe2f4, #6fa6cc) 60px 12px / 28px 22px no-repeat,
          linear-gradient(var(--vh-wood-dark), var(--vh-wood-dark)) calc(100% - 24px) 100% / 22px 36px no-repeat;
  --texL: linear-gradient(rgba(255,214,130,var(--lamp)), rgba(255,214,130,var(--lamp))) 12px 34px / 22px 30px no-repeat, linear-gradient(135deg, #bfe2f4, #6fa6cc) 12px 34px / 22px 30px no-repeat; }
.vh.is-3d .vh-roof { inset: 0; --h: 7px; --z0: 46px; --c: var(--vh-roof3d); --texT: repeating-linear-gradient(90deg, rgba(0,0,0,.14) 0 2px, transparent 2px 14px); --dl: .8s; }
.vh.is-3d .vh-chim { right: 26px; top: 22px; width: 14px; height: 14px; --h: 26px; --z0: 53px; --c: var(--vh-brick); --dl: .95s; }
.vh.is-3d .vh-smoke { left: calc(100% - 33px); top: 29px; --bz: 84px; }
.vh-smoke b { position: absolute; left: -7px; bottom: 0; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff, rgba(235,235,240,.8) 60%, transparent); opacity: 0; animation: vhSmoke 4.2s ease-out infinite; }
.vh-smoke b:nth-child(2) { animation-delay: 1.05s; } .vh-smoke b:nth-child(3) { animation-delay: 2.1s; } .vh-smoke b:nth-child(4) { animation-delay: 3.15s; }
@keyframes vhSmoke { 0% { opacity: 0; translate: 0 0; scale: .5; } 15% { opacity: .85; } 100% { opacity: 0; translate: 16px -70px; scale: 2.8; } }
.vh.is-3d .elv-office-roof { top: 58%; --bz: 74px; }
.vh.is-3d .elv-office-roof .vh-sign { cursor: pointer; }
.vh.is-3d .elv-office.is-hot .vh-sign em { color: var(--vh-alert); opacity: 1; font-weight: 700; }
.vh.is-3d .elv-office-body { display: none; position: absolute; left: 50%; top: 58%; width: 236px; grid-template-columns: 1fr; gap: 6px; padding: 8px; border-radius: 16px; pointer-events: auto;
  background: var(--vh-glass-strong); border: 1px solid var(--vh-glass-b); box-shadow: 0 14px 30px -12px rgba(0,0,0,.5);
  transform-origin: 0 0; transform: translateZ(104px) rotateZ(calc(var(--az) * -1)) rotateX(calc(var(--el) * -1)) scale(var(--ls, 1)) translate(-50%, -100%); }
.vh.is-3d .elv-office.is-open .elv-office-body { display: grid; }
.vh.is-3d .elv-desk { padding: 7px 10px; font-size: .78rem; }

/* ---- Grange : les bottes s'empilent, le niveau de stock se lit en hauteur ---- */
.vh.is-3d .elv-grange { position: relative; min-height: 124px; padding: 16px 10px 12px; border-radius: 4px; background: var(--vh-straw-tex); box-shadow: calc(var(--sx) * 44px) calc(var(--sy) * 44px) 20px rgba(10,20,10,var(--so)); }
.vh.is-3d .vh-gw { --h: 46px; --c: var(--vh-wall-2); --texF: var(--vh-planks); --texL: var(--vh-planks-h); --dl: .55s; }
.vh.is-3d .vh-gw.n { left: 0; top: 0; width: 100%; height: 7px; }
.vh.is-3d .vh-gw.e { right: 0; top: 0; width: 7px; height: 100%; }
.vh.is-3d .elv-grange-roof { top: 8px; --bz: 60px; }
.vh.is-3d .elv-grange-roof a { display: none; }
.vh.is-3d .elv-grange-body { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px 12px; padding-top: 8px; }
.vh.is-3d .elv-heap { display: block; position: relative; width: 84px; height: 58px; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.vh.is-3d .pile { display: block; position: absolute; left: 4px; top: 4px; width: 76px; height: 48px; min-height: 0; }
.vh.is-3d .pile i { display: none; }
.vh.is-3d .pile i.on { display: block; width: 36px; height: 22px; --h: 15px; --c: var(--vh-hay); --dl: calc(.9s + var(--b) * 70ms);
  --texT: linear-gradient(90deg, transparent 22%, rgba(90,70,20,.6) 22% 27%, transparent 27% 72%, rgba(90,70,20,.6) 72% 77%, transparent 77%);
  --texF: linear-gradient(90deg, transparent 22%, rgba(90,70,20,.6) 22% 27%, transparent 27% 72%, rgba(90,70,20,.6) 72% 77%, transparent 77%); }
.vh.is-3d .pile.t-straw i.on { --c: var(--vh-straw3d); }
.vh.is-3d .pile.k-rd i.on { border-radius: 9px; }
.vh.is-3d .pile i:nth-child(1) { left: 0; top: 0; } .vh.is-3d .pile i:nth-child(2) { left: 38px; top: 0; } .vh.is-3d .pile i:nth-child(3) { left: 0; top: 24px; } .vh.is-3d .pile i:nth-child(4) { left: 38px; top: 24px; }
.vh.is-3d .pile i:nth-child(5) { left: 0; top: 0; --z0: 16px; } .vh.is-3d .pile i:nth-child(6) { left: 38px; top: 0; --z0: 16px; } .vh.is-3d .pile i:nth-child(7) { left: 0; top: 24px; --z0: 16px; } .vh.is-3d .pile i:nth-child(8) { left: 38px; top: 24px; --z0: 16px; }
.vh.is-3d .pile i:nth-child(9) { left: 0; top: 12px; --z0: 32px; } .vh.is-3d .pile i:nth-child(10) { left: 38px; top: 12px; --z0: 32px; }
.vh.is-3d .vh-cap { display: flex; flex-direction: column; align-items: center; position: absolute; left: 50%; top: 100%; width: max-content; max-width: 130px; padding: 2px 8px; border-radius: 10px; pointer-events: auto;
  background: var(--vh-glass); border: 1px solid var(--vh-glass-b); box-shadow: 0 3px 10px -4px rgba(0,0,0,.45);
  transform-origin: 0 0; transform: rotateZ(calc(var(--az) * -1)) rotateX(calc(var(--el) * -1)) scale(var(--ls, 1)) translate(-50%, 2px); }
.vh.is-3d .vh-cap .nm { font-size: 10px; } .vh.is-3d .vh-cap .qt { font-size: 10px; animation: none; }

/* ---- Prés, paddocks, carrière ---- */
.vh.is-3d .elv-fields { gap: 34px 30px; align-items: flex-start; }
.vh.is-3d .elv-field { position: relative; min-height: calc(185px + var(--g) * 18px); padding: 0; border: 0; outline: 0; border-radius: 10px; cursor: default;
  box-shadow: inset 0 0 0 3px rgba(0,50,0,.1), inset 0 0 22px rgba(0,50,0,.18);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 26px, rgba(0,0,0,.03) 26px 52px), radial-gradient(50% 50% at 30% 30%, rgba(255,255,255,.14), transparent 70%), linear-gradient(160deg, var(--vh-f1), var(--vh-f2)); }
.vh.is-3d .elv-field.k-paddock { background: repeating-linear-gradient(90deg, rgba(0,0,0,.035) 0 3px, transparent 3px 9px), radial-gradient(60% 60% at 40% 40%, rgba(255,255,255,.25), transparent 70%), linear-gradient(160deg, var(--vh-pad1), var(--vh-pad2)); }
.vh.is-3d .elv-field.k-carriere { box-shadow: inset 0 0 0 3px rgba(120,90,30,.12);
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 7px), radial-gradient(70% 70% at 40% 35%, rgba(255,255,255,.35), transparent 70%), linear-gradient(160deg, var(--vh-sand3d1), var(--vh-sand3d2)); }
.vh.is-3d .elv-field > .lbl { top: 8px; --bz: 34px; }
.vh.is-3d .herd { position: relative; min-height: calc(185px + var(--g) * 18px); padding: 54px 14px 16px; gap: 34px 12px; }
.vh.is-3d .herd > .free { top: 56%; --bz: 2px; }
.vh.is-3d .k-carriere .herd > .free { top: 22%; }
.vh.is-3d .graze { position: relative; width: 66px; height: 30px; margin: var(--j, 0) 0 0 var(--jx, 0); }
.vh.is-3d .graze > .elv-hz { position: absolute; left: 50%; top: 50%; }
.vh-fp { position: absolute; transform-origin: 0 0; pointer-events: none; }
.vh-fp.n, .vh-fp.s { left: 0; width: 100%; height: 17px; transform: rotateX(90deg);
  background: repeating-linear-gradient(90deg, var(--vh-wood-dark) 0 4px, transparent 4px 38px), linear-gradient(180deg, transparent 34%, var(--vh-rail) 34% 48%, transparent 48% 74%, var(--vh-rail) 74% 88%, transparent 88%); }
.vh-fp.n { top: 0; } .vh-fp.s { top: 100%; }
.vh-fp.e, .vh-fp.w { top: 0; width: 17px; height: 100%; transform: rotateY(-90deg);
  background: repeating-linear-gradient(0deg, var(--vh-wood-dark) 0 4px, transparent 4px 38px), linear-gradient(90deg, transparent 34%, var(--vh-rail) 34% 48%, transparent 48% 74%, var(--vh-rail) 74% 88%, transparent 88%); }
.vh-fp.w { left: 0; } .vh-fp.e { left: 100%; }
.vh.is-3d .k-carriere .vh-fp.n, .vh.is-3d .k-carriere .vh-fp.s { height: 11px; } .vh.is-3d .k-carriere .vh-fp.e, .vh.is-3d .k-carriere .vh-fp.w { width: 11px; }
.vh-jump { position: absolute; left: calc(50% - 42px); width: 84px; height: 4px; } .vh-jump.j1 { top: 40%; } .vh-jump.j2 { top: 72%; }
.vh.is-3d .vh-jump .a, .vh.is-3d .vh-jump .b { top: 0; width: 4px; height: 4px; --h: 26px; --c: #f2f2f2; --dl: .8s; } .vh.is-3d .vh-jump .a { left: 0; } .vh.is-3d .vh-jump .b { right: 0; }
.vh.is-3d .vh-jump .c { left: 0; top: 1px; width: 100%; height: 2px; --h: 3px; --z0: 17px; --c: var(--vh-alert); --dl: .9s; } .vh.is-3d .vh-jump.j2 .c { --c: var(--vh-blue); }
.vh.is-3d .vh-trough { left: 22px; top: calc(100% - 36px); width: 44px; height: 15px; --h: 9px; --c: #7b8794; --texT: linear-gradient(#6fb4e0, #4f8fd1); --dl: 1s; }
.vh-tree { position: absolute; width: 0; height: 0; }
.vh.is-3d .elv-field > .vh-tree { left: calc(100% - 30px); top: 30px; }
.vh.is-3d .vh-tree.b1 { left: 22px; top: calc(100% - 20px); } .vh.is-3d .vh-tree.b2 { left: calc(100% - 20px); top: 22px; }
.vh-tree::before { content: ''; position: absolute; left: -22px; top: -10px; width: 56px; height: 24px; border-radius: 50%; background: rgba(10,25,10,var(--so)); filter: blur(5px); transform: translateZ(.9px) translate(calc(var(--sx) * 26px), calc(var(--sy) * 26px)); }
.vh.is-3d .vh-tree > b { left: 0; }
.vh-tree > b::after { content: ''; position: absolute; left: -3px; bottom: 0; width: 7px; height: 30px; border-radius: 2px; background: var(--vh-wood-dark); }
.vh-tree > b::before { content: ''; position: absolute; left: -26px; bottom: 22px; width: 52px; height: 52px; border-radius: 50%; transform-origin: 50% 130%; animation: vhSway 5.5s ease-in-out infinite;
  background: radial-gradient(circle at 34% 30%, var(--vh-leaf1), var(--vh-leaf2) 58%, var(--vh-leaf3)); box-shadow: -15px 13px 0 -9px var(--vh-leaf2), 15px 9px 0 -10px var(--vh-leaf2); }
.vh-tree.sm > b::before { left: -19px; bottom: 16px; width: 38px; height: 38px; animation-delay: -2s; } .vh-tree.sm > b::after { height: 22px; }
@keyframes vhSway { 0%, 100% { rotate: -1.6deg; } 50% { rotate: 1.6deg; } }

/* ---- Non placés ---- */
.vh.is-3d .elv-tray { position: relative; min-height: 78px; padding: 0; border: 0; border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.06);
  background: radial-gradient(1.5px 1.5px at 20% 30%, rgba(0,0,0,.16) 50%, transparent 52%) 0 0 / 11px 13px, radial-gradient(1.5px 1.5px at 70% 60%, rgba(255,255,255,.4) 50%, transparent 52%) 0 0 / 17px 15px, linear-gradient(160deg, var(--vh-gravel1), var(--vh-gravel2)); }
.vh.is-3d .elv-tray > .lbl { left: 64px; top: 62%; --bz: 3px; }
.vh.is-3d .elv-tray-list { gap: 26px 76px; padding: 46px 40px 14px 150px; min-height: 78px; }
.vh.is-3d .elv-tray-list::before { content: none !important; }

/* ---- Chevaux : silhouette de profil face à l'écran, ombre au sol qui suit ---- */
.vh.is-3d .elv-hz { display: block; position: relative; flex: none; width: 0; height: 0; padding: 0; background: none; box-shadow: none; border-radius: 0; transition: none; z-index: auto; outline: 0; }
.vh.is-3d .elv-hz .av { display: none; }
.vh-sh { position: absolute; left: -26px; top: -9px; width: 52px; height: 18px; border-radius: 50%; background: rgba(10,20,10,calc(var(--so) * 1.25)); filter: blur(3px); pointer-events: none;
  transform: translateZ(.95px) translate(calc(var(--sx) * 10px), calc(var(--sy) * 8px)); }
.vh-gr { position: absolute; left: -34px; top: -34px; width: 68px; height: 68px; border-radius: 50%; border: 3px solid var(--ringc, var(--vh-brass)); opacity: 0; pointer-events: none; transform: translateZ(1px) scale(.4); }
.vh.is-3d .vh-hb { left: 0; }
.vh.is-3d .vh-hs { position: absolute; left: -34px; bottom: -3px; width: 68px; height: 72px; overflow: visible; pointer-events: auto; cursor: pointer; }
.vh.is-3d .elv-box .vh-hs { left: -31px; width: 62px; height: 66px; }
.vh.is-3d .vh-tag { bottom: 68px; padding: 2px 9px 2px 3px; cursor: pointer; transition: box-shadow .3s; }
.vh.is-3d .elv-box .vh-tag { bottom: 62px; }
.vh.is-3d .vh-tag:not(:has(.fl, .ph)) { padding-left: 9px; }
.vh.is-3d .elv-hz .fl { position: static; order: 0; padding: 0; background: none; box-shadow: none; }
.vh.is-3d .elv-hz .ph { width: 19px; height: 19px; }
.vh.is-3d .elv-hz .nm { white-space: nowrap; max-width: none; overflow: visible; }
.vh.is-3d .elv-hz:focus-visible .vh-tag { outline: 3px solid var(--vh-blue); outline-offset: 2px; }
.vh.is-3d .elv-hz:hover .vh-tag { box-shadow: 0 0 0 2px var(--vh-brass), 0 6px 14px -5px rgba(0,0,0,.5); }
.vh-hs .coat { fill: var(--coat); } .vh-hs .coat2 { fill: var(--coat2); } .vh-hs .mane { fill: var(--mane); } .vh-hs .patch { fill: var(--patch, transparent); }
.vh-hs .hoof { fill: #2a1d16; } .vh-hs .eye { fill: #1b130e; } .vh-hs .lite { fill: #fff; opacity: .28; } .vh-hs .dark { fill: #000; opacity: .16; } .vh-hs .nose { opacity: .55; } .vh-hs .breath { fill: #fff; opacity: 0; }
.ct-bai { --coat: var(--vh-c-bai); --coat2: var(--vh-c-bai2); --mane: var(--vh-c-bai-m); }
.ct-alezan { --coat: #bd6a31; --coat2: #9a5322; --mane: #d79a5a; } .ct-noir { --coat: #2e2d33; --coat2: #212026; --mane: #0f0e12; }
.ct-gris { --coat: #bcc1ca; --coat2: #9ca2ad; --mane: #7e8490; } .ct-pie { --coat: #f1ebe0; --coat2: #d9d1c3; --mane: #3a2a20; --patch: #6b4630; }
.ct-isabelle { --coat: #dcb877; --coat2: #c29c5a; --mane: #5a4326; } .ct-palomino { --coat: #e7b85f; --coat2: #cd9c45; --mane: #f6e8bd; }
.ct-baibrun { --coat: #5d3624; --coat2: #482817; --mane: #1c0f09; } .ct-creme { --coat: #efe3c8; --coat2: #dccfb0; --mane: #f7f0dc; }
.ct-rouan { --coat: #b98a7a; --coat2: #9c7062; --mane: #4a2c22; } .ct-souris { --coat: #9a9388; --coat2: #7f786d; --mane: #2c2824; }
.vh-hs :is(.face, .tail, .torso, .hd, .ear, .lg, .sh, .breath) { transform-box: view-box; }
.vh-hs .face { transform-origin: 60px 40px; }
.vh-hs .tail { transform-origin: 28px 40px; animation: vhTail 3.4s ease-in-out infinite; }
@keyframes vhTail { 0%, 100% { rotate: 0deg; } 35% { rotate: 7deg; } 65% { rotate: -5deg; } }
.vh-hs .torso { transform-origin: 55px 58px; animation: vhBreathe 3.6s ease-in-out infinite; }
@keyframes vhBreathe { 50% { scale: 1.012 1.03; } }
.vh-hs .ear { transform-origin: 97px 8px; animation: vhEar 6s infinite; }
@keyframes vhEar { 0%, 86%, 100% { rotate: 0deg; } 90% { rotate: -16deg; } 94% { rotate: 4deg; } }
.vh-hs .hd { transform-origin: 84px 40px; }
.elv-box .vh-hs .hd { animation: vhNod 5.5s ease-in-out infinite; }
@keyframes vhNod { 0%, 100% { rotate: 0deg; } 50% { rotate: 7deg; } }
.south .vh-hs .face { scale: -1 1; }
.vh-hs .legs-w { opacity: 0; }
.vh-hs .lg { animation: vhStep 1.15s linear infinite; animation-delay: calc(var(--ph, 0) * -1.15s); }
.vh-hs .sh { animation: vhKnee 1.15s linear infinite; animation-delay: calc(var(--ph, 0) * -1.15s); }
/* Pas à quatre temps : postérieur gauche, antérieur gauche, postérieur droit, antérieur droit (déphasage d'un quart de foulée). */
.vh-hs .l1 { --ph: .5; transform-origin: 33px 48px; } .vh-hs .l2 { --ph: 0; transform-origin: 44px 48px; } .vh-hs .l3 { --ph: .75; transform-origin: 74px 48px; } .vh-hs .l4 { --ph: .25; transform-origin: 85px 48px; }
.vh-hs .l1 .sh { transform-origin: 33px 70px; } .vh-hs .l2 .sh { transform-origin: 44px 70px; } .vh-hs .l3 .sh { transform-origin: 74px 70px; } .vh-hs .l4 .sh { transform-origin: 85px 70px; }
/* Appui : la jambe recule d'un mouvement régulier, jambe raide ; ensuite elle se lève, plie au genou et repart devant. */
@keyframes vhStep { 0% { rotate: -17deg; animation-timing-function: linear; } 58% { rotate: 15deg; animation-timing-function: ease-in-out; } 100% { rotate: -17deg; } }
@keyframes vhKnee { 0%, 58% { rotate: 0deg; animation-timing-function: ease-out; } 77% { rotate: 58deg; animation-timing-function: ease-in; } 100% { rotate: 0deg; } }
.vh.is-3d.w-gel .vh-hs .breath { transform-origin: 114px 28px; animation: vhPuff 3.2s ease-out infinite; }
@keyframes vhPuff { 0% { opacity: 0; scale: .3; translate: 0 0; } 20% { opacity: .85; } 100% { opacity: 0; scale: 2.4; translate: 12px -12px; } }
.vh.is-lite .vh-hs :is(.tail, .torso, .ear), .vh.is-lite .elv-box .vh-hs .hd { animation: none; }
.vh.is-lite :is(.vh-motes, .vh-cloudsh) { display: none !important; }
/* Au pré : marche lente entre trois points, arrêts pour brouter (durée et décalage propres à chaque cheval). */
.vh.is-3d .graze { --wd: calc(var(--d, 8s) * 2.4); --f0: var(--f3, 1); animation: vhWander var(--wd) linear infinite; animation-delay: var(--dl, 0s); }
@keyframes vhWander { 0%, 18% { translate: 0 0; } 30%, 50% { translate: calc(var(--bx, 14px) * var(--wk, 1)) calc(var(--by, 8px) * var(--wk, 1)); } 62%, 80% { translate: calc(var(--cx, -12px) * var(--wk, 1)) calc(var(--cy, 10px) * var(--wk, 1)); } 92%, 100% { translate: 0 0; } }
.vh.is-3d .graze .face { animation: vhFacing var(--wd) linear infinite; animation-delay: var(--dl, 0s); }
@keyframes vhFacing { 0%, 17% { scale: var(--f0, 1) 1; } 18.5%, 49% { scale: var(--f1, 1) 1; } 50.5%, 79% { scale: var(--f2, 1) 1; } 80.5%, 91% { scale: var(--f3, 1) 1; } 92.5%, 100% { scale: var(--f0, 1) 1; } }
.vh.is-3d .graze .hd { animation: vhGraze var(--wd) ease-in-out infinite; animation-delay: var(--dl, 0s); }
@keyframes vhGraze { 0%, 1% { rotate: 0deg; } 4%, 15% { rotate: 46deg; } 18%, 30% { rotate: 0deg; } 33%, 47% { rotate: 46deg; } 50%, 62% { rotate: 0deg; } 65%, 77% { rotate: 46deg; } 80%, 92% { rotate: 0deg; } 95%, 100% { rotate: 46deg; } }
.vh.is-3d .graze .legs-w { animation: vhLegsW var(--wd) steps(1) infinite; animation-delay: var(--dl, 0s); }
.vh.is-3d .graze .legs-s { animation: vhLegsS var(--wd) steps(1) infinite; animation-delay: var(--dl, 0s); }
@keyframes vhLegsW { 0%, 17.9% { opacity: 0; } 18%, 30% { opacity: 1; } 30.1%, 49.9% { opacity: 0; } 50%, 62% { opacity: 1; } 62.1%, 79.9% { opacity: 0; } 80%, 92% { opacity: 1; } 92.1%, 100% { opacity: 0; } }
@keyframes vhLegsS { 0%, 17.9% { opacity: 1; } 18%, 30% { opacity: 0; } 30.1%, 49.9% { opacity: 1; } 50%, 62% { opacity: 0; } 62.1%, 79.9% { opacity: 1; } 80%, 92% { opacity: 0; } 92.1%, 100% { opacity: 1; } }
.vh.is-3d.is-moving .graze, .vh.is-3d.is-moving .graze * { animation-play-state: paused; }
/* En route vers sa nouvelle place : jambes en marche, tête haute. */
.vh.is-3d .elv-hz.is-walking .legs-w { opacity: 1 !important; animation: none; } .vh.is-3d .elv-hz.is-walking .legs-s { opacity: 0 !important; animation: none; }
.vh.is-3d .elv-hz.is-walking .hd { animation: none; rotate: 0deg; }
.vh.is-3d .elv-hz.is-walking .face { animation: none; scale: var(--fw, 1) 1; }

/* ---- États : sélection, recherche, filtres, déplacement ---- */
.vh.is-3d .elv-hz:is(.is-on, [data-hit], .is-picked) .vh-gr { animation: vhRipple 1.6s cubic-bezier(.3,.7,.2,1) infinite; }
.vh.is-3d .elv-hz.is-landed .vh-gr { --ringc: var(--vh-ok); animation: vhRipple 1.2s cubic-bezier(.3,.7,.2,1) 2; }
@keyframes vhRipple { 0% { opacity: .95; transform: translateZ(1px) scale(.4); } 100% { opacity: 0; transform: translateZ(1px) scale(1.7); } }
.vh.is-3d .elv-hz:is(.is-on, [data-hit], .is-picked) .vh-tag { box-shadow: 0 0 0 2px var(--vh-brass), 0 8px 18px -6px rgba(0,0,0,.55); background: var(--vh-white); }
.vh.is-3d .elv-hz:is(.is-on, [data-hit], .is-picked) .vh-hs { filter: drop-shadow(0 0 7px rgba(255,214,110,.95)); }
.vh.is-3d .elv-hz.is-picked { animation: none; box-shadow: none; background: none; }
.vh.is-3d .elv-hz.is-picked .vh-hs { animation: vhLift 1s ease-in-out infinite; }
@keyframes vhLift { 50% { translate: 0 -12px; } }
.vh.is-3d .elv-hz.is-landed { animation: none; }
.vh.is-3d .elv-hz.is-landed .vh-tag { animation: vhBounce .7s cubic-bezier(.22,.9,.28,1.04) both; }
@keyframes vhBounce { 0% { translate: 0 -16px; } 60% { translate: 0 3px; } 100% { translate: 0 0; } }
.vh.is-3d .vh-hb, .vh.is-3d .vh-sh { transition: opacity .5s, filter .5s; }
.vh.is-3d[data-f="late"] .elv-hz:not([data-t~="late"]) .vh-hb, .vh.is-3d[data-f="client"] .elv-hz:not([data-t~="client"]) .vh-hb,
.vh.is-3d[data-f="preg"] .elv-hz:not([data-t~="preg"]) .vh-hb, .vh.is-3d[data-f="free"] .elv-hz .vh-hb { opacity: .25; filter: grayscale(1); }
.vh.is-3d[data-f="late"] .elv-hz:not([data-t~="late"]) .vh-sh, .vh.is-3d[data-f="client"] .elv-hz:not([data-t~="client"]) .vh-sh,
.vh.is-3d[data-f="preg"] .elv-hz:not([data-t~="preg"]) .vh-sh, .vh.is-3d[data-f="free"] .elv-hz .vh-sh { opacity: .2; }
.vh.is-3d.is-moving .elv-hz:not(.is-picked) .vh-hb { opacity: .72; }
/* Places possibles : un liseré posé au sol (pas de filter ni d'opacity sur la place elle-même). */
.vh.is-3d.is-moving :is(.is-target, .is-from, .is-crowded), .vh.is-3d.is-moving .is-target:hover { animation: none; filter: none; opacity: 1; transform: none; outline: 0; cursor: pointer; }
.vh.is-3d.is-moving .elv-box:is(.is-target, .is-from, .is-crowded) { box-shadow: inset 0 0 0 1px rgba(90,60,10,.14); }
.vh.is-3d.is-moving [data-place]::after, .vh.is-3d[data-f="free"] :is(.elv-box.is-empty, .elv-field.is-empty)::after {
  content: ''; display: block; position: absolute; inset: 3px; height: auto; border-radius: 9px; border: 3px dashed rgba(255,255,255,.95); background: rgba(255,255,255,.14); opacity: 1; pointer-events: none;
  transform: translateZ(1.2px); animation: vhTarget 1.4s ease-in-out infinite; }
@keyframes vhTarget { 50% { background-color: rgba(255,255,255,.32); } }
.vh.is-3d.is-moving .is-from::after { border-color: var(--vh-brass); background: rgba(222,165,58,.2); animation: none; }
.vh.is-3d.is-moving .is-crowded::after { border-color: var(--vh-warn); }
.vh.is-3d[data-f="free"]:not(.is-moving) :is(.elv-box.is-empty, .elv-field.is-empty)::after { border-color: var(--vh-ok); background: rgba(61,154,91,.28); }
.vh.is-3d[data-f="free"] .elv-box > .free .vh-pill { animation: vhBob 1s ease-in-out infinite; }
@keyframes vhBob { 50% { translate: 0 -7px; } }

/* ---- Bandeau flottant, outils, météo, fiche éclair ---- */
.vh.is-3d .vh-hud { position: absolute; z-index: 5; left: 14px; top: 14px; right: 150px; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; pointer-events: none; }
.vh.is-3d .vh-hud .elv-kpi { pointer-events: auto; gap: 8px; padding: 6px 12px 6px 7px; border-radius: 14px; font-size: .76rem; line-height: 1.15; color: var(--vh-navy); text-align: left; cursor: default;
  background: var(--vh-glass); -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3); border: 1px solid var(--vh-glass-b); box-shadow: var(--vh-ui-shadow); }
.vh.is-3d .vh-hud .elv-kpi b { font-size: 1.05rem; color: inherit; }
.vh.is-3d .vh-hud .elv-kpi small { display: none; }
.vh.is-3d .vh-hud .elv-kpi :is(.ico, .ring) { width: 32px; height: 32px; }
.vh.is-3d .vh-hud .elv-kpi .ring b { width: 25px; height: 25px; font-size: .58rem; }
.vh.is-3d .vh-hud .elv-kpi .ico .vh-i { font-size: 1rem; }
.vh.is-3d .vh-hud .elv-kpi.alert b { color: var(--vh-alert); } .vh.is-3d .vh-hud .elv-kpi.warn b { color: var(--vh-warn); }
.vh.is-3d .vh-hud .vh-wx { cursor: pointer; font: inherit; font-size: .76rem; }
.vh.is-3d .vh-hud .vh-wx small { display: block; font-size: .66rem; opacity: .7; }
.vh-wxi { background: radial-gradient(circle at 40% 40%, #fff3b0, #ffc94a) !important; box-shadow: 0 0 12px 2px rgba(255,201,74,.6); }
:is(.w-couvert, .w-brume) .vh-wxi { background: radial-gradient(circle at 40% 40%, #fff, #b7c2cc) !important; box-shadow: none; }
.w-pluie .vh-wxi { background: radial-gradient(circle at 40% 40%, #fff, #8fa6bd) !important; box-shadow: inset 0 -9px 0 -3px #4f8fd1; }
.w-gel .vh-wxi { background: radial-gradient(circle at 40% 40%, #fff, #bfe3ff) !important; box-shadow: 0 0 12px 4px rgba(150,210,255,.8); }
.w-canicule .vh-wxi { background: radial-gradient(circle at 40% 40%, #fff, #ff9040) !important; box-shadow: 0 0 16px 5px rgba(255,120,40,.7); }
.t-nuit .vh-wxi { background: radial-gradient(circle at 36% 36%, #fff, #c9d2ea) !important; box-shadow: 0 0 10px 2px rgba(190,205,255,.5); }
.vh.is-3d .vh-tools { position: absolute; z-index: 5; right: 14px; top: 14px; margin: 0; }
.vh.is-3d .elv-meteo { display: none; }
.vh.is-3d .elv-meteo.is-open { display: block; position: absolute; z-index: 6; left: 14px; top: 68px; width: min(560px, calc(100% - 28px)); margin: 0; border-color: var(--vh-glass-b); box-shadow: 0 18px 40px -14px rgba(20,30,20,.5); animation: vhDrop .35s cubic-bezier(.22,.9,.28,1.04); }
@keyframes vhDrop { from { opacity: 0; translate: 0 -10px; } }
.vh.is-3d .vh-filters { position: absolute; z-index: 5; left: 14px; right: 14px; bottom: 14px; margin: 0; pointer-events: none; }
.vh.is-3d .vh-filters > * { pointer-events: auto; }
.vh-camtools { position: absolute; z-index: 5; right: 14px; top: 50%; translate: 0 -50%; flex-direction: column; gap: 6px; }
.vh.is-3d .vh-peek { position: absolute; z-index: 7; right: 14px; top: 68px; bottom: auto; translate: calc(100% + 30px) 0; }
.vh.is-3d .vh-peek.open { translate: 0 0; }

@media (max-width: 720px) {
  .vh.is-3d .vh-stage { height: min(74vh, 620px); border-radius: 18px; }
  .vh.is-3d .vh-hud { left: 8px; top: 8px; right: 8px; gap: 6px; padding-right: 0; }
  .vh.is-3d .vh-hud .elv-kpi { padding: 4px 9px 4px 5px; font-size: .7rem; }
  .vh.is-3d .vh-hud .elv-kpi :is(.ico, .ring) { width: 26px; height: 26px; }
  .vh.is-3d .vh-hud .elv-kpi .ring b { width: 20px; height: 20px; font-size: .5rem; }
  .vh.is-3d .vh-tools { top: auto; bottom: 62px; right: 8px; flex-direction: column; align-items: flex-end; }
  .vh.is-3d .vh-camtools { top: auto; bottom: 156px; right: 8px; translate: 0 0; }
  .vh.is-3d .vh-filters { left: 8px; right: 8px; bottom: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; pointer-events: auto; }
  .vh.is-3d .vh-filters > * { flex: none; }
  .vh.is-3d .elv-meteo.is-open { left: 8px; top: 96px; width: calc(100% - 16px); }
  .vh.is-3d .vh-peek { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; translate: 0 calc(100% + 30px); border-radius: 22px 22px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .vh, .vh *, .vh *::before, .vh *::after { animation: none !important; transition: none !important; }
  .vh-fx.rain i:nth-child(n+2), .vh-motes, .vh-smoke, .vh-cloudsh, .vh-gr { display: none !important; }
}


/* ===========================================================================
   CARNET DE SOINS — « À donner aujourd'hui » (inc/soins_view.php), partagé
   ========================================================================= */
.soin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.soin-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); }
.soin-list li.is-done { background: var(--ok-soft, #E7EFE1); border-color: transparent; }
.soin-list li.is-done .soin-what { opacity: .65; }
.soin-list form { margin: 0; }
.soin-check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--brass, #B0812B); background: #fff;
  color: #fff; font-weight: 800; font-size: 15px; line-height: 1; cursor: pointer; padding: 0; transition: transform .15s, background .15s; }
.soin-check:hover { transform: scale(1.08); }
.is-done .soin-check { background: var(--ok, #4F7A3A); border-color: var(--ok, #4F7A3A); }
.soin-what { display: flex; flex-direction: column; min-width: 0; font-size: .9rem; }
.soin-what span { color: var(--ink-2, #33415e); font-size: .84rem; }
.soin-slot { text-align: right; font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; display: flex; flex-direction: column; }
.soin-slot small { font-weight: 400; }

/* Pensionnaires (inc/panel/pensions.php) : qui est où, à qui, combien. */
.pens-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pens-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--card, #fff); display: flex; flex-direction: column; gap: 6px; }
.pens-card.is-todo { border-style: dashed; border-color: var(--brass-line, rgba(176,129,43,.4)); background: var(--card-2, #FAF8F3); }
.pens-card .ph { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pens-card .ph b { font-size: 1rem; }
.pens-card .where { display: inline-flex; gap: 6px; align-items: center; font-size: .82rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--brass-soft, #F1E6CC); color: #6d5016; }
.pens-card .where.none { background: #FBEAE7; color: #A8412B; }
.pens-card .meta { font-size: .8rem; color: var(--muted); }
.pens-card .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pens-card .tags span { font-size: .72rem; padding: 2px 7px; border-radius: 999px; background: #eef1f5; }
.pens-card .tags .bad { background: #FBEAE7; color: #A8412B; }
.pens-card .tags .ok { background: var(--ok-soft, #E7EFE1); color: var(--ok, #4F7A3A); }
.pens-card form { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 0; }
.pens-card form select, .pens-card form input { flex: 1 1 120px; min-width: 0; }
.pens-occ { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 12px; font-size: .86rem; }
.pens-occ b { font-size: 1.05rem; }

/* Fiche cheval (élevage) : départ et séjour */
.elv-gone { margin-top: 14px; padding: 11px 14px; border-radius: 12px; background: #EEF1F5; border: 1px solid var(--line); font-size: .9rem; }
.elv-gone div { margin-top: 4px; font-size: .84rem; }
.elv-stay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.elv-stay > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.elv-stay span { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.elv-stay b { font-size: 1.05rem; }
.elv-stay small { color: var(--muted); font-size: .76rem; }
@media (max-width: 560px) { .elv-stay { grid-template-columns: 1fr; } }
.elv-stay-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin: 14px 0 8px; background: #eee; }
.elv-stay-bar i, .elv-stay-leg i { display: block; }
.elv-stay-leg { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; }
.elv-stay-leg li { display: flex; align-items: center; gap: 6px; }
.elv-stay-leg i { width: 10px; height: 10px; border-radius: 3px; }
.k-box { background: #B07A45; } .k-pature { background: #6FA34F; } .k-paddock { background: #C9A46A; } .k-carriere { background: #D8C7A3; }
.elv-transfer { border: 1px dashed var(--brass-line, rgba(176,129,43,.4)); border-radius: 12px; padding: 10px 12px; margin: 4px 0 12px; background: var(--card-2, #FAF8F3); }

/* Profil d'activité de l'élevage (tableau de bord, Réglages) */
.elv-act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.elv-act-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: var(--card, #fff); }
.elv-act-opt:has(input:checked) { border-color: var(--brass, #B0812B); background: var(--brass-soft, #F1E6CC); }
.elv-act-opt span { display: flex; flex-direction: column; font-size: .9rem; }
.elv-act-opt small { color: var(--muted); font-size: .78rem; }
.elv-activites { border-left: 4px solid var(--brass, #B0812B); }

/* ---- Plan / Satellite (assets/js/vue-satellite.js) ---- */
.elv-view-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 4px 0 12px; background: #eef1f5; border-radius: 999px; }
.elv-view-tabs button { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font: inherit; font-weight: 600; font-size: .9rem; color: #42506a; cursor: pointer; }
.elv-view-tabs button.is-on { background: #fff; color: #172640; box-shadow: 0 1px 4px rgba(23,38,64,.15); }
.elv-view-tabs em { font-style: normal; font-size: .68rem; background: #e9c46f; color: #4a3608; border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.elv-sat-map { height: min(68vh, 560px); min-height: 340px; border-radius: 16px; overflow: hidden; background: #2b3a2a; box-shadow: 0 2px 10px rgba(23,38,64,.12); }
.elv-sat-legend { margin-top: 10px; }
.lg.arena { background: #E2D3B0; }
.elv-sat-pop { display: grid; gap: 6px; min-width: 200px; font-size: .85rem; }
.elv-sat-pop .muted { color: #5B6573; }
.elv-sat-pick { display: flex; gap: 6px; }
.elv-sat-pick select { flex: 1; min-width: 0; padding: 5px 6px; border: 1px solid #cfd6e0; border-radius: 8px; font: inherit; }
.elv-sat-tip { font-weight: 600; }
.elv-map[hidden], .elv-map-tip[hidden], .elv-sat[hidden] { display: none !important; }

/* ---- Météo au-dessus de la carte (inc/meteo.php) ---- */
.elv-meteo { margin: 0 0 14px; padding: 10px 12px 8px; background: #fff; border: 1px solid #e3e8ef; border-radius: 16px; }
.elv-meteo-days { display: grid; grid-template-columns: repeat(7, minmax(58px, 1fr)); gap: 6px; overflow-x: auto; }
.elv-meteo-day { display: grid; justify-items: center; gap: 1px; padding: 6px 4px; border-radius: 10px; background: #f6f8fb; font-size: .78rem; }
.elv-meteo-day.gel { background: #e8f1fb; }
.elv-meteo-day .d { color: #5B6573; font-weight: 600; text-transform: capitalize; }
.elv-meteo-day .i { font-size: 1.35rem; line-height: 1.2; }
.elv-meteo-day .t b { color: #172640; }
.elv-meteo-day .t { color: #7a8494; }
.elv-meteo-day .p { color: #1e4f7a; font-size: .72rem; }
.elv-meteo-alerts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.elv-meteo-alert { padding: 4px 10px; border-radius: 999px; background: #fdf0dc; color: #7a4b06; font-size: .8rem; font-weight: 600; }
.elv-meteo-alert.ok { background: #e7f3ea; color: #2A4E3B; }
.elv-meteo-src { display: block; margin-top: 4px; text-align: right; color: #9aa3b0; font-size: .68rem; }
@media (max-width: 640px) { .elv-meteo-days { grid-template-columns: repeat(7, 62px); } }

/* ---- Repères, outils satellite, prés, plan d'accès ---- */
.mh-pin span { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 2px solid #c99a3e; box-shadow: 0 2px 8px rgba(0,0,0,.35); font-size: 1.05rem; line-height: 1; }
.elv-sat-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .84rem; }
.elv-sat-tools select { padding: 5px 8px; border: 1px solid #cfd6e0; border-radius: 8px; font: inherit; }
.elv-sat-tools [data-sat-markmode].is-on { background: #c99a3e; color: #fff; border-color: #c99a3e; }
.elv-sat-map.is-marking { cursor: crosshair; }
.elv-pres { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.elv-pre { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid #e3e8ef; border-left: 4px solid #9fbf7a; border-radius: 12px; background: #fff; }
.elv-pre.ok { border-left-color: #3f8f4e; }
.elv-pre.warn { border-left-color: #c2410c; background: #fff8f3; }
.elv-pre-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.elv-pre-h .st { font-size: .78rem; font-weight: 600; color: #42506a; }
.elv-pre-m { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: #42506a; }
.elv-pre-m .bad { color: #c2410c; font-weight: 700; }
.elv-pre-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .78rem; }
.elv-pre-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .84rem; }
.elv-pre-hist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eef1f5; }
.elv-acces-link { display: flex; flex-wrap: wrap; gap: 6px; }
.elv-acces-link input { flex: 1 1 260px; min-width: 0; padding: 7px 10px; border: 1px solid #cfd6e0; border-radius: 9px; font: inherit; font-size: .84rem; background: #f6f8fb; }

/* « Mes activités » : explication de l'espace relié (inc/structures_jumelles.php) */
.elv-twin-note{margin:14px 0 0;padding:11px 14px;border-radius:12px;background:var(--card-2,#f6f1e6);border:1px solid var(--line,#e6dcc8);font-size:.86rem;line-height:1.5}
.elv-twin-note a{font-weight:700;white-space:nowrap}
.elv-act-fixed{cursor:default;opacity:.9}
.elv-act-fixed em{font-style:normal;margin-left:auto;font-size:.74rem;font-weight:700;color:var(--brass,#B0812B);white-space:nowrap}

/* ============================================================
   Plan fidèle au terrain (inc/cadastre.php, elevage_land_layout) : les prés qui ont
   des parcelles prennent leur forme et leur place. Tout est en % du cadre .vh-land.
   Deux prés collés partagent une seule clôture ; un vide entre deux prés = chemin ou route.
   ============================================================ */
.elv-sat-cut { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; padding: 10px 12px; border: 1px solid #f1d38a; border-radius: 12px; background: #fff8e6; font-size: .86rem; }
.elv-sat-cut[hidden] { display: none; }
.elv-sat-cut select { padding: 5px 8px; border: 1px solid #cfd6e0; border-radius: 8px; font: inherit; }
.elv-sat-map.is-cutting, .elv-sat-map.is-cutting .leaflet-interactive { cursor: crosshair; }
.elv-sat-pop .pnl-btn { justify-self: start; }

.vh-land { position: relative; flex: 0 0 auto; width: min(100%, calc(760px * var(--ar, 1.4))); aspect-ratio: var(--ar, 1.4); margin: 18px auto; }
.vh .vh-land .elv-field.is-geo { position: absolute; flex: none; min-height: 0; padding: 0; margin: 0; border: 0; outline: 0; border-radius: 0; background: none !important; box-shadow: none !important; filter: none; pointer-events: none; }
/* Le dessin du terrain : chaque pré = un groupe [data-geo], contours puis remplissages (le remplissage couvre
   la moitié intérieure du trait : pas de trait entre deux parcelles d'un même pré). */
/* Le sol (chemins) est un rectangle du dessin lui-même : en relief, il reste ainsi dans le même plan que les prés. */
.vh-geo { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
/* Pas de dalle de sol : un liseré « chemin » autour de chaque pré. Deux prés séparés par un vide étroit
   (chemin, route) voient leurs liserés se rejoindre ; ailleurs, c'est l'herbe du plateau. */
.vh-geo .soil { fill: var(--vh-grass-2); }
.vh.is-3d .vh-geo .soil { fill: #8cc462; }
/* Décor venu de l'IGN (routes, chemins, bâtiments, haies) : en teintes sourdes, sous les prés de l'élevage. */
.vh-geo .deco { pointer-events: none; }
.vh-geo .deco path { fill: none; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.vh-geo .deco .dc-case { stroke: #b8a982; }
.vh-geo .deco .dc-a { stroke: #f4eddb; }
.vh-geo .deco .dc-r { stroke: #f1e9d4; }
.vh-geo .deco .dc-t { stroke: #d8c79a; stroke-linecap: butt; }
.vh-geo .deco .dc-p { stroke: #cdb98a; stroke-dasharray: 7 4; stroke-linecap: butt; }
.vh-geo .deco .dc-s { stroke: #b9a77c; stroke-dasharray: 3 3; stroke-linecap: butt; }
.vh-geo .deco .dc-hedge { stroke: #5e8d44; opacity: .75; }
.vh-geo .deco .dc-bld-sh { fill: rgba(50, 40, 20, .28); stroke: none; }
.vh-geo .deco .dc-bld { fill: #e6dac0; stroke: #a99a76; stroke-width: .9; vector-effect: non-scaling-stroke; }
.vh-geo .dc-src { font: 600 11px system-ui, sans-serif; fill: rgba(40, 55, 25, .62); pointer-events: none; }
.vh.is-3d .vh-geo .deco .dc-a, .vh.is-3d .vh-geo .deco .dc-r { stroke: #efe6cf; }
.vh-geo .halo polygon { fill: #d6c7a1; stroke: #d6c7a1; stroke-linejoin: round; pointer-events: none; }
.vh-geo polygon { fill: var(--vh-f2); stroke: none; pointer-events: auto; transition: fill .2s; }
.vh-geo polygon.o { fill: none; stroke: #f6f1e3; stroke-width: 5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.vh-geo .k-paddock polygon:not(.o) { fill: #b9955a; }
.vh-geo .k-carriere polygon:not(.o) { fill: #f1e6c4; }
.vh-geo .k-carriere polygon.o { stroke: #fff; }
.vh-geo .is-over polygon.o { stroke: var(--vh-warn); stroke-width: 8; }
.is-geo :is(.elv-hz, .lbl) { pointer-events: auto; }
.vh .is-geo > .lbl { left: var(--lx); top: var(--ly); right: auto; width: max-content; max-width: none; translate: -50% -50%; }
.vh .is-geo .herd { position: absolute; inset: 0; min-height: 0; padding: 0; display: block; }
.vh .is-geo .graze { position: absolute; margin: -13px 0 0 -30px; }
.vh .is-geo .herd > .free { inset: auto; left: var(--lx); top: calc(var(--ly) + 14px); display: block; translate: -50% 0; white-space: nowrap; }
.vh .is-geo > .vh-tree { position: absolute; }
/* Déplacement d'un cheval / filtre « places libres » : c'est le contour du pré qui s'allume, pas son cadre. */
.vh.is-moving .vh-geo :is(.is-target, .is-from, .is-crowded) polygon { cursor: pointer; }
.vh.is-moving .vh-geo .is-target polygon:not(.o) { fill: color-mix(in srgb, var(--vh-f2) 72%, #fff); }
.vh.is-moving .vh-geo .is-target.k-paddock polygon:not(.o) { fill: color-mix(in srgb, #b9955a 72%, #fff); }
.vh.is-moving .vh-geo .is-target.k-carriere polygon:not(.o) { fill: color-mix(in srgb, #f1e6c4 80%, #fff); }
.vh.is-moving .vh-geo .is-target polygon:not(.o):hover { fill: color-mix(in srgb, var(--vh-f2) 50%, #fff); }
.vh.is-moving .vh-geo .is-target polygon.o { stroke: #fff; stroke-width: 7; stroke-dasharray: 7 6; }
.vh.is-moving .vh-geo .is-from polygon.o { stroke: var(--vh-brass); stroke-width: 8; }
.vh.is-moving .vh-geo .is-crowded polygon.o { stroke: var(--vh-warn); }
.vh[data-f="free"]:not(.is-moving) .vh-geo .is-empty polygon.o { stroke: var(--vh-ok); stroke-width: 9; }
.vh.vh .elv-fields .elv-field.is-geo.is-geo::after { content: none; display: none; }
.vh-fe { display: none; position: absolute; height: 15px; transform-origin: 0 0; pointer-events: none;
  transform: rotateZ(var(--a, 0deg)) rotateX(90deg);
  background: repeating-linear-gradient(90deg, var(--vh-wood-dark) 0 3px, transparent 3px 30px), linear-gradient(180deg, transparent 30%, var(--vh-rail) 30% 46%, transparent 46% 72%, var(--vh-rail) 72% 88%, transparent 88%); }

/* En relief */
.vh.is-3d .vh-land { transform-style: preserve-3d; margin: 12px 12px 20px; }
.vh.is-3d .vh-fe { display: block; }
.vh.is-3d .vh-geo polygon.o { stroke: rgba(40,70,25,.4); stroke-width: 4; }
.vh.is-3d .vh-geo .k-carriere polygon.o { stroke: rgba(255,255,255,.9); }
.vh.is-3d .is-geo .herd > .free { display: none; }      /* l'étiquette du pré dit déjà 0/4 */
.vh.is-3d.is-moving .vh-geo .is-target polygon.o { stroke: #fff; stroke-width: 7; }
.vh.is-3d.is-moving .vh-geo .is-from polygon.o { stroke: var(--vh-brass); stroke-width: 8; }
.vh.is-3d[data-f="free"]:not(.is-moving) .vh-geo .is-empty polygon.o { stroke: var(--vh-ok); stroke-width: 9; }
.vh.is-3d .elv-field.is-geo > .lbl { left: var(--lx); top: var(--ly); translate: none; width: 0; --bz: 30px; }
.vh.is-3d .is-geo .herd { min-height: 0; padding: 0; }
.vh.is-3d .is-geo .graze { margin: -15px 0 0 -33px; }
.vh.is-3d .is-geo .herd > .free { left: var(--lx); top: calc(var(--ly) + 26px); translate: none; --bz: 2px; }
@media (prefers-reduced-motion: reduce) { .vh-geo polygon { transition: none; } }

/* Pas de zoom de page au doigt (pincement, double tap) sur la vue d'en haut : sur téléphone il se déclenchait
   en manipulant la carte. Le défilement reste libre ; la carte garde son propre zoom (boutons + / −, pincement sur la scène). */
html:has([data-elv-map]), html:has([data-elv-map]) body { touch-action: pan-x pan-y; }

/* ---- Bulles : les lieux en foncé, les chevaux en clair ; une bulle qui en chevauche une autre se replie ---- */
.vh.is-3d .vh-sign { color: #fff; background: rgba(19,33,61,.9); border-color: rgba(255,255,255,.22); font-size: 12.5px; padding: 4px 11px; box-shadow: 0 4px 12px -4px rgba(0,0,0,.6); }
.vh.is-3d .vh-sign em { opacity: .78; color: #dfe6f3; }
.vh.is-3d .vh-sign { translate: 0 var(--lift, 0px); transition: translate .35s; }
.vh.is-3d .vh-sign::after { background: linear-gradient(rgba(19,33,61,.9), transparent); }
.vh.is-3d .vh-sign .vh-i { color: #f0c463; }
.vh.is-3d .elv-office.is-hot .vh-sign em { color: #ffb4a8; }
.vh.is-3d .vh-tag { font-size: 11.5px; font-weight: 600; }
.vh.is-3d .elv-hz.vh-clash:not(.is-on, [data-hit], .is-picked, :hover, :focus-visible) .vh-tag .nm { display: none; }
.vh.is-3d .elv-hz.vh-clash:not(.is-on, [data-hit], .is-picked, :hover, :focus-visible) .vh-tag { padding: 2px; }
.vh.is-3d .elv-hz.vh-clash:not(.is-on, [data-hit], .is-picked, :hover, :focus-visible) .vh-tag:not(:has(.fl, .ph)) { display: none; }
.vh.is-3d :is(.vh-plate, .vh-pill).vh-clash { visibility: hidden; }
.vh.is-3d .elv-hz:is(:hover, .is-on, [data-hit], .is-picked) { z-index: 6; }
/* Pré au-delà de sa capacité : « 7/6 » en couleur d'alerte, en 2D comme en 3D (le dépassement reste permis, seulement signalé). */
.elv-field.is-over .lbl em, .vh.is-3d .elv-field.is-over .vh-sign em { background: var(--vh-warn); color: #fff; opacity: 1; font-weight: 800; box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
/* Le pincement ne zoome plus la page quand la carte est là (la carte gère son propre zoom). */
html:has([data-elv-map]) { touch-action: pan-x pan-y; }
/* Pré sans parcelle : posé à part du plan réel, et dit pourquoi. */
.vh-nogeo { display: inline-block; font-size: .68rem; font-weight: 700; font-style: normal; line-height: 1.4; padding: 1px 8px; border-radius: 999px; background: #fff3d6; color: #7a4a0b; border: 1px dashed var(--vh-warn); white-space: nowrap; text-shadow: none; }
.vh-satnote { background: #fff3d6; border: 1px solid var(--vh-warn); border-radius: 12px; padding: 8px 12px; color: #5c3a08; }
/* Petit pré : chevaux un peu plus petits, qui restent dans la clôture (--wk, --hk posés par elevage-carte.js). */
.vh.is-3d .elv-field.is-geo .graze { scale: var(--hk, 1); transform-origin: 50% 100%; }
.vh.is-3d .elv-field.is-geo .graze { margin: calc(var(--j, 0px) * var(--wk, 1) - 15px) 0 0 calc(var(--jx, 0px) * var(--wk, 1) - 33px); }   /* le cheval est centré sur sa place */
/* Pastille « pas encore placé » : texte complet en 3D, version courte à plat où la place manque (retour à la ligne plutôt que débordement). */
.vh-nogeo .s { display: none; } .vh:not(.is-3d) .vh-nogeo .l { display: none; } .vh:not(.is-3d) .vh-nogeo .s { display: inline; }
.vh:not(.is-3d) .elv-field .lbl { flex-wrap: wrap; row-gap: 4px; } .vh:not(.is-3d) .vh-nogeo { flex: 0 0 auto; max-width: 100%; }
/* Relief : le terrain réel s'agrandit avec le nombre de chevaux dehors (--lh posé par carte.php), et le plateau s'élargit avec lui. */
.vh.is-3d .elv-map:has(.vh-land) { width: max-content; margin-left: 0; translate: -50% 0; grid-template-columns: 240px 290px auto; }
.vh.is-3d .vh-land { width: min(calc(var(--ar, 1.4) * var(--lh, 760px)), calc(var(--lh, 760px) * 1.1)); }   /* ni trop large (terrain en long), ni trop haut */

/* ---- Téléphone : plan à plat uniquement, mais toujours fidèle au terrain ----
   Les prés gardent leur forme réelle ; pour que ce soit lisible sur un petit écran, les chevaux deviennent de petites pastilles
   (le nom s'affiche en touchant le cheval) et les étiquettes se réduisent. Un terrain en largeur se fait balayer du doigt. */
@media (max-width: 700px) {
  .vh .vh-seg { display: none; }
  .vh .elv-fields.has-land { overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; }
  .vh .vh-land { width: max(100%, calc(var(--ar, 1.4) * 440px)); margin: 10px 0; }
  .vh .is-geo .elv-hz.mini { padding: 1px; gap: 0; border-radius: 999px; }
  .vh .is-geo .elv-hz.mini .nm, .vh .is-geo .elv-hz.mini .fl { display: none; }
  .vh .is-geo .elv-hz.mini .av, .vh .is-geo .elv-hz.mini .ph { width: 22px; height: 22px; font-size: .7rem; }
  .vh .is-geo .graze { margin: -11px 0 0 -11px; }
  .vh .is-geo > .lbl { font-size: .62rem; }
  .vh .is-geo > .lbl .vh-sign .t { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; gap: 3px; }
  .vh .is-geo > .lbl .vh-sign .t .vh-i { width: 10px; height: 10px; }
  .vh .is-geo > .lbl em { font-size: .56rem; padding: 0 5px; }
  .vh .is-geo .herd > .free { font-size: .6rem; }
  /* Les prés sans parcelle restent des cartes, qui suivent l'écran quand on balaie le terrain. */
  .vh .elv-fields.has-land > .elv-field:not(.is-geo) { position: sticky; left: 0; flex: 0 0 auto; width: calc(100vw - 90px); max-width: 100%; }
}

/* Étiquettes de prés trop serrées → pastille (26/11/2026, voir clients-split.js) */
.vh .is-geo > .lbl.lbl-mini { pointer-events: auto; cursor: pointer; z-index: 4; }
.vh .is-geo > .lbl.lbl-mini > .vh-sign { display: none; position: absolute; left: 50%; bottom: calc(100% + 6px); translate: -50% 0; white-space: nowrap; z-index: 6; }
.vh .is-geo > .lbl.lbl-mini::before { content: attr(data-mini); display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px;
  background: rgba(255, 252, 244, .95); color: #4A3A1A; font: 700 .7rem/1 system-ui, sans-serif; box-shadow: 0 1px 4px rgba(0, 0, 0, .25), 0 0 0 1.5px rgba(200, 151, 63, .7); }
.vh .is-geo > .lbl.lbl-mini:hover > .vh-sign, .vh .is-geo > .lbl.lbl-mini.open > .vh-sign { display: inline-flex; }
.vh.is-3d .elv-field.is-geo > .lbl.lbl-mini::before { translate: -50% -100%; }

/* Prés pas encore placés sur le plan : sur une ligne à part, sous le plan
   (26/11/2026). Vue à plat seulement : la vue en relief garde sa mise en page. */
.vh:not(.is-3d) .elv-fields.has-land { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 14px; align-items: start; }
.vh:not(.is-3d) .elv-fields.has-land > .vh-land { grid-column: 1 / -1; justify-self: center; width: 100%; max-width: calc(760px * var(--ar, 1.4)); }
.vh:not(.is-3d) .elv-fields.has-land > .elv-field:not(.is-geo) { width: auto; min-width: 0; position: relative; left: auto; }
@media (max-width: 760px) {
  .vh:not(.is-3d) .elv-fields.has-land { overflow-x: visible; }
}
/* Grand écran : prés non placés en colonne à droite du plan (pas de vide sur les côtés) */
@media (min-width: 900px) {
  .vh:not(.is-3d) .elv-fields.has-land:has(> .elv-field:not(.is-geo)) { grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr); }
  .vh:not(.is-3d) .elv-fields.has-land:has(> .elv-field:not(.is-geo)) > .vh-land { grid-column: 1; grid-row: 1 / span 40; justify-self: center; margin: 0; }
  .vh:not(.is-3d) .elv-fields.has-land > .elv-field:not(.is-geo) { grid-column: 2; }
}
.vh:not(.is-3d) .is-geo > .lbl.lbl-mini > * { display: none; }
.vh:not(.is-3d) .is-geo > .lbl.lbl-mini:hover > *, .vh:not(.is-3d) .is-geo > .lbl.lbl-mini.open > * { display: inline-flex; position: absolute; left: 50%; bottom: calc(100% + 6px); translate: -50% 0; white-space: nowrap; z-index: 6; }
/* Chevaux serrés : seulement la pastille, le nom au survol (26/11/2026) */
.vh .graze.g-mini .vh-tag, .vh .graze.g-mini .vh-nm { display: none !important; }
.vh .graze.g-mini:hover .vh-tag, .vh .graze.g-mini:hover .vh-nm { display: inline !important; position: relative; z-index: 7; }

/* ---- Plan à plat sur terrain réel : que des pastilles (02/12/2026) ----
   Chaque cheval = sa photo (ou sa lettre), fixe ; clic = fiche éclair. Plus de « Pré au repos » ni de pastilles « 0 ».
   Le nom d'un pré disparaît s'il touche un cheval ou un autre nom (clients-split.js) ; cliquer le pré le réaffiche. */
.vh:not(.is-3d) .is-geo .herd > .free { display: none; }
.vh:not(.is-3d) .is-geo .graze { animation: none; translate: none; margin: calc(var(--av, 26px) / -2 - 2px) 0 0 calc(var(--av, 26px) / -2 - 2px); }
.vh:not(.is-3d) .is-geo .elv-hz.mini { padding: 2px; gap: 0; border-radius: 999px; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,.3); }
.vh:not(.is-3d) .is-geo .elv-hz.mini .nm, .vh:not(.is-3d) .is-geo .elv-hz.mini .fl { display: none; }
.vh:not(.is-3d) .is-geo .elv-hz.mini .av, .vh:not(.is-3d) .is-geo .elv-hz.mini .ph { width: var(--av, 26px); height: var(--av, 26px); font-size: calc(var(--av, 26px) * .3); }
.vh:not(.is-3d) .is-geo .elv-hz.mini:is(:hover, .is-on) { z-index: 8; }
.vh:not(.is-3d) .is-geo > .lbl.lbl-mini::before { display: none; }
.vh:not(.is-3d) .is-geo > .lbl.lbl-off:not(.lbl-open) { display: none; }
.vh:not(.is-3d) .is-geo > .lbl.lbl-open { z-index: 9; display: flex; }
.vh:not(.is-3d) .vh-geo [data-geo] polygon:not(.o) { cursor: pointer; }
/* Ordinateur : la carte est montrée en entier, sans défilement latéral (le glissement reste sur téléphone) */
@media (min-width: 701px) { .vh:not(.is-3d) .elv-fields.has-land, .vh:not(.is-3d) .vh-land { overflow-x: clip; max-width: 100%; } }
/* Textures du terrain autour des prés : bois, vergers, eau (BD TOPO, 03/12/2026) */
.vh-geo .deco path.dc-tex-w { fill: #a9d0e4; }
.vh-geo .deco path.dc-tex-f { fill: url(#vh-tex-f); }
.vh-geo .deco path.dc-tex-o { fill: url(#vh-tex-o); }

/* Glisser-déposer d'un cheval à plat (03/12/2026) */
.vh:not(.is-3d) .elv-hz[data-hid] { cursor: grab; }
.vh .elv-hz.is-dragging { pointer-events: none; opacity: .3; }
.vh .elv-hz, .vh .elv-hz img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
.elv-ghost { position: fixed; z-index: 2147483000; width: 46px; height: 46px; border-radius: 50%; pointer-events: none; background: #8a5a3c center / cover no-repeat;
  display: grid; place-items: center; font: 700 1.1rem system-ui, sans-serif; border: 3px solid #fff; box-shadow: 0 12px 26px rgba(0,0,0,.4); cursor: grabbing; }
body:has(.elv-ghost), body:has(.elv-ghost) * { cursor: grabbing !important; user-select: none; }
/* Pré à plusieurs parcelles : tout le pré s'éclaire au survol, pas seulement la parcelle touchée */
.vh.is-moving .vh-geo .is-target:hover polygon:not(.o) { fill: color-mix(in srgb, var(--vh-f2) 50%, #fff); }
.vh.is-moving .vh-geo .is-target.k-paddock:hover polygon:not(.o) { fill: color-mix(in srgb, #b9955a 50%, #fff); }
.vh.is-moving .vh-geo .is-target.k-carriere:hover polygon:not(.o) { fill: color-mix(in srgb, #f1e6c4 60%, #fff); }
