/* Compteur d'arbres — centre de contrôle.
   Palette vert forêt / gris, grands boutons, focus bien visible. Aucune ressource externe (polices du système). */

:root {
  --vert: #2e5e3e;
  --vert-fonce: #224a2f;
  --vert-moyen: #3f7a52;
  --vert-clair: #e7f1ea;
  --vert-tres-clair: #f2f8f4;
  --fond: #f2f4f3;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --texte: #1d2320;
  --texte-doux: #4f5752;
  --bordure: #d3dad6;
  --bordure-forte: #8c958f;
  --gris-clair: #e6eae8;
  --rouge: #b42318;
  --rouge-fond: #fdeceb;
  --orange: #9a4a00;
  --orange-fond: #fff3e0;
  --orange-bord: #f2b264;
  --bleu: #1d5fbf;
  --bleu-fond: #e9f1fd;
  --vert-ok: #1f7a3a;
  --vert-ok-fond: #e5f4e9;
  --focus: #1d4ed8;
  --ombre: 0 1px 2px rgba(16, 24, 20, 0.06), 0 2px 6px rgba(16, 24, 20, 0.07);
  --rayon: 10px;
  --h-entete: 58px;
  --police: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-mono: Consolas, "Cascadia Mono", "Courier New", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --vert: #3f7f55;
    --vert-fonce: #2e5e3e;
    --vert-moyen: #5d9b71;
    --vert-clair: #1f3326;
    --vert-tres-clair: #18241c;
    --fond: #121614;
    --surface: #1b211e;
    --surface-2: #212925;
    --texte: #e7ece9;
    --texte-doux: #b3bcb6;
    --bordure: #34403a;
    --bordure-forte: #6c7872;
    --gris-clair: #2a332e;
    --rouge: #ff8a80;
    --rouge-fond: #3a1e1c;
    --orange: #ffb766;
    --orange-fond: #3a2a14;
    --orange-bord: #8a5a1f;
    --bleu: #8ab4ff;
    --bleu-fond: #18263d;
    --vert-ok: #7fd897;
    --vert-ok-fond: #183522;
    --focus: #8ab4ff;
    --ombre: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }
body {
  margin: 0;
  font-family: var(--police);
  line-height: 1.5;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--vert-moyen); }
@media (prefers-color-scheme: light) { a { color: var(--vert); } }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.75em; }
code, pre { font-family: var(--police-mono); }
code { font-size: 0.95em; background: var(--gris-clair); padding: 1px 6px; border-radius: 4px; word-break: break-all; }

[hidden] { display: none !important; }   /* l'attribut « hidden » l'emporte toujours sur les styles */
.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.lien-evitement {
  position: absolute; left: -9999px; top: 8px; z-index: 5000; background: var(--surface); color: var(--texte);
  padding: 10px 16px; border-radius: 6px; font-weight: 600;
}
.lien-evitement:focus { left: 8px; }

.noscript { padding: 24px; font-size: 1.2rem; }

/* ---------------------------------------------------------------- en-tête */
.entete {
  position: sticky; top: 0; z-index: 2000;
  display: flex; align-items: center; gap: 28px;
  height: var(--h-entete); padding: 0 24px;
  background: #2e5e3e; color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.marque {
  display: flex; align-items: center; gap: 10px;
  color: #ffffff; text-decoration: none; font-weight: 700; font-size: 1.15rem; white-space: nowrap;
}
.navigation { display: flex; gap: 4px; flex-wrap: wrap; }
.navigation a {
  color: #ffffff; text-decoration: none; font-weight: 600;
  padding: 8px 14px; border-radius: 6px;
}
.navigation a:hover { background: rgba(255, 255, 255, 0.12); }
.navigation a[aria-current="page"] { background: rgba(255, 255, 255, 0.22); box-shadow: inset 0 -3px 0 #ffffff; }
.entete :focus-visible { outline-color: #ffd54a; }
.version { margin-left: auto; font-size: 0.85rem; opacity: 0.85; white-space: nowrap; }
/* Centre en ligne : « Mon compte » et « Se déconnecter », à droite, hors du menu qui défile (toujours visibles) */
.menu-compte { margin-left: auto; display: flex; gap: 4px; flex-shrink: 0; }
.menu-compte + .version { margin-left: 8px; }
.menu-compte a {
  color: #ffffff; text-decoration: none; font-weight: 600; white-space: nowrap;
  padding: 8px 12px; border-radius: 6px;
}
.menu-compte a:hover { background: rgba(255, 255, 255, 0.12); }
html[data-mode="serveur"] .navigation { min-width: 0; }

/* ------------------------------------------------------------- bandeaux */
.bandeau-connexion {
  position: sticky; top: var(--h-entete); z-index: 1900;
  background: var(--rouge); color: #ffffff; padding: 12px 24px; font-weight: 600;
}
.bandeau-connexion p { margin: 0; }
.bandeau-connexion .detail { font-weight: 400; }

.bandeau-erreurs {
  position: sticky; top: var(--h-entete); z-index: 1800;
  max-height: 55vh; overflow-y: auto;
}
.bandeau-erreurs:empty { display: none; }
.bandeau-erreurs > .erreur { margin: 10px 24px; box-shadow: var(--ombre); }

/* --------------------------------------------------------------- contenu */
.contenu { max-width: 1320px; margin: 0 auto; padding: 24px 24px 64px; outline: none; }
.contenu.large { max-width: none; padding: 16px 20px 48px; }

.chargement { color: var(--texte-doux); font-style: italic; }
.chargement::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid var(--bordure-forte); border-top-color: transparent; border-radius: 50%;
  animation: tourne 0.9s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }

.titre-page {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.titre-page h1 { margin-bottom: 4px; }
.sous-titre { color: var(--texte-doux); margin: 0; }
.h1-suite { font-weight: 400; color: var(--texte-doux); }

.fil-ariane { font-size: 0.95rem; color: var(--texte-doux); margin-bottom: 8px; }
.fil-ariane a { color: var(--texte-doux); }

.bloc {
  background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon);
  padding: 20px 22px; margin-bottom: 20px; box-shadow: var(--ombre);
}
.bloc > h2:first-child, .bloc > .entete-bloc:first-child { margin-top: 0; }
.entete-bloc { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.entete-bloc h2 { margin: 0; }
.bloc.secondaire { background: var(--surface-2); box-shadow: none; }

.grille-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.grille-2 > .bloc { margin-bottom: 0; }
.pile > * + * { margin-top: 12px; }

.texte-doux { color: var(--texte-doux); }
.petit { font-size: 0.9rem; }
.grand-texte { font-size: 1.25rem; }
.nombre-fort { font-size: 1.6rem; font-weight: 700; }

/* --------------------------------------------------------------- boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 9px 18px;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  color: var(--vert); background: var(--surface);
  border: 2px solid var(--vert); border-radius: 8px;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background-color 0.12s, color 0.12s, box-shadow 0.12s;
}
@media (prefers-color-scheme: dark) { .bouton { color: var(--texte); border-color: var(--vert-moyen); } }
.bouton:hover:not(:disabled) { background: var(--vert-clair); }
.bouton.principal { background: var(--vert); color: #ffffff; border-color: var(--vert); }
.bouton.principal:hover:not(:disabled) { background: var(--vert-fonce); border-color: var(--vert-fonce); }
.bouton.grand { min-height: 52px; padding: 12px 24px; font-size: 1.1rem; }
.bouton.petit { min-height: 36px; padding: 5px 12px; font-size: 0.95rem; border-width: 1.5px; }
.bouton.discret { border-color: var(--bordure-forte); color: var(--texte); }
.bouton.danger { color: var(--rouge); border-color: var(--rouge); }
.bouton.danger:hover:not(:disabled) { background: var(--rouge-fond); }
.bouton.danger.principal { background: var(--rouge); color: #ffffff; }
@media (prefers-color-scheme: dark) { .bouton.danger.principal { color: #1b0c0b; } }
.bouton[aria-pressed="true"], .bouton.actif {
  background: var(--vert); color: #ffffff; border-color: var(--vert);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}
.bouton:disabled {
  cursor: not-allowed; color: var(--texte-doux); background: var(--gris-clair); border-color: var(--bordure);
  box-shadow: none;
}
.bouton.occupe { position: relative; color: transparent !important; }
.bouton.occupe::after {
  content: ""; position: absolute; width: 18px; height: 18px; left: calc(50% - 9px); top: calc(50% - 9px);
  border: 2.5px solid var(--texte-doux); border-top-color: transparent; border-radius: 50%;
  animation: tourne 0.8s linear infinite;
}
.bouton svg { flex: 0 0 auto; }
.bouton-lien {
  background: none; border: none; padding: 0; font: inherit; color: var(--vert-moyen); text-decoration: underline;
  cursor: pointer;
}
@media (prefers-color-scheme: light) { .bouton-lien { color: var(--vert); } }

.actions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-start; margin: 12px 0; }
.action { display: flex; flex-direction: column; gap: 4px; }
.raison { font-size: 0.9rem; color: var(--texte-doux); max-width: 320px; }
.raison:empty { display: none; }
.outils { display: flex; flex-direction: column; gap: 8px; }
.outils .bouton { justify-content: flex-start; width: 100%; }

/* ------------------------------------------------------------- pastilles */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.badge.ok { background: var(--vert-ok-fond); color: var(--vert-ok); border-color: color-mix(in srgb, var(--vert-ok) 30%, transparent); }
.badge.encours { background: var(--bleu-fond); color: var(--bleu); border-color: color-mix(in srgb, var(--bleu) 30%, transparent); }
.badge.attention { background: var(--orange-fond); color: var(--orange); border-color: var(--orange-bord); }
.badge.erreur { background: var(--rouge-fond); color: var(--rouge); border-color: color-mix(in srgb, var(--rouge) 35%, transparent); }
.badge.neutre { background: var(--gris-clair); color: var(--texte-doux); }

/* ---------------------------------------------------------- boîtes info */
.boite {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: 8px; padding: 12px 16px; margin: 12px 0;
  border: 1px solid var(--bordure); background: var(--surface-2);
}
.boite p:last-child, .boite ul:last-child { margin-bottom: 0; }
.boite ul { margin: 4px 0 0; padding-left: 20px; }
.boite-titre { font-weight: 700; margin-bottom: 4px; }
.boite-icone { flex: 0 0 auto; padding-top: 2px; }
.boite-contenu { flex: 1 1 auto; min-width: 0; }
.boite.info { background: var(--bleu-fond); border-color: color-mix(in srgb, var(--bleu) 30%, transparent); }
.boite.info .boite-icone { color: var(--bleu); }
.boite.attention { background: var(--orange-fond); border-color: var(--orange-bord); }
.boite.attention .boite-icone { color: var(--orange); }
.boite.succes { background: var(--vert-ok-fond); border-color: color-mix(in srgb, var(--vert-ok) 35%, transparent); }
.boite.succes .boite-icone { color: var(--vert-ok); }
.boite.erreur { background: var(--rouge-fond); border-color: color-mix(in srgb, var(--rouge) 40%, transparent); }
.boite.erreur .boite-icone { color: var(--rouge); }

/* Erreur détaillée de l'API : ce qui s'est passé / cause / que faire / détails */
.erreur {
  position: relative;
  background: var(--rouge-fond); border: 1px solid color-mix(in srgb, var(--rouge) 45%, transparent);
  border-left: 6px solid var(--rouge);
  border-radius: 8px; padding: 14px 44px 14px 16px; margin: 12px 0;
}
.erreur-titre { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--rouge); font-size: 1.05rem; margin-bottom: 6px; }
.erreur p { margin: 0 0 6px; }
.erreur details { margin-top: 6px; }
.erreur summary { cursor: pointer; color: var(--texte-doux); }
.erreur pre { white-space: pre-wrap; word-break: break-word; font-size: 0.85rem; background: var(--surface); padding: 8px 10px; border-radius: 6px; max-height: 240px; overflow: auto; }
.erreur-fermer {
  position: absolute; top: 8px; right: 8px; width: 32px; height: 32px;
  border: none; border-radius: 6px; background: transparent; color: var(--texte); font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.erreur-fermer:hover { background: rgba(0, 0, 0, 0.08); }

/* --------------------------------------------------------- notifications */
.notifications {
  position: fixed; right: 20px; bottom: 20px; z-index: 3000;
  display: flex; flex-direction: column; gap: 10px; max-width: min(440px, calc(100vw - 40px));
}
.notification {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface); color: var(--texte); border: 1px solid var(--bordure); border-left: 6px solid var(--vert);
  border-radius: 8px; padding: 12px 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  animation: apparait 0.18s ease-out;
}
.notification.erreur { border-left-color: var(--rouge); }
.notification.attention { border-left-color: var(--orange-bord); }
.notification.info { border-left-color: var(--bleu); }
.notification p { margin: 0; flex: 1; }
.notification button { border: none; background: none; font-size: 1.3rem; cursor: pointer; color: var(--texte-doux); line-height: 1; padding: 0 4px; }
@keyframes apparait { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ----------------------------------------------------------- dialogues */
dialog.dialogue {
  border: none; border-radius: 12px; padding: 24px 26px; max-width: 560px; width: calc(100vw - 40px);
  background: var(--surface); color: var(--texte); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
dialog.dialogue::backdrop { background: rgba(10, 20, 14, 0.5); }
dialog.dialogue h2 { margin-top: 0; }
dialog.dialogue .actions { justify-content: flex-end; margin-bottom: 0; margin-top: 20px; }

/* ------------------------------------------------------------- tableaux */
.defilement-horizontal { overflow-x: auto; }
.tableau { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tableau th, .tableau td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--bordure); vertical-align: middle; }
.tableau th { font-size: 0.9rem; color: var(--texte-doux); font-weight: 700; background: var(--surface-2); white-space: nowrap; }
.tableau td.nombre, .tableau th.nombre { text-align: right; white-space: nowrap; }
.tableau tr.cliquable { cursor: pointer; }
.tableau tr.cliquable:hover td { background: var(--vert-tres-clair); }
.tableau tr:last-child td { border-bottom: none; }
.tableau.compact th, .tableau.compact td { padding: 6px 8px; }
.tableau .ligne-meilleure td { background: var(--vert-ok-fond); font-weight: 600; }

.tache-mini { display: flex; flex-direction: column; gap: 4px; min-width: 180px; font-size: 0.9rem; }
.tache-mini .ligne { display: flex; justify-content: space-between; gap: 8px; }

/* --------------------------------------------------------- formulaires */
.formulaire { max-width: 860px; }
.champ { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.champ > label, .champ > .libelle, fieldset > legend { font-weight: 600; }
.champ .aide, .aide { font-size: 0.9rem; color: var(--texte-doux); margin: 0; }
.message-champ { font-size: 0.92rem; color: var(--rouge); font-weight: 600; margin: 0; }
.message-champ:empty { display: none; }
input[type="text"], input[type="date"], input[type="number"], select, textarea {
  font: inherit; color: var(--texte); background: var(--surface);
  border: 1.5px solid var(--bordure-forte); border-radius: 6px;
  padding: 8px 12px; min-height: 44px; width: 100%; max-width: 520px;
}
textarea { min-height: 70px; resize: vertical; }
input.court, select.court { max-width: 200px; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--rouge); box-shadow: 0 0 0 1px var(--rouge); }
input:disabled, select:disabled, textarea:disabled { background: var(--gris-clair); color: var(--texte-doux); }
fieldset { border: 1px solid var(--bordure); border-radius: 8px; padding: 14px 18px 6px; margin: 0 0 18px; }
fieldset > legend { padding: 0 6px; font-size: 1.05rem; }
.case { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; margin-right: 22px; }
.case input { width: 20px; height: 20px; accent-color: var(--vert); margin: 0; flex: 0 0 auto; }
.case.bloc-case { display: flex; margin-right: 0; }
.grille-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 24px; }
.avec-unite { display: flex; align-items: center; gap: 8px; }
.avec-unite input { max-width: 200px; }
.unite { color: var(--texte-doux); white-space: nowrap; }

.choix-profils { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-bottom: 12px; }
.choix-profil {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  border: 1.5px solid var(--bordure); border-radius: 8px; padding: 12px 14px; background: var(--surface);
}
.choix-profil:hover { border-color: var(--vert-moyen); }
.choix-profil:has(input:checked) { border-color: var(--vert); background: var(--vert-tres-clair); box-shadow: inset 0 0 0 1px var(--vert); }
.choix-profil input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--vert); flex: 0 0 auto; }
.choix-profil .nom { font-weight: 700; display: block; }
.choix-profil .desc { font-size: 0.92rem; color: var(--texte-doux); display: block; }

/* -------------------------------------------------------- progression */
.progression {
  position: relative; height: 12px; border-radius: 999px; background: var(--gris-clair); overflow: hidden;
  border: 1px solid var(--bordure);
}
.progression-barre { height: 100%; background: var(--vert-moyen); border-radius: 999px; transition: width 0.4s ease; }
.progression.active .progression-barre {
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.22) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0.22) 75%, transparent 75%, transparent);
  background-size: 20px 20px; animation: defile 1s linear infinite;
}
@keyframes defile { from { background-position: 0 0; } to { background-position: 20px 0; } }
@media (prefers-reduced-motion: reduce) {
  .progression.active .progression-barre, .chargement::before, .bouton.occupe::after { animation: none; }
}

/* ------------------------------------------------------ état système */
.etat-systeme .pastilles { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.pastille-etat {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--bordure);
}
.pastille-etat.ok svg { color: var(--vert-ok); }
.pastille-etat.attention { background: var(--orange-fond); border-color: var(--orange-bord); }
.pastille-etat.attention svg { color: var(--orange); }
.pastille-etat.erreur { background: var(--rouge-fond); }
.pastille-etat.erreur svg { color: var(--rouge); }
.titre-bloc { font-size: 1.1rem; }

.jauge { display: flex; flex-direction: column; gap: 6px; min-width: 260px; }
.jauge .progression { height: 14px; }
.jauge.attention .progression-barre { background: var(--orange-bord); }

/* ------------------------------------------------------- listes clés */
.cles { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.cles dt { color: var(--texte-doux); }
.cles dd { margin: 0; font-weight: 600; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 12px 0; }
.tuile { background: var(--surface-2); border: 1px solid var(--bordure); border-radius: 8px; padding: 12px 14px; }
.tuile .valeur { font-size: 1.45rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tuile .libelle { font-size: 0.9rem; color: var(--texte-doux); }
.tuile .complement { font-size: 0.85rem; color: var(--texte-doux); }

/* ------------------------------------------------------------ chemins */
.chemin {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface-2); border: 1.5px dashed var(--bordure-forte); border-radius: 8px; padding: 12px 14px;
}
.chemin code { background: none; padding: 0; font-size: 1.02rem; flex: 1 1 320px; }
.chemin.geant { padding: 20px; border-color: var(--vert); background: var(--vert-tres-clair); }
.chemin.geant code { font-size: 1.45rem; font-weight: 700; color: var(--texte); }

.etapes-guide { padding-left: 22px; }
.etapes-guide li { margin-bottom: 6px; }

/* ---------------------------------------------------------- mission */
.meta-mission { color: var(--texte-doux); margin: 4px 0 0; }
.notes-mission { white-space: pre-wrap; }

.onglets-etapes { margin: 6px 0 14px; }
.onglets-etapes ol {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px;
}
.onglet {
  display: flex; align-items: center; gap: 10px; height: 100%;
  padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--texte);
  background: var(--surface); border: 1.5px solid var(--bordure);
}
.onglet:hover { border-color: var(--vert-moyen); }
.onglet.actif { border-color: var(--vert); box-shadow: inset 0 -4px 0 var(--vert); background: var(--vert-tres-clair); }
.onglet-num {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; background: var(--gris-clair); color: var(--texte-doux); border: 2px solid var(--bordure-forte);
}
.onglet.ok .onglet-num { background: var(--vert-ok-fond); color: var(--vert-ok); border-color: var(--vert-ok); }
.onglet.encours .onglet-num { background: var(--bleu-fond); color: var(--bleu); border-color: var(--bleu); }
.onglet.attention .onglet-num { background: var(--orange-fond); color: var(--orange); border-color: var(--orange-bord); }
.onglet.erreur .onglet-num { background: var(--rouge-fond); color: var(--rouge); border-color: var(--rouge); }
.onglet-texte { display: flex; flex-direction: column; min-width: 0; }
.onglet-titre { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.onglet-statut { font-size: 0.82rem; color: var(--texte-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bandeau-tache {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--bleu-fond); border: 1px solid color-mix(in srgb, var(--bleu) 35%, transparent);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 14px;
}
.bandeau-tache .progression { flex: 1 1 220px; min-width: 160px; }
.bandeau-tache .libelle-tache { font-weight: 700; }
.bandeau-tache .message-tache { color: var(--texte-doux); flex: 1 1 100%; font-size: 0.92rem; }
.bandeau-tache.echec { background: transparent; border: none; padding: 0; display: block; }

.corps-mission { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.corps-mission.mode-carte { grid-template-columns: minmax(0, 1fr); }
.colonne-principale { min-width: 0; }
@media (max-width: 1250px) {
  .corps-mission { grid-template-columns: minmax(0, 1fr); }
}

.panneau-traitements h2 { font-size: 1.15rem; }
.tache-active { border: 1px solid var(--bordure); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; background: var(--surface-2); }
.tache-active .entete-tache { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.tache-active .titre-tache { font-weight: 700; }
.ligne-progression { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.ligne-progression .progression { flex: 1; }
.ligne-progression .pct { font-weight: 700; min-width: 3.5em; text-align: right; font-variant-numeric: tabular-nums; }
.journal {
  margin: 10px 0 0; padding: 10px 12px; height: 260px; overflow: auto; resize: vertical;
  background: #101512; color: #d6e2da; border-radius: 6px; font-size: 0.82rem; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word;
}
.journal.court { height: 180px; }
.historique-taches details { border-bottom: 1px solid var(--bordure); padding: 8px 0; }
.historique-taches details:last-child { border-bottom: none; }
.historique-taches summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; list-style: none; }
.historique-taches summary::-webkit-details-marker { display: none; }
.historique-taches summary::before { content: "▸"; color: var(--texte-doux); width: 1em; }
.historique-taches details[open] summary::before { content: "▾"; }
.historique-taches .titre-tache { font-weight: 600; flex: 1 1 auto; }
.historique-taches .quand { font-size: 0.85rem; color: var(--texte-doux); flex: 1 1 100%; padding-left: 1.4em; }
.historique-taches .corps-details { padding: 6px 0 4px 1.4em; }

.reglages-mission { margin-top: 10px; }

/* --------------------------------------------------------- vue carte */
.vue-carte {
  display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 16px;
  height: max(500px, calc(100vh - 250px));
}
.vue-carte[hidden] { display: none; }
.panneau-carte {
  overflow-y: auto; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon);
  padding: 16px; box-shadow: var(--ombre);
}
.panneau-carte h2 { font-size: 1.15rem; }
.panneau-carte h3 { font-size: 1rem; margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--bordure); }
.panneau-carte .boite { margin: 10px 0; padding: 10px 12px; font-size: 0.95rem; }
.panneau-carte .actions { margin: 8px 0; }
.zone-carte { position: relative; min-width: 0; min-height: 0; border-radius: var(--rayon); overflow: hidden; border: 1px solid var(--bordure); }
.carte-leaflet { position: absolute; inset: 0; background: #d9dfdb; }
@media (prefers-color-scheme: dark) { .carte-leaflet { background: #26302b; } }
.carte-indisponible, .carte-chargement {
  position: absolute; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
.carte-chargement { background: transparent; pointer-events: none; place-items: start center; padding-top: 14px; }
.carte-chargement span {
  background: var(--surface); padding: 8px 16px; border-radius: 999px; box-shadow: var(--ombre); font-weight: 600;
}
.carte-indisponible > div { max-width: 520px; }
.carte-indisponible[hidden], .carte-chargement[hidden] { display: none; }
.bandeau-mode {
  position: absolute; z-index: 1050; top: 12px; left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 140px); display: flex; align-items: center; gap: 12px;
  background: #1d2a22; color: #ffffff; padding: 8px 10px 8px 16px; border-radius: 10px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  font-size: 0.95rem;
}
.bandeau-mode[hidden] { display: none; }
.bandeau-mode .bouton { min-height: 34px; padding: 4px 12px; background: #ffffff; color: #1d2a22; border-color: #ffffff; flex: 0 0 auto; }
.compteurs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.compteur { background: var(--surface-2); border: 1px solid var(--bordure); border-radius: 8px; padding: 8px 10px; }
.compteur .valeur { font-size: 1.35rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.compteur .libelle { font-size: 0.85rem; color: var(--texte-doux); }
.compteur.principal { grid-column: 1 / -1; background: var(--vert-tres-clair); border-color: var(--vert-moyen); }
.compteur.principal .valeur { font-size: 1.9rem; color: var(--vert-ok); }
.selecteur-variante { display: flex; gap: 0; margin-bottom: 12px; border: 1.5px solid var(--vert); border-radius: 8px; overflow: hidden; }
.selecteur-variante button {
  flex: 1; min-height: 40px; border: none; background: var(--surface); color: var(--texte); font: inherit; font-weight: 600; cursor: pointer;
}
.selecteur-variante button + button { border-left: 1.5px solid var(--vert); }
.selecteur-variante button[aria-pressed="true"] { background: var(--vert); color: #ffffff; }
/* Carte du domaine : numéros des parcelles et liste du panneau */
.etiquette-parcelle { background: none; border: none; }
.etiquette-parcelle span {
  display: inline-block; transform: translate(-50%, -50%); white-space: nowrap;
  font-weight: 800; font-size: 15px; line-height: 1.2; padding: 2px 8px; border-radius: 8px;
  background: rgba(10, 14, 12, 0.62); border: 2px solid currentColor; text-shadow: 0 0 3px #000000; cursor: pointer;
}
.liste-parcelles-domaine { list-style: none; margin: 0; padding: 0; }
.liste-parcelles-domaine li { padding: 8px 0; border-top: 1px solid var(--bordure); }
.liste-parcelles-domaine li:first-child { border-top: none; }
.liste-parcelles-domaine .case { min-height: 32px; margin-right: 0; }
.liste-parcelles-domaine .details-parcelle { padding-left: 30px; }
.liste-parcelles-domaine select { max-width: 100%; margin: 2px 0; }
.pastille-parcelle { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 3px solid; flex: 0 0 auto; }
.legende { list-style: none; padding: 0; margin: 6px 0; font-size: 0.92rem; }
.legende li { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.legende .symbole { width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto; border: 1.5px solid #ffffff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
.legende .symbole.trait { border-radius: 2px; height: 6px; width: 22px; border: none; box-shadow: none; }
.legende .symbole.pointilles { border-radius: 0; height: 0; width: 22px; border: none; border-top: 3px dashed #e0b800; box-shadow: none; }
.legende .symbole.pointilles-blancs { border-radius: 0; height: 0; width: 22px; border: none; border-top: 3px dotted #8a8a8a; box-shadow: none; }
.degrade-chm {
  height: 12px; border-radius: 4px; margin: 6px 0 2px;
  background: linear-gradient(to right, #440154, #482878, #3e4989, #31688e, #26828e, #1f9e89, #35b779, #6ece58, #b5de2b, #fde725);
}
.bornes-chm { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--texte-doux); }
.curseur { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px 30px; }
.curseur input[type="range"] { flex: 1; accent-color: var(--vert); min-height: 32px; }
.curseur output { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
.etat-enregistrement { font-weight: 600; margin: 8px 0; }
.etat-enregistrement.modifie { color: var(--orange); }
.etat-enregistrement.ok { color: var(--vert-ok); }

/* Curseurs de la carte selon l'outil actif */
.mode-ajouter-arbre .leaflet-container, .mode-ajouter-arbre .leaflet-interactive,
.mode-compter .leaflet-container, .mode-compter .leaflet-interactive { cursor: crosshair !important; }
.mode-supprimer-arbre .leaflet-interactive { cursor: not-allowed !important; }
.mode-supprimer-trace .leaflet-interactive, .mode-supprimer-zone .leaflet-interactive { cursor: not-allowed !important; }

/* Infobulles et menus sur la carte */
.leaflet-container { font-family: var(--police); font-size: 0.95rem; }
/* pas de cadre de focus autour d'une surface cliquée (zone, contour) : seuls les boutons de la carte en ont un */
.carte-leaflet path.leaflet-interactive:focus, .carte-leaflet path.leaflet-interactive:focus-visible { outline: none; }
.leaflet-tooltip.infobulle-arbre { font-size: 0.9rem; padding: 4px 8px; }
.popup-arbre .popup-titre, .menu-arbre .popup-titre { font-weight: 700; font-size: 1rem; margin: 0 0 6px; }
.popup-arbre dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 0; }
.popup-arbre dt { color: #555; }
.popup-arbre dd { margin: 0; font-weight: 600; }
.menu-arbre .menu-libelle { margin: 8px 0 4px; font-weight: 600; color: #444; }
.menu-arbre .menu-choix { display: flex; flex-wrap: wrap; gap: 6px; }
.menu-arbre .bouton { color: #2e5e3e; background: #ffffff; border-color: #2e5e3e; }
.menu-arbre .bouton.actif, .menu-arbre .bouton[aria-pressed="true"] { background: #2e5e3e; color: #ffffff; }
.leaflet-popup-content { margin: 12px 14px; }

/* ----------------------------------------------------------- rapport */
.liste-fichiers { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.liste-fichiers li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--bordure); border-radius: 8px; background: var(--surface-2); }
.liste-fichiers .infos { flex: 1; min-width: 0; }
.liste-fichiers .nom { font-weight: 700; display: block; }
.liste-fichiers .desc { font-size: 0.9rem; color: var(--texte-doux); }
.apercu-rapport { width: 100%; height: 80vh; min-height: 520px; border: 1px solid var(--bordure); border-radius: 8px; background: #ffffff; }

/* ------------------------------------------------------------ profils */
.carte-profil { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.carte-profil:hover { border-color: var(--vert-moyen); }
.carte-profil .nom { font-size: 1.15rem; font-weight: 700; color: var(--texte); }
.section-parametres { border-top: 1px solid var(--bordure); padding-top: 12px; margin-top: 12px; }
.section-parametres h3 { margin-bottom: 12px; }
.parametre { display: grid; grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 1fr); gap: 4px 20px; padding: 10px 12px; border-radius: 8px; align-items: center; }
.parametre:nth-child(even) { background: var(--surface-2); }
.parametre .libelle-parametre { font-weight: 600; }
.parametre .chemin-parametre { font-family: var(--police-mono); font-size: 0.8rem; color: var(--texte-doux); }
.parametre .bornes { font-size: 0.85rem; color: var(--texte-doux); }
.parametre.calibrable { background: var(--bleu-fond); border: 1px solid color-mix(in srgb, var(--bleu) 30%, transparent); }
.parametre.modifie-ici { box-shadow: inset 4px 0 0 var(--orange-bord); }
.parametre .controle { display: flex; flex-direction: column; gap: 4px; }
.parametre .message-champ { grid-column: 2; }
.parametre.difference-neige { box-shadow: inset 4px 0 0 var(--bleu); }
.barre-enregistrement {
  position: sticky; bottom: 0; z-index: 10; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border-top: 1px solid var(--bordure); padding: 12px 0; margin-top: 12px;
}

/* --------------------------------------------------------- utilitaires */
.separateur { border: none; border-top: 1px solid var(--bordure); margin: 18px 0; }
.liste-simple { margin: 6px 0; padding-left: 20px; }
.avertissement-doux { color: var(--orange); font-size: 0.92rem; }
.etiquette-neige { color: var(--bleu); font-weight: 600; white-space: nowrap; }

@media (max-width: 1100px) {
  .onglets-etapes ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vue-carte { grid-template-columns: minmax(0, 1fr); height: auto; }
  .zone-carte { height: 70vh; min-height: 420px; }
  .entete { gap: 14px; padding: 0 14px; }
}
@media (max-width: 700px) {
  .contenu { padding: 16px 12px 48px; }
  .onglets-etapes ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parametre { grid-template-columns: 1fr; }
  .parametre .message-champ { grid-column: 1; }
  .navigation a { padding: 6px 8px; }
  .version { display: none; }
  .menu-compte .se-deconnecter { display: none; }   /* (centre en ligne : dans « Mon compte ») */
}

/* =====================================================================================================
   Tablette et écran tactile (iPad, écran intérieur d'un téléphone pliant…)
   Classes posées sur <html> par l'interface : « tablette » (disposition : carte en plein écran, outils en tiroir)
   et « tactile » (cibles agrandies). Réglables dans la page Système (automatique / tablette / ordinateur).
   ===================================================================================================== */

/* Bouton du tiroir des outils : visible seulement en disposition tablette */
.bouton-panneau { display: none; }

html.tablette .entete { gap: 12px; padding: 0 10px; }
html.tablette .navigation { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
html.tablette .navigation::-webkit-scrollbar { display: none; }
html.tablette .navigation a { white-space: nowrap; padding: 8px 10px; }
html.tablette .marque span { display: none; }
html.tablette .version { display: none; }
html.tablette .menu-compte a { padding: 8px 10px; }
html.tablette .contenu { padding: 12px 12px 40px; max-width: none; }
html.tablette .contenu.large { max-width: none; }

/* Page d'une mission : en-tête et étapes compacts, pour laisser la place à la carte */
html.tablette .entete-mission h1 { font-size: 1.35rem; }
html.tablette .entete-mission .fil-ariane { margin-bottom: 2px; font-size: 0.9rem; }
html.tablette .onglets-etapes { margin: 4px 0 10px; }
html.tablette .onglets-etapes ol {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
html.tablette .onglets-etapes ol::-webkit-scrollbar { display: none; }
html.tablette .onglets-etapes li { flex: 0 0 auto; }
html.tablette .onglet { padding: 6px 10px; gap: 8px; min-width: 150px; }
html.tablette .onglet-num { width: 26px; height: 26px; }

/* Carte en plein écran, panneau d'outils en tiroir par-dessus la carte (hauteur calculée par l'interface) */
html.tablette .vue-carte {
  display: block; position: relative; grid-template-columns: none;
  height: calc(100dvh - 200px); min-height: 360px;
}
html.tablette .vue-carte[hidden] { display: none; }
html.tablette .zone-carte { position: absolute; inset: 0; height: auto; min-height: 0; }
html.tablette .panneau-carte {
  position: absolute; z-index: 1020; top: 10px; left: 10px; bottom: 10px;
  width: min(400px, calc(100% - 76px)); padding: 14px;
  transition: transform 0.25s ease, visibility 0.25s;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
html.tablette .vue-carte.panneau-ferme .panneau-carte { transform: translateX(calc(-100% - 24px)); visibility: hidden; }
html.tablette .bouton-panneau {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 16px; border-radius: 10px; border: none;
  background: #1d2a22; color: #ffffff; font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}
html.tablette .bouton-plein-ecran { min-height: 44px; padding: 8px 16px; }
html.tablette .vue-carte:not(.panneau-ferme) .leaflet-left .leaflet-control-zoom { display: none; } /* sous le tiroir */
html.tablette .bandeau-mode {
  top: auto; bottom: 14px; max-width: calc(100% - 24px); flex-wrap: wrap; justify-content: center;
}
html.tablette .bandeau-mode .boutons-mode { display: flex; flex-wrap: wrap; gap: 8px; }
.bandeau-mode .boutons-mode { display: inline-flex; gap: 8px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { html.tablette .panneau-carte { transition: none; } }
/* Écran étroit (portrait d'un petit appareil) : le tiroir prend toute la largeur */
@media (max-width: 600px) {
  html.tablette .panneau-carte { width: auto; right: 10px; }
}

/* Écran tactile : cibles d'au moins 44 à 48 px, champs en 16 px (sinon Safari zoome à chaque saisie) */
html.tactile .bouton { min-height: 48px; padding-left: 16px; padding-right: 16px; }
html.tactile .bouton.petit, html.tactile .bandeau-mode .bouton { min-height: 44px; }
html.tactile .case { min-height: 48px; }
html.tactile .case input { width: 26px; height: 26px; }
html.tactile input[type="text"], html.tactile input[type="date"], html.tactile input[type="number"],
html.tactile select, html.tactile textarea { font-size: 16px; min-height: 46px; }
html.tactile .selecteur-variante button { min-height: 48px; }
html.tactile .navigation a { padding: 12px 12px; }
html.tactile .leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 22px; }
html.tactile .curseur input[type="range"] { min-height: 44px; }
/* Sommets des tracés (Leaflet-Geoman) plus gros au doigt */
html.tactile .marker-icon { width: 22px !important; height: 22px !important; margin-left: -11px !important; margin-top: -11px !important; }
html.tactile .leaflet-tooltip { font-size: 1rem; }

/* ----------------------------------------------------------- envoi des photos */
.envoi-photos { margin: 12px 0; }
.depot-photos {
  border: 2px dashed var(--vert-moyen); border-radius: var(--rayon); padding: 16px 18px; background: var(--surface-2);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.depot-photos.survol { background: var(--vert-tres-clair); border-color: var(--vert); }
.depot-photos .depot-titre { font-weight: 700; font-size: 1.08rem; margin: 0 0 4px; }
.depot-photos .actions { margin-bottom: 0; }
.autre-methode { margin: 10px 0; }
.autre-methode summary { cursor: pointer; color: var(--texte-doux); }
/* Fenêtre « Paramètres du comptage » : plus large, et défilante sur un petit écran */
dialog.dialogue.dialogue-large { width: min(760px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); overflow: auto; }
.dialogue fieldset { border: 1px solid var(--bordure); border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; }

/* Vols et délimitations (0.6.0) */
.liste-delimitations { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.lien-delimitation {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--bordure); border-radius: 8px;
  color: inherit; text-decoration: none; background: var(--surface);
}
.lien-delimitation:hover { border-color: var(--vert-moyen); background: var(--vert-tres-clair); }
.lien-delimitation .pastille-parcelle { margin-top: 3px; }
.puces-delimitations { display: flex; flex-wrap: wrap; gap: 4px; }
.puce-delimitation {
  display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1.5px solid var(--vert-moyen);
  font-weight: 700; text-decoration: none; color: var(--texte); background: var(--surface); white-space: nowrap;
}
.puce-delimitation .nb { font-weight: 400; color: var(--texte-doux); }
.puce-delimitation:hover { background: var(--vert-tres-clair); }
.conteneur-carte-vol { margin: 8px 0; }
.carte-vol { height: 520px; border-radius: 8px; border: 1px solid var(--bordure); }
.etiquette-parcelle.proposee span { border-style: dashed; }
.propositions-contours h3 { margin-top: 12px; }
.liste-propositions { list-style: none; margin: 0; padding: 0; }
.liste-propositions li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--bordure); }
.liste-propositions li:first-child { border-top: none; }
/* Fiche de la parcelle : évolution dans le temps */
.graphique-evolution { margin-top: 16px; }
.graphique-evolution .selecteur-variante { max-width: 560px; }
.svg-evolution { width: 100%; max-width: 760px; height: auto; display: block; }
.svg-evolution .grille { stroke: var(--bordure); stroke-width: 1; }
.svg-evolution .etiquette-axe { font-size: 12px; fill: var(--texte-doux); }
.svg-evolution .valeur-point { font-size: 12px; font-weight: 700; fill: var(--texte); }
.svg-evolution .courbe { fill: none; stroke: var(--vert); stroke-width: 2.5; }
.svg-evolution .point { fill: var(--vert); stroke: var(--surface); stroke-width: 2; }
.zone-carte-evolution { margin-top: 16px; }
.dates-evolution { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.dates-evolution .puce-date[aria-pressed="true"] { background: var(--vert); color: #ffffff; border-color: var(--vert); }
.carte-evolution { height: 460px; border-radius: 8px; border: 1px solid var(--bordure); }
@media (max-width: 700px) {
  .carte-vol { height: 380px; }
  .carte-evolution { height: 340px; }
}
/* Importer une journée */
.carte-import { height: 520px; border-radius: 8px; border: 1px solid var(--bordure); margin-top: 8px; }
.liste-groupes { display: grid; gap: 12px; }
.carte-groupe { border: 1px solid var(--bordure); border-left: 6px solid var(--vert); border-radius: 8px; padding: 10px 14px; background: var(--surface); }
.carte-groupe.retire { border-left-color: #9a9a9a; margin-top: 12px; }
.carte-groupe h3 { margin: 0 0 6px; }
.grille-champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; align-items: end; }
.liste-vols-drone { list-style: none; margin: 6px 0 0; padding: 0; }
.liste-vols-drone li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--bordure); }
.liste-vols-drone .texte-vol { flex: 1 1 280px; }
.liste-vols-drone select { max-width: 100%; }
@media (max-width: 700px) { .carte-import { height: 380px; } }

/* Carte en plein écran (bouton « Plein écran » de la carte d'une délimitation) */
.boutons-carte { position: absolute; z-index: 1030; top: 10px; right: 10px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.bouton-plein-ecran {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px; border-radius: 10px; border: none;
  background: #1d2a22; color: #ffffff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}
.bouton-plein-ecran:focus-visible, .bouton-panneau:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
html.carte-plein-ecran, html.carte-plein-ecran body { overflow: hidden; }
html .vue-carte.plein-ecran {   /* « html » : l'emporte sur « html.tablette .vue-carte » (position relative) */
  position: fixed; inset: 0; z-index: 2500; height: 100dvh !important; min-height: 0; margin: 0;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  gap: 8px; background: var(--fond);
  grid-template-columns: minmax(260px, 350px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
}
html.tablette .vue-carte.plein-ecran { padding: 0; }
html.tablette .vue-carte.plein-ecran .zone-carte { border-radius: 0; border: none; }
html.tablette .vue-carte.plein-ecran .boutons-carte { top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); }
html.tablette .vue-carte.plein-ecran .panneau-carte { top: max(10px, env(safe-area-inset-top)); bottom: max(10px, env(safe-area-inset-bottom)); }
@media (max-width: 1100px) { html .vue-carte.plein-ecran .zone-carte { height: auto; min-height: 0; } }
@media (max-width: 600px) {
  html.tablette .panneau-carte { top: 64px; }
  html.tablette .vue-carte.plein-ecran .panneau-carte { top: calc(max(10px, env(safe-area-inset-top)) + 54px); }
}
@media (max-width: 600px) {
  .bouton-plein-ecran .texte-bouton { display: none; }
  html.tablette .bouton-plein-ecran { min-width: 48px; justify-content: center; padding: 8px 12px; font-size: 1.15rem; }
}

/* =====================================================================================================
   Invitations : page des personnes invitées (invite.html) et page « Invitations » du centre
   ===================================================================================================== */
.carte-invite { height: 62vh; min-height: 340px; border-radius: 8px; border: 1px solid var(--bordure); background: #d9dfdb; }
@media (prefers-color-scheme: dark) { .carte-invite { background: #26302b; } }
.barre-carte { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 18px; margin: 4px 0 8px; }
.champ-carte { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; color: var(--texte-doux); }
.champ-carte select { max-width: 100%; }
.barre-carte .case { margin-right: 0; }
.popup-invite p { margin: 0 0 6px; }
.popup-invite .popup-titre, .popup-titre { font-weight: 700; font-size: 1rem; }
.aide-lecture summary { cursor: pointer; }
.aide-lecture ul { margin: 10px 0; padding-left: 20px; }
.aide-lecture li { margin-bottom: 6px; }
.lien-fichier { margin-right: 10px; white-space: nowrap; }
.page-invite .entete { gap: 14px; }
.page-invite .tuiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
@media (max-width: 700px) {
  .page-invite .version { display: none; }
  .carte-invite { height: 58vh; min-height: 300px; }
}
/* Page « Invitations » du centre */
.liste-invitations { display: grid; gap: 14px; }
.carte-invitation { border: 1px solid var(--bordure); border-left: 6px solid var(--vert); border-radius: 8px; padding: 14px 16px; background: var(--surface); }
.carte-invitation.retiree, .carte-invitation.expiree { border-left-color: #9a9a9a; }
.carte-invitation h3 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.carte-invitation .actions { margin-bottom: 0; }
.parcelles-invitation { margin: 6px 0 4px; padding-left: 20px; columns: 2 260px; column-gap: 24px; }
.parcelles-invitation li { break-inside: avoid; margin: 2px 0; }
.lien-invitation { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 6px; }
.lien-invitation input { flex: 1 1 320px; min-width: 0; font-family: var(--police-mono); font-size: 0.9rem; padding: 8px 10px;
  border: 1.5px solid var(--bordure-forte); border-radius: 8px; background: var(--surface-2); color: var(--texte); }
.choix-domaine { border: 1px solid var(--bordure); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; }
.choix-domaine > .case { font-weight: 700; }
.choix-domaine .parcelles-domaine { display: flex; flex-wrap: wrap; gap: 0 4px; padding-left: 30px; }
.choix-domaine .parcelles-domaine .case { min-height: 36px; margin-right: 14px; }
/* Centre en ligne : pages de connexion, d'activation et « Mon compte » (connexion.js), pensées pour le téléphone */
.page-connexion input[type="text"], .page-connexion input[type="password"] {
  font: inherit; color: var(--texte); background: var(--surface);
  border: 1.5px solid var(--bordure-forte); border-radius: 6px;
  padding: 8px 12px; min-height: 48px; width: 100%; max-width: 100%;
}
.contenu-connexion { max-width: 600px; padding: 20px 16px 48px; }
.page-connexion .bloc { padding: 20px 18px; }
.page-connexion form > .bouton.grand { width: 100%; margin-top: 4px; }
.page-connexion .entete { gap: 14px; }
.page-connexion fieldset { padding: 12px 14px 4px; }
.page-connexion .zone-message:empty { display: none; }
.page-connexion input.saisie-code {
  font-size: 1.6rem; letter-spacing: 0.3em; text-align: center; max-width: 230px;
  font-variant-numeric: tabular-nums; font-family: var(--police-mono);
}
.cle-secrete code {
  display: block; font-size: 1.15rem; letter-spacing: 0.06em; padding: 10px 12px; text-align: center;
  word-break: break-word; user-select: all;
}
.qr { text-align: center; margin: 8px 0 12px; }
.qr img { width: 240px; max-width: 72vw; height: auto; background: #ffffff; padding: 8px; border-radius: 8px; }
.aide-secours { margin-top: 18px; }
.aide-secours summary { cursor: pointer; font-weight: 600; color: var(--vert-moyen); }
.liste-sessions { list-style: none; padding: 0; margin: 0 0 8px; }
.liste-sessions li { padding: 10px 0; border-bottom: 1px solid var(--bordure); }
.liste-sessions li:last-child { border-bottom: none; }
.session-titre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; }
@media (max-width: 600px) {
  .page-connexion .cles { grid-template-columns: 1fr; gap: 2px; }
  .page-connexion .cles dd { margin-bottom: 8px; }
}
