/* ===== Background full-screen ===== */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin:0;
  padding:0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  background-image: url('../assets/background.svg');
  z-index: -1;
}

/* ===== Flex layout global ===== */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  height:100%;
  display: flex;
  flex-direction: column;
  font-family: 'Montserrat', sans-serif;
  color: white;
}

.hamburger {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* ===== Votre contenu principal ===== */
.main-container {
  flex: 1;           /* prend tout l’espace restant */
}

/* ===== Header / bandeau ===== */
.bandeau {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* hamburger |---| profil */
  padding: 0 20px;
  background: linear-gradient(145deg, #b4aaed, #7f92f1);
  box-shadow: 0 8px 10px rgba(0,0,0,0.15);
  z-index: 100;
}

/* Logo UP'SCHOOL */
.bandeau h1 {
  margin: 0;
  font-size: 1.5rem;
  font-family: 'Montserrat', sans-serif;
}

/* Container des liens : prend tout l’espace central */
.nav-link-container {
  order: 2;
  display: flex;
  gap: 30px;
  cursor: pointer;
}

/* Chaque lien */
.nav-link {
  position: relative;
  padding: 5px 0;
  font-weight: 600;
  color: white;
  text-decoration: none;
  margin-left: 35px;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: white;
  transition: width .3s;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Icône loupe, profil */
.icon-search svg {
  vertical-align: middle;
}

.profile_icon {
  order: 3;
  width: 32px;
  height: 32px;
  cursor: pointer;
}


/* ===== Footer ===== */
footer {
  margin-top: auto;  /* pousse toujours le footer en bas */
  padding: 20px 0;
  text-align: center;
  color: white;
  font-style: italic;
}

.hamburger {
  order: 1;
  display: none;            
  background: none;
  border: none;
  font-size: 1.8rem;
  color: white;
  cursor: pointer;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {

  .bandeau h1{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 1.5rem;
  }
  /* masquer nav desktop */
    .nav-link-container {
    display: none;              /* caché par défaut */
    position: fixed;            
    top: 60px;                  /* juste sous le bandeau */
    right: 0;                   /* aligné à droite */
    width: 240px;               /* largeur du tiroir */
    height: calc(100vh - 60px); /* tout le reste de la hauteur */
    background: rgba(0,0,0,0.85);
    gap: 0px;
    box-shadow: -4px 0 8px rgba(0,0,0,0.3);
    z-index: 99;
    overflow-y: auto;
    flex-direction: column;
    background: linear-gradient(
    0deg,
    rgba(180, 170, 237, 0.6),
    rgba(127, 146, 241, 0.6)
    );
    /* Applique un flou sur ce qu’il y a derrière */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* pour Safari */
  }

  /* bouton hamburger visible */
  .hamburger {
    display: block;
  }
  /* dropdown ouvert */
  .nav-link-container.open {
    display: flex;
    vertical-align: center;
  }
  .nav-link-container.open .nav-link {
    font-size: 0.85rem;
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    text-align: center;
  }
  .nav-link-container.open .nav-link:last-child {
    border-bottom: none;
  }
}