/**
 * 💎 CHARI INFO - DESIGN PREMIUM & INSTITUTIONNEL
 * Modernisation globale du site public.
 */

:root {
    --brand-primary: #C0152A;
    --brand-dark: #1a1a1a;
    --brand-gold: #d4af37;
    --text-on-dark: #e0e0e0;
    --font-arabic: 'Cairo', 'Almarai', sans-serif;
}

/* 1. HEADER MODERNISÉ */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 0;
}

.header-main {
    display: flex !important;
    justify-content: flex-end !important; /* Logo à l'extrême droite (RTL) */
    align-items: center;
    gap: 20px;
}

/* Force l'alignement du logo à droite en mode RTL */
[dir="rtl"] .header-main {
    flex-direction: row; /* En RTL, flex-end est déjà à gauche si on ne fait pas attention */
    justify-content: space-between;
}

/* Hauteur logo : alignée sur header-premium (évite conflit 55px vs 64px) */
.site-logo__img {
    max-height: 64px !important;
    height: auto;
    width: auto;
    transition: transform 0.3s ease;
    margin: 0 !important;
}

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

/* 2. NAVIGATION PREMIUM */
.main-nav, 
.main-nav a, 
.nav-link {
    font-family: var(--font-arabic) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.main-nav a:hover {
    color: var(--brand-primary) !important;
    text-shadow: 0 0 1px rgba(192, 21, 42, 0.2);
}

/* 3. CATÉGORIES (SIDEBAR) - DESIGN "CARD" SOMBRE */
.widget_categories ul,
.chariinfo-cat-cards {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cat-item,
.chariinfo-cat-card {
    background: var(--brand-dark);
    border-radius: 8px;
    border: 1px solid #333;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cat-item a,
.chariinfo-cat-card a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-on-dark) !important;
    text-decoration: none !important;
    font-family: var(--font-arabic);
    font-weight: 600;
}

.cat-item:hover,
.chariinfo-cat-card:hover {
    background: #252525;
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Icônes SVG dans les catégories */
.cat-icon {
    width: 20px;
    height: 20px;
    margin-left: 12px; /* Espacement RTL */
    color: var(--brand-primary);
    flex-shrink: 0;
}

[dir="ltr"] .cat-icon {
    margin-left: 0;
    margin-right: 12px;
}

/* Suppression des listes standard si on utilise le widget natif */
.widget_categories ul li {
    padding: 0 !important;
    border: none !important;
}

/* ARCHIVE CATEGORY - CARDS SOMBRES */
.archive-grid .post-card {
    background: var(--brand-dark);
    border: 1px solid #333;
    color: #fff;
}

.archive-grid .post-card__title a {
    color: #fff !important;
}

/* ══ Look moderne : cartes, focus, rendu texte ══ */
:root {
    --premium-radius-card: 12px;
    --premium-shadow-card: 0 2px 16px rgba(13, 13, 13, 0.06);
    --premium-shadow-card-hover: 0 8px 28px rgba(13, 13, 13, 0.12);
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.news-card {
    border-radius: var(--premium-radius-card);
    border-color: rgba(232, 230, 224, 0.9);
    box-shadow: var(--premium-shadow-card);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

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

.hero-main,
.hero-secondary .news-card {
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--premium-shadow-card);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .news-card,
    .news-card:hover,
    .site-logo__img {
        transition: none;
        transform: none;
    }
}

/* ══ Page d’accueil — rythme éditorial ══ */
body.home .section-header__title {
    letter-spacing: -0.02em;
    font-weight: 800;
}

body.home .latest-news .section-header,
body.home .world-band .section-header {
    margin-bottom: var(--space-6);
}

body.home .hero-main__title {
    letter-spacing: -0.02em;
    line-height: 1.2;
}

body.home .homepage .container {
    position: relative;
}
