/* Blog Page Styles */
.blog-hero {
    background: var(--gradient-bg);
    padding: 8rem 2rem 4rem;
    text-align: center;
    margin-top: 80px; /* Espace pour la navigation fixe */
}

.blog-hero h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.blog-hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.blog-section {
    padding: 4rem 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.blog-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.blog-link:hover {
    text-decoration: none;
}

.blog-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--light-gray);
    position: relative;
}

.blog-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--light-gray);
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.blog-date {
    color: var(--text-light);
}

.blog-category {
    color: var(--accent-color);
    font-weight: 600;
}

.blog-content h2 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-content p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--accent-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.blog-link:hover .read-more {
    color: var(--accent-hover);
}

.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination-btn {
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

.blog-newsletter {
    background: var(--section-alt-bg);
    padding: 4rem 2rem;
    text-align: center;
}

.blog-newsletter h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.blog-newsletter p {
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-size: 1rem;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Responsive Design */
@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }
    
    .blog-content {
        padding: 1rem;
    }
    
    .blog-content h2 {
        font-size: 1.2rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    
    .newsletter-form input[type="email"] {
        min-width: 100%;
    }
} 

/* Styles pour le blog dynamique */

/* Filtres et recherche */
.blog-filters {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
}

.blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-filter {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 20px;
    text-decoration: none;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-filter:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.category-filter.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

/* Message d'absence d'articles */
.no-articles {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.no-articles h3 {
    margin-bottom: 1rem;
    color: #495057;
}

/* Pagination améliorée */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination-btn {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.pagination-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

/* Interface de création d'articles */
.article-creator-ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.article-creator-panel {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.article-creator-panel h3 {
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-create {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .blog-hero {
        padding: 6rem 1rem 3rem;
        margin-top: 70px;
    }
    
    .blog-hero h1 {
        font-size: 2.5rem;
    }
    
    .blog-filters {
        flex-direction: column;
    }
    
    .blog-categories {
        justify-content: center;
    }
    
    .category-filter {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .article-creator-panel {
        width: 95%;
        padding: 1.5rem;
    }
    
    .article-header {
        margin-top: 70px;
        padding: 2rem 0;
    }
    
    .article-header .container {
        padding: 0 1rem;
    }
}

/* Animation de chargement */
.blog-grid {
    min-height: 200px;
}

.blog-grid.loading {
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Amélioration du logo dans la navigation */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-image {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

/* Amélioration des cartes d'articles */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.blog-card .blog-image {
    overflow: hidden;
}

.blog-card .blog-image img {
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

/* Styles pour les articles individuels */
.article-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    background: #667eea; /* Couleur de fallback */
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    margin-top: 80px; /* Espace pour la navigation fixe */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    min-height: 300px;
    max-height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.article-header h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: bold;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.8);
    z-index: 1; /* Au-dessus de l'image d'arrière-plan */
}

.article-header .container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 14px;
    opacity: 0.9;
}

.article-meta span {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

.article-excerpt {
    font-size: 18px;
    line-height: 1.6;
    color: white;
    margin-top: 1rem;
    font-weight: 500;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.content-wrapper {
    line-height: 1.8;
    font-size: 16px;
}

.content-wrapper h2 {
    color: #333;
    margin: 2rem 0 1rem 0;
    font-size: 28px;
}

.content-wrapper h3 {
    color: #495057;
    margin: 1.5rem 0 0.5rem 0;
    font-size: 22px;
}

.content-wrapper p {
    margin-bottom: 1rem;
}

.content-wrapper ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-wrapper li {
    margin-bottom: 0.5rem;
}

/* Articles connexes */
.related-articles {
    background: #f8f9fa;
    padding: 3rem 0;
    margin-top: 3rem;
}

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

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.related-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-placeholder {
    width: 100%;
    height: 100%;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-content {
    padding: 1.5rem;
}

.related-content h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.related-content p {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
} 