/* ==========================================================================
   Accueil : finition premium des cartes (domaines, professionnels) et des sections.
   Chargée après domains.css ; les couleurs des domaines restent celles de domains.css.
   ========================================================================== */

/* ----- Sections ----- */
.home { gap: 1.75rem; }
.home-section { display: grid; gap: 1rem; min-width: 0; }
.home-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.home-section-head h2 { margin: 0; font-size: 1.22rem; font-weight: 800; letter-spacing: -.015em; color: var(--text-primary); }
.home-section-head p, .home-section-head .muted { margin: .2rem 0 0; font-size: .88rem; color: var(--text-secondary); }

/* ----- Domaines : tuiles premium ----- */
.dom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
@media (min-width: 640px) { .dom-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; } }
@media (min-width: 1024px) { .dom-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; } }

.dom-tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: .9rem;
  min-width: 0;
  min-height: 150px;
  padding: 1.05rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--tone);
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 20px -14px rgba(15, 23, 42, .18);
  text-decoration: none !important;
  transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .2s ease, border-color .2s ease;
}
.dom-tile:hover, .dom-tile:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tone) 40%, var(--border));
  box-shadow: 0 16px 30px -12px color-mix(in srgb, var(--tone) 45%, transparent);
  color: var(--text-primary);
}
.dom-tile:focus-visible { outline: 3px solid color-mix(in srgb, var(--tone) 45%, transparent); outline-offset: 3px; }
.dom-tile::before { opacity: 0; } /* on n'utilise plus le voile plein : la carte reste nette */

.dom-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--tone), color-mix(in srgb, var(--tone) 70%, #0F172A));
  box-shadow: 0 8px 16px -6px color-mix(in srgb, var(--tone) 60%, transparent);
}
.dom-name {
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
.dom-badge {
  top: 12px;
  right: 12px;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  box-shadow: 0 4px 10px -4px rgba(239, 68, 68, .6);
}
:root[data-theme="dark"] .dom-tile, :root:not([data-theme="light"]) .dom-tile { background: var(--surface); }

/* ----- Trouver un pro : cartes et en-tête ----- */
.pro-teaser {
  padding: 1.35rem;
  border-radius: 26px;
  border: 1px solid var(--border);
  background:
    radial-gradient(90% 80% at 100% 0%, color-mix(in srgb, var(--success) 14%, transparent), transparent 60%),
    linear-gradient(160deg, var(--primary-soft) 0%, var(--surface) 60%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 36px -26px rgba(37, 99, 235, .35);
}
.pro-teaser-title h2 { font-size: 1.22rem; letter-spacing: -.015em; }
.pro-teaser-icon { border-radius: 16px; }
.pro-teaser-grid .pcard {
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 24px -18px rgba(15, 23, 42, .3);
}

/* ----- Mouvement : respecté selon la préférence du système ----- */
@media (prefers-reduced-motion: reduce) {
  .dom-tile, .dom-tile:hover, .dom-tile:focus-visible { transition: none; transform: none; }
}
