/* ================================================
   style.css — Global Variables & Base
   LOKOTRE Platform — ARFF BDJ
   ================================================ */

:root {
  /* ── Brand Colors ── */
  --c-primary:       #e63946;
  --c-primary-dark:  #c1121f;
  --c-primary-light: #ff6b7a;
  --c-primary-glow:  rgba(230, 57, 70, 0.25);

  --c-blue:    #4361ee;
  --c-blue-lt: #4cc9f0;
  --c-orange:  #f77f00;
  --c-yellow:  #f4d03f;
  --c-green:   #2ec4b6;

  /* ── Backgrounds ── */
  --bg-base:    #080d14;
  --bg-surface: #0f1623;
  --bg-card:    #141c2b;
  --bg-card-2:  #1a2336;
  --bg-input:   #1e2d42;

  /* ── Text ── */
  --tx-1: #e8edf5;
  --tx-2: #8a9bb5;
  --tx-3: #5a6a80;

  /* ── Border ── */
  --bd:   rgba(255, 255, 255, 0.07);
  --bd-2: rgba(255, 255, 255, 0.12);

  /* ── Shadows ── */
  --sh-sm:  0 2px 8px  rgba(0, 0, 0, 0.35);
  --sh-md:  0 4px 20px rgba(0, 0, 0, 0.45);
  --sh-lg:  0 8px 40px rgba(0, 0, 0, 0.55);
  --sh-red: 0 4px 24px rgba(230, 57, 70, 0.35);
  --sh-blu: 0 4px 24px rgba(67, 97, 238, 0.30);
  --sh-grn: 0 4px 24px rgba(46, 196, 182, 0.30);

  /* ── Typography ── */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ── Layout ── */
  --navbar-h:   70px;
  --section-py: 5.5rem;

  /* ── Radius ── */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* ── Transitions ── */
  --ease:      all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-fast: all 0.15s ease;
  --spring:    all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ════════════════════════════════════════
   RESET & BASE
   ════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-h);
}

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--tx-1);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Scrollbar ── */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--c-primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-primary-light); }

/* ── Selection ── */
::selection { background: var(--c-primary); color: #fff; }

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Base Elements ── */
img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: var(--ease-fast);
}
a:hover { color: var(--c-primary-light); }

section { padding: var(--section-py) 0; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  color: var(--tx-1);
  line-height: 1.2;
}

p { color: var(--tx-2); }

/* ════════════════════════════════════════
   SHARED SECTION COMPONENTS
   ════════════════════════════════════════ */

.section-header {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(230, 57, 70, 0.10);
  color: var(--c-primary);
  border: 1px solid rgba(230, 57, 70, 0.20);
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--tx-1);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 0.96rem;
  color: var(--tx-2);
  line-height: 1.75;
  margin-bottom: 0;
}

/* ════════════════════════════════════════
   BACK TO TOP
   ════════════════════════════════════════ */

.back-to-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 42px;
  height: 42px;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  box-shadow: var(--sh-red);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: var(--ease);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--c-primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 28px rgba(230, 57, 70, 0.5);
}

/* ════════════════════════════════════════
   LAZY LOAD IMAGE
   ════════════════════════════════════════ */

img[data-src] {
  opacity: 0;
  transition: opacity 0.4s ease;
}

img.loaded { opacity: 1; }

/* ════════════════════════════════════════
   PRELOADER
   ════════════════════════════════════════ */

#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  z-index: 9999;
}

#preloader img {
  width: 56px;
  animation: plsPulse 1s ease-in-out infinite alternate;
}

.preloader-bar {
  width: 180px;
  height: 3px;
  background: var(--bd-2);
  border-radius: 3px;
  overflow: hidden;
}

.preloader-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: 40%;
  background: var(--c-primary);
  border-radius: 3px;
  animation: plsBar 1.2s ease-in-out infinite;
}

@keyframes plsPulse {
  from { opacity: 0.4; transform: scale(0.9); }
  to   { opacity: 1;   transform: scale(1.1); }
}

@keyframes plsBar {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}