/* =============================== */
/*  SECTION LISTE PERSONNAGES      */
/* =============================== */

.personnages-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Header */
.personnages-header {
    max-width: 980px;
    margin: 0 auto 28px;
    padding: 18px 22px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0ea5e9 0%, #a855f7 100%);
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    text-align: center;
    position: relative;
    overflow: visible;
}

.personnages-header::after {
    content: "👥";
    position: absolute;
    right: 18px;
    bottom: 12px;
    font-size: 2rem;
    opacity: .15;
}

.personnages-header h1 {
    margin: 0 0 12px 0;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: .5px;
    text-shadow: 0 2px 6px rgba(0,0,0,.3);
}

/* Catégorie label */
.categorie-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.categorie-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.categorie-text {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Barre de recherche */
.recherche-bar {
    max-width: 600px;
    margin: 0 auto 24px;
}

.recherche-bar input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

.recherche-bar input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Filtre alphabet */
.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 32px;
}

.alphabet-filter span {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.alphabet-filter span:hover {
    background: #e2e8f0;
    color: #334155;
}

.alphabet-filter span.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #a855f7 100%);
    color: #fff;
    transform: scale(1.1);
}

.alphabet-filter span[data-letter="all"] {
    width: auto;
    padding: 0 12px;
}

/* Grille portraits */
.portraits-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.link-portrait {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-portrait {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transition: all 0.25s ease;
    aspect-ratio: 3/4;
}

.link-portrait:hover .card-portrait {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,.15);
}

.card-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.7), transparent);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* Message vide */
.no-personnage-message {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #334155;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background: #f8fafc;
    border-color: #0ea5e9;
    color: #0ea5e9;
}

.pagination-link.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #a855f7 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 1100px) {
    .personnages-container {
        padding: 18px;
    }
}

@media (max-width: 768px) {
    .personnages-header h1 {
        font-size: 1.4rem;
    }

    .portraits-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 16px;
    }

    .alphabet-filter span {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .portraits-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .card-name {
        font-size: 0.8rem;
        padding: 8px 4px;
    }

    .alphabet-filter {
        gap: 4px;
    }

    .alphabet-filter span {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}
