* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    background: #f8f9fa;
    line-height: 1.8;
}

/* ── Header ───────────────────────────────────────────────────── */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: black;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: #e63848;
    transition: width 0.3s;
    border-radius: 10px;
}

nav a:hover::after {
    width: 100%;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

#imgLogo {
    height: 40px;
    vertical-align: middle;
}

/* ── Hero blog ────────────────────────────────────────────────── */
.blog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.blog-hero-title {
    font-family: 'Bangers', cursive;
    font-size: 3.5rem;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
}

.blog-hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 500;
}

/* ── Main container ───────────────────────────────────────────── */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

/* ── Loader ───────────────────────────────────────────────────── */
#blog-loader {
    text-align: center;
    padding: 4rem 0;
    color: #764ba2;
    font-size: 1.1rem;
    font-weight: 600;
}

.loader-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(118, 75, 162, 0.2);
    border-top-color: #764ba2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

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

/* ── Error ────────────────────────────────────────────────────── */
#blog-error, #blog-empty {
    text-align: center;
    padding: 4rem 0;
    display: none;
}

#blog-error p, #blog-empty p {
    color: #666;
    font-size: 1.1rem;
}

/* ── Grid articles ────────────────────────────────────────────── */
#blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

/* ── Carte article ────────────────────────────────────────────── */
.article-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(118, 75, 162, 0.18);
    border-color: #764ba2;
}

.article-img {
    width: 100%;
    aspect-ratio: 680 / 200;
    overflow: hidden;
    background: #f0f0f0;
}

.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.article-card:hover .article-img img {
    transform: scale(1.04);
}

.article-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0ebff 0%, #e8f4ff 100%);
    font-size: 3.5rem;
}

.article-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.article-category {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-date {
    font-size: 0.85rem;
    color: #888;
}

.article-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.4;
}

.article-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-read-more {
    display: inline-block;
    margin-top: 0.5rem;
    color: #764ba2;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.2s, letter-spacing 0.2s;
}

.article-card:hover .article-read-more {
    color: #e63848;
    letter-spacing: 0.3px;
}

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
    background: linear-gradient(135deg, #4a7fd6 0%, #5e8eea 100%);
    color: #fff;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

/* ── Hamburger ────────────────────────────────────────────────── */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #764ba2;
    padding: 0.3rem 0.5rem;
    line-height: 1;
    border-radius: 8px;
    transition: background 0.2s;
}

.hamburger-btn:hover {
    background: rgba(118, 75, 162, 0.1);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .header {
        padding: 1rem 1.2rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .hamburger-btn {
        display: block;
    }

    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 1rem 0;
        border-top: 1px solid #eee;
        margin-top: 0.3rem;
    }

    nav.nav-open {
        display: flex;
    }

    nav a {
        width: 100%;
        padding: 0.3rem 0;
    }

    .blog-hero-title {
        font-size: 2.5rem;
    }

    .blog-container {
        padding: 2rem 1rem 3rem;
    }

    #blog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .blog-hero-title {
        font-size: 2rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    #imgLogo {
        height: 30px;
    }
}

@keyframes pulse {
    0%   { transform: scale(1);    filter: brightness(1); }
    50%  { transform: scale(1.08); filter: brightness(1.2); }
    100% { transform: scale(1);    filter: brightness(1); }
}
