/* =========================
   VARIABLES & RESET
========================= */
:root {
  --primary-color: #007bff;
  --primary-dark: #0056b3;
  --accent-color: #ff5722;
  --accent-dark: #e64a19;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --light-bg: #f9f9f9;
  --dark-bg: #333;
  --font-color: #333;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: "Roboto", sans-serif;
  background: var(--light-bg);
  color: var(--font-color);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s;
}

/* Fix: doublon color supprimé, hover cohérent avec la charte */
a:hover {
  color: var(--primary-dark);
}

/* =========================
   GENERAL TYPOGRAPHY
========================= */
h1,
h2,
h3 {
  text-align: center;
  margin: 2.2rem 0 1.6rem;
}

h1 {
  font-size: 3.2rem;
  font-weight: 600;
}
h2 {
  font-size: 2.4rem;
  font-weight: 500;
}
h3 {
  font-size: 1.8rem;
  font-weight: 400;
}

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

.center {
  text-align: center;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

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

/* =========================
   HEADER & NAVIGATION
========================= */
.site-header {
  background: linear-gradient(90deg, #ff4f81 0%, #007bff 100%);
  color: #fff;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.8em;
  font-weight: 700;
}

.thank-you-box {
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  background-color: #f0f8ff; /* bleu très pâle */
  padding: 20px;
  max-width: 1000px;
  margin: 30px auto;
  box-shadow: 2px 2px 12px rgba(0, 123, 255, 0.1);
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: #333;
}
.thank-you-box strong {
  color: var(--primary-color);
}
.thank-you-box em {
  font-style: italic;
  color: #555;
}

/* Navigation desktop */
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1em;
  margin: 0;
  padding: 0;
}

.site-nav li a {
  color: #fff;
  font-weight: bold;
  padding: 10px 15px;
  transition: background 0.3s ease;
}

.site-nav li a:hover {
  background: var(--primary-dark);
  border-radius: 4px;
}

/* ===== MENU PUBLIC - GLOBAL ===== */

/* Cache la checkbox */
#public-menu-toggle {
  display: none;
}

/* Bouton burger (desktop = hidden) */
.public-burger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  z-index: 1001; /* Au-dessus du menu */
}

.public-burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

/* Animation burger → croix */
#public-menu-toggle:checked + .public-burger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#public-menu-toggle:checked + .public-burger span:nth-child(2) {
  opacity: 0;
}
#public-menu-toggle:checked + .public-burger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* =========================
   BUTTONS
========================= */
.btn,
.btn-submit,
.modal-content button,
.loginform input[type="submit"] {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.75em 1.5em;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  text-align: center;
  transition: background 0.3s ease;
}

/* Fix: hover clair → foncé pour contraste */
.btn:hover,
.btn-submit:hover,
.modal-content button:hover,
.loginform input[type="submit"]:hover {
  background: var(--primary-dark);
}

/* =========================
   INDEX
========================= */

/* 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: var(--accent-color);
  padding: 1rem;
  border-radius: 10px;
  color: #fff;
  border: none;
  cursor: pointer;
}

.search-input-group button:hover {
  background: var(--accent-dark);
}

/* ===== Legend box under search ===== */
.legend-box {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 14px 16px;
  margin: 20px auto 45px;
  max-width: 1000px;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--light-bg);
}

.legend-item img {
  width: 22px;
  height: 22px;
  display: block;
}

.legend-item span {
  font-size: 0.95rem;
  color: #333;
  font-weight: 600;
}

.legend-count {
  font-style: normal;
  font-weight: 700;
  margin-left: 2px;
  color: var(--primary-dark);
}

/* Lists, grids, cards, playlists... */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-row-gap: 40px;
  grid-column-gap: 20px;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* Carte générique */
.badge-card,
.playlist-card {
  position: relative;
  border: 4px solid transparent;
  border-radius: 10px;
  padding: 1em;
  text-align: center;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

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

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

.badge-count {
  color: var(--accent-color);
  font-weight: bold;
}

.badge-image-container {
  text-align: center;
}
.badge-image-container img,
.playlist-images img {
  max-width: 80px;
}

.badge-card.no-playlist {
  border-color: red;
}

.badge-card.has-playlist,
.badge-card.type-achievement {
  border-color: green;
}

.badge-desc {
  font-size: 0.9em;
  color: #666;
  margin-top: 5px;
}

/* Icône au-dessus du cadre */
.badge-icon {
  position: absolute;
  top: -35px; /* au-dessus du cadre */
  left: 50%;
  transform: translateX(-50%);
  padding: 0;
  border-radius: 50%;
  z-index: 2; /* au-dessus du ::after éventuel */
  pointer-events: none; /* ne gêne pas le clic sur la carte/lien */
}

/* Fix: images des conteneurs vs images internes */
.badge-icon img {
  max-width: 100%;
  height: 30px;
  margin: 0 auto 10px;
}

/* =========================
   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 label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: bold;
  color: #555;
}

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

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

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

.playlist-title {
  font-weight: bold;
  margin-bottom: 1em;
  color: var(--primary-color);
}

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

/* PAGINATION */

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

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

.pagination > a:hover {
  background: var(--primary-dark);
}

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

.pages a {
  background: var(--primary-color);
  color: #fff;
  padding: 0.5em 1em;
  border-radius: 4px;
  min-width: 40px;
}

.pages a:hover {
  background: var(--primary-dark);
}

/* =========================
   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;
}

/* Fix: contraste du titre sur fond bleu */
.listoftheweek_title {
  font-weight: bold;
  background: var(--primary-color);
  padding: 10px;
  border-radius: 4px;
  text-align: center;
}

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

/* Fix: ce pattern mettait le même fond partout -> un seul sélecteur suffit */
.listoftheweek > div:nth-child(n) {
  background-color: #f9f9f9;
}

.listoftheweek > div:hover {
  background-color: #e6f2ff;
  color: var(--primary-color);
  font-weight: bold;
  cursor: pointer;
}

/* =========================
MENU SECTION MEMBRES
========================= */
.top-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background-color: #00baf0;
  background: linear-gradient(to left, #45daf4, #499eee);
  color: #fff;
  height: 85px;
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

.logo img {
  height: 75px;
}

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

.menu > li {
  margin: 3px;
  overflow: hidden;
  font-size: 0.8rem;
  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);
}

/* =========================
   FOOTER
========================= */
.site-footer {
  background: linear-gradient(90deg, #007bff 0%, #ff4f81 100%);
  /* background: var(--dark-bg); */
  color: #fff;
  text-align: center;
  padding: 1em 0;
}
