/* Variables CSS */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #d97706;
    --accent-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --text-color: #374151;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --danger-color: #ef4444;
}

/* Fonts */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* Header Top */
.header-top {
    background: var(--dark-color);
    color: white;
    font-size: 0.875rem;
}

.header-info i {
    color: var(--accent-color);
    margin-right: 5px;
}

.social-links a {
    color: white;
    margin-left: 15px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* Navbar - OPTIMISÉ POUR AFFICHER TOUT LE MENU */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.navbar.sticky-top {
    transition: all 0.3s ease;
}

.navbar-brand h2 {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

.navbar-brand i {
    color: var(--accent-color);
    font-size: 1rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem !important;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--accent-color) !important;
    transform: translateY(-2px);
}

.navbar-nav {
    gap: 0.2rem;
}

.form-control {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
}

.btn-search {
    background: var(--accent-color);
    color: white;
    border: none;
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
}

.btn-search:hover {
    background: var(--secondary-color);
    color: white;
}

/* Slider */
.slider-section {
    margin-top: 20px;
}

.carousel-item {
    height: 500px;
    position: relative;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    filter: brightness(0.7);
}

.carousel-caption {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 2rem;
    text-align: left;
}

.carousel-caption h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.badge-category,
.badge-category-large {
    background: var(--accent-color);
    color: white;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.badge-category-large {
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
}

/* Article Card */
.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.article-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-image .badge-category {
    position: absolute;
    top: 10px;
    left: 10px;
}

.article-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-meta {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.article-meta span {
    margin-right: 15px;
}

.article-meta i {
    color: var(--accent-color);
    margin-right: 5px;
}

.article-content h4,
.article-content h5 {
    margin-bottom: 0.75rem;
    flex: 1;
}

.article-content h4 a,
.article-content h5 a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s;
}

.article-content h4 a:hover,
.article-content h5 a:hover {
    color: var(--primary-color);
}

.article-content p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.btn-read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s;
}

.btn-read-more:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.btn-read-more i {
    margin-left: 5px;
}

/* Section Title */
.section-title {
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
}

.section-title h3 {
    color: var(--dark-color);
    margin: 0;
}

.section-title i {
    color: var(--accent-color);
    margin-right: 10px;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.widget-title {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.widget-title i {
    color: var(--accent-color);
    margin-right: 8px;
}

/* Trending Articles */
.trending-item {
    display: flex;
    gap: 15px;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-number {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.trending-content h6 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.trending-content h6 a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s;
}

.trending-content h6 a:hover {
    color: var(--primary-color);
}

.trending-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Categories List */
.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
    background: var(--light-color);
}

.category-item:hover,
.category-item.active {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    color: white;
}

.newsletter-widget .widget-title {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Article Detail */
.article-detail {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-title {
    font-size: 2.25rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    color: #6b7280;
    font-size: 0.95rem;
}

.meta-item i {
    color: var(--accent-color);
    margin-right: 8px;
}

.article-featured-image {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Share Buttons */
.share-buttons {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.share-buttons h5 {
    margin-bottom: 1rem;
}

.social-share {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
}

.share-btn i {
    margin-right: 8px;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.telegram {
    background: #0088cc;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

/* Category Header */
.category-header {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.category-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.category-info i {
    color: var(--accent-color);
}

.category-stats span {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer h5 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--accent-color);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.footer-contact i {
    color: var(--accent-color);
    margin-right: 10px;
    width: 20px;
}

.social-links-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s;
}

.social-links-footer a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

/* Contact & About Pages */
.about-section,
.contact-section,
.search-section {
    padding: 3rem 0;
}

.about-text h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.values-list {
    list-style: none;
    padding: 0;
}

.values-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.values-list i {
    color: var(--success-color);
    margin-right: 10px;
}

.cta-box {
    background: var(--light-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    margin: 0.5rem;
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.contact-form-wrapper,
.search-form-large {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.contact-box {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.contact-box i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-item {
        height: 350px;
    }

    .carousel-caption h2 {
        font-size: 1.5rem;
    }

    .article-title {
        font-size: 1.75rem;
    }

    .category-info h1 {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.article-card {
    animation: fadeInUp 0.5s ease-out;
}


/* =========================================
   NOUVELLES FONCTIONNALITÉS 
   (Flash Info, Widget Visiteurs, Blocs Sociaux)
   ========================================= */

/* 1. Flash Info Styles */
.flash-info-container {
    border-bottom: 2px solid var(--primary-color);
}

.flash-label {
    white-space: nowrap;
    font-size: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.flash-ticker-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* Essential: hide overflow */
}

.flash-ticker {
    display: inline-flex;
    /* content-driven width */
    align-items: center;
    white-space: nowrap;
    animation: marquee 40s linear infinite;
    /* Use will-change for better performance and to ensure browser treats it as composited layer */
    will-change: transform;
}

.flash-ticker:hover {
    animation-play-state: paused;
}

.flash-item {
    flex: 0 0 auto;
    /* Do not shrink */
    margin-right: 3rem;
}

.flash-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.flash-item a:hover {
    color: var(--primary-color) !important;
}

.flash-thumb {
    border: 1px solid var(--border-color);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* 2. Visitor Widget Styles (Inspiré capture) */
.visitor-stats {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.visitor-stat-item {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 1rem;
}

.visitor-icon {
    font-family: monospace;
    font-weight: bold;
    font-size: 0.9rem !important;
    background: linear-gradient(to bottom, #6c757d, #495057);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.visitor-list li {
    font-size: 0.9rem;
    border-bottom: 1px dashed #dee2e6;
    padding-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.visitor-list li:last-child {
    border-bottom: none;
}

.visitor-list li i {
    width: 20px;
    text-align: center;
    margin-right: 5px;
}

/* 3. Social Blocks Styles */
.social-blocks-section {
    border-top: 5px solid var(--accent-color);
}

.social-block {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Specific Social Colors Override if needed */
.bg-darkness {
    background-color: #111 !important;
}