/* AcériDrone — feuille unique. Couleurs tirees du logo : orange d'erable, ardoise de l'helice. */
:root {
  --orange: #e8541e;
  --orange-fonce: #c4420f;
  --ardoise: #2c3e4a;
  --ardoise-clair: #4a5d6a;
  --foret: #2f5d3a;
  --foret-clair: #e9f1ea;
  --creme: #faf7f2;
  --texte: #1f2a30;
  --doux: #5b6b75;
  --trait: #e2e6e8;
  --rayon: 14px;
  --ombre: 0 10px 30px rgba(20, 35, 45, .08);
  --largeur: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--texte); background: #fff;
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-fonce); text-underline-offset: 3px; }
a:hover { color: var(--orange); }
h1, h2, h3 { color: var(--ardoise); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); margin: 0 0 .6em; }
h3 { font-size: 1.2rem; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.cadre { max-width: var(--largeur); margin: 0 auto; padding: 0 24px; }
.etroit { max-width: 780px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.evitement { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 50; }
.evitement:focus { left: 8px; }

/* ---------------------------------------------------------------- en-tete */
.entete { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--trait); }
.barre-utile-cadre.cadre { max-width: 1380px; }
.entete-cadre { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; max-width: 1380px; }
/* (Plus large que le contenu : le menu, la soumission et les boutons WikiAcéri et AcériScience y tiennent ; sous 1340 px, le menu se replie.) */
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ardoise); font-size: 1.35rem; letter-spacing: .02em; }
.marque b { color: var(--orange); font-weight: 600; }
.marque span { font-weight: 600; }
.menu { display: flex; align-items: center; gap: 14px; }
.menu ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.menu ul a { display: block; white-space: nowrap; padding: 8px 8px; border-radius: 8px; color: var(--ardoise); text-decoration: none; font-size: .96rem; font-weight: 500; }
.menu ul a:hover { background: var(--creme); color: var(--orange-fonce); }
.menu ul a[aria-current="page"], .menu ul a[aria-current="true"] { color: var(--orange-fonce); box-shadow: inset 0 -2px 0 var(--orange); border-radius: 0; }
/* Les menus deroulants (Services, Plateforme) : au survol ou au clavier (focus-within). */
.menu-groupe { position: relative; }
.menu-parent::after { content: "▾"; margin-left: 4px; font-size: .75em; }
.menu .sous-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 60; flex-direction: column; gap: 0; min-width: 270px; padding: 6px; background: #fff; border: 1px solid var(--trait); border-radius: 12px; box-shadow: var(--ombre); }
.menu-groupe:hover .sous-menu, .menu-groupe:focus-within .sous-menu { display: flex; }
.menu .sous-menu a { padding: 9px 12px; border-radius: 8px; font-size: .94rem; }
.menu .sous-menu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--orange); border-radius: 0 8px 8px 0; }
.menu-bouton { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-icone, .menu-icone::before, .menu-icone::after { display: block; width: 24px; height: 2px; background: var(--ardoise); position: relative; transition: transform .2s; }
.menu-icone::before, .menu-icone::after { content: ""; position: absolute; }
.menu-icone::before { top: -7px; } .menu-icone::after { top: 7px; }
.menu-bouton[aria-expanded="true"] .menu-icone { background: transparent; }
.menu-bouton[aria-expanded="true"] .menu-icone::before { transform: translateY(7px) rotate(45deg); }
.menu-bouton[aria-expanded="true"] .menu-icone::after { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1340px) {
  .menu-bouton { display: block; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 72px; background: #fff; border-bottom: 1px solid var(--trait); box-shadow: var(--ombre); flex-direction: column; align-items: stretch; padding: 12px 24px 20px; gap: 12px; }
  .menu.ouvert { display: flex; }
  .menu ul { flex-direction: column; }
  .menu ul a { padding: 12px 6px; font-size: 1.05rem; border-bottom: 1px solid var(--trait); border-radius: 0; }
  .menu ul a[aria-current="page"], .menu ul a[aria-current="true"] { box-shadow: inset 3px 0 0 var(--orange); padding-left: 14px; }
  /* Sur cellulaire, les sous-menus sont deplies d'office, en retrait. */
  .menu .sous-menu { display: flex; position: static; min-width: 0; padding: 0 0 0 16px; border: 0; box-shadow: none; background: none; }
  .menu .sous-menu a { padding: 10px 6px; font-size: .98rem; border-radius: 0; }
  .menu-parent::after { content: none; }
}

/* ---------------------------------------------------------------- boutons */
.bouton { display: inline-flex; align-items: center; gap: 8px; background: var(--orange); color: #fff; text-decoration: none; font-weight: 600; padding: 14px 26px; border-radius: 999px; border: 2px solid var(--orange); transition: background .15s, transform .15s; cursor: pointer; font-size: 1rem; }
.bouton:hover { background: var(--orange-fonce); border-color: var(--orange-fonce); color: #fff; transform: translateY(-1px); }
.bouton-petit { padding: 9px 20px; font-size: .95rem; }
.bouton-clair { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.bouton-clair:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.bouton-contour { background: transparent; color: var(--ardoise); border-color: var(--ardoise); }
.bouton-contour:hover { background: var(--ardoise); color: #fff; border-color: var(--ardoise); }
.boutons { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------------------------------------------------------------- bandeaux */
.heros { position: relative; color: #fff; background: var(--ardoise) center/cover no-repeat; overflow: hidden; }
.heros::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(18, 30, 26, .92) 0%, rgba(18, 30, 26, .72) 45%, rgba(18, 30, 26, .25) 100%); }
.heros .cadre { position: relative; padding-top: clamp(70px, 12vw, 140px); padding-bottom: clamp(70px, 11vw, 130px); }
.heros h1 { color: #fff; max-width: 760px; }
.heros p.chapeau { font-size: clamp(1.08rem, 1.8vw, 1.3rem); max-width: 640px; color: rgba(255, 255, 255, .9); margin-bottom: 1.8em; }
.heros-accueil { background-image: url(images/plan-de-vol-lidar.jpg); }
.surtitre { display: inline-block; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--orange); margin-bottom: 14px; }
.heros .surtitre { color: #ffb38f; }

.entete-page { background: var(--creme); border-bottom: 1px solid var(--trait); }
.entete-page .cadre { padding-top: 64px; padding-bottom: 52px; }
.entete-page p.chapeau { font-size: 1.2rem; color: var(--doux); max-width: 760px; margin: 0; }

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-creme { background: var(--creme); }
.section-foret { background: var(--foret); color: #fff; }
.section-foret h2, .section-foret h3 { color: #fff; }
.section-ardoise { background: var(--ardoise); color: #fff; }
.section-ardoise h2 { color: #fff; }
.intro { max-width: 720px; margin-bottom: 40px; }
.intro p { color: var(--doux); font-size: 1.1rem; }
.section-foret .intro p, .section-ardoise .intro p { color: rgba(255, 255, 255, .82); }

/* ---------------------------------------------------------------- grilles */
.grille { display: grid; gap: 24px; }
.grille-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grille-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
/* Six cartes : trois par rangee sur grand ecran, jamais quatre puis deux. */
.grille-six { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
@media (max-width: 1100px) { .grille-six { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
.grille-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.duo { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.duo-inverse > :first-child { order: 2; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } .duo-inverse > :first-child { order: 0; } }
.illustration { border-radius: var(--rayon); box-shadow: var(--ombre); }

.carte { background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon); padding: 28px; box-shadow: var(--ombre); display: flex; flex-direction: column; }
.carte p { color: var(--doux); }
.carte .lien-suite { margin-top: auto; font-weight: 600; text-decoration: none; }
.carte .lien-suite::after { content: " →"; }
.pastille { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--foret-clair); color: var(--foret); margin-bottom: 18px; }
.pastille svg { width: 28px; height: 28px; }

.chiffre { border-left: 3px solid var(--orange); padding: 4px 0 4px 18px; }
.chiffre strong { display: block; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.1; color: #fff; }
.section-creme .chiffre strong, .chiffres-clairs .chiffre strong { color: var(--ardoise); }
.chiffre span { font-size: .95rem; color: rgba(255, 255, 255, .8); }
.section-creme .chiffre span, .chiffres-clairs .chiffre span { color: var(--doux); }
.source { font-size: .85rem; color: rgba(255, 255, 255, .65); margin-top: 28px; }
.section-creme .source, .article .source { color: var(--doux); }

.liste-coche { list-style: none; padding: 0; margin: 0 0 1em; }
.liste-coche li { position: relative; padding-left: 32px; margin-bottom: 10px; }
.liste-coche li::before { content: ""; position: absolute; left: 0; top: .45em; width: 18px; height: 18px; border-radius: 50%; background: var(--foret-clair) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%232f5d3a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.section-foret .liste-coche li::before { background-color: rgba(255, 255, 255, .15); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* ---------------------------------------------------------------- etapes */
.etapes { counter-reset: etape; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.etapes > li { counter-increment: etape; position: relative; background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon); padding: 24px 24px 22px 84px; }
.etapes > li::before { content: counter(etape, decimal-leading-zero); position: absolute; left: 24px; top: 22px; font-weight: 800; font-size: 1.5rem; color: var(--orange); }
.etapes h3 { margin-bottom: .3em; }
.etapes p { color: var(--doux); margin: 0; }

/* ---------------------------------------------------------------- tableaux */
.tableau { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .97rem; }
.tableau th, .tableau td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau th { background: var(--creme); color: var(--ardoise); font-weight: 600; }

/* ---------------------------------------------------------------- appel */
.appel { background: linear-gradient(120deg, var(--ardoise), #1e2c35); color: #fff; border-radius: 22px; padding: clamp(32px, 5vw, 56px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.appel h2 { color: #fff; margin: 0 0 .25em; }
.appel p { color: rgba(255, 255, 255, .8); margin: 0; }

/* ---------------------------------------------------------------- videos */
.video { position: relative; display: block; border-radius: var(--rayon); overflow: hidden; background: #000; aspect-ratio: 16 / 9; box-shadow: var(--ombre); border: 0; padding: 0; width: 100%; cursor: pointer; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .2s; }
.video:hover img { opacity: 1; }
.video .jouer { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.video .jouer::after { content: ""; border-left: 22px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.legende { margin-top: 12px; font-weight: 600; color: var(--ardoise); }
.legende small { display: block; font-weight: 400; color: var(--doux); }

/* ---------------------------------------------------------------- articles */
.carte-article { text-decoration: none; color: inherit; }
.carte-article time { font-size: .85rem; color: var(--orange-fonce); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.carte-article h3 { margin-top: 8px; }
.carte-article:hover h3 { color: var(--orange-fonce); }
.article { padding: 56px 0 80px; }
.article .etroit { font-size: 1.07rem; }
.article h2 { font-size: 1.6rem; margin-top: 1.8em; }
.article h3 { margin-top: 1.4em; }
.article .numero { color: var(--orange); margin-right: 8px; }
.article blockquote { margin: 1.6em 0; padding: 20px 26px; background: var(--foret-clair); border-left: 4px solid var(--foret); border-radius: 0 var(--rayon) var(--rayon) 0; font-size: 1.12rem; color: var(--foret); font-style: italic; }
.article .encadre { background: var(--creme); border-radius: var(--rayon); padding: 22px 26px; margin: 1.4em 0; }
.article .encadre h3 { margin-top: 0; }
.article .chiffres-clairs { margin: 1.6em 0; }
.article ol.references { font-size: .9rem; color: var(--doux); padding-left: 1.4em; }
.article ol.references li { margin-bottom: .6em; overflow-wrap: anywhere; }
.retour { display: inline-block; margin-bottom: 18px; text-decoration: none; font-weight: 600; }
.retour::before { content: "← "; }
.date-article { color: var(--doux); }

/* ---------------------------------------------------------------- formulaire */
.formulaire { display: grid; gap: 18px; }
.formulaire .rangee { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .formulaire .rangee { grid-template-columns: 1fr; } }
.champ label, .champ legend { display: block; font-weight: 600; color: var(--ardoise); margin-bottom: 6px; font-size: .95rem; }
.champ input, .champ textarea, .champ select { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #c9d1d6; border-radius: 10px; background: #fff; color: var(--texte); }
.champ input:focus, .champ textarea:focus { outline: 3px solid rgba(232, 84, 30, .25); border-color: var(--orange); }
.champ textarea { min-height: 140px; resize: vertical; }
.champ fieldset { border: 0; padding: 0; margin: 0; }
.cases { display: flex; flex-wrap: wrap; gap: 10px; }
.cases label { display: flex; align-items: center; gap: 8px; font-weight: 500; border: 1px solid #c9d1d6; border-radius: 999px; padding: 8px 16px; cursor: pointer; margin: 0; }
.cases input { width: auto; accent-color: var(--orange); }
.aide { font-size: .87rem; color: var(--doux); font-weight: 400; }
.pot-de-miel { position: absolute; left: -5000px; }
.etat-envoi { padding: 14px 18px; border-radius: 10px; display: none; }
.etat-envoi.succes { display: block; background: var(--foret-clair); color: var(--foret); }
.etat-envoi.erreur { display: block; background: #fdecea; color: #a12a12; }

/* ---------------------------------------------------------------- confidentialite */
.garanties { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.garantie { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--rayon); padding: 20px; }
.garantie h3 { color: #fff; font-size: 1.05rem; }
.garantie p { color: rgba(255, 255, 255, .8); margin: 0; font-size: .96rem; }

/* ---------------------------------------------------------------- pied */
.pied { background: #18252d; color: rgba(255, 255, 255, .75); padding: 56px 0 0; font-size: .95rem; }
.pied a { color: rgba(255, 255, 255, .9); text-decoration: none; }
.pied a:hover { color: #fff; text-decoration: underline; }
.pied h2 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 14px; }
.pied-grille { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
@media (max-width: 860px) { .pied-grille { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pied-grille { grid-template-columns: 1fr; } }
.marque-pied { color: #fff; margin-bottom: 12px; }
.marque-pied img { background: #fff; border-radius: 10px; padding: 3px; }
.pied-bas { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 18px; padding-bottom: 24px; font-size: .85rem; color: rgba(255, 255, 255, .5); }

/* ---------------------------------------------------------------- utilitaires (aucun style en ligne : la politique de securite les refuse) */
.section-foret .surtitre, .section-ardoise .surtitre { color: #ffb38f; }
.section-foret .source a { color: #fff; }
.duo-haut { align-items: start; }
.carte-accent { border-color: var(--foret); }
.chapeau-article { font-size: 1.2rem; color: var(--doux); }
.gros-tel { font-size: 1.3rem; font-weight: 700; }
.grille .encadre { margin: 0; }
.espace-bas { margin-bottom: 1em; }
.espace-haut { margin-top: 28px; }

/* ---------------------------------------------------------------- espace client */
.entete-mince .cadre { padding-top: 36px; padding-bottom: 28px; }
.entete-mince h1 { margin: 0; }
.section-espace { padding-top: 32px; }
.connexion { max-width: 520px; margin: 0 auto; }
.connexion h2 { font-size: 1.5rem; }
.espace-barre { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.espace-barre select { font: inherit; padding: 10px 14px; border: 1px solid #c9d1d6; border-radius: 10px; min-width: 240px; }
.espace-outils { display: inline-flex; gap: 6px; margin-right: auto; }
.outil { font: inherit; font-size: 1.2rem; width: 42px; height: 42px; border-radius: 10px; border: 1px solid #c9d1d6; background: #fff; color: var(--ardoise); cursor: pointer; }
.outil-texte { width: auto; padding: 0 14px; font-size: .95rem; }
.outil:hover { border-color: var(--orange); color: var(--orange-fonce); }
.espace-cadre { display: grid; grid-template-columns: 1fr 300px; gap: 18px; }
@media (max-width: 860px) { .espace-cadre { grid-template-columns: 1fr; } }
.espace-carte { position: relative; height: min(72vh, 760px); min-height: 380px; border-radius: var(--rayon); overflow: hidden; touch-action: none; cursor: grab;
  background: #1d2a24 radial-gradient(circle at 50% 40%, #26382f 0%, #17221d 75%); }
.espace-carte:active { cursor: grabbing; }
.espace-carte svg { width: 100%; height: 100%; display: block; }
.espace-echelle { position: absolute; left: 14px; bottom: 14px; }
.espace-echelle span { display: block; border: 2px solid #fff; border-top: 0; color: #fff; font-size: .8rem; line-height: 1.2; padding: 0 6px 3px; text-shadow: 0 1px 2px #000; min-width: 30px; box-sizing: border-box; text-align: center; }
.espace-couches { display: flex; flex-direction: column; gap: 10px; }
.couche { background: #fff; border: 1px solid var(--trait); border-radius: 12px; padding: 12px 14px; }
.couche label { font-weight: 600; color: var(--ardoise); display: flex; gap: 8px; align-items: center; cursor: pointer; }
.couche input[type=checkbox] { accent-color: var(--orange); width: 18px; height: 18px; }
.couche input[type=range] { width: 100%; accent-color: var(--orange); margin-top: 8px; }
.couche-3d { background: var(--foret-clair); border-color: #cfe0d1; }
.couche-3d strong { color: var(--foret); }
.couche .aide { margin: 4px 0 8px; }
.rampe { height: 10px; border-radius: 5px; margin-top: 8px; }
.l-canopee { background: linear-gradient(90deg, rgba(233,245,207,.6), #bae48f, #78c65c, #31a354, #006d2c, #00441b); }
.l-pente { background: linear-gradient(90deg, #1a9850, #91cf60, #d9ef8b, #fee08b, #fc8d59, #d73027, #800026); }
.l-altitude { background: linear-gradient(90deg, #006147, #4c993c, #e8d77d, #bf6c2e, #78281e); }
.l-densite { background: linear-gradient(90deg, #d73027, #fc8d59, #fee08b, #d9ef8b, #66bd63, #1a9850); }
.l-intensite { background: linear-gradient(90deg, #191919, #fafafa); }
.l-entailles { background: linear-gradient(90deg, #fee0a0, #fdae61, #e66e32, #b4321e, #6e1414); }
.l-couronnes { background: linear-gradient(90deg, #f28e1c 0 20%, #d7263d 20% 40%, #f6d743 40% 60%, #8bc34a 60% 80%, #1b5e20 80%); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- demonstration 3D */
.demo { position: relative; border-radius: var(--rayon); overflow: hidden; background: #17221d; aspect-ratio: 16 / 9; box-shadow: var(--ombre); }
.demo-affiche { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.demo-bouton { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 1.1rem; padding: 16px 32px; }
.demo-bouton:hover { transform: translate(-50%, -52%); }
.demo-active { aspect-ratio: auto; height: min(70vh, 680px); min-height: 360px; touch-action: none; }
.demo-toile { width: 100%; height: 100%; display: block; cursor: grab; }
.demo-barre { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-top: 14px; }
.demo-mode { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--ardoise); cursor: pointer; }
.demo-mode input { accent-color: var(--orange); }
.demo-tranche { flex: 1 1 320px; font-weight: 600; color: var(--ardoise); }
.demo-tranche output { color: var(--orange-fonce); }
.demo-curseurs { display: grid; gap: 4px; margin-top: 6px; }
.demo-curseurs input { width: 100%; accent-color: var(--orange); }
/* « La foret en 3D » : les panneaux de la vue de l'espace client, dans le cadre de la page. */
.foret-demo { background: linear-gradient(180deg, #7fa7cf 0%, #c9d9e6 46%, #e9e2d3 62%, #cfc4ad 100%); }
.foret-demo.demo-active { height: min(78vh, 720px); min-height: 480px; }
.foret-vue { position: absolute; inset: 0; }
.foret-panneau { position: absolute; background: rgba(18, 22, 20, .74); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; color: #f4f1ea; font-size: 13px; line-height: 1.4; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); }
.foret-chiffres { left: 14px; bottom: 14px; padding: 10px 14px; display: grid; grid-template-columns: repeat(4, auto); gap: 2px 20px; }
.foret-chiffres b { display: block; font-size: 21px; color: #ffd27a; }
.foret-chiffres span { font-size: 10.5px; color: #cfd8cc; text-transform: uppercase; letter-spacing: .06em; }
.foret-commandes { right: 14px; top: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; width: 240px; }
.foret-commandes h3 { margin: 2px 0 0; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #aab8a6; }
.foret-groupe { display: flex; flex-wrap: wrap; gap: 5px; }
.foret-groupe button { flex: 1 1 auto; background: rgba(255, 255, 255, .08); color: #f4f1ea; border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 12.5px; cursor: pointer; }
.foret-groupe button[aria-pressed=true] { background: #e8a33d; border-color: #e8a33d; color: #1b1406; font-weight: 600; }
.foret-legende { right: 14px; bottom: 14px; padding: 10px 14px; min-width: 220px; max-width: 300px; }
.foret-legende div { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.foret-legende i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.foret-legende em { margin-left: auto; padding-left: 10px; white-space: nowrap; font-style: normal; color: #ffd27a; font-variant-numeric: tabular-nums; }
.foret-legende p { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .14); color: #cfd8cc; font-size: 12px; }
.foret-fiche { left: 50%; top: 14px; transform: translateX(-50%); padding: 8px 14px; max-width: 46%; }
.foret-fiche b { color: #ffd27a; }
/* Ecran etroit : la vue d'abord ; commandes et legende dessous, hors de la vue. */
@media (max-width: 900px) {
  .foret-demo.demo-active { height: auto; min-height: 0; overflow: visible; background: none; box-shadow: none; display: flex; flex-direction: column; gap: 10px; touch-action: auto; }
  .foret-vue { position: relative; inset: auto; height: 62vh; min-height: 320px; border-radius: var(--rayon); overflow: hidden; touch-action: none; background: linear-gradient(180deg, #7fa7cf 0%, #c9d9e6 46%, #e9e2d3 62%, #cfc4ad 100%); }
  .foret-chiffres { left: 8px; right: 8px; bottom: auto; top: 8px; grid-template-columns: repeat(4, 1fr); gap: 2px 8px; padding: 6px 8px; }
  .foret-chiffres b { font-size: 15px; }
  .foret-chiffres span { font-size: 8.5px; }
  .foret-fiche { top: auto; bottom: 8px; max-width: 94%; }
  .foret-commandes, .foret-legende { position: static; width: auto; max-width: none; }
}
.espace-fond { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; color: var(--ardoise); }
.espace-fond select { min-width: 0; }
.espace-credit { position: absolute; right: 12px; bottom: 12px; background: rgba(0,0,0,.55); color: #ddd; font-size: .72rem; padding: 2px 8px; border-radius: 6px; }
.espace-coord { position: absolute; left: 12px; top: 12px; background: rgba(0,0,0,.62); color: #fff; font-size: .8rem; padding: 4px 10px; border-radius: 6px; font-variant-numeric: tabular-nums; pointer-events: none; }

/* ---------------------------------------------------------------- rapports de l'espace client */
.rapports { margin-top: 40px; }
.rapports h2 { font-size: 1.6rem; }
.rapports-onglets { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--trait); margin-bottom: 14px; }
.onglet-rapport { font: inherit; font-weight: 600; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 10px 16px; color: var(--doux); cursor: pointer; }
.onglet-rapport:hover { color: var(--orange-fonce); }
.onglet-rapport[aria-selected="true"] { color: var(--orange-fonce); border-bottom-color: var(--orange); }
.rapport-actions { align-items: center; margin-bottom: 12px; }
.rapport-lecteur { width: 100%; height: min(85vh, 1100px); border: 1px solid var(--trait); border-radius: var(--rayon); background: #f3f4f5; }
.rendu-3d { width: 100%; height: min(82vh, 900px); border: 0; border-radius: var(--rayon); background: #9fb9d3; display: block; }
.rendu-donnees { width: 100%; height: min(88vh, 1200px); border: 1px solid var(--trait); border-radius: var(--rayon); background: #0d1117; display: block; }
.liste-fichiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 10px; }
.fichier { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--trait); border-radius: var(--rayon); text-decoration: none; color: inherit; background: #fff; }
.fichier:hover { border-color: var(--orange); }
.fichier-type { flex: none; width: 52px; height: 52px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: .8rem; background: var(--foret); color: #fff; }
.fichier-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fichier-texte .aide { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- espace client : onglets et carte */
.espace-tete { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; margin-bottom: 14px; border-bottom: 2px solid var(--trait); }
.espace-tete select { font: inherit; padding: 8px 12px; border: 1px solid #c9d1d6; border-radius: 10px; margin-bottom: 10px; }
.espace-tete #sortir { margin: 0 0 10px auto; }
.espace-onglets { display: flex; gap: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.espace-onglets::-webkit-scrollbar { display: none; }
.espace-onglets button { font: inherit; font-weight: 600; font-size: 1.05rem; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 10px 18px; color: var(--doux); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; flex: none; }
@media (max-width: 700px) { .espace-onglets button { padding: 10px 12px; font-size: .98rem; } }
.espace-onglets button:hover { color: var(--orange-fonce); }
.espace-onglets button[aria-selected="true"] { color: var(--orange-fonce); border-bottom-color: var(--orange); }
.pastille-compte { background: var(--orange); color: #fff; font-size: .75rem; border-radius: 999px; padding: 1px 8px; }

.espace-carte { height: min(76vh, 860px); min-height: 420px; }
.carte-bouton { font: inherit; font-size: .9rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--ardoise); border: 0; border-radius: 10px; padding: 9px 14px; box-shadow: 0 2px 10px rgba(0,0,0,.28); cursor: pointer; }
.carte-bouton:hover { color: var(--orange-fonce); }
.carte-haut-gauche { position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 8px; max-width: calc(100% - 160px); }
.carte-calques { position: absolute; right: 12px; top: 12px; }
.carte-calques[aria-expanded="true"] { visibility: hidden; }
.panneau-calques { position: absolute; right: 12px; top: 12px; width: 290px; max-height: calc(100% - 196px); display: flex; flex-direction: column; background: #fff; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,.35); overflow: hidden; z-index: 2; }
.calques-tete { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 8px 16px; border-bottom: 1px solid var(--trait); color: var(--ardoise); }
.calques-fermer { font: inherit; font-size: 1.4rem; line-height: 1; background: none; border: 0; color: var(--doux); cursor: pointer; padding: 2px 8px; border-radius: 8px; }
.calques-fermer:hover { background: var(--creme); }
.calques-corps { overflow-y: auto; padding: 4px 0 10px; overscroll-behavior: contain; }
.calques-titre { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); padding: 12px 16px 6px; }
.calques-fonds { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; }
.fond-choix { font: inherit; font-size: .82rem; background: #fff; color: var(--ardoise); border: 1px solid #c9d1d6; border-radius: 999px; padding: 5px 11px; cursor: pointer; }
.fond-choix[aria-checked="true"] { background: var(--ardoise); color: #fff; border-color: var(--ardoise); }
.calque { padding: 2px 16px; }
.calque-ligne { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: .93rem; color: var(--texte); }
.calque-ligne input { accent-color: var(--orange); width: 17px; height: 17px; margin: 0; }
.calque-details { display: none; padding: 0 0 8px 27px; }
.calque-actif .calque-details { display: block; }
.calque-actif .calque-ligne { font-weight: 600; color: var(--ardoise); }
.calque-details input[type=range] { width: 100%; accent-color: var(--orange); margin: 2px 0 0; }
.calque-details .rampe { margin-top: 4px; height: 8px; }
.calque-details .aide { font-size: .78rem; margin: 3px 0 0; }

.carte-zoom { position: absolute; right: 12px; bottom: 40px; display: flex; flex-direction: column; background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.28); overflow: hidden; }
.carte-zoom button { font: inherit; font-size: 1.25rem; width: 40px; height: 40px; border: 0; background: #fff; color: var(--ardoise); cursor: pointer; display: grid; place-items: center; }
.carte-zoom button + button { border-top: 1px solid var(--trait); }
.carte-zoom button:hover { color: var(--orange-fonce); background: var(--creme); }
.carte-bas-gauche { position: absolute; left: 12px; bottom: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
.carte-bas-gauche .espace-coord { position: static; }
.carte-bas-gauche .espace-echelle { position: static; }
.espace-coord { top: auto; }
.espace-credit { bottom: 8px; right: 12px; font-size: .68rem; }

@media (max-width: 899px) {
  .espace-carte { height: 70vh; }
  .panneau-calques { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 62%; border-radius: 16px 16px 0 0; }
  .carte-haut-gauche { max-width: calc(100% - 130px); }
  .carte-bouton { padding: 8px 11px; font-size: .84rem; }
  .espace-tete #sortir { margin-left: 0; }
  .carte-zoom { bottom: 56px; }
}
.espace-echelle span { white-space: nowrap; }
@media (max-width: 899px) {
  .carte-bas-gauche { bottom: 34px; }
  .espace-credit { max-width: calc(100% - 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .espace-coord { font-size: .74rem; }
}

/* ---- Calculateur previsionnel (page publique et onglet de l'espace client) ---- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: start; }
@media (max-width: 980px) { .calc { grid-template-columns: 1fr; } }
.calc-formulaire { display: grid; gap: 18px; }
.calc-bloc { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px 18px 6px; margin: 0; background: #fff; }
.calc-bloc legend { font-weight: 700; color: var(--ardoise); padding: 0 6px; }
.calc-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 4px 14px; }
.calc-champ { margin-bottom: 10px; }
.calc-champ label { font-size: .88rem; }
.calc-entree { display: flex; align-items: center; gap: 8px; }
.calc-entree input { padding: 9px 11px; }
.calc-unite { color: var(--doux); font-size: .85rem; white-space: nowrap; }
.calc-champ .aide { font-size: .8rem; margin: 4px 0 0; }
.calc-traitement { border: 1px solid var(--trait); border-radius: 12px; padding: 12px 14px 4px; margin-bottom: 12px; background: var(--creme); opacity: .72; }
.calc-traitement.calc-actif { opacity: 1; border-color: var(--foret); background: var(--foret-clair); }
.calc-traitement-tete { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 1.02rem; color: var(--ardoise); }
.calc-traitement-tete input, .calc-case input { width: 18px; height: 18px; accent-color: var(--orange); }
.calc-traitement > .aide { font-size: .84rem; margin: 4px 0 10px; }
.calc-case { display: flex; gap: 8px; align-items: center; font-size: .88rem; margin: 0 0 10px; }
.calc-resultats { position: sticky; top: 90px; display: grid; gap: 16px; }
@media (max-width: 980px) { .calc-resultats { position: static; } }
.calc-base { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-base div { background: var(--creme); border-radius: 10px; padding: 10px 12px; }
.calc-base span { display: block; font-size: .75rem; color: var(--doux); text-transform: uppercase; letter-spacing: .04em; }
.calc-base b { color: var(--ardoise); }
@media (max-width: 640px) { .calc-base { grid-template-columns: 1fr 1fr; } }
.calc-investissement h3, .calc-scenario h3 { margin: 0 0 6px; font-size: 1rem; }
.calc-liste { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.calc-liste li { padding: 3px 0; }
.calc-total { font-weight: 700; color: var(--ardoise); border-top: 1px solid var(--trait); margin-top: 4px; padding-top: 6px !important; }
.calc-scenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .calc-scenarios { grid-template-columns: 1fr; } }
.calc-scenario { border-radius: 12px; padding: 12px 14px; border-top: 5px solid; background: #fff; box-shadow: var(--ombre); }
.calc-scenario.calc-pessimiste { border-top-color: #8a97a0; }
.calc-scenario.calc-realiste { border-top-color: var(--foret); }
.calc-scenario.calc-optimiste { border-top-color: var(--orange); }
.calc-gros { font-size: 1.55rem; font-weight: 700; color: var(--ardoise); margin: 0; }
.calc-sous { font-size: .8rem; color: var(--doux); margin: 0 0 8px; }
.calc-dl { margin: 0; font-size: .84rem; display: grid; grid-template-columns: 1fr; }
.calc-dl dt { color: var(--doux); margin-top: 6px; }
.calc-dl dd { margin: 0; font-weight: 600; color: var(--texte); }
.calc-figure { margin: 0; background: #fff; border: 1px solid var(--trait); border-radius: 12px; padding: 10px; }
.calc-graphe { width: 100%; height: auto; display: block; }
.calc-grille-ligne { stroke: #e6eaec; stroke-width: 1; }
.calc-zero { stroke: var(--ardoise); stroke-width: 1.5; stroke-dasharray: 4 4; }
.calc-axe { font-size: 11px; fill: var(--doux); }
.calc-courbe { fill: none; stroke-width: 3; stroke-linejoin: round; }
.calc-courbe.calc-pessimiste { stroke: #8a97a0; }
.calc-courbe.calc-realiste { stroke: var(--foret); }
.calc-courbe.calc-optimiste { stroke: var(--orange); }
.calc-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; margin-top: 6px; align-items: center; }
.calc-legende span[class^="calc-l-"]::before { content: ""; display: inline-block; width: 18px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.calc-l-pessimiste::before { background: #8a97a0; }
.calc-l-realiste::before { background: var(--foret); }
.calc-l-optimiste::before { background: var(--orange); }
.calc-legende .aide { flex-basis: 100%; margin: 0; }
.calc-details summary { cursor: pointer; font-weight: 600; color: var(--ardoise); }
.calc-tableau { font-size: .84rem; margin-top: 8px; }
.calc-tableau th, .calc-tableau td { padding: 6px 8px; }
.sources { padding-left: 18px; font-size: .9rem; }
.sources li { margin-bottom: 6px; }

/* ---------------------------------------------------------------- optimisation IA (espace client) */
.opt-c-chaulage { --couche: #6b8f3c; } .opt-c-potasse { --couche: #b0539a; } .opt-c-bti { --couche: #00838f; } .opt-c-analyses { --couche: #8d6e63; }
.eq-aceridrone { margin: .6rem 0; padding: .5rem .6rem; border-left: 3px solid var(--accent, #e8541e); background: rgba(232, 84, 30, .06); } .opt-c-drainage { --couche: #2f7fb5; }
.opt-c-chemins { --couche: #6d4c41; } .opt-c-energie { --couche: #f2b705; }
.opt-c-coupe { --couche: #8a5a2b; } .opt-c-tubulure { --couche: #e8541e; } .opt-c-entaillage { --couche: #c99a14; } .opt-c-enrichissement { --couche: #2f5d3a; }
.opt-chapeau { font-size: 1.05rem; color: var(--doux); max-width: 860px; margin: 0 0 12px; }
.opt-champs { background: var(--creme); border-radius: var(--rayon); padding: 14px 16px 4px; margin-bottom: 18px; }
.opt-grille { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
@media (max-width: 980px) { .opt-grille { grid-template-columns: 1fr; } }
.opt-couches { display: grid; gap: 14px; }
.opt-couche { border: 1px solid var(--trait); border-left: 6px solid var(--couche); border-radius: var(--rayon); background: #fff; padding: 14px 16px; opacity: .62; transition: opacity .15s, box-shadow .15s; }
.opt-couche.opt-active { opacity: 1; box-shadow: var(--ombre); }
.opt-couche-tete { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.opt-couche-tete input { width: 20px; height: 20px; accent-color: var(--couche); }
.opt-numero { width: 30px; height: 30px; border-radius: 50%; background: var(--couche); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.opt-titre { font-weight: 700; color: var(--ardoise); font-size: 1.08rem; line-height: 1.2; }
.opt-titre small { display: block; font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--couche); }
.opt-badge { margin-left: auto; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #8a6d00; background: #fff4cc; border-radius: 999px; padding: 3px 10px; }
.opt-corps { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 14px; margin-top: 10px; }
@media (max-width: 560px) { .opt-corps { grid-template-columns: 1fr; } .opt-carte { max-width: 160px; } }
.opt-texte p { margin: 0 0 8px; font-size: .93rem; color: var(--doux); }
.opt-texte .opt-constat { color: var(--texte); font-weight: 600; }
.opt-texte .opt-action { color: var(--texte); }
.opt-carte { width: 100%; height: auto; max-height: 230px; display: block; }
.opt-secteur { fill: #eef1f2; stroke: #b9c3c8; stroke-width: 4; }
.opt-secteur.opt-vise { fill: var(--couche); fill-opacity: .55; stroke: var(--couche); }
.opt-etiquette { font-size: 46px; font-weight: 700; fill: #8a97a0; text-anchor: middle; dominant-baseline: middle; }
.opt-etiquette-vise { fill: #fff; }
.opt-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 12px 0 6px; }
.opt-chiffres dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--doux); }
.opt-chiffres dd { margin: 2px 0 0; font-weight: 700; color: var(--ardoise); font-size: .95rem; }
.opt-source { font-size: .76rem; color: var(--doux); margin: 4px 0 0; }
.opt-cote { position: sticky; top: 90px; display: grid; gap: 12px; }
@media (max-width: 980px) { .opt-cote { position: static; order: -1; } }
.opt-cote h3 { margin: 6px 0 0; font-size: 1.05rem; }
.opt-pile { display: grid; gap: 3px; }
.opt-strate { background: var(--couche); color: #fff; border-radius: 8px; padding: 9px 12px; display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.opt-strate b { white-space: nowrap; }
.opt-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--ardoise); padding-top: 8px; }
.opt-total b { font-size: 1.25rem; color: var(--ardoise); }
.opt-scenarios { grid-template-columns: repeat(3, 1fr); }
.opt-scenarios .calc-gros { font-size: 1.3rem; }
.opt-plan { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.opt-plan li { border-left: 4px solid var(--couche); padding: 4px 10px; background: var(--creme); border-radius: 0 8px 8px 0; font-size: .92rem; }
.opt-an { display: inline-block; min-width: 46px; font-weight: 700; color: var(--couche); }
.opt-soumission { justify-content: center; }
.opt-avertissement { margin-top: 18px; }

/* ---------------------------------------------------------------- optimisation IA : la vue 3D (optimisation3d.js) */
.opt3d { margin-bottom: 32px; }
.opt3d-attente { padding: 40px 0; text-align: center; }
.opt3d-bandeau { left: 14px; top: 14px; padding: 8px 14px; max-width: 46%; }
.opt3d-bandeau b { display: block; color: #ffd27a; font-size: 15px; }
.opt3d-bandeau span { font-size: 12px; color: #cfd8cc; }
.opt3d-legende { max-height: 48%; overflow: auto; }
.opt3d-legende h3 { margin: 6px 0 2px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #aab8a6; }
.opt3d-legende h3:first-child { margin-top: 0; }
@media (min-width: 901px) {
  .opt3d.foret-demo { position: relative; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); height: min(82vh, 780px); min-height: 560px; }
  .opt3d .foret-fiche { top: auto; bottom: 90px; }
}
@media (max-width: 900px) {
  .opt3d-bandeau { top: auto; bottom: 8px; max-width: 94%; }
  .opt3d .foret-fiche { bottom: 64px; }
  .opt3d-legende { max-height: none; }
}
.opt-secteurs { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 14px; }
.opt-secteurs-titre { font-weight: 700; color: var(--ardoise); margin-right: 4px; }
.opt-secteur-choix { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--trait); border-radius: 20px; padding: 4px 12px; background: #fff; font-size: .9rem; cursor: pointer; }
.opt-secteur-choix input { accent-color: var(--orange); }
@media (min-width: 901px) {
  .opt3d .opt3d-legende { right: auto; left: 14px; top: 74px; bottom: auto; max-height: calc(100% - 190px); }
  .opt3d .foret-commandes { max-height: calc(100% - 28px); overflow: auto; }
}

/* ---------------------------------------------------------------- optimisation : plancher et amenagement */
.opt-plancher { border-radius: 10px; padding: 10px 12px; font-size: .9rem; display: grid; gap: 8px; justify-items: start; }
.opt-plancher p { margin: 0; }
.opt-plancher-ok { background: var(--foret-clair); color: var(--foret); border-left: 4px solid var(--foret); }
.opt-plancher-non { background: #fdecea; color: #8e1c12; border-left: 4px solid #e53935; }
.opt-plancher .aide { color: inherit; opacity: .85; }
.opt-amenagement { margin-top: 14px; border: 1px dashed #c9d1d6; border-radius: 10px; padding: 10px 14px; display: grid; gap: 6px; justify-items: start; }
.opt-amenagement .aide { margin: 0; }

/* ---------------------------------------------------------------- construire mon erabliere */
.cons { display: grid; gap: 12px; }
.cons-barre { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; background: var(--creme); border-radius: var(--rayon); padding: 10px 12px; }
.cons-groupe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cons-groupe-titre { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--doux); margin-right: 2px; }
.cons-outil { font: inherit; font-size: .86rem; display: inline-flex; align-items: center; gap: 7px; background: #fff; color: var(--ardoise); border: 1px solid var(--trait); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.cons-outil:hover { border-color: var(--orange); color: var(--orange-fonce); }
.cons-outil[aria-pressed="true"] { background: var(--ardoise); color: #fff; border-color: var(--ardoise); }
.cons-pastille { display: inline-block; width: 14px; height: 14px; flex: none; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.cons-point { border-radius: 50%; }
.cons-zone { border-radius: 3px; opacity: .8; }
.cons-choisir { border-radius: 3px; background: linear-gradient(135deg, #fff 45%, var(--ardoise) 45%); }
i.cons-ligne { height: 5px; width: 18px; border: 0; box-shadow: none; border-radius: 3px; }
.cons-corps { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
@media (max-width: 980px) { .cons-corps { grid-template-columns: 1fr; } }
.cons-carte { position: relative; height: min(74vh, 820px); min-height: 400px; border-radius: var(--rayon); overflow: hidden; touch-action: none; cursor: grab; background: #20282d; outline: none; user-select: none; -webkit-user-select: none; }
.cons-carte:focus-visible { box-shadow: 0 0 0 3px rgba(232, 84, 30, .45); }
.cons-carte.cons-dessin { cursor: crosshair; }
.cons-svg { width: 100%; height: 100%; display: block; }
.cons-el { cursor: pointer; }
.cons-etiquette { font: 700 13px system-ui, sans-serif; fill: #fff; stroke: rgba(0,0,0,.65); stroke-width: 3px; paint-order: stroke; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.cons-lettre { font: 800 12px system-ui, sans-serif; fill: #fff; text-anchor: middle; pointer-events: none; }
.cons-nom { font: 700 12.5px system-ui, sans-serif; fill: #fff; stroke: rgba(0,0,0,.7); stroke-width: 3px; paint-order: stroke; pointer-events: none; }
.cons-sommet { fill: #fff; stroke: var(--orange); stroke-width: 2.5; cursor: move; }
.cons-milieu { fill: rgba(255,255,255,.55); stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 2 2; cursor: copy; }
.cons-consigne { position: absolute; left: 12px; top: 12px; right: 190px; background: rgba(0,0,0,.66); color: #fff; font-size: .82rem; line-height: 1.35; padding: 6px 10px; border-radius: 8px; pointer-events: none; }
@media (max-width: 640px) { .cons-consigne { right: 12px; top: auto; bottom: 64px; } }
.cons-terminer { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); background: var(--orange); color: #fff; }
.cons-terminer:hover { color: #fff; background: var(--orange-fonce); }
.cons-calques { position: absolute; right: 12px; top: 12px; background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.28); padding: 8px 12px; font-size: .86rem; max-width: 220px; }
.cons-calques summary { cursor: pointer; font-weight: 600; color: var(--ardoise); }
.cons-calques select { width: 100%; margin: 8px 0 4px; font: inherit; padding: 4px 6px; border-radius: 6px; border: 1px solid #c9d1d6; }
.cons-calques .calc-case { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.cons-panneau { display: grid; gap: 12px; }
.cons-etat { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cons-etat .bouton[disabled] { opacity: .45; cursor: default; transform: none; }
.cons-etat-texte { flex-basis: 100%; margin: 0; }
.cons-fiche { background: var(--creme); border-radius: var(--rayon); padding: 12px 14px; }
.cons-fiche > .aide { margin: 0; }
.cons-fiche-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cons-fiche-tete .aide { margin-left: auto; }
.cons-champ { margin-bottom: 8px; }
.cons-champ label { font-size: .85rem; margin-bottom: 3px; }
.cons-champ input, .cons-champ select, .cons-champ textarea { padding: 7px 10px; }
.cons-champ textarea { min-height: 64px; }
.cons-fiche-boutons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cons-supprimer { color: #b3261e; border-color: #b3261e; }
.cons-supprimer:hover { background: #b3261e; border-color: #b3261e; }
.cons-titre { margin: 4px 0 0; font-size: 1rem; }
.cons-liste { display: grid; gap: 4px; max-height: 340px; overflow: auto; }
.cons-liste > .aide { margin: 0; }
button.cons-ligne { font: inherit; font-size: .88rem; display: flex; align-items: center; gap: 8px; text-align: left; background: #fff; border: 1px solid var(--trait); border-radius: 8px; padding: 6px 10px; cursor: pointer; color: var(--texte); }
button.cons-ligne:hover { border-color: var(--orange); }
button.cons-ligne em { margin-left: auto; font-style: normal; font-size: .78rem; color: var(--doux); white-space: nowrap; }
.cons-ligne-choisie { border-color: var(--orange); box-shadow: inset 3px 0 0 var(--orange); }
.cons-modes { position: absolute; right: 12px; top: 60px; display: flex; background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.28); overflow: hidden; z-index: 3; }
.cons-modes button { font: inherit; font-size: .86rem; font-weight: 600; border: 0; background: #fff; color: var(--ardoise); padding: 8px 12px; cursor: pointer; }
.cons-modes button + button { border-left: 1px solid var(--trait); }
.cons-modes button[aria-pressed="true"] { background: var(--ardoise); color: #fff; }
.cons-en-3d .cons-calques, .cons-en-3d .carte-zoom, .cons-en-3d .espace-credit { display: none; }
.cons-3d { position: absolute; inset: 0; z-index: 2; background: linear-gradient(#7fa7cf, #c9d9e6 55%, #e9e2d3); }
.cons-3d[hidden] { display: none; }
.cons-3d-toile { width: 100%; height: 100%; display: block; cursor: crosshair; }
.cons-3d-attente { color: var(--ardoise); text-align: center; margin-top: 30%; font-weight: 600; }
.cons-3d-commandes { position: absolute; left: 12px; bottom: 12px; background: rgba(255,255,255,.94); border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.28); padding: 8px 10px; display: grid; grid-template-columns: auto auto; gap: 4px 8px; align-items: center; font-size: .8rem; }
.cons-3d-titre { font-weight: 700; color: var(--ardoise); }
.cons-3d-groupe { display: flex; flex-wrap: wrap; gap: 4px; }
.cons-3d-groupe button { font: inherit; font-size: .78rem; border: 1px solid var(--trait); background: #fff; border-radius: 999px; padding: 3px 9px; cursor: pointer; color: var(--ardoise); }
.cons-3d-groupe button[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #fff; }
.cons-en-3d .cons-consigne { z-index: 3; }
.cons-en-3d .cons-terminer { z-index: 3; }
.cons-a-verifier { display: grid; gap: 6px; justify-items: start; background: #fff4cc; color: #6d5600; border-radius: 8px; padding: 8px 10px; font-size: .84rem; margin-bottom: 8px; }
/* Le cadastre : l'exterieur assombri ne capte aucun clic ; un element hors du lot le dit dans sa fiche. */
.cons-hors-cadastre { pointer-events: none; }
.cons-hors { background: #eceff1; color: #263238; border-left: 4px solid #212121; border-radius: 8px; padding: 8px 10px; font-size: .84rem; margin: 0 0 8px; }

/* Construire mon erabliere : le point choisi d'une ligne ou d'une zone (le retirer seul). */
.cons-sommet-choisi { fill: var(--orange); stroke: #fff; stroke-width: 3; filter: drop-shadow(0 0 3px rgba(0,0,0,.7)); }
.cons-point { display: grid; gap: 6px; justify-items: start; font-size: .84rem; margin-bottom: 8px; }
.cons-point-actif { background: #fff1e8; color: #6b2a0c; border: 1px solid var(--orange); border-radius: 8px; padding: 8px 10px; }
.cons-supprimer-point { background: #b3261e; border-color: #b3261e; color: #fff; }
.cons-supprimer-point:hover { background: #8c1d17; border-color: #8c1d17; }

/* Calculateur public : la coupe et les autres chantiers de l'espace client, montres mais inactifs. */
.calc-bloc-reserve { background: var(--creme); border-style: dashed; }
.calc-bloc-reserve > .aide { font-size: .86rem; margin: 2px 0 12px; }
.calc-traitement.calc-reserve { opacity: 1; background: #fff; border-style: dashed; color: var(--doux); }
.calc-reserve .calc-traitement-tete { cursor: default; color: var(--ardoise-clair); }
.calc-reserve .calc-traitement-tete input { cursor: not-allowed; }
.calc-reserve .calc-grille { opacity: .55; filter: grayscale(1); }
.calc-reserve input:disabled { background: #f1f3f4; cursor: not-allowed; }
.calc-badge-reserve { display: inline-block; margin: 6px 0 2px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; color: var(--foret); background: var(--foret-clair); border: 1px solid #c9dccb; border-radius: 999px; padding: 3px 11px; }
.calc-reserve-liens { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 12px; }

/* ---------------------------------------------------------------- optimisation IA : la fiche d'un objet clique (optimisation3d.js) */
.opt3d .foret-fiche { padding-right: 34px; }
.opt3d-fiche-fermer { position: absolute; top: 4px; right: 6px; background: none; border: 0; color: #cfd8cc; font-size: 20px; line-height: 1; padding: 2px 6px; cursor: pointer; border-radius: 6px; }
.opt3d-fiche-fermer:hover, .opt3d-fiche-fermer:focus-visible { color: #fff; background: rgba(255, 255, 255, .12); }
.opt3d-fiche-sous { font-size: 12px; color: #cfd8cc; margin: 2px 0 6px; }
.opt3d-fiche-liste { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 3px 12px; margin: 0; font-size: 12.5px; }
.opt3d-fiche-liste dt { color: #aab8a6; }
.opt3d-fiche-liste dd { margin: 0; font-variant-numeric: tabular-nums; }
.opt3d-fiche-liste dd.opt3d-alerte { color: #ff9e80; }
.opt3d-fiche-note { margin: 8px 0 0; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 11px; color: #cfd8cc; }
/* La fiche se range sur le cote droit (par-dessus les commandes, qu'elle libere en se fermant) : l'objet clique reste visible. */
.opt3d .foret-fiche { z-index: 5; overflow: auto; }
@media (min-width: 901px) {
  .opt3d .foret-fiche { left: auto; right: 14px; top: 14px; bottom: auto; transform: none; width: min(400px, 42%); max-width: none; max-height: calc(100% - 28px); }
}
@media (max-width: 900px) {
  .opt3d .foret-fiche { left: 8px; right: 8px; top: auto; bottom: 8px; transform: none; max-width: none; max-height: 55%; }
  .opt3d-fiche-liste { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .opt3d-fiche-liste dt { margin-top: 5px; }
}

/* ---- Demonstration publique de l'Optimisation IA (erablieres.html, demo-optimisation.js) ---- */
.demo-optim { background: linear-gradient(135deg, #1b2a22 0%, #2c3e4a 60%, #4a3423 100%); }
.demo-optim-affiche { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-start; padding: 28px 32px;
  background-image: linear-gradient(180deg, rgba(10, 18, 14, .55), rgba(10, 18, 14, .15)), url("images/demo-foret.jpg"); background-size: cover; background-position: center; }
.demo-optim-titre { margin: 0; color: #fff; font-size: 1.6rem; font-weight: 700; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.demo-optim-sous { margin: 6px 0 0; color: #f3e6d6; font-size: 1rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.demo-couches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.demo-couches-titre { font-weight: 600; color: var(--ardoise); margin-right: 4px; }
.demo-couche { border: 1px solid var(--orange); background: #fff; color: var(--ardoise); border-radius: 999px; padding: 6px 14px; font-size: .9rem; cursor: pointer; }
.demo-couche[aria-pressed="true"] { background: var(--orange); color: #fff; }
@media (max-width: 640px) { .demo-optim-affiche { padding: 18px; } .demo-optim-titre { font-size: 1.2rem; } }

/* Le plancher du pessimiste : un « Pourquoi ? » discret, replie par defaut. */
.calc-pourquoi { font-size: .82rem; color: var(--doux); margin: -4px 0 0; }
/* La mention legale des prix du calculateur. */
.calc-mention { font-size: .78rem; line-height: 1.45; color: var(--doux); border-left: 3px solid var(--orange); background: rgba(232, 84, 30, .06); padding: 8px 10px; border-radius: 6px; margin: 10px 0 0; }
.calc-pourquoi summary { cursor: pointer; color: var(--ardoise-clair); font-weight: 600; }
.calc-pourquoi p { margin: 6px 0 4px; }
.calc-pourquoi-sources { margin: 0; padding-left: 18px; font-size: .78rem; }
.calc-pourquoi-sources li { margin-bottom: 2px; }
.opt-plancher .calc-pourquoi { margin: 6px 0 8px; }

/* ---- Simulation 24 h (espace client, simulation-24h.js) : la meme scene que l'Optimisation IA ---- */
.sim24-hote { margin-bottom: 32px; }
.sim24 .opt3d-bandeau, .sim24 .foret-chiffres, .sim24 .opt3d-legende, .sim24 .foret-commandes, .sim24 .foret-fiche { display: none; }
.sim24 .sim24-scene { margin-bottom: 0; }
.sim24 .foret-panneau { z-index: 2; }
.sim24-hud { left: 14px; top: 14px; padding: 8px 12px 8px 6px; display: flex; gap: 6px; align-items: center; }
.sim24-thermo { width: 30px; height: 104px; flex: none; }
.sim24-thermo-tube { fill: rgba(255, 255, 255, .1); stroke: rgba(255, 255, 255, .45); stroke-width: 1.2; }
.sim24-thermo-mercure { fill: #ef5a3c; }
.sim24-thermo.sim24-gel .sim24-thermo-mercure { fill: #5ec8ff; }
.sim24-thermo-trait { stroke: rgba(255, 255, 255, .45); stroke-width: 1; }
.sim24-thermo-zero { stroke: #9fe4ff; stroke-width: 1.6; }
.sim24-hud-texte { display: grid; gap: 2px; min-width: 132px; }
.sim24-heure { font-size: 26px; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.sim24-temp { font-size: 20px; color: #ffd27a; font-variant-numeric: tabular-nums; }
.sim24-ciel { font-size: 12px; color: #cfd8cc; }
.sim24-pastille { justify-self: start; margin-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #cfd8cc; }
.sim24-pastille.sim24-coule { background: #1f6fd6; color: #fff; }
.sim24-pastille.sim24-glace { background: #d8f3ff; color: #08304a; }
.sim24-cumul { font-size: 11.5px; color: #cfd8cc; font-variant-numeric: tabular-nums; margin-top: 2px; }
.sim24-scene .sim24-reglages { right: 14px; top: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; width: 250px; max-height: calc(100% - 110px); overflow: auto; }
/* L'en-tete au-dessus de la vue : scenario de la journee et reseau (aujourd'hui ou apres les travaux). */
.sim24-entete { background: #161c19; color: #e9ede8; border-radius: var(--rayon) var(--rayon) 0 0; padding: 12px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 28px; align-items: start; font-size: 13px; }
.sim24-entete h3 { margin: 0 0 6px; }
.sim24-entete-scenario, .sim24-entete-reseau { min-width: 0; }
.sim24-entete .sim24-resume { margin-top: 6px; }
.sim24-scenarios button, .sim24-entete-reseau button { flex: 0 0 auto; white-space: nowrap; }
.sim24-entete-reseau .foret-groupe { flex-wrap: nowrap; }
/* Panneau de reglages repliable : replie, il ne garde que son bouton. */
.sim24-replier { align-self: flex-end; font: inherit; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .08); color: #e9ede8; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.sim24-replier:hover, .sim24-replier:focus-visible { background: rgba(255, 255, 255, .16); }
.sim24-reglages.sim24-replie > :not(.sim24-replier) { display: none; }
.sim24-scene .sim24-reglages.sim24-replie { width: auto; padding: 6px; overflow: visible; }
.sim24-reglages h3 { margin: 2px 0 0; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #aab8a6; }
.sim24-reglages .foret-groupe button:disabled { opacity: .4; cursor: not-allowed; }
.sim24-select { font: inherit; font-size: 13px; background: #1d2521; color: #f4f1ea; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; padding: 6px 8px; width: 100%; }
.sim24-resume { margin: 0; font-size: 12px; color: #cfd8cc; }
.sim24-transport { left: 14px; right: 14px; bottom: 14px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.sim24-bouton { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; width: 36px; height: 32px; font-size: 15px; cursor: pointer; }
.sim24-bouton:hover, .sim24-bouton:focus-visible { background: rgba(255, 255, 255, .2); }
.sim24-lire { background: #e8a33d; border-color: #e8a33d; color: #1b1406; }
.sim24-lire:hover, .sim24-lire:focus-visible { background: #f2b75a; }
.sim24-horloge { font-size: 18px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; min-width: 54px; }
.sim24-curseur { flex: 1 1 260px; accent-color: #e8a33d; min-width: 160px; }
.sim24-vitesses button { font-variant-numeric: tabular-nums; }
.sim24-sauter { width: auto; }
/* La legende des tuyaux, sous la vue. */
.sim24-legende { background: #161c19; color: #e9ede8; padding: 12px 18px; border-top: 1px solid rgba(255, 255, 255, .08); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 8px 28px; font-size: 12px; line-height: 1.4; }
.sim24-legende-bloc { min-width: 0; }
.sim24-legende h3 { margin: 0 0 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #aab8a6; }
.sim24-legende-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 16px; }
.sim24-legende-liste div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sim24-legende i { width: 18px; height: 5px; border-radius: 3px; flex: none; }
.sim24-legende p { grid-column: 1 / -1; margin: 0; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .1); color: #cfd8cc; font-size: 11.5px; }
.sim24-fiche { left: 50%; top: 78px; transform: translateX(-50%); padding: 8px 34px 8px 14px; width: min(400px, 92%); max-height: 55%; overflow: auto; }
.sim24-fiche b { color: #ffd27a; }
.sim24-jauges { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.sim24-jauges[hidden] { display: none; }
/* Les jauges : compactes (cadran ou voyant a la couleur de l'etat, un chiffre) ; un clic en ouvre une sur place. */
.sim24-jauge { --etat: #3fbf6f; position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; flex-direction: column; align-items: stretch; margin: 0; padding: 0; translate: -50% calc(-100% - 10px);
  background: rgba(12, 17, 15, .82); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; color: #f4f1ea; font-size: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.sim24-jauge[data-etat=attention] { --etat: #f0a020; }
.sim24-jauge[data-etat=alerte] { --etat: #ff6b5e; border-color: rgba(255, 107, 94, .6); }
.sim24-jauge::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: rgba(12, 17, 15, .82); }
.sim24-jauge:hover, .sim24-jauge:focus-within { border-color: #e8a33d; }
.sim24-jauge[hidden] { display: none; }
.sim24-jauge.sim24-ouverte { z-index: 3; border-color: #e8a33d; background: rgba(12, 17, 15, .92); }
.sim24-decalee { translate: 12px calc(-100% - 10px); }
.sim24-decalee::after { left: 12px; }
.sim24-jauge-bascule { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; padding: 4px 8px 5px; background: none; border: 0; border-radius: 9px; color: inherit; font: inherit; cursor: pointer; }
.sim24-jauge-bascule:focus-visible { outline: 2px solid #e8a33d; outline-offset: 1px; }
.sim24-jauge-court, .sim24-jauge-titre { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: #aab8a6; white-space: nowrap; }
.sim24-jauge-titre { font-size: 10.5px; display: none; }
.sim24-jauge-bref { display: flex; align-items: center; gap: 6px; }
.sim24-ouverte .sim24-jauge-court, .sim24-ouverte .sim24-jauge-bref { display: none; }
.sim24-ouverte .sim24-jauge-titre { display: inline; }
.sim24-jauge-detail { display: grid; justify-items: center; gap: 4px; padding: 0 10px 8px; }
.sim24-jauge-detail[hidden] { display: none; }
.sim24-jauge-fiche { font-weight: 600; }
.sim24-jauge-chiffre { display: grid; text-align: left; line-height: 1.15; }
.sim24-jauge-chiffre b { font-size: 14px; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sim24-jauge-chiffre small { font-size: 10px; color: #aab8a6; white-space: nowrap; }
.sim24-voyant { width: 18px; height: 18px; border-radius: 50%; border: 4px solid var(--etat); flex: none; }
.sim24-jauge .sim24-cadran.sim24-cadran-mini { width: 38px; height: 38px; }
.sim24-cadran-mini .sim24-cadran-val, .sim24-cadran-mini .sim24-cadran-val.sim24-alerte { stroke: var(--etat); stroke-width: 7; }
.sim24-cadran-mini .sim24-cadran-texte { font-size: 17px; }
.sim24-cadran-mini .sim24-cadran-unite, .sim24-cadran-mini .sim24-cadran-cible { display: none; }
.sim24-jauge .sim24-cuve.sim24-cuve-mini { width: 12px; height: 28px; border-color: var(--etat); }
.sim24-jauge-corps { display: flex; align-items: center; gap: 8px; }
.sim24-jauge-lignes { display: grid; gap: 1px; text-align: left; }
.sim24-jauge-ligne { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sim24-jauge-ligne.sim24-alerte { color: #ff8a80; font-weight: 700; }
.sim24-sirop { color: #ffd27a; font-weight: 700; }
.sim24-jauge-branche .sim24-cadran { width: 44px; height: 44px; }
.sim24-cadran { width: 58px; height: 58px; flex: none; }
.sim24-cadran-fond { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 6; stroke-linecap: round; }
.sim24-cadran-val { fill: none; stroke: #4fc3f7; stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray .3s; }
.sim24-cadran-val.sim24-alerte { stroke: #ff6b5e; }
.sim24-cadran-cible { stroke: #ffd27a; stroke-width: 2; }
.sim24-cadran-texte { fill: #fff; font-size: 14px; font-weight: 700; text-anchor: middle; font-variant-numeric: tabular-nums; }
.sim24-cadran-unite { fill: #aab8a6; font-size: 7.5px; text-anchor: middle; }
.sim24-cuve { position: relative; width: 16px; height: 46px; border: 1.5px solid rgba(255, 255, 255, .5); border-radius: 4px; overflow: hidden; flex: none; background: rgba(255, 255, 255, .06); }
.sim24-cuve-niveau { position: absolute; inset: 0; background: linear-gradient(180deg, #8fd0ff, #2a7fd4); transform-origin: 50% 100%; transform: scaleY(0); transition: transform .3s; }
.sim24-cuve-niveau.sim24-alerte { background: linear-gradient(180deg, #ffab91, #e5484d); }

/* Le tableau de bord sous la vue */
.sim24-bas { background: #161c19; color: #e9ede8; border-radius: 0 0 var(--rayon) var(--rayon); padding: 18px 18px 20px; display: grid; gap: 16px; }
.sim24-titre h3 { margin: 0; color: #ffd27a; font-size: 1.15rem; }
.sim24-titre .aide, .sim24-bas .aide { color: #a9b6ae; margin: 4px 0 0; }
.sim24-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.sim24-kpi { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; align-content: start; }
.sim24-kpi b { font-size: 1.35rem; color: #fff; font-variant-numeric: tabular-nums; }
.sim24-kpi span { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #aab8a6; }
.sim24-kpi small { font-size: .78rem; color: #cfd8cc; }
.sim24-kpi-alerte { border-color: rgba(255, 107, 94, .55); }
.sim24-kpi-alerte b { color: #ff9e80; }
.sim24-graphes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.sim24-graphe { margin: 0; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); border-radius: 10px; padding: 8px 10px 6px; min-width: 0; }
.sim24-graphe[hidden] { display: none; }
.sim24-graphe figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: .85rem; }
.sim24-graphe figcaption b { color: #f4f1ea; }
.sim24-unite { color: #8f9d95; font-size: .78rem; }
.sim24-leg { display: flex; flex-wrap: wrap; gap: 2px 10px; width: 100%; font-size: .75rem; color: #cfd8cc; }
.sim24-leg span { display: inline-flex; align-items: center; gap: 5px; }
.sim24-leg i, .sim24-bulle i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.sim24-leg i.sim24-tirets { height: 0; border-top: 3px dashed #d95926; background: none; }
.sim24-toile-cadre { position: relative; }
.sim24-toile-cadre canvas { display: block; width: 100%; height: 150px; cursor: crosshair; touch-action: none; }
.sim24-bulle { position: absolute; top: 4px; left: 0; z-index: 3; pointer-events: none; background: rgba(8, 12, 10, .94); border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; padding: 6px 9px; font-size: 12px; white-space: nowrap; }
.sim24-bulle[hidden] { display: none; }
.sim24-bulle b { color: #ffd27a; }
.sim24-bulle div { display: flex; align-items: center; gap: 6px; }
.sim24-bulle em { font-style: normal; margin-left: auto; padding-left: 8px; font-variant-numeric: tabular-nums; color: #fff; }
.sim24-colonnes { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; }
.sim24-carte { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.sim24-carte[hidden] { display: none; }
.sim24-carte h4 { margin: 0 0 8px; color: #f4f1ea; font-size: .95rem; }
.sim24-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sim24-pb button { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08); border-left: 4px solid #8f9d95; border-radius: 8px; padding: 8px 10px; color: #e9ede8; font: inherit; font-size: .88rem; cursor: pointer; }
.sim24-pb button:hover:not(:disabled), .sim24-pb button:focus-visible { background: rgba(255, 255, 255, .08); }
.sim24-pb button:disabled { cursor: default; }
.sim24-alerte button { border-left-color: #e5484d; }
.sim24-attention button { border-left-color: #f0a020; }
.sim24-info button { border-left-color: #4fc3f7; }
.sim24-pb-icone { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: #8f9d95; color: #111; }
.sim24-alerte .sim24-pb-icone { background: #e5484d; color: #fff; }
.sim24-attention .sim24-pb-icone { background: #f0a020; }
.sim24-info .sim24-pb-icone { background: #4fc3f7; }
.sim24-pb-texte { display: grid; gap: 2px; }
.sim24-pb-texte span { color: #b9c5bd; font-size: .82rem; }
.sim24-table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.sim24-table th, .sim24-table td { text-align: right; padding: 5px 8px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sim24-table th:first-child, .sim24-table td:first-child { text-align: left; }
.sim24-table th { color: #aab8a6; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.sim24-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sim24-actions .bouton-contour { color: #e9ede8; border-color: rgba(255, 255, 255, .5); }
.sim24-actions .bouton-contour:hover { background: #e9ede8; color: #161c19; }
.sim24-hypotheses summary { cursor: pointer; color: #ffd27a; font-weight: 600; }
.sim24-hypotheses p { color: #b9c5bd; font-size: .85rem; margin: 8px 0 0; }
@media (min-width: 901px) {
  .sim24 .opt3d.foret-demo { border-radius: 0; }
}
@media (max-width: 900px) {
  .sim24 .foret-vue { height: 58vh; }
  .sim24-scene .sim24-reglages, .sim24-transport { position: static; width: auto; max-height: none; transform: none; }
  .sim24-entete { grid-template-columns: minmax(0, 1fr); border-radius: var(--rayon); padding: 12px; margin-bottom: 10px; }
  .sim24-legende { grid-template-columns: minmax(0, 1fr); border-radius: var(--rayon); border-top: 0; padding: 12px; margin: 10px 0; }
  .sim24-hud { left: 8px; top: 8px; padding: 6px 8px 6px 4px; }
  .sim24-thermo { width: 22px; height: 76px; }
  .sim24-hud-texte { min-width: 0; }
  .sim24-heure { font-size: 19px; }
  .sim24-temp { font-size: 15px; }
  .sim24-cumul { display: none; }
  .sim24-fiche { top: auto; bottom: 8px; max-height: 45%; }
  .sim24-transport { order: 1; }
  .sim24-scene .sim24-reglages { order: 2; }
  .sim24-colonnes { grid-template-columns: 1fr; }
  .sim24-bas { border-radius: var(--rayon); padding: 14px 12px; }
  .sim24-graphes { grid-template-columns: 1fr; }
  .sim24-jauge { font-size: 10.5px; }
  .sim24-jauge-bascule { padding: 3px 6px 4px; }
  .sim24-cadran { width: 42px; height: 42px; }
  .sim24-jauge-branche .sim24-cadran { width: 34px; height: 34px; }
  .sim24-jauge .sim24-cadran.sim24-cadran-mini { width: 32px; height: 32px; }
  .sim24-jauge-chiffre b { font-size: 12.5px; }
}
/* Telephone : les scenarios sur une seule rangee qui defile de cote, sans faire defiler la page. */
@media (max-width: 640px) {
  .sim24-scenarios { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 4px; }
  .sim24-jauge.sim24-ouverte { max-width: calc(100vw - 72px); }
  .sim24-ouverte .sim24-jauge-ligne { white-space: normal; }
}
/* Optimisation IA : les raccordements a verifier (legende), dits plutot que tus. */
.opt3d-legende .opt3d-a-verifier { color: #ffcc80; }
.opt3d-legende h3.opt3d-a-verifier { color: #ffb74d; }

/* Simulation 24 h : incidents d'un clic, mes chiffres, bilan d'une journee reelle */
.sim24-marqueurs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.sim24-marqueur { position: absolute; left: 0; top: 0; translate: -50% calc(-100% - 8px); pointer-events: auto; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: #ff3d00; box-shadow: 0 4px 12px rgba(0, 0, 0, .45); cursor: pointer; display: grid; place-items: center; font-size: 15px; line-height: 1; padding: 0; }
.sim24-marqueur::after { content: ""; position: absolute; left: 50%; bottom: -9px; margin-left: -5px; border: 5px solid transparent; border-top: 6px solid #fff; }
.sim24 .sim24-fiche { z-index: 3; }
.sim24-marqueur.sim24-eteint { background: #6d7a73; opacity: .7; }
.sim24-marqueur[hidden] { display: none; }
.sim24-inc { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 8px; padding-top: 6px; }
.sim24-inc:empty { display: none; }
.sim24-inc h4 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #ff9e80; }
.sim24-inc-ligne { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 12px; margin: 2px 0; }
.sim24-inc-form { display: grid; gap: 6px; }
.sim24-inc-aide { margin: 0; font-size: 11.5px; color: #cfd8cc; }
.sim24-champ { display: grid; gap: 2px; font-size: 11.5px; color: #aab8a6; }
.sim24-champ input, .sim24-bilan-form input, .sim24-chiffre input, .sim24-chiffre textarea { font: inherit; font-size: 13px; background: #1d2521; color: #f4f1ea; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; padding: 5px 8px; min-width: 0; }
.sim24-champ input:disabled { opacity: .45; }
.sim24-inc-heures { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sim24-inc-gravite { display: flex; gap: 8px; align-items: center; }
.sim24-inc-gravite .sim24-curseur { min-width: 0; flex: 1; }
.sim24-inc-val { font-size: 12px; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sim24-case { font-size: 12px; color: #cfd8cc; display: flex; align-items: center; gap: 4px; }
.sim24-case input { accent-color: #e8a33d; }
.sim24-lien { background: none; border: 0; padding: 2px 4px; color: #ffd27a; font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.sim24-lien:hover, .sim24-lien:focus-visible { color: #fff; }
.sim24-calcul { opacity: .55; transition: opacity .2s; }
.sim24-perte { margin: 4px 0 8px; color: #e9ede8; }
.sim24-perte b { color: #ff9e80; }
.sim24-inc-item { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border: 1px solid rgba(255, 255, 255, .08); border-left: 4px solid #ff3d00; border-radius: 8px; background: rgba(255, 255, 255, .03); font-size: .86rem; }
.sim24-inc-item input { margin-top: 3px; accent-color: #e8a33d; }
.sim24-inc-item .sim24-pb-texte { flex: 1; }
.sim24-inc-item.sim24-eteint { border-left-color: #6d7a73; opacity: .7; }
.sim24-incidents .sim24-liste { margin-bottom: 10px; }
.sim24-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 12px; margin-top: 6px; }
.sim24-chiffre { display: grid; gap: 2px; font-size: .8rem; }
.sim24-chiffre-nom { color: #cfd8cc; }
.sim24-chiffre-entree { display: flex; gap: 6px; align-items: center; }
.sim24-chiffre-entree input { width: 110px; flex: none; }
.sim24-chiffre-unite { color: #8f9d95; font-size: .75rem; }
.sim24-votre .sim24-chiffre-unite { color: #ffd27a; font-weight: 600; }
.sim24-votre input, .sim24-votre textarea { border-color: #e8a33d; }
.sim24-horaire { margin-top: 10px; }
.sim24-horaire textarea { width: 100%; resize: vertical; }
.sim24-chiffres-pied { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-top: 10px; }
.sim24-bilan-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; align-items: end; }
.sim24-bilan-form .sim24-chiffre-entree input { width: 100px; }
.sim24-bilan-inc, .sim24-bilan-form .sim24-actions, .sim24-bilan-resultat { grid-column: 1 / -1; }
.sim24-bilan-inc { margin: 0; font-size: .85rem; color: #cfd8cc; }
.sim24-bilan-resultat:empty { display: none; }
.sim24-bilan h4 + .sim24-defile { margin-top: 4px; }
.sim24-defile { overflow-x: auto; margin-bottom: 8px; }
.sim24-total td { font-weight: 700; color: #ffd27a; border-top: 1px solid rgba(255, 255, 255, .25); }
.sim24-methode { font-size: .8rem; color: #8f9d95; margin: 12px 0 0; }
@media (max-width: 900px) {
  .sim24-chiffre-entree input { width: 96px; }
}
/* Simulation 24 h : la grille des travaux simules (secteurs x couches). */
.sim24-travaux { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.sim24-travaux h4 { margin: 0; }
.sim24-tv-reglages { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.sim24-tv-groupe { display: grid; gap: 4px; min-width: 0; }
.sim24-tv-libelle { font-size: .78rem; color: #aab8a6; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.sim24-tv-cadre { max-width: 100%; }
.sim24-tv-grille th, .sim24-tv-grille td { text-align: center; white-space: nowrap; }
.sim24-tv-grille th:first-child, .sim24-tv-grille td:first-child { text-align: left; }
.sim24-tv-grille small { color: #8f9d95; }
.sim24-tv-tete { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.sim24-tv-grille input { width: 18px; height: 18px; accent-color: #e8a33d; cursor: pointer; }
.sim24-tv-grille input:disabled { cursor: not-allowed; }
.sim24-tv-non { background: rgba(255, 255, 255, .03); }
.sim24-tv-non input { opacity: .3; }
.sim24-tv-essai { outline: 1px dashed rgba(255, 210, 122, .55); outline-offset: -3px; }
.sim24-tv-essai input { opacity: .75; }
.sim24-note-eau { margin-top: 4px; color: #bfe6ff; }
.opt3d-legende p.opt3d-alerte-eau { margin: 4px 0 6px; padding: 5px 8px; border-left: 3px solid #ffd27a; background: rgba(255, 210, 122, .12); color: #ffe3a8; font-weight: 600; }
.sim24-tv-rapport h4 { margin: 4px 0 6px; }
.sim24-tv-parts td:nth-child(2) { text-align: left; }
.sim24-tv-combos h4 { margin: 4px 0 6px; }
.sim24-tv-form, .sim24-tv-comparer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.sim24-tv-form input { font: inherit; font-size: 13px; background: #1d2521; color: #f4f1ea; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; padding: 6px 8px; flex: 1 1 140px; min-width: 0; }
.sim24-tv-comparer .sim24-select { width: auto; flex: 1 1 120px; min-width: 0; }
.sim24-tv-combos .sim24-liste { margin-bottom: 8px; }
.sim24-tv-combos .sim24-inc-item { border-left-color: #e8a33d; }

/* ---------------------------------------------------------------- annexes methodologiques (espace client)
   Le texte vient du service des rendus (GET /api/rendus/annexes), apres connexion : rien ici ne le contient. */
.ann-hote { margin-bottom: 32px; }
.ann-doc { color: var(--texte); }
.ann-tete { max-width: 860px; margin: 0 0 24px; }
.ann-tete h2 { margin-bottom: .4em; }
.ann-chapeau { font-size: 1.08rem; }
.ann-version { font-size: .9rem; color: var(--doux); }
.ann-grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 1000px) { .ann-grille { grid-template-columns: 230px minmax(0, 1fr); gap: 40px; } }
.ann-sommaire { background: var(--creme); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px 18px; font-size: .95rem; align-self: start; }
@media (min-width: 1000px) { .ann-sommaire { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; } }
.ann-sommaire-titre { font-weight: 700; color: var(--ardoise); margin: 0 0 .5em; }
.ann-sommaire ol { margin: 0; padding-left: 1.3em; }
.ann-sommaire li { margin: 0 0 .35em; }
.ann-sommaire a { text-decoration: none; }
.ann-sommaire a:hover { text-decoration: underline; }
.ann-corps { min-width: 0; max-width: 860px; }
.ann-section { padding: 0 0 28px; margin: 0 0 28px; border-bottom: 1px solid var(--trait); scroll-margin-top: 90px; }
.ann-section:last-child { border-bottom: 0; }
.ann-section h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); display: flex; gap: 12px; align-items: baseline; }
.ann-num { flex: none; display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--foret); color: #fff; font-size: .8em; }
.ann-section h3 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; color: var(--foret); margin: 1.4em 0 .5em; }
.ann-section h4 { font-size: 1.05rem; color: var(--ardoise); margin: 1.2em 0 .4em; }
.ann-section ul, .ann-section ol { padding-left: 1.3em; margin: 0 0 1em; }
.ann-section li { margin: 0 0 .4em; }
.ann-doc var { font-style: italic; font-family: Georgia, "Times New Roman", serif; }
.ann-doc sub, .ann-doc sup { font-size: .72em; line-height: 0; }
.ann-doc code { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: .88em; background: var(--creme); border: 1px solid var(--trait); border-radius: 4px; padding: 0 4px; overflow-wrap: anywhere; }
.ann-formule { background: var(--foret-clair); border-left: 4px solid var(--foret); border-radius: 0 8px 8px 0; padding: 10px 14px; margin: 0 0 1em; overflow-x: auto; font-size: 1rem; }
.ann-formule-ligne { white-space: normal; }
.ann-tableau { max-width: 100%; overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--trait); border-radius: 10px; }
.ann-tableau .tableau { margin: 0; font-size: .92rem; min-width: 520px; }
.ann-tableau .tableau th, .ann-tableau .tableau td { padding: 8px 10px; }
.ann-refs { font-size: .92rem; color: var(--doux); }
.ann-note { font-size: .92rem; color: var(--doux); font-style: italic; }
.ann-a-ajuster { border: 1px dashed var(--orange); border-radius: 10px; padding: 4px 16px 8px; margin: 1.2em 0; }
.ann-limites li { margin-bottom: .7em; }
.ann-impression { display: none; }
/* Pas d'impression : le corps des annexes ne sort pas sur papier. */
@media print {
  .ann-grille { display: none !important; }
  .ann-impression { display: block; }
}

/* Annexes : les liens des references (DOI longs) se coupent plutot que de deborder sur telephone. */
.ann-refs a { overflow-wrap: anywhere; }

/* La barre d'onglets de l'espace : elle defile de gauche a droite sur un ecran etroit. Sa barre de defilement est
   cachee : un degrade et une fleche de chaque cote montrent qu'il reste des onglets, et la fleche les fait venir. */
.espace-defile { position: relative; flex: 1 1 auto; min-width: 0; display: flex; }
.espace-defile .espace-onglets { flex: 1 1 auto; min-width: 0; scroll-behavior: smooth; }
.espace-defile::before, .espace-defile::after { content: ""; position: absolute; top: 0; bottom: 3px; width: 56px; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 1; }
.espace-defile::before { left: 0; background: linear-gradient(to right, #fff 35%, rgba(255, 255, 255, 0)); }
.espace-defile::after { right: 0; background: linear-gradient(to left, #fff 35%, rgba(255, 255, 255, 0)); }
.espace-defile.defile-a-gauche::before, .espace-defile.defile-a-droite::after { opacity: 1; }
.defile-fleche { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #c9d1d6; background: #fff; color: var(--ardoise); font: inherit; font-size: 1.5rem; line-height: 1; display: grid; place-items: center; padding: 0 0 3px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.defile-fleche:hover { color: var(--orange-fonce); border-color: var(--orange); }
.defile-fleche[hidden] { display: none; }
.defile-gauche { left: 0; }
.defile-droite { right: 0; }
@media (prefers-reduced-motion: reduce) { .espace-defile .espace-onglets { scroll-behavior: auto; } }

/* Planification des travaux (plan-travaux.js) : les problematiques point par point et le plan de l'acericulteur. */
.pt-tete { margin-bottom: 12px; }
.pt-libelle { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--doux); }
.pt-scenarios { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 12px; }
.pt-scenarios .pt-libelle { margin-right: 4px; }
.pt-reglages { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 10px 14px; background: var(--creme); }
.pt-reglages summary { cursor: pointer; font-weight: 700; color: var(--ardoise); }
.pt-equipements { display: grid; gap: 2px; margin: 6px 0 10px; }
.pt-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; }
.pt-outils { border-bottom: 1px solid var(--trait); padding: 10px 0; margin-bottom: 14px; }
.pt-chantiers { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pt-pastille { font: inherit; font-size: .86rem; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--ardoise); border: 1px solid #c9d1d6; border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.pt-pastille small { color: var(--doux); font-weight: 700; }
.pt-pastille[aria-pressed="true"] { background: var(--ardoise); color: #fff; border-color: var(--ardoise); }
.pt-pastille[aria-pressed="true"] small { color: #fff; }
.pt-puce { width: 10px; height: 10px; border-radius: 50%; background: var(--couche); flex: none; }
.pt-outils-ligne { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; }
.pt-choix { display: inline-flex; flex-direction: column; gap: 2px; }
.pt-choix select, .pt-choix input { font: inherit; font-size: .92rem; padding: 6px 10px; border: 1px solid #c9d1d6; border-radius: 8px; background: #fff; }
.pt-compte { margin-left: auto; }
.pt-liste { display: grid; gap: 12px; }
.pt-point { border: 1px solid var(--trait); border-left: 6px solid var(--couche); border-radius: var(--rayon); background: #fff; padding: 14px 16px; }
.pt-point.pt-retenu { box-shadow: var(--ombre); }
.pt-point.pt-fait { background: var(--foret-clair); }
.pt-point-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.pt-cocher { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--couche); cursor: pointer; }
.pt-cocher input { width: 22px; height: 22px; accent-color: var(--couche); }
.pt-titre { margin: 0; font-size: 1.08rem; flex: 1 1 260px; }
.pt-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-badge { font-size: .74rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: var(--creme); color: var(--doux); border: 1px solid var(--trait); }
.pt-badge-chantier { background: var(--couche); color: #fff; border-color: var(--couche); }
.pt-badge-fait { background: var(--foret); color: #fff; border-color: var(--foret); }
.pt-point .opt-constat { margin: 10px 0 4px; }
.pt-point .opt-action { margin: 0; font-size: .94rem; }
.pt-positif dd { color: var(--foret); }
.pt-negatif dd { color: #b3261e; }
.pt-decisions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; padding-top: 8px; border-top: 1px dashed var(--trait); }
.pt-modes { display: inline-flex; gap: 4px; }
.pt-modes .fond-choix { font-size: .88rem; padding: 6px 12px; }
.pt-modes .fond-choix:disabled, .pt-choix select:disabled { opacity: .6; cursor: default; }
.pt-cout { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
.pt-cout .pt-libelle { flex-basis: 100%; }
.pt-cout input { width: 130px; }
.pt-bas { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-start; margin-top: 12px; }
.pt-form-fait { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.pt-form-fait[hidden] { display: none; }
.pt-note { flex: 1 1 260px; }
.pt-note summary, .pt-pourquoi summary { cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--ardoise-clair); }
.pt-note textarea { width: 100%; font: inherit; font-size: .92rem; padding: 8px 10px; border: 1px solid #c9d1d6; border-radius: 8px; margin-top: 6px; resize: vertical; }
.pt-pourquoi { margin-top: 8px; font-size: .92rem; }
.pt-cote .pt-total { grid-template-columns: 1fr 1fr; }
.pt-etat { font-size: .82rem; color: var(--doux); margin: 0; min-height: 1.2em; }
.pt-etat-ok { color: var(--foret); }
.pt-etat-erreur { color: #b3261e; }
.pt-annees { width: 100%; max-width: 420px; height: auto; margin: 4px 0 8px; }
.pt-annee-nom { font-size: 13px; fill: var(--ardoise); font-weight: 600; }
.pt-annee-val { font-size: 13px; fill: var(--ardoise); text-anchor: end; font-weight: 700; }
.pt-annee-fond { fill: var(--creme); stroke: var(--trait); }
.pt-annee-barre { fill: var(--orange); }
.pt-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 899px) { .pt-compte { margin-left: 0; flex-basis: 100%; } }
/* Les mises a jour, sous « Construire mon erabliere » : les travaux faits, du plus recent au plus ancien. */
.pt-majs { margin-top: 22px; }
.pt-majs:empty { display: none; }
.pt-maj-tete { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.pt-maj-tete h3 { margin: 0; }
.pt-maj { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.pt-maj li { display: grid; grid-template-columns: minmax(130px, auto) 1fr; gap: 4px 14px; border-left: 4px solid var(--couche); background: var(--creme); border-radius: 0 10px 10px 0; padding: 8px 12px; }
.pt-maj-date { font-weight: 700; color: var(--couche); }
.pt-maj p { margin: 2px 0 0; }
@media (max-width: 600px) { .pt-maj li { grid-template-columns: 1fr; } }
@media print {
  .entete, .pied, .espace-tete, .pt-outils, .pt-reglages, .pt-scenarios, .pt-actions, .pt-bas, .pt-decisions, .pt-pourquoi, .evitement, .entete-page { display: none !important; }
  .pt-grille { display: block; }
  .pt-cote { position: static; break-inside: avoid; }
  .pt-point { break-inside: avoid; box-shadow: none; }
}

/* Planification des travaux sur la carte 3D (plan-travaux-3d.js) : etapes, carte et fiche, liste sous la carte. */
.pt3-etapes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.pt3-sous-etapes { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 8px; padding-left: 12px; border-left: 3px solid #e8541e; }
.pt3-sous-etapes[hidden] { display: none; }
.pt3-sous-etapes .fond-choix[aria-selected="true"] { background: var(--ardoise); color: #fff; border-color: var(--ardoise); }
.pt3-analyses { padding: 10px 12px; border: 1px solid #dfe5e0; border-radius: var(--rayon); background: #fbfcfb; }
.pt3-analyses h3 { margin: 0 0 6px; }
.pt3-campagnes { margin: 8px 0; padding-left: 18px; }
.pt3-etape { font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--ardoise); border: 1px solid #c9d1d6; border-radius: 999px; padding: 7px 14px 7px 8px; cursor: pointer; }
.pt3-etape small { font-weight: 700; color: var(--doux); font-size: .78rem; }
.pt3-etape[aria-selected="true"] { background: var(--ardoise); color: #fff; border-color: var(--ardoise); }
.pt3-etape[aria-selected="true"] small { color: #fff; }
.pt3-etape-entamee:not([aria-selected="true"]) { border-color: var(--orange); }
.pt3-num { width: 24px; height: 24px; border-radius: 50%; background: var(--creme); color: var(--ardoise); display: grid; place-items: center; font-size: .82rem; font-weight: 700; }
.pt3-etape[aria-selected="true"] .pt3-num { background: var(--orange); color: #fff; }
.pt3-aide { margin: 0 0 10px; max-width: 900px; }
.pt3-cadre { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
/* Les barres posees devant la carte (Sol, secteurs) suivent la scene dans cette grille : sur toute la largeur, au-dessus,
   sinon elles prennent la grande colonne et la carte tombe dans celle de la fiche (360 px). */
.pt3-cadre > .csec-barre { grid-column: 1 / -1; margin: 0; }
.pt3-fiche { border: 1px solid var(--trait); border-radius: var(--rayon); background: #fff; padding: 12px 14px; max-height: min(70vh, 760px); overflow-y: auto; box-shadow: var(--ombre); }
.pt3-fiche h3 { margin: 0 0 6px; font-size: 1.1rem; }
.pt3-fiche-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pt3-fermer { font: inherit; font-size: 1.4rem; line-height: 1; background: none; border: 0; color: var(--doux); cursor: pointer; padding: 0 4px; }
.pt3-travail { border-left: 5px solid var(--couche); padding: 8px 0 10px 10px; margin: 10px 0; border-top: 1px dashed var(--trait); }
.pt3-travail.pt3-fait { background: var(--foret-clair); }
.pt3-constat { margin: 6px 0; font-size: .93rem; }
.pt3-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pt3-travail .pt-decisions { border-top: 0; padding-top: 4px; }
.pt3-travail .pt-cout input { width: 110px; }
.pt3-legende { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 10px 0 6px; font-size: .88rem; color: var(--doux); }
.pt3-leg { display: inline-flex; align-items: center; gap: 6px; }
.pt3-leg i { width: 22px; height: 6px; border-radius: 3px; display: inline-block; border: 1px solid #9aa7b0; }
.pt3-leg-libre i { background: #fff; }
.pt3-leg-plan i { background: #ff7a1a; border-color: #ff7a1a; }
.pt3-leg-fait i { background: #2e9d4f; border-color: #2e9d4f; }
.pt3-leg-choisi i { background: #ffe14d; border-color: #d4b400; }
.pt3-legende .bouton { margin-left: auto; }
.pt3-outils { margin: 10px 0; padding: 10px 0; border-top: 1px solid var(--trait); border-bottom: 1px solid var(--trait); }
.pt3-outils .pt-scenarios { margin: 0; }
.pt3-table-cadre { overflow-x: auto; }
.pt3-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.pt3-table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--doux); padding: 6px 8px; border-bottom: 2px solid var(--trait); white-space: nowrap; }
.pt3-table td { padding: 6px 8px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.pt3-table tr.pt3-plan td { background: #fff4ea; }
.pt3-table tr.pt3-fait td { background: var(--foret-clair); }
.pt3-table tr.pt3-ligne-choisie td { background: #fff8cc; }
.pt3-table select { font: inherit; font-size: .86rem; padding: 3px 6px; border: 1px solid #c9d1d6; border-radius: 6px; background: #fff; }
.pt3-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--orange); }
.pt3-nom { min-width: 220px; }
.pt3-lien { font: inherit; font-weight: 600; color: var(--ardoise); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; display: inline-flex; align-items: center; gap: 8px; }
.pt3-lien:hover { color: var(--orange-fonce); }
.pt3-petit { font-size: .84rem; color: var(--doux); white-space: nowrap; }
.pt-negatif-t { color: #b3261e; }
.pt3-bilan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--trait); }
.pt3-bilan h3 { margin: 0 0 4px; }
@media (max-width: 1000px) {
  .pt3-cadre { grid-template-columns: 1fr; }
  .pt3-fiche { max-height: none; }
  .pt3-bilan { grid-template-columns: 1fr; }
}
@media print { .pt3-cadre, .pt3-etapes, .pt3-legende, .pt3-outils, .pt3-aide { display: none !important; } }
/* La planification parle seule sur sa carte : les panneaux de l'Optimisation IA s'effacent. */
.pt3-scene .opt3d-bandeau, .pt3-scene .foret-chiffres, .pt3-scene .foret-legende, .pt3-scene .foret-commandes { display: none !important; }
.pt3-vues { display: inline-flex; gap: 4px; }
@media (max-width: 700px) {
  .pt3-etapes { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .pt3-etape { flex: none; font-size: .92rem; padding: 5px 12px 5px 6px; }
}
.sim24-tv-plan { font-size: .88rem; background: #fff4ea; color: #3b2a1c; border-left: 4px solid var(--orange); padding: 6px 10px; border-radius: 0 8px 8px 0; margin: 4px 0 8px; }
/* Mes erablieres : quatre CATEGORIES (Mon erablière, Planifier, Ma production, Scientifique), puis leurs onglets. */
.espace-choix { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--doux); margin-bottom: 10px; max-width: 100%; min-width: 0; }
.espace-choix select { margin-bottom: 0; min-width: 0; max-width: 100%; flex: 1 1 auto; text-overflow: ellipsis; }
.espace-choix[hidden] { display: none; }
.espace-groupes { flex: 1 0 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; background: #f3f5f6; border-radius: 14px; padding: 5px; }
.espace-groupes button { font: inherit; font-weight: 700; font-size: 1rem; border: 0; background: none; border-radius: 10px; padding: 9px 8px; color: var(--ardoise); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; line-height: 1.2; }
.espace-groupes button:hover { background: #fff; color: var(--orange-fonce); }
.espace-groupes button[aria-selected="true"] { background: #fff; color: var(--orange-fonce); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); }
.espace-groupes button:focus-visible, .espace-onglets button:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.groupe-icone { font-size: 1.15rem; }
@media (max-width: 640px) {
  .espace-groupes button { flex-direction: column; gap: 2px; font-size: .82rem; padding: 7px 4px; }
}
.espace-onglets button.hors-groupe { display: none; }
.espace-defile.defile-seul { display: none; }
/* « Ma production » : journal, produits et stocks, codes QR, boutique (production.js). */
.prod-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.prod-onglet { font: inherit; font-weight: 600; border: 1px solid #c9d1d6; background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer; color: var(--ardoise); display: inline-flex; gap: 6px; align-items: center; }
.prod-onglet[aria-selected="true"] { background: var(--ardoise); color: #fff; border-color: var(--ardoise); }
.prod-demo { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; background: var(--orange); color: #fff; border-radius: 6px; padding: 1px 6px; }
.prod-avis { min-height: 1.4em; margin: 0 0 8px; color: #2e7d32; font-weight: 600; }
.prod-avis-erreur { color: #b3261e; }
.prod-tete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.prod-tete h3 { margin: 0; }
.prod-tete select, .prod-barre input, .prod-mouvement select, .prod-mouvement input, .prod-rabais input, .prod-rabais select { font: inherit; padding: 7px 10px; border: 1px solid #c9d1d6; border-radius: 10px; background: #fff; min-width: 0; }
.prod-chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr)); gap: 10px; margin: 12px 0; }
.prod-tuile { background: #fff; border: 1px solid var(--trait); border-radius: 12px; padding: 10px 12px; }
.prod-tuile b { display: block; font-size: 1.35rem; color: var(--ardoise); }
.prod-tuile span { font-size: .86rem; color: var(--doux); }
.prod-tuile-alerte { border-color: #e9a23b; background: #fff8ec; }
.prod-graphe { width: 100%; height: auto; max-height: 190px; background: #fff; border: 1px solid var(--trait); border-radius: 12px; margin: 6px 0 14px; }
.prod-form { background: #fff; border: 1px solid var(--trait); border-radius: 14px; padding: 14px 16px; margin: 12px 0; }
.prod-form h4 { margin: 0 0 8px; }
.prod-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; }
.prod-cases { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0; }
.prod-defile { overflow-x: auto; max-width: 100%; }
.prod-table { border-collapse: collapse; width: 100%; font-size: .92rem; background: #fff; }
.prod-table th, .prod-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.prod-table th { background: #f3f5f6; white-space: nowrap; }
.prod-plus { color: #2e7d32; font-weight: 700; } .prod-moins { color: #b3261e; font-weight: 700; }
.prod-lien { font: inherit; background: none; border: 0; color: var(--orange-fonce); text-decoration: underline; cursor: pointer; padding: 2px 4px; }
.prod-barre { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.prod-barre input { flex: 1 1 220px; }
.prod-cat h4 { margin: 18px 0 8px; color: var(--ardoise); }
.prod-produits { display: block; }
.prod-cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 10px; }
.prod-cat h4 { grid-column: 1 / -1; }
.prod-produit { background: #fff; border: 1px solid var(--trait); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.prod-bas { border-color: #e9a23b; }
.prod-inactif { opacity: .55; }
.prod-produit-tete { display: flex; justify-content: space-between; gap: 10px; }
.prod-produit-tete b, .prod-produit-tete .aide { display: block; }
.prod-stock { text-align: right; flex: none; }
.prod-stock b { font-size: 1.5rem; color: var(--ardoise); }
.prod-stock span { display: block; font-size: .8rem; color: var(--doux); }
.prod-info { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.prod-etiquette { font-size: .75rem; font-weight: 700; border-radius: 6px; padding: 1px 7px; background: #eceff1; color: var(--doux); }
.prod-etiquette-ok { background: #e6f4ea; color: #2e7d32; }
.prod-mouvement { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.prod-mouvement select { flex: 1 1 150px; }
.prod-mouvement input[type="number"] { flex: 0 0 84px; }
.prod-mouvement input[type="date"] { flex: 1 1 140px; }
.prod-mouvement input[type="text"] { flex: 1 1 160px; }
.prod-gestes { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 100%; }
.prod-gestes .fond-choix[aria-pressed="true"] { background: var(--ardoise); color: #fff; border-color: var(--ardoise); }
.prod-apercu { flex: 1 1 100%; margin: 0; font-size: .86rem; color: var(--doux); }
.prod-actions { display: flex; gap: 10px; }
.prod-historique { margin: 18px 0; }
.prod-historique summary { cursor: pointer; font-weight: 700; }
.prod-dialogue { border: 0; border-radius: 16px; padding: 20px; max-width: min(92vw, 420px); box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
.prod-dialogue::backdrop { background: rgba(20, 30, 36, .55); }
.prod-dialogue .qr-code { width: 100%; max-width: 300px; display: block; margin: 0 auto; }
.prod-code { font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem; text-align: center; font-weight: 700; letter-spacing: .04em; }
.prod-video { width: 100%; border-radius: 12px; background: #000; }
.prod-planche { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.prod-etiquette-qr { margin: 0; background: #fff; border: 1px dashed #c9d1d6; border-radius: 10px; padding: 8px; text-align: center; break-inside: avoid; }
.prod-etiquette-qr .qr-code { width: 100%; max-width: 140px; }
.prod-etiquette-qr figcaption b, .prod-etiquette-qr figcaption span, .prod-etiquette-qr figcaption code { display: block; font-size: .8rem; }
.prod-bandeau { background: #fff4ea; border-left: 4px solid var(--orange); border-radius: 0 10px 10px 0; padding: 10px 12px; margin-bottom: 14px; font-size: .94rem; }
.prod-boutique-haut { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: center; background: #fff; border: 1px solid var(--trait); border-radius: 14px; padding: 14px; }
.prod-boutique-qr .qr-code { width: 100%; }
.prod-lien-champ { width: 100%; font: inherit; font-size: .88rem; padding: 7px 10px; border: 1px solid #c9d1d6; border-radius: 10px; background: #f7f9fa; margin-bottom: 8px; }
.prod-logo { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.prod-logo-apercu { width: 84px; height: 84px; object-fit: contain; border: 1px solid var(--trait); border-radius: 12px; background: #fff; padding: 4px; }
.prod-echantillon { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-radius: 12px; padding: 12px; margin: 10px 0; border: 1px solid var(--trait); }
.prod-echantillon-bouton { color: #1f1a14; font-weight: 700; border-radius: 8px; padding: 6px 12px; }
.prod-section { margin: 18px 0; }
.prod-rabais { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.prod-rabais input { width: 130px; }
.prod-commande { background: #fff; border: 1px solid var(--trait); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.prod-commande-demandee { border-color: var(--orange); }
.prod-commande-annulee { opacity: .55; }
.prod-commande ul { margin: 6px 0; padding-left: 20px; }
@media (max-width: 640px) {
  .prod-boutique-haut { grid-template-columns: minmax(0, 1fr); }
  .prod-boutique-qr { max-width: 180px; }
}
@media print {
  body.prod-imprimer * { visibility: hidden; }
  body.prod-imprimer .prod-planche, body.prod-imprimer .prod-planche * { visibility: visible; }
  body.prod-imprimer .prod-planche { position: absolute; left: 0; top: 0; width: 100%; grid-template-columns: repeat(4, 1fr); }
}
/* Les parametres propres a une couche (chemins existants, source d energie) et la comparaison des sources. */
.opt-param { display: block; margin: 8px 0; font-weight: 600; }
.opt-param > span:first-child { display: block; margin-bottom: 4px; }
.opt-param select { font: inherit; padding: 6px 10px; border: 1px solid #c9d1d6; border-radius: 10px; max-width: 100%; }
.opt-param small { display: block; font-weight: 400; }
.opt-energie { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 8px 0; }
.opt-energie th, .opt-energie td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.opt-energie-choisie td { background: #fff4d6; font-weight: 700; }
.opt-energie-actuelle td { color: var(--doux); }
.prod-form input[type="color"] { width: 100%; height: 44px; padding: 3px; border: 1px solid #c9d1d6; border-radius: 10px; background: #fff; cursor: pointer; }
.pt3-contexte { border-top: 1px dashed var(--trait); margin-top: 10px; padding-top: 8px; }
.pt3-contexte h4 { margin: 0 0 6px; }
/* L'electricite d'un batiment : les options comparees sur 10 ans. */
.pt3-energie { margin: 8px 0; }
.pt3-options { font-size: .84rem; }
.pt3-options td:first-child { width: 26px; }
.pt3-options .prod-etiquette { margin-left: 6px; }
.pt3-option-choisie td { background: #fff4d6; font-weight: 700; }
/* Les photos d'un produit (Ma production) : la principale d'abord, jusqu'a 6. */
.prod-images { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; align-items: flex-start; }
.prod-image { margin: 0; width: 92px; }
.prod-image img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--trait); display: block; background: #f3f1ec; }
.prod-image-premiere img { border: 2px solid var(--ardoise); }
.prod-image figcaption { display: flex; justify-content: space-between; gap: 4px; font-size: .74rem; }
.prod-image-ajout { width: 92px; height: 92px; border: 2px dashed #c9d1d6; border-radius: 10px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: .82rem; color: var(--doux); cursor: pointer; position: relative; }
.prod-image-ajout input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.prod-image-ajout:focus-within { outline: 2px solid var(--ardoise); outline-offset: 2px; }

/* ---- Temps des sucres en direct (temps-sucres.js) : espace client et application de terrain ---- */
.tds-barre { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tds-direct { background: #5d6d75; border-color: #5d6d75; }
.tds-direct:hover { background: #4a585f; border-color: #4a585f; }
.tds-direct.tds-direct-actif { background: #c62828; border-color: #c62828; }
.tds-etat { font-weight: 700; }
.tds-simule { flex-basis: 100%; font-size: .9rem; color: #8a4b00; background: #fff4e0; border-radius: 8px; padding: 6px 10px; }

/* Fiche technique d'un travail (fiches-travaux.js) : mesures et materiel net, sous la fiche de la planification. */
.ft-fiche { margin: 8px 0; border: 1px solid var(--trait); border-radius: 10px; background: var(--creme); padding: 6px 10px; }
.ft-fiche summary { font-weight: 700; cursor: pointer; color: var(--ardoise); }
.ft-liste { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 4px 12px; margin: 8px 0; font-size: .88rem; }
.ft-liste dt { color: var(--doux); }
.ft-liste dd { margin: 0; font-variant-numeric: tabular-nums; }
.ft-liste dd.ft-alerte { color: #b3261e; font-weight: 600; }
.ft-titre { margin: 8px 0 4px; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); }
.ft-materiel { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ft-materiel td { padding: 3px 4px; border-bottom: 1px solid var(--trait); }
.ft-qte { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ft-option td { color: var(--doux); font-style: italic; }
.ft-note { font-size: .8rem; color: var(--doux); margin: 6px 0 2px; }
@media (max-width: 600px) { .ft-liste { grid-template-columns: 1fr; gap: 0; } .ft-liste dt { margin-top: 5px; } }

/* Le plan officiel (plan-officiel.js) : la carte par annee, le materiel a commander, les travaux a effectuer. */
.po-tete h3 { margin: 0 0 4px; }
.po-annees { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.po-annees .fond-choix { display: inline-flex; align-items: center; gap: 6px; }
.po-pastille { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; border: 1px solid rgba(0, 0, 0, .2); }
.pt3-leg .po-pastille { width: 12px; height: 12px; }
.po-an-0 { background: #e4572e; }
.po-an-1 { background: #f3a712; }
.po-an-2 { background: #d81b60; }
.po-an-3 { background: #8e24aa; }
.po-an-4 { background: #6d4c41; }
.po-an-5 { background: #37474f; }
.po-fait { background: #2e9d4f; }
.po-materiel, .po-liste { margin-top: 18px; padding-top: 12px; border-top: 2px solid var(--trait); }
.po-materiel h3, .po-liste h3 { margin: 0 0 6px; }
.po-reglage input[type="number"] { width: 90px; }
.po-table-mat tr.po-cat td { background: var(--creme); font-weight: 700; color: var(--ardoise); }
.po-table-mat tr.po-exclu td { color: #9aa7b0; text-decoration: line-through; }
.po-table-mat tr.po-exclu td:first-child { text-decoration: none; }
.po-commande { font-weight: 700; }
.po-annee { display: flex; align-items: center; gap: 8px; margin: 16px 0 4px; font-size: 1.05rem; }
.po-travail { border-left: 5px solid var(--couche); padding: 8px 0 10px 10px; margin: 8px 0; border-top: 1px dashed var(--trait); break-inside: avoid; }
.po-travail.po-fait-t { background: var(--foret-clair); }
.po-travail-tete { display: flex; align-items: center; gap: 8px; }
.po-nom { font-size: 1rem; }
.po-decision { margin: 6px 0; }
.po-note { font-style: italic; margin: 4px 0; }
@media print {
  .po-cadre, .po-annees, .po-reglage, .po-materiel .pt-actions, .po-materiel .pt-etat, .pt3-legende, .po-tete .pt-actions { display: none !important; }
  .po-table-mat input { display: none; }
  .po-table-mat tr.po-exclu { display: none; }
  .ft-fiche { break-inside: avoid; }
}
.opt-badge-service { background: var(--ardoise); color: #fff; }
/* Plan officiel : la legende se clique (An 1, An 2, Fait) pour ne montrer que ces travaux. */
.po-leg { font: inherit; background: #fff; border: 1px solid #c9d1d6; border-radius: 999px; padding: 4px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ardoise); }
.po-leg:hover { border-color: var(--ardoise); }
.po-leg[aria-pressed="true"] { background: var(--ardoise); color: #fff; border-color: var(--ardoise); }

/* ---------------------------------------------------------------- objets connectes (objets-connectes.js) */
.cons-iot { border-top: 1px solid var(--trait); margin-top: 10px; padding-top: 10px; }
.cons-iot-titre { margin: 0 0 6px; font-size: .95rem; color: var(--ardoise); }
.cons-iot-alerte { margin: 0 0 6px; padding: 8px 10px; border-radius: 8px; background: #fff3e0; color: var(--orange-fonce); font-weight: 600; font-size: .88rem; }
.cons-iot-cle { display: block; margin: 4px 0 8px; padding: 6px 8px; border-radius: 6px; background: #fff; border: 1px solid var(--trait); font-size: .8rem; word-break: break-all; user-select: all; }
.cons-iot-exemple { margin: 4px 0 8px; padding: 8px; border-radius: 6px; background: #fff; border: 1px solid var(--trait); font-size: .75rem; white-space: pre-wrap; word-break: break-word; }
.cons-iot-mesures { width: 100%; border-collapse: collapse; margin: 4px 0 8px; font-size: .88rem; }
.cons-iot-mesures th { text-align: left; font-weight: 600; padding: 2px 6px 2px 0; }
.cons-iot-mesures td { padding: 2px 6px; }
.cons-iot-valeur { fill: var(--foret); font-weight: 700; }

/* ---------------------------------------------------------------- administratif (administratif.js) */
.admin-renseignements { background: var(--creme); border-radius: var(--rayon); padding: 10px 14px; margin: 10px 0 16px; }
.admin-renseignements summary { cursor: pointer; font-weight: 600; color: var(--ardoise); }
.admin-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 10px; }
.admin-groupe { border: 1px solid var(--trait); border-radius: 10px; padding: 8px 12px; margin: 0; min-width: 0; }
.admin-groupe legend { font-weight: 600; padding: 0 4px; }
.admin-groupe .champ { margin-bottom: 6px; }
.admin-groupe input { width: 100%; padding: 6px 9px; }
.admin-titre { margin: 8px 0; }
.admin-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.admin-carte { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--trait); border-radius: var(--rayon); padding: 12px 14px; background: #fff; }
.admin-carte p { margin: 2px 0 8px; flex: 1; }
.admin-carte .bouton { align-self: flex-start; }
.admin-zone { margin-top: 18px; }
.admin-document { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 20px 24px; background: #fff; max-width: 900px; overflow-x: auto; }
.admin-doc-tete { border-bottom: 2px solid var(--ardoise); margin-bottom: 12px; padding-bottom: 8px; }
.admin-doc-tete h2 { margin: 4px 0; }
.admin-doc-sur { margin: 0; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; color: var(--doux); }
.admin-section h3 { font-size: 1rem; margin: 16px 0 6px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--trait); padding: 5px 8px; text-align: left; vertical-align: top; }
.admin-table th { width: 42%; font-weight: 600; }
.admin-grille th { width: auto; background: var(--creme); }
.admin-manque { color: var(--orange-fonce); font-style: italic; }
.admin-verifier { list-style: none; padding: 0; margin: 0; }
.admin-verifier li { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.admin-pied { margin-top: 18px; font-size: .78rem; color: var(--doux); }
@media (max-width: 600px) { .admin-document { padding: 14px; } .admin-table { font-size: .82rem; } }
/* Le cadre du document : en-tete et pied (mentions d'AcériDrone) repetes sur chaque page imprimee. */
.admin-cadre { width: 100%; border-collapse: collapse; }
.admin-cadre > thead td, .admin-cadre > tfoot td, .admin-cadre > tbody > tr > td { padding: 0; }
.admin-entete { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--doux); border-bottom: 1.5px solid #e8a33d; padding-bottom: 6px; margin-bottom: 12px; }
.admin-logo-ad { height: 22px; width: auto; }
.admin-entete-droite { margin-left: auto; white-space: nowrap; }
.admin-pied-page { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .72rem; color: var(--doux); border-top: 1px solid var(--trait); padding-top: 6px; margin-top: 16px; }
.admin-couverture { display: flex; flex-direction: column; gap: 6px; padding: 24px 0 18px; border-bottom: 2px solid var(--ardoise); margin-bottom: 16px; }
.admin-couv-logos { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.admin-couv-logo { max-height: 110px; max-width: 45%; width: auto; object-fit: contain; }
.admin-couv-logo-ad { height: 64px; width: auto; margin-left: auto; }
.admin-couverture h2 { font-size: 1.7rem; margin: 2px 0 6px; }
.admin-couv-qui { font-size: 1.15rem; font-weight: 600; margin: 0; }
.admin-couv-erabliere { margin: 0; color: var(--doux); }
.admin-couv-but { margin: 14px 0 6px; }
.admin-couv-meta { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0; font-size: .9rem; }
.admin-couv-meta dt { font-weight: 600; }
.admin-couv-meta dd { margin: 0; }
.admin-couv-avis { font-size: .78rem; color: var(--doux); margin-top: 18px; }
.admin-toc ol { margin: 4px 0 8px; padding-left: 22px; }
.admin-toc li { padding: 2px 0; }
.admin-toc a { color: inherit; }
.admin-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-logo legend { width: 100%; }
.admin-logo-apercu { max-height: 60px; max-width: 160px; width: auto; border: 1px solid var(--trait); border-radius: 6px; padding: 4px; background: #fff; }
.admin-logo-choix { position: absolute; width: 1px; height: 1px; opacity: 0; }
.admin-impression { display: none; }
@media print {
  @page { size: Letter; margin: 14mm 14mm 14mm; }
  .impression-admin body > :not(.admin-impression) { display: none !important; }
  .impression-admin .admin-impression { display: block; }
  .impression-admin .admin-document { max-width: none; border: 0; padding: 0; border-radius: 0; overflow: visible; }
  .impression-admin .admin-couverture { break-after: page; min-height: 215mm; border-bottom: 0; justify-content: center; }
  .impression-admin .admin-toc { break-after: page; }
  .impression-admin .admin-section h3 { break-after: avoid; }
  .impression-admin .admin-table tr { break-inside: avoid; }
}

/* ---------------------------------------------------------------- tranchee et tubulure (tranchee.js) */
.tr-profil { width: 100%; height: auto; display: block; background: #fff; border: 1px solid var(--trait); border-radius: 10px; }
.tr-deblai { fill: #c8a27a; fill-opacity: .35; stroke: none; }
.tr-tolerance { fill: #2e7d32; fill-opacity: .18; stroke: none; }
.tr-sol { fill: none; stroke: #6d4c41; stroke-width: 2; }
.tr-fond { fill: none; stroke: #1565c0; stroke-width: 2; stroke-dasharray: 7 4; }
.tr-grille { stroke: var(--trait); stroke-width: 1; }
.tr-axe { font-size: 10px; fill: var(--doux); }
.tr-pt { fill: #7f8c8d; stroke: #fff; stroke-width: 1; }
.tr-pt-ok { fill: #2e7d32; }
.tr-pt-haut { fill: #c77c02; }
.tr-pt-bas { fill: #c62828; }
.tr-ici { fill: var(--orange); stroke: #fff; stroke-width: 2; }
.tr-ici-ligne { stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 3 3; }
.tr-lecture { border-radius: 14px; padding: 14px 18px; margin: 8px 0; color: #fff; background: #5d6d75; }
.tr-lecture .tr-grand { font-size: clamp(1.6rem, 6vw, 2.8rem); font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
.tr-ton-bon { background: #2e7d32; }
.tr-ton-agir { background: #c77c02; }
.tr-ton-alerte { background: #9b2c2c; }
.tr-ton-neutre { background: #5d6d75; }
.tr-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; margin: 6px 0 10px; }
.tr-chiffre { background: var(--creme); border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; }
.tr-chiffre span { font-size: .78rem; color: var(--doux); }
.tr-chiffre b { font-size: 1.1rem; }
.tr-outils { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.tr-canne input { width: 90px; padding: 8px; font-size: 1rem; }
.tr-alerte { color: #9b2c2c; font-weight: 600; }

/* ---------------------------------------------------------------- equipe et chantiers (equipe.js) */
.eq-haut { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .eq-haut { grid-template-columns: 1fr; } }
.eq-carte { position: relative; height: 62vh; min-height: 360px; border-radius: var(--rayon); overflow: hidden; background: #e8ece9; touch-action: none; }
.eq-svg { width: 100%; height: 100%; display: block; cursor: grab; }
.eq-nom { font-size: 13px; font-weight: 700; fill: #fff; paint-order: stroke; stroke: #1f2a30; stroke-width: 3px; }
.eq-carte-boutons { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.eq-carte-boutons .bouton { background: #fff; min-width: 40px; }
.eq-trajet { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.eq-trajet select, .eq-trajet input { padding: 6px 8px; }
.eq-bloc { background: var(--creme); border-radius: var(--rayon); padding: 12px 14px; margin-bottom: 12px; }
.eq-bloc h3 { margin: 0 0 8px; }
.eq-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.eq-membres { list-style: none; margin: 0; padding: 0; }
.eq-membres li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 0; border-bottom: 1px solid var(--trait); }
.eq-membres .bouton { margin-left: auto; }
.eq-pastille { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.eq-ajout { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.eq-ajout input { flex: 1 1 160px; padding: 7px 10px; }
.eq-vues { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 2px 0 2px 18px; font-size: 0.9em; }
.eq-vues .aide { flex: 1 1 100%; }
.eq-vue { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.eq-ajout .eq-vues { padding-left: 0; }
.eq-ajout .eq-vue input { flex: none; padding: 0; }
.eq-tache { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; background: #fff; margin-bottom: 6px; cursor: pointer; border: 1px solid var(--trait); }
.eq-tache > div { flex: 1; min-width: 0; }
.eq-tache .eq-pastille { margin-top: 5px; }
.eq-choisie { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange) inset; }
.eq-profil-svg { margin: 8px 0; }
.eq-bilan { margin: 6px 0 0; padding-left: 18px; }
.eq-dialogue { border: 0; border-radius: var(--rayon); padding: 18px; max-width: 640px; width: calc(100vw - 32px); max-height: 90vh; overflow: auto; box-shadow: var(--ombre); }
.eq-dialogue::backdrop { background: rgba(20, 30, 36, .45); }
.eq-form { display: grid; gap: 8px; }
.eq-form label { display: grid; gap: 3px; font-weight: 600; font-size: .9rem; }
.eq-form input, .eq-form select, .eq-form textarea { padding: 7px 10px; }
.eq-form .eq-coche { display: flex; align-items: center; gap: 6px; }
.eq-champs-profil { border: 1px solid var(--trait); border-radius: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.eq-form .boutons { display: flex; flex-wrap: wrap; gap: 6px; }
/* la carte 3D des chantiers (chantiers3d.js) : la vue du plan officiel, sans ses bandeaux */
.eq-carte.eq-carte-3d { height: auto; min-height: 0; overflow: visible; background: none; touch-action: auto; }
.eq-carte-3d .opt3d { margin-bottom: 8px; }
.opt3d.foret-demo.eq-scene { height: 66vh; min-height: 420px; }
@media (max-width: 900px) { .eq-scene .foret-vue { height: 60vh; } }
.eq-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 4px 0 6px; font-size: .9rem; }
.eq-legende .bouton { margin-left: auto; }
.eq-pastille-travail { background: linear-gradient(90deg, #e4572e 0 33%, #f3a712 33% 66%, #d81b60 66%); border: 1px solid #9aa7b0; }
.eq-provisoire { display: block; margin-top: 4px; padding: 4px 8px; border-radius: 6px; background: #fff8e1; color: #6d4c00; font-size: .85em; }

/* Indices visibles (RGB) calcules sur l'orthophoto (indices-rgb.js) */
.irgb-avertissement { background: #fff6e0; border-left: 4px solid #e8a33d; padding: 8px 12px; border-radius: 6px; font-size: 0.92em; margin: 0 0 8px; }
.irgb-saison { background: #fdeee6; border-left-color: #e8541e; }
.irgb-barre { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 8px 0; }
.irgb-barre select { padding: 6px 8px; max-width: 100%; }
.irgb-case { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.irgb-aide { margin: 0 0 8px; }
.irgb-cadre { position: relative; overflow: auto; max-height: 72vh; border-radius: 10px; background: #1d2a30; }
.irgb-toile { display: block; width: 100%; height: auto; cursor: crosshair; }
.irgb-zoom { position: sticky; left: 8px; bottom: 8px; display: flex; gap: 6px; padding: 8px; width: max-content; }
.irgb-zoom .bouton { background: #fff; min-width: 40px; }
.irgb-bas { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-start; margin-top: 10px; }
.irgb-legende { flex: 1 1 260px; }
.irgb-rampe { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #a50026, #f46d43, #fee08b, #a6d96a, #1a9850); }
.irgb-chiffres { display: flex; justify-content: space-between; font-size: 0.85em; margin-top: 2px; }
.irgb-histo { flex: 0 1 320px; max-width: 100%; height: 70px; background: #f4f1ea; border-radius: 6px; }
.irgb-lecture { flex: 1 1 100%; margin: 0; }
.eq-vue-sous { padding-left: 18px; }
.eq-vue input:disabled + * , .eq-vue:has(input:disabled) { opacity: .5; }
.eq-medias { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.eq-media { margin: 0; background: #fff; border: 1px solid var(--trait); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.eq-media img, .eq-media video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: #1d2a30; display: block; }
.eq-media figcaption { font-size: .8em; color: var(--doux); }
.eq-media.eq-choisie { outline: 3px solid #ffd400; }

/* Analyses de sol (sols3d.js) */
.sol-source { margin: 0 0 8px; font-weight: 600; }
.sol-indicateurs, .sol-filtres { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.sol-choix { border: 1px solid #b9c4bd; background: #fff; color: inherit; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .9rem; cursor: pointer; }
.sol-choix[aria-pressed="true"] { background: #23412f; border-color: #23412f; color: #fff; }
.sol-choix:focus-visible { outline: 3px solid #f2c12e; outline-offset: 1px; }
.sol-aide { margin: 0 0 8px; }
.sol-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 14px; align-items: start; }
.sol-carte-col { min-width: 0; }
.sol-carte { position: relative; }
.sol-carte .opt3d { margin-bottom: 8px; }
.sol-sans-3d { padding: 24px; background: #f2f5f3; border-radius: var(--rayon); }
.sol-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 4px 0 6px; font-size: .9rem; }
.sol-legende .bouton { margin-left: auto; }
.sol-degrade { display: inline-block; width: 120px; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #d9452b, #f2c12e, #2e9d5b); }
.sol-pastille-parcelle { background: #263238; border: 2px solid #fff; box-shadow: 0 0 0 1px #263238; }
.sol-fiche { background: #f6f8f6; border: 1px solid #dfe5e0; border-radius: var(--rayon); padding: 12px 14px; max-height: 78vh; overflow: auto; }
.sol-fiche h3 { margin: 0 0 6px; font-size: 1.05rem; }
.sol-fiche-titre { display: flex; align-items: center; gap: 6px; }
.sol-fiche-indic { margin: 0 0 8px; font-weight: 600; }
.sol-note { font-size: .92rem; }
.sol-reco { background: #fff; border-left: 4px solid #2e9d5b; border-radius: 6px; padding: 8px 10px; margin: 0 0 10px; }
.sol-reco ul { margin: 4px 0 0; padding-left: 18px; }
.sol-sous-titre { margin: 10px 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: #5b6b61; font-weight: 700; }
.sol-carences { display: grid; gap: 4px; }
.sol-carence { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: .92rem; }
.sol-carence span { color: #4a5a50; }
.sol-jauge { margin: 6px 0 8px; font-size: .9rem; }
.sol-jauge-fond { position: relative; height: 10px; background: #e3e8e4; border-radius: 5px; margin-top: 4px; }
.sol-jauge-barre { height: 100%; border-radius: 5px; }
.sol-jauge-cible { position: absolute; top: -3px; bottom: -3px; width: 3px; background: #23412f; border-radius: 2px; }
.sol-jauge-note { font-size: .8rem; color: #5b6b61; margin-top: 2px; }
.sol-liste { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 3px 10px; margin: 10px 0; font-size: .9rem; }
.sol-liste dt { color: #5b6b61; }
.sol-liste dd { margin: 0; font-variant-numeric: tabular-nums; }
.sol-labo { margin: 8px 0; font-size: .88rem; }
.sol-labo summary { cursor: pointer; font-weight: 600; }
.sol-table-labo, .sol-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.sol-table-labo th, .sol-table-labo td, .sol-table th, .sol-table td { border-bottom: 1px solid #e1e6e2; padding: 4px 6px; text-align: left; white-space: nowrap; }
.sol-table-labo tbody th { font-weight: 400; color: #4a5a50; }
.sol-tableau-hote { margin-top: 18px; }
.sol-defile { overflow-x: auto; }
.sol-table thead th { font-size: .82rem; color: #4a5a50; }
.sol-table tbody tr { cursor: pointer; }
.sol-table tbody tr:hover, .sol-table tbody tr:focus-visible { background: #eef3ef; outline: none; }
.sol-table tbody tr.sol-ligne-choisie { background: #fff6cf; }
.sol-notes { margin-top: 18px; font-size: .92rem; }
.sol-notes ul { padding-left: 18px; }
@media (max-width: 860px) { .sol-corps { grid-template-columns: minmax(0, 1fr); } .sol-fiche { max-height: none; } }

/* Échantillonnage du sol (campagnes-sol.js), résultats et prescriptions (resultats-sol.js), protocole (protocole-sol.js) */
.solc-barre { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.solc-barre .bouton[aria-pressed="true"] { background: #23412f; border-color: #23412f; color: #fff; }
.solc-alerte { color: #b3261e; font-weight: 600; }
.solc-alerte:empty { display: none; }
.solc-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 14px; align-items: start; }
.solc-col { min-width: 0; }
.solc-carte { position: relative; min-height: 120px; }
.solc-carte .opt3d { margin-bottom: 8px; }
.solc-form { display: grid; gap: 8px; }
.solc-form fieldset { border: 1px solid #dfe5e0; border-radius: var(--rayon); padding: 8px 10px; display: grid; gap: 6px; }
.solc-champ { display: grid; gap: 2px; font-size: .92rem; }
.solc-champ > span { font-weight: 600; }
.solc-champ input, .solc-champ select, .solc-champ textarea { font: inherit; padding: 5px 7px; border: 1px solid #b9c4bd; border-radius: 6px; min-width: 0; }
.solc-case { display: block; font-size: .92rem; }
.solc-case small { display: block; margin-left: 22px; }
.solc-resume { margin: 6px 0; }
.solc-chiffres { font-weight: 700; margin: 4px 0; }
/* La division en secteurs proposee par AcériDrone (nouvelle campagne d analyses de sol). */
.solc-division { margin: 10px 0; }
.solc-division h4 { margin: 8px 0 4px; }
.solc-comparaison { margin: 6px 0 8px; padding-left: 20px; }
.solc-comparaison li { margin: 2px 0; }
.solc-division-detail summary { cursor: pointer; font-weight: 600; margin: 6px 0; }
.solc-division-detail { max-width: 100%; overflow-x: auto; }
.solc-division-detail .sol-table { font-size: 0.9em; }
.solc-division-detail td { white-space: normal; }
.solc-secteur-fiche { margin: 8px 0; padding: 8px 12px; border-left: 4px solid #e0b100; background: #fffbea; border-radius: 6px; }
.solc-secteur-fiche p { margin: 3px 0; }
.solc-vol { margin: 10px 0; padding: 8px 12px; border: 1px solid #c8d8f0; border-radius: 8px; background: #f3f8ff; }
.solc-vol h4 { margin: 0 0 4px; }
/* La barre des secteurs au-dessus des cartes de planification (couche-secteurs.js). */
.csec-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; font-size: .9rem; }
.csec-titre { font-weight: 700; }
.csec-note { color: #5b6b61; font-size: .8rem; }
.solc-division-detail tr[data-secteur] { cursor: pointer; }
.solc-pourquoi td { white-space: normal; color: #4b5563; font-style: italic; border-top: none; padding-top: 0; }
.solc-defile { overflow-x: auto; margin-top: 12px; }
.solc-etapes { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 4px 0 10px; counter-reset: etape; }
.solc-etapes li { counter-increment: etape; padding: 3px 10px; border-radius: 999px; background: #eef1ee; color: #5b6b61; font-size: .85rem; }
.solc-etapes li::before { content: counter(etape) ". "; }
.solc-etapes li.solc-faite { background: #dcefe2; color: #1f5f36; }
.solc-etapes li.solc-courante { background: #23412f; color: #fff; font-weight: 700; }
.solc-etape { margin-top: 10px; }
.solc-saisie input { width: 6.5em; font: inherit; padding: 2px 4px; border: 1px solid #c8d0ca; border-radius: 4px; }
.solc-saisie input[type="text"] { width: 9em; }
.solr-preparatoire { background: #fff4d6; border-left: 4px solid #e0a100; padding: 8px 10px; border-radius: 6px; font-weight: 600; }
.solr-valide { background: #e3f4e8; border-left: 4px solid #2e9d5b; padding: 8px 10px; border-radius: 6px; font-weight: 600; }
.solr-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.solr-carte { background: #f6f8f6; border: 1px solid #dfe5e0; border-radius: var(--rayon); padding: 10px 12px; font-size: .92rem; }
.solr-carte p { margin: 4px 0; }
.solr-reco { font-weight: 600; color: #1f5f36; }
.solr-ok { color: #1f7a45; font-weight: 600; }
.solr-bas { color: #b3261e; font-weight: 600; }
.solr-neutre { color: #5b6b61; }
.solr-form { margin-top: 14px; padding: 10px 12px; border: 1px dashed #b9c4bd; border-radius: var(--rayon); }
.solr-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; }
.solr-galerie figure { margin: 0; }
.solr-galerie img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; background: #eef1ee; }
.solr-galerie figcaption { font-size: .78rem; color: #5b6b61; }
.solr-profils { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 10px 0 16px; }
.solr-profils figure { margin: 0; }
.solr-profils canvas { width: 100%; height: auto; display: block; border-radius: 6px; background: #eef1ee; }
.solr-profils figcaption { font-size: .8rem; color: #3b4a40; margin-top: 4px; }
.solr-teinte { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid #0003; margin: 0 2px 0 6px; vertical-align: middle; }
.solr-indices { display: block; color: #8a4b00; margin-top: 2px; }
.solp-dessin { width: 100%; max-width: 420px; height: auto; display: block; margin: 6px 0; }
.solp-impression { display: none; }
.solp-doc h1 { font-size: 1.4rem; margin: 4px 0; }
.solp-doc h2 { font-size: 1.08rem; margin: 14px 0 4px; }
.solp-entete { font-size: .85rem; color: #5b6b61; }
.solp-sous { color: #5b6b61; margin: 0 0 8px; }
.solp-note { font-size: .88rem; color: #3b4a40; }
.solp-table { border-collapse: collapse; width: 100%; font-size: .82rem; }
.solp-table th, .solp-table td { border: 1px solid #c8d0ca; padding: 3px 5px; text-align: left; }
/* La liste du materiel : une vignette par article (photo libre, sans marque). */
.solp-materiel td:first-child { width: 96px; padding: 2px; }
.solp-materiel-photo { display: block; width: 92px; height: 70px; object-fit: cover; border-radius: 3px; }
.solp-materiel td { vertical-align: middle; }
.solp-credits { font-size: .72rem; color: #4a5a50; padding-left: 16px; word-break: break-all; }
.solp-etape { break-inside: avoid; }
/* La vraie photo d une etape du protocole (a cote du dessin) : imprime, site et tablette. */
.sol-photo-etape { margin: 6px 0 8px; }
.sol-photo-etape img { display: block; width: 100%; max-width: 520px; max-height: 260px; object-fit: cover; border-radius: 6px; }
.sol-photo-etape figcaption { font-size: .82rem; color: #4a5a50; margin-top: 3px; }
.sol-photo-etape small { display: block; font-size: .7rem; color: #7a8a80; }
.solp-etiquettes { display: grid; grid-template-columns: repeat(3, 66.7mm); grid-auto-rows: 25.4mm; column-gap: 3mm; }
.solp-etiquette { display: flex; align-items: center; gap: 2mm; padding: 1.5mm 2mm; overflow: hidden; break-inside: avoid; }
.solp-etiquette .qr-code { width: 20mm; height: 20mm; flex: none; }
.solp-etiquette-texte { display: grid; font-size: 7.5pt; line-height: 1.2; }
.solp-etiquette-texte b { font-size: 10pt; letter-spacing: .02em; }
.solp-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.solp-signature { border-top: 1px solid #333; padding-top: 4px; font-size: .8rem; min-height: 40px; }
/* Les etiquettes 2 x 4 po, 10 par feuille de 8,5 x 11 (gabarit Avery 5163 / 8163) : marges 0,5 po en haut, 0,156 po
   sur les cotes, 0,1875 po entre les colonnes. La page « etiquettes » s'imprime sans marge (imprimer a 100 %). */
.solp-feuille-2x4 { page: etiquettes; box-sizing: border-box; width: 8.5in; height: 11in; padding: 0.5in 0.156in 0; display: grid; grid-template-columns: 4in 4in; grid-template-rows: repeat(5, 2in); column-gap: 0.1875in; break-after: page; overflow: hidden; }
.solp-feuille-2x4:last-child { break-after: auto; }
.solp-et24 { box-sizing: border-box; width: 4in; height: 2in; padding: 0.12in 0.16in; display: flex; align-items: center; gap: 0.12in; overflow: hidden; font-family: system-ui, sans-serif; color: #000; }
.solp-et24 .qr-code { width: 1.3in; height: 1.3in; flex: none; }
.solp-et24-colis .qr-code, .solp-et24-boite .qr-code { width: 0.8in; height: 0.8in; align-self: flex-end; }
.solp-et24-texte { display: grid; gap: 1px; font-size: 8pt; line-height: 1.2; min-width: 0; flex: 1; }
.solp-et24-code { font-size: 15pt; letter-spacing: .03em; }
.solp-et24-gros { font-size: 11pt; font-weight: 700; }
.solp-et24-ligne { margin-top: 4px; }
.solp-et24-titre { font-size: 10pt; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.solp-et24-adresse { display: grid; line-height: 1.15; }
.solp-et24-adresse small { font-size: 6.5pt; text-transform: uppercase; color: #444; }
.solp-et24-a { font-size: 12pt; margin-top: 3px; }
/* « Analyser mon erabliere » : la trousse, l'equipe, l'avancement. */
.solc-trousse, .solc-equipe { border: 1px solid #dfe5e0; border-radius: var(--rayon); padding: 8px 12px; margin: 10px 0; background: #fbfcfb; }
.solc-trousse h4, .solc-equipe h4 { margin: 2px 0 6px; }
.solc-etapes-petites { margin: 2px 0 6px; }
.solc-etapes-petites li { font-size: .78rem; padding: 2px 8px; }
.solc-personnes { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.solc-personnes li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.solc-personnes select { width: 100%; max-width: 100%; min-width: 0; }
.solc-personnes li > span { flex: 1 1 180px; min-width: 0; }
.solc-trousse, .solc-equipe { min-width: 0; overflow-wrap: anywhere; }
.solc-inactive { opacity: .6; }
.solc-ligne { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.solc-ligne select { flex: 1 1 220px; width: 100%; max-width: 100%; min-width: 0; }
.solc-avance { display: grid; gap: 6px; margin: 8px 0; }
.solc-barre-tete { display: flex; align-items: center; gap: 4px; font-size: .86rem; }
.solc-barre-tete b { margin-left: auto; }
.solc-barre-fond { height: 8px; border-radius: 999px; background: #e7ece8; overflow: hidden; }
.solc-barre-plein { height: 100%; border-radius: 999px; }
.solp-et24-qr { display: grid; justify-items: center; gap: 2px; flex: none; }
.solp-et24-qr b { font-size: 7pt; letter-spacing: .02em; }
/* La marque d'AcériDrone sur les etiquettes : embleme + nom, sobre, lisible en noir et blanc. */
.solp-et24-marque { display: flex; align-items: center; gap: 4px; line-height: 1; }
.solp-et24-marque img { width: 0.22in; height: auto; display: block; }
.solp-et24-marque span { font-size: 9pt; letter-spacing: -.01em; }
.solp-et24-marque b { color: #e8541e; }
.solp-et24-marque small { font-size: 6pt; color: #555; margin-left: 2px; }
.solp-et24-qr .solp-et24-marque { flex-wrap: wrap; justify-content: center; gap: 2px 3px; margin-bottom: 2px; }
.solp-et24-qr .solp-et24-marque small { width: 100%; text-align: center; margin: 0; }
.solp-et24-texte > .solp-et24-marque { margin-bottom: 2px; }
.solc-ok { color: #1f7a45; font-weight: 600; }
.solc-coches { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 2px; font-size: .9rem; }
.solc-lecteur { display: grid; gap: 4px; margin: 6px 0; }
.solc-camera { width: min(560px, 94vw); border: 0; border-radius: 12px; padding: 12px; }
.solc-camera video { width: 100%; max-height: 60vh; background: #000; border-radius: 8px; display: block; }
.solr-couverture { break-after: page; min-height: 200mm; display: flex; flex-direction: column; justify-content: center; }
.solr-section { break-inside: auto; }
.solr-section h2 { break-after: avoid; }
@media print {
  .impression-sol body > :not(.solp-impression) { display: none !important; }
  .impression-sol .solp-impression { display: block; }
  .impression-sol .solp-etiquettes { margin: -4mm 0 0; }
  @page etiquettes { size: 8.5in 11in; margin: 0; }
  .impression-sol .sol-table tr, .impression-sol .solp-table tr { break-inside: avoid; }
}
@media (max-width: 860px) { .solc-grille { grid-template-columns: minmax(0, 1fr); } .solp-signatures { grid-template-columns: 1fr; } }

/* WikiAcéri : l'index (recherche, A à Z) et les définitions (arbre à gauche, illustration, termes liés). */
.wiki-recherche { max-width: 640px; margin-bottom: 22px; }
.wiki-recherche label { display: block; font-weight: 600; color: var(--ardoise); margin-bottom: 6px; }
.wiki-recherche input, .wiki-filtre { width: 100%; font: inherit; padding: 12px 16px; border: 1px solid var(--trait); border-radius: 10px; background: #fff; color: var(--texte); }
.wiki-recherche input:focus, .wiki-filtre:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
.wiki-aucun { margin-top: 10px; color: var(--doux); }
.wiki-az { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 30px; position: sticky; top: 0; background: #fff; padding: 8px 0; z-index: 2; }
.wiki-az a { display: inline-block; min-width: 34px; text-align: center; padding: 4px 8px; border: 1px solid var(--trait); border-radius: 8px; text-decoration: none; font-weight: 700; color: var(--ardoise); }
.wiki-az a:hover { background: var(--creme); color: var(--orange-fonce); }
.wiki-lettre { margin-bottom: 30px; scroll-margin-top: 64px; }
.wiki-lettre h2 { font-size: 1.7rem; color: var(--orange); border-bottom: 2px solid var(--trait); padding-bottom: 4px; }
.wiki-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.wiki-liste a { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--trait); border-radius: var(--rayon); text-decoration: none; color: var(--texte); background: #fff; }
.wiki-liste a:hover { border-color: var(--orange); box-shadow: var(--ombre); }
.wiki-liste b { display: block; color: var(--ardoise); font-size: 1.05rem; }
.wiki-liste a:hover b { color: var(--orange-fonce); }
.wiki-resume { display: block; color: var(--doux); font-size: .93rem; line-height: 1.5; margin-top: 4px; }
.wiki-etiquette { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; margin-top: 4px; background: var(--creme); color: var(--ardoise-clair); }
.wiki-cat-sol { background: #f1e6da; color: #6b4423; }
.wiki-cat-amendements { background: #fde8df; color: var(--orange-fonce); }
.wiki-cat-sylviculture, .wiki-cat-sante { background: var(--foret-clair); color: var(--foret); }
.wiki-cat-production { background: #fbf0d9; color: #8a5a00; }
.wiki-cat-territoire { background: #e3eef6; color: #245b80; }
.wiki-cat-gestion { background: #ebedef; color: var(--ardoise); }
.wiki-theme { min-width: 0; }
.wiki-theme-termes { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wiki-theme-termes li { max-width: 100%; }
.wiki-theme-termes a { display: block; max-width: 100%; padding: 3px 10px; border: 1px solid var(--trait); border-radius: 10px; background: #fff; font-size: .86rem; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.wiki-theme-termes a:hover { border-color: var(--orange); color: var(--orange-fonce); }
.wiki-avis { margin-top: 28px; font-size: .9rem; color: var(--doux); border-top: 1px solid var(--trait); padding-top: 14px; }

.wiki-cadre { padding-top: 32px; padding-bottom: 72px; }
.wiki-mise { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px; align-items: start; }
.wiki-arbre { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; font-size: .93rem; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--creme); padding: 12px 12px 16px; }
.wiki-arbre-boite > summary { font-weight: 700; color: var(--ardoise); cursor: pointer; padding: 4px 2px 8px; }
.wiki-accueil { display: block; font-weight: 600; margin: 2px 2px 10px; }
.wiki-filtre { padding: 8px 12px; margin-bottom: 10px; font-size: .92rem; }
.wiki-branche { margin-bottom: 4px; }
.wiki-branche > summary { cursor: pointer; font-weight: 600; color: var(--ardoise); padding: 6px 4px; border-radius: 6px; }
.wiki-branche > summary:hover { background: #fff; }
.wiki-branche > summary span { font-weight: 400; color: var(--doux); font-size: .82rem; }
.wiki-branche ul { list-style: none; margin: 2px 0 8px 10px; padding: 0 0 0 10px; border-left: 2px solid var(--trait); }
.wiki-branche li a { display: block; padding: 3px 6px; border-radius: 6px; color: var(--texte); text-decoration: none; line-height: 1.35; }
.wiki-branche li a:hover { background: #fff; color: var(--orange-fonce); }
.wiki-branche li a[aria-current="page"] { background: var(--orange); color: #fff; font-weight: 600; }
.wiki-article { min-width: 0; }
.wiki-fil { font-size: .9rem; color: var(--doux); margin-bottom: 10px; }
.wiki-article h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: .3em; }
.wiki-synonymes { color: var(--doux); font-style: italic; margin-bottom: .6em; }
.wiki-chapeau { font-size: 1.18rem; color: var(--doux); }
.wiki-figure { margin: 22px 0 28px; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--creme); padding: 12px; }
.wiki-svg { display: block; width: 100%; height: auto; max-height: 460px; }
.wiki-figure figcaption, .wiki-photo figcaption { font-size: .92rem; color: var(--doux); margin-top: 8px; text-align: center; }
.wiki-corps { font-size: 1.04rem; }
.wiki-corps h2 { font-size: 1.4rem; margin-top: 1.6em; }
.wiki-corps h3 { margin-top: 1.3em; }
.wiki-corps ul, .wiki-corps ol { padding-left: 1.3em; }
.wiki-corps li { margin-bottom: .35em; }
.wiki-corps table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .95rem; display: block; overflow-x: auto; }
.wiki-corps th, .wiki-corps td { border: 1px solid var(--trait); padding: 8px 10px; text-align: left; vertical-align: top; }
.wiki-corps th { background: var(--creme); color: var(--ardoise); }
.wiki-corps .encadre { background: var(--foret-clair); border-left: 4px solid var(--foret); border-radius: 0 var(--rayon) var(--rayon) 0; padding: 16px 20px; margin: 1.4em 0; }
.wiki-corps .encadre > :last-child { margin-bottom: 0; }
.wiki-photo { margin: 28px 0; }
.wiki-photo img { border-radius: var(--rayon); width: 100%; }
.wiki-voir { margin-top: 36px; }
.wiki-voir h2 { font-size: 1.3rem; }
.wiki-voir ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.wiki-voir a { display: block; height: 100%; padding: 12px 14px; border: 1px solid var(--trait); border-radius: 10px; text-decoration: none; color: var(--texte); }
.wiki-voir a:hover { border-color: var(--orange); }
.wiki-voir b { display: block; color: var(--ardoise); }
.wiki-voir span { display: block; font-size: .86rem; color: var(--doux); line-height: 1.45; margin-top: 2px; }
.wiki-suite { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.wiki-suite a { text-decoration: none; font-weight: 600; max-width: 48%; }
.wiki-suite a span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--doux); font-weight: 600; }
.wiki-suivant { margin-left: auto; text-align: right; }
@media (max-width: 900px) {
  .wiki-mise { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .wiki-arbre { position: static; max-height: none; }
  .wiki-cadre { padding-top: 20px; }
}
@media (max-width: 520px) { .wiki-cadre { padding-left: 16px; padding-right: 16px; } .wiki-suite a { max-width: 100%; } }
@media print { .wiki-arbre, .wiki-az, .wiki-recherche, .wiki-suite { display: none; } .wiki-mise { display: block; } }

/* Le bouton WikiAcéri du menu, à droite de « Soumission » : un encadré vert forêt, pour le distinguer. */
.bouton-wiki { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 2px solid var(--foret); border-radius: 999px; background: var(--foret-clair); color: var(--foret); font-weight: 700; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.bouton-wiki::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4.5A2.5 2.5 0 0 1 6.5 2H20v17H6.5a1.5 1.5 0 0 0 0 3H20v-2' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4.5A2.5 2.5 0 0 1 6.5 2H20v17H6.5a1.5 1.5 0 0 0 0 3H20v-2' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.bouton-wiki:hover { background: var(--foret); color: #fff; }
.bouton-wiki[aria-current="page"] { background: var(--foret); color: #fff; }
@media (max-width: 1340px) { .bouton-wiki { justify-content: center; padding: 10px 14px; } }

/* WikiAcéri : la vraie photo en tête de définition, son crédit, et les sources. */
.wiki-vraie-photo { margin: 18px 0 26px; }
.wiki-vraie-photo img { width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: var(--rayon); background: var(--creme); }
.wiki-vraie-photo figcaption { font-size: .93rem; color: var(--doux); margin-top: 8px; }
.wiki-credit { display: block; font-size: .78rem; color: var(--doux); margin-top: 2px; }
.wiki-credit a { color: inherit; }
.wiki-sources { margin-top: 34px; padding-top: 6px; border-top: 1px solid var(--trait); }
.wiki-sources h2 { font-size: 1.3rem; }
.wiki-sources ol { padding-left: 1.4em; font-size: .9rem; color: var(--doux); }
.wiki-sources li { margin-bottom: .55em; overflow-wrap: anywhere; }
.wiki-sources cite { font-style: normal; color: var(--texte); }

/* Le DOCUMENT IMPRIMÉ standard (document-imprime.js) : page titre à l'image 3D de l'érablière, table des matières,
   en-tête et pied répétés, sections numérotées — la forme des rapports livrés depuis « Mon érablière ». */
.doc-imprime { max-width: 8.5in; margin: 0 auto; color: #1f2a30; font-size: 10.5pt; line-height: 1.45; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-couverture { position: relative; overflow: hidden; aspect-ratio: 7.5 / 10; background: #1f3d2b; color: #fff; border-radius: 10px; margin-bottom: 18px; }
.doc-couverture-unie { background: linear-gradient(160deg, #2f5d3a 0%, #1f3d2b 55%, #142a1d 100%); }
.doc-couv-fond { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.doc-couv-voile { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,20,14,.6) 0%, rgba(10,20,14,0) 22%, rgba(10,20,14,0) 45%, rgba(10,20,14,.84) 74%, rgba(10,20,14,.95) 100%); }
.doc-couv-haut { position: absolute; left: 7%; top: 5.5%; right: 7%; display: flex; align-items: center; gap: 10px; }
.doc-couv-haut img { height: 46px; width: auto; background: #fff; border-radius: 10px; padding: 4px; box-sizing: content-box; }
.doc-couv-marque { font-size: 17pt; letter-spacing: .02em; }
.doc-couv-marque b { color: #ffb08a; }
.doc-couv-logo-client { margin-left: auto; max-height: 52px; background: #fff; border-radius: 6px; padding: 4px; }
.doc-couv-bas { position: absolute; left: 7%; right: 7%; bottom: 6%; }
.doc-couv-sur { text-transform: uppercase; letter-spacing: .2em; font-size: 9.5pt; color: #ffd27a; margin: 0; }
.doc-couverture h1 { font-family: Georgia, "Times New Roman", serif; font-weight: normal; font-size: 30pt; line-height: 1.08; margin: 6px 0 6px; color: #fff; }
.doc-couv-client { font-size: 13pt; margin: 0 0 12px; color: #e9efe6; }
.doc-couv-resume { font-size: 10pt; color: #dfe7dc; margin: 0 0 12px; max-width: 34em; }
.doc-couv-fiche { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; font-size: 9pt; margin: 0 0 12px; color: #e9efe6; }
.doc-couv-fiche dt { color: #ffd27a; text-transform: uppercase; letter-spacing: .06em; font-size: 7.8pt; padding-top: 2px; }
.doc-couv-fiche dd { margin: 0; }
.doc-couv-avis { font-size: 7.6pt; color: #b9c4b6; margin: 0; }
.doc-cadre { width: 100%; border-collapse: collapse; }
.doc-cadre > thead td, .doc-cadre > tfoot td, .doc-cadre > tbody > tr > td { padding: 0; }
.doc-entete { display: flex; align-items: center; gap: 10px; font-size: 8pt; color: #5b6b75; border-bottom: 1.5px solid #e8a33d; padding-bottom: 6px; margin-bottom: 12px; }
.doc-entete-logo { height: 22px; width: auto; }
.doc-entete-droite { margin-left: auto; white-space: nowrap; }
.doc-pied { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 7.6pt; color: #5b6b75; border-top: 1px solid #e2e6e8; padding-top: 6px; margin-top: 14px; }
.doc-toc h2, .doc-section > h2 { font-size: 15pt; color: #1f3d2b; margin: 4px 0 10px; }
.doc-toc ol { margin: 0; padding-left: 0; list-style: none; counter-reset: toc; }
.doc-toc li { counter-increment: toc; padding: 6px 2px; border-bottom: 1px dotted #cfc6b3; }
.doc-toc li::before { content: counter(toc); display: inline-block; width: 28px; color: #e8a33d; font-weight: 700; }
.doc-toc a { color: inherit; text-decoration: none; }
.doc-num { display: inline-block; min-width: 1.45em; height: 1.45em; line-height: 1.45em; border-radius: 50%; background: #e8a33d; color: #fff; font-size: 11pt; text-align: center; margin-right: 10px; vertical-align: 2px; }
.doc-section { margin-bottom: 16px; }
.doc-section h3 { font-size: 11.5pt; color: #1f3d2b; margin: 12px 0 6px; }
.doc-section table { width: 100%; border-collapse: collapse; font-size: 9pt; margin: 4px 0 10px; }
.doc-section th { background: #f4efe4; color: #1f3d2b; text-align: left; font-weight: 600; }
.doc-section th, .doc-section td { padding: 5px 7px; border-bottom: 1px solid #eee7da; vertical-align: top; }
.doc-impression { display: none; }
@page doc { size: letter; margin: 0.5in; }
@media print {
  .impression-doc body > :not(.doc-impression) { display: none !important; }
  .impression-doc .doc-impression { display: block; }
  .impression-doc .doc-imprime { page: doc; max-width: none; }
  .impression-doc .doc-couverture { aspect-ratio: auto; height: 10in; border-radius: 0; margin: 0; break-after: page; }
  .impression-doc .doc-toc { break-after: page; }
  .impression-doc .doc-section > h2, .impression-doc .doc-section h3 { break-after: avoid; }
  .impression-doc .doc-section tr { break-inside: avoid; }
}

/* La barre utilitaire, au-dessus de l'en-tête : nous joindre, et l'accès à l'espace client (« Accéder à mon espace »). */
.barre-utile { background: var(--ardoise); color: #dfe7ec; font-size: .86rem; }
.barre-utile-cadre { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; }
.barre-utile-contact a { color: #dfe7ec; text-decoration: none; }
.barre-utile-contact a:hover { color: #fff; text-decoration: underline; }
.barre-utile-espace { display: inline-flex; align-items: center; gap: 7px; padding: 5px 14px; border-radius: 999px; background: var(--orange); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.barre-utile-espace::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4' fill='black'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4' fill='black'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat; }
.barre-utile-espace:hover { background: var(--orange-fonce); color: #fff; }
.barre-utile-espace[aria-current="page"] { background: #fff; color: var(--ardoise); }
@media (max-width: 520px) { .barre-utile-contact { display: none; } .barre-utile-cadre { justify-content: flex-end; } }
@media print { .barre-utile { display: none !important; } }

/* Espace client › Rapports › Tous mes documents : la bibliothèque de tout ce qu'AcériDrone a produit. */
.biblio { display: grid; gap: 18px; }
.biblio-bloc h3 { margin: 0 0 2px; font-size: 1.1rem; }
.biblio-bloc > .aide { margin: 0 0 8px; }
.biblio-liste { list-style: none; margin: 0; padding: 0; border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; background: #fff; }
.biblio-liste li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--trait); }
.biblio-liste li:first-child { border-top: 0; }
.biblio-liste li.biblio-vide { display: block; color: var(--doux); }
.biblio-icone { font-size: 1.3rem; text-align: center; }
.biblio-texte { display: grid; min-width: 0; }
.biblio-texte b { color: var(--ardoise); overflow-wrap: anywhere; }
.biblio-texte .aide { font-size: .85rem; margin: 0; overflow-wrap: anywhere; }
.biblio-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) { .biblio-liste li { grid-template-columns: 28px minmax(0, 1fr); } .biblio-actions { grid-column: 2; justify-content: flex-start; } }

/* Site public : photos créditées (Wikimedia Commons), boutons « Notre service » (details/summary, sans script),
   tableau des capteurs qui défile sur téléphone, encadrés, FAQ et listes de sources (Relevés, Planification, Chaulage…). */
.photo { margin: 0; min-width: 0; }
.photo img { width: 100%; height: auto; border-radius: var(--rayon); box-shadow: var(--ombre); background: var(--creme); }
.photo figcaption { font-size: .93rem; color: var(--doux); margin-top: 10px; }
.photo figcaption b { color: var(--ardoise); }
.photo-large img { max-height: 560px; object-fit: cover; }
.photo-duo { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: start; }
.photo-trio { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); align-items: start; }
.photo-duo .photo img, .photo-trio .photo img { aspect-ratio: 3 / 2; object-fit: cover; }
.photo-duo .photo-entiere img { aspect-ratio: 3 / 2; object-fit: contain; background: #000; }
.encadre { background: #fff; border: 1px solid var(--trait); border-left: 4px solid var(--foret); border-radius: 0 var(--rayon) var(--rayon) 0; padding: 20px 24px; }
.encadre > :last-child { margin-bottom: 0; }
.encadre-accent { border-left-color: var(--orange); }
.tableau-defile { overflow-x: auto; -webkit-overflow-scrolling: touch; background: #fff; border-radius: var(--rayon); border: 1px solid var(--trait); }
.tableau-defile .tableau { margin: 0; min-width: 720px; }
.tableau-defile .tableau tbody th { background: #fff; }
details.volet { margin-top: 14px; }
details.volet > summary { display: inline-flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; padding: 7px 16px; border-radius: 999px; border: 2px solid var(--orange); color: var(--orange-fonce); background: #fff; font-weight: 700; font-size: .92rem; user-select: none; }
details.volet > summary::-webkit-details-marker { display: none; }
details.volet > summary::after { content: "+"; font-size: 1.1rem; line-height: 1; }
details.volet > summary:hover { background: #fff4ee; }
details.volet[open] > summary { background: var(--orange); color: #fff; }
details.volet[open] > summary::after { content: "−"; }
details.volet > summary:focus-visible { outline: 3px solid var(--ardoise); outline-offset: 2px; }
.volet-corps { margin-top: 12px; padding: 14px 16px; background: var(--creme); border-radius: 10px; }
.etapes .volet-corps p, .carte .volet-corps p { color: var(--texte); margin: 0 0 .6em; }
.volet-corps > :last-child { margin-bottom: 0; }
.carte-volet > p { margin-bottom: 0; }
.carte-volet details.volet { margin-top: auto; padding-top: 14px; }
@media (max-width: 520px) { .etapes > li { padding: 58px 18px 20px; } .etapes > li::before { left: 18px; top: 16px; } }
details.faq { border-bottom: 1px solid var(--trait); padding: 4px 0; }
details.faq > summary { cursor: pointer; font-weight: 700; color: var(--ardoise); padding: 12px 32px 12px 0; position: relative; list-style: none; }
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after { content: "+"; position: absolute; right: 4px; top: 10px; color: var(--orange); font-size: 1.3rem; }
details.faq[open] > summary::after { content: "−"; }
details.faq > p { color: var(--doux); margin: 0 0 14px; }
ul.references { font-size: .93rem; color: var(--doux); padding-left: 1.2em; }
ul.references li { margin-bottom: .55em; overflow-wrap: anywhere; }
.carte-article .surtitre { margin-bottom: 6px; }

/* La fiche scientifique d'un point d'échantillonnage (couche-echantillons.js) : dans la fiche des Analyses de sol,
   ou en panneau sous la vue 3D de la Planification et de l'Optimisation IA. */
.ce-panneau { position: relative; margin: 12px 0 18px; padding: 16px 18px; border: 1px solid var(--trait); border-left: 4px solid var(--foret); border-radius: var(--rayon); background: #fff; box-shadow: var(--ombre); }
.ce-fermer { position: absolute; top: 12px; right: 12px; }
.ce-fiche h3 { margin: 0 0 2px; font-size: 1.1rem; padding-right: 90px; }
.ce-fiche > .aide { margin: 0 0 8px; }
.ce-section { margin-top: 12px; }
.ce-section h4 { margin: 0 0 6px; font-size: .95rem; color: var(--foret); text-transform: uppercase; letter-spacing: .04em; }
.ce-section h5 { margin: 8px 0 2px; font-size: .9rem; color: var(--ardoise); }
.ce-liste { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 3px 12px; margin: 0; font-size: .9rem; }
.ce-liste dt { color: var(--doux); }
.ce-liste dd { margin: 0; color: var(--texte); overflow-wrap: anywhere; }
.ce-teinte { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .25); margin-right: 6px; vertical-align: -1px; }
.ce-labo { width: 100%; border-collapse: collapse; font-size: .85rem; margin: 4px 0 8px; }
.ce-labo th, .ce-labo td { padding: 4px 6px; border-bottom: 1px solid var(--trait); text-align: left; }
.ce-labo th { color: var(--doux); font-weight: 600; }

/* Le bandeau de consentement (analytique.js, Loi 25) : discret, en bas, jamais devant le contenu essentiel. */
.temoins { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; background: #fff; border: 1px solid var(--trait); border-left: 4px solid var(--orange); border-radius: var(--rayon); box-shadow: 0 12px 34px rgba(20, 35, 45, .18); font-size: .92rem; }
.temoins p { margin: 0; flex: 1 1 320px; color: var(--texte); }
.temoins-boutons { display: flex; gap: 8px; margin-left: auto; }
@media print { .temoins { display: none !important; } }

/* Les rapports « Résultats et prescriptions » déposés, en tête des onglets Analyses de sol et Résultats et prescriptions. */
.sol-rapports-docs { display: grid; gap: 8px; margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--trait); border-left: 4px solid var(--orange); border-radius: var(--rayon); background: #fff; }
.sol-rapports-docs > b { color: var(--ardoise); }
.sol-rapports-ligne { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sol-rapports-ligne span { flex: 1 1 260px; overflow-wrap: anywhere; }

/* Les étiquettes de PRODUITS (production.js) : la cellule 2 × 4 po des trousses de sol, une feuille pleine par produit. */
.prod-et24 { box-sizing: border-box; width: 4in; height: 2in; padding: 0.12in 0.16in; display: flex; align-items: center; gap: 0.12in; overflow: hidden; font-family: system-ui, sans-serif; color: #000; }
.prod-et24-texte { display: grid; gap: 2px; min-width: 0; flex: 1; font-size: 8pt; line-height: 1.2; }
.prod-et24-tete { display: flex; align-items: center; gap: 6px; min-width: 0; }
.prod-et24-logo { max-height: 0.45in; max-width: 0.9in; width: auto; height: auto; object-fit: contain; }
.prod-et24-maison { font-size: 8.5pt; font-weight: 700; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-et24-nom { font-size: 13pt; line-height: 1.1; margin-top: 2px; }
.prod-et24-detail { font-size: 9.5pt; font-weight: 600; }
.prod-et24-desc { font-size: 7.5pt; color: #333; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-et24-lot { font-size: 7.5pt; margin-top: 2px; }
.prod-et24-qr { display: grid; justify-items: center; gap: 2px; flex: none; }
.prod-et24-qr .qr-code { width: 1.15in; height: 1.15in; }
.prod-et24-qr code { font-size: 7pt; letter-spacing: .02em; }
.prod-etiquette-qr .prod-lien { margin-top: 4px; }
@media print { body.prod-imprimer .prod-etiquette-qr .prod-lien { display: none !important; } }
/* Mon érablière › Lieux et photos (lieux.js). */
.lieux-tete { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.lieux-tete .aide { flex: 1 1 320px; margin: 0; }
.lieux-carte .opt3d { min-height: 420px; height: 62vh; }
.lieux-astuce { flex-basis: 100%; }
.lieux-fiche { margin: 10px 0; padding: 10px 14px; border: 1px solid #d7dfd9; border-radius: 10px; background: #fafcfa; }
.lieux-form { display: grid; gap: 6px; max-width: 640px; }
.lieux-form textarea { font: inherit; padding: 5px 7px; border: 1px solid #b9c4bd; border-radius: 6px; }
.lieux-galerie { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.lieux-galerie figure { margin: 0; width: 160px; }
.lieux-galerie img { display: block; width: 160px; height: 120px; object-fit: cover; border-radius: 6px; }
.lieux-galerie figure.lieux-video { width: 320px; max-width: 100%; }
.lieux-galerie video { display: block; width: 100%; max-height: 240px; background: #000; border-radius: 6px; }
.lieux-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.lieux-carte-item { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 6px; border: 1px solid #d7dfd9; border-radius: 8px; background: #fff; cursor: pointer; font: inherit; }
.lieux-carte-item img { width: 100%; height: 96px; object-fit: cover; border-radius: 5px; }
.lieux-carte-item.lieux-choisi { outline: 3px solid #e0b100; }
.lieux-nom { font-weight: 700; }
.lieux-cat { font-size: .82rem; }

/* Les cartes de prescription des services par drone (prescription-drone.js) */
.pdr-choix { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.pdr-mission { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border: 1px solid #c9d3cc; border-radius: 8px; background: #fff; font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.pdr-mission small { font-weight: 400; color: #555; }
.pdr-mission[aria-pressed="true"] { border-color: #e8541e; box-shadow: 0 0 0 2px #e8541e inset; }
.pdr-carte { margin: 8px 0; }
.pdr-canevas { display: block; width: 100%; height: auto; border-radius: 6px; background: #5a5f55; }
.pdr-proche { font-weight: 700; color: #1e5fa8; }
.pdr-barre { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.pdr-etapes { margin: 8px 0 12px 1.2em; padding: 0; }
.pdr-etapes li { margin: 3px 0; }
.pdr-zone { margin: 12px 0; padding: 8px 10px; border: 1px solid #d7dfd9; border-radius: 8px; background: #fff; }
.pdr-zone h4 { margin: 0 0 4px; }
.pdr-sommets { border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.pdr-sommets th, .pdr-sommets td { padding: 2px 10px 2px 0; text-align: left; }
.pdr-trou td { color: #c62828; font-weight: 700; padding-top: 6px; }
.pdr-polys { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.pdr-poly { min-width: 44px; min-height: 40px; padding: 6px 10px; border: 1px solid #c9d3cc; border-radius: 6px; background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.pdr-poly[aria-pressed="true"] { background: #1b1b1b; color: #fff; border-color: #1b1b1b; }
.pdr-ligne { cursor: pointer; }
.pdr-ligne:hover td { background: #f3f6f4; }

/* ---------------------------------------------------------------------------------------------- AcériScience
   Le gabarit du WikiAcéri (classes wiki-*), aux couleurs de la science : sarcelle au lieu d'orange et de vert.
   Les variables redefinies dans .science recolorent tout ce qui s'en sert (liens, arbre, titres de lettre, cartes). */
.science { --orange: #1f6f8b; --orange-fonce: #134b5f; --creme: #eef6f9; --foret: #1f6f8b; --foret-clair: #e3f1f6; }
.science .entete-page { background: linear-gradient(135deg, #e3f1f6 0%, #f4f9fb 70%); }
.bouton-science { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 2px solid #1f6f8b; border-radius: 999px; background: #e3f1f6; color: #134b5f; font-weight: 700; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.bouton-science::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 2h6M10 2v6.5L4.5 19a2 2 0 0 0 1.8 3h11.4a2 2 0 0 0 1.8-3L14 8.5V2M7 15h10' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 2h6M10 2v6.5L4.5 19a2 2 0 0 0 1.8 3h11.4a2 2 0 0 0 1.8-3L14 8.5V2M7 15h10' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.bouton-science:hover, .bouton-science[aria-current="page"] { background: #1f6f8b; color: #fff; }
@media (max-width: 1340px) { .bouton-science { justify-content: center; padding: 10px 14px; } }
/* L'index : filtres par theme, cartes avec photo. */
.sci-filtres { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 24px; }
.sci-filtre { font: inherit; font-size: .9rem; padding: 6px 12px; border: 1px solid var(--trait); border-radius: 999px; background: #fff; color: var(--ardoise); cursor: pointer; }
.sci-filtre:hover { border-color: #1f6f8b; }
.sci-filtre[aria-pressed="true"] { background: #1f6f8b; border-color: #1f6f8b; color: #fff; }
.sci-cartes { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.sci-cartes a { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; text-decoration: none; color: var(--texte); background: #fff; }
.sci-cartes a:hover { border-color: #1f6f8b; box-shadow: var(--ombre); }
.sci-cartes img { width: 100%; height: 170px; object-fit: cover; background: #eef6f9; }
.sci-carte-texte { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.sci-carte-texte b { color: var(--ardoise); font-size: 1.07rem; line-height: 1.3; }
.sci-cartes a:hover b { color: #134b5f; }
.sci-carte-qui { font-size: .84rem; color: #1f6f8b; font-weight: 600; }
.sci-cartes .wiki-etiquette { align-self: flex-start; }
.sci-theme-sol { background: #f1e6da; color: #6b4423; }
.sci-theme-sante { background: #fbe5e2; color: #9b2c20; }
.sci-theme-climat { background: #e3eef6; color: #245b80; }
.sci-theme-production { background: #fbf0d9; color: #8a5a00; }
.sci-theme-sylviculture { background: var(--foret-clair); color: #2f5d3a; }
.sci-theme-teledetection { background: #ece6f6; color: #553c8b; }
/* La fiche d'une etude : toujours le meme ordre. */
.sci-fiche { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 1px; margin: 18px 0 8px; background: var(--trait); border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; }
.sci-fiche > div { background: #f4f9fb; padding: 10px 14px; }
.sci-fiche dt { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #1f6f8b; }
.sci-fiche dd { margin: 2px 0 0; font-size: .95rem; color: var(--texte); }
.sci-fiche abbr { text-decoration: underline dotted; cursor: help; }
.sci-bloc { margin: 26px 0; border-radius: var(--rayon); padding: 18px 22px; }
.sci-bloc h2 { font-size: 1.3rem; margin: 0 0 .6em; }
.sci-bloc ul { margin: 0; padding-left: 1.2em; }
.sci-bloc li { margin-bottom: .4em; }
.sci-enbref { background: #eef6f9; border-left: 5px solid #1f6f8b; }
.sci-points { font-size: 1.05rem; }
.sci-chiffres { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 0 !important; padding: 0 !important; }
.sci-chiffres li { background: #fff; border: 1px solid #cfe3ea; border-radius: 12px; padding: 12px 14px; margin: 0; }
.sci-chiffres b { display: block; font-size: 1.6rem; line-height: 1.1; color: #134b5f; }
.sci-chiffres span { display: block; font-size: .86rem; color: var(--doux); margin-top: 4px; line-height: 1.4; }
.sci-verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.sci-verdict > div { border-radius: var(--rayon); padding: 16px 20px; }
.sci-verdict h2 { font-size: 1.15rem; margin: 0 0 .6em; }
.sci-verdict ul { margin: 0; padding-left: 1.2em; }
.sci-verdict li { margin-bottom: .45em; }
.sci-confirme { background: #eaf4e8; border: 1px solid #c9e2c4; }
.sci-confirme h2 { color: #2f6b2b; }
.sci-nuance { background: #fdf0ee; border: 1px solid #f2cfc9; }
.sci-nuance h2 { color: #9b2c20; }
.sci-reco { background: #fff7ef; border: 1px solid #f5d9bf; }
.sci-reco h2 { color: #8a4b12; }
.sci-limites { background: #f5f6f7; border: 1px solid var(--trait); }
.sci-limites h2 { color: var(--ardoise); font-size: 1.15rem; }
@media (max-width: 760px) { .sci-verdict { grid-template-columns: 1fr; } .sci-bloc { padding: 14px 16px; } }
@media print { .sci-filtres { display: none; } }
.sci-lu { margin: 6px 0 0; padding: 8px 12px; border-left: 3px solid #e8762d; background: #fff7ef; font-size: .9rem; color: var(--doux); }
.sci-theme-qualite { background: #e6f4ef; color: #1e6b55; }

/* Stations de pompage (stations-pompage-vue.js) et choix des unites */
.espace-unites select { max-width: 230px; }
.sp-grille { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .sp-grille { grid-template-columns: 1fr; } }
.sp-outils { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; }
.sp-groupe { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sp-groupe-titre { font-size: .8rem; font-weight: 600; color: var(--doux); margin-right: 2px; }
.fond-choix[aria-pressed="true"] { background: var(--ardoise); color: #fff; border-color: var(--ardoise); }
.sp-carte { position: relative; border: 1px solid #c9d1d6; border-radius: 10px; overflow: hidden; background: #e9ede4; min-height: 420px; }
.sp-toile { display: block; width: 100%; height: auto; touch-action: none; cursor: grab; }
.sp-carte[data-outil="ajouter"] .sp-toile { cursor: crosshair; }
.sp-carte[data-outil="retirer"] .sp-toile { cursor: not-allowed; }
.sp-bulle { position: absolute; max-width: 250px; background: rgba(38, 50, 56, .92); color: #fff; font-size: .78rem; line-height: 1.35; padding: 6px 8px; border-radius: 6px; pointer-events: none; }
.sp-attente { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(255, 255, 255, .72); font-weight: 600; }
.sp-progres { width: 60%; height: 8px; border-radius: 4px; background: #dfe5e8; overflow: hidden; }
.sp-progres span { display: block; height: 100%; width: 0; background: #e8541e; transition: width .2s; }
.sp-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0; font-size: .82rem; color: var(--doux); }
.sp-leg { display: inline-flex; align-items: center; gap: 5px; }
.sp-pastille { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sp-pastille.sp-rond { border-radius: 50%; width: 9px; height: 9px; }
.sp-pastille.sp-trait { height: 4px; width: 18px; border-radius: 2px; }
.sp-profil { border: 1px solid #dfe5e8; border-radius: 10px; padding: 10px; background: #fff; margin-top: 8px; }
.sp-profil-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.sp-profil-tete .bouton { margin-left: auto; }
.sp-profil-toile { display: block; width: 100%; height: 190px; }
.sp-reglages { background: #fff; border: 1px solid #dfe5e8; border-radius: 10px; padding: 12px 14px; }
.sp-reglages h3 { margin: 0 0 8px; font-size: 1.05rem; }
.sp-champs { border: 0; border-top: 1px solid #e6ebee; margin: 10px 0 0; padding: 8px 0 0; }
.sp-champs legend { font-weight: 700; font-size: .9rem; padding: 0; }
.sp-champ, .sp-unites { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .85rem; margin: 5px 0; }
.sp-champ > span:first-child { flex: 1 1 auto; }
.sp-entree { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.sp-entree input { width: 86px; margin: 0; padding: 4px 6px; text-align: right; }
.sp-sym { font-size: .8rem; color: var(--doux); min-width: 52px; }
.sp-unites select { margin: 0; max-width: 210px; }
.sp-case { display: flex; gap: 6px; align-items: flex-start; font-size: .84rem; margin: 6px 0; }
.sp-case input { margin-top: 3px; }
.sp-boutons { margin-top: 12px; }
.sp-etat { min-height: 1.2em; }
.sp-resultat { margin-top: 18px; }
.sp-perime { opacity: .55; }
.sp-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.sp-tuile { background: #fff; border: 1px solid #dfe5e8; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.sp-tuile-titre, .sp-tuile-sous { font-size: .78rem; color: var(--doux); }
.sp-tuile strong { font-size: 1.25rem; }
.sp-section { margin-top: 18px; }
.sp-section h4 { margin: 0 0 6px; }
.sp-table { border-collapse: collapse; font-size: .86rem; width: 100%; max-width: 720px; }
.sp-table th, .sp-table td { border-bottom: 1px solid #e6ebee; padding: 5px 8px; text-align: left; }
.sp-choisi { color: #2e7d32; font-weight: 600; }
.sp-stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.sp-station { background: #fff; border: 1px solid #dfe5e8; border-radius: 10px; padding: 10px 12px; }
.sp-station.sp-faible { border-color: #f9a825; }
.sp-station-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sp-alerte { font-size: .78rem; color: #8d5a00; background: #fff3cd; border-radius: 999px; padding: 1px 8px; }
.sp-dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 10px; font-size: .84rem; margin: 0 0 8px; }
.sp-dl dt { color: var(--doux); }
.sp-dl dd { margin: 0; }
.sp-raisons, .sp-variantes { font-size: .88rem; padding-left: 1.2em; }
.sp-raisons li, .sp-variantes li { margin: 4px 0; }

/* « Mon érablière, étape par étape » (parcours-erabliere.js) */
.pe-etapes { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; counter-reset: none; }
.pe-etapes li { flex: 1 1 150px; }
.pe-etape { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; background: #fff; border: 1px solid var(--trait); border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; font-size: .86rem; color: var(--ardoise); }
.pe-etape:hover { border-color: var(--orange); }
.pe-num { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #e6ebee; font-weight: 700; }
.pe-titre { line-height: 1.2; }
.pe-active .pe-etape { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(232, 84, 30, .18); font-weight: 600; }
.pe-active .pe-num { background: var(--orange); color: #fff; }
.pe-faite .pe-num { background: var(--foret); color: #fff; }
.pe-h { margin: 14px 0 6px; font-size: 1.15rem; }
.pe-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--trait); }
.pe-sauve { margin-left: auto; }
.pe-table { border-collapse: collapse; font-size: .88rem; width: 100%; }
.pe-table th, .pe-table td { border-bottom: 1px solid #e6ebee; padding: 6px 8px; text-align: left; vertical-align: middle; }
.pe-table tbody th { font-weight: 600; width: 40%; }
.pe-defile { overflow-x: auto; }
.pe-alerte { background: #fff8e1; border: 1px solid #f9d26b; border-radius: 8px; padding: 8px 10px; font-size: .88rem; }
.pe-boutons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.pe-stations { margin-bottom: 8px; }
.pe-methodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pe-methode { background: #fff; border: 1px solid var(--trait); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.pe-methode.pe-choisie { border-color: var(--foret); box-shadow: 0 0 0 2px rgba(47, 93, 58, .2); }
.pe-methode.pe-indispo { opacity: .6; }
.pe-methode-tete { display: flex; flex-direction: column; }
.pe-genre { font-size: .78rem; color: var(--doux); }
.pe-chiffres { margin: 0; font-size: .84rem; font-weight: 600; }
.pe-methode .aide { margin: 0; font-size: .82rem; }
.pe-methode .bouton { align-self: flex-start; margin-top: auto; }
.pe-mini { display: block; width: 100%; height: auto; border-radius: 8px; background: #eef1e8; }
.pe-budget { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center; background: #fff; border: 1px solid var(--trait); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.pe-budget .sp-champ input { width: 130px; margin: 0; padding: 4px 6px; text-align: right; }
.pe-decision { white-space: nowrap; }
.pe-decision .fond-choix { font-size: .78rem; padding: 3px 7px; }
.pe-phase { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.pe-legende { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: .8rem; color: var(--doux); }
.pe-leg { display: inline-flex; align-items: center; gap: 5px; }
.pe-pastille { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: #9e9e9e; }
/* La palette des secteurs (parcours-erabliere.js, PALETTE) : la meme que la carte 3D. */
.pe-pastille[data-i="0"] { background: #1e88e5; } .pe-pastille[data-i="1"] { background: #43a047; } .pe-pastille[data-i="2"] { background: #fb8c00; } .pe-pastille[data-i="3"] { background: #8e24aa; }
.pe-pastille[data-i="4"] { background: #00acc1; } .pe-pastille[data-i="5"] { background: #fdd835; } .pe-pastille[data-i="6"] { background: #6d4c41; } .pe-pastille[data-i="7"] { background: #3949ab; }
.pe-pastille[data-i="8"] { background: #7cb342; } .pe-pastille[data-i="9"] { background: #d81b60; } .pe-pastille[data-i="10"] { background: #546e7a; } .pe-pastille[data-i="11"] { background: #00897b; }
.pe-pastille[data-i="12"] { background: #c0ca33; } .pe-pastille[data-i="13"] { background: #5e35b1; } .pe-pastille[data-i="14"] { background: #f4511e; } .pe-pastille[data-i="15"] { background: #e53935; }
.pe-leg .pe-pastille { margin-right: 0; }
.pe-pastille.pe-an[data-i="0"] { background: #1b5e20; } .pe-pastille.pe-an[data-i="1"] { background: #43a047; } .pe-pastille.pe-an[data-i="2"] { background: #9ccc65; } .pe-pastille.pe-an[data-i="3"] { background: #fdd835; }
.pe-pastille.pe-an[data-i="4"] { background: #fb8c00; } .pe-pastille.pe-an[data-i="5"] { background: #e53935; } .pe-pastille.pe-an[data-i="6"] { background: #8e24aa; } .pe-pastille.pe-an[data-i="7"] { background: #3949ab; }
.pe-pastille.pe-an[data-i="8"] { background: #00838f; } .pe-pastille.pe-an[data-i="9"] { background: #6d4c41; }
.pe-pastille.pe-gris { background: #bdbdbd; }
.pe-resume { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 10px; }
.pe-resume > div { background: #fff; border: 1px solid var(--trait); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.pe-resume span { font-size: .78rem; color: var(--doux); }
.pe-resume strong { font-size: 1.05rem; }
.pe-negatif { color: #c62828; }
.pe-positif { color: #2e7d32; }
.pe-services li { margin: 4px 0; }
@media (max-width: 900px) { .pe-phase { grid-template-columns: 1fr; } }
.pe-svc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.pe-svc-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 8px; }
.pe-svc-bouton { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 1px; background: #fff; border: 1px solid var(--trait); border-radius: 8px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: .85rem; color: var(--ardoise); }
.pe-svc-bouton:hover { border-color: var(--orange); }
.pe-svc-actif .pe-svc-bouton { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(232, 84, 30, .18); font-weight: 600; }
.pe-svc-puce { font-size: .75rem; color: var(--doux); font-weight: 400; }
.pe-svc-zone { background: #fff; border: 1px solid var(--trait); border-radius: 12px; padding: 12px 14px; }
.pe-svc-titre { margin: 0 0 6px; font-size: 1.05rem; }
.pe-constats { font-size: .88rem; padding-left: 1.2em; }
.pe-diff { font-size: .74rem; color: var(--orange-fonce); }
.pe-source { font-size: .78rem; }
.pe-calendrier td { vertical-align: top; }
.pe-an { font-weight: 700; white-space: nowrap; }
.pe-travaux { margin: 0; padding-left: 1.1em; font-size: .84rem; }
.pe-t-reseau { font-weight: 600; }
@media (max-width: 900px) { .pe-svc { grid-template-columns: 1fr; } .pe-svc-liste { position: static; } }
.sp-carte3d { position: relative; border-radius: 10px; overflow: hidden; min-height: 520px; }
.sp-ia { background: #fff4ee; border: 1px solid #f3c7b2; border-radius: 10px; padding: 4px 8px; }
.sp-ia-n { font-size: .85rem; min-width: 76px; text-align: center; }
.sp-carte3d .sp-cache, .sp-carte3d .opt3d-bandeau, .sp-carte3d .foret-chiffres { display: none !important; }
.sp-carte3d.sp-replie .foret-commandes, .sp-carte3d.sp-replie .foret-legende { display: none !important; }
.sp-replier { position: absolute; top: 10px; left: 10px; z-index: 6; font: inherit; font-size: 12px; font-weight: 600; background: rgba(38, 50, 56, .85); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; padding: 5px 11px; cursor: pointer; }
.sp-replier:hover, .sp-replier:focus-visible { background: rgba(38, 50, 56, 1); }
.sp-carte3d[data-outil="ajouter"] .demo-toile { cursor: crosshair; }
.sp-carte3d[data-outil="retirer"] .demo-toile { cursor: not-allowed; }
.sp-avis-cadastre { background: #fdecea; border: 1px solid #f5b7b1; color: #8e1b10; border-radius: 10px; padding: 10px 12px; font-size: .9rem; font-weight: 600; }
.sp-message { margin: 6px 0; }
.pe-guide { background: var(--foret-clair); border-radius: 10px; padding: 10px 12px 10px 32px; font-size: .9rem; margin: 6px 0 10px; }
.pe-guide li { margin: 3px 0; }
.pe-cliquable { cursor: pointer; }
.pe-fiches { display: flex; flex-direction: column; gap: 8px; max-height: 640px; overflow-y: auto; padding-right: 4px; }
.pe-fiche { background: #fff; border: 1px solid var(--trait); border-radius: 10px; padding: 8px 10px; }
.pe-fiche-choisie { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(232, 84, 30, .2); }
.pe-fiche-non { opacity: .65; }
.pe-fiche-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; background: none; border: 0; padding: 0; text-align: left; font: inherit; cursor: pointer; color: var(--ardoise); }
.pe-fiche-prod { margin-left: auto; font-size: .8rem; color: var(--foret); font-weight: 600; }
.pe-fiche-dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; font-size: .84rem; margin: 6px 0; }
.pe-fiche-dl dt { color: var(--doux); }
.pe-fiche-dl dd { margin: 0; font-weight: 600; }
.pe-gros { display: flex; gap: 6px; }
.pe-gros .fond-choix { flex: 1 1 0; font-size: .86rem; padding: 7px 8px; }
.pe-h-0 { height: 0%; } .pe-h-5 { height: 5%; } .pe-h-10 { height: 10%; } .pe-h-15 { height: 15%; } .pe-h-20 { height: 20%; } .pe-h-25 { height: 25%; } .pe-h-30 { height: 30%; } .pe-h-35 { height: 35%; } .pe-h-40 { height: 40%; } .pe-h-45 { height: 45%; } .pe-h-50 { height: 50%; } .pe-h-55 { height: 55%; } .pe-h-60 { height: 60%; } .pe-h-65 { height: 65%; } .pe-h-70 { height: 70%; } .pe-h-75 { height: 75%; } .pe-h-80 { height: 80%; } .pe-h-85 { height: 85%; } .pe-h-90 { height: 90%; } .pe-h-95 { height: 95%; } .pe-h-100 { height: 100%; }
.pe-annee-choix { display: flex; flex-direction: column; gap: 3px; font-size: .84rem; font-weight: 600; }
.pe-select-an { font: inherit; font-size: .86rem; padding: 5px 8px; border: 1px solid #c9d1d6; border-radius: 8px; background: #fff; max-width: 100%; }
.pe-projection { background: #fff; border: 2px solid var(--foret); border-radius: 12px; padding: 10px 14px; margin: 12px 0; }
.pe-projection h4 { margin: 0 0 8px; color: var(--foret); }
.pe-barres { display: flex; align-items: flex-end; gap: 6px; height: 140px; margin: 8px 0 4px; }
.pe-barre { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; position: relative; padding-bottom: 16px; }
.pe-barre small { position: absolute; bottom: 0; font-size: .7rem; color: var(--doux); }
.pe-barre-dep, .pe-barre-rev { display: inline-block; width: 40%; min-height: 1px; border-radius: 3px 3px 0 0; }
.pe-barre-dep { background: var(--orange); }
.pe-barre-rev { background: var(--foret); }
.pe-pastille.pe-barre-dep, .pe-pastille.pe-barre-rev { width: 11px; height: 11px; border-radius: 3px; }
.pe-gantt { font-size: .78rem; table-layout: fixed; min-width: 760px; }
.pe-gantt th, .pe-gantt td { padding: 4px 4px; text-align: center; border: 1px solid #eef1f2; }
.pe-gantt .pe-gantt-nom, .pe-gantt tbody th { text-align: left; white-space: nowrap; width: 110px; }
.pe-col-an span { display: block; font-weight: 700; }
.pe-col-an small { color: var(--doux); font-weight: 400; }
.pe-gantt-cel { vertical-align: top; }
.pe-puce { display: inline-block; margin: 1px; padding: 1px 5px; border-radius: 999px; font-size: .7rem; font-weight: 600; color: #fff; background: #607d8b; white-space: nowrap; }
.pe-p-reseau { background: #e8541e; } .pe-p-analyses { background: #6d4c41; } .pe-p-chaulage { background: #9e9d24; } .pe-p-potasse { background: #ad1457; }
.pe-p-chemins { background: #8d6e63; } .pe-p-energie { background: #f9a825; color: #263238; } .pe-p-entaillage { background: #2e7d32; } .pe-p-coupe { background: #33691e; }
.pe-p-drainage { background: #0277bd; } .pe-p-enrichissement { background: #558b2f; } .pe-p-bti { background: #5e35b1; }
.pe-gantt-argent th { background: #f6f8f8; font-weight: 600; }
.pe-gantt-argent td { white-space: nowrap; font-size: .72rem; }
.pe-c3d-hote { margin: 8px 0; }
.pe-c3d.sp-carte3d { height: min(70vh, 620px); min-height: 460px; position: relative; border-radius: 12px; overflow: hidden; }
.pe-phase-3d { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
.pe-pastille.pe-rouge { background: #e53935; }
.pe-pastille.pe-vert { background: #1b5e20; }
.pe-ligne-vue td { background: #fff4ee; }
.pe-filtre-an { margin-top: 10px; }
@media (max-width: 900px) { .pe-phase-3d { grid-template-columns: 1fr; } }
.pe-pastille.pe-an[data-i="0"] { background: #d32f2f; } .pe-pastille.pe-an[data-i="1"] { background: #f57c00; } .pe-pastille.pe-an[data-i="2"] { background: #fbc02d; } .pe-pastille.pe-an[data-i="3"] { background: #7cb342; } .pe-pastille.pe-an[data-i="4"] { background: #00897b; } .pe-pastille.pe-an[data-i="5"] { background: #1e88e5; } .pe-pastille.pe-an[data-i="6"] { background: #3949ab; } .pe-pastille.pe-an[data-i="7"] { background: #8e24aa; } .pe-pastille.pe-an[data-i="8"] { background: #6d4c41; } .pe-pastille.pe-an[data-i="9"] { background: #546e7a; }
.pe-c3d-barre { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 4px; }
.pe-c3d-barre .sp-groupe { flex-wrap: wrap; }
.pe-t-cliquable { cursor: pointer; border-radius: 4px; }
.pe-t-cliquable:hover, .pe-t-cliquable:focus-visible { background: #fdecea; outline: none; }
.pe-t-choisi { background: #ffd6f5; font-weight: 600; }
.pe-choisi-t { margin: 6px 0; font-weight: 600; color: #6a1b5a; }
.pe-affichage { flex-wrap: wrap; margin: 6px 0 10px; }
.pe-affichage .pe-formule, .sp-formule { flex-basis: 100%; margin: 4px 0 0; }

/* Les parametres proposes (parametres-info.js) : la valeur de base au bout de la ligne, la pastille « i » et sa bulle. */
.pi-bout { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.pi-base { font: inherit; font-size: .75rem; padding: 2px 7px; border: 1px dashed #8aa08a; border-radius: 10px; background: #f4f8f2; color: #2e5a2e; cursor: pointer; white-space: nowrap; }
.pi-base:hover, .pi-base:focus-visible { background: #e3efdd; border-style: solid; }
.pi-base-egale { opacity: .6; border-color: #c9d6c6; }
.pi-info { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #1e88e5; color: #fff; font-size: .72rem; font-weight: 700; font-style: italic; cursor: help; flex: 0 0 auto; }
.pi-info:focus-visible { outline: 2px solid #0d47a1; outline-offset: 2px; }
.pi-i { pointer-events: none; font-family: Georgia, serif; }
.pi-bulle { display: none; position: absolute; right: -6px; top: 100%; z-index: 60; width: 280px; padding: 10px 12px 9px; margin-top: 0; border-top: 6px solid transparent; background: #1f2a30; background-clip: padding-box; color: #f5f5f5; font-size: .8rem; font-weight: 400; font-style: normal; line-height: 1.35; text-align: left; border-radius: 0 0 6px 6px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.pi-info:hover .pi-bulle, .pi-info:focus-within .pi-bulle, .pi-info.pi-ouverte .pi-bulle { display: block; }
.pi-bulle span { display: block; }
.pi-lien { display: inline-block; margin-top: 6px; color: #9fd3ff; font-weight: 600; }
.pi-lien:hover { color: #fff; }

/* Le parcours en 16 etapes : les services un a un, en plus petit, teintes. */
.pe-etapes li.pe-etape-svc { flex: 1 1 112px; }
.pe-etapes li.pe-etape-svc .pe-etape { background: #f6f9f4; padding: 6px 8px; font-size: .85rem; }
.pe-etapes li[data-groupe] { position: relative; }
.pe-params, .pe-soumission { margin: 14px 0; }
.pe-params .sp-champ input, .pe-soumission .sp-champ input { width: 150px; margin: 0; padding: 4px 6px; text-align: right; }
.pe-soumission .sp-champ input[type="text"], .pe-soumission .sp-champ input[type="date"] { width: 220px; text-align: left; }
.pe-soumission { border: 1px solid #c9d6c6; border-radius: 10px; padding: 10px 14px; background: #fbfdf9; }
.pe-statut { margin: 4px 0 8px; padding: 6px 10px; border-radius: 6px; background: #fff4e5; color: #7a4a00; font-size: .85rem; font-weight: 600; }
.pe-statut.pe-statut-reel { background: #e6f4ea; color: #1b5e20; }
.pe-pieces { margin: 8px 0; font-size: .85rem; }
.pe-pieces-liste { margin: 4px 0 8px; padding-left: 18px; }
.pe-pieces-liste li { margin: 3px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pe-piece-ajout { position: relative; overflow: hidden; display: inline-block; }
.pe-fichier { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pe-doc-carte { display: block; width: 100%; max-width: 760px; border-radius: 6px; border: 1px solid #d0d7d0; }
/* La projection financiere (projection-financiere.js). */
.pf-graphique { display: block; width: 100%; max-width: 760px; height: auto; margin: 6px 0; background: #fcfcfb; border-radius: 8px; }
.pe-pastille.pf-l-inv { background: #eb6834; }
.pe-pastille.pf-l-rev { background: #2a78d6; }
.pf-flux td, .pf-flux th { white-space: nowrap; text-align: right; }
.pf-flux tbody th { text-align: left; }
.pf-flux tr.pf-fort td, .pf-flux tr.pf-fort th { font-weight: 700; }
.pf-sources tr.pf-reel td:last-child { color: #1b5e20; font-weight: 600; }
.pf-sources tr.pf-projete td:last-child { color: #7a4a00; }
.pf-avis { margin-top: 14px; }
.sim24-parcours { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.pe-carte-dit { margin: 8px 0 4px; padding: 6px 10px; background: #f3f6fb; border-left: 3px solid #1e88e5; border-radius: 4px; }

/* Le detail d'un travail (chemin, fosse, maitre-ligne) : chiffres, profil en long, consignes. */
.pe-detail-ligne > td { background: #faf6fd; padding: 10px 12px !important; }
.pe-detail h4 { margin: 0 0 6px; }
.pe-detail-dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 0 0 8px; font-size: .88rem; }
.pe-detail-dl dt { color: #52514e; } .pe-detail-dl dd { margin: 0; font-weight: 600; }
.pe-detail-sous { margin: 6px 0 2px; font-weight: 600; font-size: .85rem; }
.pe-profil { display: block; width: 100%; max-width: 760px; height: auto; border: 1px solid #e4e3df; border-radius: 6px; }
.pe-consignes { margin: 6px 0 0; padding-left: 18px; font-size: .85rem; }
.pe-pastille.pe-pl-6d4c41 { background: #6d4c41; } .pe-pastille.pe-pl-1565c0 { background: #1565c0; } .pe-pastille.pe-pl-d7ccc8 { background: #d7ccc8; }
.pe-pastille.pe-pl-2e7d32 { background: #2e7d32; } .pe-pastille.pe-pl-f9a825 { background: #f9a825; } .pe-pastille.pe-pl-c62828 { background: #c62828; } .pe-pastille.pe-pl-a5d6a7 { background: #a5d6a7; }
.pe-doc-detail { break-inside: avoid; margin: 0 0 14px; }
/* Les images 3D des PDF, zone par zone : la carte passe hors de l'ecran, a taille fixe, le temps des photos. */
.pe-coulisse { position: fixed; left: -12000px; top: 0; width: 1400px; height: 860px; }
.pe-coulisse .pe-c3d.sp-carte3d { height: 860px; min-height: 860px; }
.pe-coulisse .pe-c3d-barre { display: none; }
.pe-attente-pdf { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 2000; padding: 10px 18px; border-radius: 8px; background: #1f2a30; color: #fff; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.25); }

/* Energie des stations (energie-stations.js) */
.pe-energie-stations .pe-distance { width: 6.5em; }
.pe-energie-stations select { max-width: 22em; }
.pe-moyens dt { font-weight: 700; margin-top: 6px; }
.pe-moyens dd { margin: 2px 0 0 0; color: #455a64; }
.pe-moyens-d { margin: 8px 0 14px; }

.pe-pastille.pe-src-hq { background: #1e88e5; }
.pe-pastille.pe-src-fil { background: #00897b; }
.pe-pastille.pe-src-gaz { background: #8e24aa; }
.pe-pastille.pe-src-propane { background: #f4511e; }
.pe-pastille.pe-src-diesel { background: #6d4c41; }
.pe-pastille.pe-src-essence { background: #fdd835; }
.pe-pastille.pe-src-solaire { background: #ffb300; }
.pe-pastille.pe-src-hybride { background: #7cb342; }
.pe-pastille.pe-src-eolien { background: #26c6da; }

.pe-kw .pe-distance { width: 5em; }
.pe-base-kw { display: block; margin-top: 2px; border: 0; background: #eef3ea; color: #2e7d32; border-radius: 10px; font-size: .78em; padding: 1px 8px; cursor: pointer; }
.pe-alerte-mini { color: #c62828; font-size: .8em; margin-top: 2px; }

/* Equipements (equipements-erabliere.js) */
.eq-zone { margin: 10px 0; padding: 8px 0; border-top: 1px solid #e3e8e0; }
.eq-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.eq-item { border: 1px solid #e3e8e0; border-radius: 8px; margin: 4px 0; }
.eq-ouvert { border-color: var(--orange); }
.eq-ligne { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; padding: 6px 8px; cursor: pointer; font: inherit; }
.eq-ligne em { font-style: normal; color: #607d8b; font-size: .85em; }
.eq-form { padding: 4px 8px 10px; }
.eq-champ { margin: 4px 0; }
.eq-photos { margin: 8px 0; }
.eq-galerie { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.eq-photo { margin: 0; width: 96px; }
.eq-photo img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; display: block; }
.eq-retirer { border: 0; background: none; color: #c62828; font-size: .8em; cursor: pointer; padding: 2px 0; }

.pe-eq-faible td:last-child { color: #c62828; font-weight: 700; }
.pe-eq-juste td:last-child { color: #e65100; font-weight: 600; }
.pe-eq-ok td:last-child { color: #2e7d32; font-weight: 600; }
.pe-eq-inconnu td:last-child { color: #607d8b; }

/* Les cinq phases du parcours (Concevoir, Decider, Planifier, Diriger, Financer) */
.pe-etapes li.pe-debut-phase { margin-top: 18px; position: relative; }
.pe-etapes li.pe-debut-phase::before { content: attr(data-phase); position: absolute; top: -17px; left: 2px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #455a64; white-space: nowrap; }
.pe-phase-bandeau { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #eef3ea; border-left: 4px solid #2e7d32; font-size: .9rem; }
.pe-phase-bandeau.pe-phase-decider { background: #fff4e5; border-left-color: #eb6834; }
.pe-phase-bandeau.pe-phase-planifier { background: #e8f1fb; border-left-color: #1e88e5; }
.pe-phase-bandeau.pe-phase-diriger { background: #f3e9f7; border-left-color: #8e24aa; }
.pe-phase-bandeau.pe-phase-financer { background: #e9f5f3; border-left-color: #00897b; }
.pe-indicateurs tr.pe-total td { font-weight: 700; border-top: 2px solid #c9d6c6; }

.pe-retour { margin: 0 0 10px; padding: 6px 10px; background: #eef3ea; border-radius: 8px; font-size: .9rem; }
.pe-retour a { font-weight: 700; }
/* Construire mes stations (stations-batiment.js) */
.sb-fiche { padding: 6px 4px 12px; }
.sb-fiche .sp-champ select { max-width: 100%; }
.sb-note { display: block; font-size: .82em; color: #546e7a; margin-top: 2px; max-width: 46em; }
.pe-etiquette.sb-existante, .sb-existante { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; background: #e3f2fd; color: #0d47a1; font-size: .78em; }
.sb-jours { display: flex; gap: 1px; height: 18px; margin: 6px 0 2px; max-width: 40em; }
.sb-jour { flex: 1 1 0; border-radius: 2px; background: #eceff1; }
.sb-h1 { background: #fff3e0; } .sb-h2 { background: #ffe0b2; } .sb-h3 { background: #ffcc80; } .sb-h4 { background: #ffb74d; } .sb-h5 { background: #ffa726; }
.sb-h6 { background: #fb8c00; } .sb-h7 { background: #f57c00; } .sb-h8 { background: #ef6c00; } .sb-h9 { background: #e65100; } .sb-h10 { background: #bf360c; }
.sb-legende { font-size: .8em; }
.sb-multi { margin: 18px 0 8px; padding: 10px 12px; border: 1px solid #cfd8dc; border-radius: 8px; background: #fafcfd; }
.sb-coches { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0; }
.sb-coche { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
/* Le fil du travail (fil-travail.js) : la phase, ce qu'on fait ici, la synchronisation avec le parcours, la suite. */
.ft-hote:empty { display: none; }
.ft-fil { margin: 4px 0 14px; }
.ft-tete { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: start; padding: 12px 14px; border: 1px solid #e0e6e3; border-radius: 10px; background: #fbfcfb; }
.ft-schema { width: 100%; max-width: 640px; height: auto; display: block; margin: 0 auto; }
.ft-trait { stroke: #cfd8dc; stroke-width: 4; stroke-linecap: round; }
.ft-trait-fait { stroke: #2e7d32; stroke-width: 4; stroke-linecap: round; }
.ft-phase circle { stroke-width: 3; }
.ft-fait circle { fill: #2e7d32; stroke: #2e7d32; }
.ft-ici circle { fill: #e8541e; stroke: #fde3d8; stroke-width: 5; }
.ft-avenir circle { fill: #fff; stroke: #b0bec5; }
.ft-num { font: 700 14px system-ui, sans-serif; fill: #fff; }
.ft-avenir .ft-num { fill: #78909c; }
.ft-nom { font: 600 12px system-ui, sans-serif; fill: #546e7a; }
.ft-ici .ft-nom { fill: #bf360c; }
.ft-carte p { margin: 0 0 6px; }
.ft-lieu { font-weight: 700; color: #1f2a30; }
p.ft-lieu { font-size: 1.05em; }
.ft-but { color: #37474f; }
.ft-gestes { margin: 4px 0 8px 1.2em; padding: 0; color: #37474f; font-size: .93em; }
.ft-gestes li { margin: 2px 0; }
.ft-statut { padding: 6px 10px; border-radius: 6px; font-size: .9em; }
.ft-statut.ft-ok { background: #e8f5e9; color: #1b5e20; }
.ft-statut.ft-attente { background: #fff8e1; color: #6d4c00; }
.ft-statut.ft-alerte { background: #fdecea; color: #8e1b10; }
.ft-boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pe-unite-p { margin-left: 4px; font-size: .85em; }
.ft-action { background: #2e7d32; border-color: #2e7d32; }
/* Le parcours : les cinq phases en cinq colonnes égales, puis les étapes de la phase courante dans un cadre. */
.pe-phases { list-style: none; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0 0 8px; }
.pe-phase-bouton { width: 100%; height: 100%; display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: center; padding: 10px 10px 8px; border: 2px solid #dfe5e1; border-radius: 10px; background: #fff; cursor: pointer; text-align: left; font: inherit; color: #1f2a30; }
.pe-phase-bouton:hover { border-color: #f3a07c; }
.pe-phase-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #b0bec5; color: #fff; font-weight: 700; }
.pe-phase-tx { display: flex; flex-direction: column; min-width: 0; }
.pe-phase-tx strong { font-size: .98rem; overflow: hidden; text-overflow: ellipsis; }
.pe-phase-compte { font-size: .76rem; color: #607d8b; }
.pe-phase-jauge { grid-column: 1 / -1; display: block; height: 6px; border-radius: 3px; background: #eceff1; overflow: hidden; }
.pe-phase-plein { display: block; height: 100%; width: 0; background: #e8541e; }
.pe-phase-p1 { width: 10%; } .pe-phase-p2 { width: 20%; } .pe-phase-p3 { width: 30%; } .pe-phase-p4 { width: 40%; } .pe-phase-p5 { width: 50%; }
.pe-phase-p6 { width: 60%; } .pe-phase-p7 { width: 70%; } .pe-phase-p8 { width: 80%; } .pe-phase-p9 { width: 90%; } .pe-phase-p10 { width: 100%; }
.pe-phase-active .pe-phase-bouton { border-color: #e8541e; background: #fff4ef; box-shadow: 0 2px 6px rgba(232, 84, 30, .18); }
.pe-phase-active .pe-phase-num { background: #e8541e; }
.pe-phase-faite .pe-phase-num { background: #2e7d32; }
.pe-phase-faite .pe-phase-plein { background: #2e7d32; }
@media (max-width: 720px) { .pe-phase-bouton { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 8px 4px; } .pe-phase-compte { display: none; } .pe-phase-tx strong { font-size: .8rem; } }
.pe-phases + .pe-etapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; padding: 10px; border: 1px solid #f3cdbd; border-radius: 10px; background: #fffaf7; }
.pe-phases + .pe-etapes li.pe-debut-phase { margin-top: 0; }
.pe-phases + .pe-etapes li.pe-debut-phase::before { display: none; }
.pe-phases + .pe-etapes li[hidden] { display: none; }
/* Mon érablière en direct (erabliere-direct.js) : carte allégée, objets de production seuls cliquables, fiche à côté. */
.tds-modes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.ed-barre { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: #1f2a30; color: #fff; margin-bottom: 8px; font-size: .92em; }
.ed-point { width: 12px; height: 12px; border-radius: 50%; background: #9e9e9e; flex: 0 0 auto; }
.ed-point[data-etat="direct"] { background: #43a047; box-shadow: 0 0 0 4px rgba(67, 160, 71, .3); }
.ed-point[data-etat="retard"] { background: #f9a825; }
.ed-corps { display: grid; grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr); gap: 10px; }
@media (max-width: 860px) { .ed-corps { grid-template-columns: 1fr; } }
.ed-scene { min-height: 520px; }
.ed-fiche { padding: 12px; border: 1px solid #e0e6e3; border-radius: 10px; background: #fbfcfb; align-self: start; }
.ed-genre { margin: 0; font-size: .78em; text-transform: uppercase; letter-spacing: .04em; color: #607d8b; }
.ed-nom { margin: 2px 0 8px; }
.ed-sous { margin: 12px 0 4px; font-size: .95em; }
.ed-etat-objet { font-weight: 600; margin: 4px 0; }
.ed-etat-objet[data-etat="direct"] { color: #2e7d32; }
.ed-etat-objet[data-etat="retard"] { color: #b26a00; }
.ed-etat-objet[data-etat="muet"] { color: #757575; }
.ed-mesures { width: 100%; border-collapse: collapse; font-size: .92em; }
.ed-mesures th, .ed-mesures td { padding: 3px 4px; border-bottom: 1px solid #eceff1; text-align: left; }
.ed-mesures td { text-align: right; font-variant-numeric: tabular-nums; }
.ed-voisin { padding: 6px 0; border-top: 1px dashed #dfe5e1; }
.ed-liste { margin: 0 0 0 1.1em; padding: 0; }
.ed-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0; font-size: .86em; color: #37474f; }
.ed-leg { display: inline-flex; align-items: center; gap: 5px; }
.ed-pastille { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #9e9e9e; }
.ed-pastille-station { background: #e8541e; border-radius: 2px; } .ed-pastille-cabane { background: #8d6e63; border-radius: 2px; } .ed-pastille-reservoir { background: #4f7ea8; }
.ed-pastille-iot_vide { background: #00897b; } .ed-pastille-iot_temperature { background: #d81b60; } .ed-pastille-iot_niveau { background: #3949ab; }
.ed-pastille-iot_debit { background: #00acc1; } .ed-pastille-iot_meteo { background: #7cb342; } .ed-pastille-iot_passerelle { background: #5d4037; } .ed-pastille-camera { background: #263238; border-radius: 2px; }
.ed-anneau-direct { background: transparent; border: 3px solid #2e7d32; }
/* La carte allégée : ni bandeau, ni chiffres, ni légende, ni commandes de la vue complète. */
.ed-scene .opt3d-bandeau, .ed-scene .foret-chiffres, .ed-scene .foret-legende, .ed-scene .foret-commandes, .ed-scene .foret-fiche { display: none; }

/* Retoucher un chemin ou un fossé proposé : la barre posée sur la carte, les sommets roses à glisser. */
.pe-edition-barre { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 6; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 10px 14px; background: rgba(255, 255, 255, 0.96); border: 2px solid #ff2bd6; border-radius: 10px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); font-size: 0.92rem; }
.pe-edition-barre .pe-alerte { flex-basis: 100%; margin: 0; }
.pe-edition-barre .pe-boutons { margin: 0; }
.pe-en-edition .demo-toile, .pe-en-edition canvas { cursor: crosshair; }
.pe-retouche { align-items: center; }

/* La projection financiere : les trois scenarios cote a cote (pessimiste, realiste, optimiste) et la regle des 10 ans. */
.pf-scenarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.pf-scenario { background: #fff; border: 1px solid var(--trait); border-top: 4px solid #2a78d6; border-radius: 10px; padding: 10px 12px; min-width: 0; }
.pf-scenario.pf-sc-pess { border-top-color: #eb6834; }
.pf-scenario.pf-sc-opti { border-top-color: #2e7d32; }
.pf-sc-titre { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 1rem; }
.pf-scenario .pe-resume { grid-template-columns: 1fr 1fr; margin: 8px 0 0; }
.pf-scenario .pe-resume > div { padding: 6px 8px; }
.pf-scenario .pe-resume strong { font-size: .95rem; }
.pf-sc-champs { margin: 6px 0 0; }
.pf-verdict { margin: 8px 0 0; font-size: .88rem; }
.pf-ok { color: #2e7d32; font-weight: 600; }
.pf-regle { margin: 10px 0 12px; }
.pf-regle p { margin: 6px 0 0; }
.pe-pastille.pf-l-pess { background: #eb6834; }
.pe-pastille.pf-l-real { background: #2a78d6; }
.pe-pastille.pf-l-opti { background: #2e7d32; }
.pf-comparaison td { white-space: nowrap; text-align: right; }
.pf-comparaison tbody th { text-align: left; }
.pf-comparaison tr.pf-fort td, .pf-comparaison tr.pf-fort th { font-weight: 700; }
/* Plan officiel : les filtres d'affichage (annee, type, secteur, etat, recherche) sur une rangee, au-dessus de la carte
   et de la liste ; « Confier » et qui fait chaque travail (Équipe et chantiers). */
.po-filtres { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 10px 0 8px; padding: 8px 10px; background: var(--creme); border: 1px solid var(--trait); border-radius: 8px; }
.po-filtre { display: grid; gap: 2px; font-size: .85rem; }
.po-filtre-lib { font-weight: 600; color: var(--ardoise); }
.po-filtre select, .po-filtre input { padding: 5px 8px; font: inherit; font-size: .95rem; min-width: 0; }
.po-filtre-texte input { width: 14em; max-width: 60vw; }
.po-filtres .bouton { align-self: flex-end; }
.po-filtres-etat { flex-basis: 100%; margin: 0; }
.po-filtres-etat:empty { display: none; }
.po-travail-tete { flex-wrap: wrap; }
.po-qui { font-size: .8rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--trait); color: var(--ardoise); background: #fff; }
.po-qui-confie { background: var(--ardoise); border-color: var(--ardoise); color: #fff; }
.po-qui-fait { background: #2e9d4f; border-color: #2e9d4f; color: #fff; }
.po-confier { margin-left: auto; }
@media print {
  .po-filtres, .po-confier { display: none !important; }
}
/* Équipe et chantiers : chercher un travail du plan ; la legende des travaux (pale : a confier, fonce : confie, vert : fait). */
.eq-plan-choix .eq-cherche { font-weight: 400; }
.eq-plan-info { font-weight: 400; }
.eq-pastille-libre { background: linear-gradient(90deg, #f5bfb0 0 33%, #fadea5 33% 66%, #f0a8c3 66%); border: 1px solid #c9d1d6; }
.eq-pastille-confie { background: linear-gradient(90deg, #b64625 0 33%, #c2860e 33% 66%, #ad164d 66%); }
.eq-pastille-fait { background: #2e9d4f; opacity: .6; }

/* Le schema des six phases : chaque phase mene a son onglet. */
.ft-cliquable { cursor: pointer; }
.ft-cliquable:hover circle, .ft-cliquable:focus circle { stroke: #e8541e; stroke-width: 3; }
.ft-cliquable:focus { outline: none; }
.ed-pastille-prevu { background: #b2dfdb; border: 2px dashed #00897b; }
/* Les huit sections : plus serrées, le nom sur deux lignes au besoin ; en tete des pages integrees (fil du travail). */
.pe-phases .pe-phase-tx strong { white-space: normal; line-height: 1.15; }
.pe-phases .pe-phase-bouton { padding: 8px 8px 6px; }
.ft-sections { margin-bottom: 12px; }
.pe-etape-lien .pe-etape { border-style: dashed; }
@media (max-width: 980px) { .pe-phases { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pe-guides { margin: 4px 0 10px; padding: 8px 12px; border-left: 4px solid #2e7d32; background: #f1f8f1; border-radius: 6px; font-size: .92rem; }
.pe-guides a { font-weight: 600; }
/* Qui fait le travail, et « Équilibrer mon plan ». */
.pf-qui .pf-qui-ligne select { min-width: 9rem; }
.pf-equilibre { background: #f7faf5; border: 1px solid var(--trait); border-radius: 10px; padding: 10px 12px; margin: 10px 0 12px; }
.pf-equilibre h4 { margin: 0 0 4px; }
.pf-mesures { margin: 6px 0 8px; padding-left: 1.4rem; }
.pf-mesures li { margin: 3px 0; }

/* ---------------------------------------------------------------- clavardage (clavardage.js) */
.clavardage-bulle { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 999px; background: var(--orange); color: #fff; font: inherit; font-weight: 700; box-shadow: var(--ombre); cursor: pointer; }
.clavardage-bulle:hover { background: var(--orange-fonce); }
.clavardage-bulle[aria-expanded="true"] { display: none; }
.clavardage-icone { width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v11H9l-5 4z' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v11H9l-5 4z' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.clavardage-panneau { position: fixed; right: 20px; bottom: 20px; z-index: 41; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 40px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: 0 18px 50px rgba(20, 35, 45, .22); overflow: hidden; font-size: .95rem; }
.clavardage-panneau[hidden] { display: none; }
.clavardage-entete { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--ardoise); color: #fff; }
.clavardage-fermer { border: 0; background: transparent; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.clavardage-avis { padding: 6px 16px; font-size: .76rem; line-height: 1.45; color: var(--doux); background: var(--creme); border-bottom: 1px solid var(--trait); }
.clavardage-avis summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
.clavardage-avis summary::-webkit-details-marker { display: none; }
.clavardage-avis summary::before { content: "ⓘ"; font-size: .9rem; }
.clavardage-avis summary::after { content: "▾"; margin-left: auto; transition: transform .15s; }
.clavardage-avis[open] summary::after { transform: rotate(180deg); }
.clavardage-avis p { margin: 6px 0 2px; }
.clavardage-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.clavardage-suggestion { border: 1px solid var(--foret); background: #fff; color: var(--foret); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; line-height: 1.3; cursor: pointer; text-align: left; }
.clavardage-suggestion:hover { background: var(--foret-clair); }
.clavardage-fil { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.clavardage-message { margin: 0; padding: 9px 13px; border-radius: 14px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.clavardage-assistant { align-self: flex-start; background: var(--foret-clair); color: var(--texte); border-bottom-left-radius: 4px; }
.clavardage-client { align-self: flex-end; background: var(--ardoise); color: #fff; border-bottom-right-radius: 4px; }
.clavardage-client a { color: #fff; }
.clavardage-attente { color: var(--doux); }
.clavardage-saisie { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--trait); }
.clavardage-saisie textarea { flex: 1; resize: none; font: inherit; padding: 8px 10px; border: 1px solid var(--trait); border-radius: 10px; }
.clavardage-saisie .bouton { padding: 8px 14px; }
@media print { .clavardage-bulle, .clavardage-panneau { display: none; } }
