/* ===================================================
   TES TECHNOLOGIES — DESIGN SYSTEM v2
   Direction artistique : ingénierie premium,
   institutionnel moderne, contexte africain.
   Bleu profond / blanc cassé / or très subtil.
   =================================================== */

:root {
  /* --- Blues --- */
  --navy:       #0F2440;
  --navy-mid:   #16325B;
  --navy-light: #1D3F72;
  --blue-tech:  #2563EB;
  --blue-steel: #3B6FAE;
  --blue-mist:  #E4ECF5;
  --blue-wash:  #F0F4F9;
  /* --- Neutrals --- */
  --off-white:  #FAFBFC;
  --warm-white: #F6F7F9;
  --gray-line:  #E2E5EA;
  --gray-mid:   #8B95A5;
  --gray-text:  #5A6477;
  --dark:       #1A2332;
  /* --- Gold (très subtil) --- */
  --gold:       #BFA55B;
  --gold-muted: #D4C48E;
  --gold-wash:  #F5F0E0;
  /* --- Fonts --- */
  --serif:      'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:       'Inter', system-ui, -apple-system, sans-serif;
  /* --- Misc --- */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 14px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--sans);
  color: var(--gray-text);
  background: var(--off-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  color: var(--dark);
  line-height: 1.2;
  font-weight: 700;
}

a { color: var(--navy); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--blue-tech); }
img { max-width: 100%; height: auto; display: block; }

/* ---------- LAYOUT ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }

/* ---------- NAVBAR ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gray-line);
  transition: box-shadow 0.3s ease;
}
.topbar.scrolled { box-shadow: 0 1px 20px rgba(15,36,64,0.06); }

.topbar-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 72px;
}

.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.brand-logo {
  height: 48px; width: auto; border-radius: 4px; object-fit: contain; flex-shrink: 0;
}
.brand-text { line-height: 1.2; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--dark); }
.brand-tag  { font-size: 0.65rem; font-weight: 600; color: var(--gold); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 0.1rem; }

.nav-main { display: flex; align-items: center; gap: 0.15rem; list-style: none; }
.nav-main a {
  padding: 0.45rem 0.9rem; font-size: 0.85rem; font-weight: 500;
  color: var(--gray-text); border-radius: var(--radius-sm); text-decoration: none;
  transition: all 0.2s ease;
}
.nav-main a:hover { color: var(--dark); background: var(--blue-wash); }
.nav-main a.active { color: var(--navy); font-weight: 600; background: var(--blue-mist); }

.nav-right { display: flex; align-items: center; gap: 0.6rem; }
.btn-lang {
  padding: 0.35rem 0.7rem; font-size: 0.75rem; font-weight: 600;
  color: var(--gray-mid); border: 1px solid var(--gray-line); border-radius: var(--radius-sm);
  background: transparent; cursor: pointer; transition: all 0.2s;
  text-decoration: none; display: inline-flex; align-items: center;
}
.btn-lang:hover { border-color: var(--gold); color: var(--gold); }

.btn-cart {
  position: relative; width: 38px; height: 38px;
  border: 1px solid var(--gray-line); border-radius: var(--radius-md);
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-mid); transition: all 0.2s;
}
.btn-cart:hover { border-color: var(--navy); color: var(--navy); }
.btn-cart .badge {
  position: absolute; top: -4px; right: -4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  display: none; align-items: center; justify-content: center;
}

.hamburger {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--dark); border-radius: 1px; transition: all 0.2s;
}

/* ---------- BUTTONS ---------- */
.btn-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; font-size: 0.9rem; font-weight: 600;
  font-family: var(--sans);
  border: none; border-radius: var(--radius-md); cursor: pointer;
  text-decoration: none; transition: all 0.25s ease; line-height: 1.4;
}
.btn-cta svg { width: 16px; height: 16px; }

.btn-cta-primary {
  background: var(--navy); color: #fff;
  box-shadow: 0 2px 12px rgba(15,36,64,0.15);
}
.btn-cta-primary:hover {
  background: var(--navy-light); color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15,36,64,0.2);
}
.btn-cta-secondary {
  background: transparent; color: var(--dark);
  border: 1.5px solid var(--gray-line);
}
.btn-cta-secondary:hover {
  border-color: var(--dark); background: var(--warm-white); color: var(--dark);
}
.btn-cta-gold {
  background: var(--gold); color: #fff;
  box-shadow: 0 2px 12px rgba(191,165,91,0.2);
}
.btn-cta-gold:hover {
  background: #A8903E; color: #fff;
  transform: translateY(-1px);
}
.btn-cta-sm { padding: 0.6rem 1.4rem; font-size: 0.82rem; }
.btn-cta-lg { padding: 1rem 2.5rem; font-size: 0.95rem; }
.btn-cta-full { width: 100%; justify-content: center; }

/* ---------- SECTION SHARED ---------- */
.sect { padding: 6rem 0; }
.sect-header { text-align: center; max-width: 640px; margin: 0 auto 3.5rem; }
.sect-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2.5px; color: var(--gold); margin-bottom: 0.75rem;
}
.sect-title {
  font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 700; color: var(--dark); line-height: 1.2;
  margin-bottom: 1rem;
}
.sect-subtitle {
  font-size: 1rem; color: var(--gray-text); line-height: 1.7;
  max-width: 540px; margin: 0 auto;
}

/* Dark section variants */
.sect-dark { background: var(--navy); }
.sect-dark .sect-label { color: var(--gold-muted); }
.sect-dark .sect-title { color: #fff; }
.sect-dark .sect-subtitle { color: rgba(255,255,255,0.55); }

/* ---------- PAGE HEADER (inner pages) ---------- */
.page-hero {
  padding: 10rem 0 4rem;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 50%, var(--navy-light) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23BFA55B' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem); color: #fff;
  margin-bottom: 0.75rem; position: relative;
}
.page-hero p {
  font-size: 1.05rem; color: rgba(255,255,255,0.6);
  max-width: 520px; margin: 0 auto; position: relative;
}
.breadcrumb {
  display: flex; justify-content: center; gap: 0.5rem;
  font-size: 0.8rem; color: rgba(255,255,255,0.35);
  margin-top: 1rem; position: relative;
}
.breadcrumb a { color: var(--gold-muted); }
.breadcrumb a:hover { color: #fff; }

/* ---------- CARDS ---------- */
.card {
  padding: 2rem 1.75rem;
  background: var(--off-white);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}
.card:hover {
  background: #fff;
  box-shadow: 0 8px 30px rgba(15,36,64,0.06);
  border-color: transparent;
  transform: translateY(-3px);
}
.card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--navy); transform: scaleX(0);
  transform-origin: left; transition: transform 0.3s ease;
}
.card:hover::after { transform: scaleX(1); }

/* ---------- FORMS ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--dark); margin-bottom: 0.4rem;
}
.form-label .req { color: #DC2626; margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%; padding: 0.75rem 1rem;
  font-family: var(--sans); font-size: 0.9rem; color: var(--dark);
  background: #fff;
  border: 1.5px solid var(--gray-line);
  border-radius: var(--radius-md);
  transition: all 0.2s ease; outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15,36,64,0.08);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: 0.75rem; color: var(--gray-mid); margin-top: 0.25rem; }

.form-radio-card {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1rem 1.25rem; border: 1.5px solid var(--gray-line);
  border-radius: var(--radius-md); cursor: pointer;
  transition: all 0.2s ease; background: #fff;
}
.form-radio-card:hover { border-color: var(--blue-steel); }
.form-radio-card.selected { border-color: var(--navy); background: var(--blue-wash); }
.form-radio-card input { margin-top: 3px; accent-color: var(--navy); }
.form-radio-card .radio-label { font-size: 0.88rem; font-weight: 600; color: var(--dark); }
.form-radio-card .radio-desc { font-size: 0.8rem; color: var(--gray-mid); }

/* ---------- STEPPER ---------- */
.stepper {
  display: flex; justify-content: center; gap: 0; margin-bottom: 3rem;
}
.step {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; font-weight: 600; color: var(--gray-mid);
}
.step.active { color: var(--navy); }
.step.done { color: var(--gold); }
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gray-line); color: var(--gray-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
}
.step.active .step-num { background: var(--navy); color: #fff; }
.step.done .step-num { background: var(--gold); color: #fff; }
.step-line { width: 40px; height: 1.5px; background: var(--gray-line); align-self: center; margin: 0 0.25rem; }
.step-line.active { background: var(--navy); }

/* ---------- DATA TABLE ---------- */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.88rem; }
.data-table th {
  text-align: left; padding: 0.75rem 1rem; font-weight: 600;
  color: var(--gray-mid); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.5px; border-bottom: 2px solid var(--gray-line);
}
.data-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--blue-wash); }
.data-table tr:hover td { background: var(--blue-wash); }

.badge-status {
  display: inline-flex; padding: 0.2rem 0.65rem; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600;
}
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-info    { background: var(--blue-mist); color: var(--navy); }
.badge-danger  { background: #FEE2E2; color: #991B1B; }

/* ---------- STAT CARDS ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card {
  background: #fff; border: 1px solid var(--gray-line);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.stat-card .s-label { font-size: 0.78rem; color: var(--gray-mid); margin-bottom: 0.2rem; }
.stat-card .s-value { font-size: 1.7rem; font-weight: 700; color: var(--dark); font-family: var(--serif); }
.stat-card .s-change { font-size: 0.78rem; color: #059669; margin-top: 0.2rem; }

/* ---------- PRODUCT CARDS ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.5rem; }
.prod-card {
  background: #fff; border: 1px solid var(--gray-line);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all 0.3s ease;
}
.prod-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(15,36,64,0.07); }
.prod-img {
  aspect-ratio: 1; background: var(--warm-white);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; position: relative;
}
.prod-badge {
  position: absolute; top: 0.75rem; left: 0.75rem;
  padding: 0.2rem 0.6rem; border-radius: 4px;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.prod-badge-stock { background: #D1FAE5; color: #065F46; }
.prod-badge-hot { background: var(--gold-wash); color: var(--gold); }
.prod-badge-order { background: var(--blue-mist); color: var(--navy); }
.prod-body { padding: 1.25rem; }
.prod-brand { font-size: 0.7rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; }
.prod-name { font-size: 0.95rem; font-weight: 600; color: var(--dark); margin: 0.25rem 0; font-family: var(--sans); }
.prod-price { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.prod-price small { font-size: 0.75rem; font-weight: 400; color: var(--gray-mid); }
.prod-actions { display: flex; gap: 0.5rem; margin-top: 0.85rem; }

/* ---------- CART SIDEBAR ---------- */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(15,36,64,0.35);
  z-index: 199; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-sidebar {
  position: fixed; top: 0; right: -420px; width: 420px; height: 100vh;
  background: #fff; box-shadow: -4px 0 20px rgba(0,0,0,0.08);
  z-index: 200; transition: right 0.3s ease; display: flex; flex-direction: column;
}
.cart-sidebar.open { right: 0; }
.cart-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-line);
  display: flex; justify-content: space-between; align-items: center;
}
.cart-header h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: var(--dark); }
.cart-items { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; }
.cart-footer {
  padding: 1.25rem 1.5rem; border-top: 1px solid var(--gray-line); background: var(--warm-white);
}
.cart-total { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 1rem; color: var(--dark); }

/* ---------- FILTER TABS ---------- */
.filter-tabs { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.filter-tab {
  padding: 0.5rem 1.15rem; border-radius: 6px;
  border: 1.5px solid var(--gray-line); background: #fff;
  color: var(--gray-text); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.filter-tab:hover { border-color: var(--navy); color: var(--navy); }
.filter-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--dark); color: rgba(255,255,255,0.5); padding: 4rem 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 3rem; padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-brand-text { font-size: 0.88rem; line-height: 1.7; margin-top: 1rem; max-width: 300px; }
.site-footer h5 {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.8); margin-bottom: 1.25rem;
}
.footer-list { list-style: none; }
.footer-list li { margin-bottom: 0.5rem; }
.footer-list a { color: rgba(255,255,255,0.45); font-size: 0.88rem; text-decoration: none; transition: color 0.2s; }
.footer-list a:hover { color: var(--gold-muted); }
.footer-contact-line {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.88rem; margin-bottom: 0.75rem;
}
.footer-contact-line .ico { color: var(--gold-muted); flex-shrink: 0; margin-top: 2px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 0; font-size: 0.75rem; color: rgba(255,255,255,0.3);
}
.footer-bottom a { color: rgba(255,255,255,0.3); text-decoration: none; margin-left: 1.5rem; }
.footer-bottom a:hover { color: rgba(255,255,255,0.6); }

/* ---------- WHATSAPP ---------- */
.wa-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 90;
  width: 52px; height: 52px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(37,211,102,0.35);
  text-decoration: none; transition: all 0.25s;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 6px 22px rgba(37,211,102,0.45); color: #fff; }
.wa-float svg { width: 24px; height: 24px; }

/* ---------- ANIMATIONS ---------- */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-main { display: none; }
  .hamburger { display: flex; }
  .nav-main.open {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; padding: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border-top: 1px solid var(--gray-line);
  }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .cart-sidebar { width: 100%; right: -100%; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .prod-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .prod-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .sect { padding: 4rem 0; }
  .container, .container-wide { padding: 0 1.25rem; }
}
