/*
 * profile-pages.css
 * Design system partagé : agency_detail · promoter_detail · agent-profile
 * -----------------------------------------------------------------------
 * Toutes les classes sont préfixées `.pp-` pour éviter les collisions.
 * Ce fichier remplace agency-detail.css et les <style> inline du promoteur.
 * -----------------------------------------------------------------------
 */

/* ── Hero compact ─────────────────────────────────────────────────────── */
.pp-hero {
  position: relative;
  height: 360px;
  overflow: hidden;
  background: #0f172a;
  border-radius: .75rem;
}
@media (max-width: 767px) {
  .pp-hero { height: 220px; border-radius: .5rem; }
}
.pp-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}
.pp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 20, 40, .75) 0%,
    rgba(10, 20, 40, .18) 55%,
    transparent 100%
  );
}

/* ── Page shell ───────────────────────────────────────────────────────── */
.pp-shell {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px)  { .pp-shell { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1280px) { .pp-shell { padding-left: 2rem;   padding-right: 2rem;   } }

/* ── Sidebar card ─────────────────────────────────────────────────────── */
.pp-sidebar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .07);
}
.dark .pp-sidebar-card {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}

/* Identity zone inside sidebar */
.pp-sidebar-identity {
  text-align: center;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}
.dark .pp-sidebar-identity { border-bottom-color: #1e293b; }

/* ── Main content card ────────────────────────────────────────────────── */
.pp-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}
.dark .pp-card {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

/* ── Section title ────────────────────────────────────────────────────── */
.pp-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}
.dark .pp-section-title { color: #f1f5f9; }
.pp-section-title .pp-icon {
  color: #2563eb;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ── Section header (title + count + optional link) ───────────────────── */
.pp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.pp-section-count {
  font-size: .8125rem;
  color: #94a3b8;
  white-space: nowrap;
  margin-left: .5rem;
}
.pp-section-link {
  font-size: .75rem;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
  white-space: nowrap;
}
.dark .pp-section-link { color: #60a5fa; }
.pp-section-link:hover { text-decoration: underline; }

/* ── Contact row ──────────────────────────────────────────────────────── */
.pp-contact-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .4rem 0;
  font-size: .875rem;
  color: #475569;
  text-decoration: none;
  transition: color .15s;
}
.dark .pp-contact-row { color: #94a3b8; }
a.pp-contact-row:hover       { color: #2563eb; }
.dark a.pp-contact-row:hover { color: #60a5fa; }
.pp-ci {                                  /* icon inside contact-row */
  color: #2563eb;
  font-size: 1.1rem;
  width: 1.25rem;
  flex-shrink: 0;
  margin-top: .1rem;
}

/* ── Sidebar divider ──────────────────────────────────────────────────── */
.pp-divider {
  border: none;
  border-top: 1px solid #f1f5f9;
  margin: 1.25rem 0;
}
.dark .pp-divider { border-color: #1e293b; }

/* ── Sidebar micro-label ──────────────────────────────────────────────── */
.pp-sidebar-label {
  font-size: .7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .5rem;
  display: block;
}

/* ── Stat cards ───────────────────────────────────────────────────────── */
.pp-stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: .875rem;
  padding: 1rem .75rem;
  text-align: center;
}
.dark .pp-stat-card {
  background: #1e293b;
  border-color: #334155;
}
.pp-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #2563eb;
  line-height: 1;
}
.dark .pp-stat-value { color: #60a5fa; }
.pp-stat-label {
  font-size: .68rem;
  color: #64748b;
  margin-top: .35rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.dark .pp-stat-label { color: #94a3b8; }

/* ── Social icon buttons ──────────────────────────────────────────────── */
.pp-social-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .5rem;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 1.15rem;
  transition: border-color .15s, color .15s, background .15s;
  text-decoration: none;
}
.dark .pp-social-btn { border-color: #334155; color: #94a3b8; }
.pp-social-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}
.dark .pp-social-btn:hover {
  border-color: #60a5fa;
  color: #60a5fa;
  background: rgba(37, 99, 235, .1);
}

.pp-social-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ── CTA buttons ──────────────────────────────────────────────────────── */
.pp-cta-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  background: var(--tk-brand);
  color: #ffffff !important;
  font-weight: 600;
  font-size: .875rem;
  padding: .75rem 1rem;
  border-radius: .875rem;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  transition: background .15s;
  line-height: 1.4;
}
.pp-cta-primary:hover { background: var(--tk-brand-hover); }

.pp-cta-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  background: transparent;
  color: #2563eb !important;
  font-weight: 600;
  font-size: .875rem;
  padding: .75rem 1rem;
  border-radius: .875rem;
  border: 1.5px solid #bfdbfe;
  cursor: pointer;
  text-decoration: none !important;
  transition: border-color .15s, background .15s;
  line-height: 1.4;
}
.pp-cta-secondary:hover { background: #eff6ff; border-color: #93c5fd; }
.dark .pp-cta-secondary { border-color: #1e40af; color: #93c5fd !important; }
.dark .pp-cta-secondary:hover { background: rgba(37, 99, 235, .1); }

/* ── Type / role badges ───────────────────────────────────────────────── */
.pp-type-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .22rem .7rem;
  border-radius: 9999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.pp-badge-agency   { background: #dbeafe; color: #1e40af; }
.dark .pp-badge-agency   { background: #1e3a8a; color: #93c5fd; }
.pp-badge-promoter { background: #d1fae5; color: #065f46; }
.dark .pp-badge-promoter { background: #064e3b; color: #6ee7b7; }
.pp-badge-agent    { background: #ede9fe; color: #5b21b6; }
.dark .pp-badge-agent    { background: #2e1065; color: #c4b5fd; }

/* ── Agent / person avatar ────────────────────────────────────────────── */
.pp-agent-avatar {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px #f8fafc, 0 4px 16px rgba(0, 0, 0, .12);
  display: block;
  margin: 0 auto;
}
.dark .pp-agent-avatar {
  box-shadow: 0 0 0 4px #1e293b, 0 4px 16px rgba(0, 0, 0, .4);
}

/* ── Map container ────────────────────────────────────────────────────── */
.pp-map {
  height: 300px;
  border-radius: .875rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.dark .pp-map { border-color: #334155; }
/* État vide : aucun marqueur exploitable, la carte n'est pas initialisée. */
.pp-map[hidden],
.pp-map-empty[hidden],
.pp-map-note[hidden] { display: none; }

/* ── Mobile compaction for agency/promoter pages ─────────────────────── */
@media (max-width: 767px) {
  .pp-shell {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .pp-hero {
    height: 92px;
    border-radius: 0.75rem;
  }

  .pp-sidebar-card {
    padding: 1rem;
    border-radius: 0.9rem;
  }

  .pp-sidebar-identity {
    padding-bottom: 0.9rem;
    margin-bottom: 0.9rem;
  }

  .pp-sidebar-identity .taktak-org-logo,
  .pp-sidebar-identity .taktak-org-logo--xl {
    --logo-size: 4rem;
    border-radius: 1rem;
  }

  .pp-sidebar-identity h1 {
    font-size: 1rem !important;
    line-height: 1.3 !important;
  }

  .pp-sidebar-identity p {
    font-size: 0.78rem !important;
  }

  .pp-type-badge,
  .pp-verified-badge {
    font-size: 0.66rem;
  }

  .pp-stat-card {
    padding: 0.75rem 0.5rem;
    border-radius: 0.8rem;
  }

  .pp-stat-value {
    font-size: 1.15rem;
  }

  .pp-stat-label {
    font-size: 0.62rem;
  }

  .pp-cta-primary,
  .pp-cta-secondary {
    padding: 0.7rem 0.85rem;
    font-size: 0.82rem;
    border-radius: 0.8rem;
  }

  .pp-contact-row {
    gap: 0.55rem;
    padding: 0.32rem 0;
    font-size: 0.8rem;
  }

  .pp-social-btn {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }

  .pp-social-row {
    gap: 0.5rem;
  }

  .pp-card {
    padding: 1rem;
    border-radius: 0.9rem;
  }

  .pp-section-header {
    align-items: flex-start;
    gap: 0.6rem;
    flex-direction: column;
    margin-bottom: 1rem;
  }

  .pp-section-title {
    font-size: 0.92rem;
    margin-bottom: 1rem;
    gap: 0.4rem;
  }

  .pp-section-title .pp-icon {
    font-size: 1.05rem;
  }

  .pp-section-count,
  .pp-section-link {
    font-size: 0.72rem;
  }

  .pp-map {
    height: 220px;
    border-radius: 0.8rem;
  }

  .pp-empty {
    padding: 2rem 0.75rem;
  }
}

/* ── Empty state (no content) ─────────────────────────────────────────── */
.pp-empty {
  text-align: center;
  padding: 3rem 1rem;
}
.pp-empty i {
  display: block;
  font-size: 3rem;
  margin-bottom: .75rem;
  color: #cbd5e1;
}
.dark .pp-empty i { color: #475569; }
.pp-empty p { color: #94a3b8; font-size: .875rem; }

/* ── Org logo fallback letter (org_logo component) ───────────────────── */
/* No overrides needed — the component handles it internally */

/* ── Dark mode: "light" navbar link colour fix ────────────────────────── */
/* Prevents navbar links going invisible in dark mode on pages that use    */
/* navbar-light.html (white background navbar).                            */
.dark #topnav.taktak-navbar-light .navigation-menu > li > a,
.dark #topnav.taktak-navbar-light .navigation-menu.nav-light > li > a,
.dark #topnav.taktak-navbar-light .navigation-menu > li > a.taktak-public-nav-link,
.dark #topnav.taktak-navbar-light.nav-sticky .navigation-menu > li > a,
.dark #topnav.taktak-navbar-light.nav-sticky .navigation-menu.nav-light > li > a {
  color: #e2e8f0 !important;
  -webkit-text-fill-color: #e2e8f0 !important;
}
