/*
Theme Name:        ColorMag Child — Portail Guinée
Theme URI:         https://portailguinee.com
Description:       Thème enfant ColorMag avec design exclusif Portail Guinée — noir & or
Author:            portailguinee.com
Author URI:        https://portailguinee.com
Template:          colormag
Version:           1.0.0
License:           GNU General Public License v2 or later
Text Domain:       colormag-child

Design: Noir #0D0D0D | Or #C9A84C | Serif Playfair Display
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* ============================================================
   1. RESET GLOBAL & BASE
   ============================================================ */
:root {
  --pg-noir:      #0D0D0D;
  --pg-noir2:     #111111;
  --pg-noir3:     #161616;
  --pg-noir4:     #1A1A1A;
  --pg-or:        #C9A84C;
  --pg-or-light:  #E8D5A0;
  --pg-or-dark:   #9A7A30;
  --pg-blanc:     #FFFFFF;
  --pg-texte:     #EEE8DF;
  --pg-texte2:    #CCC8BF;
  --pg-muted:     #888888;
  --pg-bordure:   #222222;
  --pg-rouge:     #C0392B;
  --pg-vert:      #16A085;
  --pg-bleu:      #1A5276;
  --pg-violet:    #6C3483;
  --pg-orange:    #BA4A00;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--pg-noir) !important;
  color: var(--pg-texte) !important;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif !important;
  font-size: 16px;
  line-height: 1.7;
}

/* ============================================================
   2. TYPOGRAPHIE GLOBALE
   ============================================================ */
h1, h2, h3, h4, h5, h6,
.entry-title, .entry-title a,
.widget-title, .site-title {
  font-family: 'Playfair Display', Georgia, serif !important;
  color: var(--pg-blanc) !important;
  line-height: 1.25;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 700; }

a {
  color: var(--pg-or);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--pg-or-light); }

p {
  color: var(--pg-texte2);
  line-height: 1.8;
  margin-bottom: 1rem;
}

strong { color: var(--pg-texte); }

/* ============================================================
   3. HEADER — BARRE DU HAUT
   ============================================================ */
#cm-masthead,
.cm-masthead,
.site-header,
header#masthead {
  background: var(--pg-noir2) !important;
  border-bottom: 3px solid var(--pg-or) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.6) !important;
  padding: 0 !important;
}

/* Logo */
.site-title a,
.cm-site-title a {
  color: var(--pg-blanc) !important;
  font-family: 'Playfair Display', serif !important;
  font-size: 1.8rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em;
}

.site-description,
.cm-site-tagline {
  color: var(--pg-or) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: 'Source Sans 3', sans-serif !important;
}

/* Logo image */
.custom-logo-link img,
.cm-custom-logo img {
  max-height: 65px !important;
  width: auto !important;
}

/* ============================================================
   4. BARRE DE DATE / TICKER
   ============================================================ */
.cm-breaking-news-section,
.cm-top-bar,
.breaking-news-bar,
#cm-breaking-news {
  background: var(--pg-or) !important;
  color: var(--pg-noir) !important;
}

.cm-breaking-news-section a,
.cm-top-bar a {
  color: var(--pg-noir) !important;
  font-weight: 700;
}

.cm-date, .current-date {
  color: var(--pg-or) !important;
  font-size: 0.75rem;
  font-family: 'Source Sans 3', sans-serif !important;
  letter-spacing: 0.1em;
}

/* ============================================================
   5. NAVIGATION PRINCIPALE
   ============================================================ */
#cm-main-nav,
.cm-main-nav,
nav#site-navigation,
.main-navigation {
  background: var(--pg-noir2) !important;
  border-bottom: 1px solid var(--pg-bordure) !important;
  padding: 0 !important;
}

/* Liens de navigation */
.cm-main-nav ul li a,
.main-navigation ul li a,
nav#site-navigation ul li a {
  color: var(--pg-texte2) !important;
  font-family: 'Source Sans 3', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  padding: 1rem 1.2rem !important;
  transition: all 0.2s ease !important;
}

.cm-main-nav ul li a:hover,
.main-navigation ul li a:hover,
nav#site-navigation ul li a:hover,
.cm-main-nav ul li.current-menu-item > a,
.main-navigation ul li.current-menu-item > a {
  color: var(--pg-or) !important;
  background: transparent !important;
}

/* Sous-menus */
.cm-main-nav ul ul,
.main-navigation ul ul {
  background: var(--pg-noir3) !important;
  border: 1px solid var(--pg-bordure) !important;
  border-top: 2px solid var(--pg-or) !important;
  box-shadow: 0 8px 25px rgba(0,0,0,0.8) !important;
}

.cm-main-nav ul ul li a,
.main-navigation ul ul li a {
  border-bottom: 1px solid var(--pg-bordure) !important;
  padding: 0.7rem 1rem !important;
}

/* ============================================================
   6. ZONE PRINCIPALE & SIDEBAR
   ============================================================ */
#cm-content-area,
.cm-content-area,
.site-content,
#content {
  background: var(--pg-noir) !important;
  padding: 2rem 0 !important;
}

.cm-primary,
#primary,
.content-area {
  background: transparent !important;
}

/* Sidebar */
#cm-sidebar,
.cm-sidebar,
#secondary,
.widget-area {
  background: var(--pg-noir2) !important;
  border-left: 1px solid var(--pg-bordure);
  padding: 1.5rem !important;
}

/* ============================================================
   7. CARDS D'ARTICLES — GRILLE HOMEPAGE
   ============================================================ */
/* Tous les articles en card */
.cm-entry-thumb,
article.type-post,
.cm-small-article,
.cm-medium-article,
.cm-large-article,
.cm-featured-article,
.post-item {
  background: var(--pg-noir2) !important;
  border: 1px solid var(--pg-bordure) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  transition: transform 0.2s ease, border-color 0.2s ease !important;
}

article.type-post:hover,
.cm-small-article:hover,
.cm-medium-article:hover {
  transform: translateY(-3px) !important;
  border-color: var(--pg-or) !important;
}

/* Titre des articles en card */
article.type-post .entry-title,
.cm-entry-title,
h2.entry-title,
h3.entry-title {
  font-family: 'Playfair Display', serif !important;
  font-size: 1.05rem !important;
  color: var(--pg-texte) !important;
  margin: 0.5rem 0 !important;
  line-height: 1.4 !important;
}

article.type-post .entry-title a,
.cm-entry-title a {
  color: var(--pg-texte) !important;
  transition: color 0.2s !important;
}

article.type-post .entry-title a:hover,
.cm-entry-title a:hover {
  color: var(--pg-or) !important;
}

/* Méta (date, auteur, catégorie) */
.entry-meta,
.cm-entry-meta,
.post-meta {
  color: var(--pg-muted) !important;
  font-size: 0.72rem !important;
  font-family: 'Source Sans 3', sans-serif !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.entry-meta a,
.cm-entry-meta a {
  color: var(--pg-or) !important;
}

/* Extrait */
.entry-summary,
.entry-content p:first-child,
.cm-entry-summary {
  color: var(--pg-texte2) !important;
  font-size: 0.92rem !important;
}

/* Bouton "Lire la suite" */
.more-link,
.read-more,
.cm-read-more,
a.more-link {
  background: transparent !important;
  color: var(--pg-or) !important;
  border: 1px solid var(--pg-or) !important;
  border-radius: 3px !important;
  padding: 0.35rem 0.9rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  transition: all 0.2s !important;
  font-family: 'Source Sans 3', sans-serif !important;
  display: inline-block !important;
}

.more-link:hover,
.read-more:hover {
  background: var(--pg-or) !important;
  color: var(--pg-noir) !important;
}

/* ============================================================
   8. BADGES CATÉGORIES (couleurs par rubrique)
   ============================================================ */
.cm-entry-category,
.cat-links a,
.category-badge,
.entry-categories a {
  display: inline-block !important;
  padding: 0.15rem 0.55rem !important;
  border-radius: 2px !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #FFF !important;
  font-family: 'Source Sans 3', sans-serif !important;
  margin-right: 0.3rem;
}

/* Couleurs par catégorie */
.category-actualites .cm-entry-category,
.category-actualites .cat-links a,
[class*="category-actualites"] .entry-categories a { background: #C0392B !important; }

.category-sports .cm-entry-category,
.category-sports .cat-links a { background: #16A085 !important; }

.category-economie .cm-entry-category,
.category-economie .cat-links a { background: #6C3483 !important; }

.category-politiques-publiques .cm-entry-category,
.category-politiques-publiques .cat-links a { background: #1A5276 !important; }

.category-environnement .cm-entry-category,
.category-environnement .cat-links a { background: #1E8449 !important; }

.category-developpement .cm-entry-category,
.category-developpement .cat-links a { background: #BA4A00 !important; }

.category-culture .cm-entry-category,
.category-culture .cat-links a { background: #8B4513 !important; }

/* ============================================================
   9. HERO SECTION HOMEPAGE
   ============================================================ */
.cm-hero-section,
.cm-featured-posts,
#cm-hero,
.featured-content {
  background: linear-gradient(135deg, #1a0a00 0%, #1a1a00 30%, #0D0D0D 70%) !important;
  border-bottom: 2px solid var(--pg-or) !important;
  padding: 2rem 0 !important;
}

.cm-hero-section .entry-title,
.cm-featured-posts .entry-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem) !important;
  font-weight: 900 !important;
}

/* Image featured en hero */
.cm-hero-section .cm-entry-thumb img,
.cm-featured-posts .post-thumbnail img {
  border-radius: 4px !important;
  transition: transform 0.3s ease !important;
}

.cm-hero-section .cm-entry-thumb img:hover {
  transform: scale(1.02) !important;
}

/* ============================================================
   10. ARTICLE PAGE — PAGE COMPLÈTE
   ============================================================ */
.single .site-content,
.single #content {
  background: var(--pg-noir) !important;
}

.single .entry-content {
  color: var(--pg-texte2) !important;
  font-size: 1.05rem !important;
  line-height: 1.85 !important;
}

.single .entry-content p {
  color: var(--pg-texte2);
  margin-bottom: 1.2rem;
}

.single .entry-content p:first-of-type {
  font-size: 1.15rem !important;
  color: var(--pg-texte) !important;
  font-weight: 400;
}

/* En-tête de l'article */
.single .entry-header {
  background: linear-gradient(160deg, #1a1000 0%, #111 60%) !important;
  padding: 2.5rem 2rem !important;
  border-bottom: 3px solid var(--pg-or) !important;
  margin-bottom: 2rem;
}

.single h1.entry-title {
  font-size: clamp(1.8rem, 4vw, 3rem) !important;
  color: #FFF !important;
  margin-bottom: 1rem !important;
  line-height: 1.2 !important;
}

/* Séparateur dans l'article */
.single .entry-content hr {
  border: none !important;
  border-top: 1px solid var(--pg-bordure) !important;
  margin: 2rem 0 !important;
}

/* Blockquote */
.single .entry-content blockquote {
  background: #1a1200 !important;
  border-left: 4px solid var(--pg-or) !important;
  padding: 1.2rem 1.5rem !important;
  border-radius: 0 6px 6px 0 !important;
  font-style: italic !important;
  color: var(--pg-or-light) !important;
  margin: 1.5rem 0 !important;
}

.single .entry-content blockquote p {
  color: var(--pg-or-light) !important;
}

/* Sous-titres dans l'article */
.single .entry-content h2 {
  color: var(--pg-or) !important;
  font-size: 1.3rem !important;
  border-bottom: 1px solid var(--pg-bordure) !important;
  padding-bottom: 0.5rem !important;
  margin: 2rem 0 1rem !important;
}

.single .entry-content h3 {
  color: var(--pg-texte) !important;
  font-size: 1.1rem !important;
  margin: 1.5rem 0 0.8rem !important;
}

/* Image dans l'article */
.single .entry-content img {
  border-radius: 6px !important;
  border: 1px solid var(--pg-bordure) !important;
}

/* ============================================================
   11. WIDGETS SIDEBAR
   ============================================================ */
.widget {
  background: var(--pg-noir2) !important;
  border: 1px solid var(--pg-bordure) !important;
  border-radius: 6px !important;
  padding: 1.2rem !important;
  margin-bottom: 1.5rem !important;
}

.widget-title,
.widgettitle {
  color: var(--pg-blanc) !important;
  font-family: 'Playfair Display', serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  border-bottom: 2px solid var(--pg-or) !important;
  padding-bottom: 0.5rem !important;
  margin-bottom: 1rem !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.widget ul li {
  border-bottom: 1px solid var(--pg-bordure) !important;
  padding: 0.5rem 0 !important;
}

.widget ul li a {
  color: var(--pg-texte2) !important;
  font-size: 0.88rem !important;
  transition: color 0.2s !important;
}

.widget ul li a:hover {
  color: var(--pg-or) !important;
  padding-left: 0.3rem !important;
}

/* Widget Recherche */
.widget_search input[type="search"] {
  background: var(--pg-noir4) !important;
  border: 1px solid var(--pg-bordure) !important;
  color: var(--pg-texte) !important;
  padding: 0.6rem 1rem !important;
  border-radius: 3px !important;
  width: 100% !important;
  font-family: 'Source Sans 3', sans-serif !important;
}

.widget_search input[type="submit"] {
  background: var(--pg-or) !important;
  color: var(--pg-noir) !important;
  border: none !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 3px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  margin-top: 0.5rem !important;
  width: 100% !important;
}

/* ============================================================
   12. PAGINATION
   ============================================================ */
.pagination .page-numbers,
.nav-links a,
.page-numbers a {
  background: var(--pg-noir2) !important;
  border: 1px solid var(--pg-bordure) !important;
  color: var(--pg-texte2) !important;
  padding: 0.5rem 0.9rem !important;
  border-radius: 3px !important;
  font-size: 0.85rem !important;
  transition: all 0.2s !important;
}

.pagination .page-numbers:hover,
.nav-links a:hover,
.pagination .page-numbers.current {
  background: var(--pg-or) !important;
  color: var(--pg-noir) !important;
  border-color: var(--pg-or) !important;
}

/* ============================================================
   13. FOOTER
   ============================================================ */
#colophon,
.site-footer,
footer.site-footer {
  background: #080808 !important;
  border-top: 3px solid var(--pg-or) !important;
  color: var(--pg-muted) !important;
  padding: 3rem 0 1.5rem !important;
}

.site-footer .widget-title {
  color: var(--pg-blanc) !important;
  font-size: 0.9rem !important;
}

.site-footer .widget ul li a {
  color: var(--pg-muted) !important;
}

.site-footer .widget ul li a:hover {
  color: var(--pg-or) !important;
}

.site-info,
.copyright {
  color: var(--pg-muted) !important;
  font-size: 0.78rem !important;
  text-align: center !important;
  border-top: 1px solid var(--pg-bordure) !important;
  padding-top: 1.5rem !important;
  margin-top: 2rem !important;
}

.site-info a {
  color: var(--pg-or) !important;
}

/* ============================================================
   14. FORMULAIRES GÉNÉRAUX
   ============================================================ */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select {
  background: var(--pg-noir4) !important;
  border: 1px solid var(--pg-bordure) !important;
  color: var(--pg-texte) !important;
  border-radius: 3px !important;
  padding: 0.6rem 0.9rem !important;
  font-family: 'Source Sans 3', sans-serif !important;
  transition: border-color 0.2s !important;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--pg-or) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.2) !important;
}

button[type="submit"],
input[type="submit"],
.btn, .button {
  background: var(--pg-or) !important;
  color: var(--pg-noir) !important;
  border: none !important;
  padding: 0.7rem 1.5rem !important;
  border-radius: 3px !important;
  font-weight: 700 !important;
  font-family: 'Source Sans 3', sans-serif !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

button[type="submit"]:hover,
input[type="submit"]:hover {
  background: var(--pg-or-light) !important;
}

/* ============================================================
   15. BARRE DE MENU MOBILE
   ============================================================ */
.cm-menu-toggle,
.menu-toggle,
button.menu-toggle {
  background: var(--pg-noir2) !important;
  color: var(--pg-or) !important;
  border: 1px solid var(--pg-bordure) !important;
  border-radius: 3px !important;
  padding: 0.5rem 0.8rem !important;
}

/* Menu mobile ouvert */
.cm-main-nav.toggled,
.main-navigation.toggled {
  background: var(--pg-noir2) !important;
  border-bottom: 1px solid var(--pg-bordure) !important;
}

/* ============================================================
   16. SECTION "DERNIERS ARTICLES" / GRILLE
   ============================================================ */
.cm-section-title,
.section-title,
.widget-title.cm-widget-title {
  font-family: 'Playfair Display', serif !important;
  color: var(--pg-blanc) !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  border-left: 4px solid var(--pg-or) !important;
  padding-left: 0.8rem !important;
  margin-bottom: 1.5rem !important;
}

/* ============================================================
   17. PAGE 404 / RÉSULTATS VIDES
   ============================================================ */
.error-404 h1,
.no-results h1 {
  color: var(--pg-or) !important;
}

/* ============================================================
   18. BARRE DE PROGRESSION DE LECTURE (bonus UX)
   ============================================================ */
#pg-reading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--pg-or);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* ============================================================
   19. BADGE "EXCLUSIF" / "EN VEDETTE"
   ============================================================ */
.pg-badge-exclusif {
  background: var(--pg-or);
  color: var(--pg-noir);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 0.4rem;
  font-family: 'Source Sans 3', sans-serif;
}

/* ============================================================
   20. SECTION RUBRIQUES — HOMEPAGE
   ============================================================ */
.pg-rubriques {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
  border-top: 1px solid var(--pg-bordure);
  border-bottom: 1px solid var(--pg-bordure);
  margin: 1rem 0;
}

.pg-rubrique-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid;
  font-family: 'Source Sans 3', sans-serif;
}

/* ============================================================
   21. SCROLLBAR CUSTOM
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--pg-noir); }
::-webkit-scrollbar-thumb { background: var(--pg-bordure); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--pg-or); }

/* ============================================================
   22. PRINT
   ============================================================ */
@media print {
  body { background: #fff !important; color: #000 !important; }
  h1, h2, h3 { color: #000 !important; }
  nav, .sidebar, footer { display: none !important; }
}
