/* --- CONTENEUR GLOBAL (position dans le header) --- */

.global-search-container {
    flex: 0 0 220px;
    max-width: 220px;
    margin-left: auto;
}

@media (max-width: 992px) {
    .global-search-container {
        flex: 1 1 100%;
        max-width: 100%;
        margin: 8px 0 0;
    }
}

/* --- BARRE DE RECHERCHE --- */

.global-search-form {
    margin: 0;
}

.global-search-inner {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: radial-gradient(circle at 0 0, #1f2937 0, #020617 60%);
    border: 1px solid #374151;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.15),
                0 8px 18px rgba(0, 0, 0, 0.45);
    transition: border-color 0.18s ease, box-shadow 0.18s ease,
                background 0.18s ease, transform 0.1s ease;
}

.global-search-inner:hover {
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35),
                0 10px 24px rgba(15, 23, 42, 0.9);
    transform: translateY(-1px);
}

.global-search-inner:focus-within {
    border-color: #f97316;
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.6),
                0 12px 30px rgba(15, 23, 42, 0.95);
    background: radial-gradient(circle at 0 0, #1f2937 0, #020617 40%);
}

/* Icône loupe */

.global-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    color: #9ca3af;
}

/* Champ texte */

.global-search-input {
    flex: 1 1 auto;
    border: none;
    outline: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 0.85rem;
    padding: 2px 4px;
    min-width: 0;           /* évite les bugs flex */
}

.global-search-input::placeholder {
    color: #6b7280;
    font-style: italic;
}

/* Bouton "↵" à droite */

.global-search-submit {
    border: none;
    background: rgba(15, 23, 42, 0.9);
    color: #9ca3af;
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: 999px;
    cursor: pointer;
    margin-left: 6px;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.global-search-submit:hover {
    background: #f97316;
    color: #111827;
    transform: translateY(-0.5px);
}

/* Mobile : bouton un peu plus large */

@media (max-width: 576px) {
    .global-search-inner {
        padding: 5px 8px;
    }
    .global-search-submit {
        padding: 2px 10px;
    }
}

/* --- LISTE D'AUTOCOMPLETE --- */

.global-search-suggest {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 2000;
    background: #020617;
    border: 1px solid #1f2937;
    border-radius: 10px;
    max-height: 360px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
}

.global-search-suggest ul {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.global-search-suggest li {
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(31, 41, 55, 0.7);
}

.global-search-suggest li:last-child {
    border-bottom: none;
}

.global-search-suggest li:hover {
    background: #111827;
}

.global-search-suggest .suggest-text {
    font-weight: 600;
    color: #e5e7eb;
}

.global-search-suggest .suggest-meta {
    display: block;
    font-size: 0.72rem;
    color: #9ca3af;
    margin-top: 2px;
}

/* Boîte de suggestions sous la barre de recherche */

.global-search-wrapper {
    position: relative;
}

.global-search-suggest {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 3000;
    background: #020617;                 /* fond sombre Ideo-Lab */
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.9);
    border: 1px solid #1f2937;
    display: none;
    max-height: 420px;
    overflow-y: auto;
}

.global-search-suggest .gs-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.global-search-suggest .gs-item {
    display: flex;
    align-items: flex-start;
    padding: 6px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
    font-size: 0.85rem;
}

.global-search-suggest .gs-item:last-child {
    border-bottom: none;
}

.global-search-suggest .gs-item:hover {
    background: #111827;
}

.global-search-suggest .gs-icon {
    margin-right: 8px;
    font-size: 0.9rem;
    opacity: 0.9;
    padding-top: 2px;
}

.global-search-suggest .gs-text {
    flex: 1;
    min-width: 0;
}

.global-search-suggest .gs-main {
    color: #e5e7eb;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-search-suggest .gs-meta {
    margin-top: 2px;
    font-size: 0.72rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* highlight du terme recherché */
.global-search-suggest .gs-hl {
    color: #facc15;
    font-weight: 600;
}

