:root {
    --primary: #1c396f;
    --primary-light: #6aa2db;
    --accent: #c49b3a;
    --dark: #0a1628;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Work Sans", sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

body.modal-open {
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Header */
.hero-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: var(--white);
    padding: 80px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    /*padding-top: calc(80px + 130px);*/ /* Compenser la hauteur de la navbar fixe */
}

/* Responsive adjustment for mobile */
@media (max-width: 768px) {
    .hero-header {
        padding-top: calc(
            60px + 80px
        ); /* Réduire le padding sur les petits écrans */
    }
}

@media (max-width: 480px) {
    .hero-header {
        padding-top: calc(
            40px + 70px
        ); /* Ajustement supplémentaire pour très petits écrans */
    }
}

.hero-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="2" height="2" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: 50px 50px;
}

.hero-header h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.hero-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

/* Filters */
.filters {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 40px 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 28px;
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    color: var(--dark);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 57, 111, 0.15);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(28, 57, 111, 0.3);
}

/* News Grid */
.news-section {
    padding: 60px 0;
}

.section-title {
    font-family: "Playfair Display", serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
    border-radius: 2px;
}

/* Primary News (Featured) */
.primary-news {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 60px;
    transition: all 0.4s ease;
    cursor: pointer;
}

.primary-news:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.primary-news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.primary-news-image {
    position: relative;
    height: 100%;
    min-height: 500px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
}

.primary-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.news-badge {
    position: absolute;
    top: 30px;
    left: 30px;
    background: var(--accent);
    color: var(--white);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(196, 155, 58, 0.4);
}

.news-date {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--dark);
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.news-date i {
    color: var(--primary);
}

.primary-news-content {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.primary-news-content h2 {
    font-family: "Playfair Display", serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 25px;
    line-height: 1.2;
}

.primary-news-content p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.8;
}

.news-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.news-tag {
    padding: 8px 18px;
    background: var(--gray-light);
    color: var(--dark);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.news-tag:hover {
    background: var(--primary-light);
    color: var(--white);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 15px;
    align-self: flex-start;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

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

.read-more i {
    transition: transform 0.3s ease;
}

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

/* Secondary News Grid */
.secondary-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.secondary-news-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    cursor: pointer;
}

.secondary-news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.secondary-news-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(
        135deg,
        var(--primary-light) 0%,
        var(--primary) 100%
    );
}

.secondary-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.secondary-news-card:hover .secondary-news-image img {
    transform: scale(1.1);
}

.secondary-news-content {
    padding: 35px 30px;
}

.secondary-news-content h3 {
    font-family: "Playfair Display", serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
    line-height: 1.3;
}

.secondary-news-content p {
    font-size: 1rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Tertiary News (Compact List) */
.tertiary-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tertiary-news-item {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid transparent;
}

.tertiary-news-item:hover {
    border-left-color: var(--accent);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateX(5px);
}

.tertiary-news-item h4 {
    font-family: "Playfair Display", serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.tertiary-news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 10px;
}

.tertiary-news-meta i {
    color: var(--primary-light);
}

.tertiary-news-item p {
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.6;
}

/* Share Section */
.share-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

.share-section span {
    font-weight: 600;
    color: var(--dark);
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-light);
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px);
}

.social-link.facebook:hover {
    background: #1877f2;
    color: var(--white);
}

.social-link.linkedin:hover {
    background: #0077b5;
    color: var(--white);
}

.social-link.x:hover {
    background: #000000;
    color: var(--white);
}

.social-link.instagram:hover {
    background: #c13584;
    color: var(--white);
}

.social-link.youtube:hover {
    background: #ff0000;
    color: var(--white);
}

.social-link.tiktok:hover {
    background: #000000;
    color: var(--white);
}

/* ==================== MODAL STYLES ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.9);
    backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--white);
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    position: relative;
    transform: translateY(50px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    margin: auto;
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 50px;
    height: 50px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    position: relative;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-image .news-badge {
    top: 30px;
    left: 30px;
}

.modal-image .news-date {
    bottom: 30px;
    left: 30px;
}

.modal-content {
    padding: 50px;
}

.modal-content h2 {
    font-family: "Playfair Display", serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 30px;
    line-height: 1.3;
}

.modal-content p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.9;
}

.modal-content blockquote {
    background: linear-gradient(
        135deg,
        var(--light) 0%,
        var(--gray-light) 100%
    );
    border-left: 5px solid var(--accent);
    padding: 30px 35px;
    margin: 30px 0;
    border-radius: 0 16px 16px 0;
    position: relative;
}

.modal-content blockquote::before {
    content: "\f10d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
    color: var(--accent);
    opacity: 0.5;
}

.modal-content blockquote p {
    font-style: italic;
    color: var(--dark);
    font-size: 1.15rem;
    margin: 0;
    padding-left: 20px;
}

.modal-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 30px 0;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

.modal-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-light);
}

.modal-share-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-share-left span {
    font-weight: 600;
    color: var(--dark);
}

/* Back to list button */
.back-to-list {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.back-to-list:hover {
    background: var(--dark);
    transform: translateX(-5px);
}

.back-to-list i {
    transition: transform 0.3s ease;
}

.back-to-list:hover i {
    transform: translateX(-5px);
}

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

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive */
@media (max-width: 1024px) {
    .primary-news-grid {
        grid-template-columns: 1fr;
    }

    .primary-news-image {
        min-height: 400px;
    }

    .secondary-news-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-header {
        padding: 60px 20px 40px;
    }

    .primary-news-content {
        padding: 40px 30px;
    }

    .primary-news-content h2 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .secondary-news-grid,
    .tertiary-news-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .modal-overlay {
        padding: 20px 15px;
    }

    .modal-container {
        border-radius: 20px;
    }

    .modal-image {
        height: 280px;
        border-radius: 20px 20px 0 0;
    }

    .modal-content {
        padding: 30px 25px;
    }

    .modal-content h2 {
        font-size: 1.6rem;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
    }

    .modal-share {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-nav {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .primary-news-image {
        min-height: 300px;
    }

    .news-badge {
        top: 20px;
        left: 20px;
        padding: 8px 16px;
        font-size: 12px;
    }

    .news-date {
        bottom: 20px;
        left: 20px;
        padding: 10px 16px;
        font-size: 14px;
    }

    .modal-content blockquote {
        padding: 25px 20px;
    }
}

/* Hidden class for filtering */
.hidden {
    display: none !important;
}
