/* 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 */

/* Button-like links with icons */
.home-link { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); }

/* Ultra-small phones: extra tightening is in common.css; keep icon size */
@media (max-width: 360px) {
  .nav-links .home-link { width: 40px; height: 40px; }
}
.home-link:hover { background: rgba(255,255,255,.2); }
.nav-links .home-link { display: inline-flex; align-items: center; gap: 8px; position: relative; }
.nav-links .home-link::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background: url('Accueil.png') no-repeat center / contain;
}

/* Page de recherche */
.search-container {
    max-width: 1200px;
    margin: 40px auto;
    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) {
    /* Accueil button: icon-only, pinned to right */
    .nav-links .home-link {
        padding: 10px;
        background: #434344 !important;
        border-radius: 5px;
        width: 44px;
        height: 44px;
        border: 1px solid #3a3a3b;
        box-shadow: 0 2px 6px rgba(0,0,0,0.25);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0; /* hide text visually, keep accessible name */
        gap: 0;
        margin-left: auto; /* push to the far right */
    }
    .nav-links .home-link::before { width: 20px; height: 20px; }

    .search-container { padding: 0 16px; margin: 20px 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; }
}

/* 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 */
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);
}

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

/* Card polish */
.card {
  background: linear-gradient(180deg, rgba(26,35,50,0.65), rgba(26,35,50,0.85));
  box-shadow:
    0 10px 30px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative; /* enable overlay watermark */
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 38px rgba(0,0,0,0.45);
}
.card img { will-change: transform; }

/* Disable overlay watermark: place the logo inside the info bar */
.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 */
