/* Espace « Préparation aux urgences » */
.em__header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.em__title { font-family: Georgia, serif; color: #2d2419; margin: 0 0 0.35rem; }
.em__intro { color: #6b6558; margin: 0; max-width: 46rem; font-size: 0.92rem; }
.em__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.em__notice { background: #fff9ee; border: 1px solid #ead9bc; border-radius: 8px; padding: 0.7rem 1rem; font-size: 0.9rem; }
.em__filters { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }
.em__filters select { width: auto; flex: 1 1 14rem; min-width: 0; max-width: 22rem; }
.em__check { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: #2d2419; }
.em__staff-pick { margin-top: 0; }
.em__reset { font-size: 0.85rem; }
.em__figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.em__figure { background: #fff; border: 1px solid #e5dfd4; border-radius: 10px; padding: 0.8rem 1rem; display: flex; flex-direction: column; }
.em__figure strong { font-size: 1.5rem; color: #2a6b8a; }
.em__figure span { font-size: 0.82rem; color: #6b6558; }
.em__gaps { font-size: 0.86rem; background: #f5f0e8; border-left: 3px solid #8b5e2a; padding: 0.55rem 0.8rem; border-radius: 4px; }
.em__h2 { font-family: Georgia, serif; color: #2d2419; font-size: 1.2rem; margin: 1.6rem 0 0.6rem; }
.em__matrix { border-collapse: collapse; width: 100%; font-size: 0.8rem; background: #fff; }
.em__matrix th, .em__matrix td { border: 1px solid #e5dfd4; padding: 0.35rem 0.45rem; text-align: left; vertical-align: top; }
.em__matrix thead th { background: #f5f0e8; font-weight: 600; min-width: 6.5rem; }
.em__matrix thead th a { color: #2d2419; text-decoration: none; }
.em__matrix tbody th { min-width: 10rem; font-weight: 600; }
/* Colonne des organisations figée : le tableau des 16 secteurs défile sous elle. */
.em__matrix thead th:first-child,
.em__matrix tbody th { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 2px 0 0 #e5dfd4; }
.em__matrix thead th:first-child { background: #f5f0e8; z-index: 2; }
.em__cell { white-space: nowrap; }
.em__dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-right: 0.25rem; vertical-align: middle; }
.em__cell--operational { background: #eaf2e3; } .em__cell--operational .em__dot { background: #4a6632; }
.em__cell--limited { background: #fbf3e4; }     .em__cell--limited .em__dot { background: #c4956a; }
.em__cell--via_partners { background: #eef4f7; } .em__cell--via_partners .em__dot { background: #2a6b8a; }
.em__cell-text small { color: #6b6558; }
.em__legend, .em__updated, .em__muted { font-size: 0.8rem; color: #6b6558; }
.em__badge { display: inline-block; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 1px 6px; border-radius: 3px; background: rgba(74, 102, 50, 0.15); color: #4a6632; margin-left: 0.3rem; }
.em__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.75rem; }
.em__card { background: #fff; border: 1px solid #e5dfd4; border-radius: 10px; padding: 0.9rem 1rem; min-width: 0; }
.em__card h3 { font-size: 1rem; margin: 0 0 0.5rem; }
.em__card dl { display: block; margin: 0; font-size: 0.85rem; }
.em__card dt, .em__card dd { display: block; }
.em__card dt { font-weight: 600; color: #2d2419; margin-top: 0.4rem; }
.em__card dd { margin: 0; overflow-wrap: anywhere; }
.em__empty { color: #6b6558; font-size: 0.9rem; }
.em__caps { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 0.6rem; }
.em__cap { border: 1.5px solid var(--color-border, #e5dfd4); border-radius: 8px; padding: 0.6rem 0.75rem; background: var(--color-bg-subtle, #faf8f4); min-width: 0; }
.em__cap.is-on { border-color: #4a6632; }
.em__cap-name { font-weight: 600; margin: 0 0 0.4rem; }
.em__cap-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.em__cap-fields label { display: flex; flex-direction: column; font-size: 0.78rem; gap: 0.15rem; min-width: 0; }
.em__cap-fields select, .em__cap-fields input { width: 100%; }
.em__cap-details { grid-column: 1 / -1; }
.em__partner { border: 1px solid #e5dfd4; border-radius: 8px; padding: 0.75rem; margin-bottom: 0.75rem; background: #fff; }
.em__partner-sectors { margin: 0.4rem 0; }
.em__partner-sectors summary { cursor: pointer; font-size: 0.88rem; }
@media (max-width: 600px) {
  .em__cap-fields { grid-template-columns: 1fr; }
  .em__caps, .em__cards { grid-template-columns: 1fr; }
}

/* Historique des modifications (fiche organisation) */
.hist__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.hist__item { background: #fff; border: 1px solid #e5dfd4; border-radius: 10px; padding: 0.75rem 1rem; min-width: 0; }
.hist__meta { font-size: 0.8rem; color: #6b6558; margin: 0; }
.hist__subject { font-weight: 600; margin: 0.2rem 0 0.35rem; overflow-wrap: anywhere; }
.hist__changes { margin: 0; padding-left: 1rem; font-size: 0.85rem; }
.hist__changes li { overflow-wrap: anywhere; margin: 0.15rem 0; }
.hist__label { font-weight: 600; margin-right: 0.35rem; }
.hist__label::after { content: " :"; }
.hist__changes del { color: #8b5e2a; }
.hist__muted { color: #6b6558; font-style: italic; }
.hist__pager { display: flex; justify-content: space-between; margin-top: 1rem; }
