/*
Theme Name: AOIB ONG Theme
Theme URI: https://www.ongaoib.org
Author: Expert Webmaster
Author URI: https://www.ongaoib.org
Description: Thème professionnel pour l'ONG AOIB - Association des Organisations et Initiatives pour le Bien-être. Design moderne, épuré, avec slider d'images sur la page d'accueil.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aoib-theme
Tags: one-column, two-columns, custom-colors, custom-menu, featured-images, post-thumbnails, responsive-layout, rtl-language-support, translation-ready
*/

/* ============================================
   CSS VARIABLES
============================================ */
:root {
  --color-primary:     #1A6B3C;   /* Vert Afrique profond */
  --color-primary-dark:#0F4526;
  --color-accent:      #E8A020;   /* Or chaleureux */
  --color-accent-dark: #C4831A;
  --color-dark:        #12201A;
  --color-text:        #2C3E35;
  --color-text-light:  #5A7065;
  --color-bg:          #F7F9F7;
  --color-white:       #FFFFFF;
  --color-border:      #D8E8DC;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', 'Helvetica Neue', sans-serif;

  --radius: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.16);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

/* ============================================
   RESET & BASE
============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-dark);
  line-height: 1.25;
}

p { margin-bottom: 1rem; }
ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.label-tag {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 40px;
  margin-bottom: 16px;
}

/* ============================================
   BUTTONS
============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(26, 107, 60, 0.3);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 107, 60, 0.4);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(232, 160, 32, 0.3);
}

.btn-accent:hover {
  background: var(--color-accent-dark);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.7);
}

.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}

/* ============================================
   TOP BAR
============================================ */
.topbar {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.8);
  font-size: 0.82rem;
  padding: 8px 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar a { color: rgba(255,255,255,0.8); }
.topbar a:hover { color: var(--color-accent); }

.topbar-social {
  display: flex;
  gap: 10px;
}

.topbar-social a {
  width: 26px;
  height: 26px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

/* ============================================
   HEADER / NAV
============================================ */
.site-header {
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.logo-icon {
  width: 52px;
  height: 52px;
  background: var(--color-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.logo-text .org-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
}

.logo-text .org-tagline {
  font-size: 0.72rem;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
}

/* Navigation */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  display: block;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  border-radius: var(--radius);
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform var(--transition);
  border-radius: 1px;
}

.main-nav a:hover, .main-nav a.active {
  color: var(--color-primary);
}

.main-nav a:hover::after, .main-nav a.active::after {
  transform: scaleX(1);
}

.nav-cta {
  flex-shrink: 0;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ============================================
   HERO SLIDER
============================================ */
.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--color-dark);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active { opacity: 1; }

.slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 6s ease;
}

.slide.active .slide-bg { transform: scale(1); }

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 69, 38, 0.82) 0%,
    rgba(15, 69, 38, 0.45) 50%,
    rgba(0,0,0,0.3) 100%
  );
}

.slide-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.slide-content .container { width: 100%; }

.slide-text {
  max-width: 620px;
  color: white;
}

.slide-text .label-tag {
  background: var(--color-accent);
  animation: slideUp 0.6s ease 0.2s both;
}

.slide.active .slide-text * { animation-play-state: running; }

.slide-text h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: white;
  margin-bottom: 18px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  animation: slideUp 0.6s ease 0.3s both;
  animation-play-state: paused;
}

.slide.active .slide-text h1 { animation-play-state: running; }

.slide-text p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 28px;
  animation: slideUp 0.6s ease 0.4s both;
  animation-play-state: paused;
}

.slide.active .slide-text p { animation-play-state: running; }

.slide-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: slideUp 0.6s ease 0.5s both;
  animation-play-state: paused;
}

.slide.active .slide-buttons { animation-play-state: running; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Slider controls */
.slider-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
  align-items: center;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.slider-dot.active {
  background: var(--color-accent);
  transform: scale(1.3);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.4);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}

.slider-arrow:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.slider-arrow.prev { left: 24px; }
.slider-arrow.next { right: 24px; }

/* ============================================
   STATS BAR
============================================ */
.stats-bar {
  background: var(--color-primary);
  padding: 32px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-item {
  text-align: center;
  color: white;
  padding: 16px;
  border-right: 1px solid rgba(255,255,255,0.15);
}

.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  margin-top: 6px;
  display: block;
}

/* ============================================
   ABOUT SECTION
============================================ */
.about-section {
  padding: 100px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image-wrap {
  position: relative;
}

.about-image-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
  background: var(--color-border);
}

.about-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-badge {
  position: absolute;
  bottom: -24px;
  right: -24px;
  background: var(--color-accent);
  color: white;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.about-badge strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
}

.about-badge span { font-size: 0.8rem; }

.about-content .label-tag { display: block; width: fit-content; }

.about-content h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 12px 0 20px;
}

.about-content p { color: var(--color-text-light); line-height: 1.8; }

.values-list {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.value-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}

.value-icon {
  width: 32px;
  height: 32px;
  background: rgba(26, 107, 60, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ============================================
   PROGRAMS SECTION
============================================ */
.programs-section {
  padding: 100px 0;
  background: var(--color-dark);
}

.programs-section .section-header h2 { color: white; }
.programs-section .section-header p  { color: rgba(255,255,255,0.65); }

.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.program-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}

.program-card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.3);
}

.program-card:hover::before { transform: scaleX(1); }

.program-icon {
  width: 60px;
  height: 60px;
  background: rgba(26, 107, 60, 0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 24px;
  border: 1px solid rgba(26, 107, 60, 0.4);
}

.program-card h3 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.program-card p {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.program-link {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.program-link:hover { color: white; gap: 10px; }

/* ============================================
   NEWS SECTION
============================================ */
.news-section {
  padding: 100px 0;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

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

.news-card-img {
  aspect-ratio: 16/9;
  background: var(--color-border);
  overflow: hidden;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card-img img { transform: scale(1.05); }

.news-card-body {
  padding: 24px;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--color-text-light);
}

.news-category {
  background: rgba(26, 107, 60, 0.1);
  color: var(--color-primary);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.news-card h3 a { color: var(--color-dark); }
.news-card h3 a:hover { color: var(--color-primary); }

.news-card p {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.author-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.author-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ============================================
   CALL TO ACTION
============================================ */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(232, 160, 32, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.cta-text h2 {
  color: white;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 12px;
}

.cta-text p {
  color: rgba(255,255,255,0.8);
  max-width: 500px;
  margin: 0;
}

.cta-buttons {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ============================================
   PARTNERS
============================================ */
.partners-section {
  padding: 70px 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
}

.partners-section .section-header {
  margin-bottom: 40px;
}

.partners-section .section-header h2 {
  font-size: 1.4rem;
  color: var(--color-text-light);
  font-weight: 400;
}

.partners-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.partner-logo {
  height: 48px;
  opacity: 0.45;
  filter: grayscale(100%);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text-light);
  border: 2px solid var(--color-border);
  padding: 8px 20px;
  border-radius: var(--radius);
}

.partner-logo:hover {
  opacity: 1;
  filter: none;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ============================================
   FOOTER
============================================ */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.75);
  padding-top: 70px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .logo-icon { width: 46px; height: 46px; font-size: 1.1rem; }
.footer-brand .org-name  { color: white; }
.footer-brand .org-tagline { color: rgba(255,255,255,0.5); }

.footer-brand .site-logo { margin-bottom: 18px; }

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--color-primary);
  color: white;
}

.footer-col h4 {
  color: white;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-col ul a::before {
  content: '›';
  color: var(--color-accent);
  font-size: 1.1rem;
}

.footer-col ul a:hover { color: white; padding-left: 4px; }

.contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.contact-icon {
  width: 32px;
  height: 32px;
  background: rgba(26, 107, 60, 0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex-shrink: 0;
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.83rem;
  color: rgba(255,255,255,0.4);
}

.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: var(--color-accent); }

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
  .programs-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
  .about-grid    { gap: 48px; }
}

@media (max-width: 768px) {
  .topbar { display: none; }

  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 280px;
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
    transition: right var(--transition);
    z-index: 2000;
    padding: 80px 24px 24px;
  }

  .main-nav.open { right: 0; }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .main-nav a { font-size: 1rem; padding: 12px 0; }

  .nav-cta { display: none; }

  .hero-slider { height: 480px; }

  .slide-text h1 { font-size: 1.8rem; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item  { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); }

  .about-grid    { grid-template-columns: 1fr; }
  .about-badge   { bottom: -16px; right: 16px; }
  .values-list   { grid-template-columns: 1fr; }

  .programs-grid { grid-template-columns: 1fr; }
  .news-grid     { grid-template-columns: 1fr; }

  .cta-inner { flex-direction: column; text-align: center; }
  .cta-buttons { justify-content: center; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .slider-arrow { display: none; }
}

@media (max-width: 480px) {
  .hero-slider { height: 400px; }
  .slide-buttons { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
