/* =============================================
   MODULE ACTUALITÉS RSS - Style Card Madagascar
   Design cohérent avec Carnet malgache
   Adapté aux classes Joomla par défaut
   ============================================= */

/* Section actualités */
.actualites-section {
    padding: 3rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* Container principal des flux - Ciblage classe Joomla */
.actualites-section .feed {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.actualites-section .feed:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* En-tête du flux - description text avant la liste */
.actualites-section .feed > p,
.actualites-section .feed > div:not(.newsfeed):not(ul) {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
    padding: 0 1rem;
}

/* Image du flux */
.actualites-section .feed img {
    display: block;
    margin: 0 auto 1.5rem;
    max-width: 150px;
    height: auto;
    border-radius: 8px;
}

/* Titre du flux h2 */
.actualites-section .feed > h2 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--madagascar-green);
    margin: 0 0 1.5rem 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.08), rgba(0, 184, 148, 0.03));
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--madagascar-green);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: default !important;
    user-select: none;
}

/* Icône dans le titre */
.actualites-section .feed > h2 .flux-icon {
    font-style: normal;
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

/* S'assurer qu'aucun lien dans le h2 ne soit cliquable */
.actualites-section .feed > h2 a {
    pointer-events: none !important;
    cursor: default !important;
    text-decoration: none !important;
    color: inherit !important;
}

/* Effet subtil au survol du container (pas cliquable mais visuellement agréable) */
.actualites-section .feed:hover > h2 {
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.15);
    transform: translateY(-1px);
}

/* Accent décoratif sur le titre */
.actualites-section .feed > h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--madagascar-red), transparent);
    border-radius: 2px;
}

/* Séparateur entre flux */
.actualites-section .feed + .feed {
    position: relative;
    margin-top: 3rem;
}

.actualites-section .feed + .feed::before {
    content: '';
    position: absolute;
    top: -1.5rem;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--madagascar-green), transparent);
}

/* Liste des articles - ul.newsfeed */
.actualites-section .feed ul.newsfeed,
.actualites-section .feed .newsfeed {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1.5rem;
}

/* Card article individuel - li dans newsfeed */
.actualites-section .feed ul.newsfeed > li,
.actualites-section .feed .newsfeed > li {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-left: 4px solid transparent;
}

/* Accent coloré gauche */
.actualites-section .feed ul.newsfeed > li::before,
.actualites-section .feed .newsfeed > li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--madagascar-green) 0%, var(--madagascar-red) 100%);
    transition: width 0.3s ease;
}

.actualites-section .feed ul.newsfeed > li:hover,
.actualites-section .feed .newsfeed > li:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-left-color: var(--madagascar-green);
}

.actualites-section .feed ul.newsfeed > li:hover::before,
.actualites-section .feed .newsfeed > li:hover::before {
    width: 6px;
}

/* Lien de l'article - span.feed-link */
.actualites-section .feed .feed-link {
    display: block;
    margin-bottom: 1rem;
}

.actualites-section .feed .feed-link a {
    color: var(--madagascar-green);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.5;
    display: block;
    transition: color 0.3s ease;
    background: linear-gradient(to right, var(--madagascar-green) 0%, var(--madagascar-green) 100%);
    background-size: 0 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s ease, color 0.3s ease;
}

.actualites-section .feed .feed-link a:hover {
    color: var(--madagascar-green);
    background-size: 100% 2px;
}

/* Description de l'article */
.actualites-section .feed .feed-item-description {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-weight: 400;
}

.actualites-section .feed .feed-item-description p {
    margin: 0 0 0.75rem 0;
    font-weight: 400;
}

/* Normaliser les balises bold dans les descriptions RSS */
.actualites-section .feed .feed-item-description strong,
.actualites-section .feed .feed-item-description b {
    font-weight: 600;
    color: #2d3748;
}

/* Liens de catégorie en bas */
.actualites-section .feed .feed-item-description a {
    color: var(--madagascar-green);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.actualites-section .feed .feed-item-description a:hover {
    color: var(--madagascar-red);
    text-decoration: underline;
}

/* Animation d'entrée */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.actualites-section .feed ul.newsfeed > li,
.actualites-section .feed .newsfeed > li {
    animation: slideInUp 0.6s ease-out backwards;
}

.actualites-section .feed ul.newsfeed > li:nth-child(1),
.actualites-section .feed .newsfeed > li:nth-child(1) { animation-delay: 0.1s; }
.actualites-section .feed ul.newsfeed > li:nth-child(2),
.actualites-section .feed .newsfeed > li:nth-child(2) { animation-delay: 0.15s; }
.actualites-section .feed ul.newsfeed > li:nth-child(3),
.actualites-section .feed .newsfeed > li:nth-child(3) { animation-delay: 0.2s; }
.actualites-section .feed ul.newsfeed > li:nth-child(4),
.actualites-section .feed .newsfeed > li:nth-child(4) { animation-delay: 0.25s; }
.actualites-section .feed ul.newsfeed > li:nth-child(5),
.actualites-section .feed .newsfeed > li:nth-child(5) { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
    .actualites-section {
        padding: 2rem 1rem;
    }
    
    .actualites-section .feed {
        padding: 1.5rem;
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }
    
    .actualites-section .feed ul.newsfeed > li,
    .actualites-section .feed .newsfeed > li {
        padding: 1.25rem;
    }
    
    .actualites-section .feed .feed-link a {
        font-size: 1.15rem;
    }
    
    .actualites-section .feed .feed-item-description {
        font-size: 0.9rem;
    }
}

/* ============================================
   STYLES POUR LA PRÉSENTATION ACTUALITÉS
   ============================================ */

.actualites-presentation {
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.intro-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, transparent, var(--madagascar-green), transparent) 1;
}

.intro-header h1 {
    font-size: 2.2rem;
    color: var(--madagascar-green);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.intro-header .lead {
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
    margin: 0;
}

.intro-content p {
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 1.5rem;
}

.sources-info h2 {
    font-size: 1.5rem;
    color: var(--madagascar-green);
    margin: 2rem 0 1rem;
    font-weight: 700;
}

.sources-list {
    list-style: none;
    padding: 0;
}

.sources-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #4a5568;
    line-height: 1.6;
}

.sources-list li::before {
    content: '📰';
    position: absolute;
    left: 0;
}

.note-importante {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.note-importante p {
    margin: 0;
    color: #856404;
}

.actualisation {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.small-text {
    font-size: 0.9rem;
    color: #666;
}
