/* ═══════════════════════════════════════════════════
   VEGA NGAP Search — Cotation Infirmière
   v2.0.0 — Scopé sous #vega-ngap-root
   Navigation hiérarchique 3 niveaux + recherche
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&display=swap');

#vega-ngap-root {
    --ngap-primary: #0078C8;
    --ngap-primary-dark: #005A99;
    --ngap-primary-light: #E8F4FD;
    --ngap-accent: #00B4D8;
    --ngap-surface: #FAFBFD;
    --ngap-surface-card: #FFFFFF;
    --ngap-text-primary: #1A2332;
    --ngap-text-secondary: #5A6B80;
    --ngap-text-muted: #8896A6;
    --ngap-border: #E2E8F0;
    --ngap-shadow-sm: 0 1px 3px rgba(0, 30, 60, 0.06);
    --ngap-shadow-md: 0 4px 16px rgba(0, 30, 60, 0.08);
    --ngap-shadow-lg: 0 8px 32px rgba(0, 30, 60, 0.12);
    --ngap-shadow-focus: 0 0 0 3px rgba(0, 120, 200, 0.15);
    --ngap-radius-sm: 8px;
    --ngap-radius-md: 12px;
    --ngap-radius-lg: 16px;

    font-family: 'DM Sans', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    color: var(--ngap-text-primary);
}

#vega-ngap-root *,
#vega-ngap-root *::before,
#vega-ngap-root *::after {
    box-sizing: border-box;
}

/* ── HERO SEARCH SECTION ── */
.ngap-search-hero {
    background: var(--ngap-hero-bg, #cc3971);
    padding: 48px 24px 56px;
    position: relative;
    overflow: hidden;
    border-radius: var(--ngap-radius-md);
    margin-bottom: 32px;
}

/* .ngap-search-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
} */

/* .ngap-search-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
} */

.ngap-hero-content {
    /* max-width: 720px; */
    margin: 0 auto;
    position: relative;
    z-index: 2;
    text-align: center;
}

.ngap-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.ngap-hero-badge svg {
    width: 14px;
    height: 14px;
}

.ngap-hero-title {
    /* font-family: 'Fraunces', Georgia, serif !important; */
    font-size: clamp(26px, 4vw, 36px) !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin-bottom: 10px !important;
    line-height: 1.2 !important;
    padding: 0 !important;
}

.ngap-hero-subtitle {
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    margin-bottom: 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* ── SEARCH INPUT ── */
.ngap-search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.ngap-search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.ngap-search-icon {
    position: absolute;
    left: 18px;
    color: var(--ngap-text-muted);
    pointer-events: none;
    z-index: 3;
    transition: color 0.2s;
}

.ngap-search-input-group:focus-within .ngap-search-icon {
    color: var(--ngap-primary);
}

.ngap-search-input {
    width: 100%;
    padding: 16px 50px 16px 50px;
    font-size: 16px;
    /* font-family: 'DM Sans', sans-serif; */
    border: 2px solid transparent;
    border-radius: var(--ngap-radius-lg);
    background: #fff;
    color: var(--ngap-text-primary);
    box-shadow: var(--ngap-shadow-lg), 0 0 0 0 rgba(0, 120, 200, 0);
    transition: all 0.25s ease;
    outline: none;
}

.ngap-search-input::placeholder {
    color: var(--ngap-text-muted);
}

.ngap-search-input:focus {
    border-color: var(--ngap-primary);
    box-shadow: var(--ngap-shadow-lg), 0 0 0 4px rgba(0, 120, 200, 0.12);
}

.ngap-search-clear {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--ngap-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: none;
    transition: all 0.15s;
    z-index: 3;
    align-items: center;
    justify-content: center;
}

.ngap-search-clear:hover {
    color: var(--ngap-text-primary);
    background: var(--ngap-border);
}

.ngap-search-clear.ngap-visible {
    display: flex;
}

/* ── SUGGESTIONS DROPDOWN ── */
.ngap-suggestions-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: var(--ngap-radius-md);
    box-shadow: var(--ngap-shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.04);
    max-height: 380px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    overscroll-behavior: contain;
}

.ngap-suggestions-panel.ngap-active {
    display: block;
    animation: ngapDropIn 0.2s ease;
}

@keyframes ngapDropIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ngap-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid var(--ngap-border);
}

.ngap-suggestion-item:last-child {
    border-bottom: none;
}

.ngap-suggestion-item:hover,
.ngap-suggestion-item.ngap-active {
    background: var(--ngap-primary-light);
}

.ngap-suggestion-key {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--ngap-primary);
    background: var(--ngap-primary-light);
    padding: 3px 8px;
    border-radius: 6px;
    min-width: 42px;
    text-align: center;
}

.ngap-suggestion-text {
    flex: 1;
    font-size: 14px;
    color: var(--ngap-text-primary);
    line-height: 1.4;
}

.ngap-suggestion-text mark {
    background: rgba(0, 120, 200, 0.12);
    color: var(--ngap-primary-dark);
    font-weight: 600;
    border-radius: 2px;
    padding: 0 1px;
}

.ngap-suggestion-coeff {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ngap-text-secondary);
}

/* ── STATS BAR ── */
.ngap-stats-bar {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ngap-stat-item {
    text-align: center;
}

.ngap-stat-number {
    /* font-family: 'Fraunces', serif; */
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.ngap-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* ── RESULTS SECTION ── */
.ngap-results-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 0 40px;
}

.ngap-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.ngap-results-count {
    font-size: 14px;
    color: var(--ngap-text-secondary);
    font-weight: 500;
}

.ngap-results-count strong {
    color: var(--ngap-text-primary);
}

/* ── FILTER BAR ── */
.ngap-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ngap-filter-chip {
    padding: 7px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--ngap-border);
    background: #fff;
    color: var(--ngap-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.ngap-filter-chip:hover {
    border-color: var(--ngap-primary);
    color: var(--ngap-primary);
}

.ngap-filter-chip.active {
    background: var(--ngap-primary);
    color: #fff;
    border-color: var(--ngap-primary);
}

/* ── NO RESULTS ── */
.ngap-no-results {
    text-align: center;
    padding: 60px 20px;
}

.ngap-no-results-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--ngap-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ngap-primary);
}

.ngap-no-results h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ngap-text-primary);
}

.ngap-no-results p {
    font-size: 14px;
    color: var(--ngap-text-secondary);
}

/* ── RESULT CARDS ── */
.ngap-result-card {
    background: var(--ngap-surface-card);
    border-radius: var(--ngap-radius-md);
    border: 1px solid var(--ngap-border);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--ngap-shadow-sm);
    animation: ngapCardIn 0.3s ease both;
}

.ngap-result-card:hover {
    border-color: var(--ngap-primary);
    box-shadow: var(--ngap-shadow-md), var(--ngap-shadow-focus);
    transform: translateY(-1px);
}

.ngap-result-card:nth-child(2) {
    animation-delay: 0.04s;
}

.ngap-result-card:nth-child(3) {
    animation-delay: 0.08s;
}

.ngap-result-card:nth-child(4) {
    animation-delay: 0.12s;
}

.ngap-result-card:nth-child(5) {
    animation-delay: 0.16s;
}

@keyframes ngapCardIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ngap-result-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    cursor: pointer;
}

.ngap-result-letter-badge {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--ngap-radius-sm);
    font-weight: 700;
}

.ngap-result-letter-badge.ngap-ami {
    background: linear-gradient(135deg, #E8F4FD, #D0ECFB);
    color: var(--ngap-primary);
}

.ngap-result-letter-badge.ngap-amx {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    color: #E67E22;
}

.ngap-result-letter-badge.ngap-ais {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: #2E7D32;
}

.ngap-result-letter-badge.ngap-bsa,
.ngap-result-letter-badge.ngap-bsb,
.ngap-result-letter-badge.ngap-bsc {
    background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
    color: #7B1FA2;
}

.ngap-result-letter-badge.ngap-di {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    color: #F57F17;
}

.ngap-result-letter-badge.ngap-pai {
    background: linear-gradient(135deg, #E8EAF6, #C5CAE9);
    color: #303F9F;
}

.ngap-badge-key {
    font-size: 15px;
    line-height: 1;
}

.ngap-badge-coeff {
    font-size: 11px;
    margin-top: 3px;
    opacity: 0.8;
}

.ngap-result-info {
    flex: 1;
    min-width: 0;
}

.ngap-result-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ngap-text-primary);
    line-height: 1.4;
    margin-bottom: 4px;
}

.ngap-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ngap-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--ngap-surface);
    color: var(--ngap-text-secondary);
    border: 1px solid var(--ngap-border);
}

.ngap-result-price {
    flex-shrink: 0;
    text-align: right;
}

.ngap-price-amount {
    /* font-family: 'Fraunces', Georgia, serif; */
    font-size: 22px;
    font-weight: 700;
    color: var(--ngap-primary);
    line-height: 1;
}

.ngap-price-label {
    font-size: 11px;
    color: var(--ngap-text-muted);
    margin-top: 2px;
}

/* ── DETAIL PANEL ── */
.ngap-result-card-detail {
    display: none;
    padding: 0 20px 18px;
    border-top: 1px solid var(--ngap-border);
}

.ngap-result-card.ngap-expanded .ngap-result-card-detail {
    display: block;
    padding-top: 14px;
}

.ngap-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13.5px;
    border-bottom: 1px dashed var(--ngap-border);
}

.ngap-detail-row:last-child {
    border-bottom: none;
}

.ngap-detail-label {
    color: var(--ngap-text-secondary);
}

.ngap-detail-value {
    font-weight: 600;
    color: var(--ngap-text-primary);
}

.ngap-result-expand-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    font-size: 12px;
    color: var(--ngap-text-muted);
    background: var(--ngap-surface);
    cursor: pointer;
    transition: all 0.15s;
}

.ngap-result-expand-hint:hover {
    color: var(--ngap-primary);
    background: var(--ngap-primary-light);
}

.ngap-result-card.ngap-expanded .ngap-result-expand-hint svg {
    transform: rotate(180deg);
}

/* ── INITIAL STATE ── */
.ngap-initial-state {
    text-align: center;
    padding: 40px 20px;
}

.ngap-initial-text {
    color: var(--ngap-text-secondary);
    font-size: 15px;
    margin-bottom: 4px;
}

.ngap-initial-subtext {
    color: var(--ngap-text-muted);
    font-size: 13px;
}

.ngap-initial-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 24px;
    text-align: left;
}

.ngap-cat-card {
    background: #fff;
    border: 1px solid var(--ngap-border);
    border-radius: var(--ngap-radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ngap-cat-card:hover {
    border-color: var(--ngap-primary);
    box-shadow: var(--ngap-shadow-md);
    transform: translateY(-2px);
}

.ngap-cat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--ngap-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.ngap-cat-card strong {
    font-size: 14px;
    color: var(--ngap-text-primary);
}

.ngap-cat-card small {
    font-size: 12px;
    color: var(--ngap-text-muted);
}

/* ── BREADCRUMB ── */
.ngap-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 16px;
    font-size: 14px;
    flex-wrap: wrap;
}

.ngap-breadcrumb-item {
    color: var(--ngap-text-secondary);
    font-weight: 500;
}

.ngap-breadcrumb-link {
    color: var(--ngap-primary);
    cursor: pointer;
    transition: color 0.15s;
}

.ngap-breadcrumb-link:hover {
    color: var(--ngap-primary-dark);
    text-decoration: underline;
}

.ngap-breadcrumb-current {
    color: var(--ngap-text-primary);
    font-weight: 600;
}

.ngap-breadcrumb-sep {
    color: var(--ngap-text-muted);
    font-size: 16px;
    user-select: none;
}

/* ── DAP & ALT CHIPS ── */
.ngap-chip-dap {
    background: #FFF3E0;
    color: #E65100;
    border-color: #FFE0B2;
    font-weight: 600;
}

.ngap-chip-alt {
    background: #F3E5F5;
    color: #7B1FA2;
    border-color: #E1BEE7;
    font-weight: 600;
}

/* ── DESCRIPTION COMPLÈTE DANS DÉTAIL ── */
.ngap-detail-description {
    flex-direction: column;
    gap: 6px;
}

.ngap-detail-full-desc {
    font-weight: 400;
    line-height: 1.6;
    font-size: 13px;
    color: var(--ngap-text-primary);
    margin-top: 4px;
}

/* ── BROWSE CONTAINER (dynamic navigation) ── */
.ngap-browse-container {
    text-align: center;
    padding: 20px 0;
}

/* ── SCROLLBAR ── */
.ngap-suggestions-panel::-webkit-scrollbar {
    width: 6px;
}

.ngap-suggestions-panel::-webkit-scrollbar-track {
    background: transparent;
}

.ngap-suggestions-panel::-webkit-scrollbar-thumb {
    background: var(--ngap-border);
    border-radius: 3px;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .ngap-search-hero {
        padding: 32px 16px 40px;
    }

    .ngap-result-card-header {
        flex-direction: column;
        gap: 10px;
    }

    .ngap-result-letter-badge {
        width: 100%;
        height: auto;
        flex-direction: row;
        gap: 8px;
        padding: 8px 12px;
    }

    .ngap-result-price {
        text-align: left;
    }

    .ngap-stats-bar {
        gap: 20px;
    }

    .ngap-initial-categories {
        grid-template-columns: 1fr;
    }

    .ngap-filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .ngap-breadcrumb {
        font-size: 13px;
        gap: 6px;
    }

    .ngap-detail-row {
        flex-direction: column;
        gap: 2px;
    }

    .ngap-detail-value {
        text-align: left;
    }
}

#vega-ngap-root[class*="vg-"] {
    --ngap-hero-bg: var(--vg-accent);
    --ngap-primary: var(--vg-accent);
    --ngap-primary-dark: var(--vg-accent);
    --ngap-primary-dark: color-mix(in srgb, var(--vg-accent) 80%, #000);
    --ngap-primary-light: #F1F5F9;
    --ngap-primary-light: color-mix(in srgb, var(--vg-accent) 10%, #fff);
    --ngap-shadow-focus: 0 0 0 3px rgba(0, 0, 0, 0.12);
    --ngap-shadow-focus: 0 0 0 3px color-mix(in srgb, var(--vg-accent) 18%, transparent);
}

#vega-ngap-root .ngap-search-input {
    padding: 16px 50px !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.4 !important;
    border: 2px solid transparent !important;
    border-radius: var(--ngap-radius-lg) !important;
    background-color: #fff !important;
    color: var(--ngap-text-primary) !important;
    font-size: 16px !important;
}
#vega-ngap-root .ngap-search-input:focus {
    border-color: var(--ngap-primary) !important;
}
#vega-ngap-root .ngap-search-clear {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--ngap-text-muted) !important;
    padding: 4px !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1 !important;
    border-radius: 50% !important;
    display: none;
}
#vega-ngap-root .ngap-search-clear.ngap-visible {
    display: flex !important;
}
#vega-ngap-root .ngap-search-clear:hover {
    background: rgba(0, 0, 0, 0.07) !important;
    color: var(--ngap-text-primary) !important;
}
