/* ==========================================================================
   PERSONNAGES.CD - PREMIUM SEARCH & MODAL SYSTEM
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO SEARCH BANNER & CARD (Page Content Area)
   -------------------------------------------------------------------------- */
.search-page__breadcrumb {
    font-size: 0.875rem;
    color: #64748B;
}

.search-page__breadcrumb a {
    color: #64748B;
    text-decoration: none;
    transition: color 0.2s ease;
}

.search-page__breadcrumb a:hover {
    color: #C48D3F;
}

.search-hero-card {
    background: #060F1E;
    background: radial-gradient(circle at 85% 20%, #0F2342 0%, #060F1E 75%);
    color: #ffffff;
    padding: 2.25rem 2.25rem;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(4, 10, 22, 0.12);
    border: 1px solid rgba(196, 141, 63, 0.25);
    position: relative;
    overflow: hidden;
}

.search-hero-card::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(196, 141, 63, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
}

.search-hero__title {
    font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

.search-hero__subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

/* Search Box Container */
.search-hero__form {
    position: relative;
    max-width: 720px;
}

.search-hero__input-wrap {
    display: flex;
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 4px;
    box-shadow: none;
    transition: box-shadow 0.25s ease, transform 0.2s ease, border-color 0.25s ease;
}

.search-hero__input-wrap:focus-within {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(196, 141, 63, 0.4);
    border-color: rgba(196, 141, 63, 0.45);
}

.search-hero__icon {
    padding-left: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.15rem;
}

.search-hero__input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
    color: #ffffff;
    background: transparent;
    width: 100%;
}

.search-hero__input::placeholder {
    color: rgba(255, 255, 255, 0.56);
}

.search-hero__clear-btn {
    background: transparent;
    border: none;
    color: #a0aec0;
    font-size: 1.1rem;
    padding: 0 0.75rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.search-hero__clear-btn:hover {
    color: #4a5568;
}

.search-hero__submit-btn {
    background: linear-gradient(135deg, #C48D3F 0%, #9E6E28 100%);
    color: #ffffff;
    border: none;
    padding: 0.8rem 1.75rem;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 7px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.search-hero__submit-btn:hover {
    background: linear-gradient(135deg, #D49D4F 0%, #AE7E38 100%);
    box-shadow: 0 4px 15px rgba(196, 141, 63, 0.4);
    transform: translateY(-1px);
}

/* Examples tags */
.search-hero__examples {
    margin-top: 0.85rem;
    font-size: 0.825rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.search-hero__tag {
    color: rgba(255, 255, 255, 0.85);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 2px 10px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-hero__tag:hover {
    background: rgba(196, 141, 63, 0.25);
    color: #F7D08A;
    border-color: rgba(196, 141, 63, 0.4);
}

/* Tip Box ("Conseil") */
.search-hero__tip-card {
    background: rgba(15, 30, 55, 0.7);
    border: 1px solid rgba(196, 141, 63, 0.25);
    border-radius: 12px;
    padding: 1.25rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.search-hero__tip-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #F7D08A;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.search-hero__tip-text {
    font-size: 0.835rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin: 0;
}

/* --------------------------------------------------------------------------
   2. MAIN LAYOUT & SIDEBAR FILTERS
   -------------------------------------------------------------------------- */
.search-content-wrapper {
    background-color: #F8FAF9;
    min-height: 70vh;
}

.search-sidebar {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.search-sidebar__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #EDF2F7;
    margin-bottom: 1.25rem;
}

.search-sidebar__title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2D3748;
    margin: 0;
}

.search-sidebar__reset {
    font-size: 0.8rem;
    color: #C48D3F;
    text-decoration: none;
    transition: color 0.2s ease;
}

.search-sidebar__reset:hover {
    color: #9E6E28;
    text-decoration: underline;
}

.search-sidebar__group {
    margin-bottom: 1.5rem;
}

.search-sidebar__label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #4A5568;
    margin-bottom: 0.75rem;
    display: block;
}

.search-sidebar__check-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-sidebar__check-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #4A5568;
    cursor: pointer;
}

.search-sidebar__check-item input {
    accent-color: #C48D3F;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.search-sidebar__count {
    font-size: 0.78rem;
    color: #A0AEC0;
}

.search-sidebar__apply-btn {
    width: 100%;
    background: transparent;
    border: 1px solid #C48D3F;
    color: #C48D3F;
    padding: 0.65rem 1rem;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-sidebar__apply-btn:hover {
    background: #C48D3F;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   3. RESULTS AREA (AIRY, BREATHING, SPACIOUS DESIGN)
   -------------------------------------------------------------------------- */
.search-results__topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-results__count-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1A202C;
    margin: 0;
}

.search-results__count-title span {
    color: #C48D3F;
}

.search-results__sort-select {
    border: 1px solid #CBD5E0;
    border-radius: 6px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    color: #4A5568;
    background: #ffffff;
}

/* Filter Navigation Pills */
.search-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2.25rem;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 0.75rem;
}

.search-tab-btn {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    color: #4A5568;
    padding: 0.45rem 1.1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none !important;
}

.search-tab-btn:hover {
    border-color: #C48D3F;
    color: #C48D3F;
}

.search-tab-btn.active {
    background: #C48D3F;
    border-color: #C48D3F;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(196, 141, 63, 0.25);
}

.search-tab-badge {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.search-tab-btn.active .search-tab-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Section Grouping & Cards */
.search-section {
    margin-bottom: 3rem;
}

.search-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #EDF2F7;
}

.search-section__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2D3748;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-section__more {
    font-size: 0.85rem;
    color: #C48D3F;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.search-section__more:hover {
    color: #9E6E28;
}

/* Clean Portrait Card (Personnages) */
.result-card-personnage {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1.35rem;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
    color: inherit;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.result-card-personnage:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.07);
    border-color: rgba(196, 141, 63, 0.4);
}

.result-card-personnage__avatar {
    width: 90px;
    height: 110px;
    border-radius: 8px;
    object-fit: cover;
    background: #EDF2F7;
    flex-shrink: 0;
}

.result-card-personnage__info {
    flex-grow: 1;
}

.result-card-personnage__name {
    font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1A202C;
    margin-bottom: 0.25rem;
}

.result-card-personnage__subtitle {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 0.5rem;
}

.result-card-personnage__date {
    display: inline-block;
    font-size: 0.78rem;
    color: #C48D3F;
    font-weight: 600;
    background: rgba(196, 141, 63, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.result-card-personnage__excerpt {
    font-size: 0.85rem;
    color: #4A5568;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-card-personnage__arrow {
    color: #CBD5E0;
    font-size: 1.1rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.result-card-personnage:hover .result-card-personnage__arrow {
    color: #C48D3F;
    transform: translateX(4px);
}

/* Clean Media Card (Histoires & Récits) */
.result-card-media {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    text-decoration: none !important;
    color: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.result-card-media:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.07);
    border-color: rgba(196, 141, 63, 0.4);
}

.result-card-media__thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #E2E8F0;
}

.result-card-media__body {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.result-card-media__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2D3748;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.result-card-media__excerpt {
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.45;
    margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   4. PREMIUM SEARCH MODAL SPOTLIGHT (GLOBAL COMMAND-K OVERLAY)
   -------------------------------------------------------------------------- */
.premium-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(4, 10, 22, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

.premium-search-modal.active {
    opacity: 1;
    visibility: visible;
}

.premium-search-modal__dialog {
    width: 92%;
    max-width: 760px;
    margin: auto;
    background: #091527;
    border: 1px solid rgba(196, 141, 63, 0.35);
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 45px rgba(196, 141, 63, 0.15);
    overflow: hidden;
    transform: translateY(0) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.premium-search-modal.active .premium-search-modal__dialog {
    transform: translateY(0) scale(1);
}

/* Modal Input Bar */
.premium-search-modal__head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    background: transparent;
}

.premium-search-modal__icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    color: #C48D3F;
}

.premium-search-modal__input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.15rem;
    color: #ffffff;
    width: min(100%, 560px);
    text-align: center;
    font-weight: 400;
}

.premium-search-modal__input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.premium-search-modal__close {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: monospace;
    transition: all 0.2s ease;
}

.premium-search-modal__close:hover {
    background: rgba(196, 141, 63, 0.3);
    color: #ffffff;
}

/* Modal Body Results */
.premium-search-modal__body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    max-height: 60vh;
}

.premium-search-modal__empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.premium-search-modal__empty i {
    font-size: 2.5rem;
    color: rgba(196, 141, 63, 0.5);
    margin-bottom: 1rem;
}

.premium-search-modal__suggestions-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #C48D3F;
    margin-bottom: 0.75rem;
}

.premium-search-modal__suggest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.premium-search-modal__suggest-tag {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.premium-search-modal__suggest-tag:hover {
    background: rgba(196, 141, 63, 0.2);
    border-color: rgba(196, 141, 63, 0.4);
    color: #F7D08A;
}

/* Modal Result Item */
.premium-search-modal__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    text-decoration: none !important;
    color: #ffffff;
    transition: all 0.2s ease;
    margin-bottom: 6px;
    background: transparent;
    border: 1px solid transparent;
}

.premium-search-modal__item:hover,
.premium-search-modal__item.selected {
    background: rgba(196, 141, 63, 0.14);
    border-color: rgba(196, 141, 63, 0.35);
    transform: translateX(4px);
}

.premium-search-modal__item-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.premium-search-modal__item-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(196, 141, 63, 0.15);
    color: #C48D3F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.premium-search-modal__item-content {
    flex-grow: 1;
}

.premium-search-modal__item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    margin-bottom: 2px;
}

.premium-search-modal__item-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.premium-search-modal__item-type {
    font-size: 0.72rem;
    color: #C48D3F;
    background: rgba(196, 141, 63, 0.15);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Modal Footer Hotkeys */
.premium-search-modal__foot {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
}

.premium-search-modal__hotkeys {
    display: flex;
    gap: 12px;
}

.premium-search-modal__hotkeys kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.7rem;
}

@media (max-width: 767.98px) {
    .premium-search-modal {
        padding: 0 !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        align-items: stretch !important;
    }

    .premium-search-modal__dialog {
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-width: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        border: none !important;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .premium-search-modal__head {
        padding: 1.1rem 1rem 0.9rem;
        justify-content: space-between;
        background: #061222;
        border-bottom: 1px solid rgba(189, 126, 24, 0.3);
    }

    .premium-search-modal__icon {
        display: block !important;
        color: #d99b25;
        font-size: 1.1rem;
    }

    .premium-search-modal__input {
        width: 100%;
        text-align: left;
        font-size: 1.05rem;
    }

    .premium-search-modal__close {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        padding: 0;
    }

    .premium-search-modal__body {
        flex: 1 1 auto;
        max-height: calc(100vh - 125px);
        max-height: calc(100dvh - 125px);
        padding: 1.2rem 1rem;
        overflow-y: auto;
    }

    .premium-search-modal__foot {
        padding: 0.85rem 1rem;
        background: #061222;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .premium-search-modal__hotkeys {
        flex-wrap: wrap;
        gap: 6px 10px;
    }
}