* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    animation: backgroundShift 20s ease infinite;
    pointer-events: none;
}

@keyframes backgroundShift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -20px) scale(1.1); }
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo svg {
    color: var(--primary);
}

.tabs-container {
    display: flex;
    gap: 12px;
    background: rgba(30, 41, 59, 0.6);
    padding: 8px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.tab-button:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tab-button:hover::before {
    opacity: 0.1;
}

.tab-button.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.tab-button.active::before {
    opacity: 1;
}

.tab-button svg {
    width: 20px;
    height: 20px;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 8px;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.logout-btn svg {
    width: 20px;
    height: 20px;
}

main {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 40px 40px;
}

.tab-content {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    margin-bottom: 40px;
    text-align: center;
}

.content-header h1 {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-header p {
    font-size: 1.2em;
    color: var(--text-secondary);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.post-card:hover::before {
    transform: scaleX(1);
}

.post-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.post-type {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-type.devoir {
    background: rgba(236, 72, 153, 0.2);
    color: var(--accent);
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.post-type.cours {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.post-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.post-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.4;
}

.post-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.meta-item svg {
    width: 16px;
    height: 16px;
}

.post-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-secondary);
}

.post-author svg {
    width: 16px;
    height: 16px;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.2em;
    margin-bottom: 8px;
}

.empty-state .subtitle {
    font-size: 1em;
    opacity: 0.7;
}

.publish-form {
    max-width: 900px;
    margin: 0 auto;
    background: transparent;
    padding: 0;
}

.form-section {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 20px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.form-section:hover::before {
    transform: scaleX(1);
}

.form-section:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.section-header svg {
    color: var(--primary);
    flex-shrink: 0;
}

.section-header h2 {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.form-group {
    margin-bottom: 24px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.form-group label svg {
    color: var(--primary);
    flex-shrink: 0;
}

.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.radio-label {
    position: relative;
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.radio-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.radio-icon {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.radio-icon svg {
    color: var(--primary);
    transition: all 0.3s ease;
}

.radio-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.radio-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.radio-label:hover .radio-content {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.radio-label:hover .radio-icon {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.1);
}

.radio-label:hover .radio-icon svg {
    color: var(--secondary);
}

.radio-label input[type="radio"]:checked + .radio-content {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.radio-label input[type="radio"]:checked + .radio-content::before {
    opacity: 0.1;
}

.radio-label input[type="radio"]:checked + .radio-content .radio-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.radio-label input[type="radio"]:checked + .radio-content .radio-icon svg {
    color: white;
}

.radio-label input[type="radio"]:checked + .radio-content .radio-title {
    color: var(--primary);
}

.radio-label input[type="radio"]:checked + .radio-content .radio-subtitle {
    color: var(--text-primary);
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--border);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="text"]:hover,
select:hover,
textarea:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 4px 12px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

.char-count {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
}

.submit-btn {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.5);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
}

.submit-btn span {
    position: relative;
    z-index: 1;
}

/* Styles pour l'upload de fichiers */
.file-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.file-label svg {
    color: var(--primary);
    flex-shrink: 0;
}

.file-upload-area {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(15, 23, 42, 0.4);
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.6);
}

.file-upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-content {
    pointer-events: none;
}

.file-upload-content svg {
    color: var(--primary);
    margin-bottom: 12px;
    opacity: 0.7;
}

.file-upload-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.file-upload-subtext {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.file-upload-hint {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.file-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.file-preview-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.file-preview-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.file-preview-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.file-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-pdf {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(99, 102, 241, 0.1);
}

.file-preview-pdf svg {
    color: var(--primary);
    margin-bottom: 8px;
}

.file-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.file-remove-btn:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
}

.file-preview-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Styles pour les fichiers dans les posts */
.post-files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.post-file-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.post-file-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    border-color: var(--primary);
}

.post-file-image {
    aspect-ratio: 1;
    overflow: hidden;
}

.post-file-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-file-pdf {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(99, 102, 241, 0.1);
    gap: 8px;
}

.post-file-pdf svg {
    color: var(--primary);
}

.post-file-pdf span {
    font-size: 11px;
    color: var(--text-primary);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    padding: 0 8px;
}

.post-file-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-file-item:hover .post-file-overlay {
    opacity: 1;
}

.post-file-overlay svg {
    color: white;
}

/* Modal pour les images */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.image-modal.active {
    opacity: 1;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Styles pour la page de login */
.login-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header .logo {
    justify-content: center;
    margin-bottom: 24px;
    font-size: 28px;
}

.login-header h1 {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-form .form-group {
    margin-bottom: 0;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.login-form label svg {
    color: var(--primary);
    flex-shrink: 0;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--border);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-form input[type="text"]:hover,
.login-form input[type="password"]:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 4px 12px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.5);
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-btn svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
}

.login-btn span {
    position: relative;
    z-index: 1;
}

.login-footer {
    margin-top: 32px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.login-footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

.signup-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .tabs-container {
        width: 100%;
        flex-wrap: wrap;
    }

    .tab-button {
        flex: 1;
        min-width: 120px;
    }

    .logout-btn {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
    }

    main {
        padding: 0 20px 40px;
        margin: 20px auto;
    }

    .content-header h1 {
        font-size: 2em;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .publish-form {
        padding: 0;
    }

    .form-section {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .radio-group {
        grid-template-columns: 1fr;
    }

    .file-preview-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .post-files {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .image-modal-close {
        top: 10px;
        right: 10px;
    }

    .login-card {
        padding: 32px 24px;
    }

    .login-header h1 {
        font-size: 1.75em;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Styles pour la page d'administration */
.admin-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 32px;
    padding: 56px;
    max-width: 700px;
    width: 100%;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 0 100px rgba(99, 102, 241, 0.1);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, 
        var(--primary) 0%, 
        var(--secondary) 50%, 
        var(--accent) 100%);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.admin-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.admin-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.admin-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    font-size: 32px;
    gap: 12px;
    animation: fadeIn 0.8s ease-out;
}

.admin-header .logo svg {
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, 
        var(--primary) 0%, 
        var(--secondary) 50%, 
        var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    filter: drop-shadow(0 2px 10px rgba(99, 102, 241, 0.3));
}

.admin-header p {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 40px;
    background: rgba(15, 23, 42, 0.5);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    position: relative;
    z-index: 1;
}

.admin-tab {
    flex: 1;
    padding: 14px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.admin-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    z-index: 0;
}

.admin-tab:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.admin-tab:hover::before {
    opacity: 0.1;
}

.admin-tab.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 
        0 4px 20px rgba(99, 102, 241, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.admin-tab.active::before {
    opacity: 1;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    z-index: 1;
}

.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 12px;
    font-weight: 600;
}

.admin-btn {
    width: 100%;
    padding: 20px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 30px rgba(99, 102, 241, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.admin-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.admin-btn:hover::before {
    width: 300px;
    height: 300px;
}

.admin-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(99, 102, 241, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.admin-btn:active {
    transform: translateY(-2px) scale(0.98);
}

.admin-btn svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.admin-btn:hover svg {
    transform: translateX(3px);
}

.admin-btn span {
    position: relative;
    z-index: 1;
}

.users-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.users-list-header h3 {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text-primary);
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    color: var(--primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.refresh-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.5s ease;
}

.refresh-btn:hover svg {
    transform: rotate(180deg);
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(30, 41, 59, 0.6) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.user-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.user-item:hover::before {
    left: 100%;
}

.user-item:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.8) 100%);
    transform: translateX(8px);
    box-shadow: 
        0 8px 30px rgba(99, 102, 241, 0.2),
        0 0 0 1px rgba(99, 102, 241, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.user-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-radius: 14px;
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.user-item:hover .user-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.delete-user-btn {
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.delete-user-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.delete-user-btn:hover::before {
    width: 100px;
    height: 100px;
}

.delete-user-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.delete-user-btn:active {
    transform: scale(0.95);
}

.delete-user-btn svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.delete-user-btn:hover svg {
    transform: rotate(90deg);
}

.empty-users {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    position: relative;
}

.empty-users svg {
    margin-bottom: 28px;
    opacity: 0.4;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.2));
    animation: float 3s ease-in-out infinite;
}

.empty-users p {
    font-size: 1.15em;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.admin-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px 20px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.back-link:hover {
    color: var(--secondary);
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.back-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.back-link:hover svg {
    transform: translateX(-3px);
}

@media (max-width: 768px) {
    .admin-card {
        padding: 32px 24px;
    }

    .admin-tabs {
        flex-direction: column;
        gap: 0;
    }

    .admin-tab {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--border);
        border-left: 2px solid transparent;
        margin-bottom: 0;
    }

    .admin-tab.active {
        border-left-color: var(--primary);
        border-bottom-color: var(--border);
    }

    .users-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
