/* ======RESET & BASICS===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #ede8d0;
  color: #2b1114;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

a {
  color: #2b1114;
}

/*======NAVIGATION MENU ========*/
nav ul.menu {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-direction: row;
  background: #ca3504;
}

nav ul.menu li {
  position: relative;
  width: auto;
}

nav a {
  display: block;
  color: white;
  padding: 14px 16px;
  text-decoration: none;
  transition: background-color 0.3s;
}

nav a:hover {
  background-color: #d39a1c;
}

/* Icon + text only for the Accueil link */
nav a.nav-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
}

nav a.nav-home .nav-icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  opacity: 0.95;
  transform: translateY(-1px);
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  background: rgba(202, 53, 4, 0.85);
  border-radius: 0 0 8px 8px;
  flex-direction: column;
  min-width: 180px;
  list-style-type: none;
  z-index: 2;
}

.has-submenu:hover .submenu {
  display: flex;
}

.submenu a {
  padding: 10px 16px;
  text-align: left;
  white-space: nowrap;
}

.submenu-toggle {
  display: block;
  color: white;
  padding: 14px 16px;
  text-decoration: none;
  cursor: pointer;
  background: inherit;
  transition: background-color 0.3s;
}

.submenu-toggle:hover {
  background-color: #d39a1c;
}

/* MAIN CONTENT WRAPPER */
.main-content {
  display: flex;
  text-align: justify;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 20px;
}

/* ====== INTRO TEXT ====== */
.intro-text {
  width: 100%;
  max-width: 900px;
  padding: 25px 40px;

  line-height: 1.45;
  font-size: 1rem;
  text-align: justify;
}

/* ====== VIDEO + CHAPTERS ====== */
.video-container {
  width: 100%;
  max-width: 820px;
  margin-bottom: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

video {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* ========= FOOTER ===========*/
footer {
  width: 100%;
  align-self: stretch;
  text-align: center;
  background: #c5ba9a;
  padding: 20px;
  margin-top: auto;
}

footer a {
  color: #2b1114;
  text-decoration: underline;
  transition: color 0.3s;
}

/* ========== RESPONSIVE ===========*/

@media (max-width: 900px) {
  #courses {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  nav ul.menu {
    flex-direction: column;
    text-align: center;
  }

  nav ul.menu li {
    width: 100%;
  }

  header h1 {
    font-size: 1.2em;
  }

  header h4 {
    font-size: 1em;
  }
}
@media (max-width: 600px) {
  #courses {
    grid-template-columns: 1fr;
  }

  .submenu {
    position: static;
    background: rgba(202, 53, 4, 0.95);
    width: 100%;
    text-align: center;
    padding: 10px 0;
  }
  .submenu a {
    padding: 18px;
    font-size: 1.1em;
  }

  .has-submenu > .submenu-toggle::after {
    content: " ▾";
    font-size: 1.2em;
  }
}
