/* ===========================================
   PAGE ACTUALITÉS - CSS COMPLET
   Couleur dominante : #D32F2F (rouge)
   =========================================== */

:root {
    --primary-color: #D32F2F;
    --primary-dark: #B71C1C;
    --primary-light: #EF5350;
    --primary-bg: rgba(211, 47, 47, 0.1);
    --text-dark: #424242;
    --text-light: #757575;
    --bg-light: #F5F5F5;
    --bg-lighter: #FAFAFA;
    --border-color: #E0E0E0;
    --white: #FFFFFF;
    --shadow: 0 4px 12px rgba(211, 47, 47, 0.15);
    --shadow-hover: 0 8px 24px rgba(211, 47, 47, 0.2);
}

/* Bannière des actualités */
.news-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.news-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
}

.banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.banner-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.banner-title i {
    margin-right: 1rem;
    font-size: 2.5rem;
    color: #FFEB3B;
}

.banner-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.banner-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.stat-item i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    color: #FFEB3B;
}

.stat-item span {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-item small {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Actualités */
.news-section {
    padding: 4rem 0;
    background: var(--bg-lighter);
    min-height: 60vh;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    color: var(--primary-dark);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-title i {
    margin-right: 0.75rem;
    color: var(--primary-color);
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.section-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

/* Cartes d'actualités */
.news-grid {
    margin-top: 2rem;
}

.news-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    border: 1px solid var(--border-color);
    opacity: 0;
    position: relative;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 12px 12px 0 0;
    z-index: 1;
}

.news-card.visible {
    opacity: 1;
}

.news-card:hover {
    transform: translateY(-12px) !important;
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.news-image-container {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover .news-image {
    transform: scale(1.08);
}

.news-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(183, 28, 28, 0.9), rgba(211, 47, 47, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.news-card:hover .news-image-overlay {
    opacity: 1;
}

.overlay-link {
    color: var(--white);
    text-decoration: none;
    padding: 0.85rem 1.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.overlay-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.overlay-link i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.news-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--white);
    border-radius: 8px;
    padding: 0.6rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    border: 1px solid var(--border-color);
}

.date-day {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
}

.date-month {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Contenu des cartes */
.news-content {
    padding: 1.75rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.news-category {
    color: var(--primary-dark);
    background: var(--primary-bg);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-weight: 600;
    border: 1px solid rgba(211, 47, 47, 0.2);
}

.news-category i {
    margin-right: 0.35rem;
    color: var(--primary-color);
}

.news-reading-time {
    color: var(--text-light);
    white-space: nowrap;
    font-weight: 500;
}

.news-reading-time i {
    color: var(--primary-light);
    margin-right: 0.25rem;
}

.news-title {
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-title a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    transition: color 0.3s ease;
    display: block;
    line-height: 1.4;
}

.news-title a:hover {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: var(--primary-light);
    text-decoration-thickness: 2px;
}

.news-excerpt {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.75rem;
    height: 5.1em;
    overflow: hidden;
    font-size: 0.95rem;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.news-author {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.news-author i {
    margin-right: 0.35rem;
    color: var(--primary-light);
}

.news-read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0.5rem 0;
    position: relative;
}

.news-read-more::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.news-read-more:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

.news-read-more:hover::after {
    width: 100%;
}

.news-read-more i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.news-read-more:hover i {
    transform: translateX(5px);
}

/* Message aucune actualité */
.no-news {
    background: var(--white);
    border-radius: 12px;
    padding: 4rem 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    border: 2px dashed var(--border-color);
}

.no-news i {
    color: var(--primary-light);
    opacity: 0.7;
}

.no-news h3 {
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.no-news p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Pagination améliorée */
.pagination-section {
    padding: 2.5rem 0;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}

.pagination-info {
    color: var(--primary-dark);
    font-size: 1rem;
    font-weight: 500;
    background: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.pagination {
    margin-bottom: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
    transform: translateY(-2px);
}

.page-link {
    color: var(--primary-dark);
    border: 2px solid var(--border-color);
    margin: 0;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 45px;
    text-align: center;
    padding: 0.6rem 0.85rem;
    font-weight: 600;
    background: var(--white);
}

.page-link:hover {
    color: var(--primary-color);
    background-color: var(--primary-bg);
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(211, 47, 47, 0.2);
}

.page-prev, .page-next {
    padding: 0.6rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.page-item.disabled .page-link {
    color: #BDBDBD;
    background-color: #EEEEEE;
    border-color: #E0E0E0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.active-page {
    font-weight: 800;
}

/* Saut de page */
.page-jump {
    margin-top: 1rem;
}

.jump-form {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.jump-form label {
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 0;
}

.jump-form .form-control {
    border: 2px solid var(--border-color);
    border-radius: 6px;
    width: 85px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-dark);
    transition: all 0.3s ease;
}

.jump-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
}

.jump-form .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.jump-form .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

/* Newsletter */
.newsletter-section {
    padding: 3.5rem 0;
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,100 L100,0 L100,100 Z" fill="rgba(211, 47, 47, 0.05)"/></svg>');
    background-size: cover;
}

.newsletter-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: var(--shadow-hover);
    position: relative;
    z-index: 1;
    border: 2px solid var(--primary-light);
}

.newsletter-card h3 {
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.newsletter-card h3 i {
    margin-right: 0.75rem;
    color: var(--primary-color);
}

.newsletter-card p {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.6;
}

.newsletter-form .input-group {
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.15);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.newsletter-form .input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.25);
}

.newsletter-form .form-control {
    border: none;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--bg-lighter);
}

.newsletter-form .form-control:focus {
    box-shadow: none;
    background: var(--white);
}

.newsletter-form .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.newsletter-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
}

.newsletter-form small {
    color: var(--text-light) !important;
    font-size: 0.9rem;
    margin-top: 0.75rem;
    display: block;
}

/* Bouton Retour en haut */
.to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: var(--shadow-hover);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.to-top-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.5);
}

.to-top-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light), var(--primary-dark));
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.to-top-btn:hover::after {
    opacity: 1;
}

/* Responsive */
@media (max-width: 991px) {
    .banner-title {
        font-size: 2.5rem;
    }
    
    .banner-stats {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem 1.5rem;
        flex: 1;
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .news-banner {
        padding: 3rem 0;
    }
    
    .banner-title {
        font-size: 2.2rem;
    }
    
    .banner-subtitle {
        font-size: 1.05rem;
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .news-image-container {
        height: 200px;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .news-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .news-read-more {
        align-self: flex-start;
        margin-top: 0.5rem;
    }
    
    .pagination-wrapper {
        gap: 1.25rem;
    }
    
    .pagination-info {
        padding: 0.6rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .page-jump {
        width: 100%;
    }
    
    .jump-form {
        padding: 0.85rem;
        width: 100%;
        max-width: 350px;
    }
    
    .newsletter-card {
        padding: 2rem;
    }
    
    .newsletter-card .row {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .news-card {
        margin-bottom: 2rem;
    }
    
    .news-image-container {
        height: 180px;
    }
    
    .news-content {
        padding: 1.5rem;
    }
    
    .news-title a {
        font-size: 1.2rem;
    }
    
    .to-top-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 1.2rem;
    }
    
    .banner-stats {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .stat-item {
        width: 200px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(211, 47, 47, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0);
    }
}

.news-card {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.news-card:hover {
    animation: pulse 2s infinite;
}

/* Délai d'animation pour chaque carte */
.news-card[data-delay] {
    animation-delay: calc(var(--delay, 0) * 1ms);
    animation-fill-mode: forwards;
}

/* Effet de chargement */
.news-section.loaded .section-line {
    animation: lineExpand 1s ease-out;
}

@keyframes lineExpand {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 80px;
        opacity: 1;
    }
}