/* ======================================
   ACTUALITÉS - STYLES
   ====================================== */

/* Forcer la navbar en haut sans espace */
html, body {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ajuster la position de la navbar pour le bandeau de vœux */
body {
    padding-top: 40px !important;
}

.navbar {
    position: fixed !important;
    top: 40px !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    z-index: 9998 !important;
}

/* Hero Section Actualités */
.actualites-hero {
    padding: 160px 20px 60px;
    background: linear-gradient(135deg, var(--dark-green) 0%, var(--primary-green) 100%);
    text-align: center;
    margin-top: 0;
}

.actualites-hero .hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.actualites-hero .hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* Section Filtres */
.actualites-filters {
    padding: 40px 20px;
    background: var(--bg-secondary);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.filter-btn {
    padding: 12px 24px;
    background: var(--bg-accent);
    color: var(--text-primary);
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.filter-btn.active {
    background: var(--primary-green);
    border-color: var(--light-green);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.filter-btn i {
    font-size: 1.1rem;
}

/* Grille d'actualités */
.actualites-grid-section {
    padding: 60px 20px 100px;
    background: var(--bg-primary);
}

.actualites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Carte d'actualité */
.actualite-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.actualite-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.actualite-card.hidden {
    display: none;
}

/* Badge de type */
.actualite-type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-green);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Badge pour les sondages - position ajustée */
.actualite-card[data-type="sondage"] .actualite-type-badge {
    top: 15px;
    right: 15px;
}

.actualite-type-badge i {
    font-size: 0.9rem;
}

/* Thumbnail */
.actualite-thumbnail {
    width: 100%;
    height: 250px;
    background: var(--bg-accent);
    position: relative;
    overflow: hidden;
}

.actualite-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Overlay play button pour vidéos */
.play-overlay {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.actualite-card:hover .play-overlay {
    background: rgba(76, 175, 80, 0.6);
    transform: translateX(-50%) scale(1.1);
}

.play-overlay i {
    font-size: 2rem;
    color: #fff;
    margin-left: 4px;
}

/* Contenu de la carte */
.actualite-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    justify-content: space-between;
}

.actualite-date {
    font-size: 0.9rem;
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.actualite-date i {
    font-size: 0.85rem;
}

.actualite-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.actualite-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Tags */
.actualite-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.actualite-tag {
    padding: 5px 12px;
    background: var(--bg-accent);
    color: var(--text-secondary);
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Action buttons */
.actualite-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-green);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    margin-top: 20px;
    width: fit-content;
}

.actualite-action:hover {
    background: var(--dark-green);
    transform: translateX(5px);
}

.actualite-action i {
    font-size: 1.1rem;
}

/* Message aucun résultat */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.no-results p {
    font-size: 1.25rem;
}

/* Réduire la taille du logo dans le footer */
.footer-logo img {
    max-width: 120px;
    height: auto;
}

.footer-tagline {
    font-size: 0.9rem;
    margin-top: 10px;
}

/* ======================================
   MODAL VIDÉO
   ====================================== */

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-modal.show {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10001;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.video-modal-close:hover {
    background: var(--primary-red);
    border-color: var(--primary-red);
    transform: rotate(90deg);
}

.video-modal-content video {
    width: 100%;
    max-width: 1200px;
    height: auto;
    border-radius: 8px;
}

/* PDF Viewer */
.pdf-viewer-container {
    width: 100%;
    height: 85vh;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.pdf-viewer-container embed,
.pdf-viewer-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    margin: 0;
    padding: 0;
}

/* Bouton fermer spécifique pour la modale PDF */
#pdfModal .video-modal-close {
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
}

#pdfModal .video-modal-close:hover {
    background: var(--primary-red);
    color: #fff;
}

/* ======================================
   RESPONSIVE
   ====================================== */

@media (max-width: 768px) {
    .actualites-hero .hero-title {
        font-size: 2rem;
    }

    .actualites-hero .hero-subtitle {
        font-size: 1rem;
    }

    .actualites-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-buttons {
        flex-direction: column;
        width: 100%;
    }

    .filter-btn {
        width: 100%;
        justify-content: center;
    }

    .actualite-title {
        font-size: 1.3rem;
    }

    .video-modal-close {
        top: -40px;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .actualites-hero {
        padding: 100px 15px 40px;
    }

    .actualites-hero .hero-title {
        font-size: 1.75rem;
    }

    .actualite-content {
        padding: 20px;
    }

    .actualite-thumbnail {
        height: 200px;
    }
}

/* ======================================
   ANIMATIONS SUPPLÉMENTAIRES
   ====================================== */

/* Animation au chargement des cartes */
.actualite-card {
    animation: cardSlideUp 0.5s ease;
}

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Délai progressif pour l'animation */
.actualite-card:nth-child(1) { animation-delay: 0.1s; }
.actualite-card:nth-child(2) { animation-delay: 0.2s; }
.actualite-card:nth-child(3) { animation-delay: 0.3s; }
.actualite-card:nth-child(4) { animation-delay: 0.4s; }
.actualite-card:nth-child(5) { animation-delay: 0.5s; }
.actualite-card:nth-child(6) { animation-delay: 0.6s; }

/* Effet de brillance sur hover */
.actualite-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(76, 175, 80, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.actualite-card:hover::before {
    left: 100%;
}

/* ======================================
   STYLES POUR LES SONDAGES
   ====================================== */

/* Carte sondage */
.actualite-card[data-type="sondage"] .actualite-content {
    min-height: 300px;
    padding-top: 50px;
}

.sondage-question {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
    line-height: 1.5;
    margin-top: 0;
    padding: 0 20px 20px 20px;
    text-align: center;
    border-bottom: 2px solid var(--bg-accent);
}

/* Date intégrée dans la question */
.sondage-date-inline {
    margin-top: 12px;
    border-top: none;
    padding-top: 0;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sondage-date-inline i {
    color: var(--primary-green);
}

/* Options de vote */
.sondage-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.sondage-option {
    background: var(--bg-accent);
    border: 2px solid var(--bg-accent);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.sondage-option:hover {
    border-color: var(--primary-green);
    background: rgba(76, 175, 80, 0.1);
    transform: translateX(5px);
}

.sondage-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-green);
}

.sondage-option-label {
    flex: 1;
    cursor: pointer;
}

/* Bouton de vote */
.sondage-vote-btn {
    background: var(--primary-green);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sondage-vote-btn:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.sondage-vote-btn:disabled {
    background: var(--bg-accent);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

/* Résultats du sondage */
    padding: 0 10px;
.sondage-results {
    display: none;
}

.sondage-results.show {
    display: block;
}

.sondage-result-item {
    margin-bottom: 20px;
}

.sondage-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sondage-result-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.sondage-result-percentage {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Barre de progression */
.sondage-progress-bar {
    height: 40px;
    background: var(--bg-accent);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

.sondage-progress-fill {
    height: 100%;
    transition: width 1s ease-in-out, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--border-radius);
    min-width: 60px;
}

/* Couleurs selon le résultat */
.sondage-result-item.winner .sondage-progress-fill {
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
}

.sondage-result-item.winner .sondage-result-percentage {
    color: #4CAF50;
}

.sondage-result-item.loser .sondage-progress-fill {
    background: linear-gradient(90deg, #f44336, #e57373);
}

.sondage-result-item.loser .sondage-result-percentage {
    color: #f44336;
}

.sondage-result-item.neutral .sondage-progress-fill {
    background: linear-gradient(90deg, #FF9800, #FFB74D);
}

.sondage-result-item.neutral .sondage-result-percentage {
    color: #FF9800;
}

/* Info totale des votants */
.sondage-total-votes {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-accent);
    border-radius: var(--border-radius);
    text-align: center;
    border-left: 4px solid var(--primary-green);
}

.sondage-total-votes i {
    color: var(--primary-green);
    margin-right: 8px;
}

.sondage-total-votes strong {
    color: var(--primary-green);
    font-size: 1.2rem;
}

/* Message déjà voté */
.sondage-already-voted {
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid var(--primary-green);
    border-radius: var(--border-radius);
    padding: 12px;
    text-align: center;
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 20px;
}

.sondage-already-voted i {
    margin-right: 8px;
}

/* Animation de la barre */
@keyframes fillBar {
    from {
        width: 0;
    }
}

.sondage-progress-fill {
    animation: fillBar 1s ease-in-out;
}

/* Responsive sondages */
@media (max-width: 768px) {
    .sondage-question {
        font-size: 1.1rem;
    }
    
    .sondage-option {
        padding: 12px 15px;
    }
    
    .sondage-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}