/* Suggestions header / drawer */
.play4geek-search-suggest {
    margin-top: 0.65rem;
    max-height: min(70vh, 420px);
    overflow: auto;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--bg-accent) 18%, transparent);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(8, 24, 48, 0.14);
    padding: 0.55rem 0.35rem;
}

.play4geek-search-suggest--drawer {
    margin-top: 0.5rem;
    max-height: 240px;
}

.play4geek-search-suggest-label {
    margin: 0.25rem 0.45rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(14, 32, 56, 0.55);
}

.play4geek-search-suggest-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.play4geek-search-suggest-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    color: var(--bg-dark);
    text-decoration: none;
}

.play4geek-search-suggest-link:hover,
.play4geek-search-suggest-link:focus-visible {
    background: color-mix(in srgb, var(--bg-accent) 8%, transparent);
    outline: none;
}

.play4geek-search-suggest-thumb {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
}

.play4geek-search-suggest-thumb.is-empty {
    background: linear-gradient(135deg, color-mix(in srgb, var(--bg-accent) 35%, transparent), color-mix(in srgb, var(--bg-dark) 90%, transparent));
}

.play4geek-search-suggest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play4geek-search-suggest-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
}

.play4geek-search-suggest-empty {
    margin: 0.5rem 0.65rem;
    color: rgba(14, 32, 56, 0.65);
    font-size: 0.9rem;
}

.play4geek-search-suggest-footer {
    margin: 0.35rem 0.5rem 0.25rem;
    padding-top: 0.35rem;
    border-top: 1px solid color-mix(in srgb, var(--bg-accent) 12%, transparent);
    font-size: 0.88rem;
}

.play4geek-search-suggest-footer a {
    font-weight: 600;
}

.header-search-panel-inner {
    position: relative;
}

/* Page résultats : jeux + forum */
.search-games-section.search-page-section,
.search-content-section.search-page-section {
    margin-bottom: 1rem;
}

.search-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.7rem;
}

.search-game-card {
    background: color-mix(in srgb, var(--bg-accent, #145982) 2%, #fff);
    border: 1px solid color-mix(in srgb, var(--bg-accent, #145982) 12%, transparent);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.search-game-card:hover {
    border-color: color-mix(in srgb, var(--bg-accent, #145982) 28%, transparent);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.search-game-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.search-game-card-cover {
    aspect-ratio: 3 / 4;
    max-height: 210px;
    background: #0f172a;
}

.search-game-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.search-game-card-body {
    padding: 0.6rem 0.65rem 0.7rem;
}

.search-game-card-body h3 {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.25;
    color: var(--text-dark, #0f172a);
}

.search-game-card-body p {
    margin: 0.2rem 0 0;
    font-size: 0.74rem;
    color: rgba(14, 32, 56, 0.68);
}

/* Forum — section recherche globale */
.search-forum-section.search-page-section {
    margin-bottom: 1rem;
}

.search-forum-section-body {
    display: grid;
    gap: 0.75rem;
}

.search-forum-boards {
    margin: 0;
}

.search-forum-topics {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.search-forum-topic-card {
    margin: 0;
}

.search-forum-topic-card__link {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.65rem 0.7rem;
    border: 1px solid color-mix(in srgb, var(--bg-accent, #145982) 12%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-accent, #145982) 2%, #fff);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-forum-topic-card__link:hover,
.search-forum-topic-card__link:focus-visible {
    border-color: color-mix(in srgb, var(--bg-accent, #145982) 28%, transparent);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    outline: none;
}

.search-forum-topic-card__thumb {
    display: block;
    width: 46px;
    min-height: 62px;
}

.search-forum-topic-card__thumb .p4g-forum-topic-thumb,
.search-forum-topic-card__thumb .p4g-forum-topic-thumb--row {
    width: 46px;
    height: 62px;
}

.search-forum-topic-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.search-forum-topic-card__body {
    min-width: 0;
}

.search-forum-topic-card__type,
.search-forum-topic-card__board {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(14, 32, 56, 0.55);
}

.search-forum-topic-card__title {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.95rem;
    line-height: 1.3;
    color: var(--text-dark, #0f172a);
}

.search-forum-topic-card__excerpt {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.84rem;
    line-height: 1.4;
    color: rgba(14, 32, 56, 0.7);
}

.search-forum-topic-card__board {
    margin-top: 0.3rem;
    text-transform: none;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0;
    color: var(--bg-accent, #145982);
}

.p4g-forum-search-results--global .p4g-forum-search-boards--compact {
    display: grid;
    gap: 0.5rem;
}

.p4g-forum-search-results--global .p4g-forum-search-boards__link {
    padding: 0.6rem 0.7rem;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--bg-accent, #145982) 12%, transparent);
    background: color-mix(in srgb, var(--bg-accent, #145982) 2%, #fff);
}

body.theme-dark .search-game-card,
body.theme-dark .search-forum-topic-card__link,
body.theme-dark .p4g-forum-search-results--global .p4g-forum-search-boards__link {
    background: color-mix(in srgb, #fff 3%, var(--surface-card, #111827));
    border-color: color-mix(in srgb, #fff 10%, transparent);
}

body.theme-dark .search-game-card-body h3,
body.theme-dark .search-forum-topic-card__title {
    color: var(--text-dark, #f8fafc);
}

body.theme-dark .search-forum-topic-card__excerpt,
body.theme-dark .search-game-card-body p {
    color: rgba(226, 232, 240, 0.72);
}

@media (max-width: 720px) {
    .search-games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .search-games-grid {
        grid-template-columns: 1fr;
    }

    .search-game-card-cover {
        max-height: none;
        aspect-ratio: 16 / 9;
    }
}
