  html {
    scroll-behavior: smooth;
    max-width: 100vw;
    overflow-x: hidden;
  }

  body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #f9f9f9;
    color: #111;
    max-width: 100vw;
    overflow-x: hidden;
  }

/* Navbar */
.navbar {
  background: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  border-bottom: 1px solid #ddd;
  z-index: 10;
}

.navbar .logo {
  font-weight: 700;
  font-size: 1.2rem;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.navbar a {
  text-decoration: none;
  color: #111;
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.navbar a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: #111;
  transition: width 0.3s ease;
}

.navbar a:hover {
  color: #555;
}

.navbar a:hover::after {
  width: 100%;
}

  /* Hero (image d’accueil) */
  .hero {
    width: 100%;
    height: auto;
  }

  .hero img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* Sections générales */
  .section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: auto;
  }

  .section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    margin-top: 0;
    text-align: center;
  }

  /* Réseaux Sociaux */
  .reseaux {
    text-align: center;
  }

  .social-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
  }

  .social-icons a {
    display: inline-flex;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
  }

  .social-icons a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  }

  .social-icons img {
    width: 28px;
    height: 28px;
  }

  /* Formations */
/* Section Formations : 3 cartes centrées et bien espacées */
.formations-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  max-width: 1100px;
}

.formation-card {
  flex: 0 1 300px;
  background: #fff;
  padding: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 12px;
  text-align: center;
  font-weight: 500;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.formation-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.formation-card img.formation-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.formation-card h3 {
  position: relative;
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0.5rem 0 0.8rem;
  cursor: default;
}

.formation-card a {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.formation-card h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background-color: #111;
  transition: width 0.3s ease;
}

.formation-card:hover h3::after {
  width: 100%;
}

.formation-card p {
  font-size: 0.95rem;
  color: #444;
}

  /* CTA (Rejoignez-nous) */
.cta-button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: #111;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
  white-space: nowrap;
  text-align: center;
  margin: 0 auto;

  max-width: 100%;
  box-sizing: border-box;
}

.cta-button:hover {
  background-color: #444;
}


  /* Footer général */
  .site-footer {
    background: #111;
    color: #f1f1f1;
    font-size: 0.9rem;
    padding: 2rem 1rem 1rem;
  }

  .footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
  }

  .footer-col {
    flex: 1 1 200px;
    margin: 1rem;
  }

  .footer-col h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #fff;
  }

  .footer-col p,
  .footer-col li {
    margin: 0.4rem 0;
  }

  .footer-col a {
    color: #ddd;
    text-decoration: none;
  }

  .footer-col a:hover {
    color: #fff;
  }

  .footer-col ul {
    list-style: none;
    padding: 0;
  }

  .footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
  }

  .footer-social img {
    width: 32px;
    height: 32px;
    transition: opacity 0.3s;
  }

  .footer-social a:hover img {
    opacity: 0.8;
  }

  /* Ligne du bas */
  .footer-bottom {
    border-top: 1px solid #333;
    margin-top: 1.5rem;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: #aaa;
  }

  /* Responsive */
  @media (max-width: 768px) {
    .footer-content {
      flex-direction: column;
      align-items: center;
    }
    .footer-col {
      margin: 1rem 0;
      text-align: center;
    }
  }

  /* Espace Musicien */
  .espace-musicien {
    background: #fff;
    border-top: 1px solid #eee;
  }

  #password-container {
    text-align: center;
    margin-top: 1rem;
  }

  #password-input {
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 220px;
    margin-right: 0.5rem;
    font-family: 'Poppins', sans-serif;
  }

  #password-container button {
    padding: 0.7rem 1rem;
    background-color: #111;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
  }

  #password-container button:hover {
    background-color: #333;
  }

  #password-error {
    color: red;
    margin-top: 0.5rem;
  }

  .hidden {
    display: none;
  }

  #musicien-content {
    margin-top: 2rem;
  }

  .partition-title {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 2rem;
  }

  .partition-group {
    margin-bottom: 2rem;
  }

  .partition-group h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }

  .partition-group ul {
    list-style-type: none;
    padding: 0;
  }

  .partition-group li {
    margin: 0.3rem 0;
  }

  .partition-group a {
    text-decoration: none;
    color: #111;
    font-weight: 500;
    transition: color 0.2s;
  }

  .partition-group a:hover {
    color: #555;
  }

  .calendar-placeholder {
    text-align: center;
    margin-top: 2rem;
    font-style: italic;
  }

  .agenda-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #ffffffcc;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .agenda-container h2 {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
  }

  #agenda-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-height: 300px; /* Limite visuelle à ~2 ou 3 événements */
    overflow-y: auto;
    padding-right: 0.5rem; /* espace pour scroll bar */
  }

  #agenda-list::-webkit-scrollbar {
    width: 8px;
  }

  #agenda-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
  }

  #agenda-list::-webkit-scrollbar-thumb {
    background-color: #aaa;
    border-radius: 4px;
    transition: background 0.3s;
  }

  #agenda-list::-webkit-scrollbar-thumb:hover {
    background-color: #666;
  }

  .event-item {
    padding: 1rem 1.5rem;
    background: #f2f2f2;
    border-left: 5px solid #006699;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    transition: transform 0.2s ease;
  }

  .event-item h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
  }

  .event-details {
    font-size: 0.95rem;
    color: #444;
    margin-top: 0.3rem;
  }

  .event-item:hover {
    transform: translateX(5px);
  }

  @media (max-width: 768px) {
  /* NAVBAR */
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .navbar ul {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
  }

  .navbar ul li {
    width: 100%;
  }

  .navbar a {
    display: block;
    width: 100%;
  }

  /* HERO */
  .hero img {
    object-fit: cover;
    height: auto;
  }

  /* SECTIONS */
  .section {
    padding: 2rem 1rem;
  }

  .section h2 {
    font-size: 1.6rem;
  }

  /* FORMATIONS */
  .formations-grid {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .formation-card {
    width: 90%;
    max-width: 360px;
  }

  /* SOCIAL ICONS */
  .social-icons {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .social-icons a {
    width: 50px;
    height: 50px;
  }

  .social-icons img {
    width: 24px;
    height: 24px;
  }

  /* CTA */
  .cta-button {
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 1rem;
  }

  /* FOOTER */
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-col {
    margin: 1rem 0;
  }

  .footer-social {
    justify-content: center;
  }

  /* ESPACE MUSICIEN */
  #password-container {
    flex-direction: column;
    align-items: center;
  }

  #password-input {
    width: 90%;
    max-width: 280px;
    margin: 0 0 0.7rem;
  }

  #password-container button {
    width: 90%;
    max-width: 280px;
  }

  .partition-title {
    font-size: 1.4rem;
  }

  .partition-group h4 {
    font-size: 1.1rem;
  }

  /* AGENDA */
  .agenda-container {
    padding: 1.2rem;
  }

  #agenda-list {
    max-height: 400px;
    padding-right: 0.3rem;
  }

  .event-item {
    padding: 0.8rem 1rem;
  }

  .event-item h3 {
    font-size: 1rem;
  }

  .event-details {
    font-size: 0.9rem;
  }
}

/* Burger icon */
.menu-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  gap: 6px;
  z-index: 11;
  margin-left: auto;
  margin-right: 20px;
}

.menu-icon span {
  height: 3px;
  width: 100%;
  background: #111;
  border-radius: 3px;
  transition: all 0.3s ease;
}

#menu-toggle {
  display: none;
}

/* Responsive navbar */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    align-items: center;
    position: relative;
  }

  .navbar nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    z-index: 10;
  }

  #menu-toggle:checked + .menu-icon + nav ul {
    display: flex;
  }

  .menu-icon {
    display: flex;
  }

  .navbar nav ul li {
    margin: 1rem 0;
  }
}


/* Responsive */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .navbar ul {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
  }
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  align-items: left;
}

nav ul li {
  position: relative;
}

/* Dropdown container */
.dropdown-menu {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 130%;
  left: 0;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  min-width: 250px;
  z-index: 999;
  flex-direction: column;
  gap: 1.5rem;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Chaque lien du menu */
.dropdown-item {
  display: block;
  margin-left: 0.8rem;
  background-color: #f8f9fa;
  border-radius: 10px;
  text-decoration: none;
  color: #111;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-bottom: 0.3rem;
  text-align: left;
  width: 90%;
}

/*  .dropdown-item:hover {
  background-color: #e9ecef;
} */

/* Améliorations supplémentaires pour menu burger mobile */
@media (max-width: 768px) {
  .navbar nav ul {
    transition: all 0.3s ease;
  }

  #menu-toggle:checked + .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  #menu-toggle:checked + .menu-icon span:nth-child(2) {
    opacity: 0;
  }

  #menu-toggle:checked + .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .dropdown-item:hover {
    background-color: #f0f0f0;
  }
}

/* Nouveau comportement quand .open est actif */
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  flex-direction: column;
}