/* ============================================================
   UwU Café — Shared Dark Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Nunito:wght@400;600;700;800;900&display=swap');

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

:root {
  --bg:      #0f0b1f;
  --surface: #160e2b;
  --card:    #1e1538;
  --card2:   #271b4a;
  --border:  rgba(167,139,250,0.18);
  --rose:    #f472b6;
  --violet:  #a78bfa;
  --mint:    #34d399;
  --peach:   #fb923c;
  --red:     #f87171;
  --text:    #f3e8ff;
  --text-m:  #9580b8;
  --grad:    linear-gradient(135deg, #f472b6 0%, #a78bfa 100%);
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Sakura background glow ── */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center,
    rgba(244,114,182,0.07) 0%,
    rgba(167,139,250,0.05) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* ── Topnav ── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(15,11,31,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Pacifico', cursive;
  font-size: 1.3rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-logo img {
  height: 40px;
  width: 40px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}
.nav-logo .nav-logo-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: flex; gap: 0.3rem; }
.nav-links a {
  padding: 0.45rem 0.9rem;
  border-radius: 50px;
  color: var(--text-m);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(244,114,182,0.12);
  color: var(--rose);
}
.nav-burger { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  gap: 0.4rem;
  z-index: 89;
}
.nav-mobile-menu a {
  padding: 0.7rem 1rem;
  border-radius: 12px;
  color: var(--text-m);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}
.nav-mobile-menu a:hover { background: rgba(244,114,182,0.1); color: var(--rose); }
.nav-mobile-menu.open { display: flex; }

/* ── Container ── */
.container { max-width: 900px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Cards ── */
.card {
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 2rem;
}

/* ── Form fields ── */
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.1rem; }
.field label { font-size: 0.85rem; font-weight: 800; color: var(--text-m); }
input, textarea, select {
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.72rem 1rem;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(244,114,182,0.12);
}
textarea { resize: vertical; }
::placeholder { color: var(--text-m); opacity: 0.6; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 24px rgba(244,114,182,0.3);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(244,114,182,0.45); }
.btn-ghost {
  background: rgba(167,139,250,0.1);
  color: var(--violet);
  border: 1.5px solid rgba(167,139,250,0.3);
}
.btn-ghost:hover { background: rgba(167,139,250,0.18); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}
.badge-nouveau  { background: rgba(244,114,182,0.15); color: #f472b6; }
.badge-en_cours { background: rgba(167,139,250,0.15); color: #a78bfa; }
.badge-pret     { background: rgba(52,211,153,0.15);  color: #34d399; }
.badge-livre    { background: rgba(251,146,60,0.15);  color: #fb923c; }
.badge-archive  { background: rgba(148,163,184,0.12); color: #94a3b8; }
.badge-nouvelle { background: rgba(244,114,182,0.15); color: #f472b6; }
.badge-en_etude { background: rgba(167,139,250,0.15); color: #a78bfa; }
.badge-acceptee { background: rgba(52,211,153,0.15);  color: #34d399; }
.badge-refusee  { background: rgba(248,113,113,0.15); color: #f87171; }

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--card);
  border: 1.5px solid rgba(244,114,182,0.3);
  border-radius: 50px;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  transition: transform 0.4s cubic-bezier(.34,1.56,.64,1);
  z-index: 999;
  max-width: 90vw;
  white-space: nowrap;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.error { border-color: rgba(248,113,113,0.4); }

/* ── Sakura décor flottant ── */
.deco-float {
  position: fixed;
  pointer-events: none;
  font-size: 1.4rem;
  opacity: 0.06;
  animation: drift linear infinite;
  z-index: 0;
}
@keyframes drift {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-22px) rotate(12deg); }
}

/* ── Animations ── */
@keyframes fadeUp   { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }
@keyframes floatCat { 0%,100%{transform:translateY(0) rotate(-3deg);} 50%{transform:translateY(-12px) rotate(3deg);} }
@keyframes pulse    { 0%,100%{transform:scale(1);} 50%{transform:scale(1.05);} }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-m);
  font-weight: 600;
  margin-top: 4rem;
  position: relative;
  z-index: 1;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .container { padding: 0 1rem; }
  .card { padding: 1.4rem; }
}
