/* codes-dechets.css : la recherche de codes déchets de /modeles/liste-codes-dechets/.
   Chargée sur cette page seulement (scripts/build-doc.js, fiche avec « nomenclature »). */
.led { --led-danger: #b3261e; margin: 28px 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: clamp(16px, 3vw, 24px); display: grid; gap: 12px; min-width: 0; max-width: 100%; scroll-margin-top: 96px; }
:root[data-theme='dark'] .led { --led-danger: #f08a80; }
.led > * { min-width: 0; margin: 0; }
.led [hidden] { display: none !important; }
.led h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.01em; }
.led-intro { color: var(--ink-2); max-width: 64ch; }

.led-form { display: grid; gap: 6px; }
.led-form label { font-size: 0.875rem; color: var(--ink-3); }
.led-form input { width: 100%; min-height: 54px; border: 1px solid var(--ink-3); border-radius: 6px; padding: 10px 14px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1.125rem; -webkit-appearance: none; appearance: none; }
.led-form input::placeholder { color: var(--ink-3); opacity: 0.75; }
.led-form input:focus-visible, .led button:focus-visible, .led summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.led-exemples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--ink-3); font-size: 0.875rem; }
.led-exemples button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 5px 12px; min-height: 32px; font: inherit; font-size: 0.875rem; line-height: 1.3; cursor: pointer; }
.led-exemples button:hover { border-color: var(--ink); }

/* La phrase-réponse : ce qu'on lit d'abord. */
.led-reponse { font-family: var(--font-title); font-size: 1.0625rem; font-weight: 500; color: var(--ink); line-height: 1.4; }

.led-tout > summary, .led-ch > summary, .led-methode > summary { cursor: pointer; list-style: none; }
.led-tout > summary::-webkit-details-marker, .led-ch > summary::-webkit-details-marker, .led-methode > summary::-webkit-details-marker { display: none; }
.led-tout > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--ink-3); }
.led-tout > summary::after, .led-methode > summary::after { content: '+'; font-family: var(--font-mono); color: var(--ink-3); }
.led-tout[open] > summary::after, .led-methode[open] > summary::after { content: '−'; }
/* Pendant une recherche, la liste est le résultat : son bouton d'ouverture ne sert plus. */
.led-actif .led-tout > summary { display: none; }

.led-liste { margin-top: 10px; border-top: 1px solid var(--line); }
.led-ch { border-bottom: 1px solid var(--line); }
.led-ch > summary { display: grid; grid-template-columns: 4.5ch minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 11px 2px; min-height: 44px; }
.led-ch > summary:hover .led-l { text-decoration: underline; text-underline-offset: 3px; }
.led-n { font-family: var(--font-mono); font-weight: 700; font-size: 1rem; color: var(--ink); }
.led-l { color: var(--ink); line-height: 1.35; }
.led-nb { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); white-space: nowrap; }
.led-ch[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface-2); }

.led-s { padding: 10px 0 4px; }
.led-sec { font-size: 0.8125rem; color: var(--ink-3); line-height: 1.35; padding: 0 2px 4px; }
.led-sec span { font-family: var(--font-mono); margin-right: 6px; }
.led-liste ul { list-style: none; margin: 0; padding: 0; }
.led-liste li { display: grid; grid-template-columns: 10ch minmax(0, 1fr); column-gap: 12px; align-items: baseline; padding: 7px 2px; margin: 0; border-top: 1px solid var(--line); line-height: 1.4; color: var(--ink); }
.led-liste li::before { content: none; }
.led-liste code, .led-c { grid-row: 1 / span 3; font-family: var(--font-mono); font-size: 0.9375rem; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; white-space: nowrap; text-align: left; }
.led-c { cursor: copy; border-bottom: 1px dashed var(--ink-3); justify-self: start; min-height: 24px; }
.led-c:hover { border-bottom-color: var(--ink); }
.led-c.est-copie { color: var(--ink-3); border-bottom-color: transparent; }
.led-liste li > span { grid-column: 2; }
.led-liste li.d .led-c, .led-liste li.d code { color: var(--led-danger); }
/* Étiquettes d'une ligne : « dangereux », le statut du 9/11/2026, l'avertissement éventuel. */
.led-liste li i, .led-liste li em { font-style: normal; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; margin-left: 6px; }
.led-liste li i { color: var(--led-danger); }
.led-liste li em { color: var(--ink-3); }
.led-liste li small { grid-column: 2; display: block; font-size: 0.8125rem; color: var(--ink-2); margin-top: 2px; }
.led-liste li.x > span { text-decoration: line-through; color: var(--ink-3); }
.led-liste li.est-cible { background: var(--accent-tint-2); }

.led-methode { border-top: 1px solid var(--line); padding-top: 10px; }
.led-methode > summary { display: inline-flex; gap: 8px; align-items: center; min-height: 36px; color: var(--ink-2); font-size: 0.9375rem; }
.led-methode ol { margin: 6px 0 0; padding-left: 1.3em; color: var(--ink-2); font-size: 0.9375rem; display: grid; gap: 6px; max-width: 70ch; }
.led-source { font-size: 0.8125rem; color: var(--ink-3); max-width: 80ch; }

@media (max-width: 560px) {
  .led-liste li { grid-template-columns: 9ch minmax(0, 1fr); column-gap: 10px; }
  .led-ch > summary { grid-template-columns: 4ch minmax(0, 1fr); }
  .led-nb { grid-column: 2; }
}
