/*
Theme Name:  MP'act Child
Template:    cityline
Version:     2.0
Text Domain: mpact-child
*/

/* Votre CSS custom ici ↓ */

/* ── Recherche live desktop ── */
.nsearch {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 4px;
}

.nsearch-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--tx, #1a1a2e);
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: color .2s, background .2s;
  position: relative;
  z-index: 2;
}
.nsearch-toggle:hover { background: rgba(30,111,217,.08); color: var(--bl); }

/* Wrapper champ + dropdown */
.nsearch-form {
  position: absolute;
  right: 34px;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-width .35s cubic-bezier(.4,0,.2,1), opacity .22s;
  z-index: 200;
  overflow: visible; /* laisse le dropdown déborder */
}
.nsearch-form.open {
  max-width: 320px;
  opacity: 1;
  pointer-events: auto;
}

/* Champ texte */
.nsearch-input {
  width: 100%;
  border: 1.5px solid rgba(30,111,217,.35);
  border-radius: 22px;
  outline: none;
  background: #fff;
  padding: 7px 36px 7px 14px;
  font-size: 13.5px;
  color: var(--tx, #1a1a2e);
  box-sizing: border-box;
  box-shadow: 0 2px 12px rgba(30,111,217,.10);
  transition: border-color .2s;
  -webkit-appearance: none;
}
.nsearch-input:focus { border-color: var(--bl); }
.nsearch-input::placeholder { color: #9aa3b0; }

/* Loupe dans le champ */
.nsearch-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bl);
  pointer-events: none;
  display: flex;
  align-items: center;
  /* Reste visible même si le dropdown est ouvert */
  z-index: 1;
}

/* Dropdown résultats */
.nsearch-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid rgba(30,111,217,.2);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(30,111,217,.13);
  overflow: hidden;
  display: none;
}
.nsearch-drop.has-results { display: block; }

.nsearch-drop-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--tx, #1a1a2e);
  border-bottom: 1px solid rgba(30,111,217,.07);
  transition: background .15s;
  cursor: pointer;
}
.nsearch-drop-item:last-child { border-bottom: none; }
.nsearch-drop-item:hover,
.nsearch-drop-item:focus { background: rgba(30,111,217,.06); outline: none; }

.nsearch-drop-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nsearch-drop-type {
  font-size: 11px;
  color: #9aa3b0;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* État chargement / vide */
.nsearch-drop-msg {
  padding: 12px 14px;
  font-size: 13px;
  color: #9aa3b0;
  text-align: center;
}

/* ── Recherche mobile ── */
.mm-search-form {
  display: flex;
  align-items: center;
  border: 1.5px solid rgba(30,111,217,.3);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(30,111,217,.04);
  margin: 4px 0;
}
.mm-search-form input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 9px 4px 9px 16px;
  font-size: 14px;
  color: var(--tx, #1a1a2e);
  min-width: 0;
  -webkit-appearance: none;
}
.mm-search-form input[type="search"]::placeholder { color: #9aa3b0; }
.mm-search-form button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 9px 12px;
  color: var(--bl);
  display: flex;
  align-items: center;
}