.page-header {
    background: var(--c-green);
        color: #fff;
    padding: 40px 0;
}
.page-header__container {
    display: flex;
    flex-direction: row;
    width: min(var(--page-width), 100% - 2 * var(--page-gutter));
    margin: 0 auto;
    gap: 20px;
}
.page-header__main {
    display: flex;
    gap: 20px;
    align-items: center;
    min-width: 0;           /* peut rétrécir : les boutons passent à la ligne au lieu de pousser les chiffres hors de l'écran */
}
.page-header__visual {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
.page-header__avatar {
    display: flex;
    flex-shrink: 0;
    background-color: var(--c-text);
    width: 96px;
    height: 96px;
    border-radius: var(--radius-md);
    border: 3px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}
.page-header__initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: var(--text-5xl);
    font-weight: 600;
    color: #fff;
}
.page-header__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.page-header__title {
    text-align: left;
    margin: 0 0 6px 0;
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 700;
    line-height: 1.2;
}
.page-header__title.desktop {
    display: block;
}
.page-header__title.mobile {
    display:none;
}
.page-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.page-header__stats {
    display: flex;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}
.page-header__stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 90px;
    gap: 12px;
}
.page-header__stat-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.page-header__stat-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}
.page-header__stat-label {
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
    word-wrap: break-word;
}
.page-header__stat-value {
    font-weight: 600;
}
.page-header__stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    align-self: center;
}
.page-header__stat-item--followers {
    position: relative;
}

.page-header__stat-value--followers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.page-header__followers-eye {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: var(--text-xs);
    padding: 0;
    transition: background 0.15s;
    flex-shrink: 0;
}
.page-header__followers-eye:hover {
    background: rgba(255, 255, 255, 0.3);
}

.page-header__followers-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    transform: none;
    z-index: 300;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 10px;
    min-width: 220px;
    max-width: calc(100vw - 40px);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    gap: 6px;
}
.page-header__followers-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}
.page-header__follower-av {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--c-green);
    color: #fff;
    font-size: var(--text-2xs);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.page-header__followers-name {
    font-size: var(--text-sm);
    color: var(--c-text);
    font-weight: 600;
    display: block;
    line-height: 1.2;
}
.page-header__followers-username {
    font-size: var(--text-2xs);
    color: var(--c-subtle);
    display: block;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .page-header__actions {
        flex-direction: row;
    }
    .page-header__stats {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .page-header__stat-item {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
    .page-header__stat-details {
        align-items: flex-start;
    }
    .page-header__stat-divider {
        display: none;
    }
}
@media (max-width: 640px) {
    .page-header__container {
        flex-direction: column;
        gap: 20px;
    }
    .page-header__main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .page-header__visual {
        align-items: center;
    }
    .page-header__actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .page-header__actions .btn {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
    }
    .page-header__stats {
        display: flex;
        flex-wrap: nowrap;
        margin-left: 0;
        padding-top: 8px;
        width: 100%;
        justify-content: center;
    }
    .page-header__stat-item {
        min-width: 0;
        flex: 1;
        padding: 0 4px;
    }
    .page-header__stat-icon {
        width: 32px;
        height: 32px;
        font-size: var(--text-xs);
    }
    .page-header__stat-label {
        font-size: var(--text-2xs);
    }
    .page-header__stat-value {
        font-size: var(--text-xs);
    }
        .page-header__followers-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        transform: none;
        max-width: calc(100vw - 32px);
    }
}
/* ── Abonnés : panneau au survol / focus (plus de panneau resté ouvert sous les autres menus) ── */
.page-header__followers-panel {
    display: none;
    z-index: 50;                 /* sous l'en-tête du site et ses menus (notifications, compte) */
    min-width: 260px;
    max-height: 320px;
    overflow-y: auto;
}
.page-header__stat-item--followers:hover .page-header__followers-panel,
.page-header__stat-item--followers:focus-within .page-header__followers-panel {
    display: flex;
}
/* Pont invisible entre le chiffre et le panneau : la souris peut descendre sans le fermer */
.page-header__stat-item--followers::after {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 100%;
    height: 14px;
}
.page-header__stat-item--followers:hover .page-header__followers-eye { background: rgba(255, 255, 255, 0.3); }

.page-header__followers-row { gap: 6px; padding: 0; }
.page-header__followers-link {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    text-align: left;
}
.page-header__followers-link:hover { background: var(--c-surface-alt); }
.page-header__followers-link:hover .page-header__followers-name { color: var(--c-green); }
.page-header__followers-remove { margin: 0; flex-shrink: 0; }
.page-header__followers-remove button {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; border-radius: 50%;
    background: transparent; color: var(--c-subtle); cursor: pointer; font-size: var(--text-lg);
}
.page-header__followers-remove button:hover { background: var(--c-danger-bg); color: var(--c-danger-dark); }
