* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin-bottom: 0px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: #f39c12;
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Urgence Banner */
.urgence-banner {
    background: #e74c3c;
    color: white;
    padding: 15px 0;
    text-align: center;
    font-weight: 600;
    margin-top: 70px;
}

.urgence-banner a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

/* Blog Header */
.blog-header {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(52, 152, 219, 0.9));
    color: white;
    padding: 80px 0 60px;
    text-align: center;
}

.blog-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.blog-header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    padding: 60px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Search Bar */
.search-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    min-width: 0; /* Permet au input de se rétrécir */
}

.search-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

.search-btn:hover {
    background: #2980b9;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.filter-tab {
    background: white;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.filter-tab.active,
.filter-tab:hover {
    background: #3498db;
    color: white;
}

/* Articles */
.articles-container {
    display: grid;
    gap: 2rem;
}

.article-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 28px;
    padding: 2rem;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.article-header {
    height: 200px;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    position: relative;
    margin: -2rem -2rem 0 -2rem; /* Compense le padding du card */
}

.article-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.article-content {
    padding: 1.5rem 0 0 0;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 14px;
    color: #7f8c8d;
    gap: 10px;
}

.article-meta span {
    margin-right: 10px;
}

.article-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.3;
}

.article-title a {
    color: inherit;
    text-decoration: none;
}

.article-title a:hover {
    color: #3498db;
}

.article-excerpt {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.tag {
    background: #ecf0f1;
    color: #34495e;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    text-decoration: none;
}

.tag:hover {
    background: #3498db;
    color: white;
}

.read-more {
    background: #f39c12;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s;
}

.read-more:hover {
    background: #e67e22;
}

/* Sidebar */
.sidebar {
    display: grid;
    gap: 2rem;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-widget h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 3px solid #f39c12;
    padding-bottom: 8px;
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    text-align: center;
}

.cta-widget h3 {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.cta-btn {
    background: white;
    color: #e74c3c;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
    transition: all 0.3s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Newsletter */
.newsletter-form {
    display: grid;
    gap: 1rem;
}

.newsletter-input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.newsletter-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
}

.newsletter-btn:hover {
    background: #229954;
}

/* Article Full View */
.article-full {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.back-btn {
    background: #3498db;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-bottom: 2rem;
}

.back-btn:hover {
    background: #2980b9;
}

.article-full h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.article-full h2 {
    color: #2c3e50;
    margin: 2rem 0 1rem 0;
    font-size: 1.5rem;
    border-left: 4px solid #3498db;
    padding-left: 15px;
}

.article-full h3 {
    color: #34495e;
    margin: 1.5rem 0 1rem 0;
}

.article-full p {
    margin-bottom: 1rem;
}

.article-full ul,
.article-full ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.highlight-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 1.5rem;
    border-radius: 5px;
    margin: 1.5rem 0;
}

.info-box {
    background: #e8f5e8;
    border: 1px solid #27ae60;
    padding: 1.5rem;
    border-radius: 5px;
    margin: 1.5rem 0;
}

/* Dashboard Styles */
ul#ulDashboard {
    display: flex;
    list-style-type: none;
    justify-content: space-around;
    margin-top: 23px;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-menu {
    background: #3498db;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-bottom: 1rem;
    white-space: nowrap;
    text-align: center;
}

.btn-menu:hover {
    background: #2980b9;
}

/* Footer */
footer {
    background: #1a252f;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

footer h4 {
    color: #f39c12;
    margin-bottom: 1rem;
}

footer a {
    color: #bdc3c7;
    text-decoration: none;
}

footer a:hover {
    color: white;
}

/* Hidden class */
.hidden {
    display: none;
}

/* RESPONSIVE DESIGN - Mobile First Approach */

/* Tablettes - 768px et moins */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    /* Navigation Mobile */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2c3e50;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .logo {
        font-size: 1.4rem;
    }

    /* Blog Header */
    .blog-header {
        padding: 60px 0 40px;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-header p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Main Content - Une seule colonne avec sidebar en bas */
    .main-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        padding: 40px 0;
    }

    /* Blog main prend toute la largeur */
    .blog-main {
        width: 100%;
        order: 1;
    }

    /* Search Bar */
    .search-section {
        padding: 1.5rem;
    }
    
    .search-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .search-btn {
        padding: 12px;
        width: 100%;
    }

    /* Article Cards */
    .article-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .article-header {
        height: 150px;
        font-size: 1.5rem;
        margin: -1.5rem -1.5rem 0 -1.5rem;
    }

    .article-title {
        font-size: 1.2rem;
    }

    .read-more {
        width: 100%;
        text-align: center;
    }

    /* Dashboard */
    ul#ulDashboard {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        margin-top: 15px;
    }

    .btn-menu {
        width: 90%;
        max-width: 300px;
    }

    /* Article Full */
    .article-full {
        padding: 1.5rem;
        margin: 0 15px;
    }

    .article-full h1 {
        font-size: 1.5rem;
    }

    .article-full h2 {
        font-size: 1.3rem;
    }

    /* Sidebar sur tablette - passe en bas et prend toute la largeur */
    .sidebar {
        order: 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        width: 100%;
    }
    
    .sidebar-widget {
        padding: 1.2rem;
    }
}

/* Smartphones - 480px et moins */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    header {
        padding: 0.8rem 0;
    }

    .logo {
        font-size: 1.2rem;
    }

    .blog-header {
        padding: 50px 0 30px;
    }

    .blog-header h1 {
        font-size: 1.8rem;
    }

    .main-content {
        padding: 20px 0;
        gap: 1.5rem;
    }

    /* Sidebar sur smartphone - redevient une seule colonne */
    .sidebar {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .search-section {
        padding: 1rem;
    }

    .article-card {
        padding: 1rem;
    }

    .article-header {
        height: 120px;
        font-size: 1.2rem;
        margin: -1rem -1rem 0 -1rem;
    }

    .article-category {
        font-size: 10px;
        padding: 3px 8px;
    }

    .article-content {
        padding: 1rem 0 0 0;
    }

    .article-title {
        font-size: 1.1rem;
    }

    .article-meta {
        font-size: 12px;
    }

    .tag {
        font-size: 11px;
        padding: 3px 8px;
    }

    ul#ulDashboard {
        margin-top: 10px;
    }

    .btn-menu {
        font-size: 14px;
        padding: 10px 12px;
        width: 95%;
    }

    .article-full {
        padding: 1rem;
        margin: 0 10px;
    }

    .article-full h1 {
        font-size: 1.4rem;
    }

    .sidebar-widget {
        padding: 1rem;
    }

    .cta-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* Très petits écrans - 320px et moins */
@media (max-width: 320px) {
    .container {
        padding: 0 8px;
    }

    .blog-header h1 {
        font-size: 1.5rem;
    }

    .article-card {
        padding: 0.8rem;
    }

    .article-header {
        height: 100px;
        margin: -0.8rem -0.8rem 0 -0.8rem;
    }

    .btn-menu {
        font-size: 13px;
        padding: 8px 10px;
    }

    .article-full {
        padding: 0.8rem;
        margin: 0 8px;
    }
}

/* Amélioration pour les grandes tablettes - 1024px et moins */
@media (max-width: 1024px) and (min-width: 769px) {
    .main-content {
        grid-template-columns: 1.5fr 1fr;
        gap: 2.5rem;
    }

    .article-header {
        height: 180px;
    }

    .blog-header h1 {
        font-size: 2.5rem;
    }
}

/* Amélioration pour l'orientation paysage sur mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .blog-header {
        padding: 40px 0 20px;
    }
    
    .blog-header h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .article-header {
        height: 120px;
    }
}