/* styles pour base.html */

body {
  font-family: 'Quicksand', sans-serif;
  margin: 0; 
  padding:0; 
  line-height: 1.6;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background-color: #161C94; 
  position: relative;
}

.header {
  position: relative;
}


.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 120px;
}

.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

#main-title {
  position: static; /* plus besoin d'absolute */
  transform: none;
  text-align: center;
  font-size: 2em;
  margin: 0;
  color: white;
}

.language-buttons {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}



.language-buttons button {
  display: inline-block;
  font-family: 'Quicksand', sans-serif;
  padding: 0.5rem 1rem;
  background-color: #ffffff;
  color: #161C94;
  text-decoration: none;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.language-buttons button:hover {
  transform: scale(1.1);
}

.welcome-row {
  display: flex;
  gap: 0.25rem; /* espace entre les deux p */
}

.welcome-row p {
  margin: 0; /* enlève le saut de ligne vertical par défaut */
}


.user-profile-dropdown {
  position: relative;
  display: inline-block;
  margin: 1em;
}

.dropdown-toggle {
  background-color: #4CAF50;
  color: white;
  padding: 10px 16px;
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

.user-profile-dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    width: 400px;
    background-color: #fff;
    border: 1px solid #ddd;
    font-size: 15px;
    padding: 1rem;
    display: none;
    z-index: 1000;
}

.dropdown-content.show {
    display: block;
}

.logout-button {
  margin-top: 10px;
  background-color: #e74c3c;
  color: white;
  border: none;
  font-family: 'Quicksand', sans-serif;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.login-link {
  display: inline-block;
  background-color: #4CAF50;
  color: white;
  padding: 10px 16px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.login-link:hover {
  transform: scale(1.1);
}


.home-icon {
  background-color: white;
  width:40px;
  padding: 5px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.home-icon:hover {
  transform: scale(1.1);
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  position: relative;
  z-index: 1;
}

footer {
  background-color: #161C94;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 1rem;
  position: relative;
  height: 80px;
}

.footer-text {
  text-align: center;
}

#back-to-top {
  position: absolute;
  left: 1rem;
  background-color: #ffffff;
  color: #161C94;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-family: inherit;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#footer-right {
  position: absolute;
  right: 1rem;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-family: inherit;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}


#back-to-top:hover {
  background-color: #8dd3f5;
}

.leaderboard {
  display: inline-block;
  padding: 0.4rem 1rem;
  background-color: #4CAF50;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

@media screen and (max-width: 850px) {
  footer {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }

  #footer-right,
  #back-to-top {
    position: static;
    margin: 0 auto;
  }

  #footer-right img {
    max-width: 150px;
    height: auto;
  }

  #back-to-top {
    order: 3;
  }

  .footer-text {
    order: 1;
  }

  #footer-right {
    order: 2;
  }
}
