/* Styles applicatifs (direction « Forêt profonde », Sprint D1). Coquille + composants ; classes du
   markup existant conservées, valeurs pilotées par les tokens (deux thèmes). */
#app { min-height: 100dvh; display: flex; flex-direction: column; }

.app-header {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--sp-4);
  background: var(--c-header-grad); color: var(--c-header-ink);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 10;
}
.app-header__title { font-family: var(--font-title); font-size: var(--fs-lg); font-weight: 700; }

/* Marque (Sprint B1) : picto + nom. Le SVG est inline et en `currentColor` — il prend donc la
   couleur d'encre de l'en-tête, dans les deux thèmes, sans règle dédiée. */
.brand { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; flex: 0 0 auto; }
/* Nom de la structure : zone CENTRALE dominante (Sprint U3.1). `flex: 1` + centrage ; l'ellipse
   protège les noms longs sans jamais pousser la pastille de statut hors de l'écran. */
.app-header__structure {
  flex: 1 1 auto; min-width: 0; text-align: center;
  font-family: var(--font-title); font-size: var(--fs-lg); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0 var(--sp-3);
}
/* Sélecteur de société (LIEN.1) — à la place du nom, SEULEMENT pour un compte multi-sociétés. Il
   garde la typographie du nom (c'est le même renseignement) et la cible tactile commune. */
.app-header__switch {
  width: 100%; min-height: var(--tap-min); font: inherit; text-align: center; text-align-last: center;
  background: transparent; color: inherit; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
}
.brand__mark { display: inline-flex; flex: 0 0 auto; }
/* Picto DOUBLÉ (26 → 52 px, retour de Yannick) : à 26 px il ne se lisait pas — c'est la marque, elle
   doit s'identifier d'un coup d'œil. Le `max-*` l'ARRIME à la hauteur du header en réservant
   8 px d'air EN HAUT ET EN BAS (2 × 8 = 16) : à 68 px de header, le picto vaut exactement 52 px, et
   si `--header-h` change un jour, il suit en gardant sa respiration au lieu de toucher les bords.
   `align-items: center` du header fait l'alignement vertical avec le mot-symbole et le nom de
   société ; aucune des trois zones n'a de hauteur propre. */
.brand__picto {
  width: 52px; height: 52px; display: block;
  max-width: calc(var(--header-h) - 16px); max-height: calc(var(--header-h) - 16px);
}

/* Cible d'un défilement interne (aide de révélation U2.9a). L'en-tête est COLLANT : sans cette
   marge, `scrollIntoView({block:'start'})` place le haut de la cible DERRIÈRE la barre — le lien
   « marche », et l'utilisateur ne voit rien arriver. Le défaut existait depuis U2.9a ; il s'aggravait
   de 12 px avec le header agrandi. La marge suit la hauteur réelle du header, plus une respiration. */
.scroll-target { scroll-margin-top: calc(var(--header-h) + var(--sp-3)); }

.app-main { flex: 1; padding: var(--sp-4); max-width: 960px; width: 100%; margin: 0 auto; }

/* Pastille de statut (en-tête) : en ligne / hors ligne / lecture seule. */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm); font-weight: 600;
  padding: 4px var(--sp-3); border-radius: var(--radius-pill);
  background: var(--c-success-bg); color: var(--c-success-ink); /* INSTALLATION-1 : « En ligne » est un état réglé, vert */
}
.badge--offline { background: var(--c-warn-bg); color: var(--c-warn-ink); }
.badge--readonly { background: var(--c-danger); color: var(--c-danger-ink); }

/* Navigation — mobile-first : barre d'onglets EN BAS (zone du pouce, usage battue).
   Une seule liste de nav (js/app.js NAV) et un seul DOM (#tabbar) : le placement est purement
   CSS (P2 : même code, rendu adapté — pas de navigation dupliquée). */
.tabbar {
  display: flex; border-top: 1px solid var(--c-border);
  background: var(--c-nav); position: sticky; bottom: 0;
  /* Rang EXPLICITE (23/07/2026) : la barre mobile n'en avait aucun et ne tenait que par son
     ordre dans le DOM. Le jour où une carte prend un rang, un empilement implicite devient un
     bug de clic — c'est exactement ce qui vient d'arriver côté desktop. */
  z-index: 9;
  /* Réserve la zone de sécurité basse (encoche/indicateur iOS) uniquement en bas de page. */
  padding-bottom: env(safe-area-inset-bottom, 0);
  /* Filet DUR (Sprint U5.1c) : la barre ne déborde JAMAIS horizontalement — même pendant la passe de
     mesure (onglets rendus à largeur naturelle) — donc la page ne glisse jamais, quelle que soit la
     taille de texte. La navigation prioritaire (js/app.js) garantit qu'en régime établi rien ne
     dépasse ; ceci est la ceinture par-dessus la bretelle.
     COMBO.1 : la ceinture DÉFILE au lieu de rogner — un onglet n'est jamais coupé ; si la place manque,
     on fait glisser la barre (l'onglet actif y est ramené), et la PAGE, elle, ne glisse toujours pas. */
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabbar::-webkit-scrollbar { display: none; }
/* Un onglet ne rétrécit jamais sous son contenu (son libellé n'est jamais tronqué). */
.tabbar a, .tabbar button { flex-shrink: 0; min-width: max-content; }
/* Passe de MESURE (U5.1c/d) : le temps de mesurer combien d'onglets tiennent, ils sont à largeur
   NATURELLE (et non étirés en cellules égales) — sinon impossible de connaître leur largeur réelle.
   Double classe `.tabbar.tabbar--measuring` (spécificité (0,2,1)) pour GAGNER sur `.tabbar a { flex:1 }`
   et sur la règle desktop (toutes deux (0,1,1)) — sinon la mesure se ferait sur des cellules étirées. */
.tabbar.tabbar--measuring a, .tabbar.tabbar--measuring button { flex: 0 0 auto; }
/* Onglets : liens ET le bouton « Plus » (Sprint U5.1b) partagent le même gabarit. Le bouton reçoit
   un reset (fond/bordure/police) pour être indistinguable d'un onglet-lien. */
.tabbar a, .tabbar button {
  flex: 1; min-height: var(--tap-min); padding: var(--sp-3) 0;
  color: var(--c-text-muted); text-decoration: none; font-size: var(--fs-sm); font-weight: 500;
  background: transparent; border: 0; border-top: 2px solid transparent;
  font-family: inherit; cursor: pointer;
  /* Icône AU-DESSUS du libellé (Sprint B1.3a). Le libellé reste toujours affiché : jamais d'icône
     seule. La largeur reste pilotée par le texte — les cibles tactiles ne rétrécissent pas. */
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.tabbar a[aria-current='page'], .tabbar button[aria-current='page'] { color: var(--c-accent); font-weight: 700; border-top-color: var(--c-primary); }
/* REPÈRE (ORGA-ALLEGE.1.1) : l'onglet actif se voit d'un coup d'œil, sans compter sur la couleur
   seule (WCAG 1.4.1) : PASTILLE de fond sous l'icône et le libellé, texte en gras, icône en accent.
   Contraste accent / pastille vérifié AA dans les deux thèmes (tests/d1-contrast.test.js). */
.tabbar a[aria-current='page'] .tabbar__label, .tabbar button[aria-current='page'] .tabbar__label {
  background: var(--c-nav-active); border-radius: 999px; padding: 1px 10px; }
.tabbar a[aria-current='page'] .icon, .tabbar button[aria-current='page'] .icon { color: var(--c-accent); }
/* Rose des directions (Sprint C2.3) — huit aires de vent, en grille 4×2. Cibles ≥ 48 px (U5.2) :
   on choisit une direction avec des gants, sans regarder, juste après avoir vu passer l'animal. */
.rose__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }
.rose__btn { min-height: var(--tap-min); font-weight: 700; }

/* Pastille « demandes en attente » (correctif du 22/07/2026) — patron du badge d'alerte D2.2.
   Elle porte un CHIFFRE et un `aria-label` : la couleur ne dit jamais rien à elle seule (WCAG
   1.4.1). En flux normal (et non en `position: absolute`) : elle entre dans la largeur mesurée par
   la navigation prioritaire (U5.1c), donc un onglet badgé ne peut pas déborder de sa cellule. */
.tabbar__badge {
  min-width: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--c-danger); color: var(--c-danger-ink);
  font-size: var(--fs-sm); font-weight: 700; line-height: 20px; text-align: center;
}

/* Icônes d'interface (Sprint B1) : dimension par la CSS, couleur héritée (`currentColor`). */
.icon-wrap { display: inline-flex; align-items: center; flex: 0 0 auto; }
.icon { width: 20px; height: 20px; display: block; }
.btn .icon { width: 18px; height: 18px; }
.tabbar .icon { width: 22px; height: 22px; }

.card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}
/* Boutons — hiérarchie conservée : .btn nu = secondaire, .btn--primary = plein, .btn--ghost = discret. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--tap-min);
  border: 1px solid var(--c-border-strong); background: var(--c-surface-2); color: var(--c-text);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
  font-family: inherit; font-size: var(--fs-base); font-weight: 600; cursor: pointer;
}
/* CTA PRINCIPAL (Sprint U5.2) : plus haut (56 px) que les boutons secondaires (48 px) — l'action
   principale se vise sans effort, gants compris. */
.btn--primary { min-height: var(--tap-cta); border-color: transparent; background: var(--c-primary); color: var(--c-text-inverse); }
.btn--primary:hover { background: var(--c-primary-600); }
.btn--primary:active { background: var(--c-primary-700); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--c-text-muted); font-weight: 700; }
/* INVITATION-2 (B4) : le mot du chasseur, sous sa réponse, dans « Invités » (bureau seulement). */
.is-bureau .who__answer { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1); }
.is-bureau .who__note { margin: 0; color: var(--c-text-muted); white-space: normal; overflow-wrap: anywhere; }
/* INVITATION-2 (B1) : le mot sous le choix, sur la page de réponse et dans l'app chasseur. */
.rsvp-mot { margin-top: var(--sp-3); }
.rsvp-mot__input { width: 100%; min-height: 4.5rem; resize: vertical; }
/* Bouton destructif (Sprint U2.4) — distinct du terrain (.terrain__btn--alert). */
.btn--danger { border-color: transparent; background: var(--c-danger); color: var(--c-danger-ink); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* Contrôle GELÉ par la lecture seule (GARDE-RANG.3, point LICENCE.FIN) : même apparence qu'un bouton
   désactivé, mais il reçoit encore le geste — pour DIRE l'état au lieu de rester muet. */
.btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }
.toast {
  /* CORRECTIF U5.6 : sans `pointer-events: none`, le toast — fixe, en bas au centre — INTERCEPTE
     les clics pendant 3,5 s. C'est un piège général : il a contribué au bug du dessin de traque,
     où le message d'aide s'affichait juste avant que l'utilisateur ne clique sur la carte. */
  pointer-events: none;
  position: fixed; left: 50%; bottom: var(--sp-5); transform: translateX(-50%);
  background: var(--c-surface-2); color: var(--c-text); border: 1px solid var(--c-border-strong);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  /* AU-DESSUS DE TOUT (CE1.4) : plus haut que la carte agrandie (90), les fiches et les confirmations
     (200) — un message de confirmation (« Objet déplacé ») ne doit jamais rester caché derrière une
     surcouche ou une carte plein écran. C'est le seul rang du produit à passer devant les modales. */
  z-index: 300; max-width: 90vw;
}
/* Toast d'ERREUR persistant (DEMO.7) : il reste jusqu'à « Fermer », donc il reçoit les clics — le
   correctif U5.6 (`pointer-events: none`) ne vaut que pour l'information éphémère, qui part seule. */
.toast--error { background: var(--c-danger); color: var(--c-danger-ink); border-color: transparent;
  pointer-events: auto; display: flex; align-items: center; gap: var(--sp-3); }
.toast--error > button { min-height: var(--tap-min); min-width: var(--tap-min); padding: var(--sp-2) var(--sp-3);
  background: transparent; color: inherit; border: 2px solid currentColor; border-radius: var(--radius-sm);
  font: inherit; font-weight: 700; cursor: pointer; flex: 0 0 auto; }

/* BOUTON PRINCIPAL FIXE (GUIDE.1.2) — collé au-dessus de la barre d'onglets, jamais emporté par le
   défilement. `--tabbar-h` est mesuré par la coquille (hauteur réelle : elle suit la taille du texte) ;
   repli 4.5rem. Cible CTA 56 px (U5.2). Au-dessus du contenu (8), sous la barre (9). */
.action-bar { position: sticky; bottom: var(--tabbar-h, 4.5rem); z-index: 8; margin: var(--sp-2) calc(-1 * var(--sp-4)) 0;
  padding: var(--sp-2) var(--sp-4); background: var(--c-bg); border-top: 1px solid var(--c-border); }
.action-bar .btn { width: 100%; min-height: var(--tap-cta); justify-content: center; }
/* B10 : le lien du mot, sous « Je suis arrivé », dans la barre d'action (cible de 48 px). */
.action-bar .mot-link { display: block; width: 100%; min-height: var(--tap-min); margin-top: var(--sp-1); text-align: center; background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.guide-done { margin: 0; font-weight: 600; }
/* Choix de la traque dans le bandeau du directeur (GUIDE.1.5) : une ligne entière, au-dessus des deux
   boutons de départ / fin. */
.terrain__traque { display: flex; align-items: center; gap: var(--sp-2); flex: 1 1 100%; font-weight: 600; }
.terrain__traque .input { min-height: var(--tap-min); flex: 1; }
/* ÉTAT CHOISI d'un contrôle segmenté (GUIDE.1.3, AUDIT-SIMPLIF R15) : la taille du texte retenue
   n'est pas une action principale — même rendu que la puce de filtre active, le mot reste lisible. */
.btn--pressed { background: var(--c-primary-soft); border-color: var(--c-primary); color: var(--c-accent); font-weight: 700; }

/* Composants UI */
.app-header__status { display: flex; gap: var(--sp-2); align-items: center; }
.page__title { font-family: var(--font-title); font-weight: 700; font-size: var(--fs-xl); line-height: var(--lh-tight); margin: 0 0 var(--sp-4); }
.page { display: flex; flex-direction: column; gap: var(--sp-4); }
.page__section { font-family: var(--font-title); font-weight: 700; font-size: var(--fs-lg); line-height: var(--lh-tight); margin: var(--sp-2) 0 0; }

/* Météo (Sprint 20.5) — rangée d'accueil (place pour l'éphéméride 20.6 à côté) + ligne de faits. */
.weather-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); }
/* ACTIONS PERMANENTES DE LA BATTUE (BATTUE.4.3) : elles vivent sur la ligne meteo/lune, poussees a
   droite ; sur un ecran etroit, le `flex-wrap` de la .weather-row les fait passer SOUS la meteo.
   Aucun seuil nouveau (regle U5.1b) : le repli est intrinseque. */
.battue-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-left: auto; }
/* BARRE D'ACTIONS EN TETE DE LISTE (BATTUE.5) — regle « contenu d'abord » : la liste ouvre l'ecran,
   la creation est un bouton qui ouvre une feuille. Trois entrees sobres, jamais un formulaire. */
.list-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-3); }
/* ZONE DE SUPPRESSION (BATTUE.5.4) — en RETRAIT : tres en bas, discrete, et jamais a cote des
   actions courantes. On ne met pas une action irreversible sous le pouce de qui cherchait autre
   chose. Pas de bandeau rouge non plus : c'est une action legitime, pas un danger permanent. */
.danger-zone { margin-top: var(--sp-6); padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border); display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: var(--sp-2); }
/* Format compact : l'icone porte le geste, le mot le nomme. La cible reste >= 44 px (U5.2) : on
   reduit le rembourrage horizontal, JAMAIS la hauteur. */
.btn--compact { padding-inline: var(--sp-3); font-size: var(--fs-sm); }
.weather-line { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); }
.weather-line__glyph { font-size: var(--fs-lg); }
.weather-line--compact { font-size: var(--fs-sm); }
/* Ligne éphéméride (Sprint 20.6) — même gabarit que la météo, dans la .weather-row. */
.eph-line { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--c-text-muted); }
.eph-line--compact { font-size: var(--fs-sm); }
.card h2 { font-family: var(--font-title); font-weight: 700; font-size: var(--fs-lg); line-height: var(--lh-tight); margin: 0 0 var(--sp-3); }
.card h3 { font-family: var(--font-title); font-weight: 600; font-size: var(--fs-base); line-height: var(--lh-tight); margin: var(--sp-3) 0 var(--sp-2); }
.field { display: block; margin-bottom: var(--sp-3); }
.field__label { display: block; font-size: var(--fs-sm); color: var(--c-text-muted); font-weight: 500; margin-bottom: var(--sp-1); }
.field__req { color: var(--c-danger-line); font-weight: 700; } /* marqueur « obligatoire » (Sprint U2.3) */
.form-legend { margin: 0 0 var(--sp-2); }
.input, input, select, textarea {
  width: 100%; min-height: var(--tap-min); box-sizing: border-box;
  padding: var(--sp-3) var(--sp-3); border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); background: var(--c-field); color: var(--c-text);
  font-family: inherit; font-size: var(--fs-base);
}
input[type='checkbox'], input[type='radio'] { width: auto; min-height: 0; }
::placeholder { color: var(--c-text-muted); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.row { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1; min-width: 120px; }
/* Les boutons dans une rangée ne s'étirent pas (largeur naturelle, comme la galerie) ; les champs
   continuent de remplir (cas hybride « champ + bouton » : le champ s'étire, le bouton reste naturel). */
.row > .btn { flex: 0 0 auto; }
/* Variante opt-in : rangée d'actions VOULUES pleine largeur (ex. confirmation de restauration). */
.row--fill > .btn { flex: 1 1 auto; }
.link { color: var(--c-accent); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid var(--c-border); padding: var(--sp-2) var(--sp-3); text-align: left; font-size: var(--fs-sm); }
.table th { color: var(--c-text-muted); font-weight: 600; }
.muted { color: var(--c-text-muted); font-size: var(--fs-sm); }
.box { border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: var(--sp-3); white-space: pre-wrap; background: var(--c-surface-2); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px var(--sp-2); border-radius: var(--radius-pill); background: var(--c-surface-2); color: var(--c-text); font-size: var(--fs-sm); }
.chip--ok { background: var(--c-success-bg); color: var(--c-success-ink); } /* INSTALLATION-1 : réglé = vert, même au bureau */
.chip--warn { background: var(--c-warn-bg); color: var(--c-warn-ink); }
/* Niveau ALERTE (vs --warn = attention) : ex. résultat trichine POSITIF, jamais silencieux (décision
   sprint 19). Variante propre aux tokens danger — ne détourne pas .badge--readonly (sémantique distincte). */
.chip--danger { background: var(--c-danger); color: var(--c-danger-ink); }
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
/* Croix de suppression d'une puce (Sprint U5.2) : vraie cible tactile ≥ 48 px (la puce concernée
   grandit en conséquence — c'est voulu : supprimer d'un tremblement ne doit pas rater). */
.chip__x { cursor: pointer; color: var(--c-danger-line); font-weight: bold;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap-min); min-height: var(--tap-min); }
/* Rangée de case à cocher (Sprint U5.2) : toute la ligne (case + libellé) est la cible, ≥ 48 px. */
.checkbox { display: flex; align-items: center; gap: var(--sp-2); min-height: var(--tap-min); }
/* Jauge PMA (Sprint 20.1) : barre CSS pure, sans lib graphique. */
.gauge { height: 8px; background: var(--c-surface-2); border-radius: var(--radius-pill); overflow: hidden; margin: var(--sp-1) 0 var(--sp-2); }
.gauge__fill { height: 100%; background: var(--c-primary); border-radius: var(--radius-pill); transition: width .2s; }
.gauge__fill--full { background: var(--c-danger-line); }
/* Rappel PMA discret dans les formulaires de prélèvement (cliquable → #/quotas). */
.pma-reminder { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); text-decoration: none; }
.quick-links { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
/* Puces de filtre par type (Sprint U5.1f) — vue registre en mode mixte. Cibles tactiles pleines
   (≥ --tap-min) ; état actif via aria-pressed (pas une classe de plus à tenir synchronisée). */
.filter-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.filter-chip {
  min-height: var(--tap-min); padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--c-border-strong); border-radius: var(--radius-pill);
  background: var(--c-surface-2); color: var(--c-text); font: inherit; font-weight: 600; cursor: pointer;
}
.filter-chip[aria-pressed='true'] { background: var(--c-primary-soft); border-color: var(--c-primary); color: var(--c-accent); }
.details { margin-bottom: var(--sp-3); }
/* Section repliable des Réglages : le titre garde le poids d'un titre de carte, le résumé suit en
   gris sur la même ligne. `flex-wrap` : en texte très grand (U5.1), le résumé passe dessous plutôt
   que de tronquer — on préfère deux lignes lisibles à une ligne coupée. */
.settings-section > summary { color: var(--c-text); }
/* La mise en page vit dans un <span> INTERNE (DEMO.5, patron .fil__line) : le <summary> reste en
   list-item. flex-wrap : en texte très grand, le résumé passe dessous plutôt que d'être tronqué. */
.settings-section__line { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2);
  width: calc(100% - 1.6em); vertical-align: top; }
.settings-section__title { font-family: var(--font-title); font-weight: 700; }
.settings-section__summary { color: var(--c-text-muted); font-weight: 400; font-size: var(--fs-sm); }
/* REPLIS-IOS (DEMO.5) : le <summary> générique passe en list-item. En flex, il perd son marqueur ET
   CESSE D'OUVRIR son <details> sur WebKit/iOS (leçon CE2.6.3) — il l'était depuis U5.2, sous les 19
   appelants de `widgets.details`. La cible de 48 px reste (min-height) ; toute mise en page interne
   passe par un <span> (patron .fil__line). */
.details > summary { cursor: pointer; padding: var(--sp-2) 0; color: var(--c-accent); font-weight: 600;
  min-height: var(--tap-min); display: list-item; list-style-position: inside; } /* U5.2 : repli = cible ≥ 48 px */
/* Barres de statistiques perso (Sprint 20.3) — CSS pur, sans lib graphique. */
.stat-row { display: grid; grid-template-columns: minmax(0, 1fr) 2fr auto; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.stat-row__label { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-row__value { font-variant-numeric: tabular-nums; font-weight: 600; }
.stat-bar { height: 10px; background: var(--c-surface-2); border-radius: var(--radius-pill); overflow: hidden; }
.stat-bar__fill { height: 100%; background: var(--c-primary); border-radius: var(--radius-pill); }
/* Assistant battue — fil « prochaine étape » (Sprint U2.1). Couche de lecture, non modale. */
.fil-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2);
  background: var(--c-primary-soft); border-radius: var(--radius-sm); padding: var(--sp-3); margin-bottom: var(--sp-3); }
.fil { list-style: none; margin: 0; padding: 0; }
.fil__item { list-style: none; }
/* UN SEUL BLOC (BATTUE.4.1) : la ligne du deroule EST le <summary> du repli de sa section.
   /!\ Le <summary> reste en `display: list-item` -- lecon CE2.6.3, payee sur appareil : passe en
   `flex`, il perd son marqueur ET cesse d'ouvrir son <details> sur WebKit/iOS. C'est `.fil__line`,
   un <span> interne, qui porte la mise en page. */
.fil__row { display: list-item; list-style-position: inside; padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--c-border); cursor: pointer; min-height: var(--tap-min); }
.fil__row--static { display: block; } /* une etape sans section : pas de marqueur, rien a ouvrir */
.fil__line { display: inline-flex; align-items: baseline; gap: var(--sp-2);
  width: calc(100% - 1.6em); vertical-align: top; }
.fil__item:last-child .fil__row { border-bottom: none; }
.fil__body { padding: var(--sp-2) 0 var(--sp-4); }
.fil__icon { flex: 0 0 1.4em; text-align: center; font-weight: 700; color: var(--c-text-muted); }
.fil__label { flex: 1; }
.fil__detail { flex: 0 0 auto; text-align: right; }
.fil__row--done .fil__icon { color: var(--c-success); }
.fil__row--current .fil__icon { color: var(--c-accent); }
.fil__row--current .fil__label { font-weight: 700; color: var(--c-accent); }
.subheader { margin-bottom: var(--sp-3); }
.subheader h2 { margin: var(--sp-1) 0 0; }
/* ── CARTES : L'EMPILEMENT, ET POURQUOI IL EST EXPLICITE ────────────────────────────────────────
   BUG de production (23/07/2026) : les clics dans la partie haute d'une carte activaient un onglet
   de la barre collante. Le mécanisme exact, vérifié ligne à ligne :
     · `.map` (= `.leaflet-container`) n'avait NI `position` NI `z-index` → `z-index: auto`, donc
       peinte avec le contenu dans le flux, SOUS tout ce qui porte un z-index ≥ 1 ;
     · mais son descendant `.leaflet-map-pane` est `position: absolute; z-index: 400`. Faute de
       contexte d'empilement sur `.map`, ce 400 concourait AU NIVEAU RACINE — les tuiles passaient
       donc PAR-DESSUS la barre d'onglets (9) et l'en-tête (10) ;
     · or Leaflet pose `.leaflet-tile-container { pointer-events: none }`. Les tuiles qui recouvraient
       la barre ne prenaient pas les clics : ceux-ci traversaient et atterrissaient sur l'onglet,
       resté au-dessus du conteneur.
   On voyait donc une carte, on cliquait, on changeait d'onglet.
   LA CORRECTION : `position: relative; z-index: 0` fait de la carte SON PROPRE contexte
   d'empilement. Les 400/800/1000 de Leaflet redeviennent internes, et la carte entière tient un
   seul rang — sous les barres. Ce qu'on voit est ce qu'on clique, sur toute la surface.
   ÉCHELLE DES PLANS, désormais écrite une fois pour toutes :
     0 carte · 9 barre d'onglets · 10 en-tête · 40 menu « Plus » · 90 carte plein écran ·
     100 toasts et QR · 200 feuilles modales et confirmations (au-dessus du plein écran : une
     confirmation ne doit JAMAIS être cachée par une carte agrandie). */
/* `--map-avail` EST la hauteur réelle de la carte, exposée aux panneaux posés dessus (lot
   SECTEURS.1). Les contrôles Leaflet sont des DESCENDANTS de ce conteneur : la variable leur
   descend par héritage, donc un panneau se borne à la carte qui le porte sans qu'aucune règle
   n'ait à connaître l'orientation ni le viewport. Déclarée ICI et redéfinie par `--fullscreen` :
   une seule valeur à changer si la hauteur de carte bouge un jour. */
.map {
  --map-avail: 320px;
  position: relative; z-index: 0;
  height: var(--map-avail); border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  margin-bottom: var(--sp-3); background: var(--c-surface-2);
}
/* Carte AGRANDIE : tout le viewport, au-dessus de l'en-tête et des onglets. `100dvh` et non `100vh` :
   sur mobile, la barre d'URL rétractable fausse `vh` et coupait le bas de la carte. */
.map--fullscreen {
  --map-avail: 100dvh;
  position: fixed; inset: 0; z-index: 90;
  width: 100%; height: var(--map-avail); margin: 0; border: 0; border-radius: 0;
}
/* Les barres deviennent INERTES sous une carte agrandie. Le rang suffirait à les couvrir ; ceci est
   la ceinture par-dessus la bretelle — et rend la garantie directement vérifiable par un test. */
.has-fullscreen-map .app-header, .has-fullscreen-map .tabbar { pointer-events: none; }
/* Pas de défilement de la page derrière la carte agrandie. */
.has-fullscreen-map { overflow: hidden; }
/* Sélecteur de FOND DE CARTE (23/07/2026) — OSM / IGN Plan / IGN Photos aériennes.
   Contrôle Leaflet maison plutôt que `L.control.layers` : ses radios natives font ~16 px, très
   loin de la prise de 48 px exigée depuis U5.2 — sur une carte qu'on manipule au pouce, en battue,
   souvent avec des gants. Trois boutons segmentés, le fond actif porte `aria-pressed`. */
/* Surimpression CADASTRE : une vraie case à cocher, dans une prise de 48 px (U5.2). Grisée sous le
   zoom 16, où le maillage parcellaire n'est plus lisible — la CASE reste, son état aussi. */
.map-over { border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); box-shadow: 0 1px 4px rgb(0 0 0 / 35%); margin-top: var(--sp-2); }
.map-over__lbl {
  display: flex; align-items: center; gap: var(--sp-2);
  min-height: var(--tap-min); padding: 0 var(--sp-2);
  color: var(--c-text); font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
/* Sous le seuil : la case reste CLIQUABLE (la cocher rapproche la carte) — teinte d'indice, jamais
   grisée-inerte comme avant (le `cursor: pointer` de base est conservé). */
.map-over__lbl--hint { color: var(--c-text-muted); }
.map-over__cb { width: 20px; height: 20px; accent-color: var(--c-primary); }

/* Commande « Agrandir » : même gabarit que le sélecteur de fond, sous lui dans le même coin. */
.map-full { border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); box-shadow: 0 1px 4px rgb(0 0 0 / 35%); margin-top: var(--sp-2); }
.map-full__btn {
  display: flex; align-items: center; gap: var(--sp-2);
  min-height: var(--tap-min); padding: 0 var(--sp-2);
  border: 0; background: transparent; color: var(--c-text);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.map-full__btn:focus-visible { outline: 3px solid var(--c-accent); outline-offset: -3px; }
.map-full__btn .icon { width: 20px; height: 20px; }

/* Actions d'édition POSÉES SUR la carte (CE1.4) — « Poser un objet », « Voir tout ». Elles vivent
   dans la pile de contrôles (sous Agrandir / fonds / cadastre) pour rester atteignables en plein
   écran : plus aucun bouton de page (P2, un seul chemin). Même gabarit que « Agrandir ». */
.map-actions { display: flex; flex-direction: column; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); box-shadow: 0 1px 4px rgb(0 0 0 / 35%); margin-top: var(--sp-2); overflow: hidden; }
/* Mêmes boutons compacts que « Agrandir » (.map-full__btn) : largeur au contenu, fond de contrôle,
   jamais le gros bouton plein d'une page. Séparateur fin entre deux actions empilées. */
.map-actions .map-full__btn { width: 100%; }
.map-actions .map-full__btn + .map-full__btn { border-top: 1px solid var(--c-border); }

/* Panneau de DESSIN de traque POSÉ SUR la carte (CE1.4) — on lance « Ajouter une traque » ET on
   « Terminer » sans jamais quitter la carte ni le plein écran. Coin bas-gauche, replié à un bouton
   au repos, déplié (nom + consigne + annuler/abandonner/terminer) pendant le tracé. Largeur bornée
   pour ne pas manger la carte sur un téléphone. */
/* Fil du territoire (lot GUIDAGE.1) : une ligne discrète au-dessus de la carte — le geste suivant,
   nommé et déclenchable en un tap. Même famille visuelle que les bandeaux d'aide, jamais un mur. */
.terr-guide { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-2); border-left: 3px solid var(--c-primary); background: var(--c-primary-soft); border-radius: var(--radius-sm); }
.terr-guide__text { flex: 1 1 220px; margin: 0; }
.terr-guide .btn { min-height: var(--tap-min); }
/* Visée au réticule (lot VISEE) : la croix est FIXE au centre, la carte bouge dessous. Le réticule ne
   capte aucun geste (pointer-events: none) et vit au-dessus des marqueurs (volet marqueurs Leaflet
   = 600), sous les contrôles (1000). La boîte « Poser ici » est un contrôle compact, plein écran compris. */
.map-aim { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; pointer-events: none; z-index: 650; }
.map-aim__svg { display: block; }
.map--aiming { cursor: move; outline: 3px solid var(--c-primary); outline-offset: -3px; }
.map-aim__box { display: flex; flex-direction: column; gap: var(--sp-2); width: min(320px, 78vw); padding: var(--sp-2); border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); box-shadow: var(--shadow-lg); }
.map-aim__hint { margin: 0; font-weight: 600; font-size: var(--fs-sm); }
.map-aim__box .btn { min-height: var(--tap-min); }
.map-draw { display: flex; flex-direction: column; gap: var(--sp-2); width: min(320px, 78vw); padding: var(--sp-2); border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); box-shadow: var(--shadow-lg); }
.map-draw .btn { width: 100%; justify-content: center; }
.map-draw__panel { display: flex; flex-direction: column; gap: var(--sp-2); }
.map-draw .draw-status { margin: 0; }
.map-draw input { width: 100%; }

/* Panneau des SECTEURS DE TIR (CE2.6.1) — même coin, même habillage que le panneau de dessin : on
   édite désormais les secteurs SUR la carte du territoire, il n'y a plus de seconde carte. La fiche
   du secteur sélectionné vit DEDANS et non en surcouche : régler un cône, c'est le regarder changer,
   et une surcouche recouvrirait précisément ce qu'on ajuste. */
.map-angle { display: flex; flex-direction: column; gap: var(--sp-2); width: min(320px, 78vw); padding: var(--sp-2); border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); box-shadow: var(--shadow-lg); }
.map-angle .btn { width: 100%; justify-content: center; }
.map-angle input { width: 100%; }
.map-angle .muted { margin: 0; font-size: var(--fs-sm); }
.map-angle__sel { margin: 0; font-weight: 700; font-size: var(--fs-sm); }
/* CAP EN DIRECT pendant la rotation (SECTEURS.2) : chiffres tabulaires, sinon la largeur saute à
   chaque degré et la ligne tressaute sous les doigts. Vide quand rien n'est sélectionné — la règle
   « jamais un titre sans contenu » vaut aussi pour une ligne de valeur. */
.map-angle__live { margin: 0; font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.map-angle__live:empty { display: none; }
.map-angle__fiche { display: flex; flex-direction: column; gap: var(--sp-2); }
/* « Ajustement précis » REPLIÉ : la saisie en degrés quitte le premier plan sans disparaître —
   c'est l'équivalent CLAVIER de la poignée de rotation (U5.2), et le seul chemin hors ligne (17.3). */
.map-angle__precise > summary { min-height: var(--tap-min); display: list-item; padding: var(--sp-1) 0 var(--sp-1) var(--sp-4); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.map-angle__precise .row { gap: var(--sp-2); }
/* SENS du secteur (CE2.6.2) : deux boutons radio EXPLICITES, empilés, chacun à sa prise de 48 px
   (U5.2). Deux consignes opposées se lisent en toutes lettres — jamais une case à cocher, dont on
   devinerait le sens quand elle n'est pas cochée. */
.map-angle__sens { display: flex; flex-direction: column; gap: var(--sp-1); }
.map-angle__sens .radio { display: flex; align-items: center; gap: var(--sp-2); min-height: var(--tap-min); cursor: pointer; font-size: var(--fs-sm); }
.map-angle__sens .radio input { width: 22px; height: 22px; flex: 0 0 auto; margin: 0; }

/* ── PANNEAUX DE CARTE : HAUTEUR BORNÉE ET DÉFILEMENT (lot SECTEURS.1) ──────────────────────────
   LE DÉFAUT, mesuré (docs/AUDIT-SECTEURS.md §9) : aucun des trois panneaux posés sur une carte
   n'avait de borne de hauteur ni de débordement. Le panneau des secteurs, un secteur sélectionné,
   fait ≈ 730 px — ≈ 900 px en « Taille du texte » très grande, les polices étant en `rem` et la
   racine montant à 125 %. La carte en fait 320. Leaflet CLIPPE (`.leaflet-container { overflow:
   hidden }`) et ancre le contrôle EN BAS (`.leaflet-bottom { bottom: 0 }`) : le trop-plein monte,
   et c'est le HAUT qui disparaît — le titre d'abord, puis l'aide, c'est-à-dire justement la phrase
   qui explique la poignée de rotation. D'où la recette du 23/09 : « le texte est coupé » ET « on ne
   peut pas tourner un cône au doigt » n'étaient qu'un seul et même défaut.

   CE N'EST PAS UN BUG DE PAYSAGE. Il n'existe aucune règle d'orientation dans cette feuille, et il
   n'en est ajouté aucune : le panneau était coupé en portrait aussi, dès la vue normale (320 px).
   Le paysage l'a seulement rendu criant, le plein écran (`100dvh`) étant le seul cas où il tenait —
   et c'est cette hauteur-là que le paysage divise par deux.

   LE CORRECTIF EST GÉOMÉTRIQUE : on se borne à la hauteur RÉELLE de la carte (`--map-avail`, posée
   par `.map` et redéfinie par `.map--fullscreen`), dont on retire les deux marges du contrôle
   Leaflet (`.leaflet-bottom .leaflet-control { margin-bottom: 10px }` et son pendant haut) et
   l'encoche. Il vaut donc tel quel en portrait, en paysage, en texte très grand et sur tablette.
   Patron CE1.7 (combobox) : `overscroll-behavior: contain` — sans lui le défilement du panneau
   FUIT vers la carte dessous et la fait glisser — plus l'inertie iOS.

   LES TROIS PANNEAUX, UNE SEULE RÈGLE. `.map-draw` et `.map-aim__box` ont le même gabarit et le
   même défaut ; n'en réparer qu'un serait laisser deux pièges pour la prochaine recette. */
.map-angle, .map-draw, .map-aim__box {
  /* 20px = les marges HAUTE et BASSE du contrôle Leaflet (leaflet.css), pas une valeur de goût. */
  max-height: calc(var(--map-avail, 320px) - 20px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* TITRE COLLANT — on doit savoir QUEL poste on règle sans remonter le panneau.
   L'AIDE, ELLE, DÉFILE, et c'est mesuré, pas négligé : titre (2 lignes ≈ 48 px) + phrase de sens
   P4 (≈ 88 px) + aide (≈ 66 px) = ≈ 226 px d'en-tête, auxquels s'ajoutent 104 px de boutons — soit
   330 px à épingler dans les 300 px disponibles d'une carte de 320. Épingler l'aide rendrait le
   panneau vide de contenu défilable : ce qui est collé, c'est le strict nécessaire pour se repérer
   (le titre) et pour sortir (« Terminer »).
   Marges négatives + padding propre : la bande couvre toute la largeur, padding du panneau compris,
   sinon le contenu défilerait VISIBLEMENT dans les 8 px de marge intérieure, sous le titre. */
.map-angle__title {
  position: sticky; top: 0; z-index: 2;
  margin: calc(var(--sp-2) * -1) calc(var(--sp-2) * -1) 0;
  padding: var(--sp-2); background: var(--c-surface);
  font-size: var(--fs-body);
}
/* « TERMINER » COLLANT EN BAS : on ne doit jamais avoir à faire défiler pour SORTIR du mode. Les
   deux boutons de pose (« Fenêtre de tir », « Ajouter un cône »), eux, restent dans le flux —
   ce sont des gestes, pas une issue de secours. */
.map-angle__foot {
  position: sticky; bottom: 0; z-index: 2;
  margin: 0 calc(var(--sp-2) * -1) calc(var(--sp-2) * -1);
  padding: var(--sp-2); background: var(--c-surface);
}

/* CE1.9 — Une feuille / fiche body-level ouverte est MODALE : TOUS les contrôles de carte passent
   sous elle (estompés, non cliquables), au lieu de flotter au-dessus du voile (retour recette : la
   pile topright restait lisible et cliquable par-dessus la feuille de pose). La pile Leaflet a son
   propre contexte d'empilement (`.leaflet-top`/`.leaflet-bottom` : z-index 1000) ; on neutralise le
   CONTENEUR de contrôles d'un seul coup — jamais contrôle par contrôle — et `:has()` évite tout
   drapeau JS à synchroniser avec le cycle de vie des surcouches. Vaut en plein écran comme en vue
   normale (fiche objet, fiche traque, feuille de pose, combobox « Autre… », panneau de dessin). */
body:has(.pose-sheet-overlay, .fiche-overlay:not(.fiche-overlay--dock), .confirm-overlay) .leaflet-control-container {
  opacity: 0;
  pointer-events: none;
}

.map-base { display: flex; overflow: hidden; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); box-shadow: 0 1px 4px rgb(0 0 0 / 35%); }
.map-base__btn {
  min-height: var(--tap-min); min-width: var(--tap-min); padding: 0 var(--sp-2);
  border: 0; border-inline-end: 1px solid var(--c-border); background: transparent;
  color: var(--c-text); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.map-base__btn:last-child { border-inline-end: 0; }
.map-base__btn--on { background: var(--c-primary); color: var(--c-text-inverse); }
.map-base__btn:focus-visible { outline: 3px solid var(--c-accent); outline-offset: -3px; }

/* Dessin d'une traque (U5.6) — l'état du mode doit se VOIR sur la carte elle-même. */
.map--drawing { cursor: crosshair; outline: 3px solid var(--c-danger); outline-offset: -3px; }
/* Marqueur numéroté posé à chaque clic : LE retour visuel qui manquait (un polygone à un seul
   sommet ne dessine rien). Pastille lisible sur les tuiles, jamais une cible tactile. */
/* Prise de 48 px (U5.2) : l'icône Leaflet fait 48x48 — transparente — et ne montre qu'une pastille
   de 28 px centrée. On saisit ainsi un sommet au pouce sans agrandir le point à l'écran. */
.traque-point { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: none; border: 0; }
.traque-point__dot {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--c-danger); color: var(--c-danger-ink);
  font-family: var(--font-title); font-weight: 800; font-size: var(--fs-sm);
  border: 2px solid var(--c-surface); box-shadow: var(--shadow);
}
/* Sommet déplaçable : le curseur l'annonce sur les appareils qui en ont un. */
.leaflet-marker-draggable .traque-point__dot { cursor: grab; }

/* Poignée de ROTATION du cône de tir interdit (CE2.5) : en bout d'axe, on la glisse pour orienter le
   cône. Prise de 44 px (U5.2), pastille visible plus petite, curseur « grab » sur desktop. */
/* POIGNÉE DE ROTATION (CE2.5, rendue atteignable en SECTEURS.2). Elle vit au bout de l'AXE du cône,
   à un rayon calculé en PIXELS pour garder ≥ 44 px de séparation avec le marqueur de poste à tout
   zoom (`handleRadiusM`) — avant, à zoom 15, elle tombait à ~43 px de lui : deux prises de 44 px
   qui se chevauchent, impossibles à viser séparément au pouce.
   Le DISQUE passe de 22 à 28 px et prend le trait sombre + halo clair du marqueur de poste : un
   point rouge de 22 px au sommet d'un cône rouge hachuré se lisait comme une décoration du cône,
   pas comme une prise. La cible tactile, elle, reste à 44 px (U5.2) — hitbox indépendante du
   disque, patron `poste-marker`. */
.angle-handle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: 0; cursor: grab; overflow: visible; }
.angle-handle:active { cursor: grabbing; }
/* LE DISQUE — blanc, liseré sombre, 32 px VISIBLES dans une cible de 44 (U5.2 : la prise ne rétrécit
   jamais). Recette du 23/09 sur fond Photos : le petit disque sombre du .2 disparaissait dans la
   végétation. Le blanc porte sur un fond sombre, le liseré porte sur un fond clair — la languette se
   détoure donc sur les DEUX fonds, et `tests/secteurs-2-1-languette.test.js` le vérifie par calcul
   de contraste, jamais à l'œil. Hors thème (cf. css/tokens.css) : une carte n'est pas une surface
   de l'application, les tuiles ne changent pas en thème clair. */
.angle-handle__disc {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--c-handle-face); border: 2px solid var(--c-handle-edge);
  box-shadow: var(--shadow-lg);
  transition: transform 120ms ease-out;
}
/* EN PRISE : le disque grossit, le cône s'épaissit, les pointes s'effacent (elles ont dit ce qu'elles
   avaient à dire, et elles tourneraient avec le cône). Tout est porté par UNE classe sur le
   conteneur de carte, posée au CONTACT (`mousedown`/`touchstart`) — pas de JS de minuterie. */
.map--rotating .angle-handle__disc { transform: scale(1.25); }
.map--rotating .sector-arrow { opacity: 0; transition: opacity 120ms ease-out; }
.map--rotating .sector-live { stroke-width: 5; }
.sector-arrow { transition: opacity 120ms ease-out; }
.sector-live { transition: stroke-width 120ms ease-out; }

/* BULLE DE DÉCOUVERTE — une fois par appareil (SECTEURS.2.1). Posée à côté de la languette, elle
   dit ce que le pictogramme ne peut pas dire. Elle se referme au premier glissé ou au tap dessus ;
   `pointer-events: auto` parce que la languette, elle, laisse passer le geste. */
.angle-handle__tip {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  white-space: nowrap; pointer-events: auto; cursor: pointer;
  padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-sm);
  background: var(--c-handle-edge); color: var(--c-handle-face);
  font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--shadow-lg);
}
/* PULSATION : deux battements, puis plus rien — elle attire l'œil sans s'installer. La classe n'est
   PAS posée quand l'utilisateur demande moins d'animation (décidé en JS, `prefersReducedMotion`) ;
   la règle ci-dessous est la ceinture par-dessus la bretelle, et couvre le changement de réglage
   en cours de route, que le JS ne relit pas. */
@keyframes angle-handle-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}
.angle-handle__disc--pulse { animation: angle-handle-pulse 900ms ease-in-out 2; }
@media (prefers-reduced-motion: reduce) {
  .angle-handle__disc--pulse { animation: none; }
  .angle-handle__disc, .sector-arrow, .sector-live { transition: none; }
}
.leaflet-marker-draggable.angle-handle { cursor: grab; }

/* Marqueur de POSTE (train CARTE-VISIBILITÉ) — un rond vert sur une photo verte était invisible.
   Silhouette de chasseur (icône B1) sur un disque ORANGE SÉCURITÉ, halo blanc + liseré sombre pour
   tenir sur TOUS les fonds. Le conteneur Leaflet (`.leaflet-div-icon`) a un fond blanc et une
   bordure par défaut : on les neutralise, comme le fait `.traque-point`. */
.poste-marker { background: none; border: 0; }
/* Le conteneur EST la prise tactile (44 px, U5.2). Le disque est CENTRÉ sur le point (position
   absolue) et l'étiquette flotte dessous : ainsi le disque reste pile sur la coordonnée à tous les
   paliers de zoom (CE1.5) — sa taille ne déplace plus le point. */
.poste-pin { position: relative; width: 44px; height: 44px; }
.poste-pin__disc {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  /* COULEUR PAR TYPE (CE1.5) : `--pin-fill`/`--pin-ink` posés par posteMarkerHtml depuis la table
     partagée ; repli sur l'orange établi. La FORME (picto) reste le discriminant premier (U5.1). */
  background: var(--pin-fill, var(--c-poste)); color: var(--pin-ink, var(--c-poste-ink));
  /* deux anneaux : blanc (halo) puis sombre (liseré) — conservés, lisibles sur tout fond. */
  border: 2px solid var(--c-poste-ink);
  box-shadow: 0 0 0 2px var(--c-poste-halo), var(--shadow);
}
.poste-pin__disc .icon { width: 22px; height: 22px; }
/* Nom du poste : étiquette compacte sous le disque, jamais tronquée en dur mais bornée. */
.poste-pin__label {
  position: absolute; left: 50%; top: calc(50% + 22px); transform: translateX(-50%);
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 1px 6px; border-radius: var(--radius-pill, 999px);
  background: var(--pin-fill, var(--c-poste)); color: var(--pin-ink, var(--c-poste-ink));
  border: 1px solid var(--c-poste-ink); box-shadow: 0 0 0 1px var(--c-poste-halo);
  font-family: var(--font-title); font-weight: 700; font-size: var(--fs-sm); line-height: 1.25;
}
/* « Mon poste » : un ANNEAU jaune en plus (forme, pas seulement couleur). */
.poste-pin--mine .poste-pin__disc { box-shadow: 0 0 0 2px var(--c-poste-halo), 0 0 0 5px var(--c-poste-ring), var(--shadow); }
/* Poste en cours d'édition : anneau POINTILLÉ (distinct de « mon poste » au trait). */
.poste-pin--selected .poste-pin__disc { outline: 3px dashed var(--c-poste-ring); outline-offset: 3px; }

/* PALIERS DE ZOOM (CE1.5) — attachMarkerScale pose `map--z-<palier>` sur le conteneur au zoomend.
   Défaut = palier « large » (zoom ≥ 16) : disque plein 34 px, étiquette visible. La prise tactile
   (44 px du conteneur) ne bouge JAMAIS — seul le visuel change. */
.map--z-mid .poste-pin__disc { width: 24px; height: 24px; }
.map--z-mid .poste-pin__disc .icon { width: 15px; height: 15px; }
.map--z-mid .poste-pin__label { top: calc(50% + 17px); }
.map--z-small .poste-pin__disc { width: 18px; height: 18px; }
.map--z-small .poste-pin__disc .icon { width: 12px; height: 12px; }
.map--z-small .poste-pin__label { display: none; } /* picto seul de loin ; le nom revient au tap (fiche) */

/* Menu de POSE (train CARTE-ÉDIT / CE1.2) — compact, posé SUR PLACE au point d'appui long / clic
   droit. Vit dans le contexte d'empilement de `.map` (au-dessus des tuiles) ; ses clics sont absorbés
   (js) pour ne pas fuir vers la carte. Prises ≥ tap-min (U5.2). */
/* COMPACT (CE1.5) : ~180-200 px, libellés seuls, interligne serré. Positionné et CLAMPÉ au point
   d'appui par openMenu (js) pour rester entièrement visible, même collé à un bord. */
.pose-menu {
  position: absolute; z-index: 800; min-width: 180px; max-width: min(208px, 78vw);
  background: var(--c-surface); border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: var(--sp-2);
}
.pose-menu__title { margin: 0 0 var(--sp-1); font-weight: 700; font-size: var(--fs-sm); color: var(--c-text-muted); padding: 0 var(--sp-1); }
.pose-menu__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-1); }
.pose-menu .btn, .pose-menu button { width: 100%; justify-content: flex-start; padding-inline: var(--sp-2); font-size: var(--fs-sm); }

/* Légende de carte (CE1.3) : types présents → picto + libellé. Le picto porte la couleur du texte
   (la légende dit la FORME, pas la couleur — U5.1). Repliée par défaut. */
.map-legend { margin-top: var(--sp-2); }
/* `display: list-item`, PAS `display: flex` (CE2.6.3). Un `<summary>` en `flex` perd son marqueur de
   dépliement, et sur WebKit/iOS il cesse d'ouvrir son `<details>` : la légende n'était plus qu'un
   TITRE INERTE — exactement le « Légende » et le « Zones » vides remontés en recette. On garde la
   prise de 48 px (U5.2) par `min-height` + padding, ce qui n'exige aucun flex. */
.map-legend > summary { cursor: pointer; font-weight: 600; font-size: var(--fs-sm); min-height: var(--tap-min); display: list-item; padding: var(--sp-2) 0 var(--sp-2) var(--sp-4); }
.map-legend__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--sp-2); padding: var(--sp-2) 0; }
.legend-item { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
/* La pastille de légende MIRROIR du marqueur (CE1.5) : même disque coloré + picto, pour lire
   couleur ET forme d'un coup. `--pin-fill`/`--pin-ink` posés par objectLegend depuis la table. */
.legend-item__ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%;
  background: var(--pin-fill, var(--c-poste)); color: var(--pin-ink, var(--c-poste-ink));
  border: 2px solid var(--c-poste-ink); box-shadow: 0 0 0 1px var(--c-poste-halo);
}
.legend-item__ico .icon { width: 16px; height: 16px; }
/* Pastille de légende des ZONES (CE2.2) : le MOTIF réel (trait + remplissage) d'un type de polygone,
   dessiné en SVG. `--zone-stroke` posé par zoneLegend depuis la table ZONE_STYLES. */
.legend-item__swatch { display: inline-flex; flex: 0 0 auto; }
.legend-item__swatch svg { display: block; }
/* Pastille de légende des SIGNALEMENTS (CE3.1) : elle MIROITE l'épingle, pas le disque d'un objet
   fixe — même pointe, même taille réduite, pour qu'on reconnaisse sur la carte ce qu'on lit ici. */
.legend-item__ico--event { width: 22px; height: 22px; border-width: 1px; border-radius: 50% 50% 50% 2px; transform: rotate(-45deg); }
.legend-item__ico--event .icon { width: 13px; height: 13px; transform: rotate(45deg); }

/* ── Marqueur d'un SIGNALEMENT M4 (train CE3) ───────────────────────────────────────────────────
   Un fait ponctuel n'est pas un équipement : là où l'objet fixe est un DISQUE centré sur ses
   coordonnées, le signalement est une ÉPINGLE, plus petite, dont la POINTE tombe sur le lieu. La
   forme du contenant dit la famille, le picto dit le type (U5.1 : jamais la couleur seule).
   Le conteneur reste une prise de 44 px (U5.2), indépendante de la taille visible. */
.event-marker { background: none; border: 0; }
.event-pin { position: relative; width: 44px; height: 44px; }
.event-pin__disc {
  position: absolute; left: 50%; top: 16px; transform: translate(-50%, -50%) rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  /* Trois coins ronds, un coin POINTU en bas-gauche : tourné de -45°, il vise le sol. */
  border-radius: 50% 50% 50% 2px;
  background: var(--pin-fill, var(--c-poste)); color: var(--pin-ink, var(--c-poste-ink));
  border: 2px solid var(--c-poste-ink); box-shadow: 0 0 0 2px var(--c-poste-halo), var(--shadow);
}
.event-pin__disc .icon { width: 16px; height: 16px; transform: rotate(45deg); }
/* ESTOMPAGE (CE3.1) : au-delà d'EVENT_FADE_MINUTES, un signalement dit où l'animal ÉTAIT. Palier
   simple sur l'OPACITÉ — jamais un changement de teinte seul (U5.1) ; il reste entièrement TAPPABLE
   (aucun `pointer-events`), et le journal ne bouge pas : l'estompage est VISUEL, rien d'autre. */
.event-pin--faded { opacity: 0.45; }
/* FLÈCHE DE DIRECTION (CE3.2) : « parti vers NO ». Elle tourne autour du disque, cap 0° = nord = en
   haut, comme sur la carte. Absente = pas de direction renseignée (marqueur simple). */
.event-pin__dir {
  position: absolute; left: 50%; top: 16px;
  width: 0; height: 0; margin: -5px 0 0 -5px;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-bottom: 11px solid var(--pin-fill, var(--c-poste));
  filter: drop-shadow(0 0 1px var(--c-poste-halo)) drop-shadow(0 0 1.5px var(--c-poste-ink));
  transform: rotate(var(--evt-rot, 0deg)) translateY(-24px);
  transform-origin: 50% calc(50% + 5px);
}
/* Paliers de zoom (CE1.5) : l'épingle suit les mêmes seuils que les objets — de loin, picto seul. */
.map--z-mid .event-pin__disc { width: 22px; height: 22px; }
.map--z-mid .event-pin__disc .icon { width: 13px; height: 13px; }
.map--z-mid .event-pin__dir { transform: rotate(var(--evt-rot, 0deg)) translateY(-20px); }
.map--z-small .event-pin__disc { width: 17px; height: 17px; border-width: 1px; }
.map--z-small .event-pin__disc .icon { width: 11px; height: 11px; }
.map--z-small .event-pin__dir { transform: rotate(var(--evt-rot, 0deg)) translateY(-16px); }

/* Fiche d'un objet — bottom sheet mobile / panneau LATÉRAL desktop (train CARTE-ÉDIT / CE1.2).
   Distincte du `.sheet-overlay` de la capture terrain : elle passe en panneau latéral au-delà de
   720 px, là où la capture terrain reste un bottom sheet. */
.fiche-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .5);
  display: flex; align-items: flex-end; justify-content: center;
}
.fiche-panel {
  background: var(--c-surface); border: 1px solid var(--c-border-strong);
  border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-sheet);
  padding: var(--sp-5); width: 100%; max-width: 560px;
  max-height: 88vh; overflow-y: auto;
}
/* Le titre est en ligne (`flex`) depuis CE3.2 : la fiche d'un SIGNALEMENT y pose l'épingle de son
   type, pour reconnaître d'un coup d'œil le marqueur qu'on vient de taper. L'icône ne remplace
   jamais le libellé (règle B1) ; les autres fiches, sans icône, sont inchangées à l'œil. */
.fiche-panel__title { margin: 0 0 var(--sp-4); font-size: var(--fs-body-lg); display: flex; align-items: center; gap: var(--sp-2); }
/* Infos CALCULÉES d'une fiche (traque : surface, objets contenus, battues) — lecture seule, jamais
   une saisie. Libellé à gauche, valeur à droite. */
.fiche-facts { display: flex; flex-direction: column; gap: var(--sp-2); margin: var(--sp-3) 0; padding: var(--sp-3); background: var(--c-surface-2); border-radius: var(--radius-sm); }
.fiche-fact { display: flex; justify-content: space-between; gap: var(--sp-3); align-items: baseline; }
.fiche-fact__label { color: var(--c-text-muted); font-weight: 600; }
.fiche-fact__val { text-align: right; }
/* Desktop : la fiche passe en panneau LATÉRAL — ses règles vivent dans le bloc « min-width 1024 »
   EXISTANT (plus bas). On n'introduit AUCUN nouveau point de rupture : l'en-tête U3.1 en verrouille
   la liste (3 seulement : 640, 1024, print). */
/* Consigne d'étape du dessin : lisible, jamais un simple compteur. */
.draw-status { font-weight: 600; margin: var(--sp-2) 0; }
/* Plus de défilement horizontal (Sprint U5.1b) : mobile = « 4 + Plus » (5 cibles flex:1 qui tiennent
   toujours), desktop = retour à la ligne si nécessaire (voir bloc ≥1024). La barre ne défile jamais. */
.tabbar a, .tabbar button { white-space: nowrap; padding: var(--sp-3) var(--sp-3); }

/* Mode terrain (§4-M4) : très gros boutons (gants, plein soleil, une main), contraste élevé.
   L'écran passe en fond « terrain » (plus sombre en sombre, quasi-blanc en clair). */
body.is-terrain { background: var(--c-bg-terrain); }
.terrain__topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.terrain__theme { min-width: var(--tap-min); min-height: var(--tap-min); font-size: var(--fs-lg); padding: var(--sp-2) var(--sp-3); white-space: nowrap; flex: 0 0 auto; }
/* DIRECTION-2.12 (A1) : en-tête RESSERRÉ — retour, battue et date courte sur UNE ligne (coupée au besoin), son et thème à
   droite. Avec les chiens engagés, à 390 × 844, l'alerte se voit sans défiler. */
.page--terrain { gap: var(--sp-2); }
.terrain__head { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; flex: 1 1 auto; }
.terrain__back { min-width: var(--tap-min); min-height: var(--tap-min); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xl); text-decoration: none; }
.terrain__name { margin: 0; font-size: var(--fs-lg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.terrain__sound { min-height: var(--tap-min); padding: var(--sp-2) var(--sp-3); flex: 0 0 auto; }
.page--terrain .terrain-tabs { margin: 0; }
.terrain__btn--wounded { border: 3px solid var(--c-danger-line); }
.terrain__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.terrain__btn {
  min-height: var(--tap-terrain); font-family: var(--font-title); font-size: var(--fs-terrain); font-weight: 800;
  letter-spacing: .02em; text-transform: uppercase;
  justify-content: center; width: 100%; border-radius: var(--radius-terrain);
  background: var(--c-primary); border-color: transparent; color: var(--c-text-inverse);
}
.terrain__btn--alert { background: var(--c-danger); border-color: transparent; color: var(--c-danger-ink); }
/* Train TERRAIN.1 — trois onglets internes, et des boutons PLEINE LARGEUR empilés.
   Une colonne, jamais deux : à deux colonnes, la moitié des cibles tombe hors de la zone du pouce
   d'une main, et deux libellés courts se confondent au coin de l'œil. */
.terrain-tabs { display: flex; gap: var(--sp-2); margin: var(--sp-3) 0; }
.terrain-tabs__tab {
  flex: 1 1 0; min-height: var(--tap-min); border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  background: var(--c-surface); color: var(--c-text); font: inherit; font-weight: 700; cursor: pointer;
  padding: var(--sp-2) var(--sp-2);
}
/* L'onglet actif se distingue par le FOND **et** par le trait de soulignement (U5.1 : jamais la
   couleur seule — un daltonien lit le trait, et le plein soleil efface les nuances avant les formes). */
.terrain-tabs__tab.is-active {
  background: var(--c-primary); color: var(--c-text-inverse); border-color: transparent;
  box-shadow: inset 0 -4px 0 0 var(--c-accent);
}
.terrain__buttons { display: flex; flex-direction: column; gap: var(--sp-3); }
.terrain__buttons--wrap { flex-direction: row; flex-wrap: wrap; }
.terrain__buttons--wrap .terrain__btn { width: auto; flex: 1 1 42%; }
/* Boutons de PRÉCISION (espèce, chien) : plus bas que les boutons de signalement — ils ne sont pas
   la décision, ils la complètent — mais toujours au-dessus de la cible minimale. */
.terrain__btn--small { min-height: var(--tap-min); font-size: var(--fs-lg); text-transform: none; }
.terrain__btn--chosen {
  min-height: var(--tap-min); font-size: var(--fs-lg); text-transform: none;
  background: var(--c-accent); color: var(--c-text-inverse); box-shadow: inset 0 0 0 3px var(--c-text-inverse);
}
/* Actions COMPACTES du terrain (début/fin de traque, activation du son) : patron BATTUE.4.3 — on
   rogne le rembourrage, jamais la hauteur de cible. */
.terrain__act-row { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.terrain__act { flex: 1 1 0; min-height: var(--tap-min); padding: var(--sp-2) var(--sp-3); }
.terrain__complement { display: flex; flex-direction: column; gap: var(--sp-3); }
.terrain__done { margin: 0; font-size: var(--fs-lg); }
.terrain__precise { display: flex; flex-direction: column; gap: var(--sp-2); }
/* Chaîne photo (train TERRAIN.2). L'`<input type="file">` reste DANS le document — masqué
   visuellement, jamais `display:none` : sinon il sortirait de l'ordre de tabulation et le bouton
   deviendrait inatteignable au clavier (WCAG 2.2 AA, règle permanente du projet). */
.photo-capture__input {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.photo-thumb { margin: var(--sp-2) 0; }
.photo-thumb__img {
  display: block; max-width: 100%; height: auto; max-height: 320px;
  border-radius: var(--radius-sm); border: 1px solid var(--c-border);
}
.photo-thumb__wait { margin: 0; font-style: italic; }
.terrain__species { margin-bottom: var(--sp-3); }
.terrain__species .input { min-height: 56px; font-size: var(--fs-lg); }
.terrain__audio-on { font-weight: 700; color: var(--c-accent); margin: 0; }
.terrain__journal { list-style: none; margin: 0; padding: 0; }
.terrain__row {
  display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: baseline;
  padding: var(--sp-2) 0; border-bottom: 1px solid var(--c-border);
}
.terrain__time { font-variant-numeric: tabular-nums; font-weight: 700; }
.terrain__type { font-weight: 600; }
.terrain__author { color: var(--c-text-muted); }
.terrain__detail { color: var(--c-text-muted); }
/* Notification discrète de nouveaux événements reçus au polling (13.4). */
.terrain__new { background: var(--c-primary); color: var(--c-text-inverse); border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); font-weight: 600; }

/* ≥1024px (desktop) : navigation EN HAUT, sous le header. Même #tabbar, placement CSS only.
   Le header (nom de structure + statut « En ligne ») reste sticky et visible au-dessus. */
@media (min-width: 1024px) {
  /* La barre d'onglets passe EN HAUT : le bouton principal fixe se colle alors au bas de l'écran. */
  .action-bar { bottom: 0; }
  /* Réordonne la coquille en flex : header (0) → onglets (1) → contenu (2). */
  .app-header { order: 0; }
  .tabbar { order: 1; }
  .app-main { order: 2; }

  /* Fiche d'objet (train CARTE-ÉDIT / CE1.2) : bottom sheet mobile → panneau LATÉRAL en desktop. */
  .fiche-overlay { align-items: stretch; justify-content: flex-end; }
  .fiche-panel { border-radius: 0; max-width: 420px; height: 100%; max-height: none; border-inline-start: 1px solid var(--c-border-strong); }

  /* En desktop, DEUX barres collantes se superposent : l'en-tête et les onglets. Une cible de
     défilement doit passer sous les deux. La réserve est en `rem` — donc elle grandit avec le
     réglage « Taille du texte » (U5.1), exactement comme la barre d'onglets qu'elle doit dégager. */
  .scroll-target { scroll-margin-top: calc(var(--header-h) + 5rem); }

  .tabbar {
    position: sticky; top: var(--header-h); bottom: auto; z-index: 9;
    border-top: none; border-bottom: 1px solid var(--c-border);
    /* Groupe d'onglets RECENTRÉ dans la barre (Sprint U5.1e — rétablit le centrage de l'avant-U5.1b,
       état U3.1). Purement visuel : la mesure (js/app.js) raisonne sur clientWidth − padding, donc
       indépendante de l'alignement — un onglet centré ne re-déclenche jamais « Plus ». */
    justify-content: center; padding-bottom: 0;
    /* COMBO.1 : centré, SAUF si ça déborde — sans « safe », le début de la barre serait rogné à gauche,
       hors d'atteinte du défilement. */
    justify-content: safe center;
    /* UNE seule ligne (Sprint U5.1c) : plus de flex-wrap. Les onglets qui ne tiennent pas basculent
       dans « Plus » (mesure JS), jamais sur une deuxième ligne, jamais en défilement. */
    flex-wrap: nowrap;
    /* PLEINE LARGEUR du header, marges simples (Sprint U5.1d). L'ancien centrage sur 960px bornait la
       barre à cette colonne : en très grand, 9 onglets (~1300px) débordaient 960 et basculaient dans
       « Plus » alors qu'un large espace restait libre à droite. La largeur mesurée (js/app.js) suit
       désormais la largeur RÉELLE utilisable → « Plus » n'apparaît que si la fenêtre est vraiment
       trop étroite. Le groupe d'onglets est recentré dans cette largeur (U5.1e ci-dessus). */
    padding-inline: var(--sp-4);
  }
  .tabbar a {
    flex: 0 0 auto; padding: var(--sp-3) var(--sp-3);
    /* Onglet actif souligné ; bordure transparente au repos pour éviter le saut de mise en page. */
    border-top: none; border-bottom: 2px solid transparent;
  }
  .tabbar a[aria-current='page'] { color: var(--c-accent); border-top-color: transparent; border-bottom-color: var(--c-primary); }
}

/* ── Combobox (composant unique — Sprint 15) ─────────────────────────────────── */
.combobox { position: relative; }
.combobox__field { width: 100%; text-align: left; cursor: pointer; }
.combobox__panel[hidden] { display: none; }
.combobox__panel {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius, 8px); box-shadow: 0 8px 24px rgba(0,0,0,.16);
  /* La RECHERCHE reste fixée en haut, seule la LISTE défile (CE1.7) : colonne flex, panneau borné,
     débordement porté par `.combobox__list`, pas par le panneau entier. */
  max-height: 60vh; overflow: hidden; padding: var(--sp-2);
  display: flex; flex-direction: column; min-height: 0;
}
.combobox__search { width: 100%; margin-bottom: var(--sp-2); flex: 0 0 auto; }
/* Zone de liste SCROLLABLE (CE1.7) : atteint le dernier type au doigt ; `overscroll-behavior: contain`
   empêche le scroll de « fuir » vers la page/carte dessous ; défilement inertiel iOS. */
.combobox__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.combobox__group-head {
  width: 100%; text-align: left; background: transparent; border: none;
  /* COMBO.1 : un <button> sans police prend celle du navigateur (~13 px) — le titre de famille suit le corps. */
  font: inherit; font-size: var(--fs-base);
  min-height: var(--tap-min);
  padding: var(--sp-2); font-weight: 600; cursor: pointer; color: var(--c-text);
  display: flex; justify-content: space-between; align-items: center;
}
.combobox__group-head.is-open { color: var(--c-accent); }
.combobox__pin { font-weight: 600; opacity: .7; }
.combobox__count { color: var(--c-text-muted); font-weight: 400; }
.combobox__row {
  display: flex; flex-direction: column; justify-content: center;
  min-height: var(--tap-min); padding: var(--sp-2) var(--sp-3); cursor: pointer; border-radius: 6px; /* U5.2 : ≥ 48 px */
}
.combobox__row:hover, .combobox__row.is-active { background: var(--c-primary-soft); }
.combobox__row-sub { font-size: var(--fs-sm); color: var(--c-text-muted); }
.combobox__row--free, .combobox__row--other { color: var(--c-accent); font-style: italic; }
.combobox__row--default { font-weight: 600; }
.combobox__empty { padding: var(--sp-3); }

/* Champ « Commune » à suggestions (lot ADRESSE.2) : une liste LÉGÈRE sous un champ texte ordinaire —
   mêmes lignes que la combobox (≥ 48 px), mais rendues en <button> pour le clavier et le doigt. */
.commune { position: relative; }
.commune__list[hidden] { display: none; }
.commune__list {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius, 8px); box-shadow: 0 8px 24px rgba(0,0,0,.16);
  max-height: 40vh; overflow-y: auto; padding: var(--sp-2);
}
.commune__row {
  width: 100%; text-align: left; background: transparent; border: none;
  font: inherit; color: inherit; align-items: flex-start;
}

/* Feuille de sélection de TYPE au-dessus d'une carte (CE1.7, « Autre… »). Rendue au niveau du BODY,
   hors du contexte d'empilement de la carte : au-dessus de TOUS les contrôles de carte (comme la
   fiche objet — rang 200 > carte agrandie 90 ; les toasts 300 restent au-dessus). Le fond opaque
   masque et neutralise les contrôles topright tant qu'elle est ouverte. */
.pose-sheet-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .5);
  display: flex; align-items: flex-end; justify-content: center;
}
.pose-sheet {
  background: var(--c-surface); border: 1px solid var(--c-border-strong);
  border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-sheet);
  padding: var(--sp-4); width: 100%; max-width: 560px;
  max-height: 82vh; display: flex; flex-direction: column; min-height: 0;
}
.pose-sheet__title { margin: 0 0 var(--sp-3); font-size: var(--fs-body-lg); font-weight: 700; }
/* Combobox INLINE : le panneau vit EN FLUX dans la feuille (pas d'absolu, pas d'ombre propre) et
   laisse sa liste défiler dans la hauteur restante. */
.combobox--inline { display: flex; flex-direction: column; min-height: 0; }
.combobox--inline .combobox__panel {
  position: static; z-index: auto; box-shadow: none; border: 0; padding: 0; max-height: none;
  background: transparent;
}

/* Mobile : bottom-sheet plein écran (lignes tactiles ≥ 44 px). */
@media (max-width: 640px) {
  /* En-tête étroit (U3.1) : le picto suffit à identifier l'app — le mot-symbole cède la place au
     nom de la structure, qui est l'information utile sur le terrain. */
  .app-header__title { display: none; }
  .app-header__structure { font-size: var(--fs-base); }
  /* Statut (U5.1b, point 4) : « En ligne » est l'état normal et redondant — on le masque sous 640 px
     pour laisser la largeur au nom de structure ; « Hors ligne » et « Lecture seule » restent visibles
     (ce sont les exceptions qui doivent se voir). Masquage propre, au seuil CSS existant. */
  .app-header__status .badge--net:not(.badge--offline) { display: none; }

  .combobox__panel.is-open {
    position: fixed; inset: auto 0 0 0; top: 20vh; max-height: 80vh;
    border-radius: var(--radius) var(--radius) 0 0; padding: var(--sp-3);
    box-shadow: var(--shadow-sheet);
  }
  /* Poignée de bottom-sheet (repère tactile). */
  .combobox__panel.is-open::before {
    content: ""; display: block; width: 44px; height: 5px; border-radius: 3px;
    background: var(--c-border-strong); margin: 0 auto var(--sp-3);
  }
}

/* ── Lignes de graphique du tableau de bord (Sprint U3.2) ─────────────────────────────────────
   Aucune bibliothèque : la barre est un div, la jauge celle de la PMA. Un en-tête libellé/valeur
   au-dessus de chaque barre — la valeur est TOUJOURS écrite, la barre ne fait qu'illustrer. */
.chart-row { margin-bottom: var(--sp-3); }
.chart-row__head { display: flex; align-items: center; gap: var(--sp-2); justify-content: space-between; }
.chart-row__head > span:first-child { font-weight: 600; }

/* ── Tirage public (Sprint 16.3) : révélation séquentielle en gros caractères au rond ─────────── */
.draw-public { text-align: center; padding: var(--sp-3); }
.draw-public__row { font-size: 1.6rem; font-weight: 700; margin: var(--sp-2) 0; }

/* ── Bandeau « repères indicatifs » (Sprint 16.4) : rappel permanent, non intrusif ────────────── */
.banner {
  background: var(--c-primary-soft); border-left: 3px solid var(--c-primary);
  padding: var(--sp-2) var(--sp-3); border-radius: 6px; font-size: var(--fs-sm);
}
/* Variante « ça n'est pas passé » (correctif du 22/07/2026) : même bandeau, filet d'alerte. Le
   texte reste en `--c-text` (AAA sur les deux thèmes) — seul le filet change, car un message qu'on
   doit relire n'a pas à être écrit dans une couleur moins lisible que le reste de l'écran. */
.banner--alert { background: transparent; border-left-color: var(--c-danger-line); }
/* BUREAU-6 (A2, A3) : « à savoir » sans rien de cassé (compte en cours de suppression) : filet ambre, texte inchangé. */
.banner--warn { background: var(--c-warn-bg); color: var(--c-warn-ink); border-left-color: var(--c-warn-ink); }
.invite-deleting { margin: var(--sp-2) 0; }
.invite-deleting ul { margin: var(--sp-1) 0 0; padding-left: var(--sp-4); }

/* ── Invitations : QR + overlay plein écran (Sprint 18) ───────────────────────── */
.qr-wrap { display: flex; justify-content: center; padding: var(--sp-3); }
.qr-wrap canvas { image-rendering: pixelated; max-width: 100%; height: auto; }
/* Fond BLANC volontaire (les deux thèmes) : quiet-zone du QR — la scannabilité prime sur le thème. */
.qr-overlay {
  position: fixed; inset: 0; z-index: 100; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-3);
  cursor: pointer;
}
.qr-overlay canvas { image-rendering: pixelated; max-width: 92vw; max-height: 80vh; }
.hidden { display: none; }

/* Confirmation de suppression (Sprint U2.4) — overlay modal léger. */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .5);
  display: flex; align-items: center; justify-content: center; padding: var(--sp-4);
}
.confirm-box {
  background: var(--c-surface); border: 1px solid var(--c-border-strong);
  border-radius: var(--radius); padding: var(--sp-5); max-width: 420px; width: 100%;
  box-shadow: var(--shadow-lg);
}
.confirm-box__msg { margin: 0 0 var(--sp-4); font-size: var(--fs-body-lg); }
.confirm-box__detail { margin: calc(-1 * var(--sp-2)) 0 var(--sp-3); font-size: var(--fs-sm); }

/* Bottom-sheet de capture rapide terrain (Sprint U2.6b). */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .5);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-box {
  background: var(--c-surface); border: 1px solid var(--c-border-strong);
  border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-sheet);
  padding: var(--sp-5); width: 100%; max-width: 560px;
}

/* ── Menu « Plus » (Sprint U5.1b) : grille de grandes cibles pour les rubriques hors des 4 onglets
   fixes du mobile. Icône + libellé, cibles ≥ 56 px, ordre constant. ─────────────────────────────── */
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.more-grid__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 56px; padding: var(--sp-4) var(--sp-3);
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  background: var(--c-surface-2); color: var(--c-text); text-decoration: none; font-weight: 600;
  text-align: center;
}
.more-grid__item[aria-current='page'] { border-color: var(--c-primary); color: var(--c-accent); }
.more-grid .icon { width: 26px; height: 26px; }

/* Filet global anti-chevauchement (Sprint U5.1b, point 3) : un lien placé DIRECTEMENT dans une carte
   est un accès autonome (gérer les saisons, aller aux réglages…) — il passe en bloc, sur sa propre
   ligne, et ne partage donc jamais sa ligne avec un bouton voisin (le cas du chevauchement en texte
   très grand). Les actions côte à côte VOULUES passent par .row (qui gère gap + retour à la ligne) ;
   les liens en ligne (dans une cellule, un <span>, un <p>) ne sont pas des enfants directs de .card. */
.card > .link { display: block; }

/* ── Impression des PAGES DE L'APP uniquement (Sprint D1.2) ─────────────────────────────────────
   Les documents PDF (carnet de battue, émargement) sont générés par shared/pdf/render-html.js comme
   documents AUTONOMES (window.open + <style> inline) : ils ne référencent jamais cette feuille, donc
   ce bloc ne peut pas les affecter (golden PDF inchangés). Il ne sert qu'à une impression directe de
   l'app depuis le navigateur. */
@media print {
  :root {
    --c-bg: #ffffff; --c-surface: #ffffff; --c-field: #ffffff; --c-nav: #ffffff;
    --c-text: #1a1a1a; --c-text-strong: #000; --c-text-muted: #555; --c-accent: #2f4529;
    --c-border: #bbb; --c-border-strong: #888;
    --c-header-grad: none; --c-header-ink: #1a1a1a;
  }
  body { background: #fff; color: #1a1a1a; }
  .app-header, .tabbar, .btn, .toast, .qr-overlay { display: none; }
  .card { border: 1px solid #bbb; box-shadow: none; break-inside: avoid; }
}

/* Cartes de navigation par type (Sprint A1.2) — toute la carte est la cible : on ne vise pas un
   petit lien, on tape la carte. Cible tres au-dela des 48 px exiges (U5.2). */
.card--nav { display: block; text-decoration: none; color: inherit; }
.card--nav:hover, .card--nav:focus-visible { border-color: var(--c-border-strong); }
.card__nav-title { font-family: var(--font-title); font-weight: 700; font-size: var(--fs-lg); margin: 0; }
/* Cards de TERRITOIRE avec apercu (CE4.1) — on reconnait son terrain a sa forme, pas a une ligne de
   tableau. La vignette est soit l'instantane de la derniere visite, soit la silhouette des contours :
   dans les deux cas, aucune tuile n'est demandee sur cet ecran. */
/* Pas de seuil nouveau (regle U5.1b : on ne multiplie pas les points de bascule) — le repli est
   INTRINSEQUE : le corps garde une largeur minimale, et passe sous la vignette s'il ne tient plus. */
.terr-card { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.terr-card__thumb {
  flex: 0 0 auto; width: 120px; height: 72px; border-radius: var(--radius);
  overflow: hidden; background: var(--c-field); border: 1px solid var(--c-border);
  display: block;
}
.terr-card__img, .terr-card__silhouette, .terr-thumb__svg {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.terr-thumb__bg { fill: var(--c-field); }
.terr-thumb__generic { fill: none; stroke: var(--c-text-muted); stroke-width: 2; stroke-linejoin: round; }
.terr-card__body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 10rem; min-width: 0; }
.terr-card__sub { font-size: var(--fs-sm); }

/* Checklist PANNEAUX (CE4.4) — un aide-memoire, jamais une alerte : aucune couleur de danger, aucun
   badge criard. La marque de lecture seule (chasseur) est un signe, pas une case grisee. */
.panel-checklist { margin-top: var(--sp-3); }
.panel-list { list-style: none; margin: var(--sp-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.panel-item { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.panel-item__mark { font-weight: 800; width: 1.25em; text-align: center; color: var(--c-text-muted); }

/* Tuiles de choix du type a l'ajout : grandes, une decision par ecran. */
.type-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-3); }
.type-tile {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 96px; padding: var(--sp-4);
  background: var(--c-surface); border: 2px solid var(--c-border); border-radius: var(--radius);
  font-family: var(--font-title); font-weight: 700; font-size: var(--fs-lg);
  color: inherit; text-decoration: none;
}
.type-tile:hover, .type-tile:focus-visible { border-color: var(--c-primary); }

/* Critères de mot de passe cochés en direct (décision 2026-07-22). Discret au repos, lisible en
   texte agrandi — aucune taille sous 16 px (contrainte U5.1). */
.pwd-rules__box { margin: var(--sp-2) 0; }
.pwd-rules { list-style: none; margin: var(--sp-1) 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pwd-rule { display: flex; align-items: center; gap: var(--sp-2); color: var(--c-text-muted); }
.pwd-rule--ok { color: var(--c-text); }
.pwd-rule__mark { font-weight: 800; width: 1.25em; text-align: center; }
.pwd-rule--ok .pwd-rule__mark { color: var(--c-primary); }

/* ── « Signaler un point » : la remontée d'observations (train TERRAIN.4) ─────────────────────── */
/* Un objet SIGNALÉ par un chasseur se distingue de l'équipement installé par la société : anneau
   TIRETÉ autour du disque. Jamais la couleur seule (U5.1) — le type garde exactement sa teinte et
   sa silhouette, sinon on ne saurait plus lire de quoi il s'agit. */
.poste-pin--reported .poste-pin__disc { outline: 3px dashed var(--c-accent); outline-offset: 2px; }
.obs-types { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.obs-type { flex: 1 1 45%; min-height: var(--tap-min); }
.obs-type--chosen { background: var(--c-accent); color: var(--c-text-inverse); border-color: transparent; font-weight: 700; }
.chip--reported { background: var(--c-accent); color: var(--c-text-inverse); }
.fiche-attribution { margin: 0 0 var(--sp-2); display: flex; flex-wrap: wrap; gap: var(--sp-1); align-items: center; }
.fiche-reports { margin-top: var(--sp-3); border-top: 1px solid var(--c-border); padding-top: var(--sp-2); }
.fiche-report { padding: var(--sp-2) 0; border-bottom: 1px solid var(--c-border); }
.fiche-report--handled { opacity: .7; }

/* ── Avis d'application (hotfix HOTFIX-IDB.1) ─────────────────────────────────────────────────
   Posé sur <body>, donc affichable AVANT que l'app soit montée — c'est précisément le moment où
   l'ouverture de la base peut coincer. Au-dessus de tout (rang des toasts), mais en HAUT : un
   bandeau de bas d'écran serait masqué par la barre d'onglets sur mobile. */
.app-notice {
  position: fixed; top: 0; left: 0; right: 0; z-index: 400;
  display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; justify-content: center;
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-surface); color: var(--c-text);
  border-bottom: 3px solid var(--c-accent);
  box-shadow: 0 2px 12px rgb(0 0 0 / 35%);
}
/* L'attente et la nouvelle version se distinguent par le LISERÉ **et** par le texte, jamais par la
   seule couleur (U5.1). */
.app-notice--blocked { border-bottom-color: var(--c-danger-line); }
/* Nouvelle version du code : liseré d'accent (le défaut) — c'est une bonne nouvelle, pas une alerte. */
.app-notice--sw-update { border-bottom-color: var(--c-accent); }
/* Échéance d'essai ou de licence (LICENCE.2) : liseré « avertissement » — discret (soft) quand
   l'échéance est loin, appuyé (strong) quand elle est là ou passée. Le texte le dit aussi (U5.1). */
.app-notice--license { border-bottom-color: var(--c-warn-ink); }
.app-notice--license.app-notice--soft { border-bottom-width: 2px; font-weight: 500; }
.app-notice--license.app-notice--strong { background: var(--c-warn-bg); color: var(--c-warn-ink); }
.app-notice__msg { margin: 0; max-width: 60ch; font-weight: 600; }
.app-notice__action { min-height: var(--tap-min); }
@media print { .app-notice { display: none; } }

/* GUIDE.2.2 : « Moi », une ligne par entrée, pleine largeur, cible tactile d'au moins 48 px.
   Le libellé à gauche, le détail (« 2 animaux ») discret à droite, un chevron pour dire « ça s'ouvre ». */
.moi-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  min-height: max(48px, var(--tap-min)); padding: var(--sp-2) 0; border-bottom: 1px solid var(--c-border);
  text-decoration: none; color: inherit; font-weight: 600; }
.moi-row:last-child { border-bottom: 0; }
.moi-row::after { content: '\203A'; color: var(--c-text-muted); font-weight: 400; }
.moi-row__label { flex: 1 1 auto; }
.moi-row__detail { font-weight: 400; }
/* GUIDE.2.3 : premier lancement, trois choix empilés, pleine largeur. */
.welcome__choices { display: flex; flex-direction: column; gap: var(--sp-3); margin: var(--sp-3) 0; }
.welcome__choice { width: 100%; min-height: var(--tap-cta); justify-content: center; }
/* GUIDE.1.6 : envois en attente, une ligne par envoi, le geste à droite. */
.deferred-list { list-style: none; margin: var(--sp-2) 0; padding: 0; }
.deferred-list__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2);
  padding: var(--sp-2) 0; border-bottom: 1px solid var(--c-border); }
.deferred-list__item:last-child { border-bottom: 0; }
/* GUIDE.1.8 : la version de l'app, dernière ligne de Réglages / Moi › Aide. Discrète par la couleur,
   pas par la taille (elle doit se lire au téléphone, en recette). */
.app-version { color: var(--c-text-muted); margin: var(--sp-4) 0 var(--sp-2); }
/* ORGA-ALLEGE.1.2 : accueil guidé. Une tâche par ligne, son action à droite. */
.home-season { margin: 0 0 var(--sp-3); }
.home-tasks { list-style: none; margin: 0; padding: 0; }
.home-task { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--sp-2);
  min-height: var(--tap-min); padding: var(--sp-2) 0; border-bottom: 1px solid var(--c-border); }
.home-task:last-child { border-bottom: 0; }
.home-task__action { font-weight: 600; }
/* ORGA-ALLEGE.1.3 : la ligne d'état des documents de la fiche membre. */
.doc-states { display: flex; flex-wrap: wrap; gap: var(--sp-1) 0; align-items: center; }
.doc-state { white-space: nowrap; }
/* COMBO.1 : l'option courante se voit à la réouverture ; « OK » d'un choix multiple / d'une saisie libre. */
.combobox__row.is-current { font-weight: 700; color: var(--c-accent); }
.combobox__check { margin-right: var(--sp-2); }
.combobox__ok { width: 100%; min-height: max(48px, var(--tap-min)); margin-top: var(--sp-2); }

/* PLAN.1 — lignes TOUCHABLES d'une liste (une ligne = un bouton qui ouvre sa feuille) et leur
   équivalent en lecture. Même gabarit, pour que le rang member lise la même liste, sans geste. */
.tap-list { list-style: none; margin: 0 0 var(--sp-3); padding: 0; }
.tap-line, .read-line {
  display: block; width: 100%; min-height: var(--tap-min); padding: var(--sp-2) 0;
  border: none; border-bottom: 1px solid var(--c-border); background: transparent;
  color: var(--c-text); font: inherit; font-size: var(--fs-base); text-align: left;
}
.tap-line { cursor: pointer; }
.tap-line::after { content: '›'; float: right; color: var(--c-text-muted); }
/* F6 (DIRECTION-2.26) : une ligne qui COCHE (pointage de retour, arrivées, choix d'une feuille) ne porte pas le chevron :
   l'appui pointe la personne, il n'ouvre aucun écran. */
.tap-line[aria-pressed]::after, .tap-line--choice::after { content: none; }
.badge--pending { background: var(--c-warn-bg); color: var(--c-warn-ink); font-weight: 700; }
.phone-icon { display: inline-flex; vertical-align: middle; }
.btn .phone-icon { margin-right: var(--sp-1); }
.fin-return__tel .phone-icon { margin: 0; }
/* F2 : dans le complément d'un signalement, « Terminer » reste visible en bas, au-dessus de la barre d'onglets. */
.terrain__done-bar { position: sticky; bottom: var(--tabbar-h, 4.5rem); z-index: 5; background: var(--c-surface); padding: var(--sp-2) 0; margin-top: var(--sp-2); }
.tap-line--warn { background: var(--c-warn-bg); color: var(--c-warn-ink); font-weight: 600; padding-left: var(--sp-2); padding-right: var(--sp-2); }
/* Un geste rédigé comme un lien, mais qui agit sur la page (ouvrir une feuille) : un vrai bouton. */
.link-btn {
  background: none; border: none; padding: 0; min-height: var(--tap-min); cursor: pointer;
  font: inherit; color: var(--c-accent); font-weight: 600; text-align: left;
}
/* Geste destructeur dans une feuille : séparé des champs et de la rangée Fermer / Enregistrer. */
.sheet-danger { margin: var(--sp-4) 0; }

/* GUIDE.3.2 — Mon carnet en fil : la ligne de ce qui est dû, puis celle des quotas. */
.carnet-alert { margin: 0 0 var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius, 8px);
  background: var(--c-warn-bg); color: var(--c-warn-ink); font-weight: 600; }
.carnet-alert .link { color: inherit; text-decoration: underline; }
.carnet-quotas { margin: 0 0 var(--sp-3); font-weight: 600; }
a.tap-line { text-decoration: none; }

/* GUIDE.3.3 — sortie guidée : une question par écran, des réponses en gros boutons (CTA 56 px). */
.wizard-q { margin-bottom: var(--sp-3); }
.btn.wizard-choice { display: flex; width: 100%; min-height: var(--tap-cta); justify-content: center; margin-bottom: var(--sp-2); }
.wizard-dog { min-height: var(--tap-min); }
.wizard-done { font-size: var(--fs-lg, 1.25rem); font-weight: 700; margin: 0 0 var(--sp-3); }

/* CARTE HORS LIGNE (lot CARTE-HORS-LIGNE, CHL.4) : la ligne d'état du stock de tuiles (prête / partielle /
   absente — le MOT et la graisse portent l'état, jamais la couleur seule) et la barre de progression de la
   feuille de téléchargement. Tokens seulement, deux thèmes. */
.offline-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); }
.offline-line--ready { font-weight: 600; }
.offline-line .btn { min-height: var(--tap-min); }
.dl-progress { height: 10px; border-radius: var(--radius-pill); background: var(--c-surface-2); overflow: hidden; margin: var(--sp-2) 0; }
.dl-progress__bar { height: 100%; width: 0; background: var(--c-primary); transition: width .2s; }
.offline-sheet__layers { margin: 0 0 var(--sp-2); padding-left: 1.2em; }
.offline-sheet__weight { font-weight: 700; }
.offline-box:empty { display: none; } /* CHL.6 : la ligne de Ma battue n'occupe rien tant qu'elle n'a rien à dire */

/* AFFECTATION DEPUIS LA CARTE (lot AFFECT-CARTE, AFFECT.2) : l'état du poste par la FORME. Libre = disque
   CREUX à bord tireté (le type garde sa couleur, en bord et en picto) ; occupé = disque plein + coche en coin,
   étiquette = nom du chasseur. Jamais la couleur seule (U5.1). */
.poste-pin--free .poste-pin__disc { background: var(--c-surface); color: var(--pin-fill, var(--c-poste)); border: 3px dashed var(--pin-fill, var(--c-poste)); }
.poste-pin--free .poste-pin__label { background: var(--c-surface); color: var(--c-text); border-style: dashed; }
.poste-pin__check { position: absolute; right: -7px; top: -7px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--c-surface); color: var(--c-text); border: 2px solid var(--c-poste-ink); }
.map--z-small .poste-pin__check { display: none; }
/* La feuille : chaque nom est une cible ≥ 56 px (CTA), aucun champ ; la ligne de changement se déplie. */
.assign-line { min-height: var(--tap-cta); width: 100%; text-align: left; font: inherit; background: none; border: 0; color: inherit; display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); }
.assign-list .assign-line { border-bottom: 1px solid var(--c-border); }
.assign-count { font-weight: 700; margin: 0 0 var(--sp-2); }
.assign-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-2); }
.assign-chips .btn[aria-pressed="true"] { outline: 3px solid var(--c-accent); outline-offset: -3px; }
.toast--undo { display: flex; align-items: center; gap: var(--sp-3); }

/* AFFECT.3 : la légende « Postes : libre ou occupé » réemploie le marqueur réel, réduit. */
.legend-item__ico--pin { width: 26px; height: 26px; border: 0; background: none; overflow: visible; }
.legend-item__ico--pin .poste-pin { width: 26px; height: 26px; }
.legend-item__ico--pin .poste-pin__disc { width: 22px; height: 22px; }
.legend-item__ico--pin .poste-pin__disc .icon { width: 13px; height: 13px; }

/* ── INFORMATION DU PUBLIC (lot PUBLIC, PUB.5) ─────────────────────────────────────────────────── */
.public-url { word-break: break-all; }
.public-preview__zone .zone-svg { display: block; max-width: 320px; width: 100%; height: auto; border: 1px solid var(--c-border); border-radius: var(--radius-sm); }
.public-create { border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: var(--sp-3); margin: var(--sp-3) 0; display: grid; gap: var(--sp-2); }
.public-create__preview { margin: 0; }
.public-rename summary { min-height: var(--tap-min); padding: var(--sp-2) 0; cursor: pointer; }

/* ── DIRECTION AU ROND (lot T1) — cibles ≥ 56 px, un geste principal, le reste replié ──────────── */
.direction .direction__main .btn { width: 100%; min-height: var(--tap-cta); justify-content: center; }
.direction .tap-line.direction__line { min-height: var(--tap-cta); display: flex; align-items: center; gap: var(--sp-2); width: 100%; text-align: left; }
.direction .direction__line--done { background: var(--c-success-bg); }
.direction .direction__check { display: inline-flex; width: 1.5em; justify-content: center; font-weight: 700; }
.direction .direction__counts { margin: 0 0 var(--sp-2); }
.direction .direction__docs { list-style: none; padding: 0; margin: 0; }
.direction .direction__docs .read-line { min-height: var(--tap-min); display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.direction .direction__note-edit { display: grid; gap: var(--sp-2); margin-top: var(--sp-2); }
.direction .direction__map { height: 320px; margin: var(--sp-2) 0; }
.direction .direction__draw { padding-left: 0; list-style: none; }
.direction .direction__draw .read-line { min-height: var(--tap-min); display: flex; align-items: center; }
.direction .row .btn { min-height: var(--tap-cta); }

/* ── BANDEAU DU BUREAU (lot T1.3) — non bloquant, au-dessus du contenu ───────────────────────────── */
.bureau-notice { margin: var(--sp-2) var(--sp-4) 0; padding: var(--sp-3); border: 1px solid var(--c-border-strong); border-radius: var(--radius-sm); background: var(--c-surface-2); display: grid; gap: var(--sp-2); }
.bureau-notice--pending { border-color: var(--c-warn-ink); }
.bureau-notice__msg { margin: 0; }
.bureau-notice__row { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.bureau-notice__row .btn { min-height: var(--tap-min); }
@media (min-width: 1024px) { .bureau-notice { display: none; } }

/* ══════════════════════════════════════════════════════════════════════════════════════════════════
   LE BUREAU (lot BUREAU-1, décisions de Yannick du 16/11/2026)
   L'app organisateur est conçue pour le PC et la SOURIS ; la tablette sort du périmètre. La coquille
   porte `is-bureau` (index.html) : UN SEUL bandeau fixe en haut — marque, société, les neuf rubriques,
   état de connexion — et le CONTENU prend toute la largeur et toute la hauteur restantes, en suivant
   le redimensionnement de la fenêtre (demi-écran, plein écran). Fin de la colonne étroite centrée.
   Les règles ci-dessous sont SCOPÉES : l'app chasseur (même feuille, sans `is-bureau`) garde sa barre
   du bas et ses seuils. Aucun point de rupture nouveau (règle U3.1 : 640 et 1024 seulement).
   ══════════════════════════════════════════════════════════════════════════════════════════════════ */
.is-bureau { --header-h: 56px; }
.is-bureau #app { height: 100dvh; min-height: 0; }
.is-bureau .app-header {
  flex: 0 0 auto; height: auto; min-height: var(--header-h);
  gap: var(--sp-3); padding: 0 var(--sp-3);
  /* Fond de BARRE (pas le dégradé d'en-tête) : les onglets gardent les contrastes vérifiés de la
     barre de navigation (`--c-text-muted` / `--c-accent` sur `--c-nav`, tests d1-contrast). */
  background: var(--c-nav); color: var(--c-text);
  justify-content: flex-start; flex-wrap: wrap; /* sur une fenêtre très étroite, la rangée se plie au lieu de couper */
}
.is-bureau .app-header__brand-zone { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; flex: 0 1 auto; }
.is-bureau .brand__picto { width: 40px; height: 40px; }
.is-bureau .app-header__title { font-size: var(--fs-base); }
.is-bureau .app-header__structure {
  flex: 0 1 auto; text-align: left; font-size: var(--fs-base); max-width: 18rem; padding: 0 0 0 var(--sp-2);
  border-left: 1px solid var(--c-border);
}
.is-bureau .app-header__switch { width: auto; text-align: left; text-align-last: left; }
/* État de connexion : jamais coupé, jamais poussé hors du bandeau. */
.is-bureau .app-header__status-zone { display: flex; align-items: center; gap: var(--sp-2); flex: 0 0 auto; margin-left: auto; white-space: nowrap; }
.is-bureau .app-header__status .badge--net:not(.badge--offline) { display: inline-flex; }
/* Les neuf rubriques, DANS le bandeau : une rangée, icône à côté du libellé (hauteur réduite). Ce qui
   ne tient pas bascule dans « Plus » (mesure js/app.js), jamais sur deux lignes. */
.is-bureau .tabbar {
  position: static; order: 0; flex: 1 1 auto; min-width: 0; align-self: stretch;
  border: 0; background: transparent; padding: 0; justify-content: safe center; flex-wrap: nowrap;
  overflow-x: auto; overflow-y: hidden;
}
.is-bureau .tabbar a, .is-bureau .tabbar button {
  flex: 0 0 auto; flex-direction: row; gap: var(--sp-2);
  min-height: var(--header-h); padding: 0 var(--sp-3);
  border-top: 0; border-bottom: 3px solid transparent;
}
.is-bureau .tabbar a[aria-current='page'], .is-bureau .tabbar button[aria-current='page'] { border-top-color: transparent; border-bottom-color: var(--c-primary); }
.is-bureau .tabbar.tabbar--measuring a, .is-bureau .tabbar.tabbar--measuring button { flex: 0 0 auto; }
/* Le contenu : TOUT le reste de la fenêtre, défilant dans sa propre boîte (le bandeau ne bouge pas). */
.is-bureau .app-main {
  flex: 1 1 auto; min-height: 0; overflow: auto; order: 0;
  max-width: none; width: auto; margin: 0; padding: var(--sp-4) var(--sp-5);
}
/* Le bandeau est hors de la boîte qui défile : une cible de défilement n'a plus rien à dégager. */
.is-bureau .scroll-target { scroll-margin-top: var(--sp-3); }
.is-bureau .action-bar { bottom: 0; }
/* Un écran de CARTE (`.page--map`) prend la boîte entière, sans marge : la carte EST l'écran. */
.is-bureau .app-main:has(> .page--map) { padding: 0; overflow: hidden; }
.page--map { height: 100%; gap: 0; }
.page--map .map { flex: 1 1 auto; min-height: 0; margin: 0; border: 0; border-radius: 0; --map-avail: 100%; }
/* Sous-écran : la flèche « retour » est constante, à gauche du titre — le titre n'est écrit qu'une fois. */
.page__head { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin: 0 0 var(--sp-3); }
.page__head .page__title { margin: 0; }
.back-link {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--tap-min);
  padding: 0 var(--sp-3); border-radius: var(--radius-sm); border: 1px solid var(--c-border);
  color: var(--c-accent); text-decoration: none; font-weight: 600; background: var(--c-surface);
}
.back-link:hover, .back-link:focus-visible { border-color: var(--c-border-strong); text-decoration: none; }
.back-link__arrow { font-size: var(--fs-lg); line-height: 1; }

/* ── LA CARTE DU TERRITOIRE (BUREAU-1, groupe B) : UNE barre d'outils en haut de la carte ─────────
   Outils à gauche, guidage au milieu (« Étape suivante : … »), fonds et cadastre à droite. Rien n'est
   coupé : la barre se plie (flex-wrap). Pendant un mode (tracé, pose, mesure), les outils laissent la
   place au panneau du mode (consigne + raccourcis + Terminer / Abandonner). */
.map-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--c-border); background: var(--c-surface);
  flex: 0 0 auto;
}
.map-toolbar__tools, .map-toolbar__right { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.map-toolbar__right { margin-left: auto; }
.map-toolbar__right .map-base, .map-toolbar__right .map-over { margin-top: 0; box-shadow: none; }
.map-toolbar__guide { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); flex: 1 1 320px; min-width: 0; }
.map-toolbar__guide:empty { display: none; }
.map-toolbar__guide .terr-guide__text { font-weight: 600; }
/* HAUTEUR CONSTANTE (BUREAU-2, point 5) : le panneau de mode prend la LIGNE DES OUTILS (pleine largeur, comme eux),
   la rangée de droite (Légende, ⋯, fonds, cadastre) reste la seconde ligne — mesuré au banc : 123 px au repos, 123 px
   en mesure ; la version « sur la ligne des fonds » tombait à 73 px et la carte sautait. Aucun bandeau vide. */
.map-toolbar { min-height: calc(var(--tap-min) + 2 * var(--sp-2)); }
.map-toolbar__mode { flex: 1 1 100%; min-width: 0; }
.map-toolbar__mode .map-draw--inline { flex-wrap: nowrap; min-height: var(--tap-min); }
/* Le bouton du panneau de mode a la hauteur d'un OUTIL (48 px) : un bouton plein de 56 px faisait grandir la barre de 8 px. */
.map-toolbar__mode .map-draw--inline .btn { min-height: var(--tap-min); height: var(--tap-min); padding-top: 0; padding-bottom: 0; }
.map-toolbar__mode .map-draw--inline .draw-status { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.map-toolbar__mode .map-draw { width: auto; max-height: none; overflow: visible; box-shadow: none; border: 0; padding: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); }
.map-toolbar__mode .map-draw .btn { width: auto; }
.map-toolbar__mode .map-draw__row { flex: 0 0 auto; gap: var(--sp-2); }
.map-toolbar__mode .draw-shortcuts { margin: 0; flex: 1 1 100%; order: 3; }
.map-tool { min-height: var(--tap-min); border: 1px solid var(--c-border); background: var(--c-surface-2); color: var(--c-text); }
.map-tool[aria-pressed='true'] { background: var(--c-primary-soft); border-color: var(--c-primary); color: var(--c-accent); }
.map--placing { cursor: crosshair; }
/* OUTIL ACTIF (BUREAU-2, point 4) : pendant un dessin, une pose, une mesure ou une orientation, zones, postes,
   fenêtres de tir et étiquettes ne RÉPONDENT PLUS à la souris — le clic traverse jusqu'à la carte, donc à l'outil,
   partout. Restent saisissables : les sommets du tracé en cours (fermer sur le premier point, les déplacer) et le
   curseur de pose (qui ne capte rien de toute façon). L'éditeur de secteurs n'applique pas cette classe. */
.map--tool-active .leaflet-overlay-pane,
.map--tool-active .leaflet-tooltip-pane,
.map--tool-active .leaflet-marker-pane .leaflet-marker-icon:not(.traque-point) { pointer-events: none !important; }
.map--tool-active .leaflet-marker-pane .leaflet-marker-icon.traque-point { pointer-events: auto; }
.map--measuring { cursor: crosshair; }
/* L'icône du type SUIT le curseur pendant une pose en série (C16) : décalée pour ne pas cacher le point visé. */
.map-cursor { position: absolute; z-index: 650; pointer-events: none; transform: translate(14px, 14px); }
.map-cursor .poste-pin__disc { position: static; transform: none; width: 28px; height: 28px; }
.map-cursor .poste-pin__disc .icon { width: 17px; height: 17px; }
/* La boîte d'INFORMATIONS (coin bas-gauche) : état hors ligne, objets sans position, légendes repliées. */
.map-info { display: flex; flex-direction: column; gap: var(--sp-1); width: min(320px, 78vw); padding: var(--sp-2); border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); box-shadow: var(--shadow-lg); max-height: calc(var(--map-avail, 320px) - 20px); overflow-y: auto; }
.map-info .map-legend { margin-top: 0; }
.map-info .offline-line { margin: 0; }
/* PANNEAU « LÉGENDE » (BUREAU-2, point 7) : en coin de carte, à la demande, repliable, il ne masque pas la carte
   (étroit, borné en hauteur, défilant). Chaque légende est DÉPLIÉE ; une entrée par ligne, le libellé en ENTIER —
   le rendu coupé venait de la grille à deux colonnes de 140 px dans une boîte de 320. */
.map-legend-panel { width: max-content; max-width: min(360px, 70vw); max-height: min(60vh, 520px); overflow: auto; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); box-shadow: var(--shadow); }
.map-legend-panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.map-legend-panel__title { margin: 0; font-size: var(--fs-md); }
.map-legend-panel .map-legend { margin-top: 0; }
.map-legend-panel .map-legend__grid { grid-template-columns: 1fr; gap: var(--sp-1); }
.map-legend-panel .legend-item > span:last-child { white-space: nowrap; }
/* ÉTIQUETTES D'OBJETS NON TRONQUÉES au bureau (BUREAU-2, point 9) : « Panneau chasse en cours » en entier, et
   visibles à tout zoom (de loin, les postes se regroupent en pastilles : rien ne se chevauche). */
.is-bureau .poste-pin__label { max-width: none; overflow: visible; text-overflow: clip; }
.is-bureau .map--z-small .poste-pin__label { display: block; }
/* BARRE D'ÉCHELLE (BUREAU-2, point 10) : plus grande et contrastée, en bas à gauche. */
.is-bureau .leaflet-control-scale-line { font-size: var(--fs-sm); font-weight: 700; line-height: 1.3; padding: 3px 8px; color: #1a1a1a; background: rgba(255, 255, 255, 0.92); border: 2px solid #1a1a1a; border-top: none; }
.is-bureau .leaflet-left .leaflet-control-scale { margin-left: 10px; }
.is-bureau .leaflet-bottom .leaflet-control-scale { margin-bottom: 10px; }
/* ÉTIQUETTE PERMANENTE d'une zone (B11) : nom et surface, lisible sur photo aérienne, jamais sous 16 px. */
.leaflet-tooltip.zone-label {
  background: rgba(255, 255, 255, 0.88); color: #1a1a1a; border: 1px solid #1a1a1a; border-radius: var(--radius-sm);
  font-family: var(--font-title); font-weight: 700; font-size: var(--fs-sm); padding: 2px 8px; box-shadow: none;
}
.leaflet-tooltip.zone-label::before { display: none; }
.map--z-small .zone-label { display: none; } /* aux zooms larges, les étiquettes se masquent (B13) */
/* Étiquette de MESURE (B12) : même habillage, trait de la ligne pointillé. */
.leaflet-tooltip.measure-label { background: #1a1a1a; color: #fff; border: 0; border-radius: var(--radius-sm); font-weight: 700; font-size: var(--fs-sm); padding: 2px 8px; }
.leaflet-tooltip.measure-label::before { display: none; }
/* PASTILLE COMPTÉE (B13) : des postes regroupés à bas zoom. La FORME (disque plein, chiffre) la distingue d'un poste. */
.poste-cluster { background: none; border: 0; }
.poste-cluster__disc {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: 4px; border-radius: 50%;
  background: var(--c-poste); color: var(--c-poste-ink); border: 2px solid var(--c-poste-ink); box-shadow: 0 0 0 2px var(--c-poste-halo), var(--shadow);
  font-family: var(--font-title); font-weight: 800; font-size: var(--fs-sm);
}
/* Plus de CADRE DE SÉLECTION du navigateur autour d'un polygone cliqué (B11) : le focus clavier reste visible. */
.leaflet-container .leaflet-interactive:focus:not(:focus-visible) { outline: none; }
/* Menu du CLIC DROIT en LISTE VERTICALE avec pictogrammes (C15). */
.pose-menu__list { grid-template-columns: 1fr; }
.pose-menu__list .btn { gap: var(--sp-2); }
/* « ⋯ » : un menu discret pour les actions rares (E26 : supprimer ce territoire). */
.more-menu { position: relative; }
.more-menu__summary { list-style: none; min-width: var(--tap-min); font-size: var(--fs-lg); line-height: 1; }
.more-menu__summary::-webkit-details-marker { display: none; }
/* BUREAU-3.7 : `right: 0` n'est que le REPLI sans mise en page ; à l'ouverture, `dropdown.js` mesure et pose `left`
   (borné à la fenêtre, à gauche comme à droite) et `--up` quand la liste doit s'ouvrir vers le haut. */
.more-menu__list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 260px; max-width: calc(100vw - 16px); padding: var(--sp-2); background: var(--c-surface); border: 1px solid var(--c-border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); display: grid; gap: var(--sp-2); }
.more-menu__list--up { top: auto; bottom: calc(100% + 4px); }
.more-menu__hint { margin: 0; }
.empty-state { margin: 0 0 var(--sp-3); font-size: var(--fs-body-lg); }
/* FICHE EN PANNEAU LATÉRAL NON BLOQUANT (D20) : pas de voile — la carte reste claire et cliquable ; le
   panneau est docké à droite, sous le bandeau ; une croix de 48 px ferme (Échap aussi). */
.fiche-overlay--dock { background: transparent; pointer-events: none; align-items: stretch; justify-content: flex-end; top: var(--header-h); }
.fiche-overlay--dock .fiche-panel { pointer-events: auto; border-radius: 0; max-width: 420px; width: 100%; height: 100%; max-height: none; border-inline-start: 1px solid var(--c-border-strong); box-shadow: var(--shadow-lg); }
.fiche-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
.fiche-panel__head .fiche-panel__title { margin: 0; flex: 1 1 auto; min-width: 0; }
.fiche-close { flex: 0 0 auto; min-width: var(--tap-min); min-height: var(--tap-min); border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface-2); color: var(--c-text); font: inherit; font-size: var(--fs-xl); line-height: 1; cursor: pointer; }
.fiche-close:hover, .fiche-close:focus-visible { border-color: var(--c-border-strong); }
/* D21 — UN geste principal, puis les secondaires ; « ⋯ » porte les actions rares (supprimer). */
.fiche-actions { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-3); }
.fiche-actions > .btn--primary { width: 100%; justify-content: center; }
.fiche-actions__secondary { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.fiche-more { align-self: flex-end; }
.fiche-autosave { margin: calc(-1 * var(--sp-2)) 0 var(--sp-2); }
/* FENÊTRE CENTRÉE (B9) : la feuille `dialog` est une petite boîte, pas un panneau pleine hauteur. */
.fiche-overlay--dialog { align-items: center; justify-content: center; padding: var(--sp-4); }
.fiche-overlay--dialog .fiche-panel, .fiche-overlay.fiche-overlay--dialog .fiche-panel { border-radius: var(--radius); max-width: 460px; width: 100%; height: auto; max-height: 88vh; border: 1px solid var(--c-border-strong); }
.fiche-panel--dialog .sheet-actions { margin-top: var(--sp-2); }
/* ROSE DES VENTS (B14) dans un coin de la carte de battue : glyphe + valeur en clair. */
.wind-rose { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-2); border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); color: var(--c-text); box-shadow: 0 1px 4px rgb(0 0 0 / 35%); }
.wind-rose__glyph { display: inline-flex; color: var(--c-accent); }
.wind-rose__text { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
/* FENÊTRE DE TIR EN DEUX CLICS (C17) : pendant l'orientation, l'icône de pose se cache, le curseur dit « visez ». */
.map--orienting { cursor: crosshair; }
.map--orienting .map-cursor { display: none; }
/* POIGNÉES DE BORD (C17) : un petit carré sur chaque bord du secteur sélectionné, prise de 44 px, teinte du sens. */
.angle-edge { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: 0; cursor: ew-resize; }
.angle-edge__disc { display: block; width: 18px; height: 18px; border-radius: 4px; background: var(--c-handle-face); border: 3px solid var(--edge-ink, var(--c-handle-edge)); box-shadow: var(--shadow-lg); }
.leaflet-marker-draggable.angle-edge { cursor: ew-resize; }
/* Tracé en cours : sommets et contour NEUTRES (B10 : plus de brun-rouge pendant le dessin). */
.traque-point__dot { background: var(--c-primary); color: var(--c-text-inverse); }
.map--drawing { outline-color: var(--c-primary); }


/* ══════════════════════════════════════════════════════════════════════════════════════════════════
   LOT BUREAU-3 — fenêtres, modèle de formulaire unique, tableaux triables, pastilles (bureau PC)
   ══════════════════════════════════════════════════════════════════════════════════════════════════ */
/* FENÊTRE CENTRÉE (point 3) : largeur adaptée au contenu ET à la fenêtre du navigateur, défilement INTERNE
   (la tête et les actions restent visibles), titre + croix. */
.fiche-overlay--dialog .fiche-panel, .fiche-overlay.fiche-overlay--dialog .fiche-panel { display: flex; flex-direction: column; max-height: min(88vh, 900px); padding: var(--sp-5); }
/* Même spécificité (0,2,1) que la règle de base de la fenêtre, déclarées après : les tailles s'appliquent (BUREAU-3.6). */
.fiche-overlay--dialog.fiche-overlay--sm .fiche-panel { max-width: min(460px, 94vw); }
.fiche-overlay--dialog.fiche-overlay--md .fiche-panel { max-width: min(640px, 94vw); }
.fiche-overlay--dialog.fiche-overlay--lg .fiche-panel { max-width: min(820px, 94vw); }
.fiche-overlay--dialog.fiche-overlay--xl .fiche-panel { max-width: min(1040px, 94vw); }
.fiche-panel__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: var(--sp-1); }
/* BATTUE-1 (P1) : une fenêtre centrée S'AGRANDIT pour montrer une liste déroulante ouverte. La liste posée par-dessus
   (position absolue) faisait naître un ascenseur dans le corps de la fenêtre (constat : choix de la zone de chasse).
   Dans la fenêtre, elle prend sa place dans le flux ; et la fenêtre n'est bornée que par l'écran, pas par 900 px :
   aucun ascenseur interne pour un contenu qui tient à l'écran. Panneaux et feuilles du téléphone : inchangés. */
.fiche-panel--dialog .combobox__panel { position: static; margin-top: var(--sp-1); box-shadow: none; }
/* BATTUE-1 (A) : le territoire d’une battue sans zone, montré comme un fait, garde l’espace d’un champ. */
.battue-create__sans-zone .fiche-fact { margin-bottom: var(--sp-3); }
.fiche-overlay--dialog .fiche-panel, .fiche-overlay.fiche-overlay--dialog .fiche-panel { max-height: calc(100dvh - 2 * var(--sp-4)); }
.fiche-panel__desc { margin: calc(-1 * var(--sp-2)) 0 var(--sp-3); }
/* ACTIONS (point 8) : « Annuler » discret, puis UN principal, en bas à DROITE ; sur mobile elles remplissent. */
.sheet-actions { justify-content: flex-end; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--c-border); }
.sheet-actions > .btn { flex: 0 0 auto; }
/* En bottom-sheet (mobile), les actions remplissent la largeur ; en fenêtre centrée, non. Aucun point de rupture nouveau (règle U5.1b). */
.fiche-panel:not(.fiche-panel--dialog) .sheet-actions > .btn { flex: 1 1 auto; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: var(--sp-2); margin-top: var(--sp-4); }
.form-actions > .btn { flex: 0 0 auto; }

/* MODÈLE DE FORMULAIRE (points 6, 7) : blocs titrés, libellé au-dessus, largeur de champ nommée, deux colonnes. */
.form-block { border: 0; padding: 0; margin: 0 0 var(--sp-4); min-width: 0; }
.form-block + .form-block { padding-top: var(--sp-3); border-top: 1px solid var(--c-border); }
.form-block__title { padding: 0; margin: 0 0 var(--sp-2); font-family: var(--font-title); font-weight: 700; font-size: var(--fs-base); color: var(--c-text); }
.form-block__hint { margin: calc(-1 * var(--sp-1)) 0 var(--sp-3); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); column-gap: var(--sp-4); row-gap: 0; align-items: start; }
.form-grid > .field--span { grid-column: 1 / -1; }
.field--xs .input, .field--xs input, .field--xs select { max-width: 9rem; }
.field--sm .input, .field--sm input, .field--sm select { max-width: 13rem; }
.field--md .input, .field--md input, .field--md select { max-width: 22rem; }
.field--lg .input, .field--lg input, .field--lg select { max-width: 30rem; }
.field--full .input, .field--full input, .field--full select, .field--full textarea { max-width: none; }
.field__hint { margin: var(--sp-1) 0 0; }
.field__error { margin: var(--sp-1) 0 0; font-size: var(--fs-sm); font-weight: 600; color: var(--c-danger-text); }
.field--invalid .input, .field--invalid input, .field--invalid select, .field--invalid textarea { border-color: var(--c-danger-line); }
.is-bureau .field__label { color: var(--c-text); font-weight: 600; } /* libellé lisible : plus un gris de 500 */
.is-bureau .field { margin-bottom: var(--sp-3); }

/* PASTILLES D'ÉTAT de largeur FIXE (point 10). */
.chip--state { min-width: 7.5rem; justify-content: center; font-weight: 600; white-space: nowrap; }
.chip--muted { background: var(--c-surface-2); color: var(--c-text-muted); }

/* TABLEAU TRIABLE (point 9) : pleine largeur, en-têtes boutons, lignes cliquables, ligne courante marquée. */
.table-sortable__bar { display: flex; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-3); }
.table-sortable__search { max-width: 28rem; }
.table--sortable th { padding: 0; }
.table--sortable th.is-right, .table--sortable td.is-right { text-align: right; }
.th-sort { display: inline-flex; align-items: center; gap: var(--sp-1); width: 100%; min-height: var(--tap-min); padding: var(--sp-2) var(--sp-3); border: 0; background: none; color: var(--c-text-muted); font: inherit; font-size: var(--fs-sm); font-weight: 600; text-align: left; cursor: pointer; border-radius: var(--radius-sm); }
.th-sort:hover { color: var(--c-text); background: var(--c-surface-2); }
.th-sort.is-sorted { color: var(--c-text); }
.th-sort__arrow { opacity: .85; }
.table-sortable__row.is-clickable { cursor: pointer; }
.table-sortable__row.is-clickable:hover { background: var(--c-surface-2); }
.table-sortable__row.is-selected { background: var(--c-primary-soft); box-shadow: inset 3px 0 0 var(--c-accent); }
.table-sortable__row:focus-visible { outline: none; box-shadow: var(--focus-ring), inset 3px 0 0 var(--c-accent); }
.table--sortable td { font-size: var(--fs-base); vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* MEMBRES (BUREAU-3, points 9 à 14) : menu « Ajouter » à trois entrées expliquées, interrupteurs de documents,
   panneau droit de la fiche posé DANS la vue (position fixe : l'emplacement DOM n'importe pas). */
/* ÉCRAN MEMBRES (BUREAU-4.3) : en-tête sur UNE ligne (titre, recherche, « Ajouter… », raccourcis discrets à droite), page
   plafonnée à 1400 px et centrée, aucun vide entre l'en-tête et le tableau. */
.members-page { max-width: 1400px; width: 100%; margin-inline: auto; gap: var(--sp-3); }
.members-head { margin: 0; flex-wrap: wrap; row-gap: var(--sp-2); }
.members-head .page__title { margin: 0; margin-right: var(--sp-2); }
.members-head__search { flex: 1 1 18rem; max-width: 28rem; min-width: 12rem; }
.members-head .add-menu { flex: 0 0 auto; }
.members-head__right { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-left: auto; }
.members-head__link { font-weight: 600; text-decoration: none; }
.members-page .card { padding-top: var(--sp-3); }
.members-table .table-sortable { margin: 0; }
/* BATTUE-1 (P2) : fiche ouverte, les colonnes Téléphone et Courriel se retirent (elles sont dans la fiche) : la pastille la
   plus longue, « Suppression demandée », tient sur une ligne. (BUREAU-6 la laissait passer à la ligne.) */
.members-table .chip--state { white-space: nowrap; text-align: center; }
/* FENÊTRE « AJOUTER » (BUREAU-3.7) : trois CARTES cliquables, toute la carte est la cible (≥ 48 px), titre + une
   phrase. Elle remplace le menu déroulant qui sortait de l'écran sur un bouton posé au bord gauche. */
.choice-cards { display: grid; gap: var(--sp-3); }
.choice-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1); width: 100%; min-height: var(--tap-min);
  padding: var(--sp-3) var(--sp-4); text-align: left; cursor: pointer; font: inherit; color: var(--c-text);
  background: var(--c-surface-2); border: 1px solid var(--c-border-strong); border-radius: var(--radius);
}
.choice-card:hover { border-color: var(--c-primary); background: var(--c-primary-soft); }
.choice-card:focus-visible { outline: none; border-color: var(--c-primary); box-shadow: var(--focus-ring); }
.choice-card .icon-wrap { color: var(--c-accent); }
.choice-card__title { font-weight: 700; font-size: var(--fs-body-lg); }
.choice-card__hint { font-weight: 400; font-size: var(--fs-base); color: var(--c-text-muted); white-space: normal; }
.doc-switches { display: flex; flex-direction: column; gap: var(--sp-2); margin: var(--sp-3) 0; }
.doc-switch { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); padding: var(--sp-2) 0; border-top: 1px solid var(--c-border); }
.doc-switch__label { flex: 1 1 260px; margin: 0; }
.doc-switch__date { display: flex; align-items: center; gap: var(--sp-2); }
.doc-switch__date .field__label { margin: 0; white-space: nowrap; }
.doc-switch__date input { max-width: 11rem; }
.doc-create { padding: var(--sp-2) 0; border-top: 1px solid var(--c-border); }
.fiche-overlay--member .fiche-panel { max-width: 520px; }
/* BUREAU-3.6 : page décalée quand le panneau droit des membres est ouvert (le tableau reste lisible en entier). */
.page:has(> .fiche-overlay--member) { padding-right: calc(520px + var(--sp-4)); }
.fiche-overlay--member .card { padding: var(--sp-4); }

/* INVITATION (BUREAU-3, 16 bis) : deux choix en tête, remise avec QR code en grand, liste partagée. */
.invite-choice { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.invite-choice .btn[aria-pressed='true'] { background: var(--c-primary-soft); border-color: var(--c-primary); color: var(--c-accent); }
.qr-wrap--big { background: #fff; border-radius: var(--radius); padding: var(--sp-3); flex: 0 0 auto; align-self: flex-start; }
/* BUREAU-3.8 : la remise en deux colonnes dès que la place le permet (QR code à gauche, lien et gestes à droite). */
.invite-delivery { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: flex-start; }
/* BUREAU-4.2 : après un envoi par courriel, la ligne « Courriel envoyé à … » est l'information ; QR code et lien en secours. */
.invite-sent { margin: 0 0 var(--sp-3); font-size: var(--fs-body-lg); font-weight: 700; color: var(--c-text); }
.invite-sent::before { content: '✓'; display: inline-block; margin-right: var(--sp-2); color: var(--c-success-ink); }
.invite-fallback__title { margin: 0 0 var(--sp-2); font-size: var(--fs-base); color: var(--c-text-muted); font-weight: 600; }
.qr-wrap--small { background: #fff; border-radius: var(--radius-sm); padding: var(--sp-2); flex: 0 0 auto; align-self: flex-start; }
.invite-delivery--compact { gap: var(--sp-3); }
.invite-delivery__side { flex: 1 1 320px; min-width: 0; }
.invite-delivery__side .field { margin-bottom: var(--sp-2); }
.invite-delivery__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-2) 0 var(--sp-3); }
.invite-list-box { margin-top: var(--sp-2); }
/* BUREAU-3.8 : une phrase sous le choix, un seul champ « Qui invitez-vous ? », le pied porte « Invitations envoyées (n) » à gauche. */
.invite-explic { margin: 0 0 var(--sp-3); }
.sheet-actions__lead { margin-right: auto; display: flex; align-items: center; min-width: 0; }
.invitations-table th, .invitations-table td { white-space: nowrap; }
.invitations-table td:first-child { white-space: normal; }
.invitations-list__empty td { padding: var(--sp-3) var(--sp-2); }
.invitations-table td { vertical-align: middle; }
.invitations-list__who { font-weight: 600; }
.invitations-list__actions { white-space: nowrap; text-align: right; }
.invite-on-create { margin-top: var(--sp-2); }
.invite-on-create .checkbox { margin-bottom: 0; }

/* ── BUREAU-3.5 : Réglages en deux volets (familles à gauche, blocs à droite) ── */
.settings-layout { display: grid; grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: var(--sp-1); position: sticky; top: var(--sp-3); }
.settings-nav__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-1) var(--sp-2); min-height: var(--tap-min);
  padding: var(--sp-2) var(--sp-3); border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--c-text);
  font: inherit; text-align: left; cursor: pointer; }
.settings-nav__item > span:first-child { flex: 1 1 100%; }
.settings-nav__item:hover { background: var(--c-surface-2); }
.settings-nav__item[aria-current="true"] { background: var(--c-nav-active); color: var(--c-accent); font-weight: 700; border-color: var(--c-border); }
.settings-nav__item:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.settings-pane[hidden] { display: none; }
.settings-pane__title { margin: 0 0 var(--sp-3); }
.settings-alert { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }

/* NOM PROPOSÉ PAR LE CHASSEUR (BUREAU-5.1) : un bloc à trancher, dans la fiche et dans « À vérifier ». */
.name-claim { padding: var(--sp-3); border: 1px solid var(--c-border-strong); border-left: 4px solid var(--c-accent); border-radius: var(--radius-sm); background: var(--c-surface-2); margin-bottom: var(--sp-3); }
.name-claim__says { margin: 0 0 var(--sp-1); font-size: var(--fs-body-lg); }
.name-claim__hint { margin: 0 0 var(--sp-2); }
.name-claim__actions { gap: var(--sp-2); }

/* FICHE DU MEMBRE au bureau (BUREAU-5.3) : une LIGNE par document (nom, interrupteur, date, état), mention unique. */
.doc-lines { display: flex; flex-direction: column; margin: var(--sp-2) 0 0; }
/* BUREAU-6 (C1) : deux rangées au plus. 1re : le nom, l'état collé à sa droite, l'interrupteur « Présenté » au bout ; 2e : la date. */
.doc-line { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-1); padding: var(--sp-2) 0; border-top: 1px solid var(--c-border); }
.doc-line__row { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.doc-line__title { font-weight: 600; min-width: 0; }
.doc-line .chip--state { min-width: 0; flex: 0 1 auto; white-space: normal; text-align: center; }
.doc-line__switch { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 0 auto; cursor: pointer; white-space: nowrap; min-height: var(--tap-min); }
.doc-line__presented { font-size: var(--fs-base); }
.doc-line__date { display: flex; align-items: center; gap: var(--sp-2); margin: 0; }
.doc-line__date-label { color: var(--c-text-muted); font-size: var(--fs-base); white-space: nowrap; }
.doc-line__date input { max-width: 11rem; }
.doc-lines__mention { margin: var(--sp-2) 0 0; font-size: var(--fs-base); }
/* L'INTERRUPTEUR : une case native (clavier, lecteur d'écran, `role="switch"`) dessinée en bascule. */
input.switch { appearance: none; -webkit-appearance: none; width: 2.75rem; height: 1.5rem; margin: 0; border-radius: 1rem; background: var(--c-border-strong); border: 1px solid var(--c-border-strong); position: relative; cursor: pointer; flex: 0 0 auto; transition: background .15s; }
input.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: calc(1.5rem - 6px); height: calc(1.5rem - 6px); border-radius: 50%; background: #fff; transition: transform .15s; }
input.switch:checked { background: var(--c-primary); border-color: var(--c-primary); }
input.switch:checked::after { transform: translateX(1.25rem); }
input.switch:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.fiche-identity { margin: 0 0 var(--sp-2); }
/* Un lien habillé en bouton n'est pas souligné (« Modifier », raccourcis). */
a.btn, a.btn:hover { text-decoration: none; }

/* CHAMP MOT DE PASSE (correctif CONNEXION) : le champ et son bouton « Afficher » sur une ligne, bouton ≥ 44 px. */
/* CODE-6 (C2) : six cases pour le code à 6 chiffres ; chaque case est une cible large, le chiffre est grand. */
.code-input { display: flex; gap: var(--sp-2); width: 100%; max-width: 360px; }
.code-input__cell.input { flex: 1 1 0; min-width: 0; width: auto; padding: 0; text-align: center; font-size: 28px; font-weight: 700; min-height: var(--tap-cta); font-variant-numeric: tabular-nums; }
.qr-scanner { background: #000; border-radius: var(--radius, 8px); overflow: hidden; }
.qr-scanner__video { display: block; width: 100%; max-height: 60vh; object-fit: cover; }
.login-forgot { margin: var(--sp-3) 0 0; font-size: var(--fs-body-lg); }
.login-forgot .link { display: inline-block; min-height: var(--tap-min); line-height: var(--tap-min); }
.password-field { display: flex; align-items: center; gap: var(--sp-2); width: 100%; }
.password-field .input { flex: 1 1 auto; min-width: 0; }
.password-toggle { flex: 0 0 auto; min-width: var(--tap-min); padding: 0 var(--sp-2); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════════════════════════════════════
   LOT BATTUE-1, étape 2 — la page de la battue en trois temps (bureau)
   ══════════════════════════════════════════════════════════════════════════════════════════════════ */
/* B0 : largeur plafonnée et centrée ; en-tête sur une ligne (retour, titre, date et heure, météo, impressions à droite). */
.battue-page { max-width: 1200px; margin-inline: auto; }
.battue-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); }
.battue-head .page__title { margin: 0; }
.battue-head__when { font-weight: 600; }
.battue-head__weather { color: var(--c-text-muted); }
.battue-head__prints { display: flex; gap: var(--sp-2); margin-left: auto; }
/* Les trois temps : un titre chacun. */
.battue-temps { margin-top: var(--sp-5); }
.battue-temps__title { margin: 0 0 var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--c-border-strong); }
.battue-block { margin-bottom: var(--sp-4); }
.battue-block__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.battue-block__title { margin: 0; }
/* La mention discrète « Repris de la dernière battue » (condition 3 de Yannick). */
.battue-inherited { font-size: var(--fs-sm); color: var(--c-text-muted); font-style: italic; }
.battue-count { font-size: var(--fs-sm); color: var(--c-text-muted); font-weight: 600; }
.battue-zones { margin: var(--sp-3) 0; }
.battue-zones__list { margin: 0 0 var(--sp-2); padding-left: var(--sp-5); }
.battue-map { margin-top: var(--sp-3); }
.battue-map__title, .battue-public h4 { margin: 0 0 var(--sp-2); font-size: var(--fs-base); }
.battue-public { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--c-border); }
/* B2 : le tableau « Qui vient ». */
.who__tools { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-2); }
.who__search { flex: 1 1 16rem; max-width: 24rem; }
.who { width: 100%; }
.who__check { width: var(--tap-min); }
.who__check input { width: 24px; height: 24px; }
.who__flag { margin-left: var(--sp-2); }
.who__guest { margin-top: var(--sp-3); }
/* B4, B5, B9 : les replis de la page. */
.battue-fold { border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface); margin-bottom: var(--sp-4); }
.battue-fold__summary { min-height: var(--tap-min); padding: var(--sp-3) var(--sp-4); cursor: pointer; }
.battue-fold__title { font-weight: 700; }
.battue-fold__body { padding: 0 var(--sp-4) var(--sp-4); }
/* B6 : la barre d'envoi, collée en bas de l'écran tant que « Préparer » est visible. */
.invite-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--sp-2) var(--sp-4); padding: var(--sp-3) var(--sp-4); margin-top: var(--sp-3);
  background: var(--c-surface-2); border: 1px solid var(--c-border-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.invite-bar__state { margin: 0; }
.invite-bar__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-left: auto; }
/* INVITATION-1 (A5) : l'aperçu mis en forme, à la hauteur de son contenu (ajustée au chargement), jamais plus large que
   la fenêtre ; non interactif (les liens d'exemple ne mènent nulle part). */
.invite-preview-frame { display: block; width: 100%; min-height: 420px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: #f4f4f1; pointer-events: none; }
.invite-preview-subject { margin: 0 0 var(--sp-2); overflow-wrap: anywhere; }
.invite-preview { white-space: pre-wrap; font: inherit; background: var(--c-field); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: var(--sp-3); max-height: 50vh; overflow: auto; }
.invite-other { list-style: none; padding: 0; margin: 0 0 var(--sp-3); }
.invite-other li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: 1px solid var(--c-border); }
.invite-other__name { font-weight: 600; }
/* B7 : le bandeau « Prochaine étape ». */
.battue-next:not(:empty) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); border-radius: var(--radius); background: var(--c-primary-soft); }
.battue-next p { margin: 0; }
/* B8 : le jour de la battue. */
.battue-day__lead { font-weight: 600; }
.battue-direct { margin-top: var(--sp-3); }

/* BATTUE-1 finition — « Quand et où » compact, champs à hauteur automatique, cases au thème, en-tête sur une ligne. */
.battue-when { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.battue-summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin: var(--sp-2) 0 0; }
.battue-summary__label { font-weight: 700; }
.battue-block .battue-fold { margin: var(--sp-3) 0 0; }
.autosize { resize: none; overflow: hidden; field-sizing: content; min-height: 4.5em; }
.battue-page input[type="checkbox"] { accent-color: var(--c-primary); }
.battue-day__line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); }
.battue-day__line .battue-day__lead { margin: 0; }
/* En-tête du bureau sur UNE ligne à 1366 px : la marque se réduit au pictogramme (le nom de la société suit), des espacements
   plus serrés ; ce qui ne tient pas passe dans « Plus » (mesure de js/app.js), la pastille d'état reste sur la ligne. */
.is-bureau .app-header { flex-wrap: nowrap; }
.is-bureau .app-header__title { display: none; }
.is-bureau .tabbar a, .is-bureau .tabbar button { padding: 0 var(--sp-2); gap: var(--sp-1); }
.is-bureau .app-header__structure { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* « Qui vient » dans le premier écran à 1366 × 768 (finition, point 1) : résumés côte à côte, marges resserrées en tête. */
.battue-summaries { display: flex; flex-wrap: wrap; gap: 0 var(--sp-6); }
.battue-summaries .battue-summary { margin-top: var(--sp-2); }
.battue-page > .page__head { margin-bottom: var(--sp-2); }
.battue-page .battue-temps:first-of-type { margin-top: var(--sp-2); }
.battue-temps__title { font-size: var(--fs-lg); }
.battue-page .battue-block { padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); }
.battue-block__head { margin-bottom: var(--sp-2); }
.battue-next:not(:empty) { padding: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-3); }
.battue-block .battue-fold__summary { padding: var(--sp-2) var(--sp-3); }

/* ══════════════════════════════════════════════════════════════════════════════════════════════════
   LOT BATTUE-2 — assistant de création pas à pas, récapitulatif, « Refaire »
   ══════════════════════════════════════════════════════════════════════════════════════════════════ */
/* Un écran par question, sans défiler à 1366 × 768 : en-tête (retour, ligne d'étapes), question, contenu, pied. */
/* INVITATION-1 (B1) : la barre « Précédent / Étape n sur 5 / Suivant » SUIT le contenu de l'étape (plus collée au bas de la
   fenêtre sur un grand écran) ; entre la fin du contenu et la barre, l'espace est d'au plus --wizard-gap (28 px). À
   1366 × 768, chaque étape et sa barre tiennent dans l'écran (la carte et la liste « Qui vient » sont dimensionnées sur
   la hauteur de la fenêtre). */
.wizard { --wizard-gap: var(--sp-6); max-width: 1100px; margin-inline: auto; display: flex; flex-direction: column; }
.wizard-head { flex-wrap: nowrap; gap: var(--sp-4); }
.wizard-steps { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; margin: 0 0 0 auto; padding: 0; counter-reset: none; }
.wizard-steps__btn {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--tap-min); padding: 0 var(--sp-3);
  border: 1px solid var(--c-border); border-radius: 999px; background: var(--c-surface); color: var(--c-text-muted); font: inherit; cursor: pointer;
}
.wizard-steps__btn:disabled { cursor: default; opacity: .6; }
.wizard-steps__btn.is-done { color: var(--c-text); border-color: var(--c-primary); }
.wizard-steps__btn.is-current { color: var(--c-accent); border-color: var(--c-accent); font-weight: 700; }
.wizard-steps__btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.wizard-steps__num { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; height: 1.6em; border-radius: 999px; background: var(--c-surface-2); font-weight: 700; }
.wizard-question { margin: var(--sp-3) 0 var(--sp-3); font-size: var(--fs-xl, 1.5rem); }
.wizard-question:focus { outline: none; }
.wizard-body { flex: 0 0 auto; min-height: 0; }
.wizard-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) 0; margin-top: var(--wizard-gap); border-top: 1px solid var(--c-border); }
.wizard-foot__count { color: var(--c-text-muted); font-weight: 600; }
.wizard-when { max-width: 640px; }
.wizard-mode__line { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-2) 0; color: var(--c-text-muted); }
.wizard-reprise .battue-inherited { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: var(--sp-2) 0; }
/* Une liste longue défile DANS son cadre ; la page, elle, tient à l'écran. */
.wizard-scroll { max-height: calc(100dvh - 400px); min-height: 160px; overflow: auto; border: 1px solid var(--c-border); border-radius: var(--radius-sm); }
.wizard-scroll .who thead th { position: sticky; top: 0; background: var(--c-surface); z-index: 1; }
.wizard-map .map { height: calc(100dvh - 470px); min-height: 260px; }
.wizard-dialog .wizard-map .map { height: 52vh; }
.wizard-dialog .wizard-scroll { max-height: 55vh; }
/* LE RÉCAPITULATIF : une ligne par réglage, « Modifier » au bout. */
.recap { display: grid; gap: 0; }
.recap-line { display: grid; grid-template-columns: 11rem 1fr auto; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--c-border); }
.recap-line:last-child { border-bottom: 0; }
.recap-line__label { font-weight: 700; }
.recap-line__value { min-width: 0; overflow-wrap: anywhere; }
.battue-recap { padding-block: var(--sp-2); }
.battue-list__actions { flex-wrap: nowrap; justify-content: flex-end; gap: var(--sp-2); }
/* D2 : l'en-tête de la page — météo et éphéméride séparées ; Carnet et Émargement sur la ligne du titre. */
.battue-head { flex-wrap: nowrap; }
.battue-head__weather { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4); min-width: 0; }
.battue-head__prints { flex: 0 0 auto; flex-wrap: nowrap; }
/* BATTUE-2 — tenir à 1366 × 768 : rendez-vous compact (libellé et boutons sur une ligne), récapitulatif sur deux colonnes. */
.wizard-question { margin: var(--sp-2) 0; }
.wizard-head { margin-bottom: 0; }
.wizard-map > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--sp-4); align-items: end; }
.wizard-map > div > p, .wizard-map > div > .map { grid-column: 1 / -1; }
.wizard-map > div > .field { margin: var(--sp-2) 0 0; }
.wizard-map .map { height: calc(100dvh - 480px); min-height: 220px; margin: var(--sp-1) 0 0; }
/* Finition (point 2) : un bouton masqué l'est vraiment (le display de .btn l'emporterait sur l'attribut hidden). */
.is-bureau .btn[hidden] { display: none; }
.wizard-map > div > p { margin: 0 0 var(--sp-1); }
@media (min-width: 1024px) {
  .recap { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-6); }
  .recap-line:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}
.recap-line { grid-template-columns: 8.5rem minmax(0, 1fr) auto; padding: var(--sp-1) 0; }
/* D2 : à 1366 px, titre, date et heure restent d'un bloc ; la météo se raccourcit plutôt que de passer à la ligne. */
.battue-head .page__title, .battue-head__when { white-space: nowrap; }
/* Finition (point 10) : faute de place, l'éphéméride passe sur une 2e ligne, MASQUÉE (hauteur d'une ligne) : elle
   disparaît en entier, jamais coupée. La météo, première, peut seule se raccourcir. */
.battue-head__weather { flex: 1 1 auto; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.battue-head__weather > * { flex: 0 0 auto; }
/* INVITATION-1 (B2) : météo, vent, éphéméride : ce qui ne tient pas est masqué EN ENTIER (mesure au rendu,
   masquerEnTeteSiEtroit), jamais coupé ; aucun élément ne se raccourcit. */
.battue-head__weather [hidden] { display: none; }
.battue-head__weather .weather-line { display: inline-flex; white-space: nowrap; }
/* Finition (point 6) : au bureau, les cases à cocher prennent la couleur du thème partout, y compris l'étape 3 de
   l'assistant (l'app chasseur, qui partage cette feuille, ne change pas). */
.is-bureau input[type="checkbox"], .is-bureau input[type="radio"] { accent-color: var(--c-primary); }
/* Récapitulatif : la reprise sous le titre ; les manques en ambre ; la barre du bas de l'assistant. */
.recap-reprise { margin: 0 0 var(--sp-2); }
.recap-line__missing { font-weight: 600; }
.wizard-foot__next { display: flex; gap: var(--sp-2); align-items: center; justify-content: flex-end; }

/* ── URGENCE (DIRECTION-2.4) — app chasseur. Le bouton en haut à droite pendant une battue en cours : rouge, mot + signe,
   jamais le signe seul ; 48 px au moins (gants). Le nom de l'app se tait pour lui laisser la place à 390 px. */
.app-header--urgence .app-header__title { display: none; }
.urgence-btn {
  min-height: var(--tap-min); padding: 0 var(--sp-3); margin-left: var(--sp-2); flex: 0 0 auto;
  background: var(--c-danger); color: var(--c-danger-ink); border: 2px solid var(--c-danger-ink);
  font-weight: 700; display: inline-flex; align-items: center; gap: var(--sp-1);
}
.urgence-btn__mark { font-weight: 900; }
.urgence { display: flex; flex-direction: column; gap: var(--sp-3); }
.urgence__call {
  min-height: 64px; display: flex; align-items: center; justify-content: center; text-decoration: none;
  background: var(--c-danger); color: var(--c-danger-ink); border-color: transparent; font-size: var(--fs-lg); font-weight: 700;
}
.urgence__alert-only { min-height: var(--tap-cta); }
.urgence__coords { font-size: var(--fs-lg); margin: 0; }
.urgence__pos p { margin: 0 0 var(--sp-1); }
/* Le bandeau des alertes, sous l'en-tête, sur tous les écrans : collé en haut avec lui. */
/* Sous l'en-tête, collés avec lui : les alertes (DIRECTION-2.4) puis la bulle de message (DIRECTION-2.20, B1). */
.top-stack { position: sticky; top: var(--header-h); z-index: 9; }
.toast-slot:empty { display: none; }
.toast-slot { padding: var(--sp-2) var(--sp-4) 0; background: var(--c-bg); }
/* La bulle DANS la mise en page (B1) : elle ne passe plus par-dessus un bouton ni le pied d'une fenêtre. */
.toast.toast--inline { position: static; transform: none; left: auto; bottom: auto; top: auto; max-width: none; margin: 0 0 var(--sp-3); box-shadow: none; }
.alert-banner { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4); background: var(--c-danger); color: var(--c-danger-ink); }
.alert-banner__item { display: flex; flex-direction: column; gap: var(--sp-2); }
.alert-banner__text { margin: 0; }
.alert-banner__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.alert-banner .btn { min-height: var(--tap-min); background: var(--c-surface); color: var(--c-text); border-color: transparent; text-decoration: none; }

/* ── FIN DE BATTUE (DIRECTION-2.7 → 2.8) — pointage en ambre, bilan à compteurs (cibles de 56 px, gants) ── */
.fin-return__item--missing > .tap-line { border-left: 8px solid #c27a00; background: var(--c-warn-bg); color: var(--c-warn-ink); }
/* B7 : la ligne et son bouton téléphone côte à côte (56 px, gants). */
.fin-return__item { display: flex; align-items: stretch; gap: var(--sp-2); }
.fin-return__item > .tap-line { flex: 1 1 auto; min-width: 0; }
.fin-return__who { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1); min-width: 0; flex: 1 1 auto; }
.fin-return__name { font-weight: 700; overflow-wrap: anywhere; }
.fin-return__sub { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1); }
.fin-return__tel { flex: 0 0 auto; min-width: var(--tap-cta); min-height: var(--tap-cta); font-size: var(--fs-lg); text-decoration: none; }
/* B6 : le conducteur, nom sur une ligne puis le bouton. */
.direction__tracker { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.direction__tracker-name, .direction__tracker-label { margin: 0; }
.direction__tracker-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.direction__tracker-call { text-decoration: none; }
.fin-bilan { display: flex; flex-direction: column; gap: var(--sp-3); }
.fin-bilan__row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3); }
.fin-bilan__label { flex: 1 1 8rem; min-width: 0; font-weight: 700; }
.fin-bilan__ctl { display: inline-flex; align-items: center; gap: var(--sp-2); flex: 0 0 auto; white-space: nowrap; }
.fin-bilan__step { min-width: var(--tap-cta); min-height: var(--tap-cta); font-size: var(--fs-xl); font-weight: 800; justify-content: center; }
.fin-bilan__count { min-width: 3ch; text-align: center; font-size: var(--fs-xl); font-weight: 800; }
.fin-close__paper { font-weight: 700; }
/* Le jour de la battue vu du bureau (DIRECTION-2.9) — règle propre au bureau, sous .is-bureau. */
.is-bureau .suivi-alert--cancelled { color: var(--c-text-muted); }
.is-bureau .suivi-alert--active { font-weight: 700; }
/* B11 : « en cours » en rouge ; « vue par » et « annulée » en neutre. */
.is-bureau .suivi-alert__etat--active { background: var(--c-danger); color: var(--c-danger-ink); }
.is-bureau .suivi-alert__etat--seen, .is-bureau .suivi-alert__etat--cancelled { background: var(--c-surface-2); color: var(--c-text); }

/* ══ INSTALLATION-1 ═══════════════════════════════════════════════════════════════════════════════════════
   B4 : « Bureau », toujours visible à côté du nom de la société, jamais coupé (le nom, lui, peut se couper).
   B5 / C : les pages entières du bureau (téléphone, déménagement), au-dessus de tout, sur le fond de page. */
.is-bureau .app-header__lieu {
  flex: 0 0 auto; white-space: nowrap; overflow: visible;
  font-size: var(--fs-sm); font-weight: 700; color: var(--c-accent);
  padding: 2px var(--sp-2); border: 1px solid var(--c-accent); border-radius: var(--radius-pill);
}
.bureau-page {
  position: fixed; inset: 0; z-index: 900; overflow: auto;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-5) var(--sp-4); background: var(--c-bg); color: var(--c-text);
}
.bureau-page--move { z-index: 901; }
.bureau-page__box { width: 100%; max-width: 34rem; display: flex; flex-direction: column; gap: var(--sp-4); }
.bureau-page__title { margin: 0; font-family: var(--font-title); font-size: var(--fs-xl); line-height: 1.25; color: var(--c-text-strong); }
.bureau-page__title:focus { outline: none; }
.bureau-page__text { margin: 0; font-size: var(--fs-body-lg); color: var(--c-text); }
.bureau-page__ok { margin: 0; font-size: var(--fs-body-lg); font-weight: 700; color: var(--c-success-ink); }
.bureau-page__ok::before { content: '✓ '; }
.bureau-page__main { min-height: 64px; width: 100%; justify-content: center; font-size: var(--fs-body-lg); font-weight: 700; text-decoration: none; }
.bureau-page__list { margin: 0; padding-left: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); color: var(--c-text-muted); }
.bureau-page__secondary {
  align-self: center; min-height: var(--tap-min); padding: 0 var(--sp-3);
  background: none; border: 0; font: inherit; font-size: var(--fs-sm); color: var(--c-text-muted);
  text-decoration: underline; cursor: pointer;
}
.bureau-page__secondary:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
/* La zone de marque (picto, société bornée à 14rem, « Bureau ») ne se rétrécit plus : sinon, pendant la MESURE des onglets
   (js/app.js, largeur naturelle), elle cédait sa place, la mesure comptait un onglet de trop, et « Plus » sortait du bandeau. */
.is-bureau .app-header__brand-zone { flex-shrink: 0; }
