/* assets/css/style.css - Styles principaux du site */

/* Reset CSS */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Variables */
:root {
    --primary-color: #0066cc;
    --secondary-color: #004080;
    --background-color: #f8f9fa;
    --text-color: #333;
    --light-text: #666;
    --border-color: #ddd;
    --success-color: #28a745;
    --error-color: #dc3545;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --container-width: 1200px;
}

/* Base */
html {
    font-size: 16px;
    line-height: 1.5;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding: 2rem 0;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Header */
.site-header {
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.site-logo:hover {
    text-decoration: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li:not(:last-child) {
    margin-right: 1.5rem;
}

/* Footer */
.site-footer {
    background-color: #222;
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-logo a {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.footer-nav li:not(:last-child) {
    margin-right: 1.5rem;
}

.footer-nav a {
    color: white;
}

.footer-legal {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #aaa;
    width: 100%;
}

.footer-legal a {
    color: #aaa;
}

/* Articles */
.year-section {
    margin-bottom: 3rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.article-card {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.2s;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-card h4 {
    margin-top: 0;
}

.article-date {
    color: var(--light-text);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.article-excerpt {
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    font-weight: 500;
}

/* Article Page */
.article-container {
    max-width: 800px;
}

.full-article {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.article-meta {
    color: var(--light-text);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.article-content {
    line-height: 1.7;
}

.ad-space {
    margin: 2rem 0;
    padding: 1rem;
    background-color: #f5f5f5;
    border-radius: 5px;
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-family);
}

textarea {
    resize: vertical;
}

.form-actions {
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    background-color: #f0f0f0;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s, color 0.2s;
}

.btn:hover {
    background-color: #e0e0e0;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: white;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    color: white;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Messages */
.success-message,
.error-message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Admin */
.login-form {
    max-width: 400px;
    margin: 2rem auto;
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-dashboard {
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-actions {
    margin-bottom: 2rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.admin-table th {
    background-color: #f5f5f5;
}

.admin-table .actions {
    display: flex;
    gap: 0.5rem;
}

.article-form {
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-nav ul {
    display: flex;
    list-style: none;
}

.admin-nav li:not(:last-child) {
    margin-right: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
    }
    
    .main-nav {
        margin-top: 1rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-nav {
        margin: 1rem 0;
    }
    
    .footer-nav ul {
        flex-direction: column;
    }
    
    .footer-nav li:not(:last-child) {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .admin-table .actions {
        flex-direction: column;
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .ad-space {
        display: none;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .full-article {
        box-shadow: none;
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}