* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1e23;
    color: #e0e0e0;
    line-height: 1.6;
    padding: 0.5%;
    padding-right: 0%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2a2e35;
    padding: 10px 20px;
    margin-right: 0.5%;
    border-radius: 8px;
    width: 100%;
    max-width: 1200px;
    flex-wrap: wrap;
    box-sizing: border-box;
    gap: 8px; /* petit espace entre les éléments */
}

.logo {
    height: 40px;
    width: auto;
}

.page-title {
    font-size: 1.2rem;
    font-weight: bold;
    font-style: italic;
    color: #ffffff;
    text-align: center;
    flex-grow: 1;
}

.header-button {
    font-size: 1rem;
    color: #66aaff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    background-color: #333;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;

    /* Harmonisation avec les select */
    height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-button:visited {
    color: #66aaff;
}

.header-button:hover {
    background-color: #444;
}

/* Conteneur pour bouton + filtres, aligné à droite */
.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-select {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-select select {
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #444;
    padding: 6px 12px;
    font-size: 0.9rem;
    border-radius: 5px;
    font-family: inherit;
    height: 36px;
    appearance: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: auto;
    box-shadow: none;
}

.header-select select:hover {
    background-color: #444;
}

#articles-container {
    width: 100%;
    margin-top: 0.5%;
    padding-right: 0%;
    flex-direction: row;
    flex-wrap: wrap;
    display: flex;
}

.article-card {
    background-color: #313338;
    max-width: 608px;
    width: 24.5%;
    margin-right: 0.5%;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 1%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media screen and (max-width: 1920px) {
    .article-card {
        width: 32%;
        margin-right: 1%;
    }

    .main-header {
        margin-right: 1%;
    }

    body {
        padding: 1%;
        padding-right: 0%;
    }

    #articles-container {
        margin-top: 1%;
    }
}

@media screen and (max-width: 960px) {
    .article-card {
        width: 48.5%;
        margin-right: 1.5%;
    }

    .main-header {
        margin-right: 1.5%;
    }

    body {
        padding: 1.5%;
        padding-right: 0%;
    }

    #articles-container {
        margin-top: 1.5%;
    }
}

@media only screen and (max-width: 600px) {
    .article-card {
        width: 98%;
        margin-right: 2%;
    }

    .main-header {
        margin-right: 2%;
    }

    body {
        padding: 2%;
        padding-right: 0%;
    }

    #articles-container {
        margin-top: 2%;
    }
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.article-card h2 {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
}

.article-card p {
    font-size: 14px;
    color: #b0b0b0;
    margin-bottom: 10px;
}

.article-card div {
    font-size: 16px;
    color: #d0d0d0;
    margin-bottom: 10px;
}

.article-card a {
    font-size: 16px;
    color: #66aaff;
    text-decoration: none;
    font-weight: bold;
}

.article-card a:hover {
    text-decoration: underline;
}

.article-card a.article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card a.article-link:hover {
    color: #f0f0f0;
}

.article-image {
    max-width: 25%;
    height: auto;
    margin-top: 20px;
    display: block;
    border-radius: 8px;
}

small {
    font-size: 0.85em;
    color: #b0b0b0;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #313338;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 5px;
    z-index: 100;
}

.dropdown-content a {
    color: #e0e0e0;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #444848;
}

.dropdown-separator {
    border: none;
    border-top: 1px solid #555;
    margin: 8px 0;
}

/*.emoji {
  width: 20px;
  height: 20px;
  vertical-align: text-bottom;
  margin: 0 2px;
  display: inline-block;
}
/* taillez les emojis "custom" insérés */
/*.article-body img.emoji {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  margin: 0 .15em;
}

/* sécurité : toutes les autres images du contenu restent responsives */
/*.article-body img:not(.emoji) {
  max-width: 100%;
  height: auto;
  display: inline-block;
}