/* ==========================================================================
   « Trouver un pro » (accueil) et « Les pros par domaine ».
   Chargée sur toutes les pages : aucun style ne dépend d'une page précise.
   Couleurs et rayons issus du thème (clair et sombre).
   ========================================================================== */

/* ---------- Trouver un pro (accueil) ---------- */
.pro-teaser {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 24px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(16, 185, 129, .12), transparent 60%),
    linear-gradient(160deg, var(--primary-soft) 0%, var(--surface) 62%);
  border: 1px solid var(--border);
}

.pro-teaser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  flex-wrap: wrap;
}
.pro-teaser-title { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.pro-teaser-title h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--text-primary);
}
.pro-teaser-title p { margin: .15rem 0 0; font-size: .86rem; color: var(--text-secondary); }
.pro-teaser-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #1E3A8A);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .25);
}
.pro-teaser-all {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 42px;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
.pro-teaser-all:hover { border-color: var(--primary); background: var(--primary-soft); }
.pro-teaser-all:focus-visible,
.pro-tile:focus-visible,
.pd-card:focus-visible { outline: 3px solid var(--primary-ring, rgba(37, 99, 235, .35)); outline-offset: 3px; }

.pro-teaser-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 900px) { .pro-teaser-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.pro-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  min-width: 0;
  padding: 1.1rem .7rem .95rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pro-tile:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 14px 28px rgba(37, 99, 235, .14);
}
.pro-tile.is-sector::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: 20px 20px 0 0;
  background: var(--success);
}

.pro-tile-photo {
  width: 76px;
  height: 76px;
  margin-bottom: .25rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-soft), var(--success-soft));
  color: var(--primary);
  font-size: 1.6rem;
  font-weight: 800;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--border);
}
.pro-tile-photo img { width: 100%; height: 100%; object-fit: cover; }

.pro-tile-name {
  max-width: 100%;
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pro-tile-domain {
  max-width: 100%;
  padding: .18rem .6rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .74rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pro-tile-rating { font-size: .8rem; font-weight: 700; color: var(--text-primary); }
.pro-tile-rating .star { color: #F59E0B; }
.pro-tile-rating .muted { font-weight: 600; color: var(--text-secondary); }
.pro-tile-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; min-height: 20px; }

.pro-teaser-empty,
.pro-teaser-lock {
  display: flex;
  align-items: center;
  gap: .9rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.2rem;
  border-radius: 20px;
  border: 1px dashed var(--border);
  background: var(--surface);
  color: var(--text-secondary);
}
.pro-teaser-empty p, .pro-teaser-lock p { margin: 0; }
.pro-teaser-lock-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--success-soft);
  color: var(--success-ink, #047857);
}
.pro-teaser-lock-body { flex: 1; min-width: 200px; }
.pro-teaser-lock > .btn { margin-left: auto; }

/* ---------- Les pros par domaine ---------- */
.dm { display: grid; gap: 1.25rem; }

.dm-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.dm-kicker {
  margin: 0 0 .25rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--primary);
}
.dm-title {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text-primary);
}
.dm-sub { margin: .3rem 0 0; font-size: .92rem; color: var(--text-secondary); }
.dm-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.dm-actions .btn { min-height: 44px; display: inline-flex; align-items: center; gap: .4rem; }

.dm-grid {
  display: grid;
  gap: .9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 700px) { .dm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .dm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.dm-card {
  --tone: #2563EB;
  --tone-soft: #EFF6FF;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  min-width: 0;
  padding: 1.05rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  text-decoration: none;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dm-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--tone-soft);
  opacity: .9;
  pointer-events: none;
}
.dm-card > * { position: relative; z-index: 1; }
.dm-card:hover {
  transform: translateY(-3px);
  border-color: var(--tone);
  box-shadow: 0 16px 30px color-mix(in srgb, var(--tone) 18%, transparent);
}
.dm-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--tone) 45%, transparent); outline-offset: 3px; }

.dm-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dm-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  background: var(--tone);
  box-shadow: 0 8px 16px color-mix(in srgb, var(--tone) 30%, transparent);
}
.dm-count {
  min-width: 34px;
  height: 34px;
  padding: 0 .6rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--tone);
  font-size: .95rem;
  font-weight: 800;
}
.dm-name {
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
.dm-meta { font-size: .8rem; font-weight: 600; color: var(--text-secondary); }

.dm-avatars { display: flex; align-items: center; min-height: 34px; }
.dm-avatar {
  width: 34px;
  height: 34px;
  margin-left: -8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--tone-soft);
  color: var(--tone);
  font-size: .8rem;
  font-weight: 800;
}
.dm-avatars .dm-avatar:first-child { margin-left: 0; }
.dm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dm-avatar-more {
  margin-left: -8px;
  height: 34px;
  padding: 0 .55rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--tone-soft);
  color: var(--tone);
  font-size: .76rem;
  font-weight: 800;
  border: 2px solid var(--surface);
}

.dm-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .86rem;
  font-weight: 800;
  color: var(--tone);
}

/* Palette : une couleur par domaine, en cycle. */
.dm-tone-1 { --tone: #2563EB; --tone-soft: #EFF6FF; }
.dm-tone-2 { --tone: #10B981; --tone-soft: #ECFDF5; }
.dm-tone-3 { --tone: #F59E0B; --tone-soft: #FFFBEB; }
.dm-tone-4 { --tone: #7C3AED; --tone-soft: #F5F3FF; }
.dm-tone-5 { --tone: #0D9488; --tone-soft: #F0FDFA; }
.dm-tone-6 { --tone: #DB2777; --tone-soft: #FDF2F8; }
:root[data-theme="dark"] .dm-card::after,
:root:not([data-theme="light"]) .dm-card::after { opacity: .18; }

.dm-empty {
  display: grid;
  justify-items: center;
  gap: .4rem;
  padding: 2.5rem 1rem;
  text-align: center;
  border-radius: 22px;
  border: 1px dashed var(--border);
  background: var(--surface);
  color: var(--text-secondary);
}
.dm-empty p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .pro-tile, .dm-card, .pro-teaser-all { transition: none; }
  .pro-tile:hover, .dm-card:hover { transform: none; }
}
