/* Modern News Website Design
   Inspired by leading news platforms
   Fully responsive and accessible */

/* CSS Variables - Easy customization */
:root {
    --primary-color: #0a1929;
    --secondary-color: #1e3a5f;
    --accent-color: #e63946;
    --text-dark: #1e1e2f;
    --text-light: #5a5a7a;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
    font-size: 16px;
}

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

/* Modern Header */
.modern-header {
    background: var(--primary-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.site-brand {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.site-name {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    font-family: var(--font-serif);
}

.site-brand .site-name a {
    color: white;
    text-decoration: none;
}

.current-date {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-form input {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    width: 200px;
    font-size: 0.9rem;
}

.search-form button {
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form button:hover {
    background: #c53030;
}

/* Modern Navigation */
.modern-nav {
    background: var(--secondary-color);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-menu {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    list-style: none;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.1);
}

/* Breaking News Ticker */
.breaking-news {
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-content {
    display: inline-block;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Hero Section - Featured Article */
.hero-section {
    margin: 2rem 0;
}

.hero-article {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-md);
}

.hero-image {
    position: relative;
    height: 500px;
    overflow: hidden;
}

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

.hero-article:hover .hero-image img {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
}

.hero-category {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--font-serif);
}

.hero-title a {
    color: white;
    text-decoration: none;
}

.hero-meta {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Grid Layout for News */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* News Cards */
.news-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-color);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    font-family: var(--font-serif);
}

.card-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.card-title a:hover {
    color: var(--accent-color);
}

.card-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.read-more:hover {
    gap: 0.5rem;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0 1.5rem;
    position: relative;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-serif);
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
}

.view-all {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

/* Category Layout - Rubrique Page */
.category-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 20px;
    margin-bottom: 2rem;
    text-align: center;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--font-serif);
}

.category-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Article Page */
.article-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 20px;
}

.article-header {
    text-align: center;
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--font-serif);
    line-height: 1.3;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.article-author {
    font-weight: 600;
}

.article-featured-image {
    margin: 2rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    font-family: var(--font-serif);
}

.article-content h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.article-content a:hover {
    border-bottom-color: var(--accent-color);
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    border-left: 4px solid var(--accent-color);
    background: #f1f5f9;
    font-style: italic;
    font-size: 1.2rem;
    font-family: var(--font-serif);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
}

.widget {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.popular-posts {
    list-style: none;
}

.popular-posts li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.popular-posts a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    display: block;
}

.popular-posts a:hover {
    color: var(--accent-color);
}

/* Footer */
.modern-footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.9);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    background: rgba(0,0,0,0.3);
    padding: 1.5rem 20px;
    margin-top: 3rem;
    text-align: center;
    color: rgba(255,255,255,0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-form input {
        width: 150px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
    }
    
    .hero-image {
        height: 350px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}