/* Typographie et couleurs Edumanga */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* Fond du pop-up */
.popup-connexion {
  display: none; /* Caché par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 999;
  justify-content: center;
  align-items: center;
}


body {
    font-family: 'Roboto', sans-serif;
    background-color: #fff;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Bannière */
.banner {
    background: #fff;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 4px solid #1DD6D1;
}

.banner-logo img {
    height: 120px;
    margin-bottom: 10px;
}

/* Menu */
.menu ul {
    list-style: none;
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.menu a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 24px;
    padding: 10px 20px;
    border-radius: 12px;
    transition: 0.3s;
}

.menu a:hover {
    background-color: #1DD6D1;
    color: #fff;
}

/* Section cours */
.course-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.course-section h1 {
    font-size: 48px;
    color: #1DD6D1;
    margin-bottom: 40px;
    text-align: left;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-card img {
    width: 100%;
    display: block;
}

.course-info {
    padding: 20px;
}

.course-info h3 {
    font-size: 24px;
    color: #333;
    margin: 0 0 10px;
}

.course-info p {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.course-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
}

.new-price {
    color: #1DD6D1;
    font-weight: 700;
    font-size: 20px;
}

.btn-buy {
    display: inline-block;
    padding: 10px 25px;
    background: #1DD6D1;
    color: #fff;
    font-weight: 700;
    border-radius: 25px;
    text-decoration: none;
    transition: 0.3s;
}

.btn-buy:hover {
    background: #17B8B3;
}


/* Bandeau promo */
.promo-banner {
    background: linear-gradient(90deg, #1DD6D1, #17B8B3);
    color: white;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    padding: 15px 10px;
    letter-spacing: 1px;
}


/* Layout principal */
.main-layout {
    display: flex;
    max-width: 1400px;
    margin: 30px auto;
    gap: 30px;
    padding: 0 20px;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 20px;
    flex-shrink: 0;
    height: fit-content;
}

.sidebar h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #1DD6D1;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.sidebar ul li {
    padding: 8px 0;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    border-radius: 12px;
    padding-left: 10px;
    transition: 0.3s;
}

.sidebar ul li:hover {
    background: #FFEEE8;
    color: #1DD6D1;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 18px;
    margin-bottom: 20px;
    color: #666;
}

.breadcrumb a {
    color: #1DD6D1;
    text-decoration: none;
}

.breadcrumb span {
    margin-right: 5px;
}

/* Course grid updated to handle sidebar */
.course-section {
    flex: 1;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.course-stats {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    color: #888;
    font-size: 16px;
}


/* Sticky Sidebar */
.sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
}


/* Nouveau Header Layout */
.banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 10px 30px;
    border-bottom: 4px solid #1DD6D1;
}

.banner-left img {
    height: 150px;
}

.banner-center ul {
    list-style: none;
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.banner-center a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 22px;
    padding: 10px 15px;
    border-radius: 12px;
    transition: 0.3s;
}

.banner-center a:hover {
    background-color: #1DD6D1;
    color: #fff;
}

.banner-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon {
    font-size: 28px;
    text-decoration: none;
}

.btn-signup {
    background: #1DD6D1;
    color: #fff;
    font-weight: 700;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    transition: 0.3s;
}

.btn-signup:hover {
    background: #17B8B3;
}


/* Adjust header alignment */
.banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 30px;
    margin-top: 0;
}

.banner-left img {
    height: 140px;
}

.banner-center ul {
    display: flex;
    gap: 35px;
}

.banner-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-icon svg {
    display: block;
}

.btn-signup {
    background: #1DD6D1;
    color: #fff;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    transition: 0.3s;
}


/* Cart badge */
.cart-icon {
    position: relative;
    display: inline-block;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #FF4B4B;
    color: white;
    font-weight: 700;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}


/* Animation du panier */
@keyframes shakeAnim {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 0); }
    50% { transform: translate(2px, 0); }
    75% { transform: translate(-2px, 0); }
    100% { transform: translate(0, 0); }
}

.cart-icon.shake {
    animation: shakeAnim 0.5s;
}


/* Header single-line aligned */
.banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 30px;
    background: #fff;
    border-bottom: 4px solid #1DD6D1;
    margin-top: 0;
}

.banner-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.banner-left .logo {
    height: 80px;
}

.banner-left .menu ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.banner-left .menu a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 20px;
    padding: 8px 12px;
    border-radius: 12px;
    transition: 0.3s;
}

.banner-left .menu a:hover {
    background-color: #1DD6D1;
    color: #fff;
}

.banner-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-signup {
    background: #1DD6D1;
    color: #fff;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 25px;
    text-decoration: none;
    transition: 0.3s;
}

.btn-signup:hover {
    background: #17B8B3;
}

/* Corrected header alignment */
.banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 30px;
    background: #fff;
    border-bottom: 4px solid #1DD6D1;
}
.banner-left {
    display: flex;
    align-items: center;
    gap: 40px;
}
.banner-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}


/* Ajustements finaux pour logo et centrage */
.banner-left .logo {
    max-height: 120px;
}

@media (max-width: 1200px) {
    .banner-left .logo {
        max-height: 100px;
    }



    /* Forcer menu classique masqué en mobile */
    .banner-center {
        display: none !important;
        width: 100%;
        order: 3;
        z-index: 1000;
    }

    .banner-center.active {
        display: flex !important;
        justify-content: center;
    }

    /* Centrage contenu */
    .course-section {
        text-align: center;
    }

    .course-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .course-card {
        max-width: 90%;
        margin: 0 auto;
        text-align: center;
    }
}


@media (max-width: 1200px) {

    /* Sidebar d'abord, puis cours */
    .main-layout {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .sidebar {
        order: 1;
        width: 90%;
        margin: 0 auto 20px auto;
        text-align: center;
    }

    .course-section {
        order: 2;
        text-align: center;
        width: 100%;
    }

    .course-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .course-card {
        max-width: 90%;
        margin: 0 auto;
        text-align: center;
    }
}


/* Classe pour masquer certains éléments uniquement en mobile */
@media (max-width: 768px) {
    .mobile-hide {
        display: none !important;
    }
}

/* -------------------------
   Ajustements Mobile Strict
------------------------- */
@media (max-width: 768px) {

    /* Réorganisation des éléments */
    .banner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .banner-left {
        order: 1;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .banner-right {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    /* Bouton Connexion style bordure émeraude */
    .btn-login-mobile {
        display: block;
        padding: 12px 30px;
        border: 2px solid #1DD6D1;
        color: #1DD6D1;
        background: #fff;
        border-radius: 20px;
        font-weight: 700;
        text-decoration: none;
        text-align: center;
        width: 60%;
    }

    .btn-login-mobile:hover {
        background: #1DD6D1;
        color: #fff;
    }

    /* Bouton Créer un compte */
    .btn-signup {
        width: 60%;
        padding: 12px 30px;
        border-radius: 20px;
        font-weight: 700;
        text-align: center;
    }

    /* Bouton Catégories style émeraude */
    .sidebar-toggle {
        display: block;
        margin: 15px auto;
        width: 60%;
        padding: 12px 30px;
        background: #1DD6D1;
        color: #fff;
        font-weight: 700;
        border-radius: 20px;
        font-size: 16px;
        text-align: center;
        cursor: pointer;
        border: none;
    }

    .sidebar-toggle:hover {
        background: #17B8B3;
    }

    /* Hamburger plus gros et centré sous les boutons */
    .hamburger {
        order: 4;
        display: block;
        font-size: 36px;
        font-weight: bold;
        margin-top: 15px;
        cursor: pointer;
    }

    /* Masquer menu classique mobile */
    .banner-center {
        display: none !important;
    }

    /* Contenu centré */
    .course-section {
        order: 5;
        text-align: center;
        width: 100%;
    }

    .course-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .course-card {
        max-width: 90%;
        margin: 0 auto;
        text-align: center;
    }
}

/* -------------------------
   Tablette et Desktop
------------------------- */
@media (min-width: 769px) {
    /* Hamburger masqué */
    .hamburger {
        display: none !important;
    }
}


@media (max-width: 1199px) {
    .mobile-hide {
        display: none !important;
    }
}

/* Overlay foncé derrière le menu */
.menu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  transition: opacity 0.3s ease-in-out;
}

.menu-overlay.active {
  display: block;
  opacity: 1;
}

/* Menu hamburger en version verticale déroulante */
@media (max-width: 768px) {
  .banner-center {
    display: none;
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    z-index: 999;
    padding: 20px 0;
    transition: all 0.3s ease-in-out;
  }

  .banner-center.active {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: slideDown 0.3s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translate(-50%, -20px);
    }
    to {
      opacity: 1;
      transform: translate(-50%, 0);
    }
  }

  .banner-center ul {
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 0;
  }

  .banner-center ul li {
    list-style: none;
  }

  .banner-center a {
    font-size: 20px;
    padding: 10px 20px;
    border-radius: 12px;
    width: 80%;
    text-align: center;
    display: block;
    color: #333;
    background: #f9f9f9;
  }

  .banner-center a:hover {
    background: #1DD6D1;
    color: white;
  }

  /* Bouton "X" pour fermer le menu */
  .close-menu {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s;
  }

  .close-menu:hover {
    color: #1DD6D1;
  }
}
.popup-connexion {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.popup-header h2 {
  color: #1DD6D1;
  font-size: 28px;
  margin: 0;
}

.popup-box {
  background: #fff;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 380px;
  animation: fadeIn 0.3s ease-in-out;
}

.popup-box {
  background: #fff;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 380px;
  animation: fadeIn 0.3s ease-in-out;
}

.popup-box h2 {
  color: #1DD6D1;
  font-size: 28px;
  margin-bottom: 20px;
}

/* --- Boutons sociaux --- */
.social-btn {
  width: 100%;
  padding: 10px 15px;
  border-radius: 12px;
  font-weight: 700;
  margin-bottom: 15px;
  cursor: pointer;
  border: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-btn img {
  height: 22px;
}

.social-btn.facebook { background: #3b5998; color: #fff; }
.social-btn.apple { background: #000; color: #fff; }

/* --- Bloc Email / Mot de passe --- */
.login-fields {
  background: #f9f9f9;
  border: 2px solid #1DD6D1;
  border-radius: 15px;
  padding: 15px;
  width: 100%;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-fields input {
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  color: #1DD6D1;
  outline: none;
}

/* --- Bouton de connexion --- */
.btn-login {
  background: #1DD6D1;
  color: white;
  font-weight: 700;
  border: none;
  border-radius: 20px;
  padding: 12px 30px;
  margin-top: 10px;
  cursor: pointer;
  transition: 0.3s;
  width: 100%;
}

.btn-login:hover {
  background: #17B8B3;
}

/* --- Liens du bas --- */
.popup-box .bottom-links {
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
}

.popup-box .bottom-links a {
  color: #1DD6D1;
  text-decoration: none;
  font-weight: 600;
}

.popup-box .bottom-links a:hover {
  text-decoration: underline;
}

.close-popup {
  font-size: 32px;
  cursor: pointer;
  color: #1DD6D1;
  transition: 0.2s;
}

.close-popup:hover {
  color: #17B8B3;
}