/* === GLOBAL === */

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: radial-gradient(circle at top, #081a3a, #021028 70%);
  color: #eaf1ff;
}

a { text-decoration: none; color: #e2eaff; transition: 0.3s; }
a:hover { color: #00bfff; }

img { max-width: 100%; border-radius: 10px; }

/* === HEADER (parfaitement centré et équilibré) === */
.main-header {
  width: 87%;
  margin: 40px auto 0;
  border-radius: 25px;
  box-shadow: 0 0 40px rgba(0, 200, 255, 0.55);
  background: radial-gradient(circle at top left, rgba(0, 80, 160, 0.85), rgba(0, 40, 100, 0.85));
  position: relative;
  overflow: visible !important; /* ✅ permet aux icônes et menus de dépasser */
  z-index: 2000; /* pour rester au-dessus du contenu */
}


/* Bande supérieure */
.header-top {
  border-radius: 25px;
  background: linear-gradient(90deg, rgba(0, 45, 90, 0.95), rgba(0, 80, 180, 0.9));
  box-shadow: 0 0 25px rgba(0, 160, 255, 0.4);
  padding: 20px 45px;
}

/* Structure principale équilibrée */
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* logo / recherche / user */
  align-items: center;
}

/* LOGO ZONE */
.logo-area {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  color: #fff;
  font-size: 1.6em;
  font-weight: 600;
  text-shadow: 0 0 10px #00bfff;
}

.logo-area img {
  height: 85px;
  filter: drop-shadow(0 0 12px #00cfff);
}

/* BARRE DE RECHERCHE — centrée */
.search-area {
  display: flex;
  justify-content: center;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, rgba(0,70,150,0.6), rgba(0,40,100,0.6));
  border-radius: 50px;
  border: 1px solid rgba(0,200,255,0.4);
  box-shadow: 0 0 15px rgba(0,200,255,0.25), inset 0 0 8px rgba(0,200,255,0.2);
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  padding: 10px 20px;
  font-size: 15px;
  outline: none;
}

.search-box button {
  background: rgba(0,160,255,0.45);
  border: none;
  color: #fff;
  padding: 10px 18px;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
  border-radius: 0 50px 50px 0;
}

.search-box button:hover {
  background: rgba(0,200,255,0.7);
}

/* Avatar (style de base — utilisé aussi hors header si besoin) */
.avatar {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 2px solid #00cfff;
  box-shadow: 0 0 10px #00dfff;
  object-fit: cover;              /* garde le rond même si l’image n’est pas carrée */
  background: #021028;
  cursor: pointer;
}

/* LANGUE */
.lang-switcher {
  font-size: 15px;
  font-weight: 600;
  margin-right: 8px;
  text-shadow: 0 0 8px rgba(0,200,255,0.6);
}

.lang-switcher a {
  color: #fff;
  text-decoration: none;
  padding: 0 4px;
}

.lang-switcher a.active {
  color: #00eaff;
  text-shadow: 0 0 10px #00eaff;
}

/* MENU BAS */
.main-menu {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 14px 0 15px;
  border-top: 1px solid rgba(0, 180, 255, 0.25);
  background: linear-gradient(180deg, rgba(0,30,90,0.9), rgba(0,20,60,0.85));
  font-weight: 500;
}

.main-menu a {
  color: #d5eeff;
  text-shadow: 0 0 6px rgba(0, 200, 255, 0.4);
  transition: 0.3s;
}

.main-menu a:hover {
  color: #00eaff;
  text-shadow: 0 0 12px #00eaff;
}

/* === SLIDER === */
.slider {
  width: 87%;
  margin: 25px auto;
  border-radius: 20px;
  padding: 25px;
  background: linear-gradient(160deg, rgba(0, 75, 150, 0.6), rgba(0, 120, 255, 0.25));
  box-shadow: 0 0 25px rgba(0, 140, 255, 0.4);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-left { flex: 1; padding-right: 25px; }

.slider-left h2 {
  font-size: 1.8em;
  color: #fff;
  text-shadow: 0 0 12px #00bfff;
  margin-bottom: 10px;
}

.slider-left p { color: #bde8ff; margin-bottom: 15px; }

.slider-left button {
  background: linear-gradient(90deg, #00aaff, #00d9ff);
  border: none;
  padding: 10px 25px;
  border-radius: 25px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 0 10px #00bfff;
}
.slider-left button:hover { transform: translateY(-2px); box-shadow: 0 0 15px #00e0ff; }

.slider-right { width: 35%; }
.slider-right img {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0, 180, 255, 0.4);
  opacity: 0.95;
}

/* === MAIN CONTAINER === */
.container {
  display: grid;
  grid-template-columns: 22% 1fr 22%;
  gap: 25px;
  width: 90%;
  margin: 35px auto;
}

/* === SIDEBARS + CONTENT === */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.content { display: flex; flex-direction: column; gap: 20px; }

/* === CARDS (intérieur clair + bord néon) === */
.card {
  position: relative;
  border-radius: 22px;
  padding: 20px;
  color: #0b1a30;
  background: linear-gradient(180deg, rgba(240, 250, 255, 0.95), rgba(200, 230, 255, 0.9));
  box-shadow: 0 0 25px rgba(0, 200, 255, 0.4), inset 0 0 25px rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(0, 200, 255, 0.45);
  transition: all 0.3s ease;
}
.card::before {
  content: "";
  position: absolute; inset: 0; border-radius: 22px;
  box-shadow: 0 0 30px rgba(0, 200, 255, 0.5);
  opacity: 0.5; z-index: -1;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 35px rgba(0, 220, 255, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.25);
}
.card h3 { color: #00254d; font-weight: 600; margin-bottom: 10px; }
.card p  { color: #003366; }

/* === ANNOUNCEMENT === */
.announcement {
  background: linear-gradient(180deg, #fffad0, #ffe97a);
  color: #1a1a1a;
  border: 1px solid rgba(255, 230, 100, 0.7);
  box-shadow: 0 0 25px rgba(255, 250, 150, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.4);
}

/* === MEMBERS === */
.members .avatars { display: flex; gap: 10px; }
.members .avatars img {
  width: 50px; border-radius: 50%;
  border: 2px solid #00bfff; box-shadow: 0 0 8px rgba(0, 200, 255, 0.5);
}

/* === FOOTER === */
.footer {
  text-align: center; margin-top: 50px; padding: 25px;
  color: #c0d8ff; background: rgba(0, 40, 80, 0.95);
  border-top: 1px solid rgba(0, 191, 255, 0.2);
  box-shadow: 0 -5px 20px rgba(0, 120, 255, 0.2);
  border-radius: 20px 20px 0 0;
}

/* === WIDGETS DYNAMIQUES (depuis Cart Admin) === */
.widgets-top {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 25px;
  width: 90%; margin: 25px auto 0 auto;
}
.widgets-top .card {
  flex: 1 1 300px; max-width: 420px; text-align: center;
  background: linear-gradient(180deg, rgba(230,250,255,0.95), rgba(190,230,255,0.85));
  border-radius: 20px; box-shadow: 0 0 25px rgba(0,200,255,0.4);
  border: 1px solid rgba(0,200,255,0.3); transition: all 0.3s ease-in-out;
}
.widgets-top .card:hover { transform: translateY(-5px); box-shadow: 0 0 40px rgba(0,240,255,0.6); }
.widgets-top img { max-width: 100%; border-radius: 12px; margin-top: 10px; box-shadow: 0 0 12px rgba(0,180,255,0.4); }

/* --- Structure principale avec les colonnes --- */
.main-layout {
  display: grid; grid-template-columns: 22% 1fr 22%;
  gap: 25px; width: 90%; margin: 35px auto;
}

/* --- Colonnes gauche et droite --- */
.sidebar.left, .sidebar.right { display: flex; flex-direction: column; gap: 20px; }

/* --- Cartes de widgets génériques --- */
.sidebar .card, .widgets-top .card {
  color: #012a4a;
  background: linear-gradient(180deg, rgba(250,255,255,0.9), rgba(220,240,255,0.85));
  border: 1px solid rgba(0,200,255,0.3);
  box-shadow: 0 0 25px rgba(0,200,255,0.4), inset 0 0 15px rgba(255,255,255,0.25);
  border-radius: 18px; padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sidebar .card:hover { transform: translateY(-4px); box-shadow: 0 0 35px rgba(0,240,255,0.6); }
.card h3 { color: #003366; font-weight: 600; font-size: 1.1em; margin-bottom: 10px; }
.card img { display: block; margin: 10px auto; border-radius: 10px; box-shadow: 0 0 10px rgba(0,180,255,0.4); }

.widget-content { color: #003366; font-size: 0.95em; line-height: 1.5; }
.widget-content iframe { width: 100%; border: none; border-radius: 10px; box-shadow: 0 0 15px rgba(0,200,255,0.3); }

/* ======================
   FOND ANIMÉ LOGIN PAGE
   ====================== */
body.login-page {
  margin: 0;
  height: 100vh;
  background: radial-gradient(ellipse at bottom, #0d1b2a 0%, #000 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Étoiles */
.star { position: absolute; width: 2px; height: 2px; background: white; opacity: 0.8; border-radius: 50%; animation: moveStars 120s linear infinite; }
@keyframes moveStars { from { transform: translateY(0); } to { transform: translateY(-2000px); } }

/* ======================
   LOGIN BOX
   ====================== */
.login-box {
  display: flex;
  z-index: 2;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  padding: 40px 60px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  color: #fff;
  gap: 60px;
}
.login-left { max-width: 320px; }
.login-left .logo { width: 80px; margin-bottom: 20px; }
.login-form { display: flex; flex-direction: column; min-width: 260px; }
.login-form h2 { margin-bottom: 20px; }
.login-form input { margin-bottom: 15px; padding: 10px; border-radius: 8px; border: none; outline: none; }
.login-form button {
  background: linear-gradient(90deg, #007bff, #00bfff);
  color: #fff; border: none; border-radius: 8px; padding: 12px;
  font-weight: bold; cursor: pointer; transition: 0.3s;
}
.login-form button:hover { opacity: 0.9; }
.error { background: rgba(255,0,0,0.2); padding: 10px; border-radius: 8px; margin-bottom: 10px; color: #ff8080; }
.signup { margin-top: 10px; font-size: 14px; }
.signup a { color: #00bfff; text-decoration: none; }
.signup a:hover { text-decoration: underline; }

/* === HEADER FIX CLEAN === */
.main-header {
  width: 87%;
  margin: 40px auto 0;
  border-radius: 25px;
  box-shadow: 0 0 40px rgba(0, 200, 255, 0.55);
  background: radial-gradient(circle at top left, rgba(0, 80, 160, 0.85), rgba(0, 40, 100, 0.85));
  position: relative;
  overflow: visible !important;
  z-index: 10;
}

.header-top {
  position: relative;
  border-radius: 25px;
  background: linear-gradient(90deg, rgba(0, 45, 90, 0.95), rgba(0, 80, 180, 0.9));
  box-shadow: 0 0 25px rgba(0, 160, 255, 0.4);
  padding: 20px 45px;
  isolation: isolate; /* ✅ empêche le fond d’écraser les enfants */
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: relative;
}

/* === ICONES UTILISATEUR === */
.user-icons {
  position: absolute;
  top: 28px;
  right: 60px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #aee2ff;
  font-size: 1.3em;
  z-index: 10000; /* ✅ au-dessus du fond */
}

/* Icônes */
.user-icons i,
#notif-wrapper,
#notif-btn {
  position: relative;
  z-index: 10001;
  cursor: pointer;
  color: #00eaff;
  text-shadow: 0 0 10px rgba(0,255,255,0.6);
  transition: 0.3s;
}
.user-icons i:hover {
  color: #00ffff;
  text-shadow: 0 0 15px rgba(0,255,255,0.8);
}

/* === AVATAR + MENU === */
.user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  z-index: 10002;
}

.user-menu .avatar {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 2px solid #00eaff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
  object-fit: cover;
  background: radial-gradient(circle at center, #0a1a2f, #000820);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.user-menu .avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 18px #00ffff;
}

.user-menu .dropdown {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 65px;
  background: rgba(0, 25, 60, 0.98);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  min-width: 210px;
  list-style: none;
  padding: 8px 0;
  z-index: 10003;
  backdrop-filter: blur(8px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  transform: translateY(-10px);
}
.user-menu:hover .dropdown,
.user-menu:focus-within .dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
.user-menu .dropdown li {
  padding: 10px 20px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.08);
}
.user-menu .dropdown li:last-child { border-bottom: none; }
.user-menu .dropdown li a {
  color: #cde9ff;
  text-decoration: none;
  font-size: 15px;
  display: block;
  transition: color 0.25s ease, background 0.25s ease;
}
.user-menu .dropdown li:hover a {
  background: rgba(0, 180, 255, 0.2);
  color: #00eaff;
}

/* === MENU PRINCIPAL === */
.main-menu {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 14px 0 15px;
  border-top: 1px solid rgba(0, 180, 255, 0.25);
  background: linear-gradient(180deg, rgba(0,30,90,0.9), rgba(0,20,60,0.85));
  font-weight: 500;
  position: relative;
  z-index: 1;
}
.user-icons img {
  transition: transform 0.2s ease, filter 0.3s ease;
}
.user-icons img:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px #00ffff);
}
.notif-item strong { color: #00ffff; display: block; }
.notif-item:hover { background: rgba(0,200,255,0.1) !important; }

/* === FIX NOTIFICATIONS BOX === */
#notif-wrapper {
  position: relative;
  z-index: 20000 !important;
}

#notif-box {
  position: absolute;
  right: -60px;
  top: 38px;
  width: 300px;
  background: rgba(0,30,60,0.97);
  color: white;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0,255,255,0.3);
  padding: 10px;
  z-index: 30000 !important; /* ✅ AU-DESSUS DE TOUT */
  max-height: 400px;
  overflow-y: auto;
  backdrop-filter: blur(4px);
}
/* === FIX VISIBILITÉ NOTIFICATIONS === */
.main-header {
  overflow: visible !important;
  position: relative;
  z-index: 1;
}

.header-top {
  position: relative;
  z-index: 10 !important; /* ✅ pour être au-dessus du menu */
}

.main-menu {
  position: relative;
  z-index: 5;
}

/* === FIX NOTIFICATIONS BOX === */
#notif-wrapper {
  position: relative;
  z-index: 99999 !important;
}

#notif-box {
  position: absolute;
  right: -60px;
  top: 38px;
  width: 300px;
  background: rgba(0,30,60,0.97);
  color: white;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0,255,255,0.3);
  padding: 10px;
  z-index: 999999 !important; /* ✅ au-dessus de tout */
  max-height: 400px;
  overflow-y: auto;
  backdrop-filter: blur(4px);
}

#live-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(145deg, #001a33, #002b55);
  color: #fff;
  padding: 16px 22px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,255,255,0.3);
  font-family: Poppins, sans-serif;
  font-size: 15px;
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  z-index: 999999;
}
#live-toast.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
#live-toast .sender {
  font-weight: 600;
  color: #00eaff;
  margin-bottom: 3px;
}
#live-toast .message {
  font-size: 14px;
}
/* 🧩 Correction menu mobile visible sur desktop */
@media (min-width: 769px) {
  .mobile-menu {
    display: none !important;
  }
}
/* === Suppression du menu mobile sur desktop === */
#mobile-menu-btn {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Le menu mobile lui-même aussi */
#mobile-menu-panel {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
