/* ==========================================================
   RECHERCHE DE PRODUITS (bande d'accueil, champ, page de résultats)
   ========================================================== */

.cgea-recherche-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Bande sous la bannière d'accueil : le champ seul, sans fond ni texte */
.cgea-recherche-bande {
  padding: 24px 0;
  background: var(--gris-fond); /* même gris que la section suivante : transition sans rupture */
}
.cgea-recherche-bande-inner {
  max-width: 760px;
}

/* Champ + bouton loupe à l'intérieur du même cadre */
.cgea-recherche-form {
  position: relative;
  text-align: left;
}
.cgea-recherche-ligne {
  display: flex;
  align-items: stretch;
  background: var(--blanc);
  /* Contour gris moyen : contraste 3,65:1 sur blanc (minimum recommandé pour un champ : 3:1). */
  border: 1px solid #7B8798;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(10, 25, 41, .08);
  overflow: hidden;
}
.cgea-recherche-ligne:focus-within {
  outline: 2px solid var(--bleu-roi);
  outline-offset: 1px;
}
.cgea-recherche-ligne input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 13px 16px;
  font: inherit;
  font-size: 16px; /* évite le zoom automatique sur mobile */
  color: inherit;
  background: transparent;
  border: 0;
  outline: none; /* le cadre porte l'indicateur de focus (voir :focus-within) */
  -webkit-appearance: none;
  appearance: none;
}
.cgea-recherche-ligne .cgea-recherche-bouton {
  flex: 0 0 48px;
  width: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
.cgea-recherche-ligne .cgea-recherche-bouton:focus-visible {
  box-shadow: inset 0 0 0 2px var(--blanc), inset 0 0 0 4px var(--encre);
}

/* Suggestions */
.cgea-recherche-liste {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 30;
  margin: 4px 0 0;
  padding: 4px 0;
  list-style: none;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  max-height: 360px;
  overflow-y: auto;
}
.cgea-recherche-liste[hidden] {
  display: none;
}
.cgea-recherche-option {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  padding: 10px 16px;
  cursor: pointer;
}
.cgea-recherche-option:hover,
.cgea-recherche-option.is-active {
  background: var(--gris-fond);
}
.cgea-recherche-ref {
  font-weight: 700;
  color: var(--bleu-roi);
}
.cgea-recherche-marque {
  font-size: 13px;
  color: var(--gris-texte);
}
.cgea-recherche-titre {
  flex: 1 1 100%;
  font-size: 14px;
}
.cgea-recherche-option--tous {
  font-weight: 600;
  color: var(--bleu-roi);
  border-top: 1px solid var(--bordure);
}

/* Page de résultats */
.cgea-recherche-page h1 {
  margin-bottom: 18px;
}
.cgea-recherche-aide {
  margin: 14px 0 0;
  color: var(--gris-texte);
}
.cgea-recherche-compte {
  margin: 22px 0 12px;
  font-weight: 600;
}
.cgea-recherche-vide {
  margin-top: 28px;
  padding: 24px;
  background: var(--gris-fond);
  border-radius: 8px;
}
.cgea-recherche-vide h2 {
  margin-top: 0;
}

.cgea-recherche-tableau-wrap {
  overflow-x: auto;
}
.cgea-recherche-tableau {
  width: 100%;
  border-collapse: collapse;
  background: var(--blanc);
  border: 1px solid var(--bordure);
}
.cgea-recherche-tableau th,
.cgea-recherche-tableau td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--bordure);
}
.cgea-recherche-tableau th {
  background: var(--gris-fond);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.cgea-recherche-tableau td a:not(.cgea-btn) {
  color: var(--bleu-roi);
  text-decoration: none;
}
.cgea-recherche-tableau td a:not(.cgea-btn):hover {
  text-decoration: underline;
}
.cgea-recherche-action {
  text-align: right;
  white-space: nowrap;
}

.cgea-recherche-pagination {
  margin-top: 22px;
}
.cgea-recherche-pagination .page-numbers {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 2px 4px 0;
  border: 1px solid var(--bordure);
  border-radius: 4px;
  text-decoration: none;
  color: var(--bleu-roi);
}
.cgea-recherche-pagination .page-numbers.current {
  background: var(--bleu-roi);
  border-color: var(--bleu-roi);
  color: var(--blanc);
}

/* Mobile : chaque ligne devient une carte */
@media (max-width: 720px) {
  .cgea-recherche-tableau thead {
    position: absolute;
    left: -9999px;
  }
  .cgea-recherche-tableau,
  .cgea-recherche-tableau tbody,
  .cgea-recherche-tableau tr,
  .cgea-recherche-tableau td {
    display: block;
    width: 100%;
  }
  .cgea-recherche-tableau tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--bordure);
  }
  .cgea-recherche-tableau td {
    border: 0;
    padding: 4px 14px;
  }
  .cgea-recherche-tableau td[data-label]::before {
    content: attr(data-label) " : ";
    font-weight: 600;
    color: var(--gris-texte);
  }
  .cgea-recherche-action {
    text-align: left;
    padding-top: 8px;
  }
}

/* Produits « en liste seulement » (pages marque et catégorie, page Produits) */
.cgea-term-liste {
  margin-top: 40px;
}
.cgea-term-liste h2 {
  margin: 0 0 6px;
}
.cgea-term-liste-intro {
  margin: 0 0 16px;
  color: var(--gris-texte);
}
.cgea-recherche-voir-tout {
  margin: 18px 0 0;
}
