/* GO2 Search - Style du moteur de recherche principal */

/* === LAYOUT: Masquer le mega menu des catégories (1ère colonne du header) === */
.box-top > .ApColumn:first-child {
    display: none !important;
}

/* === LAYOUT: Style du bloc catégories quand déplacé en haut === */
.go2-cat-nav {
    margin-top: 0;
    padding-top: 20px;
    padding-bottom: 10px;
}

/* ===================================================================
   BARRE COMPACTE (toutes pages sauf accueil)
   =================================================================== */
#go2search-bar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    padding: 14px 20px;
    position: relative;
    z-index: 100;
    overflow: visible;
}

#go2search-bar .go2search-bar-inner {
    max-width: 750px;
    margin: 0 auto;
    position: relative;
    z-index: 1001;
}

#go2search-bar .go2search-form {
    position: relative;
    z-index: 1001;
}

#go2search-bar .go2search-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2), 0 0 0 2px rgba(230,126,34,0.15);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

#go2search-bar .go2search-input-wrapper:focus-within {
    box-shadow: 0 4px 20px rgba(0,0,0,0.25), 0 0 0 2px rgba(230,126,34,0.4);
}

#go2search-bar .go2search-icon {
    display: flex;
    align-items: center;
    padding: 0 0 0 18px;
    color: #999;
    flex-shrink: 0;
}

#go2search-bar .go2search-icon svg {
    width: 20px;
    height: 20px;
}

#go2search-bar .go2search-field {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 12px;
    font-size: 1em;
    color: #333;
    background: transparent;
    min-width: 0;
}

#go2search-bar .go2search-field::placeholder {
    color: #aaa;
    font-weight: 300;
}

#go2search-bar .go2search-btn {
    background: #e67e22;
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

#go2search-bar .go2search-btn:hover {
    background: #d35400;
}

#go2search-bar .go2search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow-y: auto;
    margin-top: -2px;
}

#go2search-bar .go2search-results.active {
    display: block;
}

/* ===================================================================
   HERO BARRE (page d'accueil)
   =================================================================== */
#go2search-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 50px 20px 45px;
    text-align: center;
    position: relative;
    overflow: visible;
    margin-bottom: 0;
    z-index: 100;
}

#go2search-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(230,126,34,0.08) 0%, transparent 60%);
    animation: go2pulse 8s ease-in-out infinite;
}

@keyframes go2pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

.go2search-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.go2search-title {
    color: #ffffff;
    font-size: 2em;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.go2search-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 1.05em;
    margin: 0 0 30px 0;
    font-weight: 300;
}

.go2search-form {
    position: relative;
    z-index: 1001;
}

.go2search-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25), 0 0 0 3px rgba(230,126,34,0.2);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.go2search-input-wrapper:focus-within {
    box-shadow: 0 8px 40px rgba(0,0,0,0.3), 0 0 0 3px rgba(230,126,34,0.5);
}

.go2search-icon {
    display: flex;
    align-items: center;
    padding: 0 0 0 22px;
    color: #999;
    flex-shrink: 0;
}

#go2search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 20px 15px;
    font-size: 1.15em;
    color: #333;
    background: transparent;
    min-width: 0;
}

#go2search-input::placeholder {
    color: #aaa;
    font-weight: 300;
}

.go2search-btn {
    background: #e67e22;
    color: #fff;
    border: none;
    padding: 20px 35px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.go2search-btn:hover {
    background: #d35400;
}

/* ===================================================================
   RÉSULTATS AUTOCOMPLÉTION (partagés)
   =================================================================== */
.go2search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
    max-height: 450px;
    overflow-y: auto;
    margin-top: -2px;
}

.go2search-results.active {
    display: block;
}

.go2search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
    gap: 15px;
}

.go2search-result-item:last-child {
    border-bottom: none;
}

.go2search-result-item:hover,
.go2search-result-item.active {
    background: #fff8f0;
}

.go2search-result-img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f8f8;
    flex-shrink: 0;
}

.go2search-result-img-placeholder {
    width: 55px;
    height: 55px;
    border-radius: 8px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 1.5em;
    flex-shrink: 0;
}

.go2search-result-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.go2search-result-name {
    font-weight: 600;
    font-size: 0.95em;
    color: #222;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.go2search-result-name mark {
    background: #ffeaa7;
    color: #222;
    padding: 0 2px;
    border-radius: 2px;
}

.go2search-result-meta {
    font-size: 0.82em;
    color: #888;
    margin: 0;
}

.go2search-result-meta .ref {
    color: #aaa;
}

.go2search-result-meta .brand {
    color: #e67e22;
    font-weight: 500;
}

.go2search-result-price {
    font-weight: 700;
    color: #e67e22;
    font-size: 1em;
    flex-shrink: 0;
    white-space: nowrap;
}

.go2search-result-vph {
    font-size: 0.75em;
    background: #3498db;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

.go2search-results-footer {
    padding: 14px 20px;
    text-align: center;
    background: #fafafa;
    border-top: 1px solid #eee;
    border-radius: 0 0 16px 16px;
}

.go2search-results-footer a {
    color: #e67e22;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
}

.go2search-results-footer a:hover {
    text-decoration: underline;
}

.go2search-loading {
    padding: 30px;
    text-align: center;
    color: #999;
}

.go2search-no-results {
    padding: 30px;
    text-align: center;
    color: #999;
}

.go2search-no-results strong {
    display: block;
    color: #666;
    margin-bottom: 5px;
}

/* Tags populaires */
.go2search-tags {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.go2search-tag-label {
    color: rgba(255,255,255,0.5);
    font-size: 0.85em;
}

.go2search-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    border-radius: 20px;
    font-size: 0.85em;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.15);
}

.go2search-tag:hover {
    background: rgba(230,126,34,0.3);
    color: #fff;
    border-color: rgba(230,126,34,0.5);
    text-decoration: none;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 768px) {
    #go2search-hero {
        padding: 30px 15px 25px;
    }
    .go2search-title {
        font-size: 1.5em;
    }
    .go2search-subtitle {
        font-size: 0.9em;
    }
    .go2search-input-wrapper {
        border-radius: 12px;
        flex-wrap: wrap;
    }
    #go2search-input {
        padding: 16px 12px;
        font-size: 1em;
    }
    .go2search-btn {
        width: 100%;
        border-radius: 0 0 12px 12px;
        padding: 14px;
    }
    .go2search-results {
        border-radius: 0 0 12px 12px;
    }

    /* Compact bar responsive */
    #go2search-bar {
        padding: 10px 12px;
    }
    #go2search-bar .go2search-input-wrapper {
        border-radius: 12px;
        flex-wrap: wrap;
    }
    #go2search-bar .go2search-field {
        padding: 12px 10px;
        font-size: 0.95em;
    }
    #go2search-bar .go2search-btn {
        width: 100%;
        border-radius: 0 0 12px 12px;
        padding: 12px;
    }
    #go2search-bar .go2search-results {
        border-radius: 0 0 12px 12px;
    }
}
