/* ==================== ADMIN LOGIN PAGE ==================== */
.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.login-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-control {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ==================== ALERT MESSAGES ==================== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #f0f9ff;
    border-color: #10b981;
    color: #065f46;
}

.alert-danger {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #7f1d1d;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #f59e0b;
    color: #78350f;
}

.alert-info {
    background-color: #f0f9ff;
    border-color: #3b82f6;
    color: #0c2340;
}

.alert strong {
    font-weight: 600;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.form-actions .btn {
    flex: 1;
}

/* ==================== ADMIN LAYOUT ==================== */
.admin-page {
    background: #f5f5f5;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item {
    padding: 15px 20px;
    color: #e0e7ff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: block;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.menu-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.menu-item.logout {
    margin-top: auto;
    color: #fca5a5;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1e293b;
    cursor: pointer;
    padding: 5px 10px;
}

.admin-main {
    margin-left: 250px;
    flex: 1;
    padding: 30px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h1 {
    font-size: 2rem;
    color: #1e293b;
}

.admin-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ==================== ADMIN TABLE ==================== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background-color: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.admin-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #374151;
}

.admin-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table tbody tr:hover {
    background-color: #f9fafb;
}

.admin-table .actions {
    display: flex;
    gap: 10px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-publiee {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-brouillon {
    background-color: #fef3c7;
    color: #78350f;
}

.badge-archivee {
    background-color: #f3f4f6;
    color: #374151;
}

/* ==================== ADMIN FORM ==================== */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.admin-form .form-group {
    display: flex;
    flex-direction: column;
}

.admin-form label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.admin-form textarea,
.admin-form input[type="text"],
.admin-form input[type="file"],
.admin-form select {
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.admin-form textarea:focus,
.admin-form input[type="text"]:focus,
.admin-form input[type="file"]:focus,
.admin-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-form small {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* ==================== IMAGE PREVIEW ==================== */
.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.image-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
}

.pagination-link {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    border-color: #667eea;
    color: #667eea;
}

.pagination-link.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media screen and (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }

    .sidebar-toggle {
        display: block;
    }

    .admin-sidebar {
        position: fixed;
        left: -250px;
        width: 250px;
        height: 100vh;
        transition: left 0.3s ease;
        top: 0;
    }

    .admin-sidebar.active {
        left: 0;
    }

    .admin-main {
        margin-left: 0;
        padding: 15px;
        width: 100%;
    }

    .admin-header {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        align-items: center;
        margin-bottom: 30px;
    }

    .admin-header h1 {
        font-size: 1.5rem;
        flex: 1;
        min-width: 200px;
    }

    .admin-content {
        padding: 15px;
    }

    .admin-table {
        font-size: 0.9rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px;
    }

    .admin-table .actions {
        flex-direction: column;
        gap: 5px;
    }

    .btn-sm {
        width: 100%;
    }

    .login-box {
        padding: 30px 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        margin: 0;
    }
}

@media screen and (max-width: 600px) {
    .admin-page {
        padding: 0;
    }

    .admin-sidebar {
        width: 100%;
        left: -100%;
    }

    .admin-sidebar.active {
        left: 0;
    }

    .login-box {
        padding: 25px 15px;
        margin: 15px;
    }

    .login-box h1 {
        font-size: 1.5rem;
    }

    .form-control {
        font-size: 16px;
    }

    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-header h1 {
        order: 2;
    }

    .sidebar-toggle {
        order: 1;
        width: 100%;
        padding: 10px;
        margin-bottom: 10px;
        background: #f5f5f5;
        border-radius: 8px;
    }

    .admin-header .btn {
        order: 3;
        width: 100%;
    }
}
