
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Coda", system-ui;
}

body {
    overflow-x: hidden;
    background: #e0e0e0;
    color: #333;
}

body:has(.pokemon-card-expand[open]) {
    overflow: hidden;
}

/* =======================
   HEADER
======================= */

header {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 40px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 1000;
}

header a {
    text-decoration: none;
    padding: 0 15px;
    color: black;
}

.header svg {
    stroke: black;
}

.header-icon-transparent {
    stroke: black;
    cursor: pointer;
}

.header-icon{
    stroke: black;
    cursor: pointer;
}

/* =======================
   PAGE CATÉGORIE
======================= */

.category-page {
    padding-top: 170px; /* pour passer sous le header fixed */
    width: 100%;
}

.category-top {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 20px auto;
    padding: 0 20px;
}

.page-title {
    font-size: 52px;
    font-weight: 900;
    letter-spacing: -1px;
}

.page-subtitle {
    margin-top: 8px;
    opacity: .75;
}

/* Filtres */
.category-filters {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 18px auto;
    padding: 0 20px;
}

.filters-form {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: end;
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.filters-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
    flex: 1;
}

.filters-label {
    font-size: 14px;
    opacity: .75;
}

.filters-select {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.1);
    outline: none;
    background: rgba(255,255,255,0.85);
}

.filters-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filters-btn {
    padding: 12px 16px;
    border-radius: 14px;
    border: none;
    background: #000;
    color: #fff;
    cursor: pointer;
}

.filters-reset {
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.7);
    text-decoration: none;
    color: #000;
}

/* Grid cards */
.category-grid {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.cat-card {
    border-radius: 20px;
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}

.cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(0,0,0,0.12);
}

.cat-img {
    width: 100%;
    height: 190px;
    object-fit: contain;
    padding: 18px;
}

.cat-body {
    padding: 0 18px 18px 18px;
}

.cat-name {
    font-size: 30px;
    font-weight: 900;
    margin-top: 6px;
}

.cat-id {
    margin-top: 6px;
    opacity: .7;
}

.cat-types {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.cat-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.08);
    font-size: 14px;
}

.cat-type img { display: block; }

.cat-link {
    display: inline-block;
    margin-top: 14px;
    text-decoration: none;
    color: #2b3cff;
    font-weight: 600;
}

/* Pagination */
.pagination {
    margin: 22px auto 10px auto;
    max-width: 1100px;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 10px 14px;
    border-radius: 14px;
    text-decoration: none;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(0,0,0,0.08);
    color: #000;
}

.page-btn.disabled {
    opacity: .4;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-number {
    padding: 8px 12px;
    border-radius: 12px;
    text-decoration: none;
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(0,0,0,0.08);
    color: #000;
}

.page-number.active {
    background: rgba(0,0,0,0.12);
    font-weight: 800;
}

.page-info {
    text-align: center;
    opacity: .75;
    margin-bottom: 30px;
}

/* =======================
   MODALS / OVERLAYS
======================= */

.generic-overlay,
/* =======================
   OVERLAY RECHERCHE
======================= */

.search-overlay {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 150px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
}

.search-container {
    width: 60%;
    background: white;
    padding: 30px;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    position: relative;
}

.search-top-bar {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-top-bar form {
    flex-grow: 1;
    display: flex;
    gap: 10px;
}

.search-top-bar input {
    flex-grow: 1;
    padding: 12px 20px;
    border-radius: 15px;
    border: 1px solid #ccc;
    font-size: 1.1em;
    outline: none;
}

.search-top-bar button {
    padding: 0 20px;
    border-radius: 15px;
    border: none;
    background: #000;
    color: #fff;
    cursor: pointer;
}

.clear-search-btn {
    background: #e74c3c;
    color: white !important;
    padding: 10px 15px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.8em;
}

.result-list-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    justify-content: center;
}

.search-sprites {
    background: #f8f8f8;
    padding: 10px;
    border-radius: 15px;
    text-align: center;
    width: 160px;
    border: 1px solid #eee;
}

.search-sprites img { width: 100%; height: auto; }


#toggle-favs:checked ~ #favs-overlay,
#toggle-auth:checked ~ #auth-overlay,
#toggle-search:checked ~ #search-overlay {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.close-btn {
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
}

.favs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fav-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.clear-search-btn {
    cursor: pointer;
    margin-left: 10px;
    font-weight: 700;
}
