/* Styles pour Newsletter Multilingual Manager */
.newsletter-ml-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.no-newsletters {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Groupement par année */
.newsletter-year-group {
    margin-bottom: 30px;
}

.newsletter-year-title {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    font-weight: 600;
}

/* Item de newsletter */
.newsletter-ml-item {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    margin-bottom: 25px;
    padding: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.newsletter-ml-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.newsletter-ml-content {
    display: flex;
    align-items: flex-start;
    gap: 25px;
}

/* Icône PDF */
.newsletter-ml-icon {
    font-size: 3.5em;
    color: #e74c3c;
    flex-shrink: 0;
    text-align: center;
    width: 70px;
}

/* Informations de la newsletter */
.newsletter-ml-info {
    flex: 1;
    min-width: 0;
}

.newsletter-ml-title {
    margin: 0 0 12px 0;
    font-size: 1.4em;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
}

.newsletter-ml-date {
    color: #7f8c8d;
    font-size: 0.95em;
    margin-bottom: 12px;
    font-weight: 500;
}

.newsletter-ml-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95em;
}

/* Sélecteur de langue */
.newsletter-language-selector {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

.language-label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.language-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.language-btn {
    background: #ffffff;
    border: 2px solid #dee2e6;
    color: #495057;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.language-btn:hover {
    border-color: #007bff;
    background: #e3f2fd;
    color: #0056b3;
}

.language-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* Informations du fichier */
.newsletter-file-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    font-size: 0.85em;
    color: #6c757d;
}

.newsletter-file-info span {
    background: #e9ecef;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: 500;
}

/* Actions (boutons) */
.newsletter-ml-actions {
    flex-shrink: 0;
    min-width: 200px;
}

.language-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.newsletter-download-btn,
.newsletter-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    min-width: 120px;
    justify-content: center;
}

.newsletter-download-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 3px 6px rgba(231, 76, 60, 0.3);
}

.newsletter-download-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(231, 76, 60, 0.4);
}

.newsletter-view-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 3px 6px rgba(52, 152, 219, 0.3);
}

.newsletter-view-btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(52, 152, 219, 0.4);
}

/* Badge multilingue */
.newsletter-ml-item::before {
    content: "🌐 MULTILINGUE";
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .newsletter-ml-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .newsletter-ml-icon {
        align-self: center;
        font-size: 3em;
    }
    
    .newsletter-ml-actions {
        min-width: auto;
        width: 100%;
    }
    
    .language-actions {
        justify-content: center;
    }
    
    .newsletter-file-info {
        justify-content: center;
    }
    
    .language-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .newsletter-ml-item {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .newsletter-ml-title {
        font-size: 1.2em;
    }
    
    .language-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsletter-download-btn,
    .newsletter-view-btn {
        width: 100%;
        min-width: auto;
    }
    
    .newsletter-year-title {
        font-size: 1.3em;
        text-align: center;
    }
    
    .language-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .language-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
}

/* Animation d'apparition */
.newsletter-ml-item {
    opacity: 0;
    animation: slideInUp 0.6s ease forwards;
}

.newsletter-ml-item:nth-child(1) { animation-delay: 0.1s; }
.newsletter-ml-item:nth-child(2) { animation-delay: 0.2s; }
.newsletter-ml-item:nth-child(3) { animation-delay: 0.3s; }
.newsletter-ml-item:nth-child(4) { animation-delay: 0.4s; }
.newsletter-ml-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style pour Elementor */
.elementor-widget-container .newsletter-ml-container {
    padding: 0;
}

/* Effet de survol sur l'icône PDF */
.newsletter-ml-item:hover .newsletter-ml-icon {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.3s ease;
}

/* Animation des boutons de langue */
.language-btn {
    position: relative;
    overflow: hidden;
}

.language-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.language-btn:hover::before {
    left: 100%;
}

/* Style alternatif pour liste compacte */
.newsletter-ml-container.compact .newsletter-ml-item {
    padding: 20px 25px;
    margin-bottom: 15px;
}

.newsletter-ml-container.compact .newsletter-ml-icon {
    font-size: 2.5em;
    width: 50px;
}

.newsletter-ml-container.compact .newsletter-ml-title {
    font-size: 1.1em;
    margin-bottom: 8px;
}

.newsletter-ml-container.compact .newsletter-ml-excerpt {
    display: none;
}

.newsletter-ml-container.compact .newsletter-language-selector {
    padding: 10px;
    margin-bottom: 10px;
}

/* Indicateur de langue active dans le titre */
.newsletter-ml-item[data-active-lang="fr"] .newsletter-ml-title::after {
    content: " 🇫🇷";
}

.newsletter-ml-item[data-active-lang="en"] .newsletter-ml-title::after {
    content: " 🇬🇧";
}

.newsletter-ml-item[data-active-lang="ar"] .newsletter-ml-title::after {
    content: " 🇩🇿";
}