/* ================================================================
   ADÉMA AFRIK — VISUAL SIGNATURE LAYER
   Premium loader, hero finish, micro-interactions and footer credit.
   Progressive enhancement: if JS fails, the loader is not displayed.
   ================================================================ */
:root {
  --aa-brand: #b8893a;
  --aa-brand-soft: #d8b574;
  --aa-ink: #0b0b0a;
  --aa-cream: #f5efe6;
  --aa-ease: cubic-bezier(.22,1,.36,1);
  --aa-ease-inout: cubic-bezier(.65,0,.35,1);
}

/* ---------- Premium loader ---------- */
.lp-loader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(184,137,58,.16), transparent 34%),
    linear-gradient(145deg, #090806 0%, #12100d 48%, #090806 100%);
  color: var(--aa-cream);
  isolation: isolate;
}
html.lp-loader-enabled .lp-loader { display: grid; place-items: center; }
.lp-loader::before,
.lp-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.lp-loader::before {
  opacity: .11;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, #000 0%, transparent 72%);
}
.lp-loader::after {
  border: 1px solid rgba(184,137,58,.1);
  inset: 18px;
}
.lp-loader-inner {
  width: min(86vw, 420px);
  position: relative;
  z-index: 2;
  text-align: center;
}
.lp-loader-logo-wrap {
  width: clamp(126px, 15vw, 176px);
  aspect-ratio: 1;
  margin: 0 auto 30px;
  display: grid;
  place-items: center;
  position: relative;
}
.lp-loader-logo-wrap::before,
.lp-loader-logo-wrap::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  inset: -10px;
  border: 1px solid rgba(216,181,116,.28);
  animation: aa-loader-ring 2.2s var(--aa-ease-inout) infinite;
}
.lp-loader-logo-wrap::after {
  inset: -21px;
  border-color: rgba(216,181,116,.10);
  animation-delay: -.7s;
}
.lp-loader-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 35px rgba(0,0,0,.42));
  opacity: 0;
  transform: scale(.84) translateY(8px);
  animation: aa-loader-logo-in .9s .08s var(--aa-ease) forwards;
}
.lp-loader-kicker {
  margin: 0 0 16px;
  font-size: 10px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(245,239,230,.55);
  opacity: 0;
  animation: aa-loader-fade-up .7s .22s var(--aa-ease) forwards;
}
.lp-loader-progress-shell {
  position: relative;
  height: 1px;
  width: 100%;
  background: rgba(255,255,255,.13);
  overflow: hidden;
}
.lp-loader-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(184,137,58,.45), var(--aa-brand-soft), #f3dfb4);
  box-shadow: 0 0 16px rgba(216,181,116,.45);
  transition: width .22s linear;
}
.lp-loader-meta {
  margin-top: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(245,239,230,.42);
}
.lp-loader-percent { color: rgba(245,239,230,.78); font-variant-numeric: tabular-nums; }
.lp-loader.is-exiting {
  animation: aa-loader-out .52s var(--aa-ease) forwards;
  pointer-events: none;
}
.lp-loader.is-exiting .lp-loader-inner {
  animation: aa-loader-inner-out .38s var(--aa-ease-inout) forwards;
}
@keyframes aa-loader-logo-in { to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes aa-loader-fade-up { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes aa-loader-ring { 0%,100% { transform:scale(.96); opacity:.45; } 50% { transform:scale(1.035); opacity:.9; } }
@keyframes aa-loader-inner-out { to { opacity:0; transform:translateY(-16px) scale(.985); } }
@keyframes aa-loader-out {
  0% { opacity:1; clip-path: inset(0 0 0 0); }
  65% { opacity:1; }
  100% { opacity:0; clip-path: inset(0 0 100% 0); visibility:hidden; }
}

/* ---------- Logo presence ---------- */
.brand-logo {
  width: 86px !important;
  height: 86px !important;
  max-width: none;
  object-fit: contain;
  object-position: center;
  transform-origin: center;
}
.lp-nav-shell { min-height: 96px !important; }
.lp-brand { display:flex; align-items:center; flex-shrink:0; }
.lp-brand::after {
  content:"";
  width:1px;
  height:28px;
  margin-left:16px;
  background: linear-gradient(to bottom, transparent, rgba(184,137,58,.38), transparent);
}

/* ---------- Homepage hero signature ---------- */
section[data-motion-section="hero"] {
  --hero-mx: 0px;
  --hero-my: 0px;
  position: relative;
}
.lp-hero-bg-depth {
  position:absolute;
  inset:-2%;
  z-index:0;
  transform: translate3d(var(--hero-mx), var(--hero-my), 0) scale(1.018);
  transition: transform .9s var(--aa-ease);
  will-change: transform;
}
.lp-hero-bg-depth > img { width:100%; height:100%; object-fit:cover; }
.lp-hero-bg-depth::after {
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 50% 43%, transparent 5%, rgba(6,5,4,.09) 48%, rgba(6,5,4,.52) 100%),
    linear-gradient(to top, rgba(8,7,6,.88), rgba(8,7,6,.04) 48%, rgba(8,7,6,.38));
  pointer-events:none;
}
.lp-hero-center {
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  isolation:isolate;
}
.lp-hero-center::before {
  content:"";
  position:absolute;
  width:min(62vw, 640px);
  height:220px;
  left:50%;
  top:48%;
  transform:translate(-50%,-50%);
  background:radial-gradient(ellipse, rgba(184,137,58,.16), transparent 66%);
  filter:blur(30px);
  z-index:-1;
  pointer-events:none;
}
.lp-hero-seal {
  width:clamp(78px, 8vw, 112px);
  height:auto;
  margin:0 auto 18px;
  opacity:0;
  transform:translateY(18px) scale(.82) rotate(-4deg);
  filter:drop-shadow(0 16px 28px rgba(0,0,0,.45));
}
html.lp-loader-finished .lp-hero-seal {
  opacity:1;
  transform:none;
  transition: opacity .82s .08s var(--aa-ease), transform 1.05s .08s var(--aa-ease);
}
.lp-hero-title-words { overflow:visible; }
.lp-hero-word {
  display:inline-block;
  margin-right:.22em;
  opacity:0;
  transform:translateY(.68em) rotateX(-16deg);
  filter:blur(7px);
  transform-origin:50% 100%;
}
html.lp-loader-finished .lp-hero-title-words.is-visible .lp-hero-word {
  opacity:1;
  transform:none;
  filter:none;
  transition:
    opacity .74s calc(.15s + var(--word-index) * 55ms) var(--aa-ease),
    transform .9s calc(.15s + var(--word-index) * 55ms) var(--aa-ease),
    filter .8s calc(.15s + var(--word-index) * 55ms) ease;
}
.lp-hero-actions {
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:12px;
  margin-top:30px;
}
.lp-hero-primary,
.lp-hero-secondary {
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:11px;
  padding:0 23px;
  border-radius:999px;
  font-size:10px;
  line-height:1;
  letter-spacing:.21em;
  text-transform:uppercase;
  font-weight:600;
  transition: transform .35s var(--aa-ease), background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.lp-hero-primary {
  color:#17120c;
  background:linear-gradient(135deg, #e1c18a, #b8893a);
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 14px 34px rgba(184,137,58,.16);
}
.lp-hero-secondary {
  color:#eee7dc;
  border:1px solid rgba(255,255,255,.2);
  background:rgba(12,11,9,.28);
  backdrop-filter:blur(12px);
}
.lp-hero-actions i { transition:transform .35s var(--aa-ease); }
.lp-hero-badge {
  position:absolute;
  z-index:11;
  display:flex;
  align-items:center;
  gap:9px;
  padding:10px 14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(12,11,9,.33);
  color:rgba(245,239,230,.74);
  backdrop-filter:blur(12px);
  border-radius:999px;
  font-size:9px;
  letter-spacing:.18em;
  text-transform:uppercase;
  box-shadow:0 14px 34px rgba(0,0,0,.16);
  opacity:0;
}
.lp-hero-badge::before {
  content:"";
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--aa-brand-soft);
  box-shadow:0 0 0 4px rgba(184,137,58,.11);
}
.lp-hero-badge--left { left:5%; top:42%; }
.lp-hero-badge--right { right:5%; top:36%; }
html.lp-loader-finished .lp-hero-badge {
  opacity:1;
  transform:none;
  transition: opacity .9s .65s var(--aa-ease), transform .9s .65s var(--aa-ease);
}
.lp-hero-badge--left { transform:translateX(-22px); }
.lp-hero-badge--right { transform:translateX(22px); }
.lp-hero-scroll-cue {
  position:relative;
  width:1px;
  height:54px;
  overflow:hidden;
  background:rgba(255,255,255,.09);
}
.lp-hero-scroll-cue::after {
  content:"";
  position:absolute;
  top:-35%; left:0;
  width:100%; height:35%;
  background:linear-gradient(to bottom, transparent, var(--aa-brand-soft), transparent);
  animation:aa-scroll-cue 1.8s 1.2s var(--aa-ease-inout) infinite;
}
@keyframes aa-scroll-cue { to { top:115%; } }

/* ---------- Premium micro interactions ---------- */
a, button { -webkit-tap-highlight-color:transparent; }
.lp-site-header a:not(.lp-brand):not(.lp-dropdown-menu a) { position:relative; }
.lp-site-header nav > a::after,
.lp-site-header nav > div > button::after {
  content:"";
  position:absolute;
  left:0; right:0; bottom:-7px;
  height:1px;
  background:linear-gradient(90deg, transparent, var(--aa-brand-soft), transparent);
  transform:scaleX(0);
  transform-origin:center;
  transition:transform .35s var(--aa-ease);
}
.lp-site-header nav > a:hover::after,
.lp-site-header nav > a.is-active::after,
.lp-site-header nav > div > button:hover::after { transform:scaleX(1); }

main a[class*="border"], main button, .whatsapp-float {
  will-change:transform;
}
@media (hover:hover) {
  .lp-hero-primary:hover { transform:translateY(-3px); box-shadow:0 19px 42px rgba(184,137,58,.24); }
  .lp-hero-secondary:hover { transform:translateY(-3px); border-color:rgba(216,181,116,.55); color:#fff; }
  .lp-hero-actions a:hover i { transform:translateX(4px); }
  main a[class*="border"]:hover,
  main button:hover { box-shadow:0 12px 30px rgba(0,0,0,.14); }
  [data-motion-card="true"] { position:relative; }
  [data-motion-card="true"]::after {
    content:"";
    position:absolute;
    inset:-1px;
    border-radius:inherit;
    pointer-events:none;
    border:1px solid transparent;
    transition:border-color .4s ease, box-shadow .4s ease;
  }
  [data-motion-card="true"]:hover::after {
    border-color:rgba(184,137,58,.22);
    box-shadow:0 22px 55px rgba(0,0,0,.12);
  }
}

/* Section transitions: subtle soft line, no layout changes */
main > section { position:relative; }
main > section + section::before {
  content:"";
  position:absolute;
  top:0;
  left:50%;
  width:min(68vw, 880px);
  height:1px;
  transform:translateX(-50%);
  background:linear-gradient(90deg, transparent, rgba(184,137,58,.08), transparent);
  pointer-events:none;
}

/* ---------- Footer logo + Adéma Afrik credit ---------- */
.lp-footer-brandmark {
  display:flex;
  justify-content:center;
  align-items:center;
  padding:44px 0 20px;
}
.lp-footer-brandmark img {
  width:clamp(96px, 11vw, 138px);
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 16px 30px rgba(0,0,0,.38));
  opacity:.92;
}
.lp-adema-credit {
  width:100%;
  margin-top:32px;
  padding-top:22px;
  border-top:1px solid rgba(255,255,255,.055);
  text-align:center;
  font-size:10px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:rgba(255,255,255,.34);
}
.lp-adema-credit a {
  display:inline-flex;
  align-items:center;
  gap:.35em;
  color:inherit;
  text-decoration:none;
  transition:color .3s ease, letter-spacing .38s var(--aa-ease), transform .3s var(--aa-ease);
}
.lp-adema-credit strong {
  color:rgba(216,181,116,.72);
  font-weight:500;
  transition:color .3s ease;
}
@media (hover:hover) {
  .lp-adema-credit a:hover { color:rgba(255,255,255,.72); letter-spacing:.19em; transform:translateY(-1px); }
  .lp-adema-credit a:hover strong { color:var(--aa-brand-soft); }
}

/* Lightweight page-leave transition */
body > main,
body > footer,
.lp-site-header { transition:opacity .18s ease, transform .26s var(--aa-ease); }
html.lp-page-leaving body > main,
html.lp-page-leaving body > footer { opacity:.72; transform:translateY(-4px); }

/* ---------- Mobile/tablet polish ---------- */
@media (max-width: 1023px) {
  .lp-hero-badge { display:none; }
  .lp-hero-bg-depth { inset:0; transform:none !important; }
}
@media (max-width: 767px) {
  .lp-loader::after { inset:10px; }
  .lp-loader-inner { width:min(84vw, 330px); }
  .lp-loader-logo-wrap { width:128px; margin-bottom:22px; }
  .lp-loader-kicker { font-size:9px; letter-spacing:.27em; }
  .lp-loader-meta { font-size:8px; }

  .lp-nav-shell { min-height:82px !important; }
  .brand-logo { width:72px !important; height:72px !important; }
  .lp-brand::after { display:none; }

  section[data-motion-section="hero"] { min-height:100svh; }
  .lp-hero-center::before { width:94vw; height:180px; }
  .lp-hero-seal { width:74px; margin-bottom:14px; }
  .lp-hero-word { margin-right:.17em; }
  .lp-hero-actions { margin-top:22px; gap:9px; width:100%; }
  .lp-hero-primary, .lp-hero-secondary {
    min-height:44px;
    padding:0 17px;
    font-size:9px;
    letter-spacing:.16em;
    flex:1 1 150px;
    max-width:210px;
  }
  .lp-hero-scroll-cue { height:42px; }
  .lp-footer-brandmark { padding-top:34px; }
  .lp-footer-brandmark img { width:104px; }
  .lp-adema-credit { margin-top:24px; font-size:9px; letter-spacing:.12em; line-height:1.7; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-loader-logo-wrap::before, .lp-loader-logo-wrap::after,
  .lp-hero-scroll-cue::after { animation:none !important; }
  .lp-hero-word, .lp-hero-seal, .lp-hero-badge {
    opacity:1 !important;
    transform:none !important;
    filter:none !important;
    transition:none !important;
  }
  .lp-hero-bg-depth { transform:none !important; transition:none !important; }
  body > main, body > footer, .lp-site-header { transition:none !important; }
}

html.lp-loader-enabled { overflow: hidden; }
.lp-adema-credit--standalone {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 20;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .lp-adema-credit--standalone { bottom: 12px; font-size: 8px; }
}
.lp-site-header nav > div > button { position: relative; }


/* Final QA sizing and robustness */
@media (max-width:1023px) and (min-width:768px) {
  .brand-logo { width:78px !important; height:78px !important; }
  .lp-nav-shell { min-height:88px !important; }
}
.lp-loader, .lp-loader * { box-sizing:border-box; }
html:not(.lp-loader-enabled) .lp-loader { display:none !important; }

/* Progressive fallback: hero identity/content is visible if animation JS never starts. */
html:not(.lp-loader-enabled):not(.lp-loader-finished) .lp-hero-seal,
html:not(.lp-loader-enabled):not(.lp-loader-finished) .lp-hero-word,
html:not(.lp-loader-enabled):not(.lp-loader-finished) .lp-hero-badge {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  visibility: visible !important;
}

/* === FINAL HEADER TUNING: centered navigation + stronger brand presence === */
@media (min-width: 1024px) {
  .lp-nav-shell {
    position: relative;
    min-height: 116px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .lp-site-header .lp-brand {
    position: relative;
    z-index: 3;
  }

  .lp-site-header .brand-logo {
    width: 104px !important;
    height: 104px !important;
    max-width: none !important;
  }

  .lp-site-header nav[aria-label="Navigation principale"] {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: max-content;
    max-width: calc(100% - 260px);
    justify-content: center !important;
    gap: clamp(12px, 1.5vw, 24px) !important;
    font-size: 12px !important;
    letter-spacing: .11em !important;
    line-height: 1.1;
    z-index: 2;
  }

  .lp-site-header .lp-nav-link {
    font-size: inherit !important;
  }
}

@media (min-width: 1280px) {
  .lp-site-header nav[aria-label="Navigation principale"] {
    font-size: 13px !important;
    gap: clamp(16px, 1.7vw, 28px) !important;
    letter-spacing: .12em !important;
  }
}

@media (max-width: 1023px) {
  .lp-nav-shell {
    min-height: 100px !important;
  }

  .lp-site-header .brand-logo {
    width: 88px !important;
    height: 88px !important;
    max-width: none !important;
  }

  .lp-mobile-menu {
    font-size: 13px !important;
    letter-spacing: .13em !important;
  }

  .lp-mobile-menu a {
    padding-top: 11px !important;
    padding-bottom: 11px !important;
  }
}

@media (max-width: 480px) {
  .lp-nav-shell {
    min-height: 94px !important;
  }

  .lp-site-header .brand-logo {
    width: 82px !important;
    height: 82px !important;
  }

  .lp-mobile-menu {
    font-size: 12px !important;
  }
}
