/* ================================================================
   GLOBAL CS — Recherche interne · search.css
   Version 1.0 — 2026
   Charte : #8CBF44 (vert) · #242E3D (navy)
   ================================================================ */

/* ── Bouton déclencheur dans le nav ────────────────────────────── */
#gs-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.07);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 7px;
  color: rgba(255,255,255,.72);
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 13px;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
  letter-spacing: .2px;
}
#gs-trigger:hover {
  background: rgba(140,191,68,.13);
  border-color: rgba(140,191,68,.45);
  color: #fff;
}
#gs-trigger svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2.3;
  fill: none; flex-shrink: 0;
  stroke-linecap: round; stroke-linejoin: round;
}
#gs-trigger kbd {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 4px;
  color: rgba(255,255,255,.32);
  font-family: inherit;
  font-size: 9.5px;
  padding: 1px 5px;
  margin-left: 2px;
}

/* ── Overlay ───────────────────────────────────────────────────── */
#gs-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(16,24,36,.82);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(44px,8vh,120px);
}
#gs-overlay.gs-open { display: flex; }

/* ── Boîte principale ──────────────────────────────────────────── */
#gs-box {
  width: min(660px, 92vw);
  background: #1a222e;
  border: 1.5px solid rgba(140,191,68,.22);
  border-radius: 14px;
  box-shadow: 0 28px 70px rgba(0,0,0,.55);
  overflow: hidden;
  font-family: "Montserrat", sans-serif;
  animation: gsIn .18s cubic-bezier(.2,.8,.4,1) both;
}
@keyframes gsIn {
  from { opacity:0; transform:translateY(-14px) scale(.97); }
  to   { opacity:1; transform:none; }
}

/* ── Barre de saisie ────────────────────────────────────────────── */
#gs-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
#gs-field-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(140,191,68,.3);
  border-radius: 8px;
  padding: 0 14px;
  transition: border-color .15s;
}
#gs-field-wrap:focus-within {
  border-color: rgba(140,191,68,.6);
}
#gs-field-wrap svg {
  width: 17px; height: 17px;
  stroke: #8cbf44; stroke-width: 2.2;
  fill: none; flex-shrink: 0;
  stroke-linecap: round; stroke-linejoin: round;
}
#gs-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 0;
  caret-color: #8cbf44;
}
#gs-input::placeholder { color: rgba(255,255,255,.28); }
#gs-input::-webkit-search-cancel-button { display:none; }

#gs-esc-hint {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 4px;
  color: rgba(255,255,255,.3);
  font-family: inherit;
  font-size: 10px;
  padding: 2px 7px;
  white-space: nowrap;
  cursor: default;
}

#gs-close {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  color: rgba(255,255,255,.45);
  cursor: pointer;
  font-size: 14px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
#gs-close:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ── Zone résultats ─────────────────────────────────────────────── */
#gs-results-wrap {
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(140,191,68,.3) transparent;
}
#gs-results-wrap::-webkit-scrollbar { width: 4px; }
#gs-results-wrap::-webkit-scrollbar-thumb { background: rgba(140,191,68,.3); border-radius: 2px; }

#gs-results { padding: 6px 0; }

/* Indice initial */
#gs-hint {
  padding: 22px 20px;
  color: rgba(255,255,255,.22);
  font-size: 12px;
  text-align: center;
}

/* Résultat vide */
#gs-empty {
  padding: 44px 20px;
  text-align: center;
  color: rgba(255,255,255,.3);
  font-size: 14px;
}
#gs-empty svg { display:block; margin:0 auto 14px; opacity:.22; }
#gs-empty strong { color: rgba(255,255,255,.7); }

/* ── Carte résultat ─────────────────────────────────────────────── */
.gs-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 11px 18px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.05);
  text-decoration: none;
  transition: background .1s;
}
.gs-item:last-child { border-bottom: 0; }
.gs-item:hover,
.gs-item.gs-active { background: rgba(140,191,68,.09); }

.gs-item-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(140,191,68,.11);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  margin-top: 1px;
}
.gs-item-body { flex: 1; min-width: 0; }
.gs-item-title {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 3px;
}
.gs-item-title mark { background: transparent; color: #8cbf44; }
.gs-item-desc {
  color: rgba(255,255,255,.42);
  font-size: 11.5px;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.gs-item-desc mark { background: transparent; color: #9dd050; }
.gs-item-cat {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(140,191,68,.13);
  color: #8cbf44;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 4px;
}

/* ── Pied de modale ─────────────────────────────────────────────── */
#gs-footer-hint {
  display: flex;
  gap: 20px;
  padding: 9px 18px;
  border-top: 1px solid rgba(255,255,255,.07);
  color: rgba(255,255,255,.22);
  font-size: 10.5px;
  justify-content: center;
  flex-wrap: wrap;
}
#gs-footer-hint kbd {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 9.5px;
  font-family: inherit;
  margin: 0 2px;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width:767px) {
  #gs-trigger kbd { display: none; }
  #gs-trigger span { display: none; }
  #gs-box { border-radius: 10px; }
  #gs-esc-hint { display: none; }
}
