/* css/components.css - Composants UI MK ERP (Design System Behance SaaS B2B) */

/* ============================================================
   1. BOUTONS & CTA (MODERN SAAS B2B)
   ============================================================ */
.gp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
  user-select: none;
}

.gp-btn:active {
  transform: scale(0.98);
}

.gp-btn-full { width: 100%; }
.gp-btn-sm { padding: 7px 14px; font-size: 12.5px; border-radius: 8px; }
.gp-btn-xs { padding: 4px 10px; font-size: 11.5px; border-radius: 6px; }

/* Bouton Primaire (Indigo SaaS) */
.gp-btn-lime {
  background: var(--primary);
  color: #FFFFFF !important;
  border-color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(79, 70, 229, 0.25);
  position: relative;
  overflow: hidden;
}

.gp-btn-lime:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 8px 18px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

.gp-btn-lime:active {
  background: var(--primary-active);
  transform: translateY(0);
}

/* Bouton Secondaire (Soft Neutral) */
.gp-btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-default);
  box-shadow: var(--shadow-sm);
}

.gp-btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-highlight);
  color: var(--text-primary);
}

/* Boutons Contours Délicats */
.gp-btn-outline-lime { background: transparent; color: var(--primary); border-color: var(--primary); }
.gp-btn-outline-lime:hover { background: var(--primary-dim); }

.gp-btn-outline-sky { background: transparent; color: var(--color-sky); border-color: var(--color-sky); }
.gp-btn-outline-sky:hover { background: var(--color-sky-dim); }

.gp-btn-outline-amber { background: transparent; color: var(--color-amber); border-color: var(--color-amber); }
.gp-btn-outline-amber:hover { background: var(--color-amber-dim); }

.gp-btn-outline-emerald { background: transparent; color: var(--color-emerald); border-color: var(--color-emerald); }
.gp-btn-outline-emerald:hover { background: var(--color-emerald-dim); }

.gp-btn-outline-danger { background: transparent; color: var(--color-rose); border-color: var(--color-rose); }
.gp-btn-outline-danger:hover { background: var(--color-rose-dim); }

/* Boutons Danger & Alerte */
.gp-btn-danger {
  background: var(--color-rose-dim);
  color: var(--color-rose);
  border: 1px solid var(--color-rose-border);
}
.gp-btn-danger:hover {
  background: var(--color-rose);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

.gp-btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
}
.gp-btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.gp-btn-link { background: none; border: none; color: var(--primary); font-size: 13px; font-weight: 500; cursor: pointer; padding: 0; }
.gp-btn-link:hover { text-decoration: underline; }

.gp-btn-link-lime { background: none; border: none; color: var(--primary); font-size: 12px; font-weight: 600; cursor: pointer; }
.gp-btn-link-lime:hover { text-decoration: underline; }

/* Boutons Icônes Carrés Doux */
.gp-btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.gp-btn-icon:hover { background: var(--bg-subtle); color: var(--text-primary); border-color: var(--border-highlight); }
.gp-btn-icon-lime:hover { background: var(--primary-dim); color: var(--primary); border-color: var(--primary-border); }
.gp-btn-icon-danger:hover { background: var(--color-rose-dim); color: var(--color-rose); border-color: var(--color-rose-border); }

.gp-btn-icon-xs {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.gp-btn-icon-xs:hover { background: var(--color-rose-dim); color: var(--color-rose); }

.gp-icon-xs { width: 14px; height: 14px; }
.gp-icon-sm { width: 16px; height: 16px; }
.gp-icon-lg { width: 28px; height: 28px; }

/* ============================================================
   2. CHAMPS DE FORMULAIRE (CLEAN & MINIMALIST)
   ============================================================ */
.gp-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.gp-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.gp-input, .gp-select, .gp-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 10px 14px;
  transition: all var(--transition-fast);
  outline: none;
  box-shadow: var(--shadow-sm);
}

.gp-input:focus, .gp-select:focus, .gp-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.gp-input-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; display: block; }
.gp-font-mono { font-family: var(--font-mono); }
.gp-textarea { resize: vertical; }

/* ============================================================
   3. CARTES & CONTENEURS (BEHANCE SOFT UI)
   ============================================================ */
.gp-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.gp-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-highlight);
}

.gp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.gp-card-title {
  font-family: var(--font-heading);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

/* ============================================================
   4. GRILLE KPIS (CHIFFRES GRANDS FORMATS & LABELS AÉRÉS)
   ============================================================ */
.gp-kpis-grid,
.gp-kpi-grid,
.gp-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.gp-kpi-card,
.gp-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.gp-kpi-card:hover,
.gp-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-highlight);
}

.gp-kpi-highlight {
  border-color: var(--primary-border);
  background: linear-gradient(180deg, var(--primary-dim) 0%, var(--bg-card) 100%);
}

.gp-kpi-top,
.gp-kpi-header,
.gp-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.gp-kpi-label,
.gp-stat-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.gp-kpi-icon-badge,
.gp-kpi-icon-wrapper,
.gp-stat-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.gp-kpi-icon {
  width: 17px;
  height: 17px;
}

.gp-icon-lime { color: var(--primary); }
.gp-bg-lime-dim { background: var(--primary-dim); color: var(--primary); }
.gp-bg-sky-dim { background: var(--color-sky-dim); color: var(--color-sky); }
.gp-bg-amber-dim { background: var(--color-amber-dim); color: var(--color-amber); }
.gp-bg-purple-dim { background: var(--color-purple-dim); color: var(--color-purple); }
.gp-bg-emerald-dim { background: var(--color-emerald-dim); color: var(--color-emerald); }

.gp-text-sky { color: var(--color-sky); }
.gp-text-amber { color: var(--color-amber); }
.gp-text-purple { color: var(--color-purple); }
.gp-text-emerald { color: var(--color-emerald); }
.gp-text-danger { color: var(--color-rose); }

.gp-kpi-value,
.gp-stat-value {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 2px;
}

.gp-kpi-val-sm {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.gp-kpi-unit { font-size: 15px; color: var(--text-muted); font-weight: 500; }
.gp-kpi-meta,
.gp-kpi-subtext,
.gp-stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.gp-kpi-progress-bar { width: 100%; height: 5px; background: var(--bg-subtle); border-radius: 9999px; margin-top: 12px; overflow: hidden; }
.gp-kpi-progress-fill { height: 100%; border-radius: 9999px; }
.gp-bg-lime { background: var(--primary); }
.gp-bg-sky { background: var(--color-sky); }
.gp-bg-amber { background: var(--color-amber); }

/* Layout horizontal des cartes stats pour Réceptions et Versements */
.gp-stat-card:has(.gp-stat-icon) {
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.gp-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gp-stat-icon-lime {
  background: var(--primary-dim);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.gp-stat-icon-sky {
  background: var(--color-sky-dim);
  color: var(--color-sky);
  border: 1px solid var(--color-sky-border);
}

.gp-stat-icon-emerald {
  background: var(--color-emerald-dim);
  color: var(--color-emerald);
  border: 1px solid var(--color-emerald-border);
}

.gp-stat-content {
  flex: 1;
  overflow: hidden;
}

/* Banner Alertes & Échéanciers Tableau de bord */
.gp-dash-alert-banner {
  background: var(--color-amber-dim);
  border: 1px solid var(--color-amber-border);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.gp-alert-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--color-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--color-amber-border);
}

.gp-alert-banner-content {
  flex: 1;
  min-width: 240px;
}

.gp-alert-banner-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.gp-alert-banner-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.gp-alert-banner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Banner Pipeline Commercial */
.gp-pipeline-card { margin-bottom: 24px; }
.gp-indicator-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); display: inline-block; box-shadow: 0 0 8px var(--primary-glow); }
.gp-pipeline-bars { display: flex; height: 20px; border-radius: 8px; overflow: hidden; background: var(--bg-subtle); margin-bottom: 14px; gap: 2px; }
.gp-pipeline-segment { display: flex; align-items: center; justify-content: center; }
.gp-segment-text { font-size: 10.5px; font-weight: 600; color: #FFFFFF; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-pipeline-legend { display: flex; flex-wrap: wrap; gap: 20px; font-size: 12px; color: var(--text-secondary); }
.gp-legend-item { display: flex; align-items: center; gap: 6px; }
.gp-legend-dot { width: 8px; height: 8px; border-radius: 50%; }

.gp-dashboard-tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 24px;
}

@media (max-width: 768px) {
  .gp-dashboard-tables-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   5. TABLEAUX MODERNES (AUCUNE LIGNE VERTICALE, SÉPARATEURS DISCRETS)
   ============================================================ */
.gp-table-container {
  overflow-x: auto;
  width: 100%;
}

.gp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.gp-table th {
  padding: 9px 14px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  border-left: none !important;
  border-right: none !important;
  white-space: nowrap;
}

.gp-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  border-left: none !important;
  border-right: none !important;
  font-size: 12.5px;
  color: var(--text-secondary);
  vertical-align: middle;
}

.gp-table tbody tr {
  transition: background-color 0.15s ease;
}

.gp-table tbody tr:hover {
  background-color: var(--bg-card-hover) !important;
}

.gp-text-right { text-align: right; }
.gp-text-center { text-align: center; }
.gp-font-semibold { font-weight: 600; }
.gp-doc-number, .gp-doc-number-bold { font-family: var(--font-heading); font-size: 14px; font-weight: 600; color: var(--primary); }
.gp-client-primary-name { font-weight: 600; color: var(--text-primary); }
.gp-table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.gp-table-empty { padding: 48px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* Cellule utilisateur dans le tableau */
.gp-user-cell { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-secondary); }
.gp-user-cell-name { font-weight: 500; }

/* ============================================================
   6. BADGES DE STATUT (FORMAT « PILL » PASTEL TRÈS DOUX)
   ============================================================ */
.gp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3.5px 11px;
  border-radius: var(--radius-pill);
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.gp-badge-sm { font-size: 10.5px; padding: 2.5px 9px; }
.gp-badge-xs { font-size: 10px; padding: 2px 7px; }

.gp-badge-slate { background: var(--color-slate-dim); color: var(--color-slate); border: 1px solid var(--color-slate-border); }
.gp-badge-sky { background: var(--color-sky-dim); color: var(--color-sky); border: 1px solid var(--color-sky-border); }
.gp-badge-lime { background: var(--primary-dim); color: var(--primary); border: 1px solid var(--primary-border); }
.gp-badge-emerald { background: var(--color-emerald-dim); color: var(--color-emerald); border: 1px solid var(--color-emerald-border); }
.gp-badge-amber { background: var(--color-amber-dim); color: var(--color-amber); border: 1px solid var(--color-amber-border); }
.gp-badge-rose { background: var(--color-rose-dim); color: var(--color-rose); border: 1px solid var(--color-rose-border); }
.gp-badge-purple { background: var(--color-purple-dim); color: var(--color-purple); border: 1px solid var(--color-purple-border); }

.gp-badge-outline-lime { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.gp-badge-outline-sky { background: transparent; color: var(--color-sky); border: 1px solid var(--color-sky); }
.gp-badge-outline-amber { background: transparent; color: var(--color-amber); border: 1px solid var(--color-amber); }
.doc-link-badge { cursor: pointer; }

.gp-status-quick-select {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
}

/* ============================================================
   7. PROFIL UTILISATEUR & AVATAR DANS LA SIDEBAR
   ============================================================ */
.gp-user-profile-badge {
  margin: 10px 14px 4px 14px;
  padding: 9px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gp-user-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--primary-border);
}

.gp-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.gp-user-meta { flex: 1; overflow: hidden; }
.gp-user-display-name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-user-email-text { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   8. CLIENTS : CARTES, AVATARS ET LOGOS
   ============================================================ */
.gp-clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.gp-client-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.gp-client-card:hover {
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.gp-client-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.gp-client-avatar {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 2px;
  box-sizing: border-box;
  box-shadow: var(--shadow-sm);
}

.gp-client-avatar-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.gp-client-header-info { overflow: hidden; }
.gp-client-company { font-size: 15px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-client-contact-name { font-size: 12px; color: var(--text-muted); }
.gp-client-card-body { padding: 16px 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.gp-client-info-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.gp-client-link { color: var(--text-secondary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-client-link:hover { color: var(--primary); }
.gp-client-address { color: var(--text-muted); font-size: 12.5px; line-height: 1.35; }
.gp-client-legal-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }

.gp-client-stats-bar { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border-subtle); }
.gp-client-stat-pill { font-size: 11.5px; color: var(--text-secondary); background: var(--bg-subtle); padding: 4px 8px; border-radius: 6px; }
.gp-stat-val { font-weight: 700; color: var(--primary); }
.gp-client-turnover { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; padding-top: 6px; font-size: 12px; }
.gp-turnover-label { color: var(--text-muted); }
.gp-turnover-val { font-size: 14px; font-weight: 600; color: var(--color-emerald); }
.gp-client-card-footer { padding: 12px 20px; border-top: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; background: var(--bg-surface); }

/* Upload de Logo et Photo Client */
.gp-avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.gp-client-logo-preview {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  border: 2px dashed var(--border-default);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 2px;
  box-sizing: border-box;
}

.gp-client-logo-preview img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.gp-avatar-upload-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Upload & Prévisualisation du Logo Entreprise et Cachet (Paramètres) */
.gp-logo-upload-container {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.gp-logo-preview-box,
.gp-stamp-preview-box {
  width: 140px;
  height: 90px;
  border-radius: 12px;
  border: 2px dashed var(--border-default);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 8px;
  box-sizing: border-box;
}

.gp-logo-preview-img,
.gp-stamp-preview-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.gp-logo-placeholder {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

.gp-logo-upload-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}

/* ============================================================
   9. MODALES (GLASSMORPHISM SOFT & ELEVATION)
   ============================================================ */
.gp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(5px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease-out;
}

.gp-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 18px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  animation: scaleUp 0.15s ease-out;
}

.gp-modal-md { max-width: 620px; }
.gp-modal-lg { max-width: 920px; }

.gp-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gp-modal-title {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.gp-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease;
}
.gp-modal-close:hover { color: var(--text-primary); }

.gp-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.gp-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-surface);
}

.gp-form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
.gp-form-group { margin-bottom: 14px; }

/* ============================================================
   10. FILTRES, RECHERCHE & TOASTS
   ============================================================ */
.gp-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.gp-status-filter-pills { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding-bottom: 4px; }

.gp-filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.gp-filter-pill:hover { background: var(--bg-subtle); color: var(--text-primary); }
.gp-filter-pill.active { background: var(--primary-dim); color: var(--primary); border-color: var(--primary-border); font-weight: 600; }
.gp-pill-count { font-size: 11px; padding: 1px 6px; border-radius: var(--radius-pill); background: var(--bg-subtle); }

.gp-search-wrapper { position: relative; flex: 1; max-width: 480px; }
.gp-search-sm { max-width: 340px; }
.gp-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); }
.gp-search-input { padding-left: 36px; padding-right: 32px; }
.gp-search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }

/* Toasts */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.gp-toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow-modal); font-size: 13.5px; color: var(--text-primary); min-width: 280px; max-width: 420px; animation: slideInRight 0.2s ease-out; }
.gp-toast-success { border-left: 4px solid var(--color-emerald); }
.gp-toast-success .gp-toast-icon { color: var(--color-emerald); }
.gp-toast-error { border-left: 4px solid var(--color-rose); }
.gp-toast-error .gp-toast-icon { color: var(--color-rose); }
.gp-toast-warning { border-left: 4px solid var(--color-amber); }
.gp-toast-warning .gp-toast-icon { color: var(--color-amber); }
.gp-toast-info { border-left: 4px solid var(--color-sky); }
.gp-toast-info .gp-toast-icon { color: var(--color-sky); }
.gp-toast-icon { font-size: 16px; font-weight: 700; }
.gp-toast-message { flex: 1; }
.gp-toast-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.gp-toast.fade-out { opacity: 0; transform: translateY(10px); transition: all 0.25s ease-out; }

/* ============================================================
   11. MODULE COMPTE EURO (€)
   ============================================================ */
.gp-euro-balance-card {
  border-left: 4px solid var(--primary);
}
.gp-euro-kpi-card:hover {
  border-color: var(--primary-border);
  transform: translateY(-2px);
  transition: all var(--transition-fast);
}
.gp-euro-filter-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.gp-filter-tabs {
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
}
.gp-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.gp-filter-tab:hover {
  color: var(--text-primary);
}
.gp-filter-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.gp-search-box-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.gp-search-clear-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}
.gp-search-clear-btn:hover {
  color: var(--text-primary);
}

.gp-euro-table th {
  font-size: 11px;
  letter-spacing: 0.5px;
}
.gp-euro-row {
  transition: background var(--transition-fast);
}
.gp-euro-row:hover {
  background: var(--bg-card-hover);
}
.gp-row-credit td:first-child {
  border-left: 3px solid var(--color-emerald) !important;
}
.gp-row-debit td:first-child {
  border-left: 3px solid var(--color-rose) !important;
}
.gp-tx-desc-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}
.gp-tx-amount {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}
.gp-tx-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.gp-type-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gp-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.gp-toggle-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.gp-toggle-btn.active-credit {
  background: var(--color-emerald-dim);
  border-color: var(--color-emerald);
  color: var(--color-emerald);
}
.gp-toggle-btn.active-debit {
  background: var(--color-rose-dim);
  border-color: var(--color-rose);
  color: var(--color-rose);
}

.gp-tx-preview-card {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-default);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 14px;
}
.gp-preview-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.gp-pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
}
.gp-pagination-buttons {
  display: flex;
  gap: 8px;
}

/* ============================================================
   12. MODULE DE CALCUL & CHIFFRAGE COMMERCIAL
   ============================================================ */
.gp-pricing-params-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
}
.gp-pricing-params-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1024px) {
  .gp-pricing-params-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .gp-pricing-params-grid {
    grid-template-columns: 1fr;
  }
}

.gp-pricing-table-container {
  overflow-x: auto;
}
.gp-pricing-table {
  min-width: 1100px;
}
.gp-pricing-table th {
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 10px 12px;
}
.gp-pricing-table td {
  padding: 8px 10px;
  vertical-align: middle;
}
.gp-pricing-row input {
  font-size: 13px;
}
.gp-pricing-foot-row td {
  padding: 14px 10px;
  font-size: 13.5px;
  background: var(--bg-subtle);
  border-top: 2px solid var(--border-highlight);
}

/* ============================================================
   13. FORMULAIRE DE DOCUMENT (DEVIS, FACTURE, BL, FCC)
   ============================================================ */
.gp-doc-badge-pill { font-size: 16px; font-weight: 700; padding: 2px 10px; background: var(--bg-subtle); color: var(--text-primary); border-radius: var(--radius-pill); border: 1px solid var(--border-default); }
.gp-doc-form-card { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: 18px; padding: 28px; box-shadow: var(--shadow-card); }
.gp-form-section { border-bottom: 1px solid var(--border-subtle); padding-bottom: 24px; }
.gp-form-section:last-of-type { border-bottom: none; padding-bottom: 0; }
.gp-form-section-title { font-size: 15px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; margin-bottom: 16px; letter-spacing: -0.01em; }
.gp-sec-number { color: var(--primary); font-family: var(--font-mono); font-size: 12px; background: var(--primary-dim); padding: 2px 7px; border-radius: 6px; }
.gp-form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gp-form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

@media (max-width: 860px) {
  .gp-form-grid-3, .gp-form-grid-2 { grid-template-columns: 1fr; }
}

.gp-items-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.gp-items-table th { background: var(--bg-subtle); }
.gp-items-table input.gp-input, .gp-items-table select.gp-select { padding: 7px 10px; font-size: 13px; }
.gp-items-quick-actions { margin-top: 10px; }

.gp-totals-and-notes-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: flex-start; }
@media (max-width: 860px) { .gp-totals-and-notes-layout { grid-template-columns: 1fr; } }

.gp-financial-summary-card { background: var(--bg-subtle); border: 1px solid var(--border-default); border-radius: 14px; padding: 20px; }
.gp-summary-line { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; margin-bottom: 10px; color: var(--text-secondary); }
.gp-summary-value { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.gp-summary-divider { height: 1px; background: var(--border-default); margin: 14px 0; }
.gp-summary-total { font-size: 15px; font-weight: 700; margin-bottom: 0; color: var(--text-primary); }
.gp-summary-total .gp-summary-value { font-size: 22px; font-weight: 700; color: var(--primary); }

.gp-conversion-card { background: var(--primary-dim); border: 1px dashed var(--primary-border); border-radius: 12px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gp-conversion-title { font-size: 15px; font-weight: 600; color: var(--primary); }
.gp-conversion-desc { font-size: 12.5px; color: var(--text-muted); }

/* ============================================================
   14. NOTIFICATIONS DRAWER
   ============================================================ */
.gp-notif-bell-btn {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.gp-notif-bell-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-highlight);
}
.gp-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-rose);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
}

.gp-notif-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 250;
  display: flex;
  justify-content: flex-end;
  animation: fadeIn 0.2s ease-out;
}

.gp-notif-drawer {
  width: 100%;
  max-width: 440px;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(15, 23, 42, 0.15);
  animation: slideInDrawer 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInDrawer {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.gp-notif-drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}
.gp-notif-drawer-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gp-notif-drawer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.gp-notif-filter-tabs {
  display: flex;
  background: var(--bg-subtle);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 6px;
  overflow-x: auto;
}
.gp-notif-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.gp-notif-tab:hover {
  color: var(--text-primary);
}
.gp-notif-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  border-color: var(--border-default);
  box-shadow: var(--shadow-sm);
}

.gp-notif-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gp-notif-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.gp-notif-card:hover {
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-card);
}
.gp-notif-danger {
  border-left: 3.5px solid var(--color-rose);
  background: var(--color-rose-dim);
}
.gp-notif-warning {
  border-left: 3.5px solid var(--color-amber);
  background: var(--color-amber-dim);
}
.gp-notif-info {
  border-left: 3.5px solid var(--color-sky);
  background: var(--color-sky-dim);
}

.gp-notif-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gp-notif-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.gp-notif-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.gp-notif-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}
.gp-notif-amount {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
}
.gp-notif-actions-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gp-notif-empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}
.gp-notif-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-emerald-dim);
  color: var(--color-emerald);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
  border: 1px solid var(--color-emerald-border);
}

.gp-notif-drawer-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================================
   15. PARAMÈTRES & ONGLETS
   ============================================================ */
.gp-settings-nav-tabs {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 5px;
  gap: 4px;
  margin-bottom: 24px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.gp-settings-nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.gp-settings-nav-tab:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}
.gp-settings-nav-tab.active {
  background: var(--primary-dim);
  color: var(--primary);
  font-weight: 600;
}

.gp-color-swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.gp-color-swatch-card {
  background: var(--bg-subtle);
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.gp-color-swatch-card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
}
.gp-color-swatch-card.active {
  border-color: var(--primary);
  background: var(--primary-dim);
}
.gp-swatch-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-sm);
}
.gp-swatch-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.gp-bg-swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.gp-bg-swatch-card {
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.gp-bg-swatch-card:hover {
  transform: translateY(-2px);
}
.gp-bg-swatch-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-dim);
}

/* Modèles de documents */
.gp-models-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.gp-model-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-fast);
}
.gp-model-card:hover {
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-card-hover);
}
.gp-model-card-header {
  padding: 16px 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gp-model-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.gp-model-card-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gp-model-preview-sheet {
  background: #ffffff;
  color: #000000;
  border-radius: 6px;
  padding: 12px;
  font-family: Arial, sans-serif;
  font-size: 9px;
  box-shadow: var(--shadow-sm);
  user-select: none;
  max-height: 140px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-default);
}
.gp-model-preview-sheet::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.95) 100%);
}
.gp-model-desc-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.gp-model-card-footer {
  padding: 12px 18px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================================
   16. FLUIDITÉ ET ANIMATIONS MICRO-INTERACTIONS
   ============================================================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleUp { from { transform: scale(0.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

@keyframes gpViewFadeInUp {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.gp-main-content > * {
  animation: gpViewFadeInUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Utilitaires espacement */
.gp-mt-1 { margin-top: 4px; }
.gp-mt-2 { margin-top: 8px; }
.gp-mt-3 { margin-top: 14px; }
.gp-mt-4 { margin-top: 20px; }
.gp-mb-1 { margin-bottom: 4px; }
.gp-mb-2 { margin-bottom: 8px; }
.gp-mb-3 { margin-bottom: 14px; }
.gp-mb-4 { margin-bottom: 20px; }
.gp-ml-2 { margin-left: 8px; }
.gp-text-xs { font-size: 11px; }
.gp-text-sm { font-size: 12.5px; }
.gp-text-muted { color: var(--text-muted); }
.gp-font-bold { font-weight: 700; }
.gp-grid-col-full { grid-column: 1 / -1; }

.gp-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-default);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.gp-empty-icon { font-size: 40px; margin-bottom: 12px; }
.gp-empty-title { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.gp-empty-desc { font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   17. BOUTONS & ACCENTS NÉON GLASSMORHPISM
   ============================================================ */
.gp-btn-cyan {
  background: rgba(0, 240, 255, 0.12);
  color: #00F0FF !important;
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}
.gp-btn-cyan:hover {
  background: #00F0FF;
  color: #080C14 !important;
  border-color: #00F0FF;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.45);
  transform: translateY(-1px);
}

.gp-btn-emerald {
  background: #10B981;
  color: #FFFFFF !important;
  border-color: #10B981;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}
.gp-btn-emerald:hover {
  background: #059669;
  border-color: #059669;
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.gp-btn-rose {
  background: #EF4444;
  color: #FFFFFF !important;
  border-color: #EF4444;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
}
.gp-btn-rose:hover {
  background: #DC2626;
  border-color: #DC2626;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

.gp-text-cyan { color: #00F0FF; }

/* ============================================================
   18. CALENDRIER INTERACTIF & ÉVÉNEMENTS (DASHBOARD)
   ============================================================ */
.gp-calendar-dashboard-section {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 992px) {
  .gp-calendar-dashboard-section {
    grid-template-columns: 1fr;
  }
}

.gp-calendar-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.gp-calendar-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.gp-calendar-month-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.gp-calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.gp-calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.gp-calendar-day-cell {
  min-height: 48px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.gp-calendar-day-cell:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.25);
  transform: translateY(-1px);
}

.gp-calendar-day-cell.other-month {
  opacity: 0.3;
  pointer-events: none;
}

.gp-calendar-day-cell.today {
  border-color: #00F0FF;
  background: rgba(0, 240, 255, 0.12);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.gp-calendar-day-cell.selected {
  border-color: #00F0FF;
  background: rgba(0, 240, 255, 0.2);
}

.gp-calendar-day-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.gp-calendar-dots-wrap {
  display: flex;
  gap: 3px;
  margin-top: auto;
}

.gp-calendar-event-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.gp-dot-echeance { background: #EF4444; box-shadow: 0 0 5px #EF4444; }
.gp-dot-livraison { background: #00F0FF; box-shadow: 0 0 5px #00F0FF; }
.gp-dot-reunion { background: #A855F7; box-shadow: 0 0 5px #A855F7; }
.gp-dot-relance { background: #F59E0B; box-shadow: 0 0 5px #F59E0B; }

/* Volet latéral des événements du jour */
.gp-calendar-side-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.gp-calendar-side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.gp-calendar-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 380px;
}

.gp-calendar-event-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(11, 15, 28, 0.6);
  border-left: 3px solid #00F0FF;
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.gp-calendar-event-item:hover {
  background: rgba(16, 22, 44, 0.85);
  transform: translateX(2px);
}

.gp-calendar-event-item.type-ECHEANCE { border-left-color: #EF4444; }
.gp-calendar-event-item.type-LIVRAISON { border-left-color: #00F0FF; }
.gp-calendar-event-item.type-REUNION { border-left-color: #A855F7; }
.gp-calendar-event-item.type-RELANCE { border-left-color: #F59E0B; }

.gp-calendar-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.gp-calendar-event-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.gp-calendar-event-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 4px;
}

/* ============================================================
   19. TO-DO LIST (TÂCHES & PRIORITÉS DU DASHBOARD)
   ============================================================ */
.gp-todo-section {
  margin-bottom: 24px;
}

.gp-todo-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.gp-todo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.gp-todo-form-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .gp-todo-form-bar {
    flex-direction: column;
  }
}

.gp-todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gp-todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(11, 15, 28, 0.6);
  border: 1px solid var(--border-default);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.gp-todo-item:hover {
  background: rgba(16, 22, 44, 0.8);
  border-color: rgba(0, 240, 255, 0.25);
  transform: translateY(-1px);
}

.gp-todo-item.completed {
  opacity: 0.55;
  background: rgba(11, 15, 28, 0.35);
}

.gp-todo-item.completed .gp-todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.gp-todo-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.gp-todo-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid rgba(0, 240, 255, 0.5);
  accent-color: #00F0FF;
  cursor: pointer;
}

.gp-todo-text {
  font-size: 13.5px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
}

.gp-todo-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.gp-priority-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gp-priority-haute {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.gp-priority-moyenne {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.gp-priority-basse {
  background: rgba(0, 240, 255, 0.12);
  color: #00F0FF;
  border: 1px solid rgba(0, 240, 255, 0.35);
}

/* ============================================================
   20. MODAL DE PARTAGE & CHANNELS
   ============================================================ */
.gp-share-channel-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.gp-share-wa:hover {
  background: #25D366 !important;
  color: #080C14 !important;
}

.gp-share-mail:hover {
  background: #38BDF8 !important;
  color: #080C14 !important;
}

/* ============================================================
   21. JOURNAL D'ACTIVITÉ & AUDIT DE CONNEXIONS (SETTINGS)
   ============================================================ */
.gp-audit-table-wrap {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.gp-audit-filters-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px 20px;
  background: rgba(11, 15, 28, 0.5);
  border-bottom: 1px solid var(--border-default);
}

@media (max-width: 768px) {
  .gp-audit-filters-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

.gp-audit-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  letter-spacing: 0.04em;
}

.gp-audit-connexion { background: rgba(16, 185, 129, 0.15); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.35); }
.gp-audit-deconnexion { background: rgba(148, 163, 184, 0.15); color: #94A3B8; border: 1px solid rgba(148, 163, 184, 0.3); }
.gp-audit-facture { background: rgba(0, 240, 255, 0.15); color: #00F0FF; border: 1px solid rgba(0, 240, 255, 0.35); }
.gp-audit-bl { background: rgba(245, 158, 11, 0.15); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.35); }
.gp-audit-fcc { background: rgba(168, 85, 247, 0.15); color: #A855F7; border: 1px solid rgba(168, 85, 247, 0.35); }
.gp-audit-euro { background: rgba(56, 189, 248, 0.15); color: #38BDF8; border: 1px solid rgba(56, 189, 248, 0.35); }
.gp-audit-delete { background: rgba(239, 68, 68, 0.15); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.35); }

/* ============================================================
   22. MODULE DE STOCK & EMPLACEMENTS (MK ERP v1.0.4)
   ============================================================ */
.gp-table-stock th {
  background: rgba(20, 26, 48, 0.85);
  position: sticky;
  top: 0;
  z-index: 2;
}

.gp-stock-row:hover {
  background: rgba(0, 240, 255, 0.04) !important;
}

.gp-stock-table-card {
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-card);
}
