body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f5;
    min-height: 100vh;
    color: #e0e0e0;
    line-height: 1.6;
}

header {
    background: linear-gradient(90deg, #d8449d, #64093e);
    color: #e0e0e0;
    padding: 1.5rem;
    text-align: left;
    box-shadow: 0 8px 32px rgba(143, 32, 91, 0.3);
    animation: headerSlideIn 1s ease-out;
    border-bottom: 3px solid #a1276a;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

@keyframes headerSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

header h1 {
    margin: 0 0 1rem 0;
    font-family: 'Great Vibes', cursive;
    font-size: 2.8rem;
    font-weight: 600;
    color: #e0e0e0;
}

#header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

footer {
    background: linear-gradient(90deg, #ea479e, #72045a);
    color: #e0e0e0;
    text-align: center;
    padding: 1.3rem;
    margin-top: 2rem;
    box-shadow: 0 -8px 32px rgba(255, 192, 203, 0.3);
}

footer p {
    margin: 0;
    font-size: 1.1rem;
}

#choix-categorie {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-family: 'Playfair Display', serif;
    font-weight: 300;
    background: linear-gradient(90deg, #c42a72, #72045a);
    color: #e0e0e0;
    border: none;
    border-radius: 25px;
    cursor: pointer;
}

#choix-categorie option {
    background: white;
    color: black;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

#articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.article {
    background: #f4d9ea;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 78, 120, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeIn 0.8s ease-in-out;
    border: 1px solid #FF4E78;
    cursor: pointer;
    color: #333;
}

.article:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 78, 120, 0.5);
    border-color: #FF4E78;
}

.article img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 1rem;
}

.article h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: #490130;
}

.article p {
    margin: 0 0 0.5rem 0;
    color: #000000;
}

.article-date {
    font-size: 0.9rem;
    color: #030303;
}

#navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

button {
    padding: 0.75rem 1.5rem;
    background: #a9176f;
    color: #e0e0e0;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 92, 122, 0.4);
}

button:hover:not(:disabled) {
    background: #d42b8b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 92, 122, 0.6);
}

button:disabled {
    background: #E4E4E4;
    color: black;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    main {
        padding: 1rem;
    }

    #articles-container {
        grid-template-columns: 1fr;
    }

    header {
        padding: 1rem 0.5rem;
    }

    header h1 {
        font-size: 1.5rem;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(102, 126, 234, 0.4) 100%);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, #ede3e8 0%, #ebb6bf 100%);
    margin: 5% auto;
    padding: 30px;
    border: 2px solid #D2B48C;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(210, 180, 140, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: black;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.close {
    color: #8B7355;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #5D4E37;
    text-decoration: none;
}

#article-detail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
}

#article-detail h2 {
    margin-top: 0;
    color: #5D4E37;
}

#article-detail p {
    line-height: 1.6;
    color: black !important ;
}

#article-detail .article-date {
    font-size: 0.9rem;
    color: #a0a0a0;
    margin-top: 1rem;
}

#search-input {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    background: rgba(245, 243, 243, 0.934);
    color: #020b38;
    border: 2px solid #faeaf5;
    border-radius: 25px;
    outline: none;
    width: 250px;
}

#search-input:focus {
    border-color: #070707;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.5);
}

#search-input::placeholder {
    color: #540d0d; 
}

#page-info {
    font-weight: bold;
    font-size: 0.9rem;
    color: #2d2929;
}

.add-btn {
    background: #a7285d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background: #88214a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.article-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: flex-end;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.edit-btn {
    background: #007bff;
    color: white;
}

.edit-btn:hover {
    background: #0056b3;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}

.pin-btn {
    background: #ffc107;
    color: black;
}

.pin-btn:hover {
    background: #e0a800;
}

.pin-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
}

.article.pinned {
    border-color: #ffc107;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #5D4E37;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.save-btn {
    background: #a7284c;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.save-btn:hover {
    background: #88212f;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.cancel-btn:hover {
    background: #545b62;
}

