/*
Theme Name:  AES Alerte
Theme URI:   https://aesalerte.com
Author:      AES Alerte
Description: Thème officiel du média AES Alerte – L'actualité du Sahel. Design dark navy/or, ticker, monetisation intégrée.
Version:     1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License:     Proprietary
Text Domain: aesalerte
Tags:        news, dark, magazine, mobile-first, french, africa
*/

/* ── VARIABLES ── */
:root {
  --navy:       #0d1b3e;
  --navy-mid:   #122350;
  --gold:       #c9921a;
  --gold-light: #e5a820;
  --gold-pale:  #f0c040;
  --white:      #f5f3ee;
  --gray:       #a8a99e;
  --dark:       #080f22;
  --green:      #1a7a4a;
}

/* ── RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--navy); color: var(--white); font-family: 'Source Sans 3', sans-serif; overflow-x: hidden; }

/* ── HEADER ── */
header { background: var(--dark); border-bottom: 1px solid rgba(201,146,26,0.25); position: sticky; top: 0; z-index: 100; }
.header-top { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 56px; }
.logo { font-family: 'Playfair Display', serif; font-size: 1.55rem; font-weight: 900; letter-spacing: -0.5px; line-height: 1; }
.logo a { text-decoration: none; color: inherit; }
.logo span.alerte { color: var(--white); }
.logo span.aes    { color: var(--gold); margin-left: 6px; }
.header-actions { display: flex; align-items: center; gap: 14px; color: var(--white); }
.header-actions span { font-size: 0.78rem; font-weight: 700; letter-spacing: 1px; cursor: pointer; opacity: 0.85; }
.header-actions svg  { cursor: pointer; opacity: 0.85; }
.btn-subscribe-mini {
  background: var(--gold); color: var(--dark); border: none;
  padding: 6px 13px; border-radius: 4px; font-size: 0.72rem;
  font-weight: 800; letter-spacing: 0.5px; cursor: pointer;
  font-family: 'Source Sans 3', sans-serif; white-space: nowrap;
}
.hamburger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; }

/* ── TICKER ── */
.ticker { background: var(--gold); color: var(--dark); display: flex; align-items: center; overflow: hidden; height: 34px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.5px; }
.ticker-label { flex-shrink: 0; background: var(--dark); color: var(--gold); padding: 0 14px; height: 100%; display: flex; align-items: center; gap: 6px; font-size: 0.72rem; letter-spacing: 1.2px; text-transform: uppercase; }
.ticker-track { white-space: nowrap; animation: ticker 28s linear infinite; padding-left: 30px; }
.ticker-track span { margin: 0 40px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── HERO ── */
.hero { position: relative; height: 92vw; max-height: 560px; overflow: hidden; display: flex; align-items: flex-end; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,15,34,0.95) 30%, rgba(8,15,34,0.35) 65%, transparent 100%); }
.hero-content { position: relative; z-index: 1; padding: 0 20px 32px; width: 100%; }
.hero-tag { display: inline-block; background: var(--gold); color: var(--dark); font-size: 0.68rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: 4px 10px; border-radius: 3px; margin-bottom: 12px; animation: fadeUp .6s ease both; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(1.7rem, 7vw, 2.4rem); font-weight: 900; line-height: 1.12; margin-bottom: 12px; animation: fadeUp .7s ease .1s both; }
.hero-sub { font-size: 0.9rem; font-weight: 400; line-height: 1.5; color: rgba(245,243,238,0.82); margin-bottom: 20px; animation: fadeUp .7s ease .2s both; }
.hero-btns { display: flex; gap: 10px; animation: fadeUp .7s ease .3s both; }
.btn-gold { background: var(--gold); color: var(--dark); border: none; padding: 10px 20px; font-family: 'Source Sans 3', sans-serif; font-size: 0.85rem; font-weight: 700; border-radius: 4px; cursor: pointer; transition: background .2s; text-decoration: none; display: inline-block; }
.btn-gold:hover { background: var(--gold-pale); }
.btn-outline { background: transparent; color: var(--white); border: 1.5px solid rgba(245,243,238,0.45); padding: 10px 20px; font-family: 'Source Sans 3', sans-serif; font-size: 0.85rem; font-weight: 600; border-radius: 4px; cursor: pointer; display: flex; align-items: center; gap: 7px; transition: border-color .2s; }
@keyframes fadeUp { from { opacity:0; transform: translateY(18px); } to { opacity:1; transform: translateY(0); } }

/* ── BANNER AD ── */
.ad-banner { margin: 0; padding: 10px 20px; background: rgba(8,15,34,0.7); border-top: 1px solid rgba(201,146,26,0.15); border-bottom: 1px solid rgba(201,146,26,0.15); display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; position: relative; }
.ad-label { position: absolute; top: 4px; right: 8px; font-size: 0.55rem; color: var(--gray); letter-spacing: 0.8px; text-transform: uppercase; }
.ad-banner-img { width: 60px; height: 40px; border-radius: 4px; object-fit: cover; background: linear-gradient(135deg,#1a4a7a,#0d1b3e); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.ad-banner-img img { width: 100%; height: 100%; object-fit: cover; }
.ad-banner-text { flex: 1; }
.ad-banner-text strong { display: block; font-size: 0.82rem; font-weight: 700; color: var(--white); }
.ad-banner-text span  { font-size: 0.7rem; color: var(--gray); }
.ad-banner-cta { background: var(--gold); color: var(--dark); border: none; padding: 6px 13px; border-radius: 4px; font-size: 0.72rem; font-weight: 800; cursor: pointer; white-space: nowrap; font-family: 'Source Sans 3', sans-serif; }

/* ── SECTIONS ── */
.section { padding: 28px 20px 0; }
.section-title { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; color: var(--white); display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid rgba(201,146,26,0.25); }
.section-title::before { content: ''; width: 4px; height: 20px; background: var(--gold); border-radius: 2px; flex-shrink: 0; }
.see-all { margin-left: auto; font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); cursor: pointer; text-decoration: none; }

/* ── CARDS ── */
.cards-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.cards-scroll::-webkit-scrollbar { display: none; }
.card { flex-shrink: 0; width: 200px; background: var(--navy-mid); border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform .2s; }
.card:hover { transform: translateY(-3px); }
.card-img  { width: 100%; height: 115px; object-fit: cover; background: var(--navy-mid); display: block; }
.card-body { padding: 12px; }
.card-cat  { font-size: 0.63rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold); margin-bottom: 5px; }
.card h3   { font-family: 'Playfair Display', serif; font-size: 0.88rem; font-weight: 700; line-height: 1.25; color: var(--white); margin-bottom: 7px; }
.card-meta { font-size: 0.68rem; color: var(--gray); }
.card.native-ad { border: 1.5px solid rgba(201,146,26,0.4); position: relative; }
.card.native-ad::before { content: 'Sponsorisé'; position: absolute; top: 7px; right: 7px; background: rgba(201,146,26,0.9); color: var(--dark); font-size: 0.55rem; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; z-index: 2; }

/* ── ARTICLE LIST ── */
.article-list { display: flex; flex-direction: column; gap: 0; }
.article-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.07); cursor: pointer; }
.article-item:last-child { border-bottom: none; }
.article-thumb { flex-shrink: 0; width: 80px; height: 60px; border-radius: 5px; object-fit: cover; background: var(--navy-mid); }
.article-info  { flex: 1; }
.article-cat   { font-size: 0.62rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.article-info h4 { font-family: 'Playfair Display', serif; font-size: 0.93rem; font-weight: 700; line-height: 1.25; color: var(--white); margin-bottom: 5px; }
.article-info p  { font-size: 0.72rem; color: var(--gray); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-time    { font-size: 0.64rem; color: var(--gray); margin-top: 5px; }

/* ── ANALYSIS CARD ── */
.analysis-card { background: linear-gradient(135deg, var(--navy-mid) 0%, rgba(13,27,62,0.8) 100%); border: 1px solid rgba(201,146,26,0.3); border-radius: 10px; padding: 20px; margin: 0 20px 28px; cursor: pointer; position: relative; overflow: hidden; }
.analysis-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-pale)); }
.analysis-label  { font-size: 0.65rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.analysis-card h3 { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; line-height: 1.25; margin-bottom: 8px; }
.analysis-card p  { font-size: 0.82rem; color: rgba(245,243,238,0.75); line-height: 1.55; }
.analysis-author  { margin-top: 14px; font-size: 0.72rem; color: var(--gray); display: flex; align-items: center; gap: 8px; }
.author-dot { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }

/* ── NEWSLETTER ── */
.newsletter { margin: 0 20px 28px; background: var(--dark); border-radius: 10px; padding: 22px; border: 1px solid rgba(255,255,255,0.08); text-align: center; }
.newsletter h3 { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.newsletter p  { font-size: 0.76rem; color: var(--gray); margin-bottom: 14px; line-height: 1.45; }
.newsletter-form  { display: flex; gap: 8px; }
.newsletter-input { flex: 1; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; padding: 10px 13px; color: var(--white); font-size: 0.82rem; font-family: 'Source Sans 3', sans-serif; outline: none; }
.newsletter-input::placeholder { color: var(--gray); }
.newsletter-input:focus { border-color: var(--gold); }
.btn-newsletter { background: var(--gold); color: var(--dark); border: none; padding: 10px 16px; border-radius: 6px; font-size: 0.8rem; font-weight: 800; cursor: pointer; font-family: 'Source Sans 3', sans-serif; white-space: nowrap; }

/* ── CATEGORY PILLS ── */
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 18px 20px 0; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat-pill { flex-shrink: 0; padding: 7px 16px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; cursor: pointer; border: 1.5px solid rgba(201,146,26,0.35); color: var(--white); background: transparent; transition: all .2s; }
.cat-pill.active, .cat-pill:hover { background: var(--gold); border-color: var(--gold); color: var(--dark); }

/* ── STATS BAR ── */
.stats-bar { display: flex; gap: 0; background: var(--dark); border-top: 1px solid rgba(201,146,26,0.15); border-bottom: 1px solid rgba(201,146,26,0.15); margin-top: 28px; }
.stat-item { flex: 1; text-align: center; padding: 14px 8px; border-right: 1px solid rgba(255,255,255,0.06); }
.stat-item:last-child { border-right: none; }
.stat-num { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 900; color: var(--gold); display: block; }
.stat-lbl { font-size: 0.62rem; color: var(--gray); letter-spacing: 0.6px; }

/* ── DRAWER ── */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .3s; }
.overlay.open { opacity: 1; pointer-events: all; }
.drawer { position: fixed; top: 0; right: 0; width: 75%; max-width: 300px; height: 100%; background: var(--navy-mid); z-index: 210; transform: translateX(100%); transition: transform .32s cubic-bezier(.4,0,.2,1); padding: 24px 0; display: flex; flex-direction: column; overflow-y: auto; }
.drawer.open { transform: translateX(0); }
.drawer-close { align-self: flex-end; margin-right: 20px; margin-bottom: 20px; width: 32px; height: 32px; border-radius: 6px; background: rgba(255,255,255,0.1); border: none; color: var(--white); font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.drawer nav a { display: block; padding: 14px 24px; color: var(--white); text-decoration: none; font-size: 1.05rem; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.06); transition: color .2s; }
.drawer nav a:hover { color: var(--gold); }
.drawer-logo { padding: 0 24px 20px; border-bottom: 1px solid rgba(201,146,26,0.25); margin-bottom: 6px; font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 900; }
.drawer-logo span { color: var(--gold); }

/* ── FOOTER ── */
footer { background: var(--dark); border-top: 1px solid rgba(201,146,26,0.2); padding: 30px 20px 24px; margin-top: 10px; text-align: center; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 900; margin-bottom: 6px; }
.footer-logo span { color: var(--gold); }
footer .tagline { font-size: 0.78rem; color: var(--gray); margin-bottom: 18px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 18px; }
.footer-links a { color: var(--gray); text-decoration: none; font-size: 0.78rem; transition: color .2s; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 0.68rem; color: rgba(168,169,158,0.5); }
.footer-copy a { color: var(--gold); text-decoration: none; }
.footer-social { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; }
.social-btn { display: flex; flex-direction: column; align-items: center; gap: 7px; text-decoration: none; color: var(--gray); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.3px; transition: color .2s; }
.social-btn:hover { color: var(--gold); }
.social-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s; }
.social-btn:hover .social-icon { background: rgba(201,146,26,0.15); border-color: rgba(201,146,26,0.45); }

/* ── TOAST ── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--gold); color: var(--dark); padding: 10px 22px; border-radius: 20px; font-size: 0.82rem; font-weight: 700; z-index: 500; transition: transform .35s ease; white-space: nowrap; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── SINGLE ARTICLE ── */
.single-content { padding: 24px 20px; max-width: 780px; margin: 0 auto; }
.single-content h1 { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem,5vw,2.2rem); font-weight: 900; line-height: 1.15; margin-bottom: 14px; }
.single-meta { font-size: 0.78rem; color: var(--gray); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.single-featured { width: calc(100% + 40px); margin: 0 -20px 24px; max-height: 320px; object-fit: cover; display: block; }
.single-body { font-size: 0.95rem; line-height: 1.75; color: rgba(245,243,238,0.88); }
.single-body p { margin-bottom: 1.2em; }

/* ── MISC ── */
.spacer { height: 28px; }

/* ── PAGINATION ── */
.pagination { padding: 20px; text-align: center; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; }
.pagination .page-numbers { padding: 8px 14px; border-radius: 6px; background: var(--navy-mid); color: var(--white); text-decoration: none; font-size: 0.82rem; border: 1px solid rgba(201,146,26,0.2); transition: all .2s; }
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--gold); color: var(--dark); border-color: var(--gold); }
