/* ================= RESET ================= */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:"Poppins",sans-serif;
}

html{
  scroll-behavior:smooth;
  overflow-x: hidden;
}

/* ================= BASE BACKGROUND (MATCH LOGIN) ================= */

body{
  color:#fff;
  overflow-x:hidden;

  background:
    linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.65)),
    url("images/Hero-imggg.jpg");

  background-size:cover;
  background-position:center;

  position:relative;
}

/* OVERLAY PREMIUM (IDENTIQUE LOGIN STYLE) */

body::before{
  content:'';
  position:absolute;
  inset:0;

  background:linear-gradient(
    135deg,
    rgba(1,98,136,0.88),
    rgba(0,71,99,0.82),
    rgba(13,28,34,0.92)
  );

  z-index:0;
}

/* GOLD GLOW EFFECT */

body::after{
  content:'';
  position:absolute;

  width:420px;
  height:420px;

  background:rgba(255,204,0,0.12);
  border-radius:50%;
  filter:blur(120px);

  top:-120px;
  right:-120px;

  z-index:0;
}

/* ================= LAYOUT ================= */

.sidebar,
.main-content{
  position:relative;
  z-index:2;
}

/* ================= SIDEBAR ================= */

.sidebar{
  position:fixed;
  top:0;
  left:0;

  width:280px;
  height:100vh;

  background:rgba(255,255,255,0.08);
  backdrop-filter:blur(24px);

  border-right:1px solid rgba(255,255,255,0.12);

  padding:30px 20px;
}

/* LOGO */

.logo-area{
  text-align:center;
  margin-bottom:40px;
}

.logo-area img{
  width:90px;
}

/* MENU */

.sidebar-menu{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.sidebar-menu a,
.logout-btn{
  display:flex;
  align-items:center;
  gap:14px;

  padding:15px 18px;

  border-radius:16px;

  text-decoration:none;

  color:#cbd5e1;

  background:rgba(255,255,255,0.03);

  border:1px solid rgba(255,255,255,0.08);

  transition:0.3s ease;

  font-size:0.95rem;
  font-weight:500;
}

.sidebar-menu a:hover,
.logout-btn:hover{
  background:rgba(255,204,0,0.12);
  color:#ffcc00;
  border-color:rgba(255,204,0,0.25);
}

.sidebar-menu a.active{
  background:#ffcc00;
  color:#08131b;
  font-weight:700;
}

/* ================= MAIN ================= */

.main-content{
  margin-left:280px;
  padding:35px;
}

/* ================= HERO ================= */

.hero-section{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:25px;

  margin-bottom:30px;
}

.hero-left,
.hero-card{
  background:rgba(255,255,255,0.08);
  backdrop-filter:blur(24px);

  border:1px solid rgba(255,255,255,0.12);
  border-radius:28px;

  padding:35px;

  box-shadow:
    0 20px 60px rgba(0,0,0,0.35),
    inset 0 1px 1px rgba(255,255,255,0.05);
}

/* BADGE */

.premium-badge{
  display:inline-block;

  background:rgba(255,204,0,0.12);
  color:#ffcc00;

  padding:10px 16px;

  border-radius:999px;

  font-size:0.82rem;
  font-weight:600;
}

/* TITLES */

.hero-left h1{
  font-size:2.4rem;
  margin-top:12px;
}

.hero-left p{
  color:rgba(255,255,255,0.75);
  margin-top:10px;
  line-height:1.6;
}



/* ================= BUTTONS ================= */

.hero-btn,
.continue-btn,
.settings-actions button{
  display:inline-block;

  padding:14px 22px;

  border-radius:14px;

  font-weight:700;

  text-decoration:none;

  cursor:pointer;

  transition:0.3s ease;

  background:#ffcc00;
  color:#08131b;

  border:none;

  box-shadow:0 10px 30px rgba(255,204,0,0.25);
}

#editProfileBtn{
  background: #00c896;
  margin-right: 10px;
}

.hero-btn:hover,
.continue-btn:hover,
.settings-actions button:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 40px rgba(255,204,0,0.35);
}

/* secondary button */

.hero-btn.secondary{
  background:transparent;
  border:1px solid rgba(255,255,255,0.15);
  color:#fff;
}

/* ================= CONTINUE CARD ================= */

.continue-card{
  display:flex;
  align-items:center;
  gap:25px;

  background:rgba(255,255,255,0.08);
  backdrop-filter:blur(24px);

  border:1px solid rgba(255,255,255,0.12);
  border-radius:28px;

  padding:25px;

  margin-bottom:30px;
}

.continue-card img{
  width:220px;
  height:140px;

  object-fit:cover;

  border-radius:18px;
}

/* ================= STATS ================= */

.stats-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:20px;

  margin-bottom:35px;
}

.stat-card{
  background:rgba(255,255,255,0.08);
  backdrop-filter:blur(24px);

  border:1px solid rgba(255,255,255,0.12);

  border-radius:24px;

  padding:28px;

  display:flex;
  align-items:center;
  gap:18px;

  transition:0.3s ease;
}

.stat-card:hover{
  transform:translateY(-6px);
  border-color:rgba(255,204,0,0.25);
}

/* ICON COLORS */

.yellow{color:#ffcc00;background:rgba(255,204,0,0.12);}
.blue{color:#4da3ff;background:rgba(0,140,255,0.12);}
.green{color:#00ffa2;background:rgba(0,255,150,0.12);}
.dark{color:#fff;background:rgba(255,255,255,0.08);}

/* ================= COURSES ================= */

.courses-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:25px;
}

.course-card{
  background:rgba(255,255,255,0.08);
  backdrop-filter:blur(24px);

  border:1px solid rgba(255,255,255,0.12);

  border-radius:24px;

  overflow:hidden;

  transition:0.3s ease;
}

.course-card:hover{
  transform:translateY(-6px);
  border-color:rgba(255,204,0,0.25);
}

.course-image{
  width:100%;
  height:200px;
  object-fit:cover;
}

.course-content{
  padding:22px;
}

.course-content p{
  color:rgba(255,255,255,0.7);
}

/* ================= ACTIVITY ================= */

.activity-item{
  background:rgba(255,255,255,0.08);
  backdrop-filter:blur(24px);

  border:1px solid rgba(255,255,255,0.12);

  padding:20px;

  border-radius:18px;

  display:flex;
  align-items:center;
  gap:14px;
}

/* ================= SETTINGS ================= */

.settings-card{
  background:rgba(255,255,255,0.08);
  backdrop-filter:blur(24px);

  border:1px solid rgba(255,255,255,0.12);

  border-radius:24px;

  padding:30px;
}

.settings-profile{
  display:flex;
  align-items:center;
  gap:18px;

  margin-bottom:25px;
}

.settings-profile img{
  width:90px;
  height:90px;

  border-radius:50%;
}

/* ================= FOOTER ================= */

.dashboard-footer{
  text-align:center;
  color:rgba(255,255,255,0.6);

  padding:25px 0;
}

/* ================= RESPONSIVE ================= */

@media(max-width:1100px){

  .hero-section{
    grid-template-columns:1fr;
  }

  .continue-card{
    flex-direction:column;
  }
}

@media(max-width:900px){

  .sidebar{
    transform:translateX(-100%);
    transition:0.3s ease;
  }

  .sidebar.active{
    transform:translateX(0);
  }

  .main-content{
    margin-left:0;
    padding:90px 20px 30px;
  }
}

@media(max-width:700px){

  .hero-left h1{
    font-size:1.8rem;
  }

  .continue-card img{
    width:100%;
    height:200px;
  }
}

/* ================= MOBILE SIDEBAR FIX (ROBUST VERSION) ================= */

.menu-toggle{
  display:none; /* 👈 IMPORTANT: caché par défaut (desktop) */

  position:fixed;
  top:18px;
  left:18px;

  width:45px;
  height:45px;

  background:#ffcc00;
  color:#08131b;

  border-radius:12px;

  z-index:2000;

  justify-content:center;
  align-items:center;

  cursor:pointer;
}

/* OVERLAY FIX */
.overlay{
  position:fixed;
  inset:0;

  background:rgba(0,0,0,0.55);

  opacity:0;
  visibility:hidden;

  transition:0.25s ease;

  z-index:1500; /* IMPORTANT: entre sidebar et content */
}

.overlay.active{
  opacity:1;
  visibility:visible;
}

/* ================= MOBILE ================= */

@media (max-width: 900px){

  .menu-toggle{
    display:flex;
  }

  /* SIDEBAR MUST ALWAYS BE ABOVE EVERYTHING */
  .sidebar{
    position:fixed !important;
    top:0;
    left:0;

    height:100vh;
    width:280px;

    transform:translateX(-100%);
    transition:transform 0.3s ease;

    z-index:1500; /* IMPORTANT FIX */
  }

  .sidebar.active{
    transform:translateX(0);
  }

  /* MAIN CONTENT STAYS BELOW */
  .main-content{
    margin-left:0 !important;
    padding:90px 20px 30px !important;
    position:relative;
    z-index:1;
  }
}

/* ================= SECTION TITLE FIX SPACING ================= */

.section-title{
  display:flex;
  justify-content:space-between;
  align-items:center;

  margin-bottom:30px; /* 👈 IMPORTANT: espace en bas propre */
}

/* ================= VIEW ALL LINK ================= */

.section-title a{
  position: relative;

  color: rgba(255,255,255,0.75);
  text-decoration: none;

  font-size: 0.95rem;
  font-weight: 500;

  padding: 8px 12px;

  border-radius: 12px;

  transition: 0.3s ease;
}

/* hover premium */
.section-title a:hover{
  color:#ffcc00;
  background: rgba(255,204,0,0.08);
  transform: translateY(-2px);
}

/* underline glow */
.section-title a::after{
  content:"";
  position:absolute;

  left:12px;
  right:12px;
  bottom:4px;

  height:2px;

  background: linear-gradient(90deg, transparent, #ffcc00, transparent);

  transform: scaleX(0);
  transition: 0.3s ease;
}

.section-title a:hover::after{
  transform: scaleX(1);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.course-card {
  background: #111;
  padding: 20px;
  border-radius: 12px;
  color: white;
}

.continue-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 15px;
  background: #00c896;
  color: white;
  border-radius: 8px;
  text-decoration: none;
}

.course-badge {
  position: absolute;
  top: 12px;
  right: 12px;

  background: #00c896;
  color: #fff;

  padding: 6px 10px;
  font-size: 12px;
  border-radius: 20px;

  font-weight: 600;
}

.course-card {
  position: relative;
}