/* ===== addons.css — page Addons Sylvania ===== */

/* Conteneur principal (remplace .container Bootstrap) */
.addons-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
    position: relative;
    z-index: 1;
}

.white-text { color: #fff; }

.header-section {
    text-align: center;
    margin-bottom: 2rem;
}
.header-section h1 {
    margin-bottom: 0.8rem;
}
.header-section p {
    color: rgba(255,255,255,0.65);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== Barre de contrôle (search + filtres + bundle) ===== */
.addon-controls {
    background: rgba(10, 14, 22, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 12px;
    padding: 18px 20px;
    margin: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: center;
}

.addon-search {
    flex: 1 1 280px;
    max-width: 480px;
    position: relative;
}
.addon-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(197, 160, 89, 0.6);
    pointer-events: none;
}
.addon-search input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(197, 160, 89, 0.3);
    color: #fff;
    padding: 10px 14px 10px 40px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.addon-search input::placeholder { color: rgba(255,255,255,0.4); }
.addon-search input:focus {
    outline: none;
    border-color: #C5A059;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.18);
}

.addon-filters {
    flex: 1 1 100%;
    order: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(197, 160, 89, 0.2);
    color: rgba(255, 255, 255, 0.75);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s ease;
    font-family: inherit;
}
.filter-chip i { font-size: 0.78rem; opacity: 0.75; }
.filter-chip:hover {
    color: #fff;
    border-color: rgba(197, 160, 89, 0.5);
    background: rgba(197, 160, 89, 0.08);
}
.filter-chip.active {
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.35), rgba(163, 130, 65, 0.55));
    border-color: #C5A059;
    color: #fff;
    box-shadow: 0 2px 12px rgba(197, 160, 89, 0.18);
}

.addon-summary {
    flex: 0 0 auto;
    margin-left: auto;
    order: 2;
    display: flex;
    align-items: center;
    gap: 14px;
}
#addon-count {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    white-space: nowrap;
    padding-left: 14px;
    border-left: 1px solid rgba(197, 160, 89, 0.25);
}
.bundle-btn {
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.3), rgba(163, 130, 65, 0.75));
    border: 1px solid rgba(197, 160, 89, 0.5);
    color: #fff;
    padding: 9px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.bundle-btn:hover {
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.5), rgba(163, 130, 65, 1));
    color: #fff;
    box-shadow: 0 0 18px rgba(197, 160, 89, 0.35);
    transform: translateY(-1px);
}
.bundle-size {
    background: rgba(0, 0, 0, 0.35);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

/* ===== Grille des addons ===== */
.addon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
    margin-top: 1.5rem;
}

.addon-card {
    background: rgba(10, 14, 22, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}
.addon-card:hover {
    transform: translateY(-4px);
    border-color: rgba(197, 160, 89, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 18px rgba(197, 160, 89, 0.12);
}
.addon-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, #C5A059, transparent);
    opacity: 0.55;
    z-index: 2;
}
.addon-card[hidden] { display: none; }

.addon-image-wrap {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(197, 160, 89, 0.15);
}
.addon-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}
.addon-card:hover .addon-image-wrap img {
    transform: scale(1.06);
}
.addon-image-wrap::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 38px;
    background: linear-gradient(transparent, rgba(10, 14, 22, 0.85));
    pointer-events: none;
}

.addon-content {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.addon-name {
    color: #C5A059;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.addon-name i { font-size: 0.9em; opacity: 0.8; }

.addon-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
    margin: 0 0 14px;
    line-height: 1.5;
    flex-grow: 1;
}

.addon-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 0.75rem;
    gap: 10px;
    flex-wrap: wrap;
}
.addon-cat-tag {
    color: rgba(197, 160, 89, 0.85);
    background: rgba(197, 160, 89, 0.08);
    border: 1px solid rgba(197, 160, 89, 0.2);
    padding: 3px 9px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.addon-cat-tag i { font-size: 0.7rem; }
.addon-size {
    color: rgba(255, 255, 255, 0.45);
    font-variant-numeric: tabular-nums;
}

.addon-footer {
    padding: 0 18px 18px;
    display: flex;
    gap: 8px;
}

.download-btn {
    flex: 1;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.2), rgba(163, 130, 65, 0.7));
    border: 1px solid rgba(197, 160, 89, 0.4);
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s ease;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.download-btn:hover {
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.4), rgba(163, 130, 65, 0.9));
    color: #fff;
    box-shadow: 0 0 14px rgba(197, 160, 89, 0.25);
}

.external-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(197, 160, 89, 0.25);
    color: rgba(255, 255, 255, 0.65);
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.15s ease;
}
.external-btn:hover {
    color: #C5A059;
    border-color: #C5A059;
    background: rgba(197, 160, 89, 0.1);
}

/* Message "aucun résultat" */
.addon-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 3rem 1rem;
    font-size: 1.1rem;
}
.addon-empty i { color: #C5A059; margin-right: 8px; }

/* ===== Footer ===== */
.page-footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 2rem 0;
    margin-top: 3rem;
    position: relative;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
}
.page-footer .container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.text-center { text-align: center; }

/* ===== Sélecteur de langue (renderLanguageSwitcher de lang.php) =====
   Reproduit l'apparence Bootstrap 5 sans charger Bootstrap.
   Bootstrap n'étant plus chargé sur /addons, on style ces classes nous-mêmes. */
.topbar-lang-switcher.dropdown {
    position: relative;
    display: inline-block;
}
.topbar-lang-switcher .topbar-lang-flag {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 1.3rem;
    color: inherit;
    line-height: 1;
    transition: opacity 0.2s ease, background 0.2s ease;
    cursor: pointer;
}
.topbar-lang-switcher .topbar-lang-flag:hover {
    background: rgba(197, 160, 89, 0.12);
}
.topbar-lang-switcher .topbar-lang-flag::after {
    /* petit chevron descendant à la Bootstrap */
    content: '';
    display: inline-block;
    width: 0; height: 0;
    margin-left: 6px;
    border-top: 4px solid currentColor;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0.6;
}
.topbar-lang-switcher .dropdown-menu {
    /* caché par défaut — affiché quand .show est sur le parent */
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 160px;
    padding: 6px 0;
    margin: 0;
    background: rgba(10, 14, 22, 0.97);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    list-style: none;
    z-index: 1000;
    animation: langDropdownIn 0.18s ease;
}
@keyframes langDropdownIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.topbar-lang-switcher.show .dropdown-menu { display: block; }
.topbar-lang-switcher .dropdown-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}
.topbar-lang-switcher .dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s ease, color 0.15s ease;
    cursor: pointer;
}
.topbar-lang-switcher .dropdown-item:hover,
.topbar-lang-switcher .dropdown-item:focus {
    background: rgba(197, 160, 89, 0.15);
    color: #fff;
    outline: none;
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
    .addons-container { padding: 2rem 1rem 3rem; }
    .addon-controls { gap: 12px 14px; }
    .addon-search { flex: 1 1 100%; max-width: none; }
    .addon-summary {
        flex: 1 1 100%;
        margin-left: 0;
        justify-content: space-between;
    }
    #addon-count {
        padding-left: 0;
        border-left: none;
    }
    .addon-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
