/* Variables CSS */
:root {
    --primary-dark: #0f0e52;
    --primary-blue: #004b5f;
    --accent-orange: #ff7600;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #333333;
    --text-light: #60606a;
    --border-color: #e9ecef;
    
    /* Typography */
    --font-family: 'Inter', sans-serif;
    --h1-size: 3rem;
    --h2-size: 2.5rem;
    --h3-size: 2rem;
    --body-size: 1rem;
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-padding: 0 20px;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--body-size);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

h1 { font-size: var(--h1-size); }
h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: #e56600;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

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

.btn-secondary:hover {
    background-color: #003a47;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: var(--box-shadow);
}

.header-top {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.9rem;
}

.contact-info {
    display: flex;
    gap: 2rem;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar {
    padding: 1rem 0;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    height: 40px;
    width: auto;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-orange);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent-orange);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    justify-content: space-around;
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-dark);
    transition: all 0.3s ease;
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: var(--white);
    margin-top: 4rem;
}

.footer-main {
    padding: var(--section-padding);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 100px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--accent-orange);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--accent-orange);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.1);
}

.newsletter-form {
    display: flex;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.newsletter-form button {
    padding: 10px 15px;
    background-color: var(--accent-orange);
    color: var(--white);
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 1rem 0;
    text-align: center;
}

/* Sections générales */
.section {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    color: var(--accent-orange);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Utilitaires */
.text-center { text-align: center; }
.text-orange { color: var(--accent-orange); }
.bg-light { background-color: var(--light-gray); }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }

/* Ajustement pour le header fixe */
body {
    padding-top: 120px;
}

/* ===== BLOG STYLES ===== */

.blog-section {
    padding: 80px 0;
}

/* Filtres et recherche */
.blog-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.filter-tabs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    background: var(--light-gray);
    color: var(--dark-gray);
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.search-box {
    display: flex;
    position: relative;
    max-width: 300px;
}

.search-box .form-control {
    border-radius: 25px 0 0 25px;
    border-right: none;
    padding-right: 50px;
}

.search-btn {
    background: var(--accent-orange);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #e56600;
}

/* Grille d'articles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Carte d'article */
.blog-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

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

.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-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-orange);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.blog-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-meta i {
    color: var(--accent-orange);
}

.blog-title {
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-title a {
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.blog-title a:hover {
    color: var(--primary-blue);
}

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

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

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

.tag {
    background: var(--light-gray);
    color: var(--dark-gray);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-blue);
    color: white;
}

.read-more {
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.read-more:hover {
    color: #e56600;
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(3px);
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--light-gray);
    color: var(--dark-gray);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-blue);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    background: transparent;
    color: var(--dark-gray);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-number:hover,
.pagination-number.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.pagination-dots {
    color: var(--text-light);
    padding: 0 0.5rem;
}

.pagination-info {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== SIDEBAR ===== */

.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-orange);
    display: inline-block;
}

/* Newsletter widget */
.newsletter-widget p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

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

.newsletter-form .btn {
    gap: 0.5rem;
}

/* Articles populaires */
.popular-post {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.popular-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content h5 {
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-content h5 a {
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.post-content h5 a:hover {
    color: var(--primary-blue);
}

.post-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.post-meta i {
    color: var(--accent-orange);
    margin-right: 0.25rem;
}

/* Catégories */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    border-bottom: 1px solid var(--border-color);
}

.categories-list li:last-child {
    border-bottom: none;
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    color: var(--dark-gray);
    text-decoration: none;
    transition: all 0.3s ease;
}

.categories-list a:hover {
    color: var(--primary-blue);
    padding-left: 0.5rem;
}

.categories-list span {
    background: var(--light-gray);
    color: var(--text-light);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Tags cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags-cloud .tag {
    background: var(--light-gray);
    color: var(--dark-gray);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tags-cloud .tag:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: white;
    text-align: center;
}

.cta-widget .widget-title {
    color: white;
    border-color: var(--accent-orange);
}

.cta-widget h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.cta-widget p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.cta-widget .btn {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
}

.cta-widget .btn:hover {
    background: #e56600;
    border-color: #e56600;
}

/* ===== RESPONSIVE BLOG ===== */

@media (max-width: 1199px) {
    .blog-sidebar {
        top: 80px;
    }
    
    .sidebar-widget {
        padding: 1.5rem;
    }
}

@media (max-width: 991px) {
    .blog-section {
        padding: 60px 0;
    }
    
    .blog-filters {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }
    
    .filter-tabs {
        justify-content: center;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .blog-sidebar {
        position: static;
        margin-top: 3rem;
    }
}

@media (max-width: 767px) {
    .blog-section {
        padding: 40px 0;
    }
    
    .blog-filters {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .filter-tabs {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-card {
        margin-bottom: 1rem;
    }
    
    .blog-content {
        padding: 1.25rem;
    }
    
    .blog-meta {
        gap: 0.75rem;
        font-size: 0.8rem;
    }
    
    .blog-title a {
        font-size: 1.125rem;
    }
    
    .blog-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .blog-tags {
        justify-content: center;
    }
    
    .read-more {
        justify-content: center;
    }
    
    /* Pagination mobile */
    .blog-pagination {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .pagination-wrapper {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-numbers {
        order: -1;
    }
    
    /* Sidebar mobile */
    .sidebar-widget {
        margin-bottom: 1.5rem;
    }
    
    .popular-post {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .post-thumbnail {
        width: 100px;
        height: 75px;
        margin: 0 auto;
    }
}

@media (max-width: 575px) {
    .blog-filters {
        padding: 1rem;
    }
    
    .filter-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-btn {
        text-align: center;
    }
    
    .blog-content {
        padding: 1rem;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        text-align: center;
    }
    
    .pagination-numbers {
        gap: 0.25rem;
    }
    
    .pagination-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .sidebar-widget {
        padding: 1rem;
    }
}

/* ===== ANIMATIONS ===== */

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

.blog-card {
    animation: fadeInUp 0.6s ease forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }

/* ===== FILTRES INTERACTIFS ===== */

.blog-card.filtered-out {
    display: none;
}

.blog-card.filtered-in {
    display: flex;
    animation: fadeInUp 0.4s ease forwards;
}

/* ===== LOADING STATES ===== */

.blog-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    color: var(--text-light);
}

.blog-loading i {
    animation: spin 1s linear infinite;
    font-size: 2rem;
    color: var(--accent-orange);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== RECHERCHE HIGHLIGHT ===== */

.search-highlight {
    background: yellow;
    padding: 0 2px;
    border-radius: 2px;
}

/* ===== ÉTATS VIDES ===== */

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-results i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.no-results h3 {
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.no-results p {
    margin-bottom: 2rem;
}