@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;1,400&family=Inter:wght@400;500&display=swap');

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

:root {
  --ink:        #0d1b2a;
  --ink-mid:    #2c4a63;
  --ink-muted:  #5c7d99;
  --brine:      #e8f4f0;
  --brine-mid:  #c2ddd6;
  --brine-light:#f4fbf8;
  --amber:      #d4894a;
  --amber-light:#f5e6d3;
  --surface:    #fffef9;
  --bg:         #f0f4f8;
  --rule:       #c8d8e4;
  --green:      #15803d;
  --green-bg:   #f0fdf4;
  --red:        #b91c1c;
  --red-bg:     #fef2f2;
  --blue:       #1d4ed8;
  --blue-bg:    #eff6ff;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* ── NAV ── */
.nav {
  background: var(--surface);
  border-bottom: 0.5px solid var(--rule);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}
.nav-brand em { color: var(--amber); font-style: italic; }
.nav-links { display: flex; gap: 4px; }
.nav-link {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--ink-muted);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.1s, color 0.1s;
}
.nav-link:hover { background: var(--brine-light); color: var(--ink); }
.nav-link.active { color: var(--ink); font-weight: 500; background: var(--brine); }
.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

/* ── LAYOUT ── */
.page-wrap { max-width: 900px; margin: 28px auto; padding: 0 20px; }

/* ── CARD ── */
.card {
  background: var(--surface);
  border: 0.5px solid var(--rule);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--rule);
}

/* ── BADGES ── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
}
.badge-commun     { background: var(--brine); color: var(--ink-mid); }
.badge-rare       { background: var(--blue-bg); color: var(--blue); }
.badge-legendaire { background: var(--amber-light); color: #7c3a00; }
.badge-abyssal    { background: #1e1b4b; color: #c7d2fe; }
.badge-update     { background: var(--blue-bg); color: var(--blue); }
.badge-ok         { background: var(--green-bg); color: var(--green); }

/* ── RARITY STARS ── */
.stars { display: flex; gap: 3px; align-items: center; }
.star  { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.star.empty { background: var(--rule); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: 0.5px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.1s;
}
.btn:hover { background: var(--brine-light); }
.btn-ink {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-ink:hover { opacity: 0.88; background: var(--ink); }
.btn svg { width: 15px; height: 15px; stroke: currentColor; }

/* ── BANNER ── */
.banner {
  border-radius: 9px; padding: 12px 16px;
  font-size: 13px; margin-bottom: 14px;
  display: flex; align-items: flex-start; gap: 10px;
}
.banner-update { background: var(--blue-bg); color: var(--blue); border: 0.5px solid #bfdbfe; }
.banner-warn   { background: var(--amber-light); color: #7c3a00; border: 0.5px solid #fcd9a0; }
.banner svg { width: 17px; height: 17px; stroke: currentColor; flex-shrink: 0; margin-top: 1px; }

/* ── LOADER ── */
.loader {
  text-align: center; padding: 48px 24px;
  color: var(--ink-muted); font-size: 13px;
}
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--rule);
  border-top-color: var(--ink-mid);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FORM ── */
.f-field { margin-bottom: 14px; }
.f-field label { display: block; font-size: 12px; color: var(--ink-muted); margin-bottom: 5px; }
.f-field input, .f-field textarea, .f-field select {
  width: 100%; padding: 9px 12px;
  border: 0.5px solid var(--rule); border-radius: 7px;
  font-size: 14px; font-family: 'Inter', sans-serif;
  background: var(--surface); color: var(--ink);
}
.f-field input:focus, .f-field textarea:focus, .f-field select:focus {
  outline: none; border-color: var(--ink-mid);
}
.f-err { font-size: 12px; color: var(--red); margin-top: 4px; display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .nav-links .nav-link span { display: none; }
  .page-wrap { padding: 0 14px; margin-top: 18px; }
}

/* ── FOOTER VERSION ── */
#dq-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  text-align: center;
  padding: 8px;
  z-index: 150;
  pointer-events: none;
}
#dq-ver-btn {
  pointer-events: all;
  background: none;
  border: none;
  font-size: 11px;
  color: var(--ink-muted);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  padding: 4px 10px;
  border-radius: 20px;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.3px;
}
#dq-ver-btn:hover {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(13,27,42,0.1);
}
#dq-ver-btn span { font-weight: 500; }

/* ── MODAL CHANGELOG ── */
#dq-changelog-modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(13,27,42,0.55);
  z-index: 900;
  align-items: flex-end;
  justify-content: center;
}
#dq-changelog-modal.open { display: flex; }

#dq-changelog-sheet {
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  width: 100%; max-width: 680px;
  max-height: 82vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -4px 30px rgba(13,27,42,0.15);
}

#dq-changelog-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 16px;
  border-bottom: 0.5px solid var(--rule);
  flex-shrink: 0;
}
#dq-changelog-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px; color: var(--ink);
}
#dq-changelog-sub {
  font-size: 12px; color: var(--ink-muted);
  margin-top: 3px;
}
#dq-changelog-close {
  background: var(--brine-light);
  border: 0.5px solid var(--rule);
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--ink-muted);
  flex-shrink: 0; margin-left: 12px;
  font-family: 'Inter', sans-serif;
}
#dq-changelog-close:hover { color: var(--ink); }

#dq-changelog-body {
  overflow-y: auto;
  padding: 16px 24px 32px;
  flex: 1;
}

/* Bloc version */
.cl-version-block {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 0.5px solid var(--rule);
}
.cl-version-block:last-child { border-bottom: none; margin-bottom: 0; }

.cl-version-header {
  display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.cl-version-num {
  font-family: 'Playfair Display', serif;
  font-size: 20px; color: var(--ink);
}
.cl-version-badge {
  font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: 4px;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.cl-major { background: var(--amber-light); color: #7c3a00; }
.cl-minor { background: var(--blue-bg);     color: var(--blue); }
.cl-patch { background: var(--brine);        color: var(--ink-mid); }

.cl-version-label {
  font-size: 14px; font-weight: 500; color: var(--ink);
}
.cl-version-date {
  font-size: 12px; color: var(--ink-muted);
  margin-left: auto;
}

/* Catégorie */
.cl-cat { margin-bottom: 12px; }
.cl-cat-title {
  font-size: 11px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 7px;
}
.cl-items {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: 5px;
}
.cl-items li {
  font-size: 13px; color: var(--ink);
  padding-left: 14px; position: relative;
  line-height: 1.5;
}
.cl-items li::before {
  content: '–';
  position: absolute; left: 0;
  color: var(--ink-muted);
}

/* Espace bas pour que le footer ne cache pas le contenu */
body { padding-bottom: 32px; }
