/* ==========================================================================
   LE MATIN - STYLES PRINCIPAUX
   ========================================================================== */

/* Variables CSS */
:root {
    --color-primary: #27AE60;
    --color-secondary: #C41E3A;
    --color-dark: #1a1a1a;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-border: #e0e0e0;
    --color-bg: #ffffff;
    --color-bg-light: #f5f5f5;
    --font-primary: 'Merriweather', serif;
    --font-secondary: 'Open Sans', sans-serif;
    --transition: all 0.3s ease;
}

/* SEO / Accessibilité : titre visible pour les moteurs, masqué à l'écran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

body {
    font-family: var(--font-secondary);
    font-size: 15px;
    line-height: 1.55;
    color: var(--color-text);
    background-color: var(--color-bg);
    max-width: 1400px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Top Bar */
.top-bar {
    background: var(--color-bg-light);
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.top-bar-left {
    color: var(--color-text-light);
}

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

.social-links a {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    color: var(--color-text);
    font-size: 14px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

/* Main Header */
.main-header {
    padding: 20px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-toggle {
    font-size: 24px;
    color: var(--color-dark);
    display: none;
}

/* Logo */
.logo a {
    display: flex;
    align-items: baseline;
    font-weight: 900;
    font-size: 36px;
    font-family: var(--font-primary);
}

.logo-le {
    color: var(--color-primary);
}

.logo-matin {
    color: var(--color-dark);
}

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

.logo-ma {
    color: var(--color-dark);
    font-size: 18px;
    margin-left: 2px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-toggle {
    font-size: 20px;
    color: var(--color-text);
}

.newsletter-btn {
    background: var(--color-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.newsletter-btn:hover {
    background: #229954;
    transform: translateY(-2px);
}

.subscribe-btn {
    background: #F39C12;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 700;
    transition: var(--transition);
}

.subscribe-btn:hover {
    background: #E67E22;
    transform: translateY(-2px);
}

/* Navigation */
.main-nav {
    background: var(--color-dark);
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px 0;
}

.nav-menu li a {
    color: white;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.nav-menu li a:hover {
    color: var(--color-primary);
}

/* Search Bar */
.search-bar {
    background: white;
    border-top: 1px solid var(--color-border);
    display: none;
    padding: 20px 0;
}

.search-bar.active {
    display: block;
}

.search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-form input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--color-border);
    border-radius: 5px;
    font-size: 16px;
}

.search-form button {
    padding: 12px 24px;
    background: var(--color-primary);
    color: white;
    border-radius: 5px;
    font-size: 18px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 2000;
    overflow-y: auto;
    transition: var(--transition);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
}

.menu-close {
    font-size: 24px;
    color: var(--color-text);
}

.mobile-menu-content {
    padding: 20px;
}

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.mobile-nav-menu li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.mobile-nav-menu li a:hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
}

.mobile-nav-menu i {
    width: 20px;
    text-align: center;
}

/* Breaking News */
.breaking-news {
    background: var(--color-secondary);
    color: white;
    padding: 12px 0;
}

.breaking-news-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.breaking-label {
    background: white;
    color: var(--color-secondary);
    padding: 5px 15px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.breaking-text {
    flex: 1;
    overflow: hidden;
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */

.main-content {
    padding: 40px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

/* Featured Article */
.featured-article {
    position: relative;
    margin-bottom: 40px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.featured-article .article-image {
    height: 500px;
    overflow: hidden;
}

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

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

.featured-article .article-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 40px 30px;
    color: white;
}

.featured-article .article-title {
    font-family: var(--font-primary);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

.featured-article .article-excerpt {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.article-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.article-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

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

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

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

.article-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-primary);
    color: white;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.article-card-content {
    padding: 20px;
}

.article-card-title {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--color-dark);
}

.article-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: 15px;
}

.article-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--color-text-light);
}

.article-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-card-author img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    background: var(--color-primary);
    color: white;
    padding: 15px 40px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.load-more-btn:hover {
    background: #229954;
    transform: translateY(-2px);
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.widget {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: var(--color-primary);
}

/* Dernière Heure */
.derniere-heure .widget-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.live-news-item {
    padding: 12px;
    border-left: 3px solid var(--color-secondary);
    background: var(--color-bg-light);
    border-radius: 5px;
    transition: var(--transition);
}

.live-news-item:hover {
    background: #ffe6ea;
}

.live-news-time {
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
}

.live-news-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

/* Newsletter Widget */
.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--color-border);
    border-radius: 5px;
    font-size: 14px;
}

.newsletter-form button {
    padding: 12px 20px;
    background: var(--color-primary);
    color: white;
    border-radius: 5px;
    font-size: 18px;
}

/* Weather Widget */
.weather-info h4 {
    font-size: 20px;
    margin-bottom: 15px;
}

.weather-current {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.weather-icon {
    font-size: 48px;
    color: #F39C12;
}

.temperature {
    font-size: 24px;
    font-weight: 700;
}

.weather-forecast {
    padding-top: 15px;
    border-top: 1px solid var(--color-border);
}

.forecast-day {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.forecast-day i {
    color: var(--color-text-light);
    font-size: 20px;
}

/* ==========================================================================
   ARTICLE PAGE
   ========================================================================== */

.article-page {
    padding: 40px 0;
    background: var(--color-bg-light);
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.article-detail {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.breadcrumb {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumb a:hover {
    color: var(--color-primary);
}

.article-header {
    margin-bottom: 30px;
}

.article-category {
    background: var(--color-primary);
    color: white;
    padding: 5px 15px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 20px;
}

.article-title {
    font-family: var(--font-primary);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.author-name {
    font-weight: 700;
    font-size: 16px;
    display: block;
}

.article-date {
    font-size: 14px;
    color: var(--color-text-light);
}

.article-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--color-text-light);
}

.article-stats i {
    color: var(--color-primary);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-bg-light);
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn.facebook:hover { background: #1877f2; color: white; }
.share-btn.twitter:hover { background: #1da1f2; color: white; }
.share-btn.linkedin:hover { background: #0077b5; color: white; }
.share-btn.whatsapp:hover { background: #25d366; color: white; }
.share-btn.copy:hover { background: var(--color-primary); color: white; }

.article-image-container {
    margin: 30px 0;
    border-radius: 10px;
    overflow: hidden;
}

.article-image {
    width: 100%;
    height: auto;
}

/* Contenu article : texte centré, gros caractères, très lisible */
.article-body {
    font-size: 1.5rem;
    line-height: 1.95;
    color: #1a1a1a;
    max-width: 48em;
    overflow-wrap: break-word;
    margin: 0 auto;
    text-align: center;
    min-height: 6em;
}

.article-body p {
    margin-bottom: 1.85em;
    orphans: 2;
    widows: 2;
}

.article-body p:first-of-type {
    font-size: 1.25em;
    line-height: 1.9;
    color: #1a1a1a;
}

.article-body h2,
.article-body h3 {
    font-family: var(--font-primary);
    margin: 1.75em 0 0.6em;
    line-height: 1.3;
    color: inherit;
    text-align: center;
}

.article-body h2 {
    font-size: 1.65rem;
    padding-top: 0.5em;
}

.article-body h3 {
    font-size: 1.4rem;
}

.article-body strong {
    font-weight: 700;
}

.article-body a {
    color: var(--primary-color, #27AE60);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body a:hover {
    text-decoration: none;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid var(--color-border);
}

.tag {
    background: var(--color-bg-light);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    transition: var(--transition);
}

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

.article-footer {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border);
}

.article-footer .article-share {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.article-footer .article-share span {
    font-weight: 600;
    font-size: 16px;
    color: var(--color-text);
}

.article-footer .share-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-bg-light);
    color: var(--color-text);
    transition: var(--transition);
    text-decoration: none;
    border: 2px solid transparent;
}

.article-footer .share-btn:hover {
    transform: translateY(-3px);
    border-color: currentColor;
}

.article-footer .share-btn.facebook { color: #1877f2; }
.article-footer .share-btn.facebook:hover { background: #1877f2; color: white; }

.article-footer .share-btn.twitter { color: #1da1f2; }
.article-footer .share-btn.twitter:hover { background: #1da1f2; color: white; }

.article-footer .share-btn.linkedin { color: #0077b5; }
.article-footer .share-btn.linkedin:hover { background: #0077b5; color: white; }

.article-footer .share-btn.whatsapp { color: #25d366; }
.article-footer .share-btn.whatsapp:hover { background: #25d366; color: white; }

/* Article Sidebar */
.article-sidebar .widget {
    background: white;
    padding: 25px;
}

.author-box .author-profile {
    text-align: center;
}

.author-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
}

.author-box h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.author-box p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-light);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    background: var(--color-dark);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.footer-links a {
    color: #ccc;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #333;
    color: white;
    font-size: 18px;
}

.footer-social a:hover {
    background: var(--color-primary);
    transform: translateY(-3px);
}

.copyright {
    color: #999;
    font-size: 14px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
}
