@font-face {
    font-family: 'RoGSanSrfStd';
    src: url('fonts/RoGSanSrfStd-Bd.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: white;
    padding: 0;
    margin: 0;
    font-family: 'Bricolage Grotesque', sans-serif;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

img, video {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lora', serif;
    font-weight: 500;
    letter-spacing: -2%;
}

.header {
    background: white;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    width: 100%;
    padding: 12px 0;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
}

.header-title-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.header-logo {
    height: 36px;
    width: auto;
    display: block;
}

.header-title {
    font-size: 24px;
    line-height: 28px;
    margin: 0;
    white-space: nowrap;
}

.header-nav-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-nav-btn {
    padding: 6px 12px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
}

.header .search-wrapper {
    width: 100%;
    max-width: 360px;
    flex-shrink: 0;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-wrapper .search-icon,
.page-search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9D37E5;
    font-size: 14px;
    line-height: 20px;
    pointer-events: none;
    z-index: 1;
}

/* Champ recherche : header et page (mêmes styles) */
.search-input,
.page-search-input {
    width: 100%;
    padding: 7px 31px 7px 31px;
    font-size: 14px;
    line-height: 20px;
    box-shadow: 0 0 4px 0 #F2F1F4;
    border: 1px solid #E4E0E6;
    border-radius: 8px;
    outline: none;
    transition: outline-color 0.3s ease;
}

.search-input:hover,
.page-search-input:hover {
    background-color: #FBFAFB;
    box-shadow: 0 0 4px 0 #ECEAEE;
}

.search-input:focus,
.page-search-input:focus {
    border: 1px solid #9D37E5;
    box-shadow: 0 0 4px 0 #9D37E5;
}

.search-input::placeholder,
.page-search-input::placeholder {
    font-family: 'Bricolage Grotesque', sans-serif;
    color: #98949B;
    font-weight: 200;
    font-size: 14px;
    line-height: 20px;
}

.search-clear,
.page-search-clear {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 14px;
    color: #767378;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 20px;
    transition: color 0.2s ease;
}

.search-clear:hover,
.page-search-clear:hover {
    color: #5A585C;
}

.suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    max-height: 320px;
    padding: 8px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.12);
}

.suggestion-item {
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background-color: #f5f5f5;
}

.suggestion-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.suggestion-text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.suggestion-item .body-medium {
    color: #333;
}

.suggestion-type {
    color: #666;
    font-size: 12px;
}

.no-results {
    grid-column-start: 1; grid-column-end: -1;
    text-align: center;
    padding: 32px 0;
    color: #666;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    width: 40px;
    height: auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.error {
    text-align: center;
    padding: 20px;
    color: #ff0000;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    width: 100%;
}
.related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 0 16px;
}

.section-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background-color: #FBFAFB;
    border-bottom: 1px solid #E4E0E6;
    padding: 32px 20px;
    margin: 0 auto;
}

.homepage-section-title {
    padding: 80px 20px;
}

.homepage-section-title h1{
    font-size: 44px;
    line-height: 52px;
}

.homepage-section-title p{
    max-width: 480px;
    text-align: center;
    color: #767378;
    margin-bottom: 40px;
}

.section-title h1,
.section-title h2 {
    margin: 0;
}

.archetype-title {
    display: flex;
    gap: 8px;
}

.title-content {
    display: flex;
    flex-direction: column;
}

.section-title .title-content {
    justify-content: center;
    gap: 16px;
}

.section-title .archetype-title {
    gap: 16px;
}

.title-count {
    color: #767378;
}

.title-image {
    width: 36px;
    height: 36px;
    object-fit: fill;
    border-radius: 4px;
    flex-shrink: 0;
}

.section-title .title-image {
    width: 120px;
    height: 120px;
    object-fit: fill;
    border-radius: 16px;
    flex-shrink: 0;
}

.set-title {
    display: flex;
    gap: 32px;
    align-items: center;
    max-width: 800px;
}

.set-title-image {
    width: auto;
    max-width: 320px;
    height: 320px;
    object-fit: contain;
    flex-shrink: 0;
}

.set-title-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
}

.set-title-name {
    margin: 0;
}

.set-title-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.set-title-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.set-title-label {
    color: #767378;
    font-weight: 500;
    width: 120px;
}

.related-header .section-title,
.related-header .archetype-title {
    margin: 0;
    flex: 1;
}

/* Style commun pour tous les boutons */
.button {
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0);
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: black;
}

.button:hover {
    background: #FBFAFB;
    color: #9D37E5;
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bouton primaire : base commune */
.button-primary-medium,
.button-primary-small {
    color: white;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    background: #B15FEA;
    background: linear-gradient(135deg, rgba(177, 95, 234, 1) 0%, rgba(143, 50, 208, 1) 100%);
    border: 1px solid #BD79EE;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.button-primary-medium {
    padding: 8px 12px;
    border-radius: 8px;
}

.button-primary-small {
    padding: 4px 8px;
    border-radius: 4px;
}

.icon-small {
    width: 16px;
    height: 16px;
    font-size: 16px;
    vertical-align: text-bottom;
    color: #9D37E5;
    margin-left: 4px;
    margin-right: -4px;
}

.related-cards {
    display: flex;
    flex-direction: row;
    gap: 16px;
    padding: 16px 16px 0 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.related-cards::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.related-cards .card-container {
    flex: 0 0 auto;
    width: 160px;
}

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

#setsList.sets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

@media (max-width: 768px) {
    #setsList.sets-grid {
        grid-template-columns: 1fr;
    }
}

.card-container {
    cursor: default;
}

.card-image-container {
    transform-style: preserve-3d;
    position: relative;
    overflow: visible;
    will-change: transform;
    cursor: pointer;
}

/* Styles pour l'effet glare de vanilla-tilt */
.card-image-container .js-tilt-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

.card-image-container .js-tilt-glare-inner {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(45deg);
    transition: opacity 0.1s;
}

.card-image {
    width: 100%;
    height: auto;
    display: block;
}

.card-image-dimmed {
    filter: grayscale(0.9);
}

/* Typographie réutilisable */
.body-small {
    font-size: 12px;
    line-height: 16px;
    font-weight: 300;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.body-medium {
    font-size: 14px;
    line-height: 20px;
    font-weight: 300;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.body-large {
    font-size: 16px;
    line-height: 24px;
    font-weight: 300;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.title-small {
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.title-medium {
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.title-large {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.label-small {
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.label-medium {
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.label-large {
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card-name-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    gap: 4px;
}

.card-meta-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #767378;
}

.card-konami-id {
    color: #767378;
}

.card-tcg-date {
    color: #767378;
}

.card-name {
    text-align: center;
    transition: color 0.2s ease;
}

.card-name:hover {
    color: #9D37E5;
    text-decoration: underline;
}

.load-more-container {
    text-align: center;
}
/* Overlay */
.overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    transition: opacity 0.4s ease;
    cursor: pointer;
}

.expanded-card-image {
    pointer-events: none;
    user-select: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Page de détails de la carte */

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #5568d3;
}

.header-title {
    cursor: pointer;
    transition: color 0.2s ease;
}

.header-title:hover {
    color: #9D37E5;
}

.card-content {
    display: flex;
    gap: 16px;
    padding: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
    background-color: #FBFAFB;
    outline: 1px solid #E4E0E6;
    border-radius: 24px;
}

.card-image-wrapper {
    flex: 0 0 auto;
    transform-style: preserve-3d;
}

.card-img {
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.artwork-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.artwork-thumbnail {
    width: 56px;
    height: auto;
    object-fit: cover;
    border-radius: 2px;
    cursor: pointer;
    outline: 2px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 0 8px 0 #D6D1DA;
}

.artwork-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 0 8px 0 #767378;
}

.artwork-thumbnail.selected {
    outline-color: #9D37E5;
    box-shadow: 0 0 8px 0 #9D37E5;
}

.logos-section {
    display: flex;
    justify-content: stretch;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}

.other-formats-section {
    width: 100%;
}

.other-formats-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    padding: 16px;
    background-color: #FBFAFB;
    border: 1px solid #E4E0E6;
    border-radius: 16px;
}

.other-formats-label {
    font-size: 14px;
    line-height: 20px;
    font-weight: 300;
    color: #3d3a40;
    flex-shrink: 0;
}

.other-formats-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.other-formats-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
}

.other-formats-item:not(:first-child) {
    border-left: 1px solid #dedae1;
}

.format-legality-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    line-height: 20px;
}

.format-legality-icon--legal {
    color: #639D0B;
}

.format-legality-icon--illegal {
    color: #FF3550;
}

.card-ygo-footer-section {
    width: 100%;
    text-align: center;
}

.card-ygo-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.card-ygo-footer-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.card-ygo-footer-stat {
    color: #767378;
    font-weight: 300;
}

.card-ygo-footer-link-row {
    display: flex;
    justify-content: center;
}

.card-ygo-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #767378;
    text-decoration: underline;
    font-weight: 300;
}

.card-ygo-footer-link:hover {
    color: #9D37E5;
}

.card-ygo-footer-external-icon {
    font-size: 11px;
}

.logo-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    vertical-align: middle;
    gap: 8px;
    padding: 8px;
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    background-color: #FBFAFB;
    outline: 1px solid #E4E0E6;
    border-radius: 16px;
}

.banlist-value {
    align-self: center;
    flex-shrink: 0;
    padding: 12px;
    border-radius: 8px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
}

.banlist-value span {
    padding: 0 4px;
}

.logo-item .banlist-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.banlist-value--unlimited {
    background-color: white;
    outline: 1px solid #E4E0E6;
    box-shadow: 0px 0px 4px 0px #E4E0E6;
    color: black;
}

.banlist-value--limited,
.banlist-value--semi-limited {
    background-color: #FFF8E6;
    outline: 1px solid #FFD154;
    box-shadow: 0px 0px 4px 0px #FFEAB0;
    color: #E8AA00;
}

.banlist-value--forbidden {
    background-color: #FFEBEE;
    outline: 1px solid #FF3550;
    box-shadow: 0px 0px 4px 0px #FF3550;
    color: #FF3550;
}

/* Icône banlist sur les cartes (grille banlist) */
.banlist-icon-overlay {
    position: absolute;
    top: -12px;
    right: -4px;
    width: 32px;
    height: auto;
    z-index: 10;
    pointer-events: none;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0px 0px 8px 0px #767378;
}

.md-rarity-icon-overlay {
    position: absolute;
    top: -14px;
    right: 0px;
    height: 14px;
    width: auto;
    z-index: 10;
    pointer-events: none;
    object-fit: contain;
}

.card-rarity-separator {
    width: 100%;
    height: 1px;
    background-color: #E0E0E0;
    margin: 0 4px;
}

.card-set-code {
    color: #9D37E5;
}

.card-set-rarity {
    color: #767378;
}

.card-set-rarity-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    color: #767378;
}

.logo-image {
    width: 80px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.release-date-container {
    display: flex;
    flex-direction: row;
    gap: 4px;
}

.card-info {
    flex: 1;
    min-width: 300px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card-title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-beta-name {
    color: #767378;
}

.card-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    color: #767378;
}

@media (max-width: 768px) {
    .card-meta {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .card-meta {
        grid-template-columns: 1fr;
    }
}

.attribute-icon {
    display: inline-block;
    object-fit: contain;
}

@media (max-width: 768px) {
    .card-content {
        flex-direction: column;
    }
    
    .card-img {
        max-width: 100%;
    }
}

/* Conteneur principal pour toutes les pages */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.homepage-latest-sets {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 32px;
    margin-bottom: 32px;
}

.homepage-latest-sets h1,
.homepage-most-viewed-cards h1,
.homepage-popular-cards h1 {
    text-align: center;
}

.homepage-most-viewed-cards {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 32px;
    margin-bottom: 32px;
}

.homepage-popular-cards {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 32px;
    margin-bottom: 32px;
}

.homepage-latest-sets-list {
    width: 100%;
}


.page-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
}

/* Variante large pour la page d'accueil (index.html) */
.homepage-section-title .page-search-wrapper {
    width: 100%;
    max-width: 640px;
}

.homepage-section-title .page-search-input {
    padding: 11px 40px 11px 40px;
    border-radius: 12px;
    font-size: 16px;
    line-height: 24px;
}

.homepage-section-title .search-icon,
.homepage-section-title .search-clear {
    font-size: 16px;
    line-height: 24px;
}

.homepage-section-title .search-input::placeholder,
.homepage-section-title .page-search-input::placeholder {
    font-size: 16px;
    line-height: 24px;
}

.homepage-random-card-btn {
    margin-top: 16px;
    background-color: #F2F1F4;
    color: #9D37E5;
}

.homepage-random-card-btn:hover{
    background-color: #ECEAEE;
    transition: all 0.2s ease;
}

.list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
    transition: all 0.2s ease;
    background: white;
    cursor: pointer;
}

.item:hover {
    background-color: #FBFAFB;
    color: #9D37E5;
    transition: all 0.2s ease;
}

.item-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 4px;
}

.item-info {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    align-self: center;
    text-align: center;
}

.item-count {
    color: #767378;
    align-self: center;
}

.search-and-tabs-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.search-wrapper-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sets-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 8px;
}

.sets-card-image {
    width: auto;
    height: 36px;
    object-fit: cover;
}

.sets-header-info {
    display: flex;
    flex-direction: column;
}

.cards-count {
    color: #767378;
    white-space: nowrap;
}

/* Filters modal (cards.html) */
.filters-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.filters-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #FBFAFB;
    outline: 1px solid #F2F1F4;
}

.filters-toggle-btn:hover {
    background-color: #F2F1F4;
    outline: 1px solid #E4E0E6;
}

.filters-toggle-btn i {
    font-size: 12px;
    color: #9D37E5;
}

.filters-toggle-btn span {
    font-size: 13px;
}

.filters-toggle-btn--active {
    border-radius: 8px 0 0 8px;
}

.filters-reset-btn {
    background-color: #FBFAFB;
    outline: 1px solid #F2F1F4;
    padding: 8px 8px;
    border-radius: 0 8px 8px 0;
}

.filters-reset-btn:hover {
    background-color: #FFEBEE;
    outline: 1px solid #FFC0C9;
}

.filters-reset-btn i {
    font-size: 14px;
    line-height: 20px;
    width: 20px;
    color: #FF3550;
}

body.filters-modal-open {
    overflow: hidden;
}

.filters-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.filters-modal.is-open {
    display: flex;
}

.filters-modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.filters-panel {
    position: relative;
    z-index: 1;
    min-width: 320px;
    max-width: min(1200px, 100vw);
    max-height: calc(100vh - 32px);
    overflow: auto;
    background-color: white;
    color: black;
    outline: 1px solid #E4E0E6;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.filters-panel-inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    padding: 8px;
}

.filters-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filters-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    background-color: #FBFAFB;
    outline: 1px solid #F2F1F4;
    border-radius: 16px;
}

.filters-group-title {
    color: black;
    padding-left: 4px;
}

.filters-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.filters-chips-wrap {
    row-gap: 4px;
}

.filter-pill {
    border-radius: 8px;
    border: 1px solid #E4E0E6;
    background-color: white;
    color: black;
    padding: 4px 12px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.filter-attribute-pill {
    padding-inline: 8px 10px;
}

.filter-attribute-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.filter-banlist-pill {
    padding-inline: 8px 10px;
}

.filter-banlist-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.filter-frame-pill {
    padding-inline: 6px 10px;
}

.filter-frame-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}

.filter-race-pill {
    padding-inline: 8px 10px;
}

.filter-race-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}

.filter-linkmarker-pill {
    padding-inline: 6px 10px;
}

.filter-linkmarker-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.filter-scale-pill {
    padding-inline: 8px 10px;
}

.filter-scale-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.filter-level-pill {
    padding-inline: 8px 10px;
}

.filter-level-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.filter-pill.is-selected {
    background: #F5EBFC;
    color: #9D37E5;
    border-color: #9D37E5;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.filters-group-linkval .filter-pill {
    font-family: 'RoGSanSrfStd', sans-serif;
    font-size: 10px;
}

.filters-range {
    display: flex;
    color: black;
    gap: 8px;
}
.filters-number-input,
.filters-date-input {
    width: 100%;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #E4E0E6;
    background-color: white;
    color: black;
    outline: none;
    font-size: 12px;
    line-height: 16px;
}

.filters-number-input::placeholder {
    color: #98949B;
}

.filters-number-input:focus,
.filters-date-input:focus {
    border-color: #9D37E5;
    box-shadow: 0 0 0 1px rgba(157, 55, 229, 0.4);
}

.filters-footer {
    background-color: #FBFAFB;
    border-top: 1px solid #E4E0E6;
    border-radius: 0 0 24px 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 16px;
    gap: 8px;
    margin-top: 16px;
}

.filters-clear-btn {
    color: black;
}

.filters-clear-btn:hover {
    background-color: #FFEBEE;
    color: #FF3550
}

.filters-apply-btn {
    padding-inline: 14px;
}

@media (max-width: 900px) {
    .filters-modal {
        padding: 16px;
    }

    .filters-panel {
        max-width: none;
        width: 100%;
        max-height: 85vh;
    }

    .filters-panel-inner {
        grid-template-columns: 1fr;
    }
}

.tabs-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Onglets tri et filtre : même apparence */
.sort-tabs,
.filter-tabs {
    display: flex;
    align-items: center;
    background-color: #FBFAFB;
    outline: 1px solid #E4E0E6;
    border-radius: 8px;
    padding: 4px;
    gap: 0;
    width: fit-content;
    color: black;
}

.sort-tab,
.filter-tab {
    font-size: 14px;
    line-height: 20px;
    font-weight: 300;
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    border-radius: 4px;
    white-space: nowrap;
    color: black;
}

.sort-tab:not(:last-child)::after,
.filter-tab:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background-color: #E4E0E6;
}

.sort-tab.active,
.filter-tab.active {
    font-weight: 500;
    background-color: white;
    box-shadow: 0px 0px 4px 0px #D6D1DA;
}

.sort-tab:hover:not(.active),
.filter-tab:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.5);
}

.sets-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 16px;
}

/* Styles spécifiques pour les sets dans sets.html */
.set-item-page {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    padding: 16px;
    gap: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}

.set-item-page:hover {
    background: #FBFAFB;
    color: #9D37E5;
}

.set-item-page .set-image-container {
    width: 100%;
    position: relative;
    padding-bottom: 100%; /* Crée un carré */
    overflow: hidden;
}

.set-item-page .set-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Styles spécifiques pour les sets dans card-details.html */
.set-item-card {
    display: flex;
    align-items: center;
    background: #FBFAFB;
    outline: 1px solid #E4E0E6;
    border-radius: 16px;
    padding: 16px;
    gap: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}

.set-item-card:hover {
    outline: 1px solid #9D37E5;
    color: #9D37E5;
}

.set-image {
    width: 90px;
    height: 120px;
    object-fit: contain;
}
.set-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.set-date{
    color: #767378;
}

/* Styles pour les sets dans card-details.html */
.set-item-card .set-meta {
    color: #9D37E5;
}

.set-item-card .set-name {
    color: #767378;
    margin-top: 8px;
}

/* Styles pour les sets dans sets.html */
.set-item-page .set-meta {
    color: #767378;
}

.set-item-page .set-name {
    color: inherit;
    text-align: center;
}

.set-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.set-item-page .set-meta-row {
    color: #767378;
}

.set-item-page .set-meta-separator {
    color: #767378;
}

@media (max-width: 768px) {
    .list,
    .sets-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .list,
    .sets-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .header-content {
        justify-content: center;
        gap: 12px;
    }

    .header-title-container {
        position: static;
        transform: none;
        order: 1;
    }

    .header-nav-buttons {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .header .search-wrapper {
        order: 2;
        max-width: 100%;
    }

    .homepage-section-title h1 {
        font-size: clamp(1.8rem, 7vw, 2.6rem);
        line-height: 1.2;
        text-align: center;
    }

    .homepage-section-title p {
        font-size: 0.9375rem;
        line-height: 1.5;
    }
}

@media (max-width: 768px) {
    .search-and-tabs-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper-group {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .page-search-wrapper {
        flex: 1 1 100%;
    }

    .tabs-container {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .cards-count {
        margin-top: 8px;
    }
}

@media (max-width: 768px) {
    .logos-section {
        flex-direction: column;
    }
}

