/* ═══════════════════════════════════════════════════════════════════════════
   css/dce.css — ANALYSE DCE (Commercial › Analyse DCE) · 30/09/2026
   Charte Usiwood (charte-usiwood.md) : variables uniquement, bordures plutôt
   qu'ombres, DM Sans / DM Mono, statuts toujours accompagnés d'un mot.
   Préfixe .dce- : aucune règle ne touche un autre écran.
   ═══════════════════════════════════════════════════════════════════════════ */
.dce { padding: 18px 22px 40px; }   /* pleine largeur, comme les autres écrans (Julien, 30/09) */
.dce-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.dce-titre { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--wood-dark); margin: 0; }
.dce-sous { font-size: 13px; color: var(--wood-mid); margin-top: 4px; max-width: 760px; }
.dce-filtres { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.dce-filtres input[type="search"] { min-width: 260px; }
.dce-chip { border: 1px solid var(--border); background: var(--white); color: var(--text); border-radius: 999px; padding: 5px 12px; font: 600 12px "DM Sans", sans-serif; cursor: pointer; }
.dce-chip:hover { background: var(--wood-pale); }
.dce-chip.actif { background: var(--accent); border-color: var(--accent); color: var(--white); }
.dce-chip:focus-visible, .dce-lien:focus-visible, .dce-ligne:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.dce-carte { background: var(--white); border: 1px solid var(--border); border-radius: 12px; }
.dce-carte + .dce-carte { margin-top: 14px; }
.dce-carte-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text); }
.dce-carte-t small { font-weight: 500; color: var(--wood-mid); }
.dce-carte-c { padding: 14px 16px; }

/* Liste des analyses */
.dce-liste { width: 100%; border-collapse: collapse; font-size: 13px; }
.dce-liste th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--wood-mid); padding: 9px 16px; background: var(--wood-bg); border-bottom: 1px solid var(--border); }
.dce-liste td { padding: 11px 16px; border-bottom: 1px solid var(--wood-pale); vertical-align: middle; }
.dce-liste tr.dce-ligne { cursor: pointer; }
.dce-liste tr.dce-ligne:hover td { background: var(--wood-bg); }
.dce-liste .dce-t { font-weight: 600; color: var(--text); }
.dce-liste .dce-m { font-size: 12px; color: var(--wood-mid); }
.dce-mono { font-family: "DM Mono", monospace; font-size: 12px; font-weight: 500; }

.dce-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.dce-tag-preparation { background: var(--orange-soft); color: var(--orange-text); }
.dce-tag-pieces_ok { background: var(--accent-soft); color: var(--wood-dark); }
.dce-tag-en_cours { background: var(--accent-soft); color: var(--accent); }
.dce-tag-prete, .dce-tag-verifiee { background: var(--green-soft); color: var(--green); }
.dce-tag-erreur { background: var(--red-soft); color: var(--red); }
.dce-tag-neutre { background: var(--wood-pale); color: var(--wood-mid); }
.dce-tag-texte { background: var(--green-soft); color: var(--green); }
.dce-tag-image { background: var(--accent-soft); color: var(--wood-dark); }

.dce-vide { padding: 36px 20px; text-align: center; color: var(--wood-mid); font-size: 13px; line-height: 1.6; }
.dce-vide b { display: block; color: var(--wood-dark); font-size: 15px; margin-bottom: 4px; }

/* Page d'une analyse */
.dce-retour { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; margin-bottom: 10px; }
.dce-retour:hover { text-decoration: underline; }
.dce-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--wood-mid); margin-top: 6px; }
.dce-etapes { display: flex; gap: 8px; margin: 14px 0; list-style: none; padding: 0; }
.dce-etape { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; }
.dce-etape.actif { border: 1.5px solid var(--accent); }
.dce-etape.fait .dce-etape-n { background: var(--green); color: var(--white); }
.dce-etape-n { width: 24px; height: 24px; border-radius: 999px; background: var(--wood-pale); color: var(--wood-mid); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dce-etape.actif .dce-etape-n { background: var(--accent); color: var(--white); }
.dce-etape b { display: block; font-size: 13px; }
.dce-etape small { font-size: 11px; color: var(--wood-mid); }

.dce-grille { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.dce-totaux { display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--wood-bg); border-radius: 12px 12px 0 0; }
.dce-total { display: flex; flex-direction: column; gap: 2px; }
.dce-total .l { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--wood-mid); }
.dce-total .v { font-family: "DM Mono", monospace; font-size: 18px; font-weight: 700; color: var(--wood-dark); }

.dce-depot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 14px 16px; padding: 18px 14px; border: 1.5px dashed var(--wood-light); border-radius: 12px; background: var(--wood-bg); text-align: center; cursor: pointer; }
.dce-depot:hover, .dce-depot.survol { border-color: var(--accent); background: var(--accent-soft); }
.dce-depot b { color: var(--wood-dark); font-size: 13px; }
.dce-depot small { color: var(--wood-mid); font-size: 12px; }
.dce-depot:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dce-envoi { margin: 0 16px 12px; font-size: 12px; color: var(--wood-mid); }
.dce-envoi .barre { height: 6px; border-radius: 999px; background: var(--wood-pale); margin-top: 4px; overflow: hidden; }
.dce-envoi .barre i { display: block; height: 6px; background: var(--accent); width: 0; transition: width .15s; }

.dce-groupe { padding: 10px 16px 4px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--wood-mid); display: flex; align-items: center; gap: 8px; }
.dce-groupe .n { background: var(--wood-pale); color: var(--wood-mid); border-radius: 999px; padding: 0 7px; font-size: 11px; letter-spacing: 0; }
.dce-piece { display: grid; grid-template-columns: 24px minmax(0, 1fr) 170px 150px 34px; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--wood-pale); }
.dce-piece.ecartee { background: var(--wood-bg); }
.dce-piece.ecartee .dce-p-nom { color: var(--wood-mid); }
.dce-piece input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.dce-p-nom { font-size: 13px; font-weight: 600; color: var(--text); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; word-break: break-word; font-family: inherit; }
.dce-p-nom:hover { color: var(--accent); text-decoration: underline; }
.dce-p-meta { font-size: 11px; color: var(--wood-mid); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dce-p-motif { font-size: 11px; color: var(--orange-text); margin-top: 3px; }
.dce-piece select, .dce-piece input[type="text"] { width: 100%; padding: 6px 8px; border: 1.5px solid var(--border); border-radius: 8px; font: 400 12px "DM Sans", sans-serif; color: var(--text); background: var(--white); }
.dce-piece select:focus, .dce-piece input[type="text"]:focus, .dce-champ:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.dce-piece .dce-pages-l { font-size: 10px; color: var(--wood-mid); display: block; margin-bottom: 2px; }
.dce-ico { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--white); color: var(--wood-mid); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.dce-ico:hover { background: var(--red-soft); color: var(--red); border-color: var(--red-soft); }
.dce-zip { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--wood-pale); font-size: 12px; color: var(--wood-mid); }

.dce-pied { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.dce-bandeau { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.55; background: var(--accent-soft); border: 1px solid var(--accent-line); margin-bottom: 14px; }
.dce-bandeau.vert { background: var(--green-soft); border-color: var(--green-line); }
.dce-bandeau b { color: var(--wood-dark); }
.dce-champ { width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px; font: 400 13px/1.5 "DM Sans", sans-serif; color: var(--text); background: var(--white); box-sizing: border-box; }
textarea.dce-champ { min-height: 72px; resize: vertical; }
.dce-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--wood-mid); margin: 0 0 5px; }
.dce-form-g { margin-bottom: 14px; }
.dce-aide { font-size: 11px; color: var(--wood-mid); margin-top: 4px; }
.dce-journal { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.dce-journal li { padding: 7px 0; border-top: 1px solid var(--wood-pale); color: var(--text); }
.dce-journal li:first-child { border-top: 0; }
.dce-journal small { display: block; color: var(--wood-mid); }

/* Fenêtre « Nouvelle analyse » (moderne, jamais de fenêtre système) */
.dce-voile { position: fixed; inset: 0; background: rgba(23, 40, 52, .5); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 9000; padding: 16px; }
.dce-fen { background: var(--white); border-radius: 16px; width: 100%; max-width: 720px; max-height: 92vh; overflow: auto; box-shadow: 0 24px 70px rgba(0, 0, 0, .32); animation: dceEntree .2s ease; }
@keyframes dceEntree { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dce-fen { animation: none; } .dce-envoi .barre i { transition: none; } }
.dce-fen-t { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 12px; font-size: 16px; font-weight: 700; color: var(--wood-dark); }
.dce-fen-c { padding: 0 22px 18px; }
.dce-fen-p { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--white); }
.dce-fermer { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--white); cursor: pointer; font-size: 16px; color: var(--wood-mid); }
.dce-fermer:hover { background: var(--wood-pale); }
.dce-onglets { display: flex; padding: 3px; background: var(--wood-pale); border-radius: 8px; gap: 3px; margin-bottom: 14px; }
.dce-onglets button { flex: 1; border: 0; background: transparent; padding: 8px 10px; border-radius: 6px; font: 600 13px "DM Sans", sans-serif; color: var(--wood-mid); cursor: pointer; }
.dce-onglets button[aria-selected="true"] { background: var(--white); color: var(--wood-dark); box-shadow: 0 1px 0 var(--border); }
.dce-res { border: 1px solid var(--border); border-radius: 8px; max-height: 220px; overflow: auto; }
.dce-res button { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--wood-pale); background: var(--white); padding: 9px 12px; font: 400 13px "DM Sans", sans-serif; cursor: pointer; color: var(--text); }
.dce-res button:first-child { border-top: 0; }
.dce-res button:hover, .dce-res button[aria-pressed="true"] { background: var(--accent-soft); }
.dce-res small { color: var(--wood-mid); }
.dce-cases { border: 1px solid var(--border); border-radius: 8px; max-height: 280px; overflow: auto; }
.dce-cases label { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-top: 1px solid var(--wood-pale); cursor: pointer; font-size: 13px; }
.dce-cases label:first-child { border-top: 0; }
.dce-cases label:hover { background: var(--wood-bg); }
.dce-cases input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
.dce-cases small { display: block; color: var(--wood-mid); font-size: 11px; }
.dce-cases details { border-top: 1px solid var(--wood-pale); }
.dce-cases summary { padding: 9px 12px; font-size: 12px; color: var(--wood-mid); cursor: pointer; }
.dce-cases summary:hover { background: var(--wood-bg); }
.dce-cases details label:first-of-type { border-top: 1px solid var(--wood-pale); }

/* ─── Blocs 3 + 4 : agent IA, postes à chiffrer ─── */
.dce-ia { margin-bottom: 14px; }
.dce-avance { display: flex; flex-direction: column; gap: 5px; min-width: 170px; font-size: 12px; }
.dce-avance > div:first-child { display: flex; justify-content: space-between; gap: 10px; color: var(--wood-mid); }
.dce-avance .barre { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.dce-avance .barre i { display: block; height: 6px; background: var(--green); }
.dce-postes { display: grid; grid-template-columns: 456px minmax(0, 1fr);   /* 30/09 11:50 : 380 px + 20 % (Julien) */
   gap: 16px; align-items: stretch; margin-bottom: 16px; height: calc(100vh - 195px); min-height: 540px; }
.dce-postes > .dce-carte { display: flex; flex-direction: column; overflow: hidden; min-height: 0; margin: 0; }
.dce-postes-l .dce-carte-t { display: flex; align-items: center; justify-content: space-between; }
.dce-postes-defil { overflow: auto; min-height: 0; flex: 1; }
/* En-tête des postes (maquette du 29/09) : titre à gauche, avancement + boutons à droite, sur une ligne */
.dce-tete-postes { flex-wrap: nowrap; }
.dce-tete-g { flex: 1 1 360px; min-width: 0; }   /* base 360 px : sous cette largeur, les boutons passent en dessous (sinon le titre se tassait mot par mot) */
.dce-tete-d { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.dce-synthese { background: var(--white); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; font-size: 13px; line-height: 1.55; }
.dce-synthese summary { display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; cursor: pointer; list-style: none; }
.dce-synthese summary::-webkit-details-marker { display: none; }
.dce-synthese summary .dce-label { margin: 0; flex-shrink: 0; }
.dce-synthese-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--wood-mid); }
.dce-synthese summary::after { content: 'Lire'; flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--accent); }
.dce-synthese[open] summary::after { content: 'Réduire'; }
.dce-synthese[open] .dce-synthese-t { visibility: hidden; }
.dce-synthese p { margin: 0; padding: 0 14px 12px; }
.dce-poste { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--wood-pale); background: var(--white); font-family: inherit; color: inherit; cursor: pointer; }
.dce-poste:hover { background: var(--wood-bg); }
.dce-poste.sel { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.dce-poste:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dce-poste-n { width: 22px; flex-shrink: 0; color: var(--wood-mid); padding-top: 1px; }
.dce-poste-c { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.dce-poste-c b { font-weight: 600; }
.dce-poste-c small { font-size: 11px; color: var(--wood-mid); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.dce-poste-d { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; max-width: 96px; text-align: right; }
.dce-poste-d .dce-mono { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dce-st-afaire { background: var(--orange-soft); color: var(--orange-text); }
.dce-st-fait { background: var(--green-soft); color: var(--green); }
.dce-st-hors { background: var(--wood-pale); color: var(--wood-mid); }
.dce-poste-t { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.dce-poste-tg { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dce-poste-tg .dce-label { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dce-poste-tg .dce-tag { text-transform: none; letter-spacing: 0; }
.dce-poste-t h2 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 700; color: var(--wood-dark); }
.dce-poste-tb { display: flex; gap: 8px; flex-shrink: 0; }
.dce-poste-tb .btn { height: 32px; }
.dce-poste-tb .btn-secondary.actif { background: var(--wood-pale); border-color: var(--wood-mid); }
.dce-btn-chiffre { background: var(--green); border: 1px solid var(--green); color: var(--white); }
.dce-btn-chiffre:hover { filter: brightness(1.08); }
.dce-btn-chiffre.actif { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.dce-poste-corps { overflow: auto; min-height: 0; flex: 1; padding: 16px 18px; display: flex; flex-direction: column; gap: 18px; }
.dce-poste-corps .dce-form-g { margin: 0; }
.dce-poste-corps .dce-faits { margin: 0; }
.dce-poste-corps .dce-plan:last-child { margin-bottom: 0; }
.dce-fait-v { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--wood-dark); }
.dce-fait { font-weight: 400; }
.dce-fait-plus { font-size: 12px; line-height: 1.45; color: var(--wood-mid); }
.dce-fait-plus summary { cursor: pointer; font-weight: 600; color: var(--accent); list-style: none; width: max-content; }
.dce-fait-plus summary::-webkit-details-marker { display: none; }
.dce-fait-plus[open] summary { margin-bottom: 3px; }
.dce-poste-sous { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--wood-mid); }
.dce-tete-postes .dce-meta { flex-wrap: nowrap; min-width: 0; }
.dce-tete-postes .dce-meta > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dce-tete-postes .dce-meta > span:last-child { flex-shrink: 2; }
.dce-fait-src { display: flex; flex-direction: column; gap: 3px; font-weight: 500; }
.dce-src a { font-size: 12px; font-weight: 600; }
.dce-resume { margin: 0; font-size: 13.5px; line-height: 21px; white-space: pre-line; }
.dce-faits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.dce-fait { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; background: var(--wood-bg); border-radius: 8px; font-size: 13px; font-weight: 600; }
.dce-fait .dce-label { margin: 0; }
.dce-sources { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dce-plan { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.dce-plan-i { width: 40px; height: 34px; flex-shrink: 0; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.dce-plan-c { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.dce-plan-c small { font-size: 12px; color: var(--wood-mid); }
.dce-grille2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dce-grille2 .dce-carte + .dce-carte { margin-top: 0; }
.dce-puces { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; }
.dce-puces li + li { margin-top: 6px; }
.dce-puces small { color: var(--wood-mid); }
.dce-rouge { border-color: var(--red-line); }
@media print {
  .sidebar, .header, .app-header, .mobile-tabbar, .dce-retour, .dce-tete button, #dce-poste-detail textarea, .dce-poste-t button, .ui-toasts { display: none !important; }
  .dce-postes { grid-template-columns: 1fr; height: auto; } .dce-postes-defil, .dce-poste-corps { overflow: visible; } .dce-synthese-t { display: none; } .dce-synthese p { display: block; }
}

@media (max-width: 960px) {
  .dce-postes, .dce-grille2 { grid-template-columns: minmax(0, 1fr); }
  .dce-postes { height: auto; min-height: 0; } .dce-postes-defil { max-height: 50vh; } .dce-poste-corps { overflow: visible; }
  .dce-tete-postes { flex-wrap: wrap; } .dce-tete-d { flex-wrap: wrap; } .dce-poste-t { flex-wrap: wrap; }
  .dce-faits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dce-grille { grid-template-columns: minmax(0, 1fr); }
  .dce-piece { grid-template-columns: 24px minmax(0, 1fr) 34px; }
  .dce-piece .dce-p-type, .dce-piece .dce-p-pages { grid-column: 2 / 3; }
}
@media (max-width: 768px) {
  .dce { padding: 14px 12px 90px; }
  .dce-etapes { flex-direction: column; }
  .dce-liste th:nth-child(3), .dce-liste td:nth-child(3), .dce-liste th:nth-child(5), .dce-liste td:nth-child(5) { display: none; }
  .dce-filtres input[type="search"] { min-width: 0; flex: 1; }
}

/* ─── Choix du mode d'envoi (30/09 : le prix bien visible, pour sensibiliser) ─── */
.dce-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 640px; }
.dce-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--white); color: var(--wood-dark); cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.dce-mode:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); }
.dce-mode:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dce-mode:disabled { opacity: .55; cursor: not-allowed; }
.dce-mode-t { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.dce-mode-p { font-size: 24px; line-height: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--accent); }
.dce-mode.rapide .dce-mode-p { color: var(--orange-text, var(--accent)); }
.dce-mode-d { font-size: 12px; color: var(--wood-mid); }
@media (max-width: 560px) { .dce-modes { grid-template-columns: 1fr; } }

/* ─── Postes / Rapport en deux onglets, comme la maquette (30/09 11:30) ─── */
.dce-fil { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.dce-titre-1l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dce-onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 14px; }
.dce-onglet { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; font: 600 13px "DM Sans", sans-serif; color: var(--wood-mid); cursor: pointer; }
.dce-onglet:hover { color: var(--wood-dark); }
.dce-onglet.actif { color: var(--wood-dark); border-bottom-color: var(--accent); }
.dce-onglet:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.dce-onglet-n { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--wood-pale); color: var(--wood-mid); }
.dce-onglet-n.rouge { background: var(--red-soft); color: var(--red); }
.dce-tag-rouge { background: var(--red-soft); color: var(--red); }
.dce-postes-defil, .dce-poste-corps { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.dce-plan .dce-lien, .dce-plan a.btn { white-space: nowrap; flex-shrink: 0; }
.dce-src a { font-family: "DM Mono", monospace; font-size: 12px; font-weight: 500; }
.dce-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.dce-kpi { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.dce-kpi .dce-label { margin: 0; }
.dce-kpi-v { font-family: "DM Mono", monospace; font-size: 22px; line-height: 22px; font-weight: 700; color: var(--wood-dark); }
.dce-kpi-v.rouge { color: var(--red); }
.dce-kpi-s { font-size: 11px; color: var(--wood-mid); }
.dce-rapport { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 12px; }
.dce-rapport-g, .dce-rapport-d { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dce-rapport .dce-carte + .dce-carte { margin-top: 0; }
.dce-carte-tf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dce-rapport-p { margin: 0; padding: 14px 16px; font-size: 13.5px; line-height: 21px; }
.dce-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dce-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--wood-mid); padding: 9px 16px; background: var(--wood-bg); border-bottom: 1px solid var(--border); }
.dce-table td { padding: 10px 16px; border-bottom: 1px solid var(--wood-pale); vertical-align: top; }
.dce-table tr:last-child td { border-bottom: 0; }
.dce-table .d { text-align: right; white-space: nowrap; }
.dce-t-b { font-weight: 600; }
.dce-t-s { font-size: 11px; color: var(--wood-mid); margin-top: 2px; }
.dce-pv { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--wood-pale); font-size: 13px; line-height: 1.5; }
.dce-pv:last-child { border-bottom: 0; }
.dce-pv.rouge { background: var(--red-soft); }
.dce-pv.rouge b { color: var(--red); }
.dce-pv-i { flex-shrink: 0; color: var(--orange-text); font-size: 17px; line-height: 20px; }
.dce-pv.rouge .dce-pv-i { color: var(--red); }
.dce-pv-s { margin-top: 4px; font-size: 12px; }
.dce-tags-l { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; }
@media (max-width: 960px) {
  .dce-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dce-rapport { grid-template-columns: minmax(0, 1fr); }
  .dce-titre-1l { white-space: normal; }
}
@media print { .dce-onglets { display: none; } }
