:root {
  --bg: #f6ecdb;
  --bg-soft: #efe0c7;
  --card: #fffaf1;
  --text: #3a2e22;
  --muted: #8c7a63;
  --accent: #c96a3f;
  --accent-hover: #b35a32;
  --accent-soft: #f3ddc9;
  --border: #e4d3b4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(246, 236, 219, 0.88) 0%, rgba(246, 236, 219, 0.94) 100%),
    url("library-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.75rem;
  background: rgba(239, 224, 199, 0.88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

header h1 { font-size: 1.4rem; margin: 0; letter-spacing: 0.01em; }

#brand-logo { cursor: pointer; }
#brand-logo:hover { color: var(--accent); }

#auth-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

#auth-area button {
  background: var(--accent);
  color: #fff8f0;
  border: none;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}

#auth-area button:hover { background: var(--accent-hover); }

nav.main-nav {
  display: flex;
  gap: 0.6rem;
  padding: 1.25rem 1.75rem 0;
}

nav.main-nav button, .tab, #collection-filter, select, #collection-view-toggle, #collection-print-labels-btn {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

nav.main-nav button:hover, .tab:hover, #collection-view-toggle:hover, #collection-print-labels-btn:hover { border-color: var(--accent); }

nav.main-nav button.active, .tab.active, #collection-view-toggle.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff8f0;
}

main { padding: 1.75rem; max-width: 1080px; margin: 0 auto; }

#home-view h2 { margin: 0 0 1.25rem; }

#home-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.home-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem 1rem;
  background: rgba(255, 250, 241, 0.82);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(58, 46, 34, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(58, 46, 34, 0.12);
}

.home-category-icon { font-size: 2.3rem; }

.home-category-card-new {
  background: transparent;
  border-style: dashed;
  border-color: var(--muted);
  color: var(--muted);
}
.home-category-card-new:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- modale "nouvelle collection" (self-service) ---------- */
.new-category-box { max-width: 460px; }

.new-category-fields-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 0.3rem;
}

#new-category-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.new-category-field-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 0.4rem;
  align-items: center;
}

.new-category-field-row .ncf-options { grid-column: 1 / 3; }

.new-category-field-row input,
.new-category-field-row select {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0.5rem 0.6rem;
  font-family: "Nunito", sans-serif;
  font-size: 0.85rem;
}

.ncf-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}
.ncf-remove:hover { color: var(--accent); }

#back-to-home { margin-bottom: 1rem; }
#catalogue-title { margin: 0 0 1.25rem; }

.catalogue-toolbar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}

.catalogue-toolbar input[type="text"] {
  flex: 1;
  min-width: 180px;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: "Nunito", sans-serif;
  font-size: 0.9rem;
}

.catalogue-toolbar input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.collection-bulk-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.collection-bulk-bar select {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 0.4rem 0.6rem;
  font-family: "Nunito", sans-serif;
}

.collection-bulk-bar button {
  background: var(--accent);
  color: #fff8f0;
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  transition: background 0.15s ease;
}

.collection-bulk-bar button:hover { background: var(--accent-hover); }

.collection-bulk-bar #collection-bulk-clear-btn {
  background: none;
  color: var(--muted);
  text-decoration: underline;
  padding: 0.4rem 0.2rem;
}

.card-select-checkbox {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
  z-index: 2;
}

.catalogue-columns {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
}

.catalogue-main { flex: 2; min-width: 0; }

.catalogue-side {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 1.5rem;
}

@media (max-width: 760px) {
  .catalogue-columns { flex-direction: column; }
  .catalogue-side { position: static; width: 100%; }
}

.side-panel {
  background: rgba(255, 250, 241, 0.82);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 2px 8px rgba(58, 46, 34, 0.05);
}

.side-panel h3 { margin: 0 0 0.85rem; font-size: 0.95rem; }

.scrolling-feed {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 300px;
  overflow-y: auto;
}

.community-item {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 8px;
  padding: 0.2rem 0.3rem;
  margin: 0 -0.3rem;
  transition: background 0.15s ease;
}

.community-item:hover { background: var(--accent-soft); }

.community-item img {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  object-fit: cover;
  background: var(--bg-soft);
  flex-shrink: 0;
}

.community-item .ci-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.community-item .ci-time { color: var(--muted); font-size: 0.75rem; }

.top-reference-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.top-reference-row:last-child { border-bottom: none; }
.top-reference-row:hover .top-reference-title { color: var(--accent); }

.top-reference-row img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-soft);
  flex-shrink: 0;
}

.top-reference-row .top-reference-title {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.top-reference-row .top-reference-count { color: var(--muted); font-weight: 700; flex-shrink: 0; }

.external-search-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}

.search-wrapper { position: relative; flex: 1; min-width: 0; }

#barcode-scan-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}

#barcode-scan-btn:hover { border-color: var(--accent); color: var(--accent); }

.barcode-scanner-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 8, 0.72);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.barcode-scanner-box {
  background: var(--card);
  border-radius: 16px;
  padding: 1.25rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
}

.barcode-scanner-close {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem;
}

.barcode-scanner-close:hover { color: var(--accent); }

#barcode-scanner-video {
  width: 100%;
  border-radius: 10px;
  background: #000;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.barcode-scanner-status {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.catalogue-import-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.catalogue-import-row button {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.catalogue-import-row button:hover { border-color: var(--accent); color: var(--accent); }

.csv-import-status {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: pre-line;
}

#external-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: "Nunito", sans-serif;
  font-size: 0.95rem;
}

#external-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.home-global-search { margin-bottom: 1.5rem; }

#global-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: "Nunito", sans-serif;
  font-size: 0.95rem;
}

#global-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.dropdown-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 360px;
  overflow-y: auto;
  z-index: 20;
  box-shadow: 0 16px 32px rgba(58, 46, 34, 0.16);
}

.dropdown-results .empty { padding: 0.85rem 1rem; margin: 0; }

.search-result-row {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.search-result-row:last-child { border-bottom: none; }
.search-result-row:hover { background: var(--accent-soft); }

.search-result-row img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-soft);
  flex-shrink: 0;
}

.search-result-row .info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.search-result-row .r-title {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-row .r-meta {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card {
  position: relative;
  background: rgba(255, 250, 241, 0.86);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 8px rgba(58, 46, 34, 0.05);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover { box-shadow: 0 6px 16px rgba(58, 46, 34, 0.1); }

.card.clickable { cursor: pointer; }
.card.clickable:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(58, 46, 34, 0.12); }

.card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }

.attrs { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 0.87rem; line-height: 1.6; }

.actions { margin-top: 0.85rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }

.actions button {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.actions button:hover { background: var(--accent); color: #fff8f0; }

.status {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}
.status-owned { background: #dcead9; color: #3f6b3a; }
.status-wanted { background: #f6e3c4; color: #92621c; }
.status-for_sale { background: #f4dad4; color: #a2412f; }

.card-visual { display: flex; gap: 1rem; align-items: flex-start; }

.card-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg-soft);
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(58, 46, 34, 0.1);
}

.card-visual-info { min-width: 0; flex: 1; }
.card-visual-info h3 { margin: 0 0 0.5rem; }
.card-visual-info .status { margin: 0 0 0.3rem; }
.card-visual-info .attrs { margin: 0; }

.collection-qty {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

form#add-item-form {
  background: rgba(255, 250, 241, 0.86);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: end;
  box-shadow: 0 2px 8px rgba(58, 46, 34, 0.05);
}

form#add-item-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
  gap: 0.3rem;
}

form#add-item-form input, form#add-item-form select {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0.5rem 0.7rem;
  font-family: "Nunito", sans-serif;
}

form#add-item-form button[type="submit"] {
  background: var(--accent);
  color: #fff8f0;
  border: none;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  transition: background 0.15s ease;
}

form#add-item-form button[type="submit"]:hover { background: var(--accent-hover); }

.empty { color: var(--muted); }

/* ---------- formulaires inline (édition d'item, détails de collection) ---------- */
.edit-item-form,
.entry-details-form {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.edit-item-form label,
.entry-details-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
  gap: 0.3rem;
  flex: 1;
  min-width: 140px;
}

.entry-details-form label.full-width { flex-basis: 100%; }

.edit-item-form input,
.edit-item-form select,
.entry-details-form input,
.entry-details-form select,
.entry-details-form textarea {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 0.5rem 0.7rem;
  font-family: "Nunito", sans-serif;
}

.entry-details-form textarea { min-height: 70px; resize: vertical; }

.entry-photos-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.entry-photo-thumb {
  position: relative;
  width: 64px;
  height: 64px;
}

.entry-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-soft);
}

.entry-photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff8f0;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0;
}

.entry-photo-remove:hover { background: var(--accent-hover); }

.entry-photos-input {
  font-size: 0.8rem;
  color: var(--muted);
}

.edit-item-form .actions,
.entry-details-form .actions { flex-basis: 100%; margin-top: 0.25rem; }

.ownership-counts {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.9rem 0 0;
}

#detail-back { margin-bottom: 1.5rem; }

.detail-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}

.detail-cover {
  width: 170px;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--bg-soft);
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(58, 46, 34, 0.14);
}

.detail-header h2 { margin: 0 0 0.3rem; font-size: 1.5rem; }
.detail-header .muted { color: var(--muted); margin: 0; }

.detail-description {
  color: var(--text);
  opacity: 0.85;
  font-size: 0.93rem;
  line-height: 1.65;
  margin-bottom: 1.1rem;
  white-space: pre-line;
}

.detail-selector {
  display: block;
  margin: 1rem 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.detail-selector select {
  display: block;
  margin-top: 0.4rem;
  width: 100%;
  max-width: 360px;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
}

.detail-actions { margin-top: 1.4rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.detail-actions button {
  background: var(--accent);
  color: #fff8f0;
  border: none;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  transition: background 0.15s ease;
}
.detail-actions button:hover { background: var(--accent-hover); }

.collection-category-header {
  margin: 1.75rem 0 0.6rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: var(--muted);
}
.collection-category-header:first-child { margin-top: 0; }

/* ---------- bulle résumée d'item ---------- */
.item-bubble {
  position: absolute;
  z-index: 60;
  width: 240px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  box-shadow: 0 16px 32px rgba(58, 46, 34, 0.22);
}

.item-bubble-close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem;
}

.item-bubble-close:hover { color: var(--accent); }

.item-bubble-cover {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg-soft);
  margin-bottom: 0.6rem;
}

.item-bubble-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
  padding-right: 1rem;
}

.item-bubble-meta {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.7rem;
}

.item-bubble-open {
  width: 100%;
  background: var(--accent);
  color: #fff8f0;
  border: none;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.item-bubble-open:hover { background: var(--accent-hover); }

/* ---------- lien artiste / studio -> toutes leurs œuvres ---------- */
.creator-link {
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.creator-link:hover { color: var(--accent-hover); }

/* ---------- fiche complète : tracklist et liens boutiques ---------- */
.detail-subheading {
  margin: 1.4rem 0 0.6rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.tracklist {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.tracklist li {
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}
.tracklist li:last-child { border-bottom: none; }
.tracklist li:nth-child(odd) { background: rgba(239, 224, 199, 0.4); }

.track-position { color: var(--muted); font-weight: 700; min-width: 1.8rem; }
.track-duration { margin-left: auto; color: var(--muted); }

.buy-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }

.buy-links a {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  padding: 0.45rem 0;
}
.buy-links a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ---------- casting (films) ---------- */
.cast-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.4rem 1rem;
}

.cast-list li { font-size: 0.85rem; }
.cast-role { color: var(--muted); font-size: 0.78rem; }

/* ---------- aperçus média : extraits audio, captures de jeu, bande-annonce ---------- */
.media-preview { margin: 0; }

.youtube-listen-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
}
.youtube-listen-link:hover { background: var(--accent); color: #fff8f0; }

.screenshot-gallery {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
}

.screenshot-thumb {
  height: 110px;
  width: auto;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--border);
}

.trailer-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.trailer-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- statistiques ---------- */
#stats-view h2 { margin: 0 0 1.25rem; }

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.stats-card {
  background: rgba(255, 250, 241, 0.86);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 2px 8px rgba(58, 46, 34, 0.05);
}

.stats-card .stats-card-value {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.1;
}

.stats-card .stats-card-label {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.stats-section {
  background: rgba(255, 250, 241, 0.82);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(58, 46, 34, 0.05);
}

.stats-section h3 { margin: 0 0 0.9rem; font-size: 0.95rem; }

.stats-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}

.stats-bar-row:last-child { margin-bottom: 0; }

.stats-bar-label {
  width: 140px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.stats-bar-track {
  flex: 1;
  height: 10px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
}

.stats-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.stats-bar-count {
  width: 2.2rem;
  flex-shrink: 0;
  text-align: right;
  color: var(--muted);
  font-weight: 700;
}

.stats-recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stats-recent-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.stats-recent-list li:last-child { border-bottom: none; }
.stats-recent-list .stats-recent-date { color: var(--muted); flex-shrink: 0; }

.stats-export-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stats-export-row button {
  background: var(--accent);
  color: #fff8f0;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.stats-export-row button:hover { background: var(--accent-hover); }

/* ---------- vue Pokédex (collection) ---------- */
.pokedex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}

.pokedex-card {
  display: block;
  background: rgba(255, 250, 241, 0.86);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.pokedex-card:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(58, 46, 34, 0.12); }

.pokedex-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg-soft);
  margin-bottom: 0.5rem;
}

.pokedex-card.wanted img {
  filter: grayscale(1) brightness(0.55);
}

.pokedex-card .pokedex-title {
  font-size: 0.8rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommendation-reason {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
}

.activity-feed { display: flex; flex-direction: column; gap: 0.6rem; }

.activity-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.activity-row img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-soft);
  flex-shrink: 0;
}

.activity-row .activity-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.activity-row .activity-title {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-row .activity-date { font-size: 0.75rem; color: var(--muted); }

.wrapped-card {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff8f0;
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.wrapped-card h4 {
  margin: 0 0 1rem;
  font-family: "Fraunces", serif;
  font-size: 1.3rem;
}

.wrapped-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.wrapped-stat-value { font-size: 1.6rem; font-weight: 800; font-family: "Fraunces", serif; }
.wrapped-stat-label { font-size: 0.78rem; opacity: 0.9; }

.wrapped-copy-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff8f0;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
}

.wrapped-copy-btn:hover { background: rgba(255, 255, 255, 0.32); }

.on-this-day-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.on-this-day-row img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-soft);
  flex-shrink: 0;
}

.pokedex-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* ---------- frise chronologique ---------- */
.timeline-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.timeline-decade {
  flex-shrink: 0;
  min-width: 160px;
}

.timeline-decade h4 {
  margin: 0 0 0.6rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.1rem;
  color: var(--accent);
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-item {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
  cursor: pointer;
}

.timeline-item img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-soft);
  flex-shrink: 0;
}

.timeline-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- roulette ---------- */
#roulette-btn, #quiz-start-btn {
  background: var(--accent);
  color: #fff8f0;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

#roulette-btn:hover, #quiz-start-btn:hover { background: var(--accent-hover); }

.roulette-result-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-soft);
  border-radius: 12px;
}

.roulette-result-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--card);
  flex-shrink: 0;
}

.roulette-result-card.spinning img { animation: pulse 0.4s infinite alternate; }

@keyframes pulse {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* ---------- badges ---------- */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.85rem;
}

.badge-card {
  text-align: center;
  padding: 0.9rem 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.badge-card.unlocked {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.badge-card .badge-icon {
  font-size: 1.8rem;
  opacity: 0.35;
  margin-bottom: 0.4rem;
}

.badge-card.unlocked .badge-icon { opacity: 1; }

.badge-card .badge-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.badge-card.unlocked .badge-label { color: var(--text); }

/* ---------- quiz tracklist ---------- */
.quiz-question {
  margin-top: 1rem;
}

.quiz-tracks {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-option-btn {
  background: var(--card);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  transition: border-color 0.15s ease;
}

.quiz-option-btn:hover { border-color: var(--accent); }
.quiz-option-btn.correct { background: #dcead9; border-color: #3f6b3a; color: #3f6b3a; }
.quiz-option-btn.incorrect { background: #f4dad4; border-color: #a2412f; color: #a2412f; }
.quiz-option-btn:disabled { cursor: default; }

.quiz-next-btn {
  margin-top: 0.9rem;
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}

.quiz-next-btn:hover { background: var(--accent); color: #fff8f0; }

/* ---------- mini-jeux : classement ---------- */
.minigames-leaderboard-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.toggle-group {
  display: flex;
  gap: 0.4rem;
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: rgba(239, 224, 199, 0.35);
}

.leaderboard-row-self {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}

.leaderboard-rank {
  font-weight: 800;
  color: var(--muted);
  min-width: 1.6rem;
}

.leaderboard-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
}

.leaderboard-name { flex: 1; font-weight: 700; }
.leaderboard-points { color: var(--accent); font-weight: 800; font-size: 0.85rem; }

/* ---------- mini-jeux : actions et salons ---------- */
.minigame-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}

.minigame-join-row {
  display: flex;
  gap: 0.4rem;
}

.minigame-join-row input {
  width: 140px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0.5rem 0.7rem;
  font-family: "Nunito", sans-serif;
  text-transform: uppercase;
}

.quiz-round-counter {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.quiz-result { text-align: center; padding: 1rem 0; }
.quiz-result p { font-size: 1.1rem; margin-bottom: 1rem; }

.game-room-lobby { text-align: center; }

.room-code {
  font-size: 1.6rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.room-players-list,
.room-scoreboard,
.room-final-scores {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.room-players-list li,
.room-scoreboard li,
.room-final-scores li {
  background: rgba(239, 224, 199, 0.35);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.room-answer-status { margin-top: 0.8rem; }

#room-start-btn {
  background: var(--accent);
  color: #fff8f0;
  border: none;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  margin: 0.6rem 0.4rem 0 0;
}
#room-start-btn:disabled { opacity: 0.5; cursor: not-allowed; }
#room-start-btn:hover:not(:disabled) { background: var(--accent-hover); }

#room-final-leave-btn {
  background: var(--accent);
  color: #fff8f0;
  border: none;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
}

/* ---------- vitrine publique ---------- */
.showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.showcase-header h2 { margin: 0; }

.showcase-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.showcase-toggle input { width: 1.1rem; height: 1.1rem; }

#account-link-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}

#account-link-input {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: "Nunito", sans-serif;
  font-size: 0.85rem;
}

#account-link-copy-btn {
  background: var(--accent);
  color: #fff8f0;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

#account-link-copy-btn:hover { background: var(--accent-hover); }

/* ---------- page publique : avatar/bannière/bio ---------- */
.showcase-banner {
  width: 100%;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: -3rem;
  background: var(--bg-soft);
}

.showcase-banner img { width: 100%; height: 100%; object-fit: cover; }

.showcase-identity {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.showcase-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
  background: var(--bg-soft);
  box-shadow: 0 6px 16px rgba(58, 46, 34, 0.18);
  flex-shrink: 0;
}

.showcase-bio {
  margin: 0.2rem 0 0;
  max-width: 46ch;
}

/* ---------- "Mon compte" : profil public + connexion ---------- */
.fun-account-hint { margin-bottom: 1.1rem; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-size: inherit;
  text-decoration: underline;
}

.link-btn:hover { color: var(--accent-hover); }

.account-images-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 0.9rem 0 1.2rem;
}

.account-image-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.account-avatar-preview {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.account-avatar-preview img,
.account-banner-preview img { width: 100%; height: 100%; object-fit: cover; }

.account-image-field-banner { flex: 1; min-width: 200px; align-items: stretch; }

.account-banner-preview {
  width: 100%;
  height: 84px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.account-upload-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  text-align: center;
}

.account-upload-label:hover { color: var(--accent-hover); }

#account-profile-form,
#account-password-form,
#account-email-form,
#account-delete-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

#account-profile-form label,
#account-password-form label,
#account-email-form label,
#account-delete-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  flex: 1;
  min-width: 200px;
}

#account-profile-form label.full-width,
#account-delete-form label.full-width { flex-basis: 100%; }

#account-profile-form input,
#account-profile-form textarea,
#account-password-form input,
#account-email-form input,
#account-delete-form input {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 0.5rem 0.7rem;
  font-family: "Nunito", sans-serif;
  font-weight: 400;
}

#account-profile-form textarea { min-height: 70px; resize: vertical; }

.account-theme-label { flex: 0 0 auto !important; min-width: 0 !important; }

#account-theme-color-input {
  padding: 0.2rem !important;
  width: 60px;
  height: 38px;
  cursor: pointer;
}
#account-profile-form .actions,
#account-password-form .actions,
#account-email-form .actions,
#account-delete-form .actions { flex-basis: 100%; }

.account-danger-zone {
  border-color: var(--accent);
}

.account-danger-zone h3 { color: var(--accent); }

#account-export-before-delete-btn {
  margin-bottom: 0.9rem;
}

.danger-btn {
  background: var(--accent) !important;
}

.danger-btn:disabled {
  background: var(--muted) !important;
  cursor: not-allowed;
  opacity: 0.6;
}

.account-username-status {
  font-size: 0.78rem;
  font-weight: 700;
}

.account-username-status.ok { color: #3a7d44; }
.account-username-status.taken { color: var(--accent); }

#account-auth-methods { margin-top: 0; }

/* ---------- modale de connexion email/mot de passe ---------- */
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 8, 0.72);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-modal-box {
  background: var(--card);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 380px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
}

.auth-modal-box h3 { margin: 0 0 1rem; }

#auth-modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

#auth-modal-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

#auth-modal-form input {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font-family: "Nunito", sans-serif;
}

#auth-modal-submit {
  background: var(--accent);
  color: #fff8f0;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-family: "Nunito", sans-serif;
  transition: background 0.15s ease;
}

#auth-modal-submit:hover { background: var(--accent-hover); }

.auth-modal-error {
  color: var(--accent);
  font-size: 0.82rem;
  margin: 0;
}

.auth-modal-error.auth-modal-info { color: #3a7d44; }

.auth-modal-toggle {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 0.9rem;
  font-family: "Nunito", sans-serif;
}

.auth-modal-toggle:hover { color: var(--accent); }


.compare-row {
  display: flex;
  gap: 0.6rem;
  margin: 0.6rem 0 0.9rem;
  flex-wrap: wrap;
}

.duel-summary { margin-bottom: 0.9rem; }

.duel-total { font-weight: 700; margin: 0 0 0.7rem; }

.duel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.duel-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 700;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.duel-table th:not(:first-child), .duel-table td:not(:first-child) { text-align: center; }

.duel-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.duel-table tr:last-child td { border-bottom: none; }

#compare-input {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: "Nunito", sans-serif;
  font-size: 0.85rem;
}

#compare-btn {
  background: var(--accent);
  color: #fff8f0;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

#compare-btn:hover { background: var(--accent-hover); }

/* ---------- suivre un créateur + digest de nouveautés ---------- */
#creator-follow-row { margin: -0.6rem 0 1.25rem; }

.digest-creator { margin-bottom: 1rem; }
.digest-creator:last-child { margin-bottom: 0; }

.digest-creator h4 {
  margin: 0 0 0.5rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1rem;
  color: var(--accent);
}

.digest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.digest-row .timeline-item {
  background: var(--bg-soft);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
}

/* ---------- étiquettes imprimables (QR code) ---------- */
.label-actions-buttons {
  display: flex;
  gap: 0.6rem;
}

.labels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.label-card {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.7rem;
  background: var(--card);
  break-inside: avoid;
}

.label-card canvas {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 6px;
}

.label-card .label-info { min-width: 0; }
.label-card .label-title { font-weight: 700; font-size: 0.85rem; }
.label-card .label-meta { color: var(--muted); font-size: 0.75rem; }

@media print {
  body * { visibility: hidden; }
  #labels-view, #labels-view * { visibility: visible; }
  #labels-view { position: absolute; top: 0; left: 0; width: 100%; padding: 0; margin: 0; }
  .label-actions { display: none !important; }
}

[hidden] { display: none !important; }

/* ---------- header : logo image + zone notifications ---------- */
.brand-logo-icon {
  width: 1.6rem;
  height: 1.6rem;
  vertical-align: -0.35rem;
  margin-right: 0.4rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.notifications-area { position: relative; }

.notifications-bell {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease;
}

.notifications-bell:hover { border-color: var(--accent); }

.notifications-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  background: var(--accent);
  color: #fff8f0;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 999px;
  min-width: 1.2rem;
  height: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
  border: 2px solid var(--bg);
}

.notifications-panel {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: 320px;
  max-width: 88vw;
  max-height: 420px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(58, 46, 34, 0.22);
  z-index: 30;
}

.notifications-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.notifications-panel-header h4 { margin: 0; font-size: 0.95rem; }

.notifications-list { padding: 0.4rem; }

.notification-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.6rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.notification-row:hover { background: var(--accent-soft); }
.notification-row.unread { background: rgba(201, 106, 63, 0.1); }

.notification-row img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-soft);
}

.notification-text { font-size: 0.85rem; line-height: 1.4; }
.notification-time { color: var(--muted); font-size: 0.72rem; margin-top: 0.15rem; }

/* ---------- réseaux sociaux : formulaire de compte + affichage vitrine ---------- */
.showcase-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.showcase-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.showcase-social-link:hover { border-color: var(--accent); color: var(--accent); }

.showcase-follow-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.7rem;
  flex-wrap: wrap;
}

.showcase-follow-counts { color: var(--muted); font-size: 0.85rem; font-weight: 700; }

#showcase-follow-btn {
  background: var(--accent);
  color: #fff8f0;
  border: none;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

#showcase-follow-btn:hover { background: var(--accent-hover); }
#showcase-follow-btn.following { background: var(--muted); }

/* ---------- plateformes de jeu (Steam) ---------- */
.account-steam-identity {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.account-steam-identity img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
}

.account-epic-note {
  margin-top: 0.9rem;
  font-style: italic;
}

/* ---------- CGU / CGV ---------- */
.legal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  max-width: 72ch;
  margin: 1.25rem auto 0;
  line-height: 1.6;
}

.legal-content h2 { margin-top: 0; }
.legal-content h3 { margin-bottom: 0.4rem; }
.legal-content p { margin-top: 0; }

/* ---------- pied de page ---------- */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer-sep { margin: 0 0.5rem; }

.site-footer .link-btn { font-size: inherit; font-weight: 700; }
