/* Base resets and body defaults are provided by common.css */

/* Navigation specifics are defined in common.css; search-specific overrides below */

/* Logo/nav base styles are in common.css */

/* Accueil link on search page: plain white text next to the logo */
.home-link { background: transparent; border: 0; color: #fff; box-shadow: none; }

/* Ultra-small phones: keep text natural size */
@media (max-width: 360px) {
  .nav-links .home-link { width: auto; height: auto; padding: 0; }
}
.home-link:hover { background: transparent; }
.home-link { display: inline-flex; align-items: center; gap: 8px; position: relative; }

/* Spacing between logo text and Accueil */
.logo .home-link { margin-left: 12px; }

/* Page de recherche */
.search-container {
    max-width: 1200px;
    margin: 0 auto; /* remove extra top gap under navbar */
    padding: 0 20px;
}

.search-header {
    text-align: center;
    margin-bottom: 40px;
}

.search-header h1 {
    color: #2B22EE;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.search-input-container { display: flex; gap: 10px; margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; align-items: center; }

/* Icône de recherche à côté du champ */
.search-icon { width: 32px; height: 32px; flex: 0 0 auto; display: inline-block; opacity: .9; filter: brightness(1.1); }

#search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
}

#search-input:focus {
    border-color: #2B22EE;
    background: rgba(255, 255, 255, 0.08);
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-results {
    min-height: 200px;
}

/* Genre filters */
.genre-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 auto 20px auto;
    max-width: 900px;
}

.genre-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition: background .2s ease, border-color .2s ease, transform .1s ease;
}

.genre-chip:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.28); }
.genre-chip:active { transform: translateY(1px); }
.genre-chip.active { background: rgba(43,34,238,0.25); border-color: rgba(43,34,238,0.55); }

.no-results {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    padding: 50px 0;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Card base, type and rating styles are inherited from common.css */

/* Base link styles are provided by common.css */

/* Brand badge styles are centralized in common.css */

/* Mobile styles */
@media (max-width: 768px) {
    /* Ensure same navbar height/padding as other pages (without showing the loupe) */
    nav[aria-label="Navigation principale"] {
        padding: 10px 12px !important;
        min-height: 60px !important;
        align-items: center !important;
    }
    /* Align with other pages: hide Accueil on mobile to keep navbar same height */
    .logo .home-link, .home-link { display: none !important; }
    .home-link::before { width: 20px; height: 20px; }

    .search-container { padding: 0 16px; margin: 0 auto; }
    .search-header h1 { font-size: 1.8rem; color: #2B22EE; }
    .search-input-container { flex-direction: row; gap: 10px; align-items: center; }
    .search-icon { width: 24px; height: 24px; opacity: .95; }
    #search-input { background: #434344 !important; color: #ffffff; border: 1px solid #3a3a3b; width: 100%; }
    #search-input::placeholder { color: rgba(255, 255, 255, 0.7); }
    #search-input:focus { background: #3e3e3f !important; border-color: #2B22EE; }
    .search-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
    /* Hide genre filters on mobile to save vertical space */
    .genre-filters { display: none !important; }
    .genre-chip { padding: 7px 10px; font-size: 13px; }
    /* Prevent animated gradient background from repeating on mobile */
    body {
        background-repeat: no-repeat, no-repeat, no-repeat !important;
        background-attachment: scroll, scroll, scroll !important;
        /* Make radial gradients large enough and the linear fill the page */
        background-size: 180% 80%, 180% 90%, 100% 100% !important;
        background-position: 10% -10%, 100% 0%, center top !important;
    }
}

/* Neutralize system dark mode: keep site appearance unchanged in dark mode */
@media (prefers-color-scheme: dark) {
    :root { color-scheme: light; }
}

/* ===== Visual Enhancements (Search) ===== */

/* Animated gradient background */
html, body { background-color: #0B1117; }
body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(43,34,238,0.18), transparent 60%),
    radial-gradient(1000px 700px at 100% 10%, rgba(108,92,231,0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
}

/* Glassy nav with subtle blur */
nav[aria-label="Navigation principale"] {
  background: linear-gradient(180deg, rgba(0,0,0,0.85), rgba(0,0,0,0.65));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  /* Use default spacing/alignment from common.css to keep consistency */
}

/* Gradient title text */
.search-header h1 {
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

/* Card polish */
/* Card visuals are centralized in common.css to keep consistency across pages */
/* .card and hover styles removed here to avoid duplication */
/* Keep only page-specific layout/behavior below */

/* Disable overlay watermark: place the logo inside the info bar */
/* Watermark already disabled globally */
/* .card::after { content: none; } */

/* Info bar layout (logo, sizing) inherits from common.css */

/* Keep type then rating side-by-side (handled in common.css) */

/* Input focus ring */
#search-input:focus {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(43,34,238,0.35), 0 6px 20px rgba(0,0,0,0.35);
}

/* A11y focus ring, transitions, reduced motion, and scrollbar styles are shared in common.css */
