/* Member Area Styles */
/* Nettoyé des conflits Git */
body {
    margin: 0;
    font-family: var(--font-sans);
    background: #f5f7fa;
}

/* Header with logo */
.member-top-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 2px solid rgba(220, 38, 38, 0.1);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Brand (logo + text) */
.member-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.member-brand__logo {
    height: 50px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.member-brand__info h1 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--color-primary);
    font-weight: 700;
}

.member-brand__info p {
    font-size: 0.875rem;
    margin: 0;
    color: var(--color-text-muted);
}

/* User info */
.member-user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.member-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, #b91c1c 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.member-user-info {
    text-align: right;
}

.member-user-name {
    font-weight: 600;
    font-size: 0.875rem;
    display: block;
}

.member-user-email {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 102;
}

/* Navigation container */
.member-nav-container {
    background: white;
    border-bottom: 1px solid rgba(220, 38, 38, 0.1);
    padding: 0 2rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Horizontal navigation */
.member-nav {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
}

.member-nav::-webkit-scrollbar {
    height: 4px;
}

.member-nav::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.3);
    border-radius: 2px;
}

.member-nav__item {
    margin: 0;
}

.member-nav__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    font-weight: 500;
}

.member-nav__link:hover {
    background: rgba(220, 38, 38, 0.05);
    color: var(--color-text);
}

.member-nav__link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background: rgba(220, 38, 38, 0.05);
}

.member-nav__icon {
    font-size: 1.25rem;
}

/* Main content */
.member-main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Page header – reduced title size */
.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.5rem;
    line-height: 1.2;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--color-primary);
}

.stat-card__icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-card__value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--color-primary) 0%, #b91c1c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card__label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
    font-weight: 500;
}

.stat-card--blue .stat-card__value {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card--green .stat-card__value {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card--orange .stat-card__value {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section blocks */
.member-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.member-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(220, 38, 38, 0.1);
}

.member-section__header h2 {
    margin: 0;
}

/* Content lists/grids */
.content-list,
.content-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
}

.empty-state__icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Logout button */
.logout-btn {
    background: transparent;
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--color-primary);
}

.logout-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--color-primary);
}

/* Comment styles (Messages) */
.message-comments {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(220, 38, 38, 0.1);
}

.comments-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.comment {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, #b91c1c 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.comment-meta strong {
    font-size: 0.875rem;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.comment-body {
    font-size: 0.875rem;
    padding-left: 2.5rem;
}

.comment-form {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.comment-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    resize: vertical;
}

.comment-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Buttons */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Responsive styles */
@media (max-width: 768px) {
    .member-top-header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        padding: 1rem;
        position: relative;
    }

    .member-brand {
        width: auto;
        justify-content: flex-start;
        text-align: left;
    }

    .member-user-section {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        padding-top: 1rem;
        order: 3;
    }

    .mobile-menu-btn {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    /* Menu overlay avec fond rouge très clair */
    .member-nav-container {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(220, 38, 38, 0.08);
        z-index: 101;
        padding: 6rem 0 0 0;
        overflow-y: auto;
    }

    .member-nav-container.active {
        display: block;
    }

    .member-nav {
        flex-direction: column;
        padding: 1rem;
        background: white;
        margin: 1rem;
        border-radius: 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .member-nav__link {
        padding: 1rem;
        font-size: 1rem;
        border-bottom: 1px solid #eee;
        border-left: 3px solid transparent;
    }

    .member-nav__link:last-child {
        border-bottom: none;
    }

    .member-nav__link.active {
        border-left-color: var(--color-primary);
        background: rgba(220, 38, 38, 0.05);
    }

    .member-main {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .member-section {
        padding: 1.5rem;
    }

    .member-section__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .comment-form {
        flex-direction: column;
    }
}

/* ===== BUTTONS (PRO STYLE) ===== */
.member-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-decoration: none;
    line-height: 1.2;
}

.member-btn:hover {
    text-decoration: none;
}

.member-btn--primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 4px 0 rgba(220, 38, 38, 0.3);
}

.member-btn--primary:hover {
    background: #b91c1c;
    box-shadow: 0 4px 8px -1px rgba(220, 38, 38, 0.5);
    transform: translateY(-1px);
}

.member-btn--outline {
    background: white;
    border-color: rgba(220, 38, 38, 0.2);
    color: var(--color-text);
}

.member-btn--outline:hover {
    border-color: var(--color-primary);
    background: rgba(220, 38, 38, 0.05);
    color: var(--color-primary);
}

.member-btn--ghost {
    background: transparent;
    color: var(--color-primary);
    padding: 0.5rem 0.75rem;
}

.member-btn--ghost:hover {
    background: rgba(220, 38, 38, 0.05);
}

.member-btn--sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* ===== LOGIN PAGE (PORTRAIT) ===== */
.member-login-body {
    background: #0f172a;
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.login-glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem 2rem;
    width: 100%;
    max-width: 360px;
    /* Force portrait mode */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10;
    position: relative;
    animation: slideUpLogin 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpLogin {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.member-login-body::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140vw;
    height: 140vh;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 60%);
    animation: rotateLogin 30s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes rotateLogin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Login Inputs Specifics */
.login-glass-card .member-form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: all 0.2s;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.login-glass-card .member-form-input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.25);
}

.login-glass-card .member-form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.login-glass-card .input-icon {
    color: rgba(255, 255, 255, 0.3);
}

.login-glass-card .input-icon-wrapper:focus-within .input-icon {
    color: var(--color-primary);
}