/* ==========================================================
   ALPHEA SUITE
   CORRECTIF FORCE — BARRE DE RECHERCHE TOPBAR
========================================================== */

body.alphea-v2 .alphea-topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 22px !important;
    min-height: 72px !important;
    padding: 0 28px !important;
}

body.alphea-v2 .alphea-topbar-left {
    flex: 0 0 285px !important;
    min-width: 285px !important;
}

body.alphea-v2 .alphea-topbar-center {
    position: relative !important;
    display: block !important;
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: 640px !important;
    min-width: 320px !important;
    margin: 0 auto !important;
}

body.alphea-v2 .alphea-global-search {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.alphea-v2 .alphea-global-search-form {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible !important;
}

body.alphea-v2 .alphea-global-search-icon {
    position: absolute !important;
    top: 50% !important;
    left: 17px !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(-50%) !important;
    color: #526176 !important;
    font-size: 20px !important;
    line-height: 1 !important;
    pointer-events: none !important;
}

body.alphea-v2 input.alphea-search {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    z-index: 1 !important;
    display: block !important;
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    margin: 0 !important;
    padding: 0 82px 0 48px !important;
    border: 1px solid #d6dee9 !important;
    border-radius: 15px !important;
    outline: none !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    box-shadow: none !important;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 46px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

body.alphea-v2 input.alphea-search:hover {
    border-color: #c3cedd !important;
    background: #ffffff !important;
}

body.alphea-v2 input.alphea-search:focus {
    border-color: #2563eb !important;
    background: #ffffff !important;
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.11),
        0 8px 22px rgba(15, 23, 42, 0.07) !important;
}

body.alphea-v2 input.alphea-search::placeholder {
    color: #77869a !important;
    opacity: 1 !important;
    font-weight: 500 !important;
}

body.alphea-v2 button.alphea-search-shortcut {
    position: absolute !important;
    top: 50% !important;
    right: 11px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 4 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 57px !important;
    min-width: 57px !important;
    max-width: 57px !important;
    height: 27px !important;
    min-height: 27px !important;
    max-height: 27px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(-50%) !important;
    border: 1px solid #d0d8e3 !important;
    border-radius: 7px !important;
    background: #ffffff !important;
    color: #536176 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
    font-family: Inter, system-ui, sans-serif !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}

body.alphea-v2 button.alphea-search-shortcut:hover {
    border-color: #94a3b8 !important;
    background: #f8fafc !important;
    color: #1d4ed8 !important;
}

body.alphea-v2 .alphea-search-panel {
    position: absolute !important;
    top: 57px !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 10000 !important;
}

body.alphea-v2 .alphea-topbar-right {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: max-content !important;
}

@media (max-width: 1250px) {
    body.alphea-v2 .alphea-topbar-left {
        flex-basis: 220px !important;
        min-width: 220px !important;
    }

    body.alphea-v2 .alphea-topbar-center {
        max-width: 520px !important;
    }
}

@media (max-width: 1000px) {
    body.alphea-v2 .alphea-topbar-left {
        display: none !important;
    }

    body.alphea-v2 .alphea-topbar-center {
        min-width: 220px !important;
        max-width: none !important;
        margin: 0 !important;
    }
}

@media (max-width: 720px) {
    body.alphea-v2 .alphea-topbar {
        min-height: 66px !important;
        padding: 0 12px !important;
    }

    body.alphea-v2 .alphea-topbar-center {
        width: 100% !important;
        min-width: 0 !important;
    }

    body.alphea-v2 button.alphea-search-shortcut {
        display: none !important;
    }

    body.alphea-v2 input.alphea-search {
        padding-right: 15px !important;
    }
}

/* ==========================================================
   ALPHEA SUITE — PANNEAU DE RECHERCHE PREMIUM
========================================================== */

body.alphea-v2 .alphea-global-search {
    isolation: isolate !important;
}

body.alphea-v2 .alphea-search-panel {
    position: absolute !important;
    top: calc(100% + 12px) !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 99999 !important;

    display: block !important;
    overflow: hidden !important;

    width: 100% !important;
    min-width: 520px !important;
    max-height: min(620px, calc(100vh - 120px)) !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 1px solid #dce3ed !important;
    border-radius: 18px !important;

    background: #ffffff !important;
    color: #0f172a !important;

    box-shadow:
        0 28px 70px rgba(15, 23, 42, 0.18),
        0 8px 20px rgba(15, 23, 42, 0.08) !important;

    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif !important;

    animation: alphea-search-panel-open 150ms ease-out !important;
}

body.alphea-v2 .alphea-search-panel[hidden] {
    display: none !important;
}

@keyframes alphea-search-panel-open {
    from {
        opacity: 0;
        transform: translateY(-7px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body.alphea-v2 .alphea-search-panel-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 18px !important;

    width: 100% !important;
    margin: 0 !important;
    padding: 17px 18px 15px !important;

    border: 0 !important;
    border-bottom: 1px solid #edf1f5 !important;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fbfcfe 100%
        ) !important;
}

body.alphea-v2 .alphea-search-panel-header > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-width: 0 !important;
}

body.alphea-v2 .alphea-search-panel-header strong {
    display: block !important;
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 14px !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
}

body.alphea-v2 .alphea-search-panel-header span {
    display: block !important;
    margin: 0 !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
}

body.alphea-v2 .alphea-search-panel kbd {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-width: 30px !important;
    height: 25px !important;
    margin: 0 !important;
    padding: 0 7px !important;

    border: 1px solid #d8e0ea !important;
    border-bottom-width: 2px !important;
    border-radius: 7px !important;

    background: #f8fafc !important;
    color: #64748b !important;

    box-shadow: none !important;

    font-family: inherit !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

body.alphea-v2 .alphea-search-panel-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;

    overflow-y: auto !important;
    max-height: 425px !important;

    margin: 0 !important;
    padding: 10px !important;

    background: #ffffff !important;
}

body.alphea-v2 .alphea-search-panel-section > small {
    display: block !important;

    margin: 0 !important;
    padding: 4px 8px 7px !important;

    color: #94a3b8 !important;

    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

body.alphea-v2 a.alphea-search-suggestion {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 11px !important;

    width: 100% !important;
    min-height: 60px !important;

    margin: 0 !important;
    padding: 8px 10px !important;

    border: 1px solid transparent !important;
    border-radius: 12px !important;

    background: transparent !important;
    color: #0f172a !important;

    text-decoration: none !important;

    transition:
        background 120ms ease,
        border-color 120ms ease,
        transform 120ms ease !important;
}

body.alphea-v2 a.alphea-search-suggestion:hover,
body.alphea-v2 a.alphea-search-suggestion:focus,
body.alphea-v2 a.alphea-search-suggestion.is-active {
    border-color: #dbeafe !important;
    outline: none !important;
    background: #eff6ff !important;
    color: #0f172a !important;
    transform: translateX(2px) !important;
}

body.alphea-v2 a.alphea-search-suggestion[hidden] {
    display: none !important;
}

body.alphea-v2 .alphea-search-suggestion-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 38px !important;
    height: 38px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 1px solid #dbeafe !important;
    border-radius: 11px !important;

    background: #ffffff !important;
    color: #1d4ed8 !important;

    box-shadow: 0 3px 10px rgba(30, 58, 138, 0.08) !important;

    font-size: 17px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

body.alphea-v2 .alphea-search-suggestion > span:nth-child(2) {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;

    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.alphea-v2 .alphea-search-suggestion strong {
    display: block !important;
    overflow: hidden !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #16213a !important;

    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;

    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.alphea-v2 .alphea-search-suggestion small {
    display: block !important;
    overflow: hidden !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #64748b !important;

    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;

    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.alphea-v2 .alphea-search-suggestion em {
    display: block !important;

    margin: 0 !important;
    padding: 0 4px !important;

    color: #94a3b8 !important;

    font-size: 10px !important;
    font-style: normal !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

body.alphea-v2 a.alphea-search-suggestion:hover em,
body.alphea-v2 a.alphea-search-suggestion.is-active em {
    color: #1d4ed8 !important;
}

body.alphea-v2 .alphea-search-no-result {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;

    margin: 0 !important;
    padding: 28px 22px !important;

    border-top: 1px solid #edf1f5 !important;

    background: #ffffff !important;
    text-align: center !important;
}

body.alphea-v2 .alphea-search-no-result[hidden] {
    display: none !important;
}

body.alphea-v2 .alphea-search-no-result strong {
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

body.alphea-v2 .alphea-search-no-result span {
    max-width: 390px !important;
    margin: 0 !important;
    color: #64748b !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
}

body.alphea-v2 .alphea-search-panel-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;

    width: 100% !important;

    margin: 0 !important;
    padding: 10px 14px !important;

    border: 0 !important;
    border-top: 1px solid #edf1f5 !important;

    background: #fafbfd !important;
    color: #7c8ba1 !important;

    font-size: 10px !important;
    font-weight: 700 !important;
}

body.alphea-v2 .alphea-search-panel-footer span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;

    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 1000px) {
    body.alphea-v2 .alphea-search-panel {
        min-width: 450px !important;
    }
}

@media (max-width: 720px) {
    body.alphea-v2 .alphea-search-panel {
        position: fixed !important;
        top: 72px !important;
        right: 10px !important;
        left: 10px !important;

        width: auto !important;
        min-width: 0 !important;
        max-height: calc(100vh - 84px) !important;
    }

    body.alphea-v2 .alphea-search-panel-footer {
        display: none !important;
    }

    body.alphea-v2 .alphea-search-suggestion em {
        display: none !important;
    }

    body.alphea-v2 a.alphea-search-suggestion {
        grid-template-columns: 40px minmax(0, 1fr) !important;
    }
}
