/* ============================================
   APPSM - HEADER PREMIUM
   Fichier: css/header.css
============================================ */

/* ============================================
   1. TOP BAR (Petite bande infos - Dégradée)
============================================ */
.top-bar {
  background: linear-gradient(
    90deg,
    var(--navy) 0%,
    var(--purple) 50%,
    var(--orange) 100%
  );
  color: var(--white);
  padding: 10px 0;
  font-size: 13px;
  position: relative;
  z-index: 1001;
  overflow: hidden;
}

.top-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  animation: shineBar 8s infinite;
}

@keyframes shineBar {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.top-bar-left a {
  color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.top-bar-left a:hover {
  color: var(--white);
  transform: translateY(-1px);
}

.top-bar-left a i {
  color: var(--white);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.2);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.top-bar-text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-text i {
  color: var(--white);
  animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.top-bar-socials {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 15px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.top-bar-socials a {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 12px;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.top-bar-socials a:hover {
  background: var(--white);
  color: var(--purple);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================
   2. HEADER TOP (Grande bannière violette)
============================================ */
.header-top {
  background: linear-gradient(
    135deg,
    #4a1e5c 0%,
    var(--purple) 50%,
    #4a1e5c 100%
  );
  padding: 20px 0;
  position: relative;
  overflow: hidden;
}

/* Effet décoratif de fond */
.header-top::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(232, 103, 42, 0.15) 0%,
    transparent 70%
  );
}

.header-top::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 70%
  );
}

.header-top .container {
  display: flex;
  align-items: center;
  gap: 30px;
  position: relative;
  z-index: 2;
}

/* ===== LOGO ===== */
.logo-wrapper {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border-radius: 50%;
  padding: 8px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  transition: var(--transition);
}

.logo-wrapper:hover {
  transform: scale(1.05) rotate(-5deg);
  box-shadow: 0 12px 35px rgba(232, 103, 42, 0.4);
}

.logo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===== ANIMATIONS ===== */
@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shineText {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes pulseText {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

/* ===== TEXTE ENTÊTE ===== */
.header-text {
  flex: 1;
}

.header-text h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.1;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #ffffff 40%,
    #e8b24c 50%,
    #ffffff 60%,
    #ffffff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation:
    slideInLeft 1s ease-out,
    shineText 4s linear infinite,
    pulseText 3s ease-in-out infinite;
}

.header-text p {
  color: #ffffff;
  font-size: 16px;
  font-weight: 300;
  margin-top: 6px;
  letter-spacing: 0.5px;
  animation: fadeInUp 1.2s ease-out 0.3s both;
  text-transform: uppercase;
}

/* ===== BOUTON NOUS SOUTENIR ===== */
.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background-color: var(--orange);
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 8px;
  border: 2px solid var(--orange);
  transition: all 0.3s ease;
  white-space: nowrap;
  animation: fadeInUp 1.2s ease-out 0.5s both;
  box-shadow: 0 8px 25px rgba(232, 103, 42, 0.4);
  font-family: "Poppins", sans-serif;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.support-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: 0.6s;
}

.support-btn:hover::before {
  left: 100%;
}

.support-btn:hover {
  background-color: #ffffff;
  color: #4a1e5c;
  border-color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.support-btn i {
  animation: heartbeat 1.5s infinite;
}

/* ============================================
   3. NAVBAR (Barre de menu blanche)
============================================ */
.navbar {
  background-color: #ffffff;
  box-shadow: 0 4px 15px rgba(74, 30, 92, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 6px 25px rgba(74, 30, 92, 0.15);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
}

.nav-menu {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a,
.nav-menu > li > .menu-parent {
  display: block;
  padding: 22px 14px;
  color: #4a1e5c;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  font-family: "Poppins", sans-serif;
  position: relative;
}

.nav-menu > li > a::before,
.nav-menu > li > .menu-parent::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--orange);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-menu > li > a:hover::before,
.nav-menu > li > .menu-parent:hover::before,
.nav-menu > li.active > a::before {
  width: 80%;
}

.nav-menu > li > a:hover,
.nav-menu > li > .menu-parent:hover {
  color: #ffffff;
  background-color: var(--orange);
}

.nav-menu > li > a:hover::before,
.nav-menu > li > .menu-parent:hover::before {
  background: #ffffff;
}

.has-submenu > a::after,
.has-submenu > .menu-parent::after {
  content: " ▾";
  font-size: 11px;
  margin-left: 4px;
}

/* ===== SOUS-MENUS ===== */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: linear-gradient(180deg, #4a1e5c 0%, var(--purple) 100%);
  min-width: 280px;
  list-style: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s ease;
  padding: 0;
  margin: 0;
  border-top: 3px solid var(--orange);
}

.has-submenu:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  font-family: "Inter", sans-serif;
  text-transform: none;
  letter-spacing: 0;
}

.submenu li a::before {
  content: "›";
  color: var(--orange);
  font-size: 18px;
  font-weight: bold;
  transition: var(--transition);
}

.submenu li a:hover {
  background-color: var(--orange);
  padding-left: 30px;
}

.submenu li a:hover::before {
  color: #ffffff;
  transform: translateX(3px);
}

.submenu li:last-child a {
  border-bottom: none;
}

/* ============================================
   4. BOUTON HAMBURGER MOBILE
============================================ */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  z-index: 1002;
  background: var(--orange);
  border-radius: 8px;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: #ffffff;
  border-radius: 3px;
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ============================================
   5. RESPONSIVE
============================================ */
@media (max-width: 1200px) {
  .nav-menu > li > a,
  .nav-menu > li > .menu-parent {
    padding: 20px 10px;
    font-size: 13.5px;
  }
}

@media (max-width: 1024px) {
  .header-text h1 {
    font-size: 32px;
  }

  .header-text p {
    font-size: 13px;
  }

  .logo-wrapper {
    width: 85px;
    height: 85px;
  }

  .support-btn {
    padding: 12px 20px;
    font-size: 12px;
  }

  .menu-toggle {
    display: flex;
  }

  .navbar {
    position: relative;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: #ffffff;
    flex-direction: column;
    padding: 80px 0 30px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    overflow-y: auto;
    z-index: 1001;
    justify-content: flex-start;
    align-items: stretch;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(
      90deg,
      var(--navy) 0%,
      var(--purple) 50%,
      var(--orange) 100%
    );
  }

  .nav-menu > li {
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #eee;
  }

  .nav-menu > li > a,
  .nav-menu > li > .menu-parent {
    padding: 15px 25px;
    font-size: 14px;
  }

  .nav-menu > li > a::before,
  .nav-menu > li > .menu-parent::before {
    display: none;
  }

  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    min-width: auto;
    border-top: none;
    background: rgba(74, 30, 92, 0.05);
  }

  .submenu li a {
    color: #4a1e5c;
    padding: 12px 40px;
    border-bottom: 1px solid rgba(74, 30, 92, 0.1);
  }

  .submenu li a::before {
    color: var(--orange);
  }

  .submenu li a:hover {
    background: var(--orange);
    color: #ffffff;
  }

  .submenu.show {
    display: block;
  }
}

@media (max-width: 768px) {
  .header-top {
    padding: 15px 0;
  }

  .header-top .container {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .header-text {
    text-align: center;
  }

  .header-text h1 {
    font-size: 26px;
  }

  .header-text p {
    font-size: 11px;
  }

  .logo-wrapper {
    width: 75px;
    height: 75px;
  }

  .menu-toggle {
    position: fixed;
    right: 15px;
    top: 15px;
    transform: none;
  }

  .top-bar-left {
    gap: 12px;
  }

  .top-bar-left a span {
    display: none;
  }

  .top-bar-text {
    display: none;
  }

  .top-bar-socials {
    border-left: none;
    padding-left: 0;
  }
}

@media (max-width: 480px) {
  .top-bar {
    display: none;
  }
}

/* ============================================
   6. OVERLAY MOBILE
============================================ */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74, 30, 92, 0.7);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Slogan APPS-MALI */
.slogan-keneya {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: -8px;
  margin-bottom: 5px;
}
