/* ═══════════════ PAGE PARTENAIRES (Sous-traitants / Vendeurs / Apporteurs) ═══════════════
   Redesign des cartes + réutilisation du système sidepanel (voir dossiers.css : .sidepanel,
   .sp-section, .sp-field, .sp-field-row, .sp-readonly-value, .sidepanel-tabs, etc.) */

.ptn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.ptn-card {
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  display: flex;
  flex-direction: column;
}
.ptn-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1;
}

.ptn-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 10px;
}

.ptn-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  font-weight: 800;
  color: white;
}

.ptn-identity { flex: 1; min-width: 0; }
.ptn-identity h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0F172A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ptn-identity .ptn-contact-name {
  margin: 1px 0 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ptn-identity .ptn-coords {
  margin: 3px 0 0;
  font-size: 0.7rem;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ptn-score-pill {
  flex-shrink: 0;
  color: white;
  padding: 5px 9px;
  border-radius: 10px;
  text-align: center;
  min-width: 48px;
}
.ptn-score-pill .val { font-size: 1.05rem; font-weight: 900; line-height: 1; }
.ptn-score-pill .lbl { font-size: 0.58rem; opacity: 0.9; margin-top: 1px; letter-spacing: 0.03em; }

.ptn-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 0 14px 10px;
}
.ptn-badge {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
}

.ptn-bars {
  padding: 0 14px 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}
.ptn-bar-row { display: flex; align-items: center; gap: 6px; font-size: 0.68rem; }
.ptn-bar-row .lbl { width: 42px; color: #94a3b8; flex-shrink: 0; }
.ptn-bar-track { flex: 1; height: 5px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.ptn-bar-fill { height: 100%; border-radius: 3px; }
.ptn-bar-row .num { width: 22px; text-align: right; font-weight: 700; color: #0F172A; }
.ptn-no-score { margin: 0; color: #94a3b8; font-size: 0.78rem; text-align: center; padding: 6px 14px 12px; }

.ptn-card-actions {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  margin-top: auto;
}
.ptn-card-actions button {
  flex: 1;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: white;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
  transition: background 120ms;
}
.ptn-card-actions button:hover { background: #f1f5f9; }
.ptn-card-actions .ptn-btn-edit { border-color: #0F172A; background: #0F172A; color: white !important; }
.ptn-card-actions .ptn-btn-edit:hover { background: #1e293b; }

/* ── Sidepanel Partenaire : contenu spécifique, tabs/sections réutilisent dossiers.css ── */
.ptn-sp-header-icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 1.25rem; font-weight: 800; color: white; flex-shrink: 0;
}
.ptn-stat-tile {
  padding: 10px; background: #f8fafc; border-radius: 8px;
}
.ptn-stat-tile .ptn-stat-label { font-size: 0.68rem; color: #64748b; }
.ptn-stat-tile .ptn-stat-value { font-size: 1.15rem; font-weight: 800; color: #0F172A; margin-top: 2px; }
.ptn-stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px;
}
.ptn-roi-box { padding: 10px; border-radius: 8px; text-align: center; }
.ptn-contact-row, .ptn-echange-row {
  padding: 8px 10px; background: #f8fafc; border-radius: 8px; margin-bottom: 8px;
}
.ptn-contact-row:last-child, .ptn-echange-row:last-child { margin-bottom: 0; }
