/**
 * Panneau de suggestions. Couleurs en variables : une charte cliente les
 * remplace sans toucher à ce fichier.
 */
:root {
  --wy-rech-fond: #fff;
  --wy-rech-texte: #14201F;
  --wy-rech-doux: #6B7775;
  --wy-rech-trait: #DCE2DF;
  --wy-rech-actif: #EEF4F3;
  --wy-rech-accent: var(--wy-vert, #0B5E63);
  --wy-rech-marque: #FFF1B8;
}

.wy-rech { position: relative; }

.wy-rech__panneau {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: min(520px, 92vw);
  max-height: min(70vh, 560px);
  overflow-y: auto;
  z-index: 200;
  background: var(--wy-rech-fond);
  border: 1px solid var(--wy-rech-trait);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(20, 32, 31, .14);
  padding: 6px;
  font-size: .92rem;
  text-align: left;
}
.wy-rech__panneau[hidden] { display: none; }

.wy-rech__panneau a { color: var(--wy-rech-texte); text-decoration: none; }
.wy-rech__panneau mark { background: var(--wy-rech-marque); color: inherit; padding: 0; border-radius: 2px; }

.wy-rech__groupe { padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px solid var(--wy-rech-trait); }
.wy-rech__famille { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; font-weight: 600; }
.wy-rech__type { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wy-rech-accent); }
.wy-rech__nb { margin-left: auto; font-weight: 400; color: var(--wy-rech-doux); font-size: .82rem; }

.wy-rech__produit { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 6px; }
.wy-rech__produit img, .wy-rech__vide { width: 48px; height: 48px; flex: none; object-fit: contain; border-radius: 4px; background: #fff; border: 1px solid var(--wy-rech-trait); }
.wy-rech__texte { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.wy-rech__marque { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wy-rech-accent); }
.wy-rech__nom { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wy-rech__ref { font-size: .78rem; color: var(--wy-rech-doux); }
.wy-rech__prix { flex: none; font-weight: 700; white-space: nowrap; text-align: right; display: flex; flex-direction: column; }
.wy-rech__prix small { font-weight: 500; color: #A32D22; font-size: .72rem; }

.wy-rech__tout { display: block; padding: 10px; margin-top: 4px; border-top: 1px solid var(--wy-rech-trait); font-weight: 700; color: var(--wy-rech-accent) !important; text-align: center; border-radius: 0 0 6px 6px; }
.wy-rech__aucun { margin: 0; padding: 14px 12px; color: var(--wy-rech-doux); }

.wy-rech__panneau [role="option"]:hover,
.wy-rech__panneau [role="option"].est-actif { background: var(--wy-rech-actif); }

.wy-rech.est-en-cours input[name="s"] {
  background-image: linear-gradient(90deg, transparent, rgba(11, 94, 99, .08), transparent);
  background-size: 200% 100%;
  animation: wy-rech-charge 1s linear infinite;
}
@keyframes wy-rech-charge { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .wy-rech.est-en-cours input[name="s"] { animation: none; } }

@media (max-width: 600px) {
  .wy-rech__panneau { min-width: 0; max-height: 60vh; }
}
