/**
 * QUIVLA - Stylesheet principal
 * Theme epure et moderne
 */

/* ==========================================
   VARIABLES & RESET
   ========================================== */

:root {
    /* Palette principale */
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #5a4bd1;
    --primary-bg: rgba(108, 92, 231, 0.08);

    /* Neutres */
    --bg: #f8f9fc;
    --bg-card: #ffffff;
    --bg-hover: #f1f3f8;
    --bg-input: #f4f5f9;

    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-white: #ffffff;

    /* Bordures */
    --border: #e5e7eb;
    --border-light: #f0f1f5;

    /* États */
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.08);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.08);
    --like-color: #ef4444;

    /* Ombres */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.1);

    /* Rayons */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;

    /* Dimensions */
    --navbar-height: 64px;
    --max-width: 1200px;
    --feed-width: 600px;
    --sidebar-width: 320px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
}

input, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ==========================================
   BOUTONS
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    transition: var(--transition);
    white-space: nowrap;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--error);
    color: var(--text-white);
    border-color: var(--error);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.8125rem;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ==========================================
   NAVBAR
   ========================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
    flex-shrink: 0;
}

.nav-logo:hover {
    color: var(--primary-dark);
}

.nav-search {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.nav-search input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-input);
    font-size: 0.875rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.nav-search input:focus {
    border-color: var(--primary-light);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.nav-search input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.search-dropdown.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    transition: var(--transition);
    cursor: pointer;
}

.search-result-item:hover {
    background: var(--bg-hover);
}

.search-result-item img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.search-result-name {
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-result-username {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-bg);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    background-size: cover;
    background-position: center;
    border: 2px solid var(--border);
}

/* ==========================================
   LAYOUT PRINCIPAL
   ========================================== */

.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--navbar-height) + 24px) 24px 48px;
    display: flex;
    gap: 32px;
    justify-content: center;
}

.feed-container {
    width: 100%;
    max-width: var(--feed-width);
}

.feed-container-wide {
    max-width: 700px;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--navbar-height) + 24px);
    align-self: flex-start;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* ==========================================
   CARTES
   ========================================== */

.sidebar-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* ==========================================
   CREATION DE POST
   ========================================== */

.create-post-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.create-post-header {
    display: flex;
    gap: 14px;
}

.create-post-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.create-post-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.create-post-form textarea {
    width: 100%;
    border: none;
    resize: none;
    outline: none;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: transparent;
    min-height: 44px;
}

.create-post-form textarea::placeholder {
    color: var(--text-muted);
}

.image-preview-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    max-height: 300px;
}

.image-preview-container img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.remove-image-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.remove-image-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.create-post-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.upload-btn:hover {
    background: var(--primary-bg);
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.btn-post {
    padding: 8px 24px;
}

/* ==========================================
   POSTS (FEED)
   ========================================== */

.post-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.post-card:hover {
    box-shadow: var(--shadow-md);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: var(--transition);
}

.post-avatar:hover {
    border-color: var(--primary-light);
}

.post-user-info {
    flex: 1;
    min-width: 0;
}

.post-user-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.post-user-name a {
    color: var(--text-primary);
}

.post-user-name a:hover {
    color: var(--primary);
}

.cert-badge-sm {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.post-username {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.post-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.post-menu {
    position: relative;
}

.post-menu-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.post-menu-btn:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.post-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    min-width: 160px;
    z-index: 50;
    display: none;
}

.post-menu-dropdown.active {
    display: block;
}

.post-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: var(--transition);
    width: 100%;
    text-align: left;
}

.post-menu-item:hover {
    background: var(--bg-hover);
}

.post-menu-item.danger {
    color: var(--error);
}

.post-content {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-primary);
    margin-bottom: 14px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.post-image {
    width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    max-height: 500px;
    object-fit: cover;
    cursor: pointer;
    transition: var(--transition);
}

.post-image:hover {
    opacity: 0.95;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.post-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.post-action-btn:hover {
    background: var(--bg-hover);
}

.post-action-btn.liked {
    color: var(--like-color);
}

.post-action-btn.liked svg {
    fill: var(--like-color);
}

.post-action-btn svg {
    width: 18px;
    height: 18px;
}

/* ==========================================
   PROFIL
   ========================================== */

.profile-container {
    width: 100%;
    max-width: 700px;
}

.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.profile-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--border);
}

.profile-avatar-edit {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--bg-card);
}

.profile-avatar-edit:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.profile-display-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cert-badge {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.profile-username {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.profile-bio {
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.profile-joined {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-stats {
    display: flex;
    gap: 32px;
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.stat-item:hover {
    background: var(--bg-hover);
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.profile-actions {
    display: flex;
    gap: 12px;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.profile-posts {
    margin-top: 8px;
}

/* ==========================================
   AUTHENTIFICATION
   ========================================== */

.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg) 0%, #ede9fe 100%);
}

.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 24px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    font-size: 0.9375rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    padding: 4px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--text-secondary);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-footer a {
    font-weight: 600;
}

/* ==========================================
   ALERTES
   ========================================== */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ==========================================
   MODALS
   ========================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

/* ==========================================
   REPONSES
   ========================================== */

.replies-list {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reply-item {
    display: flex;
    gap: 12px;
}

.reply-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.reply-body {
    flex: 1;
    background: var(--bg-input);
    padding: 12px 16px;
    border-radius: var(--radius-md);
}

.reply-user {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.reply-user-name {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
}

.reply-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.reply-content {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.reply-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.reply-form textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    font-size: 0.875rem;
    resize: none;
    outline: none;
    transition: var(--transition);
}

.reply-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

/* ==========================================
   FOLLOW LIST
   ========================================== */

.follow-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.follow-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.follow-item:hover {
    background: var(--bg-hover);
}

.follow-item-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--border);
}

.follow-item-info {
    flex: 1;
    min-width: 0;
}

.follow-item-name {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.9375rem;
}

.follow-item-name a {
    color: var(--text-primary);
}

.follow-item-name a:hover {
    color: var(--primary);
}

.follow-item-username {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* ==========================================
   SUGGESTIONS
   ========================================== */

.suggested-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.suggested-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggested-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--border);
    cursor: pointer;
}

.suggested-info {
    flex: 1;
    min-width: 0;
}

.suggested-name {
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.suggested-name a {
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggested-name a:hover {
    color: var(--primary);
}

.suggested-username {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================
   ETATS VIDES ET CHARGEMENT
   ========================================== */

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 16px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.875rem;
}

.loading-indicator {
    display: flex;
    justify-content: center;
    padding: 32px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   TOASTS / NOTIFICATIONS
   ========================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--text-primary);
    color: var(--text-white);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    max-width: 360px;
}

.toast.toast-error {
    background: var(--error);
}

.toast.toast-success {
    background: var(--success);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(16px);
    }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }

    .main-content {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 56px;
    }

    .nav-container {
        padding: 0 12px;
        gap: 12px;
    }

    .nav-logo {
        font-size: 1.25rem;
    }

    .nav-search {
        max-width: 200px;
    }

    .feed-container,
    .feed-container-wide,
    .profile-container {
        max-width: 100%;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-name-row {
        justify-content: center;
    }

    .profile-stats {
        justify-content: center;
    }

    .profile-actions {
        justify-content: center;
    }

    .auth-card {
        padding: 28px 24px;
    }

    .auth-logo {
        font-size: 2rem;
    }

    .profile-card {
        padding: 24px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .post-card {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .nav-search {
        display: none;
    }

    .nav-actions {
        gap: 4px;
    }

    .auth-container {
        padding: 12px;
    }

    .auth-card {
        padding: 24px 20px;
    }

    .main-content {
        padding-left: 8px;
        padding-right: 8px;
    }

    .create-post-actions {
        flex-wrap: wrap;
    }
}
