/* ═══════════════════════════════════════════════════════════════
   Mano — Dashboard (même style que l'app principale)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --white: #FFFFFF;
  --violet: #5D3A87;
  --violet-light: #7B52AB;
  --violet-dark: #4A2E6B;
  --gray-bg: #F5F5F5;
  --gray-border: #E0E0E0;
  --gray-text: #333333;
  --gray-light: #888888;
  --success: #34C759;
  --danger: #FF3B30;
  --warning: #FF9500;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --radius: 12px;
  --transition: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: var(--gray-text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ═══════ Topbar ═══════ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--violet);
  text-decoration: none;
}
.nav-logo:hover { opacity: 0.8; }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--violet);
  background: #F0EBF5;
  padding: 4px 12px;
  border-radius: 20px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  font-family: inherit;
}
.btn-outline {
  background: transparent;
  color: var(--gray-light);
  border: 1px solid var(--gray-border);
}
.btn-outline:hover { background: var(--gray-bg); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ═══════ Container ═══════ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* ═══════ Dashboard Header ═══════ */
.dashboard-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 8px;
}
.dashboard-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-text);
}
.dashboard-header em {
  font-style: normal;
  color: var(--violet);
}
.dash-meta {
  font-size: 13px;
  color: var(--gray-light);
}

/* ═══════ Section Labels ═══════ */
.sec-label {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--gray-light);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-border);
}

/* ═══════ Cards ═══════ */
.dash-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.dash-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-text);
  margin-bottom: 4px;
}
.dash-card-sub {
  font-size: 13px;
  color: var(--gray-light);
  margin-bottom: 20px;
}

/* ═══════ KPI Row ═══════ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.kpi-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--gray-text);
}
.kpi-label {
  font-size: 13px;
  color: var(--gray-light);
}
.kpi-trend {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 20px;
  background: #E8F9EE;
  color: #1B7A3D;
}

/* ═══════ Grid layouts ═══════ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px; }
  .container { padding: 20px 16px 40px; }
}

/* ═══════ Parcours metiers ═══════ */
.metier-block {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-bg);
}
.metier-block:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.metier-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  background: var(--gray-bg);
}
.metier-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.metier-badge-label {
  font-size: 13px;
  font-weight: 600;
}

.chemin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.chemin-bar-wrap {
  width: 120px;
  flex-shrink: 0;
  height: 7px;
  background: var(--gray-bg);
  border-radius: 4px;
  overflow: hidden;
}
.chemin-bar {
  height: 100%;
  border-radius: 4px;
}
.chemin-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-light);
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}
.chemin-label {
  font-size: 13px;
  color: #555;
  flex: 1;
}

/* ═══════ Hesitations ═══════ */
.hesit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.hesit-card {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 16px;
}
.hesit-count {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1;
}
.hesit-label {
  font-size: 12px;
  font-weight: 500;
  color: #555;
  margin-bottom: 2px;
}
.hesit-master-a {
  font-size: 13px;
  color: #333;
  font-weight: 600;
}
.hesit-master-b {
  font-size: 12px;
  color: var(--gray-light);
  margin-bottom: 14px;
}
.hesit-btn {
  width: 100%;
  padding: 8px 12px;
  font-size: 12px;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.15s;
}
.hesit-btn:hover { opacity: 0.8; }

/* ═══════ Secteurs croissance ═══════ */
.secteur-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.secteur-name {
  font-size: 13px;
  color: #555;
  width: 180px;
  flex-shrink: 0;
  text-align: right;
}
.secteur-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--gray-bg);
  border-radius: 4px;
  overflow: hidden;
}
.secteur-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--success);
}
.secteur-pct {
  font-size: 12px;
  font-weight: 700;
  color: #1B7A3D;
  width: 55px;
  flex-shrink: 0;
}

/* ═══════ Chart container ═══════ */
.chart-container {
  position: relative;
  width: 100%;
}

/* ═══════ Non partenaires ═══════ */
.nonpart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.nonpart-card {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 14px;
}
.nonpart-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}
.nonpart-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.nonpart-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-text);
}
.nonpart-sector {
  font-size: 11px;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.nonpart-bar-wrap {
  height: 5px;
  background: var(--gray-border);
  border-radius: 3px;
  margin-bottom: 6px;
  overflow: hidden;
}
.nonpart-bar {
  height: 100%;
  border-radius: 3px;
}
.nonpart-count {
  font-size: 12px;
  color: var(--gray-light);
}
.nonpart-count strong { font-weight: 600; }

/* ═══════ Campagnes ═══════ */
.camp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--gray-bg);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: background 0.15s;
}
.camp-row:hover { background: #ECECEC; }
.camp-info { flex: 1; min-width: 0; }
.camp-domaine {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.camp-secteur {
  font-size: 12px;
  color: var(--gray-light);
}
.camp-count { text-align: right; flex-shrink: 0; }
.camp-count-n {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.camp-count-label {
  font-size: 10px;
  color: var(--gray-light);
  text-transform: uppercase;
}
.camp-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  font-size: 12px;
  font-family: inherit;
  background: var(--violet);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.15s;
}
.camp-btn:hover { opacity: 0.85; }

/* ═══════ Modals ═══════ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 1000;
}
.modal-box {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-text);
  margin-bottom: 4px;
}
.modal-sub {
  font-size: 12px;
  color: var(--gray-light);
  margin-bottom: 18px;
}
.modal-info-box {
  background: var(--gray-bg);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--gray-light);
  line-height: 1.5;
}
.modal-label {
  font-size: 11px;
  color: var(--gray-light);
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.modal-input {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  background: var(--white);
  color: var(--gray-text);
  font-family: inherit;
  margin-bottom: 12px;
}
.modal-input:focus { outline: none; border-color: var(--violet); }
.modal-select {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  background: var(--white);
  color: var(--gray-text);
  font-family: inherit;
  margin-bottom: 12px;
}
.modal-textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  background: var(--white);
  color: var(--gray-text);
  font-family: inherit;
  resize: vertical;
  margin-bottom: 14px;
}
.modal-textarea:focus { outline: none; border-color: var(--violet); }
.modal-dropzone {
  border: 1.5px dashed var(--gray-border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  color: var(--gray-light);
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 12px;
}
.modal-dropzone:hover { border-color: var(--violet); color: var(--violet); }
.modal-actions { display: flex; gap: 8px; }
.modal-btn-cancel {
  flex: 1;
  padding: 9px;
  font-size: 13px;
  font-family: inherit;
  background: var(--gray-bg);
  color: var(--gray-light);
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}
.modal-btn-cancel:hover { background: var(--gray-border); }
.modal-btn-confirm {
  flex: 2;
  padding: 9px;
  font-size: 13px;
  font-family: inherit;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}
.modal-btn-confirm:hover { opacity: 0.9; }
.modal-success { text-align: center; padding: 12px 0; }
.modal-success-icon {
  width: 44px;
  height: 44px;
  background: #E8F9EE;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-success-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-text);
  margin-bottom: 4px;
}
.modal-success-sub {
  font-size: 13px;
  color: var(--gray-light);
  margin-bottom: 16px;
}
