/* =========================================================
   Blackfit — variables de marque
   Palette inspirée du drapeau sénégalais (vert / or / rouge)
   et de la chaleur des textiles africains (terre cuite, sable).
   C'est le seul fichier à modifier pour changer l'identité visuelle.
   ========================================================= */
:root {
  --bf-green: #0B7A3B;
  --bf-green-deep: #06381F;
  --bf-gold: #F2B705;
  --bf-gold-soft: #F7D774;
  --bf-red: #D7263D;
  --bf-terracotta: #C1502E;
  --bf-sand: #FBF3E3;
  --bf-ink: #14150F;
  --bf-ink-soft: #55534A;
  --bf-card: #FFFFFF;
  --bf-body-bg: var(--bf-sand);
  --bf-body-color: var(--bf-ink);
  --bf-muted: #7A776C;
  --bf-border-radius: 1rem;
  --bf-border-radius-sm: 0.65rem;
  --bf-shadow: 0 1rem 2.5rem rgba(20, 21, 15, 0.08);
  --bf-shadow-hover: 0 1.75rem 3.25rem rgba(11, 122, 59, 0.22);
  --bf-font-heading: "Fraunces", Georgia, serif;
  --bf-font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --bf-ease: cubic-bezier(0.16, 0.84, 0.44, 1);
}

/* Respecte les préférences d'accessibilité : coupe les animations si demandé */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bf-body-bg);
  color: var(--bf-body-color);
  font-family: var(--bf-font-body);
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--bf-font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: var(--bf-green);
  text-decoration: none;
}
a:hover {
  color: var(--bf-green-deep);
}

/* --- Liseré tricolore, signature de marque en haut de page --- */
.flag-stripe {
  display: flex;
  height: 4px;
  width: 100%;
}
.flag-stripe span { flex: 1 1 0; }
.flag-stripe span:nth-child(1) { background-color: var(--bf-green); }
.flag-stripe span:nth-child(2) { background-color: var(--bf-gold); }
.flag-stripe span:nth-child(3) { background-color: var(--bf-red); }

/* ================= Navbar ================= */
.navbar-blackfit {
  background: rgba(20, 21, 15, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-top: 1rem;
  padding-bottom: 1rem;
  transition: padding 0.3s var(--bf-ease), box-shadow 0.3s ease;
}
.navbar-blackfit.is-scrolled {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
.navbar-blackfit .navbar-brand {
  color: #fff;
  font-family: var(--bf-font-heading);
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.navbar-blackfit .navbar-brand .brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bf-gold);
  display: inline-block;
  animation: pulseDot 2.4s ease-in-out infinite;
}
.navbar-blackfit .nav-link {
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  font-weight: 500;
  padding-bottom: 0.35rem;
}
.navbar-blackfit .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--bf-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--bf-ease);
}
.navbar-blackfit .nav-link:hover,
.navbar-blackfit .nav-link.active {
  color: #fff;
}
.navbar-blackfit .nav-link:hover::after,
.navbar-blackfit .nav-link.active::after {
  transform: scaleX(1);
}
.navbar-blackfit .form-control {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.navbar-blackfit .form-control::placeholder { color: rgba(255, 255, 255, 0.6); }
.navbar-blackfit .form-control:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--bf-gold);
  box-shadow: 0 0 0 0.2rem rgba(242, 183, 5, 0.25);
  color: #fff;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.6; }
}

/* ================= Boutons ================= */
.btn-blackfit {
  background: linear-gradient(120deg, var(--bf-green), var(--bf-green-deep));
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 1.75rem;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(11, 122, 59, 0.35);
  transition: transform 0.25s var(--bf-ease), box-shadow 0.25s var(--bf-ease);
}
.btn-blackfit:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 32px rgba(11, 122, 59, 0.45);
  color: #fff;
}
.btn-blackfit:active { transform: translateY(-1px) scale(0.98); }

.btn-blackfit-outline {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 1.75rem;
  border-radius: 999px;
  transition: transform 0.25s var(--bf-ease), background 0.25s var(--bf-ease), border-color 0.25s var(--bf-ease);
}
.btn-blackfit-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--bf-gold);
  color: #fff;
  transform: translateY(-3px);
}

/* ================= Hero ================= */
.hero-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 7.5rem 0 6rem;
  background: linear-gradient(135deg, var(--bf-ink) 0%, var(--bf-green-deep) 45%, var(--bf-green) 100%);
  background-size: 200% 200%;
  animation: heroGradient 14s ease infinite;
  color: #fff;
}
@keyframes heroGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  z-index: 0;
}
.hero-section::before {
  width: 360px; height: 360px;
  background: var(--bf-gold);
  top: -110px; right: -70px;
  animation: floatSlow 9s ease-in-out infinite;
}
.hero-section::after {
  width: 280px; height: 280px;
  background: var(--bf-red);
  bottom: -120px; left: -70px;
  animation: floatSlow 11s ease-in-out infinite reverse;
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-26px) scale(1.08); }
}
.hero-section .hero-content { position: relative; z-index: 1; }
.hero-section .lead { color: rgba(255, 255, 255, 0.85); }

.hero-content > * {
  opacity: 0;
  animation: fadeUp 0.8s var(--bf-ease) forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.18s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.42s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  animation: chipFloat 6s ease-in-out infinite;
}
.hero-chip:nth-child(2) { animation-delay: 0.4s; }
.hero-chip:nth-child(3) { animation-delay: 0.8s; }
.hero-chip:nth-child(4) { animation-delay: 1.2s; }
.hero-chip:nth-child(5) { animation-delay: 1.6s; }
@keyframes chipFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ================= Sections / kickers ================= */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bf-terracotta);
  margin-bottom: 0.5rem;
}
.section-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--bf-gold);
  display: inline-block;
}
.section-kicker.section-kicker-light { color: var(--bf-gold-soft); }

/* ================= Reveal-on-scroll ================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--bf-ease), transform 0.7s var(--bf-ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.row > .reveal:nth-child(1) { transition-delay: 0.02s; }
.row > .reveal:nth-child(2) { transition-delay: 0.1s; }
.row > .reveal:nth-child(3) { transition-delay: 0.18s; }
.row > .reveal:nth-child(4) { transition-delay: 0.26s; }
.row > .reveal:nth-child(5) { transition-delay: 0.34s; }
.row > .reveal:nth-child(6) { transition-delay: 0.42s; }

/* ================= Badges catégorie ================= */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  color: #fff;
  transition: transform 0.25s var(--bf-ease);
}
a.category-badge:hover { transform: translateY(-2px); color: #fff; }

/* ================= Cartes article ================= */
.article-card {
  position: relative;
  border: 1px solid rgba(20, 21, 15, 0.05);
  border-radius: var(--bf-border-radius);
  overflow: hidden;
  background-color: var(--bf-card);
  box-shadow: var(--bf-shadow);
  transition: transform 0.4s var(--bf-ease), box-shadow 0.4s var(--bf-ease);
}
.article-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--bf-shadow-hover);
}
.article-card .card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  background-color: #dcd8cc;
}
.article-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--bf-ease);
}
.article-card:hover .card-img-wrap img { transform: scale(1.08); }
.article-card .card-img-wrap .category-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}
.article-card .card-title a {
  color: var(--bf-ink);
  transition: color 0.2s ease;
}
.article-card:hover .card-title a { color: var(--bf-green); }

/* ================= Cartes profil ================= */
.profile-card {
  position: relative;
  border-radius: var(--bf-border-radius);
  background: linear-gradient(165deg, #fff, var(--bf-sand));
  text-align: center;
  padding: 2rem 1.1rem 1.5rem;
  box-shadow: var(--bf-shadow);
  transition: transform 0.35s var(--bf-ease), box-shadow 0.35s var(--bf-ease);
}
.profile-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--bf-shadow-hover);
}
.profile-card .profile-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  padding: 3px;
  margin: 0 auto 1rem;
  background: conic-gradient(var(--bf-green), var(--bf-gold), var(--bf-red), var(--bf-green));
}
.profile-card .profile-ring img,
.profile-card .profile-ring .ring-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background-color: #fff;
  border: 3px solid #fff;
}

/* ================= Newsletter ================= */
.newsletter-section {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0;
  background: linear-gradient(120deg, var(--bf-green-deep), var(--bf-green) 55%, var(--bf-terracotta) 130%);
  color: #fff;
}
.newsletter-section::before,
.newsletter-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
}
.newsletter-section::before { width: 260px; height: 260px; background: var(--bf-gold); top: -90px; left: 8%; }
.newsletter-section::after { width: 220px; height: 220px; background: #fff; bottom: -110px; right: 10%; }
.newsletter-section .newsletter-inner { position: relative; z-index: 1; }
.newsletter-section input.form-control {
  border-radius: 999px;
  border: none;
  padding: 0.7rem 1.2rem;
}
.newsletter-section input.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(242, 183, 5, 0.4);
}
.newsletter-section button {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.7rem 1.6rem;
  transition: transform 0.25s var(--bf-ease);
}
.newsletter-section button:hover { transform: translateY(-2px) scale(1.03); }

/* ================= Footer ================= */
footer.site-footer {
  position: relative;
  background-color: var(--bf-ink);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 1.5rem;
}
footer.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bf-green), var(--bf-gold), var(--bf-red));
}
footer.site-footer a { color: rgba(255, 255, 255, 0.85); transition: color 0.2s ease; }
footer.site-footer a:hover { color: var(--bf-gold); }

/* ================= Partage réseaux sociaux ================= */
.share-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background-color: var(--bf-green);
  color: #fff !important;
  margin-right: 0.4rem;
  transition: transform 0.25s var(--bf-ease), background-color 0.25s ease;
}
.share-buttons a:hover {
  background-color: var(--bf-terracotta);
  transform: translateY(-4px) scale(1.08);
}

.reading-time { color: var(--bf-muted); font-size: 0.85rem; }

/* ================= Pagination & formulaires ================= */
.pagination .page-link {
  border-radius: 999px !important;
  margin: 0 0.2rem;
  border: none;
  color: var(--bf-ink);
}
.pagination .page-item.active .page-link {
  background-color: var(--bf-green);
}
.form-select:focus, .form-control:focus {
  border-color: var(--bf-green);
  box-shadow: 0 0 0 0.2rem rgba(11, 122, 59, 0.2);
}

/* ================= Bandeau catégorie (page catégorie) ================= */
.category-hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0;
  color: #fff;
}
.category-hero .cat-icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
