/*
Theme Name: TIAKEDA Webzine
Theme URI: https://tiakeda.com
Author: TIAKEDA Media
Description: Thème webzine éditorial pour TIAKEDA – Le média de l'entrepreneuriat au Mali. Layout magazine, hiérarchie visuelle forte, sections différenciées.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: tiakeda
Tags: news, magazine, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ═══ DESIGN SYSTEM ═══ */
:root {
  --red:       #b40000;
  --red-dark:  #8a0000;
  --red-light: #d4001f;
  --dark:      #1a1a1a;
  --dark2:     #2d2d2d;
  --mid:       #444444;
  --gray:      #888;
  --light:     #e8e6e2;
  --cream:     #f6f4f0;
  --white:     #ffffff;
  --black:     #0d0d0d;

  --font: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max:    1280px;
  --hdr:    56px;
  --cat-h:  44px;

  --r4:  4px;
  --r8:  8px;
  --r12: 12px;

  --s1:  0 1px 4px rgba(0,0,0,.08);
  --s2:  0 4px 16px rgba(0,0,0,.12);
  --s3:  0 8px 32px rgba(0,0,0,.18);

  --t: .22s ease;
}

/* ═══ RESET ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; max-width: 100%; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--cream); color: var(--dark); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img, video, iframe, svg { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font); }
ul, ol { list-style: none; }
p, h1, h2, h3, h4, h5, h6 { word-break: break-word; overflow-wrap: break-word; }

/* ═══ TYPOGRAPHY ═══ */
h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900; line-height: 1.1; letter-spacing: -.02em; }
h2 { font-size: clamp(1.3rem, 2.5vw, 2rem); font-weight: 800; line-height: 1.2; }
h3 { font-size: clamp(1rem, 1.8vw, 1.35rem); font-weight: 700; line-height: 1.3; }
h4 { font-size: 1rem; font-weight: 700; }
p  { font-size: .95rem; color: var(--mid); line-height: 1.7; }

/* ═══ LAYOUT ═══ */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section    { padding: 64px 0; }
.section--dark  { background: var(--dark); }
.section--dark2 { background: var(--dark2); }
.section--black { background: var(--black); }
.section--cream { background: var(--cream); }
.section--white { background: var(--white); }
.section--red   { background: var(--red); }

@media (max-width: 768px) { .container { padding: 0 16px; } .section { padding: 44px 0; } }
@media (max-width: 480px) { .container { padding: 0 14px; } .section { padding: 32px 0; } }

/* ═══ GRIDS ═══ */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 900px)  { .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px)  { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 14px; } }

/* ═══ BADGES / CATÉGORIES ═══ */
.cat-badge {
  display: inline-block; font-size: .65rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  padding: 3px 10px; border-radius: var(--r4);
  background: var(--red); color: var(--white);
  line-height: 1.6;
}
.cat-badge--dark      { background: var(--dark); }
.cat-badge--white     { background: var(--white); color: var(--dark); }
.cat-badge--innovation{ background: #1a6bbd; }
.cat-badge--financement{background: #0f7a5a; }
.cat-badge--business  { background: var(--red); }
.cat-badge--opportunites{ background: #7c3aed; }

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r4);
  font-size: .88rem; font-weight: 700; letter-spacing: .01em;
  border: 2px solid transparent; transition: all var(--t);
  min-height: 44px; white-space: nowrap; cursor: pointer;
}
.btn--red     { background: var(--red);   color: #fff; border-color: var(--red);   }
.btn--red:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-1px); }
.btn--dark    { background: var(--dark);  color: #fff; }
.btn--dark:hover { background: #333; }
.btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn--ghost   { background: transparent; color: var(--dark); border-color: var(--light); }
.btn--ghost:hover { border-color: var(--red); color: var(--red); }
.btn--sm      { padding: 7px 14px; font-size: .8rem; min-height: 36px; }

/* ═══ SECTION HEADERS ═══ */
.sec-hdr { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; gap: 12px; flex-wrap: wrap; }
.sec-hdr__left { display: flex; align-items: center; gap: 12px; }
.sec-hdr__bar  { width: 4px; height: 28px; background: var(--red); border-radius: 2px; flex-shrink: 0; }
.sec-hdr__title{ font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 800; }
.sec-hdr__sub  { font-size: .82rem; color: var(--gray); margin-top: 3px; }
.voir-plus {
  font-size: .78rem; font-weight: 700; color: var(--red);
  text-transform: uppercase; letter-spacing: .08em;
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.voir-plus::after { content: '→'; }
.voir-plus:hover  { gap: 9px; }

/* ═══ ARTICLE CARD ═══ */
.art-card { background: var(--white); border-radius: var(--r8); overflow: hidden; box-shadow: var(--s1); transition: transform var(--t), box-shadow var(--t); display: flex; flex-direction: column; }
.art-card:hover { transform: translateY(-3px); box-shadow: var(--s3); }
.art-card__img { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.art-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.art-card:hover .art-card__img img { transform: scale(1.04); }
.art-card__badge { position: absolute; top: 10px; left: 10px; }
.art-card__read-time { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: .68rem; font-weight: 600; padding: 2px 7px; border-radius: 3px; }
.art-card__body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.art-card__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .72rem; color: var(--gray); }
.art-card__meta span:not(:last-child)::after { content: '·'; margin-left: 8px; }
.art-card__title { font-size: .98rem; font-weight: 700; line-height: 1.35; margin-bottom: 8px; color: var(--dark); flex: 1; }
.art-card__title a { color: inherit; }
.art-card__title a:hover { color: var(--red); }
.art-card__excerpt { font-size: .8rem; color: var(--gray); line-height: 1.5; }

/* ═══ FEATURED CARD (grand format) ═══ */
.feat-card { position: relative; border-radius: var(--r8); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 440px; }
.feat-card__img { position: absolute; inset: 0; }
.feat-card__img img { width: 100%; height: 100%; object-fit: cover; }
.feat-card__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.3) 50%, transparent 100%); }
.feat-card__body { position: relative; z-index: 1; padding: 24px; }
.feat-card__badge { margin-bottom: 10px; }
.feat-card__title { font-size: clamp(1.1rem, 2.5vw, 1.6rem); font-weight: 900; color: #fff; line-height: 1.2; margin-bottom: 10px; letter-spacing: -.02em; }
.feat-card__title a { color: inherit; }
.feat-card__meta { font-size: .72rem; color: rgba(255,255,255,.65); display: flex; gap: 8px; align-items: center; }

/* ═══ PORTRAIT CARD ═══ */
.port-card { text-align: center; transition: transform var(--t); }
.port-card:hover { transform: translateY(-4px); }
.port-card__photo { width: 100%; aspect-ratio: 1/1; border-radius: var(--r8); overflow: hidden; margin-bottom: 12px; background: var(--light); position: relative; }
.port-card__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.port-card:hover .port-card__photo img { transform: scale(1.06); }
.port-card__photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.3) 0%, transparent 50%); border-radius: var(--r8); opacity: 0; transition: opacity var(--t); }
.port-card:hover .port-card__photo::after { opacity: 1; }
.port-card__name { font-size: .9rem; font-weight: 700; margin-bottom: 2px; }
.port-card__name a { color: var(--dark); }
.port-card__role { font-size: .72rem; color: var(--red); font-weight: 600; margin-bottom: 2px; }
.port-card__co   { font-size: .7rem; color: var(--gray); }

/* ═══ VIDEO CARD ═══ */
.vid-card { border-radius: var(--r8); overflow: hidden; background: var(--dark2); box-shadow: var(--s2); transition: transform var(--t), box-shadow var(--t); }
.vid-card:hover { transform: translateY(-3px); box-shadow: var(--s3); }
.vid-card__thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.vid-card__thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .8; transition: opacity .3s, transform .4s; }
.vid-card:hover .vid-card__thumb img { opacity: 1; transform: scale(1.03); }
.vid-card__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.vid-card__play-btn { width: 52px; height: 52px; background: rgba(180,0,0,.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: transform .2s, background .2s; }
.vid-card:hover .vid-card__play-btn { transform: scale(1.1); background: var(--red); }
.vid-card__play-icon { width: 0; height: 0; border-style: solid; border-width: 9px 0 9px 16px; border-color: transparent transparent transparent #fff; margin-left: 4px; }
.vid-card__dur { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.8); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.vid-card__label { position: absolute; top: 10px; left: 10px; font-size: .62rem; font-weight: 700; text-transform: uppercase; color: rgba(255,255,255,.7); letter-spacing: .08em; background: rgba(0,0,0,.5); padding: 2px 7px; border-radius: 3px; }
.vid-card__body { padding: 14px 16px 18px; }
.vid-card__cat  { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--red); margin-bottom: 5px; }
.vid-card__title { font-size: .9rem; font-weight: 700; color: var(--white); line-height: 1.35; }
.vid-card__title a { color: inherit; }

/* ═══ CAROUSEL ═══ */
.tk-carousel { position: relative; }
.tk-carousel__track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; cursor: grab; }
.tk-carousel__track::-webkit-scrollbar { display: none; }
.tk-carousel__track.dragging { cursor: grabbing; scroll-behavior: auto; }
.tk-carousel__slide { flex: 0 0 calc(25% - 12px); scroll-snap-align: start; min-width: 0; }
.tk-carousel--3 .tk-carousel__slide { flex: 0 0 calc(33.333% - 11px); }
.tk-carousel--ports .tk-carousel__slide { flex: 0 0 calc(20% - 13px); }
.tk-carousel__nav { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.tk-carousel__dots { display: flex; gap: 6px; }
.tk-carousel__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--light); border: none; cursor: pointer; padding: 0; transition: background .2s, transform .2s; }
.tk-carousel__dot.active { background: var(--red); transform: scale(1.3); }
.tk-carousel__btns { display: flex; gap: 8px; }
.tk-carousel__btn { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--light); background: var(--white); color: var(--dark); font-size: .9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.tk-carousel__btn:hover { border-color: var(--red); color: var(--red); }
.tk-carousel__btn:disabled { opacity: .3; pointer-events: none; }

@media (max-width: 900px)  { .tk-carousel__slide, .tk-carousel--3 .tk-carousel__slide { flex: 0 0 calc(50% - 8px); } .tk-carousel--ports .tk-carousel__slide { flex: 0 0 calc(33.333% - 11px); } }
@media (max-width: 540px)  { .tk-carousel__slide, .tk-carousel--3 .tk-carousel__slide, .tk-carousel--ports .tk-carousel__slide { flex: 0 0 calc(82vw - 28px); } .tk-carousel__track { gap: 12px; } }

/* ═══ SEARCH ═══ */
.search-bar { position: relative; }
.search-bar input { width: 100%; padding: 12px 44px 12px 16px; border: 1.5px solid var(--light); border-radius: var(--r8); font-size: .9rem; font-family: var(--font); background: var(--white); transition: border-color var(--t), box-shadow var(--t); min-height: 46px; }
.search-bar input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(180,0,0,.08); }
.search-bar input::placeholder { color: #bbb; }
.search-bar__ico { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #bbb; pointer-events: none; }

/* ═══ FILTER TABS ═══ */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-tab { padding: 7px 16px; border-radius: 999px; border: 1.5px solid var(--light); background: var(--white); font-size: .8rem; font-weight: 600; color: var(--mid); cursor: pointer; transition: all var(--t); font-family: var(--font); min-height: 36px; }
.filter-tab:hover, .filter-tab.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ═══ PAGINATION ═══ */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 44px; }
.pagination a, .pagination span { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--r4); font-size: .84rem; font-weight: 600; border: 1.5px solid var(--light); color: var(--dark); background: var(--white); transition: all var(--t); text-decoration: none; }
.pagination a:hover  { border-color: var(--red); color: var(--red); }
.pagination .current { background: var(--red); border-color: var(--red); color: #fff; }

/* ═══ SINGLE ARTICLE ═══ */
.single-layout { display: grid; grid-template-columns: 1fr 300px; gap: 48px; padding: 48px 0; align-items: start; }
.single-sidebar { position: sticky; top: calc(var(--hdr) + var(--cat-h) + 20px); }
.single-sidebar .widget { background: var(--white); border-radius: var(--r8); padding: 20px; margin-bottom: 20px; box-shadow: var(--s1); }
.single-sidebar .widget-title { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--red); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--red); }
.article-content p  { font-size: 1.02rem; line-height: 1.85; margin-bottom: 20px; color: #333; }
.article-content h2 { margin: 36px 0 14px; font-size: clamp(1.2rem, 2vw, 1.6rem); }
.article-content h3 { margin: 28px 0 12px; }
.article-content blockquote { border-left: 4px solid var(--red); padding: 14px 22px; margin: 28px 0; background: rgba(180,0,0,.04); border-radius: 0 var(--r4) var(--r4) 0; font-style: italic; }
.article-content blockquote p { color: var(--dark); font-weight: 500; font-size: 1.05rem; }
.article-cover { width: 100%; aspect-ratio: 16/7; object-fit: cover; border-radius: var(--r8); margin-bottom: 32px; }

@media (max-width: 960px) { .single-layout { grid-template-columns: 1fr; } .single-sidebar { position: static; } }

/* ═══ BREADCRUMB ═══ */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: .76rem; color: var(--gray); margin-bottom: 18px; }
.breadcrumb a { color: var(--gray); } .breadcrumb a:hover { color: var(--red); }

/* ═══ MISC ═══ */
.no-content { text-align: center; padding: 48px 20px; background: var(--cream); border-radius: var(--r8); color: var(--gray); }
.no-content__icon { font-size: 2.5rem; margin-bottom: 10px; }
.no-content p { font-size: .92rem; }

/* ═══ MOBILE HERO TITLE BREAKS ═══ */
.hbr { display: inline; }
@media (max-width: 768px) { .hbr { display: block; } }
