/* ---------------------------------------------------------------------------
   Recherche.

   Deux formes selon la place disponible :

   - au-dessus de 1100 px, un champ visible en permanence dans la barre. La
     version précédente ne montrait qu'une icône, et il fallait la SURVOLER pour
     que le champ s'ouvre : rien ne signalait qu'on pouvait chercher, et au
     doigt le survol n'existe pas ;

   - en dessous, une icône qui déploie un panneau pleine largeur sous la barre.
     La version précédente masquait purement et simplement la recherche sous
     900 px — c'est-à-dire sur la moitié des visites.
   --------------------------------------------------------------------------- */

.nav-recherche {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 10px;
}

.nav-recherche-icone {
  position: absolute;
  left: 15px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--texte-faible, #83757f);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
  transition: stroke 0.2s;
}

.nav-recherche input {
  width: 260px;
  padding: 11px 18px 11px 44px;
  border: 1px solid var(--bord, rgba(246, 240, 245, 0.1));
  border-radius: 999px;
  background: rgba(246, 240, 245, 0.05);
  color: var(--texte, #f6f0f5);
  font: inherit;
  font-size: 0.92rem;
  transition: width 0.22s, border-color 0.2s, background 0.2s;
}

.nav-recherche input::placeholder { color: var(--texte-faible, #83757f); }

/* Le champ s'élargit à la saisie : au repos il laisse la place aux boutons
   d'action, une fois engagé il devient la commande principale. */
.nav-recherche input:focus {
  width: 330px;
  outline: none;
  border-color: rgba(232, 51, 109, 0.55);
  background: rgba(232, 51, 109, 0.08);
}

.nav-recherche input:focus + .nav-recherche-icone,
.nav-recherche:focus-within .nav-recherche-icone { stroke: var(--rose-clair, #ff5c8d); }

/* Le « x » natif de Safari et Chrome sur un champ de type search est gris et
   mal placé sur fond sombre. */
.nav-recherche input::-webkit-search-cancel-button { filter: invert(0.7); cursor: pointer; }

.nav-recherche-bouton {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-right: 8px;
  border: 1px solid var(--bord, rgba(246, 240, 245, 0.1));
  border-radius: 50%;
  background: rgba(246, 240, 245, 0.05);
  color: var(--texte-doux, #b8aab6);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.nav-recherche-bouton:hover { border-color: rgba(232, 51, 109, 0.5); color: #fff; }
.nav-recherche-bouton svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* --- Panneau des écrans étroits -------------------------------------------- */

.recherche-panneau {
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--bord, rgba(246, 240, 245, 0.1));
  background: rgba(14, 10, 14, 0.96);
}

.recherche-panneau form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
}

.recherche-panneau svg {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--texte-faible, #83757f);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.recherche-panneau input {
  flex: 1;
  min-width: 0;
  padding: 13px 18px 13px 46px;
  border: 1px solid var(--bord, rgba(246, 240, 245, 0.1));
  border-radius: 999px;
  background: rgba(246, 240, 245, 0.05);
  color: var(--texte, #f6f0f5);
  font: inherit;
}

.recherche-panneau input:focus {
  outline: none;
  border-color: rgba(232, 51, 109, 0.55);
}

.recherche-panneau button {
  flex-shrink: 0;
  padding: 13px 24px;
  border: none;
  border-radius: 999px;
  background: var(--degrade-marque, #e8336d);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* --- Bascule entre les deux formes ------------------------------------------ */

@media (max-width: 1100px) {
  .nav-recherche { display: none; }
  .nav-recherche-bouton { display: grid; }
}

@media (min-width: 1101px) {
  .recherche-panneau { display: none !important; }
}

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