/* ══════════════════════════════════════════════
   RESET & BASE — Charte Architecte
   ══════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: #08080A; min-height: 100vh; color: #E0E0E0; line-height: 1.6; }
a { color: #C8956C; text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select { font-family: inherit; }

/* ── COULEURS ─────────────────────────────────────────────────────────── */
:root {
  --primary: #1B2A4A;
  --cuivre: #C8956C;
  --ardoise: #3D5A80;
  --craie: #F8F6F3;
  --surface: #0E0E10;
  --border: #1A1A1A;
  --texte: #E0E0E0;
  --texte-dim: #888;
  --texte-dark: #2C2C2C;
  --rouge: #D32F2F;
  --orange: #FF9800;
  --blanc: #FFFFFF;
}

/* ── LOGIN ────────────────────────────────────────────────────────────── */
.login-overlay {
  position: fixed; inset: 0; background: #08080A;
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.login-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5); width: 420px; max-width: 95vw; overflow: hidden;
}
.login-header {
  background: var(--primary); color: var(--blanc); padding: 28px; text-align: center;
}
.login-header h1 { font-size: 22px; font-weight: 300; letter-spacing: 6px; text-transform: uppercase; }
.login-header h1 span { font-weight: 700; }
.login-header p { font-size: 12px; opacity: .6; margin-top: 6px; letter-spacing: 2px; text-transform: uppercase; }
.login-body { padding: 30px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 11px; font-weight: 600; color: var(--texte-dim); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 2px; }
.login-field input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: #151517; color: var(--texte); }
.login-field input:focus { outline: none; border-color: var(--cuivre); }
.login-field input::placeholder { color: #555; }
.login-btn { width: 100%; padding: 14px; background: var(--primary); color: var(--blanc); border-radius: 8px; font-size: 14px; font-weight: 600; margin-top: 8px; letter-spacing: 1px; }
.login-btn:hover { background: var(--ardoise); }
.login-btn:disabled { background: #333; color: #666; cursor: wait; }
.login-error { color: var(--rouge); font-size: 13px; margin-top: 10px; text-align: center; display: none; }
.login-forgot { text-align: center; margin-top: 16px; font-size: 12px; }
.login-forgot a { color: var(--cuivre); cursor: pointer; }

/* Reset / First login */
.reset-section { display: none; padding: 20px 30px 30px; border-top: 1px solid var(--border); }
.reset-section h3 { font-size: 14px; color: var(--cuivre); margin-bottom: 12px; letter-spacing: 1px; }
.reset-msg { font-size: 13px; margin-top: 8px; text-align: center; }

/* ── HEADER ───────────────────────────────────────────────────────────── */
.header {
  background: var(--primary); color: var(--blanc); padding: 0 32px;
  display: flex; align-items: center; height: 64px; position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(200,149,108,.15);
}
.header-title { font-size: 20px; font-weight: 300; letter-spacing: 5px; text-transform: uppercase; }
.header-subtitle { font-size: 14px; opacity: .5; margin-left: 12px; letter-spacing: 1px; }
.header-spacer { flex: 1; }
.header-user { font-size: 15px; opacity: .8; margin-right: 16px; }
.header-role { background: rgba(200,149,108,.2); color: var(--cuivre); padding: 4px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; margin-right: 16px; letter-spacing: 1px; }
.header-btn { background: rgba(255,255,255,.08); color: var(--blanc); padding: 8px 18px; border-radius: 6px; font-size: 14px; font-weight: 500; }
.header-btn:hover { background: rgba(255,255,255,.15); }
.header-gen { color: var(--cuivre); font-size: 14px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; background: none; border: 1px solid var(--cuivre); padding: 8px 20px; border-radius: 6px; display: none; }
.header-gen:hover { background: rgba(200,149,108,.15); }
.header-refresh { background: rgba(200,149,108,.15); color: var(--cuivre); border: 1px solid rgba(200,149,108,.3); padding: 8px 20px; border-radius: 6px; font-size: 14px; font-weight: 600; letter-spacing: 1px; cursor: pointer; }
.header-refresh:hover { background: rgba(200,149,108,.25); }
.header-refresh:disabled { opacity: .5; cursor: wait; }
.header-refresh .material-icons { font-size: 16px; vertical-align: middle; margin-right: 4px; }
.header-refresh.loading .material-icons { animation: spin .6s linear infinite; }

/* ── TABS ─────────────────────────────────────────────────────────────── */
.tabs {
  background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 24px;
  display: flex; gap: 4px; overflow-x: auto;
}
.tab {
  padding: 16px 24px; font-size: 16px; font-weight: 500; color: var(--texte-dim);
  background: none; border-bottom: 2px solid transparent; white-space: nowrap;
  letter-spacing: 1px; text-transform: uppercase;
}
.tab:hover { color: var(--cuivre); }
.tab.active { color: var(--cuivre); border-bottom-color: var(--cuivre); }

/* ── CONTENU ──────────────────────────────────────────────────────────── */
.content { padding: 24px; max-width: 1800px; margin: 0 auto; width: 100%; }
.section { display: none; }
.section.active { display: block; }

/* ── KPI CARDS ────────────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card {
  background: linear-gradient(135deg, var(--surface) 0%, #131318 100%);
  border: 1px solid var(--border); border-radius: 16px; padding: 24px; text-align: center;
  border-left: 3px solid var(--cuivre); position: relative; overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column; justify-content: center;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(200,149,108,.08); }
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cuivre), transparent); opacity: .3;
}
.kpi-label { font-size: 13px; color: var(--blanc); text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }
.kpi-value { font-size: 38px; font-weight: 700; color: var(--cuivre); margin-top: 8px; line-height: 1.1; }
.kpi-detail { font-size: 13px; color: var(--texte-dim); margin-top: 8px; }
.kpi-card.alert { border-left-color: var(--orange); }
.kpi-card.alert::before { background: linear-gradient(90deg, transparent, var(--orange), transparent); }

/* ── TABLE ────────────────────────────────────────────────────────────── */
.table-container { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; }
.table-header { padding: 16px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.table-header h2 { font-size: 18px; color: var(--blanc); letter-spacing: 2px; text-transform: uppercase; font-weight: 600; }
.table-search { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; width: 220px; background: #151517; color: var(--texte); }
.table-search::placeholder { color: #555; }
.search-wrap { position: relative; display: inline-block; }
.search-wrap .table-search { padding-right: 32px; }
.search-wrap .search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--texte-dim); font-size: 20px; line-height: 1; user-select: none; display: none; padding: 0 4px; }
.search-wrap .table-search:not(:placeholder-shown) + .search-clear { display: block; }
.search-wrap .search-clear:hover { color: var(--cuivre); }
.table-filter { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; background: #151517; color: var(--texte); }
/* Filtres par colonne + centrage page Licences */
#section-licences thead th { text-align: center; vertical-align: top; }
#section-licences tbody td { text-align: center; }
#section-licences tbody td:nth-child(1), #section-licences tbody td:nth-child(2) { text-align: left; }
#section-licences .col-title { font-weight: 600; }
/* Clé licence sur UNE seule ligne (colonne CLE) */
#section-licences td:nth-child(1) code { white-space: nowrap; }
#section-licences .col-filter { margin-top: 6px; display: flex; align-items: center; gap: 4px; justify-content: center; }
#section-licences .col-filter input, #section-licences .col-filter select { width: 100%; max-width: 160px; padding: 4px 6px; font-size: 12px; background: #151517; color: var(--texte); border: 1px solid var(--border); border-radius: 4px; }
#section-licences .col-filter .col-x { cursor: pointer; color: var(--texte-dim); font-size: 16px; line-height: 1; user-select: none; }
#section-licences .col-filter .col-x:hover { color: var(--texte); }
/* Page DEVIS : Sujet la colonne la plus large ; liens fichiers (Devis/PJ) tronques */
#section-devis table { table-layout: fixed; }
#section-devis thead th { text-align: center; }
#section-devis th:nth-child(1), #section-devis td:nth-child(1) { width: 8%; }
#section-devis th:nth-child(2), #section-devis td:nth-child(2) { width: 22%; }
#section-devis th:nth-child(3), #section-devis td:nth-child(3) { width: 8%; }
#section-devis th:nth-child(4), #section-devis td:nth-child(4) { width: 8%; }
#section-devis th:nth-child(5), #section-devis td:nth-child(5) { width: 9%; }
#section-devis th:nth-child(6), #section-devis td:nth-child(6) { width: 9%; }
#section-devis th:nth-child(7), #section-devis td:nth-child(7) { width: 14%; }
#section-devis th:nth-child(8), #section-devis td:nth-child(8) { width: 14%; }
#section-devis th:nth-child(9), #section-devis td:nth-child(9) { width: 8%; }
#section-devis td:nth-child(7) a, #section-devis td:nth-child(8) a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.table-spacer { flex: 1; }
.table-btn { padding: 8px 16px; border-radius: 6px; font-size: 14px; font-weight: 600; letter-spacing: .5px; }
.table-btn-primary { background: var(--primary); color: var(--blanc); }
.table-btn-primary:hover { background: var(--ardoise); }
.table-btn-danger { background: var(--rouge); color: var(--blanc); }
.table-btn-danger:hover { background: #B71C1C; }
.table-btn-warn { background: var(--orange); color: var(--blanc); }
.table-btn-sm { padding: 4px 10px; font-size: 11px; border-radius: 4px; }
/* À facturer ARFLO — fleches de quinzaine */
.fact-nav { width: 36px; height: 36px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--cuivre); display: inline-flex; align-items: center; justify-content: center; transition: .15s; }
.fact-nav:hover { border-color: var(--cuivre); background: #15151a; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 14px 16px; font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: var(--texte-dim); background: #0A0A0C; border-bottom: 1px solid var(--border); }
td { padding: 14px 16px; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.04); color: var(--texte); }
tr:hover { background: rgba(200,149,108,.03); }

/* Badges */
.badge { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.badge-active { background: rgba(76,175,80,.15); color: #66BB6A; }
.badge-suspended { background: rgba(255,152,0,.15); color: #FFB74D; }
.badge-cancelled { background: rgba(211,47,47,.15); color: #EF5350; }
.badge-expired { background: rgba(255,255,255,.06); color: #888; }
.badge-ok { background: rgba(76,175,80,.15); color: #66BB6A; }
.badge-ko { background: rgba(211,47,47,.15); color: #EF5350; }
.badge-s { background: rgba(61,90,128,.2); color: #7BAFD4; }
.badge-m { background: rgba(200,149,108,.2); color: var(--cuivre); }
.badge-l { background: rgba(255,152,0,.15); color: #FFB74D; }

/* ── MODAL ────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(8,8,10,.85); display: none;
  align-items: center; justify-content: center; z-index: 500;
}
.modal-overlay.show { display: flex; }
.modal-content {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5); max-width: 95vw; max-height: 90vh; overflow: hidden; position: relative;
}
.modal-close {
  position: absolute; top: 8px; right: 12px; background: none; font-size: 24px;
  color: var(--texte-dim); z-index: 10; width: 32px; height: 32px; line-height: 32px; text-align: center;
  border-radius: 50%;
}
.modal-close:hover { background: rgba(255,255,255,.08); }
.modal-iframe { border: none; width: 90vw; max-width: 1100px; height: 90vh; max-height: 90vh; }

/* ── CONFIRM DIALOG ───────────────────────────────────────────────────── */
.confirm-dialog {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 28px; width: 400px; max-width: 90vw; text-align: center;
}
.confirm-dialog h3 { margin-bottom: 12px; color: var(--cuivre); font-weight: 500; letter-spacing: 1px; }
.confirm-dialog p { font-size: 14px; color: var(--texte-dim); margin-bottom: 20px; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; }
.confirm-actions button { padding: 10px 24px; border-radius: 8px; font-weight: 600; font-size: 13px; }

/* ── STATS CLIENTS ────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-versions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi-vcard { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--cuivre); border-radius: 8px; padding: 14px 16px; }
.kpi-vcard .kpi-vvalue { font-size: 30px; font-weight: 700; color: var(--cuivre); line-height: 1.1; }
.kpi-vcard .kpi-vlabel { font-size: 12px; color: var(--texte-dim); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px;
  cursor: pointer; transition: border-color .2s, transform .1s;
}
.stat-card:hover { border-color: var(--cuivre); transform: translateY(-2px); }
.stat-card-name { font-size: 17px; font-weight: 700; color: var(--blanc); margin-bottom: 4px; }
.stat-card-email { font-size: 12px; color: var(--texte-dim); margin-bottom: 12px; }
.stat-card-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.stat-card-label { font-size: 12px; color: var(--texte-dim); text-transform: uppercase; letter-spacing: 1px; }
.stat-card-value { font-size: 16px; font-weight: 700; }
.stat-bar { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; margin-top: 4px; }
.stat-bar-fill { height: 100%; border-radius: 4px; transition: width .4s ease; }
.stat-detail { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; margin-bottom: 24px; }
.stat-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.stat-detail-name { font-size: 22px; font-weight: 700; color: var(--blanc); }
.stat-detail-close { cursor: pointer; color: var(--texte-dim); font-size: 22px; }
.stat-detail-close:hover { color: var(--blanc); }
.stat-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-kpi { background: #111; border-radius: 10px; padding: 16px; text-align: center; }
.stat-kpi-label { font-size: 11px; color: var(--texte-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.stat-kpi-value { font-size: 28px; font-weight: 700; }
.stat-mois-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 120px; margin-bottom: 8px; }
.stat-mois-bar { background: var(--ardoise); border-radius: 4px 4px 0 0; min-height: 4px; transition: height .3s; position: relative; }
.stat-mois-bar:hover { opacity: .8; }
.stat-mois-labels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.stat-mois-labels span { font-size: 10px; color: var(--texte-dim); text-align: center; }
.color-vert { color: #4CAF50; }
.color-orange { color: #FF9800; }
.color-rouge { color: #D32F2F; }
.color-cuivre { color: var(--cuivre); }
.bg-vert { background: #4CAF50; }
.bg-cuivre { background: var(--cuivre); }
.bg-ardoise { background: var(--ardoise); }

/* ── LOADING ──────────────────────────────────────────────────────────── */
.loading { text-align: center; padding: 40px; color: var(--texte-dim); }
.loading::after { content: ''; display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--cuivre); border-radius: 50%; animation: spin .6s linear infinite; margin-left: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header { padding: 0 12px; }
  .header-subtitle, .header-user { display: none; }
  .content { padding: 12px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi-value { font-size: 24px; }
  .table-header { padding: 12px; }
  .table-search { width: 100%; }
  th, td { padding: 8px 10px; font-size: 12px; }
  .tabs { padding: 0 8px; }
  .tab { padding: 10px 12px; font-size: 11px; }
  .side { display: none; }
  #app { flex-direction: column; }
}

/* ══════════════════════════════════════════════
   REFONTE v2 — Menu 4 espaces + sous-onglets
   ══════════════════════════════════════════════ */
#app { display: flex; min-height: 100vh; }
.side {
  width: 240px; flex-shrink: 0; background: linear-gradient(180deg, #15233f, #101727);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  padding: 18px 12px; position: sticky; top: 0; height: 100vh;
}
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.side .brand .logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--cuivre), #9c6f4e); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #1b2a4a; }
.side .brand b { font-size: 15px; letter-spacing: .5px; color: var(--blanc); }
.side .brand small { display: block; color: var(--texte-dim); font-size: 11px; }
.espace-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.espace-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: transparent; color: var(--texte-dim); padding: 12px 14px; border-radius: 11px;
  font-size: 14px; transition: .15s;
}
.espace-btn .material-icons { font-size: 20px; }
/* Jeu Material Symbols (charge en plus de Material Icons) : utilise pour l'icone Atelier
   (arrows_input). La classe rend la police en icone ; le nom de l'icone = la ligature. */
.material-symbols-outlined { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; -webkit-font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; }
.espace-btn .material-symbols-outlined { font-size: 20px; }
.espace-btn:hover { background: rgba(255,255,255,.04); color: var(--texte); }
.espace-btn.on { background: var(--primary); color: #fff; box-shadow: inset 3px 0 0 var(--cuivre); }
.side-account { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.side-account .sa-name { display: flex; align-items: center; gap: 10px; padding: 4px 8px 8px; color: var(--blanc); font-size: 14px; font-weight: 600; }
.side-account .sa-name .material-icons { font-size: 20px; color: var(--cuivre); }
.side-account .sa-btn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; color: var(--texte-dim); padding: 10px 14px; border-radius: 11px; font-size: 13px; transition: .15s; }
.side-account .sa-btn .material-icons { font-size: 18px; }
.side-account .sa-btn:hover { background: rgba(255,255,255,.04); color: var(--texte); }
.side-account .sa-logout:hover { color: var(--rouge); }
.side-account .sa-refresh:disabled { opacity: .5; cursor: wait; }
.side-account .sa-refresh.loading .material-icons { animation: spin .6s linear infinite; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.subtabs { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 24px; display: flex; gap: 4px; overflow-x: auto; }
.subtabs:empty { display: none; }
.subtab { padding: 14px 22px; font-size: 14px; font-weight: 500; color: var(--texte-dim); background: none; border-bottom: 2px solid transparent; white-space: nowrap; letter-spacing: 1px; text-transform: uppercase; }
.subtab:hover { color: var(--cuivre); }
.subtab.on { color: var(--cuivre); border-bottom-color: var(--cuivre); }
/* Espace Generateur : tuiles */
.gen-tiles { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.gen-tile { flex: 1; min-width: 280px; background: linear-gradient(160deg, #1a2740, #141b29); border: 1px solid var(--border); border-radius: 16px; padding: 24px; cursor: pointer; transition: .18s; }
.gen-tile:hover { border-color: var(--cuivre); transform: translateY(-2px); }
.gen-tile .ic { width: 48px; height: 48px; border-radius: 12px; background: rgba(200,149,108,.16); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.gen-tile .ic .material-icons { color: var(--cuivre); font-size: 26px; }
.gen-tile b { font-size: 16px; display: block; margin-bottom: 6px; color: var(--blanc); }
.gen-tile p { color: var(--texte-dim); font-size: 13px; line-height: 1.5; }
.gen-pill { font-size: 11px; padding: 3px 9px; border-radius: 20px; font-weight: 600; background: rgba(200,149,108,.15); color: var(--cuivre); }

/* ── ATELIER DATA_LIER : 2 machines (maquette validee Bene 24/07) ──────────────
   Contraste porte UNIQUEMENT par le fond (aucune bordure verticale de couleur,
   retiree a la demande de Bene) : bleu = machine qui ENVOIE, cuivre = machine
   qui RECOIT. Tout est centre (le melange gauche/droite etait illisible). */
#atelierHead tr.atl-grp th { font-size: 11.5px; letter-spacing: 2px; padding: 8px 10px 6px; border-bottom: none; font-weight: 700; }
th.atl-dep, td.atl-dep { background: rgba(47,134,237,.10); }
th.atl-arr, td.atl-arr { background: rgba(200,149,108,.10); }
#atelierHead tr.atl-grp th.atl-dep { background: rgba(47,134,237,.30); color: #cfe4ff; }
#atelierHead tr.atl-grp th.atl-arr { background: rgba(200,149,108,.30); color: #f2dcc6; }
#atelierHead th { vertical-align: bottom; }
#atelierHead .col-title { line-height: 1.25; }
#atelierBody td { text-align: center; vertical-align: middle; }
#atelierBody td.atl-cli { font-weight: 600; color: #fff; white-space: nowrap; text-align: left; }
#atelierBody td.atl-dt { font-size: 11.5px; white-space: nowrap; line-height: 1.5; }
#atelierBody tr.atl-alert { background: rgba(255,152,0,.07); }
/* Gamme : payante en italique cuivre, gratuite en gris (repere visuel Bene) */
#atelierBody td.atl-pay { font-style: italic; font-weight: 600; color: var(--cuivre); }
#atelierBody td.atl-gra { color: var(--texte-dim); }
/* Pastille d'etat */
.atl-pt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.atl-pt.gris { background: #666; }
.atl-pt.bleu { background: #2f86ed; }
.atl-pt.vert { background: #4CAF50; }
.atl-pt.rouge { background: var(--rouge); }
/* Badge d'echeance : J-x = proche (orange) / RETARD = depasse (rouge) */
.atl-bad { font-size: 9px; letter-spacing: .5px; padding: 1px 6px; border-radius: 9px; text-transform: uppercase; white-space: nowrap; display: inline-block; margin-top: 3px; }
.atl-bad.orange { background: rgba(255,152,0,.15); color: var(--orange); border: 1px solid rgba(255,152,0,.4); }
.atl-bad.rouge { background: rgba(211,47,47,.18); color: #ff6b6b; border: 1px solid rgba(211,47,47,.5); }
