/************
MENU DESKTOP
************/
.btn a:link,
.btn a:visited {
  font-size: 0.9rem;
  color: white;
}

.btn a:hover,
.btn a:active {
  color: red;
}

.top-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background-color: #00baf0;
  background: linear-gradient(to left, #45daf4, #499eee);
  /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
  color: #fff;
  height: 85px;
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
}

img {
  display: block;
  height: 75px;
}

.menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-content: center;
  align-items: center;
  list-style-type: none;
  margin: 0rem 2rem;
  width: 50%;
}

.menu > li {
  margin: 3px;
  overflow: hidden;
  font-size: 0.6rem;
  color: white;
  text-align: center;
}

.menu-button-container {
  display: none;
  height: 100%;
  width: 30px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-right: 15px;
}

#menu-toggle {
  display: none;
}

.menu-button,
.menu-button::before,
.menu-button::after {
  display: block;
  background-color: #fff;
  position: absolute;
  height: 4px;
  width: 30px;
  transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
  border-radius: 2px;
}

.menu-button::before {
  content: "";
  margin-top: -8px;
}

.menu-button::after {
  content: "";
  margin-top: 8px;
}

#menu-toggle:checked + .menu-button-container .menu-button::before {
  margin-top: 0px;
  transform: rotate(405deg);
}

#menu-toggle:checked + .menu-button-container .menu-button {
  background: rgba(255, 255, 255, 0);
}

#menu-toggle:checked + .menu-button-container .menu-button::after {
  margin-top: 0px;
  transform: rotate(-405deg);
}

.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px red solid;
  background-color: black;
  border-radius: 50px;
  height: 2rem;
  text-decoration: none;
  transition: background 500ms ease-in;
  cursor: pointer;
}

/* General */
h1,
h2,
h3 {
  text-align: center;
  margin-top: 2.2rem;
  margin-bottom: 1.6rem;
}

h1 {
  font-size: 3.2rem;
  font-weight: 600;
}

h2 {
  font-size: 2.4rem;
  font-weight: 500;
}

h3 {
  font-weight: 400;
  font-size: 1.8rem;
}

p {
  line-height: 1.6;
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

.center {
  text-align: center;
}

/* Reset de base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: "Roboto", sans-serif;
  background: #f9f9f9;
  color: #333;
}

a {
  text-decoration: none;
  color: #007bff;
  transition: color 0.3s;
}

a:hover {
  color: #0056b3;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding-top: 2rem;
}

.gen-container {
  position: relative;
  top: 91px;
  padding-bottom: 2.4rem;
}

/* HEADER */

/* -------------------------------
   SITE HEADER - MT Badge
--------------------------------*/

.site-header {
  background: linear-gradient(to left, #45daf4, #499eee);
  color: #fff;
  padding: 15px 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.site-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: #fff;
  margin: 0;
}

.site-nav {
  position: relative;
}

.site-nav ul {
  display: flex;
  gap: 1.5em;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li {
  position: relative;
}

.site-nav a {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.dropdown-icon {
  margin-left: 5px;
  font-size: 0.8em;
}

/* Mega menu styles */
.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #007bff;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 999;
  flex-wrap: wrap;
  gap: 10px;
}

.mega-menu a {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.95em;
  display: inline-block;
}

.mega-menu a:hover {
  background: rgba(255, 255, 255, 0.3);
}

.dropdown:hover .mega-menu {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .mega-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    padding: 10px 0;
  }

  .mega-menu a {
    display: block;
    width: 100%;
    padding: 10px;
  }
}

/* INTRO */

.intro {
  text-align: center;
  padding: 2em 0;
}

.intro h2 {
  color: #007bff;
  margin-bottom: 0.5em;
}

/* SEARCH */

.search-section {
  background: #fff;
  padding: 2em 0;
  border-radius: 8px;
}

.search-form label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: bold;
}

.search-input-group {
  display: flex;
  gap: 10px;
}

.search-input-group input {
  flex: 1;
  padding: 0.75em;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.search-input-group button {
  background: #ff5722;
  color: #fff;
  border: none;
  padding: 0.75em 1.5em;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.search-input-group button:hover {
  background: #e64a19;
}

/* BADGE GRID */

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.badge-card {
  background: #fff;
  border-radius: 8px;
  padding: 1em;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

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

.badge-card img {
  max-width: 100%;
  height: 120px;
  margin: 0 auto;
  margin-bottom: 10px;
}

.badge-card a {
  font-weight: bold;
  display: block;
}

.badge-count {
  color: #ff5722;
  font-weight: bold;
}

/* PLAYLIST GRID */

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.playlist-card {
  background: #fff;
  border-radius: 8px;
  padding: 1em;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.playlist-title {
  font-weight: bold;
  margin-bottom: 1em;
  color: #007bff;
}

.playlist-images {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.playlist-images img {
  max-width: 80px;
  height: auto;
  border-radius: 4px;
}

/* PAGINATION */

.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
  margin-top: 2em;
}

.pagination > a {
  background: #007bff;
  color: #fff;
  padding: 0.5em 1em;
  border-radius: 4px;
  text-align: center;
  min-width: 40px;
}

.pagination > a:hover {
  background: #0056b3;
}

.pages {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.pages a {
  background: #007bff;
  color: #fff;
  padding: 0.5em 1em;
  border-radius: 4px;
  min-width: 40px;
}

.pages a:hover {
  background: #0056b3;
}

/* FOOTER */

.site-footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 1em 0;
  margin-top: 1rem;
}

/* LOGIN */
.loginform {
  background: #fff;
  padding: 2em;
  border-radius: 8px;
  max-width: 400px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.loginform .form-group {
  margin-bottom: 1em;
}

.loginform label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: bold;
}

.loginform input[type="text"],
.loginform input[type="email"],
.loginform input[type="password"] {
  width: 100%;
  padding: 0.75em;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Centrer bouton Login et le rendre plein largeur */
.loginform .form-group:last-child {
  margin-top: 1.5em;
}

.loginform input[type="submit"] {
  width: 100%;
  display: block;
  padding: 0.75em;
  font-size: 1em;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  text-align: center;
}

.loginform input[type="submit"]:hover {
  background: #0056b3;
}
.err {
  background: #f8d7da;
  color: #721c24;
  padding: 1em;
  border-radius: 4px;
  margin-bottom: 1em;
  text-align: center;
}

/* CREATE ACCOUNT */
/* MODAL STYLES */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 2em;
  border-radius: 8px;
  max-width: 400px;
  text-align: center;
  position: relative;
}

.modal-content h2 {
  color: #007bff;
  margin-bottom: 1em;
}

.modal-content button {
  background: #007bff;
  color: #fff;
  border: none;
  padding: 0.75em 1.5em;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 1em;
  width: 100%;
}

.modal-content button:hover {
  background: #0056b3;
}

/* PROGRESS BAR */

.progress-bar {
  background: #ddd;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 1em;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #28a745;
  transition: width 5s linear;
}

/* MANAGE LIST */
.badge-manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 2em;
}

.badge-manage-card {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1em;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

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

.badge-manage-img {
  max-width: 100%;
  height: 80px;
  margin-bottom: 10px;
  margin: 0 auto;
}

.badge-manage-card a {
  font-weight: bold;
  display: block;
  margin-bottom: 0.5em;
  text-decoration: none;
  color: #333;
  font-size: 0.9em;
}

.badge-manage-progress {
  font-size: 0.9em;
  color: #666;
}

.badge-manage-progress.green {
  color: #28a745;
  font-weight: bold;
}

.badge-manage-progress.yellow {
  color: #ffc107;
  font-weight: bold;
}

.badge-manage-progress.red {
  color: #dc3545;
  font-weight: bold;
}

.badge-manage-rank {
  font-size: 0.9em;
  color: #333;
  margin-top: 0.5em;
  font-weight: bold;
}

.badge-manage-images {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 0.5em;
}

.badge-manage-images img {
  width: 60px;
  aspect-ratio: auto;
}

/* ADD PLAYLISTS */
/* Form styling */

.form-group {
  margin-bottom: 1.5em;
}

.playlist-select {
  width: 100%;
  max-width: 300px;
  padding: 0.5em;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1em;
}

.form-inline {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 0.5em;
}

.playlist-rank {
  width: 70px;
  padding: 0.4em;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.playlist-name {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5em;
  color: #333;
}

.btn-submit {
  background: #007bff;
  color: #fff;
  padding: 0.7em 1.5em;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 1rem;
  width: 200px;
}

.btn-submit:hover {
  background: #0056b3;
}

/* MODIFY A PLAYLIST */
.modify-container {
  max-width: 500px;
  margin: 40px auto;
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modify-container h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.modify-container hr {
  margin: 20px 0;
  border: none;
  border-top: 1px solid #eee;
}

.playlist-name {
  font-size: 1.3em;
  font-weight: bold;
  text-align: center;
  color: #333;
  margin: 10px 0;
}

.modify-container label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #555;
}

.rank-input {
  width: 100%;
  padding: 10px;
  font-size: 1em;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin-bottom: 20px;
}

.modify-container .buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2rem;
}

.modify-container .save-btn,
.modify-container .cancel-btn,
.modify-container .delete-btn {
  flex: 1;
  padding: 12px 20px;
  font-weight: bold;
  border: none;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
}

.save-btn {
  background-color: #28a745;
}

.cancel-btn {
  background-color: #6c757d;
}

.delete-btn {
  background-color: #dc3545;
}

.save-btn:hover {
  background-color: #218838;
}

.cancel-btn:hover {
  background-color: #5a6268;
}

.delete-btn:hover {
  background-color: #c82333;
}

/* PASSWORD CHANGE */
.modify-form label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
  color: #555;
}

.modify-form input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* LIST OF THE WEEK */
/* LIST OF THE WEEK */

.listoftheweek {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  background: #fff;
  padding: 1em;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 2rem;
}

.listoftheweek_title {
  font-weight: bold;
  background: #007bff;
  color: gray;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
}

.listoftheweek > div {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid #eee;
  font-size: 0.95em;
}

.listoftheweek > div:nth-child(4n + 1),
.listoftheweek > div:nth-child(4n + 2),
.listoftheweek > div:nth-child(4n + 3),
.listoftheweek > div:nth-child(4n + 4) {
  background-color: #f9f9f9;
}

.listoftheweek > div:hover {
  background-color: #e6f2ff;
  color: #007bff;
  font-weight: bold;
  cursor: pointer;
}
