/* --------------------------------------------------
   Exemple de diagnostic (section contact, /contact/)
   Le prolongement de la fiche de recherche du hero : pilule de recherche, puis
   trois constats annotés. La seule pièce marquante de la section ; le reste se tait.
   -------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.diag {
  /* Vert : ce qui va ; rouge : ce qu'on reprendrait. Tons sourds, accordés à la pierre et au laiton. */
  --diag-good: #2f7a4a;
  --diag-bad: #b3412e;
  margin: 0 0 1.9rem;
  padding: 1.1rem 1.2rem 0.85rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

html[data-theme="dark"] .diag {
  --diag-good: #6cc08a;
  --diag-bad: #ec7b66;
}

.diag.is-changing {
  opacity: 0;
  transform: translateY(4px);
}

.diag__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 1.22rem;
  line-height: 1.25;
  color: var(--color-ink);
}

/* La recherche testée : une ligne de texte, pas un champ (aucun cadre, aucun fond). */
.contact-intro .diag__search {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--color-ink-muted);
}

.diag__search svg {
  flex: none;
  position: relative;
  top: 0.14em;
  width: 0.9rem;
  height: 0.9rem;
}

.diag__query {
  font-weight: 600;
  color: var(--color-ink);
  white-space: nowrap;
}

.diag__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-border);
}

.diag__item {
  display: grid;
  grid-template-columns: 1.15rem 6.4rem minmax(0, 1fr);
  column-gap: 0.7rem;
  align-items: baseline;
  padding: 0.7rem 0.1rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.diag__item + .diag__item {
  border-top: 1px solid var(--color-border);
}

.diag__subject {
  font-weight: 600;
  color: var(--color-ink);
}

.diag__text {
  color: var(--color-ink-soft);
}

/* Marques : disque vert coché = ce qui va ; disque rouge à croix = à reprendre. */
.diag__mark {
  position: relative;
  top: 0.2em;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
}

.diag__mark::after {
  content: "";
  position: absolute;
  inset: 0.22rem;
  background: #fff;
  -webkit-mask: var(--diag-icon) center / contain no-repeat;
  mask: var(--diag-icon) center / contain no-repeat;
}

.diag__item--bon .diag__mark {
  background: var(--diag-good);
  --diag-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.diag__item--a-reprendre .diag__mark {
  background: var(--diag-bad);
  --diag-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .diag__mark::after {
  background: #17181b;
}

.contact-intro .diag__note {
  margin: 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--color-ink-muted);
}

@media (max-width: 600px) {
  .diag {
    padding: 0.95rem 0.95rem 0.8rem;
  }

  .diag__item {
    grid-template-columns: 1.15rem minmax(0, 1fr);
    row-gap: 0.1rem;
  }

  .diag__text {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .diag {
    transition: none;
  }
}
