/* ============================================================
   Alenia – Gestion Intermission
   Custom CSS – No framework
   ============================================================ */

/* ---- Google Fonts ----------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Source+Sans+Pro:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---- Prevent FOUC on custom elements ---------------------- */
alenia-modal:not(:defined),
alenia-modal:not(:defined) * { display: none !important; }

/* ---- CSS Custom Properties — Alenia Design System --------- */
:root {
  /* Couleurs officielles Alenia */
  --color-primary:       #3c53e8;
  --color-primary-light: #a4aeec;
  --color-dark:          #030d6a;
  --color-primary-dark:  #030d6a; /* alias → --color-dark */
  --color-accent:        #df0043;
  --color-warning:       #ffc53a;
  --color-success:       #27AE60;
  --color-success-bg:    #D4EDDA;
  --color-success-text:  #155724;
  --color-surface:       #f2f2f2;
  --color-bg:            #f2f2f2;
  --color-card:          #ffffff;
  --color-white:         #ffffff;
  --color-muted:         #c4c4c4;
  --color-text:          #1A1A2E;
  --color-text-muted:    #718096;
  --color-border:        #dadada;
  --color-danger:        #df0043; /* alias → --color-accent */
  --color-hover:         rgba(60,83,232,0.04);
  --color-inactive:      #a0aec0;
  --color-inactive-bg:   #f7fafc;

  /* Typo — Alenia Design System */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-ui:      'Source Sans Pro', sans-serif;
  --font-heading: var(--font-display); /* alias backward-compat */

  --sidebar-width:  260px;
  --header-height:  0px;

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(3,13,106,0.08);
  --shadow-md:  0 4px 12px rgba(3,13,106,0.10);
  --shadow-lg:  0 8px 24px rgba(3,13,106,0.12);

  --transition: 0.15s ease;

  /* ---- Mapping variables → design system components --------- */
  --bg-card:           var(--color-card);
  --bg-surface:        var(--color-surface);
  --bg-page:           var(--color-bg);
  --border-main:       var(--color-border);
  --border-subtle:     #ebebeb;
  --text-main:         var(--color-text);
  --text-heading:      var(--color-primary-dark);
  --text-muted:        var(--color-text-muted);
  --shadow-main:       var(--shadow-lg);
  --transition-fast:   0.12s ease;
  --transition-normal: 0.2s ease;
  --z-modal:           500;
  --z-toast:           600;
  --container-sm:      420px;
  --container-md:      560px;
  --container-lg:      800px;
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-surface);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ---- Layout ------------------------------------------------ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

.main-content {
  flex: 1;
  padding: 32px 40px;
  max-width: 1400px;
  width: 100%;
}

/* ---- Sidebar ----------------------------------------------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: var(--color-dark);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
  box-shadow: 2px 0 12px rgba(19,36,99,0.15);
}

.sidebar__header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar__logo-img {
  height: 36px;
  width: auto;
}

.sidebar__logo-text {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 2px;
}

.sidebar__toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
}
.sidebar__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  transition: var(--transition);
}

.sidebar__section-label {
  padding: 16px 20px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.sidebar__nav { list-style: none; padding: 0 12px; }
.sidebar__nav-item { margin-bottom: 2px; }

.sidebar__nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.sidebar__nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  text-decoration: none;
}
.sidebar__nav-link--active {
  background: var(--color-primary);
  color: #ffffff;
}

.sidebar__nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.8;
}

.sidebar__footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar__footer-text {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
}

/* ---- Page Header ------------------------------------------- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-header__left { flex: 1; }
.page-header__right { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

.page-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.2;
}
.page-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ---- Stats Row --------------------------------------------- */
.stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 140px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card--success { border-top: 3px solid var(--color-success); }
.stat-card--warning { border-top: 3px solid var(--color-warning); }

.stat-card__value {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- Toolbar (search + sort) ------------------------------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex-shrink: 0;
}

.search-wrap__icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-input {
  padding: 6px 12px 6px 34px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-card);
  font-size: 13px;
  color: var(--color-text);
  width: 220px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(60,83,232,0.12);
}

.search-input::placeholder { color: var(--color-text-muted); }

/* ---- Sort Bar ---------------------------------------------- */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sort-bar__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
  white-space: nowrap;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-card);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.sort-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(60,83,232,0.06);
}

.sort-btn--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

.sort-btn--active:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #ffffff;
}

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.sort-arrow {
  font-size: 11px;
  line-height: 1;
}

#consultants-container {
  transition: opacity 0.15s ease;
}

/* ---- View Toggle ------------------------------------------- */
.view-toggle {
  display: flex;
  gap: 2px;
  margin-left: auto;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2px;
}

.view-toggle__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: calc(var(--radius-md) - 2px);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.view-toggle__btn:hover { color: var(--color-primary); }
.view-toggle__btn--active {
  background: var(--color-primary);
  color: #ffffff;
}
.view-toggle__btn--active:hover { color: #ffffff; }

/* ---- List View -------------------------------------------- */
#consultants-container.view--list .consultants-grid {
  grid-template-columns: 1fr;
  gap: 6px;
}

#consultants-container.view--list .consultant-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
}
#consultants-container.view--list .consultant-card:hover {
  transform: none;
}
#consultants-container.view--list .consultant-card--inactive {
  border-left-color: var(--color-inactive);
}

#consultants-container.view--list .consultant-card__header {
  flex: 1;
  margin-bottom: 0;
  min-width: 0;
  gap: 10px;
  align-items: center;
}

#consultants-container.view--list .consultant-card__photo-wrap {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
#consultants-container.view--list .consultant-card__initials {
  font-size: 13px;
}

#consultants-container.view--list .consultant-card__name {
  font-size: 14px;
}
#consultants-container.view--list .consultant-card__badges {
  margin-top: 4px;
}

#consultants-container.view--list .consultant-card__days {
  padding: 4px 10px;
}
#consultants-container.view--list .days-count { font-size: 16px; }
#consultants-container.view--list .days-label { font-size: 9px; }

#consultants-container.view--list .consultant-card__stats {
  display: none;
}

#consultants-container.view--list .consultant-card__last-client {
  flex: 0 0 160px;
  width: 160px;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#consultants-container.view--list .consultant-card__actions {
  flex: 0 0 210px;
  width: 210px;
  flex-wrap: nowrap;
  margin-top: 0;
  gap: 6px;
  justify-content: flex-end;
}
#consultants-container.view--list .consultant-card__actions .btn--sm {
  padding: 4px 10px;
  font-size: 12px;
}

/* ---- Consultant Cards Grid --------------------------------- */
.consultants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.consultant-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  border-top: 3px solid var(--color-primary);
  display: flex;
  flex-direction: column;
}
.consultant-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.consultant-card--inactive {
  border-top-color: var(--color-inactive);
  opacity: 0.75;
}

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

.consultant-card__photo-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-border);
}
.consultant-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.consultant-card__initials {
  width: 100%;
  height: 100%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  border-radius: 50%;
}

.consultant-card__info { flex: 1; min-width: 0; }

.consultant-card__name {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.consultant-card__title {
  font-size: 13px;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.consultant-card__badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.consultant-card__days {
  flex-shrink: 0;
  text-align: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}
.days-count {
  display: block;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}
.days-label {
  display: block;
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.consultant-card__stats {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 12px;
}
.mini-stat {
  flex: 1;
  text-align: center;
}
.mini-stat__value {
  display: block;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}
.mini-stat__label {
  display: block;
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.consultant-card__last-client {
  font-size: 12px;
  margin-bottom: 12px;
}
.label-small { color: var(--color-text-muted); margin-right: 4px; }
.value-small { font-weight: 600; color: var(--color-text); }

.consultant-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: auto;
  padding-top: 4px;
}

/* ---- Toggle switch ---------------------------------------- */
.toggle-switch {
  position: relative;
  width: 38px;
  height: 21px;
  background: #CBD5E0;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.toggle-switch:hover { opacity: 0.85; }
.toggle-switch--on { background: var(--color-success); }
.toggle-switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  pointer-events: none;
}
.toggle-switch--on .toggle-switch__knob { transform: translateX(17px); }

/* ---- Badges ----------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.badge--success  { background: var(--color-success-bg); color: var(--color-success-text); }
.badge--inactive { background: #e2e8f0; color: #718096; }
.badge--info     { background: #D6E4FF; color: #1a3a7a; }
.badge--warning  { background: #FEF9E7; color: #7D6608; border: 1px solid var(--color-warning); }
.badge--pipeline-search   { background: #E8F4FD; color: #1a6ca0; }
.badge--pipeline-interview{ background: #FEF3E2; color: #a05a00; }
.badge--pipeline-proposal { background: #E8F8F0; color: #1a7a47; }

/* ---- Buttons — calqués sur le Design System Alenia --------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 22px;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, transform 150ms ease;
  white-space: nowrap;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  text-transform: uppercase;
  border-radius: 30px;
}
.btn--primary:hover {
  background: #2a3fd4;
  border-color: #2a3fd4;
  color: #ffffff;
}

.btn--secondary {
  background: var(--color-card);
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--secondary:hover { background: #f0f2fd; }

.btn--success {
  background: var(--color-success);
  color: #ffffff;
  border-color: var(--color-success);
}
.btn--success:hover { background: #1e8a4a; }

.btn--warning {
  background: var(--color-warning);
  color: #6b5300;
  border-color: var(--color-warning);
}
.btn--warning:hover { background: #e8a800; }

.btn--danger {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
  border-radius: 50px;
}
.btn--danger:hover { background: #c0003a; }

.btn--ghost {
  background: rgba(60,83,232,0.07);
  color: var(--color-primary);
  border-color: transparent;
  border-radius: 30px;
}
.btn--ghost:hover { background: rgba(60,83,232,0.15); }

.btn--dark {
  background: var(--color-dark);
  color: #ffffff;
  border-color: var(--color-dark);
  text-transform: uppercase;
  border-radius: 30px;
}
.btn--dark:hover { background: #050f80; }

.btn--danger-ghost {
  background: transparent;
  color: var(--color-accent);
  border-color: transparent;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
}
.btn--danger-ghost:hover { background: #FFF0F3; }

.btn--icon {
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.btn--sm {
  padding: 5px 16px;
  font-size: 13px;
  border-radius: 20px;
}

.btn--xs {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}

.btn--block { width: 100%; }

/* ---- Flash Messages ---------------------------------------- */
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 600;
  animation: slideDown 0.2s ease;
}
.flash--success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border: 1px solid #b7dfc4;
}
.flash--error {
  background: #FFF0F3;
  color: #c01d44;
  border: 1px solid #f5c6cb;
}
.flash__icon { font-size: 16px; }
.flash__close {
  margin-left: auto;
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.6;
  color: inherit;
}
.flash__close:hover { opacity: 1; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Forms ------------------------------------------------- */
.consultant-form { }
.form--readonly fieldset:disabled .form-input,
.form--readonly fieldset:disabled select.form-input,
.form--readonly fieldset:disabled textarea.form-input { background:var(--color-surface); opacity:.85; cursor:default; }
.form--readonly .photo-drop-zone__avatar-overlay { display:none; }
.form--readonly .input-with-btn .btn { display:none; }

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.form-section {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}

.form-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}
.form-section__desc {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 8px;
  margin-bottom: 20px;
}

.form-row { margin-bottom: 18px; }
.form-row--two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row--three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-group { display: flex; flex-direction: column; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.required-star { color: var(--color-accent); }
.form-hint-inline { font-weight: 400; color: var(--color-text-muted); font-size: 11px; }

.form-input {
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
}
.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(60,83,232,0.12);
}
.form-input::placeholder { color: #b0bec5; }

.form-textarea { resize: vertical; min-height: 80px; }

.form-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.form-hint code {
  font-size: 11px;
  background: var(--color-bg);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--color-primary);
}

.input-with-btn {
  display: flex;
  gap: 8px;
  align-items: center;
}
.input-with-btn .form-input { flex: 1; }

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 8px;
  border-top: 1px solid var(--color-border);
}
.form-actions__right { display: flex; gap: 10px; align-items: center; }

/* Photo Upload */
.photo-upload {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.photo-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  flex-direction: column;
  gap: 4px;
  color: var(--color-text-muted);
  font-size: 12px;
}
.photo-preview--empty { color: var(--color-text-muted); }
.photo-preview__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-preview__label { font-size: 11px; color: var(--color-text-muted); text-align: center; }

/* Radio Group */
.radio-group {
  display: flex;
  gap: 12px;
}
.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: border-color var(--transition), background var(--transition);
}
.radio-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-option--active {
  border-color: var(--color-primary);
  background: #EEF2FF;
  color: var(--color-primary);
}
.radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.radio-dot--success  { background: var(--color-success); }
.radio-dot--inactive { background: var(--color-inactive); }
.radio-dot--warning  { background: var(--color-warning); }

/* ---- Recipients -------------------------------------------- */
.recipients-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.recipients-auto-cc {
  margin-top: 28px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.recipients-auto-cc__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.recipients-auto-cc__desc {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.recipients-auto-cc__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.recipients-auto-cc__list .recipient-item {
  width: auto;
  flex: 0 0 auto;
  border-radius: var(--radius-full);
  padding: 6px 12px 6px 6px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

.recipients-col {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.recipients-col__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.recipients-col__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.recipients-col__icon--to { background: var(--color-primary); color: #fff; }
.recipients-col__icon--cc { background: var(--color-primary-dark); color: #fff; }

.recipients-col__title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary-dark);
  flex: 1;
}

.recipients-list { padding: 8px; min-height: 60px; }

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

.recipient-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  transition: background var(--transition);
}
.recipient-item:hover { background: var(--color-bg); }

.recipient-item__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.recipient-item__info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.recipient-item__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recipient-item__email {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipients-add-form {
  padding: 20px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}
.recipients-add-form__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.recipients-add-form .form-group { margin-bottom: 12px; }
.recipients-add-form .form-label { font-size: 12px; margin-bottom: 4px; }
.recipients-add-form .form-input { padding: 7px 10px; font-size: 13px; }

/* ---- Empty State ------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 80px 40px;
}
.empty-state__icon { margin: 0 auto 20px; }
.empty-state__title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}
.empty-state__text {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ---- Utilities --------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.inline-form { display: inline-flex; align-items: center; margin: 0; padding: 0; }

/* ---- Responsive -------------------------------------------- */
@media (max-width: 1024px) {
  .consultants-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .sidebar {
    transform: translateX(-260px);
    width: 260px;
  }
  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar__toggle { display: flex; }

  .sidebar-overlay.is-visible {
    display: block;
  }

  .main-wrapper { margin-left: 0; }

  .main-content { padding: 20px 16px; }

  .page-header { flex-direction: column; }

  .stats-row { gap: 10px; }
  .stat-card { min-width: 120px; padding: 14px; }
  .stat-card__value { font-size: 24px; }

  .consultants-grid { grid-template-columns: 1fr; }

  .recipients-grid { grid-template-columns: 1fr; }

  .form-row--two { grid-template-columns: 1fr; }
  .form-row--three { grid-template-columns: 1fr 1fr; }

  .form-section { padding: 20px 16px; }

  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .form-actions__right {
    flex-direction: column;
    width: 100%;
  }
  .form-actions__right .btn { width: 100%; justify-content: center; }
  .form-actions > .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .form-row--three { grid-template-columns: 1fr; }
  .radio-group { flex-direction: column; }
}

/* ---- Mobile top bar (hamburger trigger) -------------------- */
.mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 150;
  background: var(--color-primary-dark);
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.mobile-topbar__logo {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}
.mobile-topbar__btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-topbar__btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
}

/* ============================================================
   Stats Page
   ============================================================ */

/* ---- Stats Section ---------------------------------------- */
.stats-section {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.stats-section__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}

/* ---- KPI Grid --------------------------------------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--kpi-min, 160px), 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

/* ---- Progress Bar ----------------------------------------- */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
  min-width: 2px;
}

/* ---- Distribution Card ------------------------------------ */
.stats-distrib-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.stats-distrib-card__title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
}

.stats-distrib-row {
  display: grid;
  grid-template-columns: 110px 1fr 80px;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.stats-distrib-row:last-child { margin-bottom: 0; }

.stats-distrib-row__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-distrib-row__label--wide {
  max-width: 180px;
}

.stats-distrib-row__bar { min-width: 0; }

.stats-distrib-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.stats-distrib-row__count {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.1;
}

.stats-distrib-row__pct {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* ---- Distribution Grid ------------------------------------ */
.stats-distrib-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stats-distrib-col--wide {
  grid-column: 1 / -1;
}

/* ---- Highlight -------------------------------------------- */
.stats-highlight {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, rgba(60,83,232,0.06) 0%, rgba(60,83,232,0.02) 100%);
  border: 1px solid rgba(60,83,232,0.15);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 16px;
  color: var(--color-warning);
}

.stats-highlight__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}

.stats-highlight__value {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

/* ---- Metrics Row ------------------------------------------ */
.stats-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 4px;
}

.stats-metric-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.stats-metric-item__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stats-metric-item__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}

.stats-metric-item__value {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.1;
  margin-bottom: 2px;
}

.stats-metric-item__sub {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ---- Top 5 Blocks ----------------------------------------- */
.stats-tops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stats-top-block {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.stats-top-block__title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.stats-top-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.stats-top-row:last-child { margin-bottom: 0; }

.stats-top-row__rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.stats-top-row:nth-child(2) .stats-top-row__rank { background: var(--color-primary-dark); }
.stats-top-row:nth-child(3) .stats-top-row__rank { background: #6B7FCC; }
.stats-top-row:nth-child(4) .stats-top-row__rank { background: var(--color-text-muted); }
.stats-top-row:nth-child(5) .stats-top-row__rank { background: var(--color-inactive); }

.stats-top-row__content { flex: 1; min-width: 0; }

.stats-top-row__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  display: inline-block;
}

.stats-top-row__val {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary-dark);
}

/* ---- Stats empty state ------------------------------------ */
.stats-empty {
  font-size: 13px;
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
  padding: 12px 0;
}

/* ---- Stats responsive ------------------------------------- */
@media (max-width: 1024px) {
  .stats-tops-grid { grid-template-columns: 1fr; }
  .stats-distrib-grid { grid-template-columns: 1fr; }
  .stats-metrics-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .stats-section { padding: 20px 16px; }
  .kpi-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .stats-distrib-row { grid-template-columns: 90px 1fr 60px; gap: 8px; }
}

/* ============================================================
   End Stats Page
   ============================================================ */

@media (max-width: 768px) {
  .mobile-topbar { display: flex; }
}

/* ============================================================
   Auth – Page de login dev
   ============================================================ */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--color-bg);
  padding: 24px;
}

.login-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-card__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}

.login-card__title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-align: center;
  margin-bottom: 4px;
}

.login-card__dev-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFF3CD;
  color: #856404;
  border: 1px solid #FFDF7E;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.login-card__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

/* ============================================================
   Admin – Users table
   ============================================================ */

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.users-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.users-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.users-table tbody tr:last-child td {
  border-bottom: none;
}

.users-table tbody tr:hover td {
  background: var(--color-bg);
}

.badge--admin  { background: #FFE0E0; color: #C0392B; font-weight: 700; }
.badge--editor { background: #D6E4FF; color: #1a3a7a; font-weight: 700; }
.badge--viewer { background: #F0F0F0; color: #666666; font-weight: 700; }

/* ============================================================
   Sidebar footer – user info
   ============================================================ */

.sidebar__footer-user-block {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar__footer-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.sidebar__footer-user-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.sidebar__footer-logout {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition);
}
.sidebar__footer-logout:hover {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

/* ---------------------------------------------------------------
   Pipeline board (Feature 7)
---------------------------------------------------------------- */
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}
@media (max-width: 768px) {
  .pipeline-board { grid-template-columns: 1fr; }
}
.pipeline-col {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pipeline-col__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
  font-size: 13px;
}
.pipeline-col__count {
  background: var(--color-primary);
  color: #fff;
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}
.pipeline-col__cards {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pipeline-empty {
  color: var(--color-text-muted);
  font-size: 13px;
  text-align: center;
  padding: 16px 0;
}
.pipeline-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
}
.pipeline-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.pipeline-card__name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
}
.pipeline-card__days {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.pipeline-card__title {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.pipeline-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.duration-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.duration-dot--green  { background: var(--color-success); }
.duration-dot--orange { background: var(--color-warning); }
.duration-dot--red    { background: var(--color-danger); }
.pipeline-card--draggable { cursor: grab; user-select: none; }
.pipeline-card--draggable:active { cursor: grabbing; }
.pipeline-card.is-dragging { opacity: 0.35; transform: scale(0.97); transition: opacity 0.15s, transform 0.15s; }
.pipeline-col__cards.drag-over {
  background: color-mix(in srgb, var(--color-primary) 6%, transparent);
  outline: 2px dashed var(--color-primary);
  outline-offset: -2px;
  border-radius: var(--radius-md);
}
.pipeline-incoming {
  margin-bottom: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-warning);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
}
.pipeline-incoming__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.pipeline-incoming__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--color-warning);
  flex: 1;
}
.pipeline-incoming__count {
  font-size: 12px;
  font-weight: 600;
  background: rgba(245,158,11,.12);
  color: var(--color-warning);
  border-radius: 20px;
  padding: 2px 10px;
}
.pipeline-incoming__cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pipeline-card--bientot {
  min-width: 180px;
  border-color: rgba(245,158,11,.3);
  background: rgba(245,158,11,.04);
}

/* ---------------------------------------------------------------
   Notes feed (Feature 2)
---------------------------------------------------------------- */
.notes-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.note-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}
.note-item__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.note-item__auteur {
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text);
}
.note-item__date {
  font-size: 12px;
  color: var(--color-text-muted);
}
.note-item__contenu {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.5;
  white-space: pre-wrap;
}
.notes-empty {
  color: var(--color-text-muted);
  font-size: 14px;
  font-style: italic;
  margin-bottom: 16px;
}
.note-form {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  margin-top: 8px;
}
.note-item__actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.note-item__edit {
  margin-top: 8px;
}
.note-item__edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ---------------------------------------------------------------
   History table (Feature 8)
---------------------------------------------------------------- */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.history-table th,
.history-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.history-table th {
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.history-table tbody tr:hover {
  background: var(--color-hover);
}
.table-responsive {
  overflow-x: auto;
}

/* New period box */
.new-period-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.new-period-box__text {
  font-size: 13px;
  color: #1e40af;
  margin: 0;
  line-height: 1.5;
}

/* Standalone form section (outside the grid) */
.form-section--standalone {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}

/* ---------------------------------------------------------------
   Monthly trends chart (Feature 6)
---------------------------------------------------------------- */
.trends-chart {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 16px 0 0;
  overflow-x: auto;
}
.trends-month {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 60px;
}
.trends-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}
.trends-bar {
  width: 22px;
  border-radius: 3px 3px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 4px;
  min-height: 4px;
  transition: opacity 0.15s;
}
.trends-bar span {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.trends-bar--entries { background: var(--color-primary); }
.trends-bar--exits   { background: var(--color-success); }
.trends-label {
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: center;
  white-space: nowrap;
}
.trends-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.trends-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.trends-legend__item::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}
.trends-legend__item--entries::before { background: var(--color-primary); }
.trends-legend__item--exits::before   { background: var(--color-success); }

/* ---- Error pages ------------------------------------------- */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 12px;
    text-align: center;
    padding: 40px;
}
.error-page__code {
    font-size: 80px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    letter-spacing: -2px;
}
.error-page__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}
.error-page__message {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0;
    max-width: 400px;
    line-height: 1.6;
}
.error-page__back { margin-top: 8px; }

/* ---- Public error page (pre-auth) -------------------------- */
.public-error-body {
    font-family: 'Inter', sans-serif;
    background: #f7f8fc;
    color: #1a202c;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.public-error-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
    padding: 48px 56px;
    text-align: center;
    max-width: 440px;
    width: 90%;
}
.public-error-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}
.public-error-logo__img { height: 32px; width: auto; }
.public-error-logo__text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #030d6a;
}
.public-error-code {
    font-size: 72px;
    font-weight: 700;
    color: #3c53e8;
    line-height: 1;
    letter-spacing: -2px;
}
.public-error-title {
    font-size: 18px;
    font-weight: 600;
    margin-top: 12px;
    color: #1a202c;
}
.public-error-message {
    font-size: 14px;
    color: #718096;
    margin-top: 8px;
    line-height: 1.6;
}
.public-error-btn {
    display: inline-block;
    margin-top: 28px;
    padding: 10px 24px;
    border: 1.5px solid #3c53e8;
    border-radius: 8px;
    color: #3c53e8;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.public-error-btn:hover { background: #3c53e8; color: #fff; }



/* ---- Combobox (autocomplete custom) ----------------------- */
.combobox {
  position: relative;
}
.combobox__list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: var(--space-1) 0;
  list-style: none;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: var(--z-dropdown, 900);
  max-height: 220px;
  overflow-y: auto;
}
.combobox__list[hidden] { display: none; }
.combobox__item {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition);
}
.combobox__item:hover,
.combobox__item[aria-selected="true"] {
  background: var(--color-bg-alt, #f5f7ff);
  color: var(--color-primary);
}
.combobox__item--new {
  color: var(--color-text-muted);
  font-style: italic;
}
.combobox__item--new strong {
  color: var(--color-primary);
  font-style: normal;
}

/* ============================================================
   Navigation UX — Consultant list & form (2026-04)
   ============================================================ */

/* ---- Card link overlay (liste consultants) ---------------- */
.consultant-card--clickable {
  position: relative;
  cursor: pointer;
}

.card-link-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  outline: none;
}

.consultant-card--clickable:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-top-color: var(--color-primary-dark);
}

.consultant-card--clickable:hover .consultant-card__name::after {
  content: ' →';
  color: var(--color-primary);
  font-weight: 700;
}

/* ---- Consultant identity bar (en-tête du formulaire) ------ */
.consultant-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.consultant-identity__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.consultant-identity__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.consultant-identity__initials {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.consultant-identity__info { min-width: 0; }

/* ---- Form section navigator ------------------------------- */
.form-section-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 5px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.form-section-nav::-webkit-scrollbar { display: none; }

.form-section-nav__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: calc(var(--radius-lg) - 4px);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}

.form-section-nav__item:hover {
  background: var(--color-hover);
  color: var(--color-primary);
  text-decoration: none;
}

.form-section-nav__item--active {
  background: var(--color-primary);
  color: #fff;
}

.form-section-nav__item--active:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.form-section-nav__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,0.25);
  color: inherit;
}

.form-section-nav__item:not(.form-section-nav__item--active) .form-section-nav__count {
  background: var(--color-primary);
  color: #fff;
}

/* ---- Sticky save bar -------------------------------------- */
.sticky-save-bar {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 100;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  padding: 10px 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  box-shadow: 0 -4px 20px rgba(3,13,106,0.10);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-save-bar.is-visible {
  transform: translateY(0);
}

.sticky-save-bar__label {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-right: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

/* ---- Scroll offset for anchor nav (évite que le sticky couvre le titre) */
[id^="section-"] {
  scroll-margin-top: 16px;
}

/* ---- Responsive adaptations ------------------------------- */
@media (max-width: 768px) {
  .sticky-save-bar {
    left: 0;
    padding: 10px 16px;
  }
  .sticky-save-bar__label { display: none; }

  .form-section-nav {
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .consultant-identity { gap: 10px; }
  .consultant-identity__avatar { width: 40px; height: 40px; }
  .consultant-identity__initials { font-size: 14px; }
}


/* ============================================================
   Photo drop zone — formulaire consultant
   ============================================================ */
.photo-drop-zone {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  background: var(--color-bg);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}

.photo-drop-zone:hover,
.photo-drop-zone--active {
  border-color: var(--color-primary);
  background: rgba(60, 83, 232, 0.03);
}

.photo-drop-zone__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-card);
  color: var(--color-text-muted);
  position: relative;
  transition: border-color 0.2s;
}

.photo-drop-zone:hover .photo-drop-zone__avatar {
  border-color: var(--color-primary);
}

.photo-drop-zone__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-drop-zone__avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 13, 106, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.18s;
}

.photo-drop-zone:hover .photo-drop-zone__avatar-overlay {
  opacity: 1;
}

.photo-drop-zone__placeholder {
  color: var(--color-muted);
}

.photo-drop-zone__body {
  flex: 1;
  min-width: 0;
}

.photo-drop-zone__primary {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 3px;
}

.photo-drop-zone__browse {
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.photo-drop-zone__hint {
  font-size: 11px;
  color: var(--color-muted);
}

.photo-drop-zone__filename {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 5px;
}

.photo-drop-zone__filename.is-visible { display: flex; }


/* ---- Back to top — fiche consultant ----------------------- */
.back-to-top {
  position: fixed;
  bottom: 72px;
  right: 24px;
  z-index: 99;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 768px) {
  .back-to-top { bottom: 68px; right: 16px; }
}

/* ---- Search empty state ----------------------------------- */
.search-empty-state {
  text-align: center;
  padding: 60px 24px;
}

.search-empty-state__inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--color-text-muted);
}

.search-empty-state__inner svg {
  color: var(--color-muted);
  opacity: 0.7;
}

.search-empty-state__inner p {
  font-size: 14px;
  line-height: 1.5;
}

.search-empty-state__inner strong {
  color: var(--color-text);
}

/* ============================================================
   Activity Log (consultant form)
   ============================================================ */
.activity-add-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.activity-add__type { flex: 1.5; min-width: 120px; }
.activity-add__date { flex: 1.5; min-width: 130px; }
.activity-add__qty  { flex: 0 0 70px; width: 70px; }

.activity-timeline {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.activity-empty {
  padding: 16px;
  font-size: 13px;
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
}
.activity-entry {
  border-bottom: 1px solid var(--color-border-light, rgba(0,0,0,.06));
  padding: 10px 14px;
}
.activity-entry:last-child { border-bottom: none; }
.activity-entry__view {
  display: flex;
  align-items: center;
  gap: 12px;
}
.activity-entry__type {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  min-width: 110px;
}
.activity-entry__date {
  font-size: 12px;
  color: var(--color-text-muted);
  min-width: 80px;
}
.activity-entry__qty {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 36px;
  text-align: right;
}
.activity-entry__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.activity-entry__edit {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.activity-totals {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--color-text-muted);
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  flex-wrap: wrap;
}
.activity-totals span { font-weight: 500; }

/* ============================================================
   Stats — Period filter bar (compact)
   ============================================================ */
.period-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.period-filter-bar__form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
}
.period-filter-bar__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-right: 2px;
}
.period-filter-bar__input {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 4px 8px;
  font-size: 13px;
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color .15s;
}
.period-filter-bar__input:focus { border-color: var(--color-primary); }
.period-filter-bar__reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: var(--radius-md);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.period-filter-bar__reset:hover {
  background: rgba(228,36,84,.08);
  color: var(--color-accent);
}
.period-filter-bar__results {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--color-text);
  padding: 6px 14px;
  background: rgba(60,83,232,.04);
  border: 1px solid rgba(60,83,232,.12);
  border-radius: var(--radius-lg);
}
.period-filter-bar__results-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--color-text-muted);
  margin-right: 4px;
}
.period-filter-bar__kpi { color: var(--color-text); }
.period-filter-bar__kpi strong { color: var(--color-primary); }
.period-filter-bar__sep { color: var(--color-border); }

/* ---- Raccourcis de période --------------------------------- */
.period-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 4px;
}
.period-preset {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
  letter-spacing: .3px;
}
.period-preset:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(60,83,232,.05);
}
.period-preset--active {
  border-color: var(--color-primary);
  background: rgba(60,83,232,.08);
  color: var(--color-primary);
}

/* ---- Stats scope badges ------------------------------------ */
.stats-scope-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.6;
}
.stats-scope-badge--period {
  background: rgba(60,83,232,.08);
  color: var(--color-primary);
  border: 1px solid rgba(60,83,232,.2);
}
.stats-scope-badge--current {
  background: rgba(100,100,100,.06);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* ---- Push form — typeahead --------------------------------- */
.typeahead-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
}
.typeahead-item {
  display: block;
  width: 100%;
  padding: 9px 14px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}
.typeahead-item:last-child { border-bottom: none; }
.typeahead-item:hover { background: var(--color-bg); }
.form-input--error { border-color: var(--color-danger) !important; }

/* ---- Activity push meta ------------------------------------ */
.activity-entry__push-meta {
  flex: 1;
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  min-width: 0;
}
.activity-entry__push-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 1px 6px;
  border-radius: 20px;
  background: rgba(60,83,232,.08);
  color: var(--color-primary);
  border: 1px solid rgba(60,83,232,.2);
}

/* ---- Custom searchable select (cs-*) ----------------------- */
.cs-wrap { position: relative; }
.cs-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  user-select: none;
  width: 100%;
  background: var(--color-surface);
}
.cs-trigger span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-trigger--error { border-color: var(--color-danger) !important; }
.cs-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  z-index: 60;
  overflow: hidden;
}
.cs-search-wrap {
  padding: 8px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}
.cs-search {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
}
.cs-search:focus { border-color: var(--color-primary); }
.cs-list {
  max-height: 240px;
  overflow-y: auto;
}
.cs-option {
  display: block;
  width: 100%;
  padding: 9px 14px;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text);
}
.cs-option:last-child { border-bottom: none; }

/* ================================================================
   Boond Manager picker (formulaire création consultant)
================================================================ */
.boond-picker {
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg, 12px);
    padding: 14px 18px;
    margin-bottom: 24px;
    background: var(--color-bg-alt, #f9fafb);
}
.boond-picker__header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.boond-picker__label {
    font-size: 13px;
    color: var(--color-text-muted);
    flex: 1;
}
.boond-picker__panel {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.boond-picker__search { width: 100%; }
.boond-picker__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 8px);
    background: #fff;
    max-height: 260px;
    overflow-y: auto;
}
.boond-picker__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
    transition: background 0.12s;
}
.boond-picker__item:last-child { border-bottom: none; }
.boond-picker__item:hover,
.boond-picker__item:focus { background: var(--color-primary-light, #eef2ff); outline: none; }
.boond-picker__item strong { font-size: 14px; }
.boond-picker__item span { color: var(--color-text-muted); font-size: 12px; }
.boond-picker__status {
    padding: 14px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 13px;
}
.boond-picker__status--error { color: var(--color-danger, #dc2626); }

/* Info Boond sur fiche consultant en mode édition */
.boond-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--color-text-muted);
    padding: 8px 12px;
    background: var(--color-bg-alt, #f9fafb);
    border-radius: var(--radius-md, 8px);
    margin-bottom: 16px;
}
.boond-info code {
    background: var(--color-border);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 11px;
}
.boond-info__link {
    padding: 3px 8px;
    font-size: 12px;
    gap: 4px;
}
.boond-info__sync {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-left: auto;
}
.cs-option:hover { background: var(--color-bg); }

/* ── Page admin/api ──────────────────────────────────────────────────── */
.api-page { max-width: 860px; }
.api-section {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-lg, 12px);
    padding: 24px;
    margin-bottom: 24px;
}
.api-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.api-section__logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--color-bg-alt, #f5f6fa);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.api-section__title { font-size: 16px; font-weight: 600; margin: 0; }
.api-section__subtitle { font-size: 13px; color: var(--color-text-muted); margin: 2px 0 0; }
.api-meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.api-meta__row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.api-meta__label { color: var(--color-text-muted); min-width: 140px; }
.api-meta__value { font-weight: 500; }
.api-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.boond-linked-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 13px; }
.boond-linked-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid var(--color-border, #e5e7eb);
    color: var(--color-text-muted);
    font-weight: 500;
}
.boond-linked-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    vertical-align: middle;
}
.boond-linked-table tr:last-child td { border-bottom: none; }
.sync-btn { white-space: nowrap; }
.api-notice {
    padding: 12px 16px;
    border-radius: var(--radius-md, 8px);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
}
.api-notice--warning {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #6d5000;
}
.api-notice--info {
    background: #e8f4fd;
    border: 1px solid #90caf9;
    color: #0d47a1;
}
@keyframes boond-spin { to { transform: rotate(360deg); } }
.refresh-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,.55);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.refresh-overlay__spinner {
    width: 48px; height: 48px;
    border: 4px solid rgba(255,255,255,.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: boond-spin .75s linear infinite;
}
.refresh-overlay__label {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: baseline;
}
.refresh-overlay__dots {
    display: inline-block;
    width: 1.6em;
    text-align: left;
}
.refresh-overlay__sub {
    color: rgba(255,255,255,.65);
    font-size: 13px;
    margin: 0;
}
