/* ==========================================================================
   CACSUP Sénégal - Feuille de Style principale (Style Bleu Nuit #0F2A4A & Vert #2E7D32)
   ========================================================================== */

:root {
    --primary-color: #0F2A4A;       /* Bleu Nuit Officiel */
    --primary-hover: #07192E;       /* Bleu Nuit Sombre */
    --primary-light: #EBF3FA;      /* Bleu Nuit Très Clair */
    --secondary-color: #1E5080;     /* Bleu Nuit Secondaire */
    --accent-color: #0077B6;        /* Bleu Vif d'Accentuation */
    --green-ticker: #2E7D32;        /* Vert Écologie pour la Bande d'Annonces */
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --bg-light: #F8FAFC;
    --border-color: #E2E8F0;
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Page wrapper for sticky footer */
.main-wrapper {
    flex: 1;
}

/* ==========================================================================
   Header Statique Style OceanWP - Logo & Slogan
   ========================================================================== */

.top-header {
    padding: 25px 0;
    background-color: #ffffff;
    border-bottom: 1px solid #E2E8F0;
}

.site-logo-img {
    max-height: 120px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.site-logo-img:hover {
    transform: scale(1.02);
}

.site-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.site-slogan {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin: 8px 0 0 0;
    letter-spacing: 0.2px;
}

/* Navigation Bar Bleu Nuit Full-Width (#0F2A4A) */
.main-navbar {
    background-color: var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(15, 42, 74, 0.2);
    padding: 0;
}

.main-navbar .nav-link {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 15px 20px !important;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    background-color: var(--primary-hover);
    color: #38BDF8 !important;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
}
.navbar-toggler-icon {
    filter: invert(1);
}

/* ==========================================================================
   Hero / Banner avec Recherche Centrée
   ========================================================================== */

.hero-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(7, 25, 46, 0.72), rgba(15, 42, 74, 0.82)), url('../../uploads/hero-banner.jpg');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 95px 20px 75px 20px;
    text-align: center;
    margin-bottom: 0; /* Attaché à la bande verte */
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    text-transform: uppercase;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.hero-sub {
    font-size: 1.25rem;
    margin-bottom: 35px;
    opacity: 0.95;
    font-weight: 300;
}

.hero-search-box {
    max-width: 680px;
    margin: 0 auto;
}

.hero-search-input {
    border-radius: 50px 0 0 50px !important;
    padding: 15px 25px;
    font-size: 1.1rem;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-search-btn {
    border-radius: 0 50px 50px 0 !important;
    padding: 15px 35px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: background 0.3s ease;
}

.hero-search-btn:hover {
    background-color: #0284C7;
    color: white;
}

/* ==========================================================================
   Bande Verte de Texte Défilant sous le Hero (Annonces Rapides)
   ========================================================================== */

.ticker-wrapper {
    background-color: var(--green-ticker);
    color: #ffffff;
    padding: 12px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-bottom: 45px;
    border-bottom: 3px solid #1B5E20;
}

.ticker-badge {
    background-color: #154314;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 7px 16px;
    border-radius: 50px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-right: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    display: inline-flex;
    align-items: center;
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.ticker-text {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-anim 28s linear infinite;
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.ticker-wrapper:hover .ticker-text {
    animation-play-state: paused; /* Pause lors du survol de la souris */
}

@keyframes ticker-anim {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* ==========================================================================
   Cartes d'articles Responsive
   ========================================================================== */

.card-article {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-article:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(15, 42, 74, 0.12);
}

.card-article-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    background-color: var(--primary-light);
}

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

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

.badge-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.card-article-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-article-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-article-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 12px;
}

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

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

.card-article-excerpt {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 18px;
    flex: 1;
    text-align: justify;
}

.btn-read-more {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.btn-read-more:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* ==========================================================================
   Section 2 Colonnes : Article Principal (2/3) + Galerie (1/3)
   ========================================================================== */

.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 25px;
    position: relative;
}

.main-featured-article {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(15, 42, 74, 0.06);
}

.main-featured-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Contenu des pages et des articles en TEXTE JUSTIFIÉ */
.justified-text,
.article-content,
.page-content {
    text-align: justify !important;
    text-justify: inter-word;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
}

.page-content img,
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

/* Grille Galerie (Colonne de droite) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* ==========================================================================
   Footer Statique - Bleu Nuit Sombre
   ========================================================================== */

.site-footer {
    background-color: #07192E;
    color: #94A3B8;
    padding-top: 55px;
    padding-bottom: 25px;
    margin-top: 60px;
    border-top: 5px solid var(--accent-color);
}

.site-footer h5 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-color);
    padding-left: 12px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #CBD5E1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #38BDF8;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 22px;
    margin-top: 45px;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.6rem;
    }
    .hero-banner {
        padding: 55px 15px 45px 15px;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .ticker-badge {
        font-size: 0.75rem;
        padding: 5px 10px;
        margin-right: 10px;
    }
}
