/* =========================================================================
   Section "Célébrités liées" — fiche célébrité
   Structure : 7 catégories (ascendant, pair, descendant, personnel,
   professionnel, oeuvre, autre), cartes uniformes, fond beige (cohérent
   avec .similar-celebrities-section), tri alphabétique, dépliage à 10.
   ========================================================================= */

.celebrity-relations {
    background: #fff;
    border-radius: 12px;
    border: 0.5px solid rgba(0, 0, 0, 0.12);
    padding: 1.5rem 1.75rem;
    margin: 1rem 0;
}

.rel-titlebar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.rel-titlebar h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}
.rel-summary {
    font-size: 13px;
    color: #999;
}

/* --- Catégories --- */
.cat-section {
    margin-bottom: 1.5rem;
}
.cat-section:last-of-type {
    margin-bottom: 0;
}
.cat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.cat-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #666;
}
.cat-count {
    font-size: 11px;
    color: #999;
}
.cat-rule {
    flex: 1;
    height: 0.5px;
    background: rgba(0, 0, 0, 0.12);
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

/* --- Cartes (palette beige des célébrités similaires) --- */
.rel-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 0.5px solid #ddd8d0;
    text-decoration: none;
    color: inherit;
    background: #f6f3ef;
    transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}
.rel-card:hover {
    background: #ede8e0;
    border-color: #c9c2b6;
}

.rel-card.is-extra {
    display: none;
}
.celebrity-relations.is-expanded .rel-card.is-extra {
    display: flex;
}

.rel-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: #ede8e0;
}
.rel-photo-placeholder {
    display: block;
}

.rel-info {
    min-width: 0;
    display: block;
    flex: 1;
}
.rel-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #2a2a2a;
}
.rel-role {
    display: block;
    font-size: 11px;
    color: #8a8077;
    text-transform: lowercase;
}

/* --- Bouton "Voir tout" --- */
.rel-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 0.75rem;
    margin-top: 1.25rem;
    border-radius: 8px;
    border: 0.5px solid rgba(0, 0, 0, 0.12);
    font-size: 13px;
    color: #666;
    cursor: pointer;
    background: transparent;
    font-family: inherit;
}
.rel-toggle:hover {
    background: #f7f7f5;
    border-color: rgba(0, 0, 0, 0.3);
}
.rel-toggle-chev {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s;
    margin-bottom: 2px;
}
.celebrity-relations.is-expanded .rel-toggle-chev {
    transform: rotate(-135deg);
    margin-bottom: -2px;
}

/* --- Mobile --- */
@media (max-width: 600px) {
    .celebrity-relations {
        padding: 1.25rem 1rem;
    }
    .cat-grid {
        grid-template-columns: 1fr;
    }
}
