/* ==================== PROFILE MODERNE ==================== */
.profile-content {
    max-width: 100%;
    padding: 0 0 0;
}

/* Header Profil Moderne */
.profile-header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
    border-radius: 0 0 24px 24px;
    padding: 20px 16px 16px;
    margin-bottom: 20px;
    border: none;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #00c9ff);
}

.profile-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    margin-bottom: 0;
}

.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
}

.profile-avatar-wrapper:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* Overlay sombre au hover */
.profile-avatar-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.25s ease;
    pointer-events: none;
}
.profile-avatar-wrapper:hover::after {
    background: rgba(0, 0, 0, 0.35);
}

/* Badge crayon en bas à droite */
.profile-avatar-edit-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary, #2563eb);
    border: 2px solid var(--bg-secondary, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    transition: transform 0.2s ease, background 0.2s ease;
    pointer-events: none;
}
.profile-avatar-wrapper:hover .profile-avatar-edit-badge {
    transform: scale(1.15);
    background: #1d4ed8;
}
.profile-avatar-edit-badge svg {
    width: 12px;
    height: 12px;
    color: #fff;
    stroke: #fff;
}

/* Bouton pseudo éditable */
.profile-username-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 4px 4px 2px 25px;
    margin: 0 0 4px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
    max-width: 100%;
}
.profile-username-edit-btn:hover {
    background: rgba(37, 99, 235, 0.08);
}
.profile-username-edit-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.profile-username-edit-btn h2 {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-username-edit-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.profile-username-edit-btn:hover .profile-username-edit-icon {
    opacity: 1;
    transform: scale(1);
}
.profile-username-edit-icon svg {
    width: 11px;
    height: 11px;
    stroke: var(--primary, #2563eb);
}


.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.profile-info {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.profile-info h2 {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-email {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 0;
    opacity: 0.8;
}

.profile-settings-btn {
    position: absolute;
    top: 50px;
    right: 2px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.profile-settings-btn:hover {
    background: var(--primary);
    transform: scale(1.05);
}

.profile-settings-btn svg {
    width: 18px;
    height: 18px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.profile-settings-btn:hover svg {
    color: white;
    transform: rotate(90deg);
}

.profile-settings-btn:active svg {
    transform: rotate(180deg);
}

/* Animation de rotation au clic */
@keyframes spin-settings {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.profile-settings-btn.spinning svg {
    animation: spin-settings 0.3s ease-in-out;
}

/* Stats Grid*/
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(68, 85, 102, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), #00c9ff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:active {
    transform: scale(0.98);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stat-card-icon {
    font-size: 20px;
    filter: grayscale(0.3);
}

.stat-card-value {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #00c9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-card-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.stat-card-sublabel {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Stats supplémentaires en ligne */
.stats-inline {
    display: flex;
    justify-content: space-around;
    gap: 8px;
    padding: 12px 16px;
    margin: 0 16px 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid rgba(68, 85, 102, 0.15);
}

.stat-inline-item {
    text-align: center;
    flex: 1;
}

.stat-inline-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}

.stat-inline-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Section Films */
.profile-section {
    margin-bottom: 24px;
    padding: 0 5px;
}

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

.title{
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: -32px;
    position: relative;
    display: inline-block;
}

.section-title {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    padding-top: 10px;
    gap: 8px;
}

.section-title-icon {
    font-size: 20px;
}

.section-see-all {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-see-all:hover {
    opacity: 0.8;
}

/* Grille Films Horizontale */
.movies-horizontal-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.movies-horizontal-scroll::-webkit-scrollbar {
    height: 4px;
}

.movies-horizontal-scroll::-webkit-scrollbar-track {
    background: rgba(68, 85, 102, 0.1);
    border-radius: 2px;
}

.movies-horizontal-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.movie-mini-card {
    min-width: 110px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: all 0.3s ease;
}

.movie-mini-card:active {
    transform: scale(0.95);
}

.movie-mini-poster {
    width: 110px;
    height: 165px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(68, 85, 102, 0.2);
    margin-bottom: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.movie-mini-card:hover .movie-mini-poster {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.movie-mini-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 110px;
}

/*Quand ta r*/
.profile-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.profile-empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.profile-empty-state-text {
    font-size: 14px;
    margin-bottom: 8px;
}

.profile-empty-state-hint {
    font-size: 12px;
    opacity: 0.7;
}

/* ── Modal Settings — BASE MOBILE (bottom sheet) ── */
.settings-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.settings-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Zone cliquable vide au-dessus du panel (ferme sur mobile) */
.settings-backdrop-tap {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.settings-content {
    position: relative;
    width: 100%;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: 24px 24px 0 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    /* bloque les clics du backdrop au niveau du contenu */
    z-index: 1;
}
.settings-modal.active .settings-content {
    transform: translateY(0);
}

/* Handle drag (poignée de glissement) */
.settings-handle {
    width: 44px;
    height: 5px;
    background: rgba(68, 85, 102, 0.4);
    border-radius: 3px;
    margin: 12px auto 8px;
    cursor: grab;
    flex-shrink: 0;
}

.settings-header {
    padding: 12px 20px 20px;
    border-bottom: 1px solid rgba(68, 85, 102, 0.2);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
}

.settings-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.settings-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.settings-close-btn:hover { background: #dc2626; transform: scale(1.05); }
.settings-close-btn svg { width: 16px; height: 16px; color: var(--text-primary); }
.settings-close-btn:hover svg { color: white; }

.settings-body { padding: 20px; }

/* ── PC ≥1024px : panel latéral droit ── */
@media (min-width: 1024px) {
    .settings-modal {
        align-items: stretch;
        justify-content: flex-end;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .settings-backdrop-tap { display: none; } /* le clic backdrop = clic sur le fond */

    .settings-content {
        width: 420px;
        max-height: 100vh;
        height: 100%;
        border-radius: 20px 0 0 20px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    .settings-modal.active .settings-content {
        transform: translateX(0);
    }

    .settings-handle { display: none; }

    .settings-header {
        padding: 28px 28px 22px;
        border-bottom: 1px solid rgba(68, 85, 102, 0.18);
        flex-shrink: 0;
        background: var(--bg-secondary);
    }

    .settings-title { font-size: 20px; }

    .settings-body {
        padding: 24px 28px;
        flex: 1;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    /* Sur PC, les autres modals (username, avatar…) restent centrées */
    #usernameEditModal,
    #avatarEditModal,
    #passwordEditModal,
    #emailEditModal,
    #languageModal,
    #privacyModal {
        align-items: center;
        justify-content: center;
    }
    #usernameEditModal .settings-content,
    #avatarEditModal .settings-content,
    #passwordEditModal .settings-content,
    #emailEditModal .settings-content,
    #languageModal .settings-content,
    #privacyModal .settings-content {
        width: 480px;
        height: auto;
        max-height: 85vh;
        border-radius: 20px;
        transform: scale(0.95) translateY(8px);
    }
    #usernameEditModal.settings-modal.active .settings-content,
    #avatarEditModal.settings-modal.active .settings-content,
    #passwordEditModal.settings-modal.active .settings-content,
    #emailEditModal.settings-modal.active .settings-content,
    #languageModal.settings-modal.active .settings-content,
    #privacyModal.settings-modal.active .settings-content {
        transform: scale(1) translateY(0);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    #usernameEditModal .settings-handle,
    #avatarEditModal .settings-handle,
    #passwordEditModal .settings-handle,
    #emailEditModal .settings-handle,
    #languageModal .settings-handle,
    #privacyModal .settings-handle {
        display: none;
    }
}

.settings-section {
    margin-bottom: 32px;
}

.settings-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.settings-option {
    background: var(--bg-card);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(68, 85, 102, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-option:active {
    transform: scale(0.98);
}

.settings-option-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-option-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.settings-option-info {
    flex: 1;
}

.settings-option-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.settings-option-value {
    font-size: 13px;
    color: var(--text-secondary);
}

.settings-option-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* Input dans Settings */
.settings-input-group {
    margin-top: 12px;
}

.settings-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid rgba(68, 85, 102, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
}

.settings-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.settings-avatar-upload {
    margin-top: 12px;
}

.settings-avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    margin: 0 auto 16px;
    display: block;
}

.settings-btn-upload {
    width: 100%;
    padding: 12px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 10px;
    color: var(--primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-btn-upload:hover {
    background: var(--primary);
    color: white;
}

.settings-btn-save {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.settings-btn-save:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.settings-btn-save:active {
    transform: translateY(0);
}


.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 28px;
    background: rgba(68, 85, 102, 0.3);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(20px);
}

/* Danger Zone */
.settings-danger-zone {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid rgba(239, 68, 68, 0.2);
}

.settings-btn-danger {
    width: 100%;
    padding: 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #dc2626;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-btn-danger:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-2px);
}


@media (min-width: 768px) {
    .profile-content {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 24px;
    }

    .profile-header {
        border-radius: 24px;
        margin-bottom: 32px;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    
    .stats-inline {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}


.skeleton {
    background: linear-gradient(90deg, rgba(68, 85, 102, 0.1) 25%, rgba(68, 85, 102, 0.2) 50%, rgba(68, 85, 102, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-poster {
    width: 110px;
    height: 165px;
    border-radius: 12px;
}

.skeleton-text {
    height: 12px;
    border-radius: 6px;
    margin-top: 8px;
}


/*bouton amis*/
.profile-header-actions {
    position: absolute;
    top: 20px;
    right: 16px;
    display: flex;
    gap: 8px;
}

.profile-friends-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.12);
    border: 2px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.profile-friends-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.profile-friends-btn svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.profile-friends-btn:hover svg {
    color: white;
}

.profile-friends-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    border: 2px solid var(--bg-card);
}

.profile-friends-badge.visible {
    display: flex;
}

/* Language Selector */
.language-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 2px solid rgba(68, 85, 102, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.language-option:hover {
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(37, 99, 235, 0.3);
    transform: translateX(4px);
}

.language-option:active {
    transform: scale(0.98);
}

.language-option.selected {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.language-flag {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
}

.language-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.language-check {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .language-option:hover {
        transform: translateX(8px);
    }
}


/* ═══════════════════════════════════════════════════════
   PC LAYOUT ≥ 1024px — deux colonnes indépendantes
   (ajouter à la FIN de profile.css)
   ═══════════════════════════════════════════════════════ */
@media (min-width: 1024px) {

    /* Conteneur principal : flex row */
    .profile-content {
        display: flex;
        flex-direction: row;
        gap: 32px;
        align-items: flex-start;
        max-width: 1300px;
        margin: 0 auto;
        padding: 36px 40px 60px;
    }

    /* ── Sidebar gauche : éléments 100% indépendants ── */
    .profile-sidebar {
        width: 350px;
        flex-shrink: 0;
        top: 80px;
        display: flex;
        flex-direction: column;
        gap: 20px;
        position: sticky;
    }

    /* Header dans la sidebar */
    .profile-sidebar .profile-header {
        background: var(--bg-card);
        border-radius: 20px;
        border: 1px solid rgba(68, 85, 102, 0.2);
        padding: 22px 20px 20px;
        display: flex;
        flex-direction: column;
        margin: 0;
        height: 337px;
        justify-content: center;
    }

    .profile-sidebar .profile-header-actions {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        margin-bottom: 18px;
    }

    .profile-sidebar .profile-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }

    .profile-sidebar .profile-avatar {
        width: 150px;
        height: 150px;
        border-radius: 50%;
        border: 3px solid var(--primary);
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.1);
    }

    .profile-sidebar .profile-info h2 { font-size: 19px; }

    /* Stats 4 cards : grille 2×2 dans la sidebar */
    .profile-sidebar .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin: 0;
        padding: 0px 0px;
    }

    .profile-sidebar .stat-card {
        padding: 14px 10px;
        border-radius: 12px;
    }

    .profile-sidebar .stat-card-value { font-size: 22px; }
    .profile-sidebar .stat-card-label { font-size: 10px; }
    .profile-sidebar .stat-card-sublabel { font-size: 9px; }

    /* Stats inline dans la sidebar */
    .profile-sidebar .stats-inline {
        margin: 0;
        border-radius: 14px;
        overflow: hidden;
        border: 1px solid rgba(68, 85, 102, 0.18);
        background: var(--bg-card);
        gap: 0;

    }

    .profile-sidebar .stat-inline-item {
        padding: 10px 16px;
        border-bottom: 1px solid rgba(68, 85, 102, 0.1);
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-direction: row-reverse;
    }

    .profile-sidebar .stat-inline-item:last-child { border-bottom: none; }
    .profile-sidebar .stat-inline-value { font-size: 18px; font-weight: 800; }
    .profile-sidebar .stat-inline-label { font-size: 12px; }

    /* Bouton stats */
    .profile-sidebar .profile-stats-button-container {
        padding: 0px 0px !important;
        margin-bottom: 0 !important;
    }

    /* ── Colonne droite : sections films indépendantes ── */
    .profile-main {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .profile-main .profile-section {
        background: var(--bg-card);
        border-radius: 16px;
        border: 1px solid rgba(68, 85, 102, 0.15);
        padding: 20px 22px;
        margin: 0;
    }

    .profile-main .section-title { font-size: 16px; }

    /* Grille 5 colonnes au lieu du scroll horizontal */
    .profile-main .movies-horizontal-scroll {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
        overflow: visible;
        padding-bottom: 0;
    }

    .profile-main .movie-mini-card {
        width: auto;
        min-width: 0;
        flex: none;
        cursor: pointer;
        transition: transform 0.2s ease;
    }

    .profile-main .movie-mini-card:hover {
        transform: translateY(-4px);
    }

    .profile-main .movie-mini-poster {
        width: 100%;
        height: auto;
        aspect-ratio: 2/3;
        border-radius: 10px;
        object-fit: cover;
    }

    .profile-main .movie-mini-title {
        font-size: 11px;
        margin-top: 6px;
        white-space: normal;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .profile-main .section-header {
        margin-bottom: 16px;
    }
}

/* ── Champ mot de passe avec œil toggle ──────────────────────────── */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 44px !important;
}

.password-eye-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary, #94a3b8);
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}

.password-eye-btn:hover {
    color: var(--text-primary, #f1f5f9);
    background: rgba(255, 255, 255, 0.06);
}

.password-eye-btn:focus-visible {
    outline: 2px solid var(--primary, #2563eb);
    outline-offset: 2px;
}

.password-eye-btn .eye-icon {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-strong-password-auto-fill-button {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

.watch-calendar {
    margin: 0 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 16px;
    overflow: hidden;
}

[data-theme="light"] .watch-calendar {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

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

.wc-month-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.wc-nav-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.wc-nav-btn:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.25);
    color: #667eea;
}

.wc-nav-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.wc-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 6px;
    gap: 3px;
}

.wc-weekday {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 0;
}

.wc-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.wc-day {
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    cursor: default;
    transition: transform 0.15s ease;
}

.wc-day--empty {
    background: transparent;
}

.wc-day--future {
    opacity: 0.3;
}

.wc-day--watched {
    cursor: pointer;
    background-image: var(--wc-poster);
    background-size: cover;
    background-position: center top;
}

.wc-day--watched::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    border-radius: 50%;
    transition: background 0.2s ease;
}

.wc-day--watched:hover::before {
    background: rgba(0, 0, 0, 0.1);
}

.wc-day--watched:hover {
    transform: scale(1.12);
    z-index: 2;
}

.wc-day--today {
    box-shadow: 0 0 0 2px #667eea;
}

.wc-day--today .wc-day-num {
    color: #a5b4fc;
    font-weight: 800;
}

.wc-day-num {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1;
    pointer-events: none;
}

.wc-day--watched .wc-day-num {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

@media (max-width: 400px) {
    .wc-day-num { font-size: 9px; }
    .watch-calendar { padding: 12px; margin: 0 16px 16px; }
}

@media (min-width: 1024px) {
        .watch-calendar { padding: 12px; margin: 0 0 0; }
}

.wc-day-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--accent, #3b82f6);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 5px;
    line-height: 1.4;
    pointer-events: none;
}
.wc-day { position: relative; }