/* =============================================================
   Lexend — app.css
   Source canonique : design.md (NodeX / Green)
   ============================================================= */

/* Polices : chargées depuis le <head> (header.php) pour ne pas bloquer le rendu via @import. */

:root {
  /* Marque produit — NodeX Green */
  --brand:           #C8F847;
  --brand-hover:     #B8E83A;
  --brand-ink:       #1B1B1B;
  --brand-muted:     rgba(200, 248, 71, 0.16);
  --brand-strong:    #5F8A0A;

  /* Fond & surfaces (light) */
  --bg-app:          #F3F4F4;
  --bg-surface:      #FFFFFF;
  --bg-surface-alt:  #FAFAFA;
  --bg-elevated:     #FFFFFF;

  /* Sidebar */
  --sidebar-bg:      #1B1B1B;
  --sidebar-hover:   rgba(255, 255, 255, 0.06);
  --sidebar-active:  var(--brand);
  --sidebar-active-text: var(--brand-ink);
  --sidebar-text:    #D0D1D3;
  --sidebar-label:   #8A8B8E;
  --sidebar-border:  #383D3D;
  --sidebar-rail-width: 68px;
  --sidebar-panel-width: 240px;
  --sidebar-width:   calc(var(--sidebar-rail-width) + var(--sidebar-panel-width));
  --chrome-bg:       #1B1B1B;

  /* Texte */
  --text-primary:    #1B1B1B;
  --text-secondary:  #5F655A;
  --text-muted:      #8A8B8E;

  /* Bordures */
  --border:          #EDF2F0;
  --border-light:    #F3F4F4;

  /* États fonctionnels */
  --success:         #16A34A;
  --success-light:   #DCFCE7;
  --warning:         #D97706;
  --warning-light:   #FEF3C7;
  --danger:          #DC2626;
  --danger-light:    #FEE2E2;
  --info:            #2563EB;
  --info-light:      #DBEAFE;

  /* Barres performance */
  --bar-others:      #EF4444;
  --bar-dayoff:      #F97316;
  --bar-ontime:      var(--brand);

  /* Alternance */
  --ecole:           #7C3AED;
  --ecole-light:     #EDE9FE;
  --entreprise:      #059669;
  --entreprise-light:#D1FAE5;

  /* Couleurs produit (enseigne = badge uniquement via --enseigne-*) */
  --color-primary:    var(--brand);
  --color-secondary:  var(--brand);
  --color-accent:     var(--brand);
  --color-text:       var(--text-primary);

  /* Rayons / ombres NodeX */
  --radius-sm:       8px;
  --radius-md:       10px;
  --radius-lg:       12px;
  --radius-xl:       16px;
  --shadow-sm:       0 0.5px 1px rgba(0, 0, 0, 0.05);
  --shadow-md:       0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 0 rgba(0, 0, 0, 0.06);

  /* Fonts */
  --font-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: var(--font-sans);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   LAYOUT (NodeX shell — chrome sombre + contenu flottant)
   ============================================================ */
body:has(.layout > .sidebar) {
  background: var(--chrome-bg);
  overflow: hidden;
  height: 100vh;
}

.layout {
  flex: 1 0 auto;
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: 0;
  gap: 0;
  background: var(--chrome-bg);
  height: 100vh;
  overflow: hidden;
}

.main-content {
  margin-left: var(--sidebar-width);
  margin-top: 8px;
  margin-right: 8px;
  margin-bottom: 8px;
  flex: 1;
  padding: 16px 24px 40px;
  min-width: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  /* Arrondis du panneau flottant : rayon fixe, coins toujours visibles (scroll interne) */
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  height: calc(100vh - 16px);
  max-height: calc(100vh - 16px);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.app-site-footer {
  flex-shrink: 0;
  padding: 16px 32px 24px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border-light);
  background: var(--chrome-bg);
}
.app-site-footer__text {
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.02em;
}
/* Footer hors panneau : masqué en desktop BO (scroll dans .main-content) */
.layout ~ .app-site-footer {
  display: none;
}

.app-site-footer--split-panel {
  margin-left: 0 !important;
  flex-shrink: 0;
  border-top: 1px solid var(--border-light);
  padding: 16px 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: transparent;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 22px;
}

/* ============================================================
   SIDEBAR NodeX (rail + panneau)
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--chrome-bg);
  display: flex;
  flex-direction: row;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: 20;
  border: none;
  border-radius: 0;
}

.sidebar-rail {
  width: var(--sidebar-rail-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 16px;
  border-right: 1px solid var(--sidebar-border);
  background: rgba(27, 27, 27, 0.4);
}

.sidebar-rail-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  text-decoration: none;
  margin-bottom: 4px;
}
.sidebar-rail-logo__img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
  object-fit: contain;
  background: transparent;
}
.sidebar-rail-logo__mark { display: none; }

.sidebar-rail-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  padding: 0 8px;
}

.sidebar-rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 8px 4px 10px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-sans);
  line-height: 1.1;
  position: relative;
}
.sidebar-rail-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.sidebar-rail-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.sidebar-rail-ico {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
}
.sidebar-rail-item.is-active .sidebar-rail-ico {
  background: #404040;
  border-color: #787878;
  box-shadow: 0 0 0 2px #1b1b1b;
}
.sidebar-rail-icon {
  width: 16px;
  height: 16px;
  color: inherit;
  display: block;
}
.sidebar-rail-label {
  font-size: 11px;
  font-weight: 500;
  color: inherit;
  white-space: nowrap;
}

.sidebar-rail-user {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  justify-content: center;
}
.sidebar-rail-user .avatar {
  width: 40px;
  height: 40px;
  border-radius: 99px;
}

.sidebar-panel {
  width: var(--sidebar-panel-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: rgba(27, 27, 27, 0.24);
  overflow: hidden;
}

.sidebar-panel-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  padding: 12px 16px;
  border-bottom: 1px solid transparent;
}
.sidebar-panel-title {
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  line-height: 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-panel-sub {
  font-size: 11px;
  color: var(--sidebar-text);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.nav-group-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--sidebar-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  margin-bottom: 2px;
  border: 1px solid transparent;
  position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); color: #FFFFFF; }
.nav-item.active {
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
  border-color: transparent;
}
.nav-item.active::before { display: none; }
.nav-item.active .nav-icon { color: inherit; }

.nav-icon { width: 16px; height: 16px; flex-shrink: 0; color: inherit; }

.nav-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sidebar-text);
  font-size: 11px; font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
}
.nav-item.active .nav-badge {
  background: rgba(27, 27, 27, 0.12);
  color: inherit;
}

.sidebar-footer {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--sidebar-border);
  margin-top: auto;
}

.sidebar-logout-btn {
  color: var(--sidebar-text);
  padding: 6px;
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.sidebar-logout-btn:hover {
  color: #fff;
  background: var(--sidebar-hover);
}

.sidebar-app-logo { display: none; }

/* Wordmark Lexend (logo_white_bg / logo_black_bg) */
.brand-logo {
  display: flex;
  align-items: center;
}
.brand-logo--auth {
  justify-content: center;
  margin-bottom: 18px;
}
.brand-logo--auth img {
  height: 28px;
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}
.sidebar-app-separator { display: none; }


.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.sidebar-user:hover { background: var(--sidebar-hover); }
.sidebar-user-text { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: #FFFFFF; }
.sidebar-user-role { font-size: 11px; color: var(--sidebar-text); }

/* ============================================================
   TOPBAR + GLOBAL SEARCH
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -16px -24px 20px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 16px 16px 0 0;
  position: sticky;
  top: 0;
  z-index: 15;
}

.global-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  max-width: 480px;
  flex: 1;
  transition: box-shadow 0.15s, border-color 0.15s;
  position: relative;
}
.global-search:focus-within {
  box-shadow: 0 0 0 3px var(--brand-muted);
  border-color: var(--brand);
  background: var(--bg-surface);
}
.global-search svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.global-search input {
  border: none; outline: none;
  font-size: 13px;
  color: var(--text-primary);
  background: transparent;
  width: 100%;
  font-family: var(--font-sans);
}
.global-search input::placeholder { color: var(--text-muted); }

.global-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 420px;
  overflow: auto;
  z-index: 40;
  display: none;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.topbar-icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  padding: 0;
}
.topbar-icon-btn:hover {
  background: var(--bg-surface-alt);
  color: var(--text-primary);
}
.topbar-icon-btn svg { width: 18px; height: 18px; }

#mobile-search-btn { display: none; }
.mobile-menu-btn { display: none; }

.content-sheet {
  display: contents;
}

.notif-bell { position: relative; }
.notif-bell__btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}
.notif-bell__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  max-height: min(420px, 70vh);
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 50;
  overflow: hidden;
}
.notif-panel[hidden] { display: none !important; }
.notif-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.notif-panel__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.notif-panel__action {
  border: none;
  background: transparent;
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-sans);
}
.notif-panel__action:hover { text-decoration: underline; }
.notif-panel__list {
  overflow: auto;
  flex: 1;
}
.notif-panel__empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.notif-item {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
}
.notif-item:last-child { border-bottom: none; }
.notif-item.is-unread { background: var(--brand-muted); }
.notif-item__main {
  flex: 1;
  min-width: 0;
  text-align: left;
  border: none;
  background: transparent;
  padding: 12px 8px 12px 14px;
  cursor: pointer;
  font-family: var(--font-sans);
}
.notif-item__main:hover { background: rgba(0, 0, 0, 0.02); }
.notif-item__sujet {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0;
}
.notif-item.is-unread .notif-item__sujet { font-weight: 700; }
.notif-item__body {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  white-space: pre-line;
}
.notif-item__meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.notif-item__del {
  flex-shrink: 0;
  width: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-sans);
}
.notif-item__del:hover { color: #DC2626; background: rgba(220, 38, 38, 0.06); }

.topbar-enseigne {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-left: 1px solid var(--border);
  margin-left: 6px;
}
.topbar-enseigne__logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  background: var(--enseigne-primary, var(--brand-ink));
}
.topbar-enseigne__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.topbar-enseigne__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.topbar-enseigne__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.topbar-enseigne__sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   DASHBOARD v2
   ============================================================ */
.dash-header { margin-bottom: 24px; }
.dash-header__title { font-size: 24px; font-weight: 700; color: var(--text-primary); margin: 0; letter-spacing: -0.02em; }
.dash-header__sub { font-size: 14px; color: var(--text-secondary); margin: 4px 0 0; }

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.dash-kpi {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.dash-kpi__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-kpi__icon svg { width: 20px; height: 20px; }
.dash-kpi__icon--blue { background: var(--brand-muted); color: var(--brand-ink); }
.dash-kpi__icon--green { background: var(--brand-muted); color: var(--brand-ink); }
.dash-kpi__icon--orange { background: var(--bg-surface-alt); color: var(--text-primary); }
.dash-kpi__icon--purple { background: var(--bg-surface-alt); color: var(--text-primary); }
.dash-kpi__icon--teal { background: var(--brand-muted); color: var(--brand-ink); }
.dash-kpi__icon--red { background: var(--bg-surface-alt); color: var(--text-primary); }
.dash-kpi__icon--indigo { background: var(--brand-muted); color: var(--brand-ink); }
.dash-kpi__icon--gray { background: var(--bg-surface-alt); color: var(--text-secondary); }
.dash-kpi__body { display: flex; flex-direction: column; gap: 2px; }
.dash-kpi__value { font-size: 22px; font-weight: 700; color: var(--text-primary); line-height: 1.1; }
.dash-kpi__label { font-size: 12px; color: var(--text-secondary); }
.dash-kpi__bar { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: var(--bg-surface-alt); }
.dash-kpi__bar-fill { height: 100%; background: var(--brand); border-radius: 0 2px 2px 0; transition: width .3s; }

.dash-section { margin-bottom: 28px; }
.dash-section__title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0 0 14px; }

/* Quick actions grid */
.dash-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.dash-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: all .15s;
  cursor: pointer;
}
.dash-quick-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(200,248,71,.2); border-color: var(--brand); }
.dash-quick-card__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.dash-quick-card__icon svg { width: 22px; height: 22px; }
.dash-quick-card__label { font-size: 12px; font-weight: 600; color: var(--text-primary); text-align: center; }
.dash-quick-card--blue .dash-quick-card__icon { background: var(--brand-muted); color: var(--brand-ink); }
.dash-quick-card--green .dash-quick-card__icon { background: var(--brand-muted); color: var(--brand-ink); }
.dash-quick-card--orange .dash-quick-card__icon { background: var(--bg-surface-alt); color: var(--text-primary); }
.dash-quick-card--purple .dash-quick-card__icon { background: var(--bg-surface-alt); color: var(--text-primary); }
.dash-quick-card--teal .dash-quick-card__icon { background: var(--brand-muted); color: var(--brand-ink); }
.dash-quick-card--red .dash-quick-card__icon { background: var(--bg-surface-alt); color: var(--text-primary); }
.dash-quick-card--indigo .dash-quick-card__icon { background: var(--brand-muted); color: var(--brand-ink); }
.dash-quick-card--gray .dash-quick-card__icon { background: var(--bg-surface-alt); color: var(--text-secondary); }

/* Alert cards */
.dash-alerts { display: flex; flex-direction: column; gap: 10px; }
.dash-alert-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: all .15s;
}
.dash-alert-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.dash-alert-card__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-alert-card__icon svg { width: 18px; height: 18px; }
.dash-alert-card--orange .dash-alert-card__icon { background: var(--bg-surface-alt); color: var(--text-primary); }
.dash-alert-card--red .dash-alert-card__icon { background: var(--bg-surface-alt); color: var(--text-primary); }
.dash-alert-card__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.dash-alert-card__body strong { font-size: 13px; color: var(--text-primary); }
.dash-alert-card__body span { font-size: 12px; color: var(--text-secondary); }
.dash-alert-card__arrow { color: #9DA3AE; }
.dash-alert-card__arrow svg { width: 16px; height: 16px; }

/* Activity timeline */
.dash-activity { display: flex; flex-direction: column; }
.dash-activity__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F2F4F7;
}
.dash-activity__item:last-child { border-bottom: none; }
.dash-activity__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.dash-activity__content { flex: 1; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.dash-activity__who { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.dash-activity__what { font-size: 12px; color: var(--text-secondary); }
.dash-activity__when { font-size: 11px; color: #9DA3AE; white-space: nowrap; }

/* Next shift card (collaborateur) */
.dash-next-shift {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(135deg, #EFF4FF, #F2F4F7);
  border: 1px solid #BFDBFE;
  border-radius: 12px;
}
.dash-next-shift__icon {
  width: 44px; height: 44px;
  background: var(--brand);
  color: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.dash-next-shift__icon svg { width: 22px; height: 22px; }
.dash-next-shift__body { display: flex; flex-direction: column; gap: 2px; }
.dash-next-shift__body strong { font-size: 14px; color: var(--text-primary); }
.dash-next-shift__body span { font-size: 13px; color: var(--brand-ink); font-weight: 500; }

/* Dashboard section header with link */
.dash-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.dash-section__header .dash-section__title { margin-bottom: 0; }
.dash-section__header .dash-section__link {
  align-self: center;
  flex-shrink: 0;
}
.dash-section__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-ink);
  text-decoration: none;
}
.dash-section__link:hover { text-decoration: underline; }
.dash-section__link svg { width: 14px; height: 14px; }

/* Planning semaine (dashboard) — bandeau type vue planning */
.dash-planning-week {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.dash-planning-week__meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
}
.dash-planning-week__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 168px;
}
.dash-planning-week__day {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  border-right: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  background: var(--bg-surface);
  transition: background 0.12s ease;
}
.dash-planning-week__day:last-child { border-right: none; }
.dash-planning-week__day:hover { background: var(--bg-surface-alt); }
.dash-planning-week__day--today {
  background: color-mix(in srgb, var(--info-light) 55%, var(--bg-surface));
  box-shadow: inset 0 3px 0 var(--info);
}
.dash-planning-week__day--today:hover {
  background: color-mix(in srgb, var(--info-light) 70%, var(--bg-surface));
}
.dash-planning-week__day--past { opacity: 0.72; }
.dash-planning-week__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px 8px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-surface-alt);
}
.dash-planning-week__day--today .dash-planning-week__head {
  background: color-mix(in srgb, var(--info-light) 80%, white);
  border-bottom-color: color-mix(in srgb, var(--info) 25%, var(--border-light));
}
.dash-planning-week__dow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.dash-planning-week__date {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.dash-planning-week__today {
  margin-top: 2px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--info);
}
.dash-planning-week__shifts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 6px 10px;
  flex: 1;
}
.dash-planning-week__shift {
  border-radius: 6px;
  padding: 5px 6px;
  border-left: 3px solid var(--shift-accent, var(--color-secondary));
  background: color-mix(in srgb, var(--shift-accent, var(--color-secondary)) 11%, white);
  min-width: 0;
}
.dash-planning-week__shift-time {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dash-planning-week__shift-label {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-planning-week__shift-poste {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-planning-week__empty,
.dash-planning-week__closed {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.dash-planning-week__closed {
  flex-direction: column;
  gap: 4px;
  color: var(--text-secondary);
}
.dash-planning-week__closed svg { width: 14px; height: 14px; }
.dash-planning-week__more {
  align-self: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--info);
  padding-top: 2px;
}

@media (max-width: 1100px) {
  .dash-planning-week__grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .dash-planning-week__day {
    flex: 0 0 min(132px, 28vw);
    scroll-snap-align: start;
    border-right: 1px solid var(--border-light);
  }
}

/* Planning mini widget (legacy — conservé si réutilisé ailleurs) */
.dash-planning {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.dash-planning--week {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
@media (max-width: 1280px) {
  .dash-planning--week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 992px) {
  .dash-planning--week { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.dash-planning__day {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow .15s, border-color .15s;
}
.dash-planning__day:hover { box-shadow: 0 4px 12px rgba(200,248,71,.08); border-color: var(--brand); }
.dash-planning__day--today { border-color: var(--brand); }
.dash-planning__day-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-surface-alt);
  border-bottom: 1px solid #E2E5EA;
}
.dash-planning__day-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-planning__magasin-ref {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 42rem;
  line-height: 1.35;
}
.dash-planning__magasin-line {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-ink);
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.dash-planning__magasin-line svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }
.dash-planning__magasin-line--ferme { color: #64748B; }
.dash-planning__magasin-line--mobile-only {
  display: none;
}
@media (max-width: 768px) {
  .dash-planning__magasin-line--desktop-only {
    display: none;
  }
  .dash-planning__magasin-line--mobile-only {
    display: flex;
  }
}
.dash-planning__day--today .dash-planning__day-header { background: var(--brand-muted); border-bottom-color: #BFDBFE; }
.dash-planning__day-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.dash-planning__day-date { font-size: 12px; color: var(--text-secondary); }
.dash-planning__today-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--brand-ink);
  background: var(--bg-surface);
  padding: 2px 6px;
  border-radius: 4px;
}
.dash-planning__day-count { margin-left: auto; font-size: 11px; color: var(--text-secondary); }
.dash-planning__shifts { padding: 8px 10px; }
.dash-planning__shift {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 4px;
  border-bottom: 1px solid #F2F4F7;
  font-size: 12px;
}
.dash-planning__shift:last-child { border-bottom: none; }
.dash-planning__shift--personal {
  grid-template-columns: auto 1fr;
}
.dash-planning__shift-time { font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-planning__shift-who { color: var(--text-primary); }
.dash-planning__shift-poste { color: var(--text-secondary); font-size: 11px; text-align: right; }
.dash-planning__empty { padding: 14px 4px; text-align: center; font-size: 12px; color: #9DA3AE; }
.dash-planning__more { padding: 6px 4px; font-size: 11px; color: var(--brand-ink); font-weight: 500; text-align: center; }

.dash-collab-empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px dashed #E2E5EA;
  border-radius: 12px;
}

/* Grille style badges conférence (inspiré UI type Instagram / event badge) */
.dash-collab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  align-items: stretch;
  gap: 0;
  width: 100%;
}

.dash-collab-cell {
  padding: 12px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: transparent;
}

.dash-collab-plastic {
  position: relative;
  overflow: hidden;
  flex: 1;
  width: 100%;
  max-width: 400px;
  height: 168px;
  min-height: 168px;
  max-height: 168px;
  padding: 10px 12px 12px;
  padding-top: 8px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  text-decoration: none;
  color: #2b2a27;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dash-collab-plastic:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

.dash-collab-plastic:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

.dash-collab-slit {
  display: table;
  margin: 0 auto 6px;
  padding: 5px 0;
  width: 30%;
  border-radius: 14px;
  background: var(--border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

.dash-collab-paper {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid rgba(43, 42, 39, 0.88);
  background-color: #fff7eb;
  min-height: 0;
  overflow: hidden;
}

.dash-collab-avatar {
  flex: none;
  width: 30%;
  align-self: stretch;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dash-collab-avatar__initials {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Couleurs initiales alignées sur la palette avatar Lexend (c1–c6) */
.dash-collab-avatar__initials.avatar-c1 { background: linear-gradient(145deg, #ef4444, #b91c1c); color: #fff; }
.dash-collab-avatar__initials.avatar-c2 { background: linear-gradient(145deg, #3b82f6, #1d4ed8); color: #fff; }
.dash-collab-avatar__initials.avatar-c3 { background: linear-gradient(145deg, #22c55e, #15803d); color: #fff; }
.dash-collab-avatar__initials.avatar-c4 { background: linear-gradient(145deg, #f59e0b, #b45309); color: #fff; }
.dash-collab-avatar__initials.avatar-c5 { background: linear-gradient(145deg, #8b5cf6, #6d28d9); color: #fff; }
.dash-collab-avatar__initials.avatar-c6 { background: linear-gradient(145deg, #06b6d4, #0e7490); color: #fff; }

.dash-collab-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dash-collab-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: #0b0b0d;
}

.dash-collab-handle {
  font-size: 11px;
  font-weight: 600;
  color: #5b616b;
}

.dash-collab-role-pill {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: #fde9c2;
  color: #422006;
}

.dash-collab-desc {
  margin: 0;
  margin-top: auto;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: #3f3f3a;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.dash-collab-reflection {
  position: absolute;
  top: -50%;
  left: -10%;
  width: 3rem;
  height: 200%;
  transform: rotate(50deg);
  background-color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

@media (max-width: 480px) {
  .dash-collab-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dash-kpis { grid-template-columns: 1fr 1fr; }
  .dash-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-planning { grid-template-columns: 1fr; }
}

/* ============================================================
   KPI CARDS (legacy)
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.kpi-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.kpi-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: cardIn 0.2s ease both;
}
.kpi-card:nth-child(2) { animation-delay: 0.06s; }
.kpi-card:nth-child(3) { animation-delay: 0.10s; }
.kpi-card:nth-child(4) { animation-delay: 0.14s; }

.kpi-label {
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.kpi-value-row {
  display: flex; align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.kpi-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kpi-icon-blue   { background: var(--brand-muted); color: var(--brand-ink); }
.kpi-icon-green  { background: #DCFCE7; color: #16A34A; }
.kpi-icon-orange { background: #FEF3C7; color: #D97706; }
.kpi-icon-red    { background: #FEE2E2; color: #DC2626; }
.kpi-icon-purple { background: var(--ecole-light); color: var(--ecole); }
.kpi-icon svg    { width: 22px; height: 22px; }

.kpi-big-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
}

.kpi-description {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px; font-weight: 700;
}
.kpi-trend.up   { color: var(--success); }
.kpi-trend.down { color: var(--danger); }
.kpi-trend svg  { width: 14px; height: 14px; }

.kpi-trend-label {
  font-size: 12px; font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

.progress-bar-multi {
  display: flex;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  gap: 3px;
  margin: 14px 0 10px;
}
.progress-segment { border-radius: 99px; transition: width 0.5s ease; }
.progress-segment.others  { background: var(--bar-others); }
.progress-segment.dayoff  { background: var(--bar-dayoff); }
.progress-segment.ontime  { background: var(--bar-ontime); }

.progress-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.legend-item {
  display: flex; align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-secondary);
}
.legend-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.legend-dot.others { background: var(--bar-others); }
.legend-dot.dayoff { background: var(--bar-dayoff); }
.legend-dot.ontime { background: var(--bar-ontime); }

.kpi-perf-value {
  font-size: 40px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  display: inline;
}

/* ============================================================
   TODO SECTION
   ============================================================ */
.todo-section,
.card-section {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  animation: cardIn 0.2s ease 0.1s both;
}

.section-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.section-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0; }
.section-link {
  font-size: 13px;
  color: var(--brand-strong, var(--text-secondary));
  text-decoration: none;
  font-weight: 500;
}
.section-link:hover { color: var(--text-primary); }

.todo-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
}
.todo-item-header {
  display: flex; align-items: center;
  gap: 10px; padding: 12px 16px;
  cursor: pointer; background: var(--bg-surface);
  transition: background 0.1s;
}
.todo-item-header:hover { background: var(--bg-surface-alt); }

.todo-item-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}
.todo-item-icon.orange { background: #FEF3C7; color: var(--warning); }
.todo-item-icon.green  { background: #DCFCE7; color: var(--success); }
.todo-item-icon.blue   { background: var(--brand-muted); color: var(--info); }
.todo-item-icon.red    { background: #FEE2E2; color: var(--danger); }
.todo-item-icon.purple { background: var(--ecole-light); color: var(--ecole); }
.todo-item-icon svg { width: 16px; height: 16px; }

.todo-item-title {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.todo-count { font-size: 12px; color: var(--text-muted); font-weight: 400; }

.todo-chevron { width: 16px; height: 16px; color: var(--text-muted); transition: transform 0.15s; }
.todo-item.open .todo-chevron { transform: rotate(180deg); }

.btn-dots,
.btn-more {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 6px; border: none;
  background: transparent; cursor: pointer;
  color: var(--text-muted);
  transition: all 0.1s;
}
.btn-dots:hover, .btn-more:hover { background: var(--bg-surface-alt); color: var(--text-primary); }
.btn-dots svg, .btn-more svg { width: 16px; height: 16px; }

.todo-item-body {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex; align-items: center;
  gap: 12px; background: var(--bg-surface-alt);
  animation: expandDown 0.15s ease;
}
.todo-body-info { flex: 1; min-width: 0; }
.todo-body-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.todo-body-detail { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.btn-take-action {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-surface); color: var(--text-primary);
  cursor: pointer; white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
  font-family: var(--font-sans);
  text-decoration: none;
}
.btn-take-action:hover {
  background: var(--text-primary);
  color: white;
  border-color: var(--text-primary);
}

/* ============================================================
   DATA TABLE
   ============================================================ */
.data-table-section {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table-header {
  display: flex; align-items: center;
  gap: 12px; margin-bottom: 16px;
}
.data-table-title { font-size: 16px; font-weight: 700; color: var(--text-primary); flex: 1; margin: 0; }

.table-search {
  display: flex; align-items: center;
  gap: 8px; border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 12px;
  background: var(--bg-surface-alt);
}
.table-search svg { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }
.table-search input {
  border: none; background: transparent;
  font-size: 12px; color: var(--text-primary);
  outline: none; width: 160px;
  font-family: var(--font-sans);
}

.btn-filter {
  display: inline-flex; align-items: center;
  gap: 6px; padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px; font-size: 12px;
  font-weight: 600; color: var(--text-secondary);
  background: var(--bg-surface); cursor: pointer;
  transition: background 0.1s;
  font-family: var(--font-sans);
}
.btn-filter:hover { background: var(--bg-surface-alt); }
.btn-filter svg { width: 14px; height: 14px; }

table.data-table { width: 100%; border-collapse: collapse; }

.data-table thead th {
  text-align: left;
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.data-table tbody td {
  padding: 13px 12px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-surface-alt); }

.cell-id { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.cell-employe { display: flex; align-items: center; gap: 9px; }

.status-badge {
  display: inline-flex; align-items: center;
  gap: 5px; padding: 3px 11px;
  border-radius: 20px; font-size: 11px;
  font-weight: 600;
  border: 1.5px solid;
}
.status-badge.complete,
.status-badge.success,
.status-badge.actif,
.status-badge.approuve,
.status-badge.payee,
.status-badge.opened { color: var(--success); border-color: #86EFAC; background: var(--success-light); }

.status-badge.pending,
.status-badge.essai,
.status-badge.en_attente,
.status-badge.emise,
.status-badge.dry_run { color: var(--warning); border-color: #FCD34D; background: var(--warning-light); }

.status-badge.refused,
.status-badge.refuse,
.status-badge.suspendu,
.status-badge.impaye,
.status-badge.impayee,
.status-badge.resilie,
.status-badge.bounced,
.status-badge.failed { color: var(--danger); border-color: #FCA5A5; background: var(--danger-light); }

.status-badge.published,
.status-badge.publie,
.status-badge.delivered { color: var(--info); border-color: #93C5FD; background: var(--info-light); }

.status-badge.ecole,
.status-badge.clicked { color: var(--ecole); border-color: #C4B5FD; background: var(--ecole-light); }

.status-badge.sent,
.status-badge.neutral {
  color: var(--text-muted);
  border-color: #D1D5DB;
  background: #F3F4F6;
}

.status-badge.modifie {
  color: var(--info);
  border-color: #93C5FD;
  background: var(--info-light);
  font-size: 11px;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ============================================================
   AVATARS
   ============================================================ */
.avatar--photo {
  padding: 0;
  overflow: hidden;
  background: transparent !important;
  color: transparent;
}
.avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  overflow: hidden;
}
.avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.avatar-group { display: inline-flex; }
.avatar-group .avatar { border: 2px solid white; margin-left: -8px; }
.avatar-group .avatar:first-child { margin-left: 0; }

.avatar-c1 { background: #FEE2E2; color: #B91C1C; }
.avatar-c2 { background: var(--brand-muted); color: var(--brand-ink); }
.avatar-c3 { background: #DCFCE7; color: #166534; }
.avatar-c4 { background: #FEF3C7; color: #B45309; }
.avatar-c5 { background: var(--ecole-light); color: var(--ecole); }
.avatar-c6 { background: #CFFAFE; color: #0E7490; }

/* ============================================================
   BUTTONS — charte Lexend BO (voir style.md)
   Variantes : primary (noir) · secondary (blanc) · danger (rouge)
   Formats : label+icône (défaut) · btn-icon (icône seule)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: var(--font-sans);
  text-decoration: none;
  line-height: 1.2;
  box-sizing: border-box;
}
.btn svg,
.btn .nav-icon { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: var(--brand);
  color: var(--brand-ink);
}
.btn-primary:hover { background: var(--brand-hover); color: var(--brand-ink); }

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: var(--bg-surface-alt); color: var(--text-primary); }

.btn-danger {
  background: var(--danger-light, #FEF2F2);
  color: var(--danger, #DC2626);
  border: 1px solid #fecaca;
}
.btn-danger:hover { background: #FECACA; color: var(--danger, #DC2626); }

/* Icône seule — carré */
.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  gap: 0;
}
.btn-icon svg,
.btn-icon .nav-icon { width: 16px; height: 16px; }

.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.btn-sm svg,
.btn-sm .nav-icon { width: 14px; height: 14px; }
.btn-sm.btn-icon { width: 30px; height: 30px; padding: 0; }

.btn-lg { padding: 10px 20px; font-size: 14px; border-radius: 10px; }
.btn-lg svg,
.btn-lg .nav-icon { width: 16px; height: 16px; }
.btn-lg.btn-icon { width: 40px; height: 40px; padding: 0; }

/* Compat héritée (éviter sur nouvelles pages Lexend — préférer btn-icon) */
.btn-ghost     { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-surface-alt); color: var(--text-primary); }

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  padding: 0;
}
.btn-action svg { width: 16px; height: 16px; }
.btn-action:hover { background: var(--bg-surface-alt); color: var(--text-primary); border-color: var(--text-secondary); }
.btn-action--danger { color: #dc2626; border-color: #fecaca; }
.btn-action--danger:hover { background: #fef2f2; color: #dc2626; border-color: #dc2626; }

/* ============================================================
   INPUTS
   ============================================================ */
.input-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.input-group label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }

.input, select.input, textarea.input {
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-surface);
  outline: none;
  width: 100%;
  font-family: var(--font-sans);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, select.input:focus, textarea.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-muted);
}
.input::placeholder { color: var(--text-muted); }
.input-with-icon { position: relative; }
.input-with-icon .input { padding-left: 36px; }
.input-with-icon svg {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}
.input-hint { font-size: 11px; color: var(--text-muted); }
.input-error { font-size: 12px; color: var(--danger); margin-top: 2px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Branding — color pickers visibles */
.color-field {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.color-field__swatch {
  width: 48px;
  height: 42px;
  flex: 0 0 48px;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}
.color-field__swatch::-webkit-color-swatch-wrapper { padding: 0; }
.color-field__swatch::-webkit-color-swatch {
  border: none;
  border-radius: 7px;
}
.color-field__swatch::-moz-color-swatch {
  border: none;
  border-radius: 7px;
}
.color-field__hex {
  flex: 1 1 auto;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.color-field__chip {
  flex: 0 0 42px;
  width: 42px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* Branding — logo upload + crop carré */
.logo-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.logo-upload__preview {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 88px;
}
.logo-upload__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.logo-upload__placeholder {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px;
}
.logo-upload__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.logo-upload__file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.logo-upload__delete {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.logo-crop-modal[hidden] { display: none !important; }
.logo-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.logo-crop-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.logo-crop-modal__panel {
  position: relative;
  width: min(440px, 100%);
  background: var(--surface, #fff);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  padding: 16px 18px 18px;
  z-index: 1;
}
.logo-crop-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.logo-crop-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.logo-crop-modal__hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.logo-crop-stage {
  position: relative;
  width: min(280px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.logo-crop-stage:active { cursor: grabbing; }
.logo-crop-stage__viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.logo-crop-stage__viewport img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  max-width: none;
  pointer-events: none;
}
.logo-crop-stage__frame {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}
.logo-crop-modal__controls { margin-bottom: 14px; }
.logo-crop-zoom {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.logo-crop-zoom input[type="range"] { flex: 1; }
.logo-crop-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  animation: overlayIn 0.15s ease;
}
.modal {
  background: var(--bg-surface);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.16);
  width: 500px; max-width: 92vw;
  max-height: 88vh; overflow-y: auto;
  animation: modalIn 0.18s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0; }
.modal-close {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; background: transparent;
  color: var(--text-muted);
}
.modal-close:hover { background: var(--bg-surface-alt); color: var(--text-primary); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ============================================================
   PLANNING
   ============================================================ */
.planning-container {
  background: var(--bg-surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
}
.planning-toolbar {
  display: flex; align-items: center;
  gap: 10px; padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.planning-toolbar-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0; }

.view-switcher {
  display: inline-flex;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}
.view-switcher button, .view-switcher a {
  padding: 5px 12px;
  font-size: 12px; font-weight: 600;
  border-radius: 6px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.1s;
  font-family: var(--font-sans);
  text-decoration: none;
}
.view-switcher button.active,
.view-switcher a.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.planning-grid {
  display: grid;
  grid-template-columns: 210px repeat(7, 1fr);
}

.planning-grid-header {
  background: var(--bg-surface-alt);
  padding: 10px 14px;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border-light);
  text-align: center;
}
.planning-grid-header.today-col {
  color: var(--text-primary);
  background: #EFEFEF;
}

.planning-employe-cell {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border);
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-surface);
}
.employe-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.employe-hours { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 1px; }

.planning-shift-cell {
  padding: 4px 5px;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  min-height: 62px;
  cursor: pointer;
  background: var(--bg-surface);
  transition: background 0.1s;
}
.planning-shift-cell:hover { background: var(--bg-surface-alt); }

.planning-shift-cell.ecole {
  background: var(--ecole-light);
  cursor: not-allowed;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 3px;
}
.ecole-label {
  font-size: 10px; font-weight: 600;
  color: var(--ecole);
  display: flex; align-items: center; gap: 3px;
}
.ecole-label svg { width: 11px; height: 11px; }

.shift-block {
  border-radius: 7px;
  padding: 5px 8px;
  border-left: 3px solid;
  margin-bottom: 2px;
  background: color-mix(in srgb, var(--color-secondary) 12%, white);
  border-left-color: var(--color-secondary);
  cursor: grab;
}
.shift-block:active { cursor: grabbing; opacity: 0.7; }
.shift-hours {
  font-size: 11px; font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.shift-poste { font-size: 10px; color: var(--text-muted); margin-top: 1px; }

.shift-block.overtime {
  background: var(--danger-light);
  border-left-color: var(--danger);
}
.shift-block.overtime .shift-hours { color: var(--danger); }

.planning-shift-cell.drag-over {
  background: color-mix(in srgb, var(--color-secondary) 8%, white);
  outline: 2px dashed var(--color-secondary);
  outline-offset: -3px;
}

/* ============================================================
   AUTH (login fullscreen, sans sidebar)
   ============================================================ */
/* Connexion client : image à gauche / formulaire à droite ; pas d’image sur mobile (≤768px). */
/* ============================================================
   AUTH NodeX — split formulaire (gauche) / marketing (droite)
   ============================================================ */
body:has(.auth-nodex) {
  background: var(--bg-surface);
  overflow: auto;
  height: auto;
  min-height: 100dvh;
}

.auth-nodex {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: 100dvh;
  background: var(--bg-surface);
}

.auth-nodex-form {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  padding: clamp(20px, 3vw, 40px);
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}

.auth-nodex-form-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  min-height: 0;
}

.auth-nodex-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 12px 0 20px;
}

.auth-nodex-block {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-nodex-brand {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.auth-nodex-brand .brand-logo--auth {
  justify-content: center;
  margin-bottom: 0;
}
.auth-nodex-brand .brand-logo--auth img {
  height: 32px;
  width: auto;
}

.auth-nodex-card {
  width: 100%;
  max-width: none;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 26px;
  box-shadow: 0 8px 32px rgba(27, 27, 27, 0.06);
}

.auth-nodex-card .auth-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: var(--text-primary);
  line-height: 1.2;
}
.auth-nodex-card .auth-subtitle {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 0 0 22px;
}
.auth-nodex-card .input-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.auth-nodex-card .input {
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
}
.auth-nodex-card .btn-primary {
  margin-top: 4px;
  width: 100%;
  justify-content: center;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
}
.auth-nodex-card .auth-btn-dark {
  margin-top: 10px;
  width: 100%;
  justify-content: center;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  background: #1B1B1B;
  color: #fff;
}
.auth-nodex-card .auth-btn-dark:hover {
  background: #111;
  color: #fff;
}
.auth-nodex-card .auth-footer-link {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 18px 0 0;
}
.auth-nodex-card .auth-footer-link a {
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-password {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-password .input {
  padding-right: 44px;
}
.auth-password__toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}
.auth-password__toggle:hover {
  color: var(--text-primary);
  background: var(--bg-surface-alt);
}
.auth-password__toggle svg {
  width: 18px;
  height: 18px;
}
.auth-password__toggle .icon-eye-off { display: none; }
.auth-password__toggle.is-visible .icon-eye { display: none; }
.auth-password__toggle.is-visible .icon-eye-off { display: block; }

.auth-nodex-form .app-site-footer--split-panel {
  margin-top: auto;
  border-top: none;
  padding: 8px 0 0;
  text-align: center;
}

/* Panneau marketing */
.auth-nodex-visual {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 40px);
  background:
    radial-gradient(120% 80% at 85% 10%, rgba(200, 248, 71, 0.28), transparent 55%),
    radial-gradient(90% 70% at 90% 95%, rgba(125, 211, 252, 0.35), transparent 50%),
    linear-gradient(165deg, #f7fafc 0%, #eef6fb 45%, #f8faf5 100%);
  border-left: 1px solid var(--border-light);
}

.auth-nodex-visual__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.auth-nodex-visual__mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
}
.auth-nodex-visual__name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.auth-nodex-visual__hero {
  position: relative;
  flex: 1 1 auto;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 4px 0 0;
  padding-bottom: 28px;
  overflow: hidden;
}
.auth-nodex-visual__hero-img {
  width: min(100%, 420px);
  max-height: min(60vh, 560px);
  height: auto;
  object-fit: contain;
  object-position: center bottom;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: block;
  /* Laisse le fondu naturel du PNG, sans voile opaque */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 72%,
    rgba(0, 0, 0, 0.55) 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 72%,
    rgba(0, 0, 0, 0.55) 88%,
    transparent 100%
  );
}

.auth-nodex-quote {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  margin: 0 auto;
  width: 100%;
  max-width: 440px;
  text-align: center;
  flex: 0 0 auto;
  padding-top: 12px;
}
.auth-nodex-quote__slide {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
}
.auth-nodex-quote__slide.is-active {
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
  animation: authQuoteIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.auth-nodex-quote__slide.is-leaving {
  visibility: visible;
  z-index: 2;
  animation: authQuoteOut 0.35s ease forwards;
  pointer-events: none;
}
@keyframes authQuoteIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes authQuoteOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}
.auth-nodex-quote__author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.auth-nodex-quote__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 0 5px var(--brand);
  background: var(--bg-surface-alt);
}
.auth-nodex-quote__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.auth-nodex-quote__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.auth-nodex-quote__role {
  font-size: 12px;
  color: var(--text-secondary);
}
.auth-nodex-quote__text {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  max-width: 36ch;
}
.auth-nodex-quote__dots {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.auth-nodex-quote__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(27, 27, 27, 0.18);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.auth-nodex-quote__dot.is-active {
  background: var(--text-primary);
  transform: scale(1.15);
}
.auth-nodex-quote__dot:hover {
  background: rgba(27, 27, 27, 0.35);
}

.auth-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-app);
  padding: 20px;
  min-height: 0;
}
.auth-card {
  background: var(--bg-surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}
.auth-logo {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--color-primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 18px;
}
.auth-logo--svg {
  width: 100%;
  height: auto;
  min-height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border-radius: 0;
}
.auth-logo--svg img {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: contain;
}
.auth-title { font-size: 20px; font-weight: 800; margin: 0 0 4px; color: var(--text-primary); }
.auth-subtitle { font-size: 13px; color: var(--text-secondary); margin: 0 0 24px; }

@media (min-width: 769px) {
  body:has(.auth-nodex) {
    overflow: hidden;
    height: 100dvh;
  }
  .auth-nodex {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
  .auth-nodex-form {
    overflow-y: auto;
  }
  .auth-nodex-visual {
    overflow: hidden;
  }
}

@media (max-width: 900px) {
  .auth-nodex-visual__hero {
    padding-bottom: 20px;
  }
  .auth-nodex-visual__hero-img {
    width: min(100%, 360px);
    max-height: min(54vh, 480px);
  }
  .auth-nodex-quote__text { font-size: 16px; }
}

@media (max-width: 768px) {
  .auth-nodex {
    flex-direction: column;
    min-height: 100dvh;
  }
  .auth-nodex-visual { display: none; }
  .auth-nodex-form {
    flex: 1;
    padding-top: max(24px, env(safe-area-inset-top, 0px));
  }
  .auth-nodex-card {
    border: none;
    box-shadow: none;
    padding: 8px 0 16px;
  }
  .auth-nodex-card .auth-title { font-size: 24px; }
}

.alert {
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid;
}
.alert-error { background: var(--danger-light); border-color: #FCA5A5; color: var(--danger); }
.alert-success { background: var(--success-light); border-color: #86EFAC; color: var(--success); }
.alert-warning { background: var(--warning-light); border-color: #FCD34D; color: var(--warning); }
.alert-info { background: var(--info-light); border-color: #93C5FD; color: var(--info); }

/* Banner impersonation / suspendu */
.banner-support {
  background: var(--warning);
  color: white;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* ============================================================
   UTILS
   ============================================================ */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-0 { margin-bottom: 0; }
.mono { font-family: var(--font-mono); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.hidden { display: none; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes cardIn     { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes expandDown { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes overlayIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn    { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.progress-segment { animation: barGrow 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.4s both; }
@keyframes barGrow { from { flex-grow: 0 !important; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .kpi-grid, .kpi-grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* Shell tablette / mobile NodeX : chrome sombre + feuille blanche arrondie */
  body:has(.layout > .sidebar) {
    background: var(--chrome-bg);
    overflow: hidden;
    height: 100dvh;
  }
  .layout {
    padding: 0;
    gap: 0;
    background: var(--chrome-bg);
    height: 100dvh;
    overflow: hidden;
  }
  .main-content {
    margin: 0;
    margin-left: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--chrome-bg);
  }

  .topbar {
    flex-shrink: 0;
    flex-wrap: wrap;
    margin: 0;
    padding: 10px 14px;
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    border: none;
    border-bottom: none;
    border-radius: 0;
    position: relative;
    top: auto;
    background: var(--chrome-bg);
    color: #fff;
    z-index: 20;
  }
  .topbar .global-search {
    display: none;
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
  }
  .topbar .global-search.is-expanded {
    display: flex;
  }
  .topbar .global-search input,
  .topbar .global-search svg {
    color: #fff;
  }
  .topbar .global-search input::placeholder {
    color: rgba(255, 255, 255, 0.55);
  }
  .topbar-actions {
    margin-left: auto;
    gap: 8px;
  }
  .topbar-icon-btn,
  .notif-bell__btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #fff;
    box-shadow: none;
  }
  .topbar-icon-btn:hover,
  .notif-bell__btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
  }
  #mobile-search-btn { display: inline-flex; }
  .mobile-menu-btn { display: inline-flex; }
  .topbar-enseigne__text { display: none; }
  .topbar-enseigne {
    border-left: none;
    margin-left: 0;
    padding: 0;
  }
  .topbar-enseigne__logo {
    width: 36px;
    height: 36px;
  }

  .content-sheet {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg-surface);
    border-radius: 24px 24px 0 0;
    padding: 20px 16px calc(28px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.04);
  }

  .layout ~ .app-site-footer {
    display: none;
  }
  body:has(.cal-bottom-nav) .content-sheet {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  /* Drawer : rail + panneau catégories */
  .sidebar {
    width: min(100vw, 308px);
    top: 0;
    left: 0;
    height: 100dvh;
    border-radius: 0;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    z-index: 99;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
  }
  .sidebar-rail { display: flex; }
  .sidebar-panel {
    width: var(--sidebar-panel-width);
    background: rgba(27, 27, 27, 0.24);
  }
  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 98;
  }
  .sidebar.open ~ .sidebar-overlay,
  body.sidebar-drawer-open .sidebar-overlay {
    display: block;
  }

  .dash-header__title { font-size: 22px; }
  .dash-kpi__value { font-size: 20px; }
  .kpi-big-value { font-size: 28px; }

  .planning-grid {
    overflow-x: auto;
    grid-template-columns: 140px repeat(7, minmax(90px, 1fr));
  }
}

@media (max-width: 768px) {
  .kpi-grid, .kpi-grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .dash-kpis { grid-template-columns: 1fr 1fr; }
  .dash-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .kpi-grid.cols-4 { grid-template-columns: 1fr; }
  .dash-quick-grid { grid-template-columns: 1fr 1fr; }
  .topbar-enseigne { display: none; }
}

@media (min-width: 1025px) {
  .mobile-menu-btn,
  #mobile-search-btn { display: none !important; }
}

/* ============ A11y helpers ============ */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 2px solid var(--color-primary, #111);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -40px; left: 0;
  background: var(--color-primary, #111);
  color: #fff;
  padding: 8px 14px;
  z-index: 1000;
  text-decoration: none;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { top: 0; }

/* ============================================================
   CONGÉS — vue équipe & timeline
   ============================================================ */
.conges-subnav { flex-wrap: wrap; }

.conges-legend {
  align-items: center;
}

.conges-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}

.cc-demo-approuve-cp {
  background: var(--success-light);
  border-bottom: 3px solid var(--success);
}

.cc-demo-approuve-rtt {
  background: var(--info-light);
  border-bottom: 3px solid var(--info);
}

.cc-demo-approuve-maladie {
  background: var(--danger-light);
  border-bottom: 3px solid var(--danger);
}

.cc-demo-attente {
  background: var(--warning-light);
  outline: 2px dashed var(--warning);
}

.conges-cal-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.conges-cal-table {
  border-collapse: collapse;
  width: 100%;
  min-width: max-content;
}

.conges-cal-sticky-col {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 8px 12px;
  min-width: 180px;
  max-width: 220px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}

.conges-cal-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.conges-cal-name:hover {
  opacity: 0.85;
}

.conges-cal-day-h {
  padding: 6px 2px;
  text-align: center;
  font-weight: 600;
  font-size: 10px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  vertical-align: bottom;
  line-height: 1.15;
}

.conges-cal-day-h.weekend {
  background: var(--bg-surface-alt);
}

.conges-cal-dow {
  display: block;
  text-transform: lowercase;
  font-variant-numeric: tabular-nums;
}

.conges-cal-dom {
  display: block;
  font-size: 11px;
  color: var(--text-primary);
}

.conges-cal-cell {
  width: 22px;
  min-width: 22px;
  height: 32px;
  padding: 1px;
  vertical-align: middle;
  border: 1px solid var(--border-light);
}

.conges-cal-cell.weekend {
  background: var(--bg-surface-alt);
}

.conges-cal-cell .cc-fill {
  width: 100%;
  height: 100%;
  min-height: 28px;
  border-radius: 3px;
}

.conges-cal-cell .cc-approuve.cc-type-cp {
  background: var(--success-light);
  border-bottom: 3px solid var(--success);
}

.conges-cal-cell .cc-approuve.cc-type-rtt {
  background: var(--info-light);
  border-bottom: 3px solid var(--info);
}

.conges-cal-cell .cc-approuve.cc-type-maladie {
  background: var(--danger-light);
  border-bottom: 3px solid var(--danger);
}

.conges-cal-cell .cc-approuve.cc-type-sans_solde {
  background: #F4F4F5;
  border-bottom: 3px solid var(--text-muted);
}

.conges-cal-cell .cc-approuve.cc-type-familial,
.conges-cal-cell .cc-approuve.cc-type-formation,
.conges-cal-cell .cc-approuve.cc-type-maternite,
.conges-cal-cell .cc-approuve.cc-type-paternite {
  background: var(--ecole-light);
  border-bottom: 3px solid var(--ecole);
}

.conges-cal-cell .cc-attente {
  background: var(--warning-light);
  box-shadow: inset 0 0 0 2px var(--warning);
}

.conges-timeline { margin-top: 8px; }

.conges-timeline-year {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 24px 0 12px;
  color: var(--text-secondary);
}

.conges-timeline-year:first-child {
  margin-top: 0;
}

.conges-timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
  margin-left: 7px;
}

.conges-timeline-item {
  position: relative;
  padding: 0 0 20px 22px;
}

.conges-timeline-dot {
  position: absolute;
  left: -9px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border);
}

.conges-timeline-dot.approuve {
  border-color: var(--success);
  background: var(--success-light);
}

.conges-timeline-dot.en_attente {
  border-color: var(--warning);
  background: var(--warning-light);
}

.conges-timeline-dot.refuse {
  border-color: var(--danger);
  background: var(--danger-light);
}

.conges-timeline-body {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px 14px;
}

/* Alignement des chiffres (heures, compteurs, IDs) sans police monospace. */
.mono,
.shift-hours,
.employe-hours,
.cell-id {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0;
}

/* Créneaux matin / après-midi sur deux lignes (libellé avec \n). */
.shift-times {
  white-space: pre-line;
  line-height: 1.25;
}

/* Matrice des permissions (admin / Lexend) */
.perm-matrix-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

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

.perm-matrix-table th,
.perm-matrix-table td {
  border-bottom: 1px solid var(--border-light);
  padding: 10px 8px;
  text-align: center;
  vertical-align: top;
}

.perm-matrix-table th:first-child,
.perm-matrix-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 220px;
}

.perm-matrix-table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-surface-alt);
}

.perm-matrix-note {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 4px;
  line-height: 1.35;
}

.perm-matrix-yes {
  color: var(--color-secondary);
  font-weight: 700;
}

.perm-matrix-ro {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
}

.perm-matrix-no {
  color: var(--text-muted);
}

.perm-matrix-select {
  max-width: 118px;
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
}

.perm-matrix-actions {
  align-items: center;
}

/* Paramètres enseigne — RTT & fieldsets */
.param-form {
  max-width: 780px;
}

.param-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}

.param-fieldset__legend {
  padding: 0 6px;
  font-weight: 700;
}

.param-fieldset__hint {
  display: block;
  margin-top: 8px;
}

.param-inline-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-surface-alt);
}

.param-rtt-grid {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 640px) {
  .param-rtt-grid {
    grid-template-columns: 1fr;
  }
}

.magasin-badge-rtt {
  margin-left: 6px;
  font-weight: 500;
  vertical-align: middle;
}

/* Page /aide — base de connaissances (knowledge management) */
.aide-page.aide-km {
  max-width: 1160px;
}

.aide-km-header {
  margin-bottom: 24px;
}

.aide-km-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.aide-km-breadcrumb a {
  color: var(--text-secondary);
  font-weight: 600;
}

.aide-km-breadcrumb a:hover {
  color: var(--color-secondary);
}

.aide-km-breadcrumb__sep {
  opacity: 0.6;
  user-select: none;
}

#aide-km-crumb {
  color: var(--text-primary);
  font-weight: 600;
}

.aide-km-header__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-secondary);
}

.aide-km-header__title {
  margin-bottom: 8px;
}

.aide-km-header__lead {
  margin: 0;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.aide-km-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 4px 4px 4px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
  max-width: 520px;
}

.aide-km-search:focus-within {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.aide-km-search__icon {
  display: flex;
  opacity: 0.55;
}

.aide-icon--search {
  width: 20px;
  height: 20px;
}

.aide-km-search__input {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  padding: 10px 12px 10px 0;
  min-width: 0;
  color: var(--text-primary);
}

.aide-km-search__input::placeholder {
  color: var(--text-muted);
}

.aide-km-search__input:focus {
  outline: none;
}

.aide-km-spaces {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .aide-km-spaces {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}

.aide-km-spaces--hidden-query {
  display: none;
}

.aide-km-space {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05);
  transition: border-color 0.15s, transform 0.12s;
}

.aide-km-space:hover {
  border-color: var(--border);
  transform: translateY(-1px);
}

.aide-km-space__icon {
  display: flex;
  margin-bottom: 4px;
}

.aide-km-space__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.aide-km-space__hint {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-muted);
}

.aide-km-shell {
  display: grid;
  gap: 28px;
  align-items: start;
}

@media (min-width: 960px) {
  .aide-km-shell {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 36px;
  }
}

.aide-km-sidebar {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  padding: 16px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
}

@media (max-width: 959px) {
  .aide-km-sidebar {
    position: relative;
    top: auto;
    max-height: none;
  }
}

.aide-km-sidebar__heading {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.aide-km-branch {
  margin-bottom: 10px;
  border-radius: 10px;
}

.aide-km-branch:last-child {
  margin-bottom: 0;
}

.aide-km-branch__label {
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 8px 4px;
}

.aide-km-branch__label::-webkit-details-marker {
  display: none;
}

.aide-km-branch__label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--color-secondary);
  vertical-align: middle;
  opacity: 0.85;
}

.aide-km-tree-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0 0 0 14px;
}

.aide-km-tree-list li {
  margin: 0;
}

.aide-km-tree-list a {
  display: block;
  padding: 6px 8px;
  margin-left: -8px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.aide-km-tree-list a:hover {
  color: var(--color-secondary);
  background: var(--bg-surface-alt);
}

.aide-km-main {
  min-width: 0;
}

.aide-km-collection {
  scroll-margin-top: 88px;
  margin-bottom: 36px;
}

.aide-km-collection:last-child {
  margin-bottom: 0;
}

.aide-km-collection--empty-search {
  display: none !important;
}

.aide-km-collection-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.aide-km-collection-head__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.aide-km-collection-head__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.aide-km-article--miss {
  display: none !important;
}

.aide-km-reponse {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-primary);
}

.aide-km-reponse :is(p, ul, ol) {
  margin: 0 0 12px;
}

.aide-km-reponse :is(ul, ol) {
  padding-left: 1.25rem;
}

.aide-km-reponse :is(ul, ol):last-child,
.aide-km-reponse p:last-child {
  margin-bottom: 0;
}

.aide-km-reponse code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--bg-muted, #f3f4f6);
}

.aide-km-faq {
  border: 1px solid var(--border-light);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: 0 1px 3px rgba(17, 17, 17, 0.05);
}

.aide-km-faq .aide-faq__item summary {
  padding-left: 18px;
  padding-right: 18px;
}

.aide-km-faq .aide-faq__item p {
  padding-left: 18px;
  padding-right: 22px;
}

.aide-km-faq .aide-km-article {
  margin-bottom: 0;
}

/* Icônes de rubrique (réutilisées dans les cartes) */
.aide-stack__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border-radius: 14px;
  background: var(--info-light);
  border: 1px solid rgba(200, 248, 71, 0.15);
}

.aide-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--info);
}

.aide-icon--sm {
  width: 22px;
  height: 22px;
}

.aide-stack__icon--sm {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

.aide-card {
  scroll-margin-top: 88px;
  margin-bottom: 14px;
  padding: 22px 22px 20px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(17, 17, 17, 0.06);
}

.aide-card--accent {
  border-left: 4px solid var(--color-secondary);
}

.aide-card--soft {
  background: linear-gradient(180deg, var(--success-light) 0%, var(--bg-surface) 48%);
  border-color: #BBF7D0;
}

.aide-card--flat {
  box-shadow: none;
}

.aide-card--support {
  margin-top: 10px;
  margin-bottom: 8px;
  text-align: center;
  padding-bottom: 26px;
  border-color: var(--border);
  background: linear-gradient(180deg, var(--bg-surface-alt) 0%, var(--bg-surface) 70%);
}

.aide-card__head-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.aide-card__title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
}

.aide-card__title--inline {
  margin-bottom: 0;
}

.aide-card__intro {
  margin: 0 0 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.aide-bullet-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.aide-bullet-list li + li {
  margin-top: 10px;
}

.aide-bullet-list--tight li + li {
  margin-top: 8px;
}

.aide-muted {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.aide-muted a {
  color: var(--color-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.aide-card p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.aide-card p:last-child {
  margin-bottom: 0;
}

.aide-card a {
  color: var(--color-secondary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.aide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aide-steps__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.aide-steps__item:last-child {
  margin-bottom: 0;
}

.aide-steps__num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--bg-surface);
  background: var(--color-primary);
}

.aide-steps--compact .aide-steps__num {
  width: 26px;
  height: 26px;
  font-size: 12px;
}

.aide-steps__body {
  flex: 1;
  padding-top: 4px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.aide-tip {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  background: var(--info-light);
  border: 1px solid #BFDBFE;
  color: var(--text-primary);
}

.aide-tip strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--info);
}

.aide-grid-3 {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .aide-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

.aide-mini-card {
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
}

.aide-mini-card__label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.aide-mini-card__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.aide-kbd-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aide-kbd-list li {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-secondary);
}

.aide-kbd-list li:last-child {
  border-bottom: none;
}

.aide-kbd-list span:last-child {
  flex: 1;
  min-width: 140px;
}

.aide-kbd-plus {
  margin: 0 2px;
  opacity: 0.5;
  font-weight: 600;
}

.aide-page kbd,
.aide-kbd-fake {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
}

.aide-kbd-fake {
  font-size: 12px;
}

.aide-faq__item {
  border-bottom: 1px solid var(--border-light);
}

.aide-faq__item:last-child {
  border-bottom: none;
}

.aide-faq__item summary {
  cursor: pointer;
  padding: 14px 4px 14px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
}

.aide-faq__item summary::-webkit-details-marker {
  display: none;
}

.aide-faq__item summary::after {
  content: '+';
  float: right;
  font-weight: 700;
  color: var(--text-muted);
}

.aide-faq__item[open] summary::after {
  content: '−';
}

.aide-faq__item p {
  margin: 0 0 14px;
  padding-right: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.aide-support__text {
  margin: 0 auto 12px;
  max-width: 42ch;
}

.aide-support__mail {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.aide-support__mail a {
  color: var(--color-secondary);
  text-decoration: none;
}

.aide-support__mail a:hover {
  text-decoration: underline;
}

.aide-support__hours {
  margin-top: 0 !important;
}

/* ─── Jours fériés ──────────────────────────────────────────── */
.feries-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.feries-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.feries-scope-form select {
  min-width: 180px;
}

.feries-scope-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  font-size: 13px;
  color: #0369a1;
}

.feries-scope-hint svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.input-sm {
  padding: 6px 10px;
  font-size: 13px;
}

.feries-year-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feries-year-current {
  font-size: 20px;
  font-weight: 700;
  min-width: 60px;
  text-align: center;
}

.feries-date-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.feries-global-row {
  opacity: 0.6;
  font-style: italic;
}

.feries-add-form .form-row {
  display: grid;
  align-items: end;
}

.badge-info {
  background: var(--color-secondary, #3b82f6);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-style: normal;
}

.badge-success {
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-neutral {
  background: #e5e7eb;
  color: #6b7280;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background .15s;
}

.btn-icon:hover {
  background: var(--bg-hover, rgba(0,0,0,.05));
}


.section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
}

.mt-4 {
  margin-top: 24px;
}

/* ─── Pricing Section ─── */

/* ═══════════════════════════════════════════════════════════════
   Mon abonnement — page complète
   ═══════════════════════════════════════════════════════════════ */

.abo-page {
  max-width: 780px;
  padding: 0 4px;
}

/* Tabs */
.abo-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}
.abo-tabs__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
  border-radius: 8px 8px 0 0;
}
.abo-tabs__btn:hover { color: #111111; background: #f4f4f5; }
.abo-tabs__btn--active {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
  background: #f4f4f5;
}
.abo-tabs__btn svg { width: 16px; height: 16px; }
.abo-tabs__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}
.abo-tabs__btn--active .abo-tabs__count { background: #0B0B0D; color: #ffffff; }

/* Tab panels */
.abo-tab-panel { display: none; }
.abo-tab-panel--active { display: block; animation: aboFadeIn .2s ease; }
@keyframes aboFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Empty state */
.abo-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: #94a3b8;
  text-align: center;
}
.abo-empty-state svg { width: 40px; height: 40px; opacity: .4; }
.abo-empty-state p { margin: 0; font-size: 14px; }

/* Alerts */
.abo-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
}
.abo-alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.abo-alert--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.abo-alert--error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* Sections */
.abo-section {
  background: var(--bg-surface);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
}
.abo-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.abo-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.abo-section__title svg { width: 20px; height: 20px; color: #7c3aed; }

/* Portal link */
.abo-portal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #7c3aed;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  background: #f5f3ff;
  transition: all .15s;
}
.abo-portal-link:hover { background: #ede9fe; }
.abo-portal-link svg { width: 14px; height: 14px; }
.abo-portal-link--sm { font-size: 12px; padding: 4px 10px; }

/* Status banner */
.abo-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
}
.abo-status-banner svg { width: 16px; height: 16px; flex-shrink: 0; }
.abo-status-banner--trial { background: var(--bg-surface)beb; border: 1px solid #fde68a; color: #92400e; }
.abo-status-banner--trial svg { color: #f59e0b; }
.abo-status-banner--active { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.abo-status-banner--active svg { color: #22c55e; }
.abo-status-banner--canceled { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.abo-status-banner--canceled svg { color: #dc2626; }

/* Pricing block */
.abo-pricing { }
.abo-pricing__switch {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
}
.abo-pricing__tab {
  position: relative;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.abo-pricing__tab--active {
  background: var(--bg-surface);
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.abo-pricing__badge {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
  text-transform: uppercase;
}

/* Pricing card */
.abo-pricing__card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
}
.abo-pricing__view { }
.abo-pricing__amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}
.abo-pricing__price {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1;
}
.abo-pricing__price small { font-size: 24px; font-weight: 700; }
.abo-pricing__interval {
  font-size: 16px;
  font-weight: 600;
  color: #64748b;
}
.abo-pricing__detail {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 16px;
}
.abo-pricing__savings {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 16px;
}
.abo-pricing__savings svg { width: 16px; height: 16px; color: #f59e0b; flex-shrink: 0; }

/* Pricing action */
.abo-pricing__action {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.abo-pricing__trial-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
}
.abo-pricing__trial-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #7c3aed;
}
.abo-pricing__active-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  color: #166534;
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
}
.abo-pricing__active-tag svg { width: 16px; height: 16px; color: #22c55e; }

/* Features grid */
.abo-pricing__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}
.abo-pricing__feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
}
.abo-pricing__feature svg { width: 14px; height: 14px; color: #7c3aed; flex-shrink: 0; }

/* Recap */
.abo-pricing__recap {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 14px 20px;
  background: var(--bg-surface);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.abo-pricing__recap-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
}
.abo-pricing__recap-item svg { width: 14px; height: 14px; opacity: .6; }
.abo-pricing__recap-item strong { color: #0f172a; font-size: 15px; }

/* Buttons */
.abo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.abo-btn svg { width: 16px; height: 16px; }
.abo-btn--full { width: 100%; }
/* Compat : préférer .btn.btn-primary (charte style.md / Lexend BO) */
.abo-btn--primary {
  background: #0B0B0D;
  color: #fff;
}
.abo-btn--primary:hover { background: #1a1a1e; }
.abo-btn--accent {
  /* Déprécié (violet hors marque) — aligné sur primary noir */
  background: #0B0B0D;
  color: #fff;
}
.abo-btn--accent:hover { background: #1a1a1e; }

/* Billing form */
.abo-billing-form { }
.abo-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.abo-form-group { display: flex; flex-direction: column; gap: 4px; }
.abo-form-group--full { grid-column: 1 / -1; }
.abo-input-with-btn {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.abo-input-with-btn .abo-input { flex: 1; min-width: 0; }
.abo-input-with-btn .btn { flex-shrink: 0; padding: 8px 12px; }
.abo-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}
.abo-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.abo-input {
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #0f172a;
  background: var(--bg-surface);
  transition: border-color .15s, box-shadow .15s;
}
.abo-input:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.abo-input--disabled { background: #f8fafc; color: #94a3b8; }
.abo-form-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 18px 0;
  grid-column: 1 / -1;
}
.abo-form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

/* Info grid (read-only) */
.abo-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.abo-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.abo-info-item__label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.abo-info-item__value {
  font-size: 14px;
  color: #0f172a;
  font-weight: 500;
}

/* Invoices */
.abo-invoices { }
.abo-invoices__header {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.5fr 0.8fr 0.7fr 0.8fr 0.5fr;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.abo-invoices__row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.5fr 0.8fr 0.7fr 0.8fr 0.5fr;
  gap: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
}
.abo-invoices__row:last-child { border-bottom: none; }
.abo-invoices__number { font-family: var(--mono, monospace); font-size: 12px; color: #64748b; }
.abo-invoices__period { font-size: 12px; color: #64748b; }
.abo-invoices__right { text-align: right; }
.abo-invoices__ttc { font-weight: 600; color: #0f172a; }
.abo-invoices__actions { display: flex; gap: 6px; justify-content: flex-end; }
.abo-invoices__dl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #7c3aed;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: background .15s;
}
.abo-invoices__dl:hover { background: #f5f3ff; }
.abo-invoices__dl svg { width: 14px; height: 14px; }

.abo-invoices__header--local,
.abo-invoices__row--local {
  grid-template-columns: 1.2fr 2fr 1fr 0.8fr 0.8fr;
}
.abo-invoices__status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #dcfce7;
  color: #166534;
}

/* Manage subscription section */
.abo-pricing__manage {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.abo-manage-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: all .15s;
}
.abo-manage-link:hover { border-color: #94a3b8; color: #334155; }
.abo-manage-link svg { width: 14px; height: 14px; }
.abo-manage-link--danger { color: #dc2626; border-color: #fecaca; }
.abo-manage-link--danger:hover { background: #fef2f2; border-color: #dc2626; }
.abo-manage-link--success { color: #16a34a; border-color: #bbf7d0; }
.abo-manage-link--success:hover { background: #f0fdf4; border-color: #16a34a; }

.abo-status-badge--free {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.abo-pricing__cancel-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-surface)beb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 13px;
  color: #92400e;
  width: 100%;
}
.abo-pricing__cancel-notice svg { width: 14px; height: 14px; color: #f59e0b; flex-shrink: 0; }
.abo-pricing__cancel-form { margin-left: auto; }

@media (max-width: 640px) {
  .abo-section { padding: 20px 16px; }
  .abo-form-grid { grid-template-columns: 1fr; }
  .abo-form-group--full { grid-column: auto; }
  .abo-info-grid { grid-template-columns: 1fr; }
  .abo-pricing__features { grid-template-columns: 1fr; }
  .abo-invoices__header,
  .abo-invoices__row { grid-template-columns: 1fr 1fr 1fr; font-size: 12px; }
  .abo-invoices__period,
  .abo-invoices__header span:nth-child(4),
  .abo-invoices__header span:nth-child(5),
  .abo-invoices__row span:nth-child(4),
  .abo-invoices__row span:nth-child(5) { display: none; }
}






/* ═══════════════════════════════════════════════════════════════
   Admin Lexend — Fiche client
   ═══════════════════════════════════════════════════════════════ */

.client-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.client-header__name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}
.client-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.client-header__meta svg { width: 14px; height: 14px; opacity: .6; }
.client-header__slug {
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
}
.client-header__actions { flex-shrink: 0; }

/* KPI strip */
.client-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
a.client-kpi {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.client-kpi:hover {
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.client-kpi {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.client-kpi__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.client-kpi__icon svg { width: 18px; height: 18px; }
.client-kpi__icon--actif, .client-kpi__icon--green { background: #dcfce7; color: #16a34a; }
.client-kpi__icon--essai, .client-kpi__icon--yellow { background: #fef9c3; color: #ca8a04; }
.client-kpi__icon--suspendu, .client-kpi__icon--impaye, .client-kpi__icon--red { background: #fee2e2; color: #dc2626; }
.client-kpi__icon--blue { background: #dbeafe; color: #2563eb; }
.client-kpi__icon--purple { background: #ede9fe; color: #7c3aed; }
.client-kpi__body { display: flex; flex-direction: column; }
.client-kpi__value { font-size: 15px; font-weight: 600; color: var(--text); }
.client-kpi__label { font-size: 12px; color: var(--muted); }

/* Admin panels */
.admin-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 20px;
  overflow: hidden;
}
.admin-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.admin-panel__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.admin-panel__title svg { width: 16px; height: 16px; opacity: .7; }
.admin-panel__count {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}
.admin-panel__body { padding: 20px; }
.admin-panel__body--flush { padding: 0; }
.admin-panel__body--flush .data-table { border: none; border-radius: 0; }
.admin-panel__body--flush .empty-state { padding: 32px 20px; }
.admin-panel__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

/* Admin grid */
.admin-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.admin-grid--2 { grid-template-columns: 1fr 1fr; }
.admin-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 768px) {
  .admin-grid--2, .admin-grid--3 { grid-template-columns: 1fr; }
}

/* Fields */
.field { display: flex; flex-direction: column; gap: 4px; }
.field__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.field__input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-surface);
  color: var(--text);
  transition: border-color .15s;
}
.field__input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.field__textarea { resize: vertical; min-height: 48px; }
.field__hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
.field__input-wrap { position: relative; display: flex; }
.field__input-wrap .field__input { flex: 1; padding-right: 32px; }
.field__suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}
.field--readonly .field__value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 4px 0;
}

/* Toggle fields */
.field__toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s;
}
.field__toggle:hover { border-color: var(--primary); }
.field__toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.field__toggle-label { font-size: 13px; font-weight: 600; color: var(--text); display: block; }
.field__toggle-hint { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }

/* Outline buttons */
.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-outline-danger:hover { background: var(--danger); color: #fff; }
.btn-outline-danger svg { width: 14px; height: 14px; }

.btn-outline-success {
  background: transparent;
  color: var(--success);
  border: 1px solid var(--success);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-outline-success:hover { background: var(--success); color: #fff; }
.btn-outline-success svg { width: 14px; height: 14px; }

/* Log action tag */
.log-action {
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text);
}

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-green { background: #dcfce7; color: #16a34a; }
.badge-red { background: #fee2e2; color: #dc2626; }

/* Stripe Products Grid */
.stripe-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px;
}
.stripe-product-card {
  background: var(--bg-surface);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .15s;
}
.stripe-product-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.stripe-product-card__header {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.stripe-product-card__img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}
.stripe-product-card__name { font-size: 15px; font-weight: 700; color: #1e293b; margin: 0; }
.stripe-product-card__desc { font-size: 12px; color: #64748b; margin: 4px 0 0; }
.stripe-product-card__id { font-size: 10px; color: #94a3b8; background: #f8fafc; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.stripe-product-card__prices { padding: 10px 18px; }
.stripe-price-row {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f8fafc;
}
.stripe-price-row:last-child { border-bottom: none; }
.stripe-price-row__amount { font-weight: 700; font-size: 14px; color: #1e293b; font-variant-numeric: tabular-nums; }
.stripe-price-row__tax { font-size: 11px; color: #94a3b8; }
.stripe-price-row__id { font-size: 10px; color: #94a3b8; text-align: right; }
.stripe-product-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}
@media (max-width: 768px) {
  .stripe-products-grid { grid-template-columns: 1fr; }
  .stripe-price-row { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   TWO-FACTOR AUTHENTICATION (2FA)
   ============================================================ */
.tfa-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}
.tfa-section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.tfa-section-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tfa-section-icon svg { width: 22px; height: 22px; }
.tfa-section-icon--totp { background: #EEF2FF; color: #4F46E5; }
.tfa-section-icon--fido { background: #F0FDF4; color: #16A34A; }
.tfa-section-title { font-size: 15px; font-weight: 700; margin: 0 0 4px; color: var(--text-primary); }
.tfa-section-desc { font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.tfa-section-status { margin-left: auto; flex-shrink: 0; }
.tfa-section-actions { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-light); }

.tfa-key-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}
.tfa-brand-logo { height: 18px; width: auto; vertical-align: middle; }
.tfa-brand-logo--lg { height: 24px; }
.tfa-key-brand--lg { font-size: 15px; gap: 6px; }

.tfa-credentials-list {
  margin-top: 16px;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}
.tfa-credential-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}
.tfa-credential-row:last-child { border-bottom: none; }
.tfa-credential-info { display: flex; align-items: center; gap: 10px; }
.tfa-credential-info svg { width: 18px; height: 18px; color: var(--text-secondary); flex-shrink: 0; }
.tfa-credential-name { font-weight: 600; font-size: 13px; display: block; color: var(--text-primary); }
.tfa-credential-meta { font-size: 11px; color: var(--text-muted); display: block; margin-top: 2px; }

/* TOTP Setup */
.tfa-setup-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  max-width: 520px;
}
.tfa-setup-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.tfa-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.tfa-setup-step h3 { font-size: 14px; font-weight: 700; margin: 0 0 4px; }
.tfa-qr-container {
  display: flex;
  justify-content: center;
  padding: 20px;
  margin-bottom: 20px;
  background: #FAFBFC;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}
.tfa-qr-container svg { width: 200px; height: 200px; }
.tfa-manual-key {
  display: block;
  margin-top: 8px;
  padding: 10px 14px;
  background: var(--bg-surface-alt);
  border-radius: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 14px;
  letter-spacing: 2px;
  word-break: break-all;
  color: var(--text-primary);
}
.tfa-confirm-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-light); }
.tfa-code-input {
  font-size: 24px !important;
  letter-spacing: 6px;
  text-align: center;
  font-family: var(--font-mono, monospace) !important;
}

/* Recovery codes */
.tfa-recovery-panel {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.tfa-recovery-panel h3 { font-size: 15px; font-weight: 700; margin: 0 0 8px; color: #92400E; }
.tfa-recovery-panel p { font-size: 13px; color: #92400E; margin: 0; }
.tfa-recovery-codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.tfa-recovery-code {
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid #FDE68A;
  border-radius: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  text-align: center;
  color: var(--text-primary);
}

/* Dialog */
.tfa-dialog {
  border: none;
  border-radius: 14px;
  padding: 0;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.tfa-dialog::backdrop { background: rgba(0,0,0,.4); }
.tfa-dialog-content { padding: 24px; }
.tfa-dialog-content h3 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.tfa-dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.tfa-dialog-status {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
}
.tfa-dialog-status--info { background: #EFF6FF; color: var(--brand-ink); }
.tfa-dialog-status--success { background: #F0FDF4; color: #16A34A; }
.tfa-dialog-status--error { background: #FEF2F2; color: #DC2626; }

/* 2FA Verify page (login) */
.tfa-verify-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}
.tfa-verify-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: var(--bg-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .15s;
  color: var(--text-secondary);
}
.tfa-verify-tab svg { width: 16px; height: 16px; }
.tfa-verify-tab:not(:last-child) { border-right: 1px solid var(--border); }
.tfa-verify-tab.active { background: var(--text-primary); color: white; }

.tfa-fido-prompt { text-align: center; padding: 12px 0; }
.tfa-fido-brands { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; }
.tfa-fido-or { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.tfa-keys-gallery {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--bg-surface-alt);
  border-radius: 10px;
}
.tfa-key-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.tfa-key-figure img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
}
.tfa-key-figure figcaption {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.tfa-trust-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.tfa-trust-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
}

/* Présence NFC — frise journalière */
.presence-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0 16px 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.presence-legend__swatch,
.presence-legend__mark {
  display: inline-block;
  width: 18px;
  height: 10px;
  margin-right: 6px;
  border-radius: 3px;
  vertical-align: middle;
}
.presence-legend__swatch--work { background: var(--color-primary); }
.presence-legend__swatch--open {
  background-color: #F97316;
  background-image: repeating-linear-gradient(
    -45deg,
    #F97316 0,
    #F97316 5px,
    #FFEDD5 5px,
    #FFEDD5 10px
  );
}
.presence-legend__mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--text-primary);
}
.presence-legend__mark--out { background: #fff; }
.presence-axis,
.presence-day {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 8px 16px;
  align-items: center;
  padding: 8px 16px;
}
.presence-axis {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border, #e5e7eb);
  font-size: 11px;
  color: var(--text-muted);
  min-height: 28px;
}
.presence-axis__track,
.presence-day__track {
  position: relative;
  height: 28px;
  background: var(--bg-surface-alt);
  border-radius: 6px;
}
.presence-axis__track { height: 18px; background: transparent; }
.presence-axis__tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.presence-days { padding-bottom: 16px; }
.presence-day {
  border-top: 1px solid var(--border, #eef0f2);
  align-items: start;
  grid-template-rows: auto auto;
}
.presence-day__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 6px;
}
.presence-day__who { font-weight: 600; font-size: 14px; }
.presence-day__mag { display: block; font-weight: 400; font-size: 12px; color: var(--text-secondary); }
.presence-day__date { font-size: 12px; color: var(--text-muted); text-transform: capitalize; }
.presence-day__total { font-size: 13px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.presence-day__track {
  height: 32px;
  margin-top: 8px;
}
.presence-day__block {
  position: absolute;
  top: 50%;
  height: 20px;
  transform: translateY(-50%);
  border-radius: 4px;
  min-width: 3px;
}
.presence-day__block--work { background: var(--color-primary); }
.presence-day__block--open {
  background-color: #F97316;
  background-image: repeating-linear-gradient(
    -45deg,
    #F97316 0,
    #F97316 5px,
    #FFEDD5 5px,
    #FFEDD5 10px
  );
}
.presence-day__scan {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: default;
  z-index: 1;
}
.presence-day__scan::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--text-primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #1B1B1B;
}
.presence-day__scan--out::after { background: #fff; }
.presence-day__scan-tip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 4px;
  padding: 2px 6px;
  background: #1B1B1B;
  color: #fff;
  font-size: 11px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 3;
}
.presence-day__scan:hover .presence-day__scan-tip { display: block; }
.presence-day__stamps {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  padding-bottom: 6px;
}
@media (max-width: 800px) {
  .presence-axis,
  .presence-day {
    grid-template-columns: 1fr;
  }
  .presence-day__stamps { grid-column: 1; }
}


