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

a:hover {
  color: var(--light-bg);
  color: #999;
}

/* =========================
   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: var(--primary-color);
  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 #007bff;
  border-radius: 10px;
  background-color: #f0f8ff; /* bleu très pâle */
  padding: 20px;
  max-width: 700px;
  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: #007bff;
}
.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;
}

.btn:hover,
.btn-submit:hover,
.modal-content button:hover,
.loginform input[type="submit"]:hover {
  background: var(--light-bg);
}

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

/* =========================
   SECTIONS
========================= */

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

.intro h2 {
  color: var(--primary-color);
}

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

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

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

.grid-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

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

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

.playlist-card,
.badge-manage-card,
.grid-badges {
  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;
  margin-bottom: 2rem;
}

/* Carte générique */
.badge-card {
  position: relative;
  border: 4px solid transparent;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  background: #fff;
}

/* Cadre superposé (même position pour rouge/vert) */
.badge-card::after {
  content: "";
  position: absolute;
  inset: 0; /* colle au bord intérieur */
  border-radius: 12px;
  border: 4px solid var(--badge-border, transparent);
  pointer-events: none;
}

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

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

/* Icône au-dessus du cadre */
.badge-icon {
  position: absolute;
  top: -20px; /* au-dessus du cadre */
  left: 50%;
  transform: translateX(-50%);
  background: #fff; /* petit fond blanc pour masquer la bordure dessous */
  padding: 2px;
  border-radius: 50%;
}

.badge-icon img {
  width: 28px;
  height: 28px;
}

/* Variantes d’icônes selon le type (chemins vus depuis /css/) */
/*.badge-card.has-playlist.type-special::before {
  background-image: url("../images/icons/star.svg");
}
.badge-card.has-playlist.type-collectible::before {
  background-image: url("../images/icons/vinyl.svg");
}
.badge-card.has-playlist.type-rare::before {
  background-image: url("../images/icons/crown.svg");
}
.badge-card.has-playlist.type-achievement::before {
  background-image: url("../images/icons/medal.svg");
}*/

/* Icône centrée au-dessus (uniquement quand has-playlist) */
.badge-card.has-playlist::before {
  content: "";
  position: absolute;
  top: -26px; /* au-dessus du cadre */
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

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

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

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

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

.badge-manage-images {
  display: flex;
  margin-top: 1rem;
  gap: 0.5rem;
  justify-content: center;
}

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

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

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

.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;
}

/* PAGINATION */

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

.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;
}

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

/* 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;
  color: #555;
}

.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;
}

.form-inline input[type="checkbox"] {
  height: 20px;
}

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

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

/* MODIFY A PLAYLIST */
.buttons {
  display: flex;
  gap: 2rem;
  padding: 1rem;
}

.modify-container {
  margin-top: 2rem;
}

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

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

.modify-container .save-btn,
.modify-container .cancel-btn,
.modify-container .delete-btn {
  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;
}

/* ========================
ADD A PLAYLIST
========================= */

.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;
  align-items: center;
}

/* =================
MY STAT
================== */
.stat-section {
  max-width: 1200px;
  margin: 30px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.stat-section h2 {
  text-align: center;
  margin-bottom: 15px;
}
.stat-table {
  width: 100%;
  border-collapse: collapse;
}
.stat-table th,
.stat-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
}
.stat-table thead th {
  background: #f7f7f7;
  text-align: left;
}

.badge-mini {
  height: 36px;
  width: auto;
}

.badge-card-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fafafa;
}
.badge-card-stat .info {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.badge-card-stat .name {
  font-weight: 700;
}
.muted {
  color: #666;
  font-size: 0.95rem;
}

.stat-empty {
  text-align: center;
  font-style: italic;
  color: #777;
  margin: 12px 0;
}

/* =========================
   FOOTER
========================= */
.site-footer {
  background: var(--dark-bg);
  color: #fff;
  text-align: center;
  padding: 1em 0;
}

/* =========================
    INDEX
========================= */
/* Carte cadre vert + icône de type au CENTRE */
.badge-card.frame {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 22px; /* un peu d’air pour le cadre intérieur */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* cadre intérieur vert (comme ta maquette) */
.badge-card.frame::after {
  content: "";
  position: absolute;
  inset: 10px; /* recul par rapport aux bords externes */
  border-radius: 14px;
  border: 4px solid #1f8b3a; /* VERT */
  pointer-events: none;
}

/* icône de TYPE, centrée */
.badge-card.frame::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px; /* ajuste la taille au besoin */
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.95; /* léger fondu si tu as un visuel dessous */
  pointer-events: none;
}

/* Optionnel : si tu continues d’afficher une image de badge dans la carte */
.badge-card .badge-image-container {
  text-align: center;
}
.badge-card .badge-image {
  max-width: 90px;
  height: auto;
}
