.headline-article {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    background: linear-gradient(135deg, #fff 60%, #f4f8ff 100%);
    border: 2px solid #b9cedb;
    box-shadow: 4px 4px #d5e3fd;
    margin-bottom: 30px;
    border-radius: 0 !important;
    overflow: hidden;
    min-height: 200px;
    position: relative;
    transition: none !important; /* Désactive toute transition */
}
.dark-mode .headline-article {
    background: linear-gradient(135deg, #2c2e3e 60%, #2c2e3e 100%);
    border: 2px solid #3d4660;
    box-shadow: 4px 4px #373b4a;
}
.headline-article:hover {
    /* Supprime tout effet sur la bordure ET la couleur au survol */
    border-color: #b9cedb !important;
    box-shadow: 4px 4px #d5e3fd !important;
    transform: none !important; /* Empêche tout déplacement au hover */
}
/* Désactive le hover en dark-mode */
.dark-mode .headline-article:hover {
    border-color: #3d4660 !important;
    box-shadow: 4px 4px #373b4a !important;
    /* Pas de changement visuel */
}
.headline-thumbnail {
    flex: 0 0 220px;
    max-width: 220px;
    min-width: 180px;
    background: #f4f8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.headline-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 180px;
    background: #fff;
    transition: opacity 1s;
}
.headline-content {
    flex: 1;
    padding: 24px 28px 24px 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    min-height: 180px;
}
.headline-title {
    font-size: 2rem;
    font-family: 'Alegreya', serif;
    font-weight: 700;
    margin-bottom: 10px;
    color: #18365e;
    line-height: 1.1;
    text-decoration: none !important; /* Jamais souligné, même au hover */
    transition: none;
}
/* Ajout : souligner le titre au survol */
.headline-content a:hover .headline-title,
.headline-content a:focus .headline-title {
    text-decoration: underline !important;
}
.headline-content a,
.headline-content a:visited,
.headline-content a:hover,
.headline-content a:active {
    text-decoration: none !important;
}
.dark-mode .headline-title {
    color: #eaf4ff;
}
.headline-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: #7a8bb7;
    position: relative;
    /* plus de padding-right ici */
}
.dark-mode .headline-meta {
    color: #b6c6e0;
}
/* Harmoniser la taille de la meta-bar headline */
.headline-meta,
.headline-meta > * {
    font-size: 0.8rem !important;
}
.headline-source {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
}
.headline-favicon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid #d3d3d36b;
    background: #fff;
}
.dark-mode .headline-favicon {
    border: 1px solid #3d4660;
    background: #23243a;
}
.headline-date {
    font-size: 0.98rem;
    color: #6b7a99;
}
.dark-mode .headline-date {
    color: #b6c6e0;
}
.headline-excerpt {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #2a2a2a;
    font-family: 'Alegreya', serif;
}
.dark-mode .headline-excerpt {
    color: #eaf4ff;
}
.headline-tags {
    margin-top: 10px;
}
.headline-tags .tag {
    margin-right: 7px;
    margin-bottom: 0;
    background:none;
    border: 1px solid #dfdfdf;
    
}
.dark-mode .headline-tags .tag {
    border: 1px solid #888;
}
.headline-permalink {
    font-size: 0.9rem;
    color: #7a8bb7;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 3;
    margin: 0;
}
.headline-permalink:hover,
.headline-permalink:focus {
    background: none !important;
    color: #18365e !important;
    text-decoration: underline;
}
.dark-mode .headline-permalink {
    background: none !important;
    border: none !important;
    color: #eaf4ff;
}
.dark-mode .headline-permalink:hover,
.dark-mode .headline-permalink:focus {
    background: none !important;
    border: none !important;
    color: #fff !important;
}
/* Pour laisser la place au bouton en bas à droite */
.headline-content {
    padding-bottom: 48px;
}
.headline-article.highlight-new {
    /* Supprime l'animation pulse (zoom/dézoom) */
    animation: none;
    border-color: crimson;
}
/* Empêche le hover de changer la bordure si highlight-new */
.headline-article.highlight-new:hover,
.headline-article-mobile.highlight-new:hover {
    border-color: crimson !important;
    box-shadow: 4px 4px #d5e3fd !important;
    /* Pas de déplacement ni d'effet */
    transform: none !important;
}

/* Red dot animé en haut à gauche de l'image pour le headline desktop */
.headline-article-desktop.highlight-new .headline-thumbnail {
    position: relative;
}
.headline-article-desktop.highlight-new .headline-thumbnail .new-indicator {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 20px;
    height: 20px;
    background: crimson;
    border-radius: 50%;
    z-index: 3;
    animation: pulse 1.5s infinite;
    display: inline-block;
    content: "";
}
@keyframes pulse {
    0% { transform: scale(1);}
    50% { transform: scale(1.2);}
    100% { transform: scale(1);}
}

/* Masquer le red dot dans le titre pour le headline desktop en highlight */
.headline-article-desktop.highlight-new .headline-title .new-indicator {
    display: none !important;
}

/* Affichage du bouton "marquer comme lu" sur le headline desktop */
.headline-article-desktop .mark-as-seen {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    background: crimson;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    z-index: 4;
}
.headline-article-desktop.highlight-new .mark-as-seen {
    display: block !important;
}
.headline-article-desktop .mark-as-seen:hover {
    background: #ee1d47;
}

/* Point rouge comme les autres articles */
.headline-article.highlight-new .headline-title {
    position: relative;
}
.headline-article.highlight-new .headline-title .new-indicator {
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: crimson;
    border-radius: 50%;
    z-index: 2;
    animation: none;
    display: inline-block;
    content: "";
}
/* Pour garantir l'affichage du point rouge même si .new-indicator est déjà présent */
.headline-article .headline-title .new-indicator {
    /* styles identiques pour cohérence */
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: crimson;
    border-radius: 50%;
    z-index: 2;
    animation: none;
    display: inline-block;
    content: "";
}
/* Par défaut : mobile/tablette masqué */
.headline-article-mobile {
    display: none !important;
}

/* Desktop : visible */
.headline-article-desktop {
    display: flex !important;
}

/* Mobile/tablette : on inverse */
@media (max-width: 900px) {
    .headline-article-desktop {
        display: none !important;
    }
    .headline-article-mobile {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        min-height: 250px;
        background-size: cover;
        background-position: center;
        position: relative;
        border: 2px solid #b9cedb;
        box-shadow: 4px 4px #d5e3fd;
        margin-bottom: 30px;
        border-radius: 0 !important;
        overflow: hidden;
    }
    .dark-mode .headline-article-mobile {
        border: 2px solid #3d4660;
        box-shadow: 4px 4px #373b4a;
    }
    .headline-article-mobile .headline-content {
        position: relative;
        z-index: 2;
        padding: 28px 12px 18px 12px;
        background: linear-gradient(180deg, rgba(255,255,255,0.92) 70%, rgba(255,255,255,0.7) 100%);
        /* Pour dark mode */
        /* Correction : espace en bas pour le bouton partager */
        padding-bottom: 48px;
        padding-top: 42px; /* Ajout pour laisser la place au badge */
    }
    .dark-mode .headline-article-mobile .headline-content {
        background: linear-gradient(180deg, rgba(44,46,62,0.92) 70%, rgba(44,46,62,0.7) 100%);
    }
    /* Optionnel : overlay sombre pour améliorer la lisibilité */
    .headline-article-mobile::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.18);
        z-index: 1;
        pointer-events: none;
    }
    .headline-article-mobile .headline-content {
        position: relative;
        z-index: 2;
    }
    /* Correction : source et date sur la même ligne */
    .headline-article-mobile .headline-meta {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        margin-bottom: 10px;
        font-size: 0.8rem;
        color: #7a8bb7;
        position: relative;
        flex-wrap: wrap;
    }
    /* Correction : le lien partager reste bien en bas à droite */
    .headline-article-mobile .headline-permalink {
        position: absolute;
        right: 18px;
        bottom: 18px;
        z-index: 3;
        margin: 0;
    }
    /* Correction : pastille rouge et bouton "marquer comme lu" sur le headline mobile */
    .headline-article-mobile.highlight-new .headline-title .new-indicator {
        position: absolute;
        left: -30px;
        top: 50%;
        transform: translateY(-50%);
        width: 18px;
        height: 18px;
        background: crimson;
        border-radius: 50%;
        z-index: 2;
        animation: none;
        display: inline-block;
        content: "";
    }
    .headline-article-mobile .headline-title {
        position: relative;
    }
    .headline-article-mobile.highlight-new .mark-as-seen {
        display: block !important;
    }
    .headline-article-mobile .mark-as-seen {
        display: none;
        position: absolute;
        top: 0;
        right: 0;
        background: crimson;
        color: #fff;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 0.8rem;
        z-index: 4;
    }
    .headline-article-mobile .mark-as-seen:hover {
        background: #ee1d47;
    }
    .headline-article-mobile .headline-badge {
        /* Place le badge collé à la bordure supérieure du headline */
        position: absolute;
        top: 0;
        left: 0;
        z-index: 20;
        font-size: 1rem;
        padding: 4px 13px;
        box-shadow: 0 2px 8px rgba(44,46,62,0.12);
        border-top-left-radius: 0;
        border-bottom-left-radius: 16px;
        border-top-right-radius: 0;
        border-bottom-right-radius: 16px;
        margin: 0;
    }
}

/* Badge "À la une" pour le headline */
.headline-badge {
    position: absolute;
    top: 6px; /* rapproché du bord haut */
    left: 6px; /* rapproché du bord gauche */
    background: #18365e;
    color: #fff;
    font-family: 'Alegreya', serif;
    font-size: 1.05rem;
    font-weight: bold;
    padding: 5px 16px;
    border-radius: 0; /* plus de bords arrondis */
    z-index: 10;
    box-shadow: 0 2px 8px rgba(44,46,62,0.10);
    letter-spacing: 0.01em;
    border: 1.5px solid #b9cedb;
    text-transform: uppercase;
    opacity: 0.93;
    pointer-events: none;
}
.dark-mode .headline-badge {
    background: #23243a;
    color: #eaf4ff;
    border: 1.5px solid #3d4660;
    border-radius: 0; /* plus de bords arrondis */
}

/* Pour mobile/tablette */
@media (max-width: 900px) {
    .headline-article-mobile .headline-badge {
        position: absolute;
        top: 6px;
        left: 6px; /* badge à gauche */
        right: auto;
        z-index: 20;
        font-size: 1rem;
        padding: 4px 13px;
        box-shadow: 0 2px 8px rgba(44,46,62,0.12);
        border-radius: 0; /* plus de bords arrondis */
        margin: 0;
    }
}
