/* =============================================
   DAROUL KITAB BURKINA - Styles Principaux
   ============================================= */

:root {
  --gold: #C9A84C;
  --gold-light: #F0D080;
  --gold-dark: #A07830;
  --islamic-dark: #0D2137;
  --islamic-mid: #163855;
  --islamic-green: #1A6B3C;
  --text-dark: #1a1a2e;
  --shadow: 0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
  --radius: 12px;
  --transition: all 0.3s ease;
}

/* Base */
* { box-sizing: border-box; }
body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  overflow-x: hidden;
}
a { transition: var(--transition); }
img { max-width: 100%; }

/* ---- Colors ---- */
.bg-islamic { background-color: var(--islamic-dark) !important; }
.bg-dark-islamic { background-color: var(--islamic-dark) !important; }
.bg-gold { background-color: var(--gold) !important; }
.text-gold { color: var(--gold) !important; }

/* ---- Buttons ---- */
.btn-gold {
  background-color: var(--gold);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: var(--transition);
}
.btn-gold:hover {
  background-color: var(--gold-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.4);
}
.btn-outline-gold {
  border: 2px solid var(--gold);
  color: var(--gold);
  border-radius: 50px;
  font-weight: 600;
  background: transparent;
  transition: var(--transition);
}
.btn-outline-gold:hover {
  background-color: var(--gold);
  color: #fff;
  transform: translateY(-2px);
}

/* ---- Badge ---- */
.badge-gold {
  background-color: var(--gold);
  color: #fff;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---- Topbar / Contact bar ---- */
.topbar { border-top: 1px solid rgba(201,168,76,0.25); }
.topbar a { text-decoration: none; transition: var(--transition); }
.topbar a:hover { color: var(--gold) !important; }

/* ---- Navbar ---- */
.navbar { padding: 14px 0; }
.brand-text { display: flex; flex-direction: column; align-items: stretch; }
.brand-arabic {
  font-family: 'Scheherazade New', serif;
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.05;
  text-align: center;
}
.brand-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fff;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}
.brand-name .text-gold { font-weight: 700; }
.brand-edition {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
}
.brand-dash {
  flex: 0 0 auto;
  width: 22px;
  height: 1px;
  background: var(--gold);
  opacity: 0.9;
}
.brand-edition-ar {
  font-family: 'Scheherazade New', serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--gold);
  line-height: 1;
}

/* ---- Brand responsive ---- */
@media (max-width: 991.98px) {
  .brand-arabic { font-size: 1.55rem; }
  .brand-name { font-size: 0.95rem; letter-spacing: 1px; }
  .brand-edition { font-size: 0.55rem; letter-spacing: 2.5px; }
}
@media (max-width: 575.98px) {
  .navbar-brand img { height: 46px !important; width: 46px !important; }
  .brand-logo { margin-right: 0.6rem !important; }
  .brand-arabic { font-size: 1.25rem; }
  .brand-name { font-size: 0.8rem; letter-spacing: 0.6px; }
  .brand-edition { font-size: 0.5rem; letter-spacing: 1.5px; gap: 6px; }
  .brand-edition-ar { font-size: 0.9rem; }
}
@media (max-width: 359.98px) {
  .brand-edition, .brand-edition-ar { display: none; }
}
.navbar .nav-link {
  font-weight: 500;
  padding: 8px 14px !important;
  border-radius: 6px;
  transition: var(--transition);
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--gold) !important;
  background: rgba(201,168,76,0.1);
}
.dropdown-menu { border: none; box-shadow: var(--shadow-lg); border-radius: var(--radius); }

/* ---- Hero ---- */
.hero-slide {
  min-height: 90vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,33,55,0.92) 0%, rgba(13,33,55,0.7) 100%);
}
.hero-slide-1 {
  background-image: url('https://images.unsplash.com/photo-1609599006353-e629aaabfeae?w=1920&q=80');
}
.hero-slide-2 {
  background-image: url('https://images.unsplash.com/photo-1585418888723-d2c21f082456?w=1920&q=80');
}
.hero-slide-3 {
  background-image: url('https://images.unsplash.com/photo-1568438350562-2cae6d394ad0?w=1920&q=80');
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 40px 0;
  animation: fadeInUp 0.8s ease;
}
.bismillah {
  font-family: 'Scheherazade New', serif;
  font-size: 2.5rem;
  color: var(--gold);
  text-shadow: 0 2px 10px rgba(201,168,76,0.5);
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Stats Bar ---- */
.stats-bar .stat-item i { opacity: 0.9; }

/* ---- Section Headers ---- */
.section-header h2 { font-size: 2rem; color: var(--text-dark); }

/* ---- Category Cards ---- */
.category-hover {
  transition: var(--transition);
  border-radius: var(--radius) !important;
}
.category-hover:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg) !important;
}
.category-hover:hover .text-gold { color: var(--gold-dark) !important; }

/* ---- Product Cards ---- */
.product-card {
  border-radius: var(--radius) !important;
  transition: var(--transition);
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg) !important;
}
.product-img-wrap {
  position: relative;
  background: linear-gradient(135deg, #f8f4ec, #ede8d8);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-img-placeholder { width: 100%; height: 100%; }
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
}
.price-tag { font-family: 'Poppins', sans-serif; }

/* ---- Features ---- */
.feature-box {
  border-radius: var(--radius) !important;
  transition: var(--transition);
}
.feature-box:hover {
  background: var(--islamic-dark) !important;
  color: white;
}
.feature-box:hover h6 { color: var(--gold); }
.feature-box:hover p { color: rgba(255,255,255,0.7) !important; }
.feature-box:hover .text-gold { color: var(--gold) !important; }

/* ---- Testimonials ---- */
.testimonial-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.2);
  transition: var(--transition);
}
.testimonial-card:hover {
  background: rgba(201,168,76,0.1);
  border-color: var(--gold);
}

/* ---- CTA Section ---- */
.cta-section .form-control {
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
}
.cta-section .btn-dark {
  border-radius: 50px;
  padding: 12px 28px;
}

/* ---- Partners ---- */
.partner-name {
  font-weight: 700;
  color: var(--islamic-dark);
  font-size: 0.95rem;
  padding: 8px 20px;
  border: 2px solid #e0d5c0;
  border-radius: 50px;
  display: inline-block;
  transition: var(--transition);
}
.partner-name:hover { border-color: var(--gold); color: var(--gold); }

/* ---- Footer ---- */
.footer { border-top: 3px solid var(--gold); }
.footer-arabic {
  font-family: 'Scheherazade New', serif;
  font-size: 1rem;
  color: var(--gold);
}
.footer-edition {
  font-family: 'Scheherazade New', serif;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.2;
}
.footer-links { }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--gold); padding-left: 4px; }
.footer-contact li {
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.footer-contact a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-contact a:hover { color: var(--gold); }
.payment-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(201,168,76,0.3);
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 6px;
}
.btn-outline-gold.social-btn { border-radius: 50%; width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ---- Back To Top ---- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  background: var(--gold);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(201,168,76,0.5);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 9999;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--gold-dark); color: white; transform: translateY(-3px); }

/* ---- Page Banner ---- */
.page-banner {
  background: linear-gradient(135deg, var(--islamic-dark) 0%, var(--islamic-mid) 100%);
  border-bottom: 3px solid var(--gold);
}
.page-banner h1 { font-size: 1.8rem; }
.breadcrumb-item a { color: var(--gold); text-decoration: none; }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }

/* ---- Catalogue Page ---- */
.filter-sidebar .card { border-radius: var(--radius); }
.filter-label { font-weight: 600; color: var(--islamic-dark); }
.form-check-input:checked { background-color: var(--gold); border-color: var(--gold); }

/* ---- Contact Page ---- */
.contact-icon-box {
  width: 60px;
  height: 60px;
  background: rgba(201,168,76,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.map-embed { border-radius: var(--radius); overflow: hidden; }

/* ---- Services Page ---- */
.service-card {
  border-radius: var(--radius) !important;
  transition: var(--transition);
  border-left: 4px solid var(--gold) !important;
}
.service-card:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow) !important;
}

/* ---- Commande Page ---- */
.order-summary { position: sticky; top: 100px; }
.form-control:focus, .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 0.2rem rgba(201,168,76,0.25);
}

/* ---- WhatsApp Floating Button ---- */
.whatsapp-float {
  position: fixed;
  bottom: 90px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  z-index: 9998;
  font-size: 1.5rem;
  transition: var(--transition);
  animation: pulse-wa 2s infinite;
}
.whatsapp-float:hover { background: #1da851; color: white; transform: scale(1.1); }
@keyframes pulse-wa {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,0.5); }
  50% { box-shadow: 0 4px 30px rgba(37,211,102,0.8); }
}

/* ---- Navbar scrolled ---- */
.navbar-scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important; }

/* ---- Active category in catalogue ---- */
.active-cat { background: rgba(201,168,76,0.08); }
.bg-gold.rounded-pill { background: var(--gold) !important; }

/* ---- Animate on scroll ---- */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-on-scroll.animated { opacity: 1; transform: translateY(0); }

/* ---- Accordion gold ---- */
.accordion-button:not(.collapsed) { color: var(--gold); background: rgba(201,168,76,0.05); box-shadow: none; }
.accordion-button:focus { box-shadow: none; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-slide { min-height: 75vh; }
  .hero-content .display-3 { font-size: 2rem; }
  .bismillah { font-size: 2rem; }
  .section-header h2 { font-size: 1.6rem; }
  .back-to-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }
}
@media (max-width: 576px) {
  .hero-slide { min-height: 65vh; }
  .hero-content .display-3 { font-size: 1.6rem; }
  .hero-content .lead { font-size: 1rem !important; }
}

/* ---- Texte justifié sur tout le site ---- */
/* Les éléments volontairement centrés (.text-center) ou alignés à droite
   (.text-end) gardent leur alignement grâce au !important de Bootstrap. */
p,
li,
.card-text,
.lead,
.accordion-body,
.legal-content,
.text-muted { text-align: justify; text-justify: inter-word; }

/* Conteneurs volontairement centrés : le centrage prime sur la justification */
.text-center p,
.text-center li,
.text-center .card-text,
.text-center .lead,
.text-center .text-muted { text-align: center; text-justify: auto; }
