/* SocialHub - Styles principaux
   Direction : Suite premium pour agences. Sidebar charbon, contenu crème,
   accents terracotta. Typographie Bricolage Grotesque + Manrope. */

:root {
  /* Couleurs */
  --bg-app:        #F5F1EA;
  --bg-content:    #FAF7F2;
  --bg-card:       #FFFFFF;
  --bg-sidebar:    #0F1419;
  --bg-sidebar-2:  #1A2028;

  --ink:           #1A1D24;
  --ink-soft:      #4A5260;
  --ink-muted:     #8A8F99;
  --ink-line:      #E8E3D9;

  --accent:        #D4644A;
  --accent-deep:   #B14E36;
  --accent-soft:   #FDEEE8;
  --gold:          #C8965A;
  --teal:          #3B7068;
  --rose:          #C8506E;
  --slate:         #4A5260;

  --ok:            #2E7D5B;
  --warn:          #C8965A;
  --err:           #B14E36;

  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     16px;

  --shadow-sm:     0 1px 2px rgba(15, 20, 25, 0.04);
  --shadow:        0 2px 8px rgba(15, 20, 25, 0.06), 0 1px 2px rgba(15, 20, 25, 0.04);
  --shadow-lg:     0 12px 32px rgba(15, 20, 25, 0.12);

  --font-display:  'Bricolage Grotesque', Georgia, serif;
  --font-body:     'Manrope', -apple-system, system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg-app);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent-deep); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; color: var(--ink); margin: 0; letter-spacing: -0.01em; }

/* ============ LAYOUT ============ */
.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-sidebar);
  color: #C8CDD6;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  border-radius: 8px;
  display: grid; place-items: center;
  color: white;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 18px;
  color: white;
  display: block;
  letter-spacing: -0.02em;
}
.brand-text small { font-size: 11px; color: #6E7686; }

.sidebar__nav { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 8px 0; }
.sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #B4BAC5;
  font-size: 13.5px;
  font-weight: 500;
  transition: all .15s ease;
  position: relative;
}
.sidebar__nav a:hover {
  background: rgba(255,255,255,0.04);
  color: white;
}
.sidebar__nav a.is-active {
  background: var(--bg-sidebar-2);
  color: white;
}
.sidebar__nav a.is-active::before {
  content: ''; position: absolute; left: -16px; top: 8px; bottom: 8px;
  width: 3px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-icon {
  width: 20px; display: inline-flex; justify-content: center;
  color: #6E7686; font-size: 14px;
}
.sidebar__nav a.is-active .nav-icon { color: var(--accent); }
.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 18px; text-align: center;
}
.sidebar__section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #5A6170;
  font-weight: 600;
  padding: 24px 14px 10px;
}

.sidebar__user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: var(--bg-sidebar-2);
  border-radius: 10px;
  margin-top: 16px;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--rose));
  color: white;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 14px;
}
.sidebar__user-info { flex: 1; min-width: 0; }
.sidebar__user-name { color: white; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__user-role { font-size: 11px; color: #8A8F99; }
.sidebar__user-logout {
  color: #8A8F99;
  font-size: 16px;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 6px;
}
.sidebar__user-logout:hover { background: rgba(255,255,255,0.06); color: var(--accent); }

.main { background: var(--bg-content); min-height: 100vh; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 32px;
  background: var(--bg-content);
  border-bottom: 1px solid var(--ink-line);
  position: sticky; top: 0; z-index: 10;
}
.page-title { font-size: 28px; line-height: 1.1; }
.page-subtitle { color: var(--ink-muted); font-size: 13px; margin-top: 4px; }
.topbar__right { display: flex; align-items: center; gap: 12px; }
.client-switcher { display: flex; align-items: center; gap: 8px; }
.client-switcher label { color: var(--ink-muted); font-size: 12px; }
.client-switcher select, .select, input[type="text"], input[type="email"], input[type="password"], input[type="datetime-local"], textarea, select {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.content { padding: 28px 32px 60px; }

/* ============ FLASH ============ */
.flash-stack { padding: 16px 32px 0; display: flex; flex-direction: column; gap: 8px; }
.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
}
.flash--success { background: #DCEEDE; color: #1F5C42; border: 1px solid #B5DCC0; }
.flash--error   { background: #F8DDD4; color: #7E2A1A; border: 1px solid #EFBFAE; }
.flash--info    { background: #E1EAF0; color: #1F3A4F; border: 1px solid #BFD3E0; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: white;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--primary { background: var(--ink); color: white; }
.btn--primary:hover { background: #2B3340; color: white; }
.btn--accent { background: var(--accent); color: white; }
.btn--accent:hover { background: var(--accent-deep); color: white; }
.btn--ghost { background: transparent; border-color: var(--ink-line); color: var(--ink-soft); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--danger { background: var(--err); color: white; }
.btn--sm { padding: 6px 12px; font-size: 12px; }
.btn--icon { padding: 8px; }

/* ============ CARDS ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card__header {
  display: flex; align-items: center; justify-content: space-between;
  margin: -20px -20px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ink-line);
}
.card__header h2, .card__header h3 { font-size: 16px; }
.card__title { font-family: var(--font-display); font-size: 15px; font-weight: 600; }

/* ============ STATS GRID (dashboard) ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card__label { font-size: 12px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.stat-card__value { font-family: var(--font-display); font-size: 32px; font-weight: 600; margin: 8px 0 4px; letter-spacing: -0.02em; }
.stat-card__trend { font-size: 12px; font-weight: 600; }
.stat-card__trend.up { color: var(--ok); }
.stat-card__trend.down { color: var(--err); }
.stat-card__decor {
  position: absolute; top: -20px; right: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--accent-soft); opacity: .6;
}

/* ============ TABLES ============ */
.table-wrap { background: var(--bg-card); border: 1px solid var(--ink-line); border-radius: var(--radius); overflow: hidden; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 14px 16px; text-align: left; font-size: 13px; }
table.data thead th {
  background: #F8F4ED;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--ink-line);
}
table.data tbody tr { border-bottom: 1px solid var(--ink-line); }
table.data tbody tr:last-child { border-bottom: none; }
table.data tbody tr:hover { background: #FBFAF6; }

/* ============ BADGES ============ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge--draft           { background: #EFEAE0; color: #6B5F45; }
.badge--pending-review  { background: #FCF0DA; color: #8C6418; }
.badge--pending-client  { background: #FAE0E6; color: #9C2E47; }
.badge--scheduled       { background: #DDE7F3; color: #2A4D7D; }
.badge--published       { background: #DCEEDE; color: #1F5C42; }
.badge--failed          { background: #F8DDD4; color: #7E2A1A; }
.badge--rejected        { background: #F8DDD4; color: #7E2A1A; }

/* ============ PLATFORM ICONS ============ */
.platform-icon {
  display: inline-grid; place-items: center;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  font-family: var(--font-body);
  text-transform: lowercase;
  letter-spacing: -0.02em;
  line-height: 1;
}
.platform-icons { display: inline-flex; gap: -4px; }
.platform-icons .platform-icon { margin-right: -6px; border: 2px solid var(--bg-card); }

/* ============ CALENDAR ============ */
.calendar-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}
.calendar-toolbar h2 {
  font-size: 22px;
  font-family: var(--font-display);
  text-transform: capitalize;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: 100%;
  table-layout: fixed;
  background: var(--bg-card);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.calendar-day-header {
  padding: 12px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  background: #F8F4ED;
  border-bottom: 1px solid var(--ink-line);
}
.calendar-cell {
  min-height: 130px;
  min-width: 0;
  overflow: hidden;
  padding: 8px;
  border-right: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  background: var(--bg-card);
  position: relative;
  cursor: pointer;
  transition: background .12s;
}
.calendar-cell:nth-child(7n+7) { border-right: none; }
.calendar-cell:hover { background: #FBFAF6; }
.calendar-cell.is-other-month { background: #F5F1EA; opacity: 0.55; }
.calendar-cell.is-today .day-number {
  background: var(--accent);
  color: white;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-grid; place-items: center;
}
.day-number { font-size: 13px; font-weight: 600; color: var(--ink); }
.cal-event {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.cal-event:hover { background: var(--accent); color: white; }
.cal-event.is-scheduled { background: #DDE7F3; border-color: #2A4D7D; }
.cal-event.is-published { background: #DCEEDE; border-color: #1F5C42; }
.cal-event.is-draft     { background: #EFEAE0; border-color: #6B5F45; }
.cal-event.is-pending_review { background: #FCF0DA; border-color: #8C6418; }
.cal-event.is-pending_client { background: #FAE0E6; border-color: #9C2E47; }

/* ============ FORMS ============ */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { font-size: 12px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.form-field input, .form-field textarea, .form-field select { width: 100%; }
.form-field textarea { min-height: 120px; resize: vertical; font-family: var(--font-body); }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--ink-line); }

/* Checkbox grid for accounts */
.account-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.account-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  transition: all .15s;
}
.account-pick input { display: none; }
.account-pick:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}
.account-pick__info { flex: 1; min-width: 0; }
.account-pick__name { font-size: 12px; font-weight: 600; }
.account-pick__handle { font-size: 11px; color: var(--ink-muted); }

/* ============ LOGIN ============ */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  background: var(--bg-app);
}
.login-hero {
  background: var(--bg-sidebar);
  color: white;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(212, 100, 74, 0.2), transparent 60%),
              radial-gradient(ellipse at bottom left, rgba(200, 150, 90, 0.15), transparent 50%);
}
.login-hero > * { position: relative; z-index: 1; }
.login-hero .brand-text strong { font-size: 24px; }
.login-hero__tagline { max-width: 480px; }
.login-hero__tagline h1 {
  font-size: 44px;
  color: white;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.login-hero__tagline h1 em { font-style: italic; color: var(--accent); font-family: var(--font-display); }
.login-hero__tagline p { color: #B4BAC5; font-size: 15px; line-height: 1.6; margin-top: 16px; }
.login-hero__platforms { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 32px; }
.login-hero__platforms .platform-icon { opacity: 0.8; }

.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 40px;
}
.login-form {
  width: 100%;
  max-width: 380px;
}
.login-form h2 { font-size: 30px; margin-bottom: 8px; }
.login-form p.intro { color: var(--ink-muted); margin-bottom: 28px; }
.login-form .form-field input { padding: 12px 14px; font-size: 14px; }
.login-form .btn { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }
.login-demo {
  margin-top: 24px;
  padding: 16px;
  background: #FCF8F0;
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--ink-soft);
}
.login-demo strong { color: var(--ink); }
.login-demo code { font-family: var(--font-mono); background: white; padding: 2px 6px; border-radius: 3px; }

/* ============ INBOX ============ */
.inbox-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 20px; }
.message-list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 220px); overflow-y: auto; padding-right: 6px; }
.message-item {
  background: var(--bg-card);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.message-item:hover { border-color: var(--accent); }
.message-item.is-priority { border-left: 4px solid var(--accent); }
.message-item__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.message-item__sender { font-weight: 600; font-size: 13px; }
.message-item__handle { color: var(--ink-muted); font-size: 12px; }
.message-item__time { margin-left: auto; font-size: 11px; color: var(--ink-muted); }
.message-item__body { font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.message-item__footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.message-detail { background: var(--bg-card); border: 1px solid var(--ink-line); border-radius: var(--radius); padding: 24px; min-height: 400px; }
.reply-area textarea { width: 100%; min-height: 100px; }
.saved-replies-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.chip {
  background: #F5F1EA; border: 1px solid var(--ink-line);
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 500; cursor: pointer;
}
.chip:hover { background: var(--accent-soft); border-color: var(--accent); }

/* ============ ANALYTICS ============ */
.chart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px; }
.chart-box { background: var(--bg-card); border: 1px solid var(--ink-line); border-radius: var(--radius); padding: 20px; }
.chart-box h3 { font-size: 14px; margin-bottom: 12px; }

/* ============ MISC ============ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-muted); }
.empty-state h3 { color: var(--ink); margin-bottom: 8px; font-size: 18px; }
.divider { height: 1px; background: var(--ink-line); margin: 24px 0; }

.tag {
  display: inline-block; font-size: 11px; padding: 2px 8px;
  border-radius: 4px; background: #F5F1EA; color: var(--ink-soft);
  font-weight: 500;
}

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar select, .toolbar input { font-size: 12px; }

.kbd { font-family: var(--font-mono); font-size: 11px; background: #F5F1EA; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--ink-line); }

/* Share link box */
.share-box {
  background: linear-gradient(135deg, #FCF8F0 0%, #F8F1E5 100%);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px;
}
.share-box code {
  display: block; font-family: var(--font-mono); font-size: 11px;
  background: white; padding: 8px 10px; border-radius: 4px;
  border: 1px solid var(--ink-line); margin-top: 8px;
  word-break: break-all;
}

/* ─── Grid layouts ──────────────────────────────────────────── */
.grid { display: grid; gap: 24px; }
.grid--2col { grid-template-columns: 1fr 1fr; }
.grid--3col { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .grid--2col, .grid--3col { grid-template-columns: 1fr; }
}

/* ─── User cell (avatar + name) ──────────────────────────────── */
.user-cell { display: flex; align-items: center; gap: 12px; }
.user-cell strong { display: block; line-height: 1.2; }
.user-cell small { color: var(--ink-mute); font-size: 12px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2, var(--gold)));
  color: white; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
  font-family: var(--font-display, var(--font-sans));
}
.avatar--img { object-fit: cover; }

/* ─── Modal ──────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 1000; display: none !important;
  align-items: center; justify-content: center;
}
.modal.is-open { display: flex !important; }
.modal__overlay {
  position: absolute; inset: 0;
  background: rgba(15, 20, 25, 0.55);
  backdrop-filter: blur(4px);
}
.modal__content {
  position: relative; background: var(--bg-card); border-radius: var(--radius);
  padding: 0; width: 90%; max-width: 480px;
  box-shadow: 0 24px 60px rgba(15, 20, 25, 0.25);
  border: 1px solid var(--ink-line);
  overflow: hidden;
}
.modal__head {
  padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--ink-line);
}
.modal__head h3 { margin: 0; font-family: var(--font-display, var(--font-sans)); }
.modal__close {
  background: transparent; border: none; font-size: 28px; line-height: 1;
  cursor: pointer; color: var(--ink-mute); padding: 0; width: 32px; height: 32px;
}
.modal__close:hover { color: var(--ink); }
.modal__content .form { padding: 24px; }

/* ─── Form variants ──────────────────────────────────────────── */
.form--inline {
  display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap;
}
.form--inline select, .form--inline input { flex: 1; min-width: 140px; }
.form__hint { color: var(--ink-mute); font-size: 12px; margin-top: 4px; display: block; }

/* ─── Permissions / Roles grid ───────────────────────────────── */
.permissions-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.roles-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.role-card {
  border: 1px solid var(--ink-line); border-radius: var(--radius);
  padding: 16px; background: var(--bg);
}
.role-card h4 {
  margin: 0 0 10px; font-family: var(--font-display, var(--font-sans));
  font-size: 15px; color: var(--ink);
}

/* ─── Row muted (deactivated user) ──────────────────────────── */
.row--muted { opacity: 0.55; }
.table--compact th, .table--compact td { padding: 8px 12px; font-size: 13px; }

/* ─── Text utilities ─────────────────────────────────────────── */
.text--right { text-align: right; }
.text--center { text-align: center; }
.text--muted { color: var(--ink-mute); }
.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }
.link--small { font-size: 12px; }

/* ─── Approval page (public, redesigned) ────────────────────── */
.approval-page {
  max-width: none; margin: 0; padding: 0;
  background: var(--bg, #FAF7F2); min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink, #2A2D32);
}
.approval-page--error {
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.approval-error {
  max-width: 480px; text-align: center; background: white;
  padding: 48px 32px; border-radius: var(--radius);
  border: 1px solid var(--ink-line);
}
.approval-error__icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--err, #C03B3B); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; margin: 0 auto 16px;
}

.approval-header {
  background: var(--sidebar-bg, #0F1419); color: white;
  padding: 32px 0; margin: 0; display: block; border: none;
}
.approval-header__inner {
  max-width: 920px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.approval-header__brand { display: flex; align-items: center; gap: 16px; }
.approval-header__brand small {
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,.55); display: block; margin-bottom: 4px;
}
.approval-header__brand h1 {
  margin: 0; font-family: var(--font-display, var(--font-sans));
  font-size: 28px; font-weight: 700; color: white;
}
.approval-header__logo {
  width: 56px; height: 56px; border-radius: 12px; object-fit: cover;
  background: white;
}
.approval-header__monogram {
  width: 56px; height: 56px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent, #D4644A), var(--gold, #C9A961));
  color: white; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display, serif); font-size: 28px; font-weight: 700;
}
.approval-header__meta { text-align: right; }
.approval-header__meta small {
  display: block; margin-top: 8px; color: rgba(255,255,255,.45); font-size: 11px;
}
.approval-pill {
  display: inline-block; padding: 8px 14px; border-radius: 100px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  font-size: 13px; color: white;
}
.approval-pill strong { color: var(--gold, #C9A961); margin-right: 4px; }

.approval-main {
  max-width: 920px; margin: 0 auto; padding: 40px 24px 80px;
}
.approval-intro {
  margin-bottom: 32px;
}
.approval-intro h2 {
  font-family: var(--font-display, var(--font-sans));
  font-size: 24px; margin: 0 0 8px;
}
.approval-intro p {
  color: var(--ink-mute); line-height: 1.6; max-width: 640px;
}

.approval-empty {
  background: white; border: 1px solid var(--ink-line);
  border-radius: var(--radius); padding: 48px 32px; text-align: center;
}
.approval-empty__icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--ok, #4A8B5C); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; margin: 0 auto 16px;
}

.approval-card {
  background: white; border: 1px solid var(--ink-line);
  border-radius: var(--radius); padding: 0; margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(15,20,25,.04);
  overflow: hidden;
}
.approval-card__head {
  padding: 16px 24px; border-bottom: 1px solid var(--ink-line);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg, #FAF7F2);
}
.approval-card__platforms { display: flex; align-items: center; gap: 8px; }
.approval-card__when {
  margin-left: 8px; font-size: 13px; color: var(--ink-mute);
  text-transform: capitalize;
}
.approval-card__body { padding: 24px; }
.approval-card__title {
  margin: 0 0 12px; font-family: var(--font-display, var(--font-sans));
  font-size: 18px;
}
.approval-card__content {
  line-height: 1.6; color: var(--ink); white-space: pre-wrap;
  font-size: 15px;
}
.approval-card__media {
  margin-top: 16px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--ink-line);
}
.approval-card__media img { display: block; width: 100%; height: auto; }

.approval-card__accounts {
  margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--ink-line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.approval-card__accounts small {
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-mute); margin-right: 4px;
}
.approval-account {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; background: var(--bg); border-radius: 100px;
  font-size: 12px;
}

.approval-thread {
  padding: 16px 24px; background: var(--bg);
  border-top: 1px solid var(--ink-line);
}
.approval-thread h4 {
  margin: 0 0 12px; font-size: 12px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--ink-mute);
}
.approval-comment {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--ink-line);
}
.approval-comment:last-child { border-bottom: none; }
.approval-comment__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent, #D4644A); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.approval-comment__body { flex: 1; }
.approval-comment__head {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px;
}
.approval-comment__head small { color: var(--ink-mute); font-size: 11px; }
.approval-comment__body p { margin: 0; line-height: 1.5; white-space: pre-wrap; }

.approval-decision {
  padding: 20px 24px; background: linear-gradient(180deg, var(--bg) 0%, white 100%);
  border-top: 1px solid var(--ink-line); display: block; margin: 0;
}
.approval-decision__form { display: block; }
.approval-decision__row {
  display: grid; grid-template-columns: 220px 1fr; gap: 10px; margin-bottom: 12px;
}
.approval-decision__row input,
.approval-decision__row textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--ink-line);
  border-radius: 6px; font-family: inherit; font-size: 14px;
  background: white;
}
.approval-decision__row textarea { resize: vertical; min-height: 44px; }
.approval-decision__actions {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
}
@media (max-width: 720px) {
  .approval-decision__row { grid-template-columns: 1fr; }
  .approval-decision__actions { justify-content: stretch; }
  .approval-decision__actions .btn { flex: 1; }
}

.approval-status {
  padding: 14px 24px; font-size: 13px; font-weight: 600;
  border-top: 1px solid var(--ink-line);
}
.approval-status--approved {
  background: rgba(74, 139, 92, .08); color: var(--ok, #4A8B5C);
}
.approval-status--rejected {
  background: rgba(192, 59, 59, .06); color: var(--err, #C03B3B);
}
.approval-status--published {
  background: var(--bg); color: var(--ink-mute);
}

.approval-footer {
  text-align: center; padding: 32px 24px;
  border-top: 1px solid var(--ink-line); background: white;
  color: var(--ink-mute); font-size: 13px;
}
.approval-footer p { margin: 4px 0; }

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .login-page { grid-template-columns: 1fr; }
  .login-hero { padding: 32px; min-height: 280px; }
  .login-hero__tagline h1 { font-size: 28px; }
  .inbox-layout, .chart-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPOSANTS SAAS PARTAGÉS
   Utilisés par : clients.php, team.php, et toute nouvelle page
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Formulaires inline — clients.php (.cf), team.php (.tf), générique (.pg-form) */
.pg-form, .cf, .tf { display: flex; flex-direction: column; gap: 16px; }
.pg-row, .cf-row, .tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pg-field, .cf-field, .tf-field { display: flex; flex-direction: column; gap: 5px; }
.pg-field label, .cf-field label, .tf-field label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft);
}
.pg-field input, .cf-field input, .tf-field input,
.pg-field textarea, .cf-field textarea, .tf-field textarea,
.pg-field select, .cf-field select, .tf-field select { width: 100%; }
.pg-field .hint, .cf-field .hint, .tf-field .hint { font-size: 11px; color: var(--ink-muted); margin-top: 2px; }

/* ── KPI Bar ─────────────────────────────────────────────────────────────── */
.kpi-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--ink-line);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.kpi-cell { background: var(--bg-card); padding: 18px 20px; }
.kpi-cell__val {
  font-family: var(--font-display); font-size: 26px; font-weight: 700;
  color: var(--ink); line-height: 1;
}
.kpi-cell__val.warn { color: var(--err); }
.kpi-cell__lbl {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-muted); font-weight: 600; margin-top: 5px;
}

/* ── Toolbar de liste (recherche + actions) ──────────────────────────────── */
.list-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.list-toolbar .search-wrap { flex: 1; max-width: 320px; position: relative; }
.list-toolbar .search-wrap svg {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%); color: var(--ink-muted); pointer-events: none;
}
.list-toolbar .search-wrap input { width: 100%; padding-left: 34px; }

/* ── Barre d'onglets (Tabs) ──────────────────────────────────────────────── */
.tabs-bar {
  display: flex; gap: 2px;
  background: var(--bg-card); border: 1px solid var(--ink-line);
  border-radius: var(--radius); padding: 5px; margin-bottom: 24px;
}
.tab-btn {
  flex: 1; padding: 9px 14px;
  background: none; border: none; border-radius: 7px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  color: var(--ink-muted); cursor: pointer; transition: all .15s;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  text-decoration: none;
}
.tab-btn:hover { color: var(--ink); background: var(--bg-app); }
.tab-btn.is-active { background: var(--ink); color: white; }
.tab-btn .tab-count {
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep);
}
.tab-btn.is-active .tab-count { background: rgba(255,255,255,.2); color: white; }

/* ── Section card (contenu d'onglet) ─────────────────────────────────────── */
.s-card {
  background: var(--bg-card); border: 1px solid var(--ink-line);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 20px;
}
.s-card__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--ink-line); background: #FAFAF7;
}
.s-card__head h4 {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-soft);
}
.s-card__body { padding: 20px; }

/* ── Zone de danger ──────────────────────────────────────────────────────── */
.danger-box {
  border: 1px solid #EFBFAE; border-radius: var(--radius);
  padding: 18px; background: #FEF4F0;
}
.danger-box__title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--err); margin-bottom: 6px;
}
.danger-box p { font-size: 12px; color: #7E2A1A; margin: 0 0 14px; line-height: 1.5; }

/* ── Modal amélioré ──────────────────────────────────────────────────────── */
.modal-body { padding: 24px; }
.modal-foot {
  padding: 14px 24px; background: #FAFAF7;
  border-top: 1px solid var(--ink-line);
  display: flex; justify-content: flex-end; gap: 10px;
}
.modal-head {
  padding: 18px 24px; border-bottom: 1px solid var(--ink-line);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { font-size: 16px; }

/* ── Empty state amélioré ────────────────────────────────────────────────── */
.pg-empty {
  text-align: center; padding: 72px 32px; color: var(--ink-muted);
}
.pg-empty__icon {
  width: 64px; height: 64px; background: var(--accent-soft);
  border-radius: 16px; display: grid; place-items: center;
  margin: 0 auto 18px; font-size: 28px;
}
.pg-empty h3 { font-size: 17px; color: var(--ink); margin-bottom: 8px; }
.pg-empty p  { font-size: 13px; margin: 0 0 20px; }

/* ── Lien partage ────────────────────────────────────────────────────────── */
.share-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-app); border: 1px solid var(--ink-line);
  border-radius: var(--radius-sm); padding: 9px 12px; margin-bottom: 10px;
}
.share-row input {
  flex: 1; border: none; background: none;
  font-size: 12px; color: var(--ink-soft);
  font-family: var(--font-mono); min-width: 0; padding: 0;
}
.share-row input:focus { outline: none; box-shadow: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE CLIENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Table clients */
.clients-table-wrap {
  background: var(--bg-card); border: 1px solid var(--ink-line);
  border-radius: var(--radius); overflow: hidden;
}
table.clients-tbl { width: 100%; border-collapse: collapse; }
table.clients-tbl thead th {
  padding: 11px 16px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .08em; font-weight: 700; color: var(--ink-muted);
  background: #F8F4ED; border-bottom: 1px solid var(--ink-line); text-align: left;
}
table.clients-tbl tbody tr { border-bottom: 1px solid var(--ink-line); transition: background .12s; }
table.clients-tbl tbody tr:last-child { border-bottom: none; }
table.clients-tbl tbody tr:hover { background: #FAFAF6; }
table.clients-tbl td { padding: 14px 16px; font-size: 13px; vertical-align: middle; }
table.clients-tbl td.td-num {
  font-family: var(--font-display); font-size: 15px;
  font-weight: 600; color: var(--ink); text-align: center;
}
table.clients-tbl td.td-actions { text-align: right; white-space: nowrap; }

/* Identité client */
.cl-ident { display: flex; align-items: center; gap: 12px; }
.cl-av {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  color: white; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
}
.cl-av img { width: 100%; height: 100%; object-fit: cover; }
.cl-name  { font-weight: 600; font-size: 13px; color: var(--ink); }
.cl-slug  { font-size: 11px; color: var(--ink-muted); font-family: var(--font-mono); margin-top: 2px; }

/* Badges spéciaux */
.pending-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--err);
  background: #FEF4F0; border: 1px solid #EFBFAE;
  padding: 3px 9px; border-radius: 999px; text-decoration: none;
}
.pending-link:hover { background: #F8DDD4; color: var(--err); }
.mode-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--ink-muted);
  background: var(--bg-app); border: 1px solid var(--ink-line);
  padding: 3px 8px; border-radius: 6px;
}

/* Header client (page édition) */
.client-strip {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--ink-line);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 24px;
}
.client-strip .cl-av { width: 52px; height: 52px; font-size: 22px; border-radius: 13px; flex-shrink: 0; }
.client-strip__name { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.client-strip__slug { font-size: 12px; color: var(--ink-muted); font-family: var(--font-mono); margin-top: 3px; }
.client-strip__kpis { display: flex; gap: 28px; margin-left: auto; }
.csk { text-align: center; }
.csk__v { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1; }
.csk__l { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); font-weight: 600; margin-top: 3px; }

/* Radios mode de validation */
.amode { display: flex; flex-direction: column; gap: 8px; }
.amode-opt {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 15px; border: 2px solid var(--ink-line);
  border-radius: var(--radius); cursor: pointer; transition: all .15s;
}
.amode-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.amode-opt input { margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.amode-opt__title { font-size: 13px; font-weight: 600; color: var(--ink); }
.amode-opt__desc  { font-size: 11px; color: var(--ink-muted); margin-top: 3px; line-height: 1.4; }

/* Contacts */
table.contacts-tbl { width: 100%; border-collapse: collapse; }
table.contacts-tbl thead th {
  padding: 10px 14px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-muted); background: #F8F4ED;
  border-bottom: 1px solid var(--ink-line); text-align: left;
}
table.contacts-tbl td { padding: 13px 14px; font-size: 13px; border-bottom: 1px solid var(--ink-line); vertical-align: middle; }
table.contacts-tbl tr:last-child td { border-bottom: none; }
table.contacts-tbl tr:hover td { background: #FAFAF6; }
.c-ident { display: flex; align-items: center; gap: 10px; }
.c-av {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--teal), #4A8B5C);
  color: white; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.c-av.is-approver { background: linear-gradient(135deg, var(--ok), var(--teal)); }
.approver-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; background: #DCEEDE; color: #1F5C42;
  border: none; cursor: pointer;
}
.approver-pill:hover { background: #CCEADC; }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE TEAM (ÉQUIPE)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Table équipe */
.team-table-wrap {
  background: var(--bg-card); border: 1px solid var(--ink-line);
  border-radius: var(--radius); overflow: hidden;
}
table.team-tbl { width: 100%; border-collapse: collapse; }
table.team-tbl thead th {
  padding: 11px 16px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .08em; font-weight: 700; color: var(--ink-muted);
  background: #F8F4ED; border-bottom: 1px solid var(--ink-line); text-align: left;
}
table.team-tbl tbody tr { border-bottom: 1px solid var(--ink-line); transition: background .12s; }
table.team-tbl tbody tr:last-child { border-bottom: none; }
table.team-tbl tbody tr:hover { background: #FAFAF6; }
table.team-tbl tbody tr.is-inactive { opacity: .55; }
table.team-tbl td { padding: 13px 16px; font-size: 13px; vertical-align: middle; }
table.team-tbl td.td-num {
  font-family: var(--font-display); font-size: 15px;
  font-weight: 600; color: var(--ink); text-align: center;
}
table.team-tbl td.td-actions { text-align: right; white-space: nowrap; }

/* Identité utilisateur */
.u-ident { display: flex; align-items: center; gap: 12px; }
.u-av {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--rose));
  color: white; display: grid; place-items: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.u-name  { font-weight: 600; font-size: 13px; color: var(--ink); }
.u-email { font-size: 11px; color: var(--ink-muted); margin-top: 2px; }

/* Pills de rôle */
.role-pill {
  font-size: 11px; font-weight: 600; text-transform: capitalize;
  padding: 3px 10px; border-radius: 999px;
  background: var(--bg-app); border: 1px solid var(--ink-line); color: var(--ink-soft);
}
.role-pill.super_admin { background: #1A1D24; color: white; border-color: #1A1D24; }
.role-pill.admin       { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent); }
.role-pill.manager     { background: #E8F0FD; color: #2A4D7D; border-color: #BFD3E0; }

/* Statut actif/inactif */
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.status-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status-dot.active::before   { background: var(--ok); }
.status-dot.inactive::before { background: var(--ink-muted); }

/* Matrice des rôles */
.roles-matrix {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; padding: 20px;
}
.role-tile {
  background: var(--bg-app); border: 1px solid var(--ink-line);
  border-radius: var(--radius); padding: 16px;
}
.role-tile__name { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.role-tile__perms { display: flex; flex-direction: column; gap: 5px; }
.perm-line { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-soft); }
.perm-line svg { color: var(--ok); flex-shrink: 0; }
.perm-line.all { font-weight: 700; color: var(--ok); }

/* Header utilisateur (edit) */
.user-strip {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--ink-line);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 24px;
}
.user-strip .u-av { width: 52px; height: 52px; font-size: 22px; flex-shrink: 0; }
.user-strip__name { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.user-strip__email { font-size: 12px; color: var(--ink-muted); margin-top: 3px; }
.user-strip__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* Ligne client assigné */
.client-assign-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--ink-line);
}
.client-assign-row:last-child { border-bottom: none; }
.ca-av {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  color: white; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.ca-name { font-size: 13px; font-weight: 600; color: var(--ink); flex: 1; }

/* Ligne membre équipe */
.team-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--ink-line);
}
.team-row:last-child { border-bottom: none; }
.team-row .av { width: 38px; height: 38px; flex-shrink: 0; }
.team-row__name  { font-size: 13px; font-weight: 600; color: var(--ink); }
.team-row__email { font-size: 11px; color: var(--ink-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   CALENDRIER — Améliorations
   ═══════════════════════════════════════════════════════════════════════════ */

/* Bouton + sur les cellules */
.calendar-add-btn {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: white;
  border: 0; font-size: 18px; font-weight: 600; line-height: 1;
  cursor: pointer; opacity: 0; transform: scale(.7);
  transition: opacity .15s, transform .15s, background .15s;
  display: flex; align-items: center; justify-content: center;
  padding: 0; box-shadow: 0 2px 6px rgba(0,0,0,.18); z-index: 2;
}
.calendar-cell:hover .calendar-add-btn { opacity: 1; transform: scale(1); }
.calendar-add-btn:hover { background: #B5573D; transform: scale(1.1) !important; }

.calendar-cell.is-past { background: #FAFAFA; opacity: .65; }
.calendar-cell.is-past .day-number { color: #B0B0B0; }

/* Événements enrichis */
.cal-event {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 7px; margin-top: 4px;
  border-radius: 5px; border-left: 3px solid #9CA3AF;
  background: #F3F4F6; color: #2A2D32;
  font-size: 11px; text-decoration: none; line-height: 1.3;
  transition: background .12s, transform .1s;
  overflow: hidden; width: 100%; box-sizing: border-box;
}
.cal-event:hover { transform: translateX(2px); filter: brightness(.96); color: inherit; }
.cal-event.is-draft          { border-left-color: #9CA3AF; background: #F3F4F6; color: #4B5563; }
.cal-event.is-pending_review { border-left-color: #F97316; background: #FFF4E6; color: #7C2D00; }
.cal-event.is-pending_client { border-left-color: #F97316; background: #FFF4E6; color: #7C2D00; }
.cal-event.is-scheduled      { border-left-color: #3B82F6; background: #EBF4FF; color: #1E3A5F; }
.cal-event.is-published      { border-left-color: #22C55E; background: #DCFCE7; color: #14532D; }
.cal-event.is-failed,
.cal-event.is-rejected       { border-left-color: #EF4444; background: #FEE7E7; color: #7F1D1D; }
.cal-event__icons { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
.cal-event__icon  {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  color: white; font-size: 8px; font-weight: 700;
}
.cal-event__time { font-weight: 600; color: #6B7280; flex-shrink: 0; font-size: 10px; }
.cal-event__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   PANEL PLEIN ÉCRAN (création publication depuis calendrier)
   ═══════════════════════════════════════════════════════════════════════════ */

.post-panel {
  position: fixed; inset: 0; z-index: 9999; display: none;
}
.post-panel__backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 14, 20, .6);
  backdrop-filter: blur(3px);
  animation: panel-fade .2s ease;
}
@keyframes panel-fade { from { opacity: 0 } to { opacity: 1 } }

.post-panel__sheet {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 82vw;
  background: white;
  box-shadow: -8px 0 40px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  animation: sheet-slide .22s cubic-bezier(.22,.68,0,1.2);
}
@keyframes sheet-slide {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.post-panel__iframe { flex: 1; width: 100%; border: none; }

/* Toast confirmation */
.panel-toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: var(--ok); color: white;
  padding: 12px 24px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  z-index: 10000; white-space: nowrap;
  animation: toast-in .2s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODE EMBED (post_edit.php chargé dans le panel)
   ═══════════════════════════════════════════════════════════════════════════ */

.embed-wrap { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.embed-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px 0 16px; height: 60px; flex-shrink: 0;
  background: #13161C;
  border-bottom: 1px solid rgba(255,255,255,.06);
  gap: 16px;
}
.embed-topbar h2 {
  font-size: 15px; font-family: var(--font-display);
  font-weight: 700; margin: 0; color: rgba(255,255,255,.92);
  letter-spacing: -0.01em;
}
.embed-topbar__meta {
  font-size: 11px; color: rgba(255,255,255,.35);
  display: flex; align-items: center; gap: 6px; margin-left: 4px;
}
.embed-topbar__meta svg { color: rgba(255,255,255,.25); }
.embed-body { flex: 1; overflow-y: auto; padding: 28px; background: #EFEBE4; }
.embed-close {
  width: 30px; height: 30px; border-radius: 7px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  display: grid; place-items: center; cursor: pointer;
  color: rgba(255,255,255,.45); transition: all .15s;
}
.embed-close:hover { background: rgba(255,255,255,.12); color: white; border-color: rgba(255,255,255,.2); }

/* ═══════════════════════════════════════════════════════════════════════════
   MODE IFRAME EMBED — masquer sidebar/topbar quand chargé dans un iframe
   ═══════════════════════════════════════════════════════════════════════════ */

/* Masquer sidebar & topbar (fallback JS qui ajoute is-embed-frame) */
html.is-embed-frame .sidebar  { display: none !important; }
html.is-embed-frame .tbar     { display: none !important; }
html.is-embed-frame .app      { grid-template-columns: 1fr !important; }
html.is-embed-frame .main     { background: #F2EFE9; min-height: 100vh; }
html.is-embed-frame .content  { padding: 0 !important; }
html.is-embed-frame .flash-stack { padding: 0 !important; }

/* Le nouveau layout embed (.ef) gère son propre design */

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE D'APPROBATION CLIENT (apc-*)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset page ── */
.apc-page {
  margin: 0; padding: 0;
  background: #F4F1EB;
  font-family: var(--font-body);
  color: var(--ink);
  min-height: 100vh;
}

/* ── Header ── */
.apc-header {
  position: sticky; top: 0; z-index: 100;
  background: #0D1117;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 64px;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.apc-header__left { display: flex; align-items: center; gap: 14px; }
.apc-header__logo {
  width: 38px; height: 38px; border-radius: 9px; object-fit: cover;
}
.apc-header__mono {
  width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  color: white; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
}
.apc-header__info { display: flex; flex-direction: column; gap: 1px; }
.apc-header__eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.4); font-weight: 600; }
.apc-header__client  { font-size: 15px; font-weight: 700; color: white; font-family: var(--font-display); }
.apc-header__right   { display: flex; align-items: center; gap: 10px; }

.apc-counter-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 100px;
  background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.25);
  color: #4ADE80; font-size: 12px; font-weight: 700;
}
.apc-counter-pill__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ADE80;
  animation: apc-pulse 2s infinite;
}
@keyframes apc-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(.7); }
}
.apc-counter-pill--done {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1);
  color: rgba(255,255,255,.5);
}

/* ── Hero ── */
.apc-hero {
  background: #0D1117;
  padding: 48px 32px 56px;
  text-align: center;
}
.apc-hero__inner { max-width: 640px; margin: 0 auto; }
.apc-hero__greeting { font-size: 14px; color: rgba(255,255,255,.55); margin: 0 0 10px; }
.apc-hero__title {
  font-family: var(--font-display); font-size: clamp(24px,4vw,38px);
  font-weight: 800; color: white; margin: 0 0 12px; line-height: 1.15;
}
.apc-hero__sub { font-size: 14px; color: rgba(255,255,255,.5); margin: 0 0 28px; }
.apc-hero__stats { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.apc-stat { text-align: center; }
.apc-stat__v { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: white; display: block; }
.apc-stat__l { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.4); font-weight: 600; }

/* ── Flash ── */
.apc-flash {
  max-width: 860px; margin: 20px auto 0; padding: 12px 20px;
  border-radius: 8px; font-size: 13px; font-weight: 500;
}
.apc-flash--success { background: #DCEEDE; color: #1F5C42; border: 1px solid #B5DCC0; }
.apc-flash--error   { background: #F8DDD4; color: #7E2A1A; border: 1px solid #EFBFAE; }

/* ── Cards container ── */
.apc-cards { max-width: 1100px; margin: 0 auto; padding: 32px 24px 80px; display: flex; flex-direction: column; gap: 28px; }
.apc-empty { text-align: center; padding: 80px 24px; color: rgba(255,255,255,.4); }

/* ── Card ── */
.apc-card {
  background: #fff; border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
  border: 1px solid #E8E3D9;
}

/* Top strip */
.apc-card__strip {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; border-bottom: 1px solid #E8E3D9;
  background: #FAFAF7;
}
.apc-card__strip-left { display: flex; align-items: center; gap: 10px; }
.apc-platicons { display: flex; align-items: center; gap: 4px; }
.apc-card__date {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ink-muted); font-weight: 500;
}
.apc-badge {
  display: inline-flex; align-items: center;
  padding: 4px 11px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
}
.apc-badge--pending_client { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.apc-badge--scheduled      { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.apc-badge--rejected       { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.apc-badge--published      { background: #EDE9FE; color: #5B21B6; border: 1px solid #DDD6FE; }

/* Split body */
.apc-card__body {
  display: grid;
  grid-template-columns: 1fr 360px;
}

/* LEFT — Preview */
.apc-card__preview {
  padding: 24px;
  border-right: 1px solid #E8E3D9;
  min-width: 0;
}
.apc-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.apc-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 100px;
  border: 1px solid #E8E3D9; background: #F5F1EA;
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  color: var(--ink-muted); cursor: pointer; transition: all .15s;
}
.apc-tab:hover { border-color: var(--accent); color: var(--accent); }
.apc-tab.is-active { background: var(--ink); color: white; border-color: var(--ink); }
.apc-tab__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.apc-preview-box {
  background: #F4F1EB; border-radius: 10px;
  min-height: 200px; overflow: hidden;
}
.apc-preview-loading {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 40px; color: var(--ink-muted); font-size: 13px;
}
.apc-spin { animation: apc-spin .8s linear infinite; }
@keyframes apc-spin { to { transform: rotate(360deg); } }

.apc-text-content { font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.apc-media-wrap { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.apc-card__dest { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.apc-card__dest-lbl { font-size: 11px; color: var(--ink-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.apc-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px;
  background: #F0EDE6; border: 1px solid #E8E3D9;
  font-size: 11px; font-weight: 600; color: var(--ink-soft);
}

/* RIGHT — Action */
.apc-card__action {
  background: #0D1117;
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  min-width: 0;
}
.apc-action__counter { font-size: 11px; color: rgba(255,255,255,.35); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }

.apc-action__validators { background: rgba(255,255,255,.04); border-radius: 10px; padding: 14px; }
.apc-action__validators-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: rgba(255,255,255,.4); font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px;
}
.apc-validator {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 13px; color: rgba(255,255,255,.7);
}
.apc-validator:last-child { border-bottom: none; }
.apc-validator__av {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.apc-validator__dec { margin-left: auto; font-size: 14px; }
.apc-validator--approved .apc-validator__dec { color: #4ADE80; }
.apc-validator--rejected .apc-validator__dec { color: #F87171; }
.apc-validator--wait     .apc-validator__dec { color: rgba(255,255,255,.25); }

.apc-action__form { display: flex; flex-direction: column; gap: 10px; }

.apc-btn-approve {
  width: 100%; padding: 16px; border: none; cursor: pointer;
  border-radius: 10px; font-family: var(--font-body); font-size: 16px; font-weight: 700;
  background: #22C55E; color: white;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 0 0 0 rgba(34,197,94,.4); transition: all .2s;
}
.apc-btn-approve:hover { background: #16A34A; box-shadow: 0 0 0 4px rgba(34,197,94,.25); transform: translateY(-1px); }

.apc-action__sep {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.25); font-size: 12px;
}
.apc-action__sep::before, .apc-action__sep::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.1);
}

.apc-field { display: flex; flex-direction: column; gap: 6px; }
.apc-field__label { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .06em; }
.apc-field__label span { color: #F87171; }
.apc-field__opt { font-weight: 400; color: rgba(255,255,255,.3); text-transform: none; letter-spacing: 0; }
.apc-field input, .apc-field textarea {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; padding: 10px 12px;
  color: white; font-family: var(--font-body); font-size: 13px;
  transition: border-color .15s; resize: vertical;
}
.apc-field input::placeholder, .apc-field textarea::placeholder { color: rgba(255,255,255,.25); }
.apc-field input:focus, .apc-field textarea:focus {
  outline: none; border-color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.1);
}
.apc-field textarea.is-error { border-color: #F87171; }

.apc-action__two-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.apc-btn-ok {
  padding: 10px 8px; border-radius: 8px; border: none; cursor: pointer;
  background: rgba(34,197,94,.15); color: #4ADE80; border: 1px solid rgba(34,197,94,.25);
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .15s;
}
.apc-btn-ok:hover { background: rgba(34,197,94,.25); }

.apc-btn-reject {
  padding: 10px 8px; border-radius: 8px; border: none; cursor: pointer;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.12);
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .15s;
}
.apc-btn-reject:hover { background: rgba(248,113,113,.15); color: #F87171; border-color: rgba(248,113,113,.3); }

.apc-action__thread { border-top: 1px solid rgba(255,255,255,.08); padding-top: 16px; margin-top: 4px; }
.apc-thread-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.3);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px;
}
.apc-bubble { display: flex; gap: 10px; margin-bottom: 10px; }
.apc-bubble__av {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.apc-bubble__body { flex: 1; min-width: 0; }
.apc-bubble__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.apc-bubble__meta strong { font-size: 12px; color: rgba(255,255,255,.8); }
.apc-bubble__meta time  { font-size: 11px; color: rgba(255,255,255,.3); }
.apc-bubble__body p {
  font-size: 13px; color: rgba(255,255,255,.65); line-height: 1.5;
  background: rgba(255,255,255,.05); border-radius: 8px; padding: 8px 12px;
  margin: 0;
}

/* Verdict (non-pending) */
.apc-action__verdict {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; text-align: center; padding: 20px 0;
}
.apc-action__verdict strong { font-size: 16px; color: white; font-weight: 700; }
.apc-action__verdict span  { font-size: 13px; color: rgba(255,255,255,.45); line-height: 1.5; }
.apc-verdict-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.apc-verdict-icon--ok   { background: rgba(34,197,94,.15); color: #4ADE80; }
.apc-verdict-icon--warn { background: rgba(251,191,36,.12); color: #FCD34D; }
.apc-verdict-icon--done { background: rgba(139,92,246,.15); color: #A78BFA; }

/* ── Footer ── */
.apc-footer {
  text-align: center; padding: 28px 24px;
  font-size: 12px; color: var(--ink-muted);
  border-top: 1px solid #E8E3D9;
  display: flex; align-items: center; justify-content: center; gap: 20px;
  flex-wrap: wrap;
}
.apc-footer svg { vertical-align: middle; margin-right: 3px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .apc-header { padding: 0 16px; }
  .apc-hero { padding: 32px 16px 40px; }
  .apc-cards { padding: 16px 12px 60px; }
  .apc-card__body { grid-template-columns: 1fr; }
  .apc-card__preview { border-right: none; border-bottom: 1px solid #E8E3D9; }
  .apc-action__two-btns { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE-MOBILE-V1 — Mobile & Tablette
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Hamburger ──────────────────────────────────────────────────────────── */
.hamburger-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid var(--ink-line);
  border-radius: 9px;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
  transition: background .12s;
}
.hamburger-btn:hover { background: var(--ink-line); }
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,20,25,.55);
  backdrop-filter: blur(3px);
  z-index: 998;
}
.sidebar-overlay.is-open { display: block; }

/* ── App layout : sidebar → drawer sur mobile ───────────────────────────── */
@media (max-width: 980px) {
  .hamburger-btn { display: flex; }

  /* Libérer le body de overflow:hidden défini en inline */
  body {
    overflow: auto !important;
    height: auto !important;
  }

  /* Sidebar : drawer fixe */
  .sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 999 !important;
    transform: translateX(-260px) !important;
    transition: transform .25s cubic-bezier(.4,0,.2,1) !important;
    will-change: transform;
    overflow-y: auto !important;
  }
  .sidebar.is-open {
    transform: translateX(0) !important;
    box-shadow: 4px 0 32px rgba(0,0,0,.5) !important;
  }
  .sidebar__toggle { display: none !important; }

  /* App : pleine largeur */
  .app {
    display: block !important;
    height: auto !important;
    min-height: 100vh !important;
  }

  /* Main content : doit remplir l'écran */
  .main {
    min-height: 100vh !important;
    width: 100% !important;
  }

  .tbar { padding: 12px 16px; }
  .tb-center { display: none !important; }
  .tb-page-title { font-size: 18px; }
  .tb-page-sub { display: none; }
  .content { padding: 14px !important; }
}

/* ── Formulaire post_edit (mode normal) ─────────────────────────────────── */
.pe-form {
  display: grid;
  grid-template-columns: 1.8fr 1.4fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1200px) {
  .pe-form {
    grid-template-columns: 1fr 300px;
    gap: 16px;
  }
  .pe-col-preview { display: none !important; }
}

@media (max-width: 768px) {
  .pe-form {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pe-col-preview { display: none !important; }
  .pe-col-sidebar { order: -1; }

  .post-summary-block {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    padding: 12px 14px !important;
  }
}

/* ── Formulaire embed (mode modal/iframe) ───────────────────────────────── */
@media (max-width: 1100px) {
  .ef__body {
    grid-template-columns: 180px minmax(0,1fr) !important;
  }
  .ef__preview-col { display: none !important; }
}

@media (max-width: 768px) {
  .ef {
    height: auto !important;
    min-height: calc(100vh - 60px);
  }
  .ef__body {
    display: flex !important;
    flex-direction: column;
    overflow: visible !important;
    min-height: 0;
  }
  .ef__accounts {
    border-right: none !important;
    border-bottom: 1px solid var(--ink-line);
    max-height: 180px;
    flex-shrink: 0;
  }
  .ef__editor {
    flex: 1;
    overflow-y: auto !important;
    min-height: 0;
  }
  .ef__preview-col { display: none !important; }

  .embed-topbar { padding: 0 12px; }
  .embed-topbar h2 { font-size: 13px; }
}

/* ── Topbar bouton "Créer" ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .tb-create span { display: none; }
  .tb-create { padding: 7px 10px; min-width: 0; }
  .tb-right { gap: 6px; }
}

/* ── Tables ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 600px; }
}

