/*
Theme Name: TIAKEDA
Theme URI: https://tiakeda.com
Author: TIAKEDA Media
Author URI: https://tiakeda.com
Description: Le thème officiel de TIAKEDA – Le média de l'entrepreneuriat au Mali. Informer · Décrypter · Raconter.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: tiakeda
Tags: news, magazine, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* === VARIABLES === */
:root {
  --color-red:       #b40000;
  --color-red-hover: #950000;
  --color-cream:     #f6f4f0;
  --color-dark:      #222222;
  --color-black:     #111111;
  --color-white:     #ffffff;
  --color-gray:      #888888;
  --color-gray-light:#e8e6e2;
  --color-gray-bg:   #f2f0ec;

  --font-main: 'Radnika Next', 'Barlow', 'Helvetica Neue', Arial, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-card: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 8px 32px rgba(0,0,0,0.15);

  --max-width: 1200px;
  --header-height: 64px;

  --transition: 0.25s ease;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--color-cream);
  color: var(--color-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font-main); }
ul, ol { list-style: none; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }
p { font-size: 0.95rem; color: #555; line-height: 1.7; }

/* === LAYOUT UTILITIES === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 72px 0; }
.section--dark { background: var(--color-dark); }
.section--black { background: var(--color-black); }
.section--cream { background: var(--color-cream); }
.section--white { background: var(--color-white); }
.section-title {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  margin-bottom: 6px;
}
.section-subtitle {
  color: var(--color-gray);
  font-size: 0.9rem;
  margin-bottom: 40px;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
}
.voir-tout {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}
.voir-tout:hover { gap: 10px; }
.voir-tout::after { content: '→'; }

/* === BADGE/CATEGORY === */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: var(--color-red);
  color: var(--color-white);
}
.badge--innovation { background: #1a6bbd; }
.badge--financement { background: #0f7a5a; }
.badge--business { background: #b40000; }
.badge--opportunites { background: #8b5e00; }
.badge--portrait { background: var(--color-dark); }

/* === GRID LAYOUTS === */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
}

/* === ARTICLE CARD === */
.article-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.article-card__image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.article-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-card:hover .article-card__image img { transform: scale(1.05); }
.article-card__badge {
  position: absolute;
  top: 12px; left: 12px;
}
.article-card__body {
  padding: 16px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
  color: var(--color-dark);
}
.article-card__excerpt {
  font-size: 0.82rem;
  color: #777;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 12px;
}
.article-card__meta {
  font-size: 0.75rem;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* === PORTRAIT CARD === */
.portrait-card {
  text-align: center;
  transition: transform var(--transition);
}
.portrait-card:hover { transform: translateY(-4px); }
.portrait-card__photo {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--color-gray-light);
}
.portrait-card__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.portrait-card:hover .portrait-card__photo img { transform: scale(1.04); }
.portrait-card__name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 3px;
}
.portrait-card__role {
  font-size: 0.78rem;
  color: var(--color-red);
  font-weight: 600;
  margin-bottom: 3px;
}
.portrait-card__desc {
  font-size: 0.77rem;
  color: #888;
  line-height: 1.4;
}

/* === VIDEO CARD === */
.video-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-dark);
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-card);
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.video-card__thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.video-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}
.video-card:hover .video-card__thumb img { opacity: 0.7; }
.video-card__play {
  position: absolute;
  bottom: 10px; left: 12px;
  background: rgba(180,0,0,0.9);
  color: white;
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
}
.video-card__duration {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(0,0,0,0.75);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}
.video-card__label {
  position: absolute;
  top: 10px; left: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.06em;
}
.video-card__body { padding: 12px 14px 16px; }
.video-card__title {
  color: var(--color-white);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

/* === ENTREPRENEUR CARD === */
.entrepreneur-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}
.entrepreneur-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.entrepreneur-card__photo {
  aspect-ratio: 1/1;
  overflow: hidden;
}
.entrepreneur-card__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.entrepreneur-card:hover .entrepreneur-card__photo img { transform: scale(1.05); }
.entrepreneur-card__body { padding: 18px 20px 22px; }
.entrepreneur-card__sector {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-red);
  margin-bottom: 6px;
}
.entrepreneur-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.entrepreneur-card__role {
  font-size: 0.82rem;
  color: #777;
  margin-bottom: 10px;
}
.entrepreneur-card__desc {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.5;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}
.btn--red {
  background: var(--color-red);
  color: var(--color-white);
  border-color: var(--color-red);
}
.btn--red:hover {
  background: var(--color-red-hover);
  border-color: var(--color-red-hover);
  transform: translateY(-1px);
}
.btn--outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.5);
}
.btn--outline:hover {
  border-color: var(--color-white);
  background: rgba(255,255,255,0.08);
}
.btn--dark {
  background: var(--color-dark);
  color: var(--color-white);
}
.btn--dark:hover { background: #333; }

/* === SEARCH BAR === */
.search-bar {
  position: relative;
  margin-bottom: 28px;
}
.search-bar input {
  width: 100%;
  padding: 14px 48px 14px 18px;
  border: 1.5px solid var(--color-gray-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.9rem;
  background: var(--color-white);
  color: var(--color-dark);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar input:focus {
  outline: none;
  border-color: var(--color-red);
  box-shadow: 0 0 0 3px rgba(180,0,0,0.08);
}
.search-bar input::placeholder { color: #bbb; }
.search-bar__icon {
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  color: #bbb;
  pointer-events: none;
}

/* === FILTER TABS === */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}
.filter-tab {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--color-gray-light);
  background: var(--color-white);
  font-size: 0.82rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-tab:hover { border-color: var(--color-red); color: var(--color-red); }
.filter-tab.active {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-white);
}

/* === PAGE HERO === */
.page-hero {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 64px 0 56px;
}
.page-hero h1 { color: var(--color-white); margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,0.65); font-size: 1rem; }

/* === PAGINATION === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 56px;
}
.pagination a, .pagination span {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid var(--color-gray-light);
  color: var(--color-dark);
  background: var(--color-white);
  transition: all var(--transition);
}
.pagination a:hover { border-color: var(--color-red); color: var(--color-red); }
.pagination .current {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-white);
}

/* === SINGLE ARTICLE === */
.single-article__header { margin-bottom: 40px; }
.single-article__cover {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 36px;
}
.single-article__content {
  max-width: 760px;
  margin: 0 auto;
}
.single-article__content p { font-size: 1rem; line-height: 1.8; margin-bottom: 20px; color: #444; }
.single-article__content h2 { margin: 36px 0 16px; }
.single-article__content h3 { margin: 28px 0 12px; }
.single-article__content blockquote {
  border-left: 4px solid var(--color-red);
  padding: 12px 24px;
  margin: 28px 0;
  background: rgba(180,0,0,0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.single-article__content blockquote p { color: var(--color-dark); font-weight: 500; font-style: italic; }
