/* ── ADMIN LAYOUT (dark theme) ── */
.admin-container {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 2rem 60px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-toolbar-left {
  display: flex;
  align-items: center;
}
.admin-toolbar-left .sec-lbl { margin-bottom: 0; }

/* ── SEARCH BAR ── */
.admin-search {
  padding: 7px 12px;
  border: 1px solid var(--brd);
  border-radius: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  width: 320px;
  max-width: 100%;
  background: rgba(255,255,255,.03);
  color: var(--ink);
  transition: border-color .2s;
}
.admin-search::placeholder { color: var(--t3); }
.admin-search:focus { outline: none; border-color: var(--gold); }

/* ── INACTIVE ROW ── */
.admin-table tbody tr.row-inactive td { opacity: .45; }
.admin-table tbody tr.row-inactive:hover td { opacity: .65; }
.admin-table tbody tr.row-inactive .badge-off { opacity: 1; }

/* ── TABLE ── */
.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--brd);
  border-radius: var(--r-md);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table thead tr {
  background: rgba(255,255,255,.015);
  border-bottom: 1px solid var(--brd);
}

.admin-table th {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--t3);
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
}

.admin-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  vertical-align: middle;
  color: var(--t2);
}

.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: rgba(255,255,255,.015); }

.td-ref {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  white-space: nowrap;
}

.td-nom { font-weight: 500; color: var(--ink); }

.td-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.admin-empty {
  text-align: center;
  color: var(--t3);
  padding: 40px 0;
  font-style: italic;
}

/* ── TABLE ACTION BUTTONS ── */
.tbl-btn {
  padding: 4px 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all .2s;
}
.tbl-btn:hover { transform: translateY(-1px); }

.tbl-btn-outline {
  background: none;
  border-color: var(--brd);
  color: var(--t2);
}
.tbl-btn-outline:hover { border-color: var(--brd-h); color: var(--gold); }

.tbl-btn-danger {
  background: none;
  border-color: rgba(239,83,80,.2);
  color: var(--alert);
}
.tbl-btn-danger:hover { background: var(--alert-bg); }

.tbl-btn-edit {
  background: var(--gold-d);
  color: var(--gold);
  border-color: rgba(212,168,83,.2);
}
.tbl-btn-edit:hover { background: rgba(212,168,83,.2); }


/* ── LOGIN PAGE ── */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
}

.login-form {
  background: var(--bg-card);
  border: 1px solid var(--brd);
  border-radius: var(--r-lg);
  padding: 32px 36px 28px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 4px;
}

.login-error {
  background: var(--alert-bg);
  border: 1px solid rgba(239,83,80,.2);
  color: var(--alert);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
}

.login-ok {
  background: var(--ok-bg);
  border: 1px solid rgba(76,175,80,.2);
  color: var(--ok);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
}

.setup-hint {
  font-size: 12px;
  color: var(--t3);
  line-height: 1.5;
  margin-top: -4px;
}

.btn-login {
  background: var(--gold);
  color: var(--bg);
  border: none;
  padding: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 4px;
  transition: all .2s;
}
.btn-login:hover { background: #C49A45; box-shadow: 0 4px 16px rgba(212,168,83,.3); }

.btn-m365 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--brd);
  border-radius: 8px;
  color: var(--ink);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 12px;
  padding: 9px 14px;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
}
.btn-m365:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }

.login-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--t3);
  font-size: 11px;
}
.login-sep::before,
.login-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--brd);
}

/* ── MODAL ── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 60px rgba(0,0,0,.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(212,168,83,.08);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  border-bottom: 1px solid var(--brd);
  color: var(--gold);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 14px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--t3);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--ink); }

.modal-body {
  padding: 20px 20px 8px;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}
.modal-body .sec-lbl { margin-top: 14px; }
.modal-body .card { margin-bottom: 0; }

.req { color: var(--gold); }

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--brd);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(255,255,255,.01);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.modal-err {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--alert);
  flex: 1;
}

/* ── TABS (admin hub) ── */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--brd);
  margin-bottom: 24px;
}

.tab-btn {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  color: var(--t3);
  transition: all .2s;
}
.tab-btn:hover { color: var(--t1); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .35s cubic-bezier(.4,0,.2,1); }

/* ── STEP TITLE (import) ── */
.step-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: .75rem;
  color: var(--ink);
}

/* ── IMPORT RESULT / ERROR ── */
.import-result {
  background: var(--bg-card);
  border: 1px solid var(--brd);
  border-radius: var(--r-md);
  padding: 1rem 1.2rem;
  font-size: 13px;
}

.import-error {
  margin-top: 1rem;
  background: var(--alert-bg);
  border: 1px solid rgba(239,83,80,.2);
  border-radius: var(--r-md);
  padding: .75rem 1rem;
  color: var(--alert);
  font-size: 12px;
}

/* ── BADGES ── */
.badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}

.badge-m365  { background: var(--blue-d); color: var(--blue); }
.badge-local { background: rgba(255,255,255,.04); color: var(--t3); border: 1px solid var(--brd); }
.badge-admin { background: var(--gold-d); color: var(--gold); }
.badge-user  { background: rgba(255,255,255,.04); color: var(--t3); border: 1px solid var(--brd); }
.badge-ok    { background: var(--ok-bg); color: var(--ok); }
.badge-off   { background: var(--alert-bg); color: var(--alert); }

/* ── ACTEURS CARDS (modal) ── */
.acteur-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  margin-bottom: 10px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--brd);
  border-radius: var(--r-md);
}
.acteur-r1 {
  display: grid;
  grid-template-columns: 180px 1fr 32px;
  gap: 8px;
  align-items: center;
}
.acteur-r2 {
  display: grid;
  grid-template-columns: 70px 1fr 110px 1fr;
  gap: 8px;
}
.acteur-r3 { display: block; }
.acteur-r3 input { width: 100%; }
.acteur-r4 {
  display: grid;
  grid-template-columns: 150px 1fr 1fr;
  gap: 8px;
}
@media (max-width: 700px) {
  .acteur-r1, .acteur-r2, .acteur-r4 { grid-template-columns: 1fr; }
}

/* ── BOÎTES MAIL ── */
.mb-search-input {
  padding: 6px 10px;
  border: 1px solid var(--brd);
  border-radius: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  width: 280px;
  background: rgba(255,255,255,.03);
  color: var(--ink);
}

.mb-mapping-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.mb-mapping-row:last-child { border-bottom: none; }

.mb-email { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--ink); }
.mb-label { font-size: 11px; color: var(--t3); margin-left: 10px; }
.mb-count { font-size: 11px; color: var(--t3); margin-left: 10px; }

/* ── Entités juridiques (admin/entites) ── */
#entitesTable td { padding: 8px 10px; vertical-align: top; }
#entitesTable input[type=text],
#entitesTable input[type=email],
#entitesTable textarea {
  width: 100%;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--brd);
  color: var(--ink);
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12.5px;
  font-family: inherit;
  transition: border-color .15s ease, background .2s ease;
}
#entitesTable input[type=text]:focus,
#entitesTable input[type=email]:focus,
#entitesTable textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(212,168,83,.04);
}
#entitesTable input[data-f=siret] { font-family: 'DM Mono', monospace; }
#entitesTable input[data-f=email_communication] { font-family: 'DM Mono', monospace; font-size: 12px; }
#entitesTable textarea { resize: vertical; min-height: 44px; }

/* Address grid — N° + voie + CP + ville on one row (mirrors fiche chantier) */
#entitesTable .ent-address-grid {
  display: grid;
  grid-template-columns: 60px 1fr 80px 1fr;
  gap: 6px;
}

#entitesTable .ent-code {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  padding: 3px 8px;
  border: 1px solid rgba(212,168,83,.3);
  border-radius: 4px;
  background: rgba(212,168,83,.06);
  letter-spacing: .3px;
}
#entitesTable .ent-interco {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 11.5px;
  color: var(--blue);
  padding: 3px 8px;
  border: 1px solid rgba(120,180,220,.25);
  border-radius: 4px;
  background: rgba(120,180,220,.06);
  cursor: help;
}
#entitesTable .ent-interco-none {
  color: var(--t3);
  font-size: 12px;
  cursor: help;
}

/* Visual feedback during/after save */
#entitesTable input.saving,
#entitesTable textarea.saving { border-color: var(--blue); }
#entitesTable input.saved,
#entitesTable textarea.saved {
  border-color: rgba(120,200,120,.5);
  background: rgba(120,200,120,.06);
}

/* Toast notification */
.ent-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--brd);
  color: var(--ink);
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  z-index: 1000;
}
.ent-toast-error { border-color: var(--alert); color: var(--alert); background: var(--alert-bg); }
.ent-toast-info  { border-color: var(--brd); }
.ent-toast-ok    { border-color: rgba(120,200,120,.6); color: var(--ok); background: rgba(120,200,120,.08); }

/* ────────────────────────────────────────────────────────────────────
   Admin — Référentiel articles
   ──────────────────────────────────────────────────────────────────── */

/* Toolbar : filtres + recherche + bouton "Nouveau" */
.art-search-input,
.art-filter-select {
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--brd);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 12.5px;
  font-family: inherit;
}
.art-search-input { min-width: 240px; }
.art-filter-select { cursor: pointer; }
.art-search-input:focus,
.art-filter-select:focus { border-color: var(--brd-h); outline: none; }
.art-filter-chk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--t2);
  font-size: 12px;
  cursor: pointer;
}
.art-filter-chk input { width: auto; margin: 0; cursor: pointer; }
.art-count {
  margin-left: 8px;
  color: var(--t3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .3px;
}
.art-btn-new {
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--bg);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease;
}
.art-btn-new:hover { background: #C49A45; }

/* Cellules de la table principale */
.art-btn-row {
  height: 28px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid var(--brd);
  background: transparent;
  color: var(--t2);
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.art-btn-row:hover { border-color: var(--brd-h); color: var(--ink); }

.art-th-hint {
  display: inline-block;
  margin-left: 4px;
  color: var(--t3);
  font-size: 11px;
  cursor: help;
  font-weight: normal;
}

/* Picker dans une cellule de table */
.art-cell-picker {
  height: 28px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
}
/* On laisse le drop sortir de la cellule (sinon il est coupé par overflow) */
.fc-table td.fc-ac-cell,
.admin-table td.fc-ac-cell {
  overflow: visible;
}
/* Conteneur cellule : ⚠ icon + picker côte à côte */
.art-cell-pickwrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.art-cell-pickwrap .fc-ac-wrap {
  flex: 1;
  min-width: 0;
}
.art-pill-warn {
  display: inline-block;
  font-size: 13px;
  line-height: 1;
  color: var(--warn);
  flex-shrink: 0;
}
/* Item "— Effacer —" dans les dropdowns autocomplete */
.fc-ac-clear .fc-ac-lbl {
  color: var(--t3);
  font-style: italic;
}
.art-flt-flags {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10.5px;
}
.art-famille-libelle {
  color: var(--t2);
  font-size: 12px;
}

/* Labels Actif / Obsolète (remplacent la checkbox actif dans la table) */
.art-actif-label {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: 1px solid var(--brd);
}
.art-actif-on {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: rgba(102,187,106,.25);
}
.art-actif-off {
  background: var(--alert-bg);
  color: var(--alert);
  border-color: rgba(239,83,80,.25);
}

/* ── Référentiel familles : tabs nav ── */
.ref-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--brd);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ref-tab {
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: var(--t2);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .15s ease, background .15s ease;
}
.ref-tab:hover { color: var(--ink); }
.ref-tab.active {
  background: var(--bg-card);
  color: var(--ink);
  border-color: var(--brd);
}
.ref-tab-count {
  margin-left: 4px;
  color: var(--t3);
  font-weight: 500;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.ref-cell-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* Sync flag familles ↔ RA */
.ref-sync {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
}
.ref-sync-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(102,187,106,.25); }
.ref-sync-ko { background: var(--alert-bg); color: var(--alert); border: 1px solid rgba(239,83,80,.25); }

/* Type famille pill */
.ref-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  border: 1px solid var(--brd);
}
.ref-pill-travaux        { background: var(--blue-d); color: var(--blue); border-color: rgba(120,180,220,.25); }
.ref-pill-frais_generaux { background: var(--warn-bg); color: var(--warn); border-color: rgba(255,183,77,.25); }
.ref-pill-sous_traitance { background: rgba(206,147,216,.12); color: var(--purple); border-color: rgba(206,147,216,.25); }

#articlesTable input.saving,
#articlesTable select.saving { border-color: var(--blue); }
#articlesTable input.saved,
#articlesTable select.saved {
  border-color: rgba(120,200,120,.5);
  background: rgba(120,200,120,.06);
}

/* ── Modal édition / création ── */
.art-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}
/* Flex-center the card vertically AND keep clear of the topbar
   (~60px = ~5vh). The previous `margin: 4vh auto` left the card
   overlapping the topbar visually.
   `:not([hidden])` is critical : a bare `display: flex` on .art-modal
   would override the user-agent `display: none` of [hidden] and leave
   the modal permanently visible — neither the cross nor a programmatic
   `modal.hidden = true` could close it. */
.art-modal:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 0;
}
.art-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}
.art-modal-card {
  position: relative;
  width: min(900px, 92vw);
  max-height: 90vh;
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--brd);
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.art-modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--brd);
  background: rgba(255,255,255,.02);
}
.art-modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.art-modal-close {
  height: 28px;
  width: 28px;
  border: 1px solid var(--brd);
  background: transparent;
  color: var(--t2);
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.art-modal-close:hover { border-color: var(--brd-h); color: var(--ink); }
.art-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}
.art-modal-ftr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--brd);
  background: rgba(255,255,255,.02);
}
.art-modal-section {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--rule);
}
.art-modal-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.art-modal-section h3 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--t3);
  margin: 0 0 10px 0;
  font-weight: 700;
}
.art-modal-hint {
  font-size: 11.5px;
  color: var(--t3);
  margin: 0 0 8px 0;
}
.art-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 14px;
  align-items: start;
}
.art-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--t2);
}
.art-field-wide { grid-column: span 2; }
.art-field span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--t3);
}
.art-field input,
.art-field select {
  height: 32px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid var(--brd);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 12.5px;
  font-family: inherit;
}
.art-field-hint {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--t3);
  font-style: italic;
}
.art-modal-body textarea {
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid var(--brd);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 12.5px;
  font-family: inherit;
  resize: vertical;
}

/* Listes d'associations M2M */
.art-assoc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.art-assoc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--rule);
  font-size: 12.5px;
}
.art-assoc-label {
  flex: 1;
  color: var(--ink);
}
.art-assoc-principal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--t3);
  cursor: pointer;
}
.art-assoc-principal input { width: auto; margin: 0; cursor: pointer; }
.art-assoc-remove {
  border: none;
  background: transparent;
  color: var(--t3);
  font-size: 15px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}
.art-assoc-remove:hover { color: var(--alert); }
.art-assoc-empty {
  padding: 6px 10px;
  font-size: 11.5px;
  color: var(--t3);
  font-style: italic;
}
.art-assoc-add { margin-top: 6px; }
.art-assoc-add select {
  width: 100%;
  height: 30px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px dashed var(--brd);
  background: transparent;
  color: var(--t2);
  font-size: 12px;
  cursor: pointer;
}
.art-assoc-add select:hover { border-color: var(--brd-h); color: var(--ink); }

/* Boutons modal */
.art-btn-primary,
.art-btn-secondary,
.art-btn-ghost,
.art-btn-danger {
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.art-btn-primary {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--bg);
}
.art-btn-primary:hover:not(:disabled) { background: #C49A45; }
.art-btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.art-btn-secondary {
  border: 1px solid var(--brd);
  background: var(--bg-card);
  color: var(--ink);
}
.art-btn-secondary:hover { border-color: var(--brd-h); }
.art-btn-ghost {
  border: 1px solid var(--brd);
  background: transparent;
  color: var(--t2);
}
.art-btn-ghost:hover { border-color: var(--brd-h); color: var(--ink); }
.art-btn-danger {
  border: 1px solid var(--alert);
  background: transparent;
  color: var(--alert);
}
.art-btn-danger:hover { background: var(--alert-bg); }

@media (max-width: 900px) {
  .art-modal-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .art-modal-grid { grid-template-columns: 1fr; }
  .art-field-wide { grid-column: span 1; }
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .admin-container { padding: 14px 1rem 40px; }
  .modal { max-width: 100%; }
  .admin-table th:nth-child(3),
  .admin-table td:nth-child(3),
  .admin-table th:nth-child(4),
  .admin-table td:nth-child(4) { display: none; }
}

/* ── FOURNISSEURS (registry CRUD) ── */
.fourn-notice {
  margin: 0 0 16px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--t2);
  background: var(--gold-d);
  border: 1px solid rgba(212,168,83,.35);
  border-radius: 8px;
}
.fourn-search {
  min-width: 320px;
  margin: 0;
}
.fourn-dot { font-size: 13px; }
.fourn-dot-on  { color: var(--ok); }
.fourn-dot-off { color: var(--t3); }
.fourn-confirm {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--gold-d);
  border: 1px solid rgba(212,168,83,.35);
  border-radius: 8px;
}
.fourn-confirm-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--t2);
  cursor: pointer;
}
.fourn-confirm-label input[type="checkbox"] {
  width: auto;
  margin: 2px 0 0;
  flex-shrink: 0;
  cursor: pointer;
}
.fourn-confirm-last {
  margin-top: 8px;
  padding-left: 30px;
  font-size: 11.5px;
  color: var(--t3);
}
