/* ==========================================================================
   LSPD — Ventes de saisies
   Palette : bleu-nuit terminal, or-badge, carton de scellé, tampon rouge
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #0a1017;
  --bg-raised: #101823;
  --panel: #131b26;
  --line: #223040;
  --gold: #c9a227;
  --gold-soft: #e0c465;
  --steel: #4c7ea8;
  --steel-soft: #7fa8cc;
  --paper: #e9e4d8;
  --paper-dim: #d9d2c1;
  --ink: #1b1b18;
  --ink-soft: #4a463c;
  --red-stamp: #a33636;
  --text: #dce3ea;
  --text-dim: #7c8896;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  position: relative;
}

/* Texture de fond : grille de terminal + vignette, sans photo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(76,126,168,0.16), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 44px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 44px);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 40%, transparent 30%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, .display {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  margin: 0;
}

.mono {
  font-family: 'IBM Plex Mono', monospace;
}

/* ---------- Header commun ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 16, 23, 0.85);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-brand .seal { width: 34px; height: 34px; }
.topbar-brand .label {
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--gold-soft);
}
.topbar-brand .label small {
  display: block;
  font-family: 'Inter', sans-serif;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 1px;
}
.topbar-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: 'Oswald', sans-serif;
}
.topbar-nav a {
  color: var(--text-dim);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.topbar-nav a:hover, .topbar-nav a.active {
  color: var(--gold-soft);
  border-color: var(--gold);
}
.cart-link {
  font-family: 'Oswald', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: var(--bg-raised);
  border: 1px solid var(--gold);
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: background .15s ease;
}
.cart-link:hover { background: var(--gold); color: #1b1405; }
.cart-link.active { background: var(--gold); color: #1b1405; }

/* ---------- Seal (logo LSPD fourni) ---------- */
.seal, .hero-seal, .login-seal {
  border-radius: 50%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(201,162,39,0.25));
}

/* ==========================================================================
   PAGE : LOGIN
   ========================================================================== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 36px 32px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.login-seal { width: 64px; height: 64px; display: block; margin: 0 auto 18px; }
.login-title {
  text-align: center;
  font-size: 20px;
  color: var(--paper);
}
.login-title small {
  display: block;
  font-family: 'Inter', sans-serif;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-dim);
  font-size: 12.5px;
  margin-top: 8px;
  line-height: 1.5;
}
.login-form {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 11px 12px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s ease;
}
.field input:focus { border-color: var(--steel-soft); }
.login-submit {
  margin-top: 8px;
  background: var(--gold);
  color: #1b1405;
  border: none;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 13px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s ease;
}
.login-submit:hover { background: var(--gold-soft); }
.login-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  font-family: 'IBM Plex Mono', monospace;
}
.login-switch {
  margin-top: 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-dim);
}
.login-switch a { color: var(--steel-soft); border-bottom: 1px solid transparent; }
.login-switch a:hover { border-color: var(--steel-soft); }

.form-msg {
  margin-top: 16px;
  padding: 11px 13px;
  border-radius: var(--radius);
  font-size: 12.5px;
  line-height: 1.5;
  display: none;
}
.form-msg.show { display: block; }
.form-msg.error { background: rgba(163,54,54,0.15); border: 1px solid var(--red-stamp); color: #e2a3a3; }
.form-msg.success { background: rgba(76,126,168,0.15); border: 1px solid var(--steel); color: var(--steel-soft); }
.login-submit[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ==========================================================================
   PAGE : ACCUEIL
   ========================================================================== */
.hero {
  padding: 90px 24px 60px;
  text-align: center;
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(10,16,23,0.55) 0%, rgba(10,16,23,0.88) 65%, var(--bg) 100%),
    url('fond-lspd.png');
  background-size: cover;
  background-position: center 35%;
}
.hero-seal { width: 108px; height: 108px; margin: 0 auto 26px; display: block; }
.hero-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--steel-soft);
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 56px);
  color: var(--paper);
  margin-top: 14px;
  line-height: 1.05;
}
.hero h1 span { color: var(--gold); }
.hero p {
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
}

.choice-grid {
  max-width: 920px;
  margin: 50px auto 100px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 640px) {
  .choice-grid { grid-template-columns: 1fr; }
}
.choice-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease;
  display: block;
}
.choice-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}
.choice-card .tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.choice-card h2 {
  font-size: 30px;
  color: var(--paper);
  margin-top: 10px;
}
.choice-card .count {
  margin-top: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: var(--steel-soft);
}
.choice-card .icon {
  position: absolute;
  right: 22px;
  bottom: 14px;
  font-size: 64px;
  opacity: 0.08;
  line-height: 1;
}

/* ==========================================================================
   PAGES : VEHICULES / ARMES (catégories + grille)
   ========================================================================== */
.cat-header {
  padding: 46px 24px 0;
  max-width: 1180px;
  margin: 0 auto;
}
.cat-header .tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--steel-soft);
  text-transform: uppercase;
}
.cat-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--paper);
  margin-top: 8px;
}

.tabs {
  max-width: 1180px;
  margin: 30px auto 0;
  padding: 0 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.tab {
  font-family: 'Oswald', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text-dim);
  background: var(--bg-raised);
  cursor: pointer;
  transition: all .15s ease;
}
.tab:hover { color: var(--text); border-color: var(--steel); }
.tab.active {
  color: #1b1405;
  background: var(--gold);
  border-color: var(--gold);
}

.grid-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 100px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.empty-state {
  text-align: center;
  padding: 70px 24px;
  color: var(--text-dim);
}
.empty-state .glyph { font-size: 40px; opacity: 0.3; margin-bottom: 14px; }
.empty-state p { font-size: 14px; max-width: 340px; margin: 6px auto 0; line-height: 1.6; }

/* ---------- Fiche de scellé (carte produit) ---------- */
.tag-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 2px;
  position: relative;
  padding: 18px 18px 20px;
  transform: rotate(var(--tilt, -0.4deg));
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}
.tag-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 18px 34px rgba(0,0,0,0.45);
}
.tag-card::before {
  /* bord perforé en haut */
  content: "";
  position: absolute;
  top: 0; left: 14px; right: 14px;
  height: 1px;
  background-image: repeating-linear-gradient(90deg, var(--ink-soft) 0 6px, transparent 6px 12px);
  opacity: 0.35;
}
.tag-hole {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--paper-dim);
}
.tag-card .tag-id {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.tag-photo {
  margin-top: 10px;
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 2px;
  object-fit: cover;
  background: #cfc8b6;
  border: 1px solid rgba(0,0,0,0.15);
}
.tag-photo-placeholder {
  margin-top: 10px;
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 2px;
  background: repeating-linear-gradient(45deg, #d9d2c1, #d9d2c1 8px, #cfc7b3 8px, #cfc7b3 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  opacity: 0.35;
}
.tag-card h3 {
  margin-top: 14px;
  font-size: 18px;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}
.tag-cat {
  display: inline-block;
  margin-top: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  border: 1px solid var(--steel);
  padding: 3px 8px;
  border-radius: 2px;
}
.tag-meta {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  font-size: 12.5px;
}
.tag-meta div span {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2px;
}
.tag-price {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(0,0,0,0.25);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.tag-price .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tag-price .value {
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--red-stamp);
}

.tag-sold-stamp {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  width: 45%;
  max-width: 150px;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
  z-index: 5;
}

.tag-cart-btn {
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  border-radius: 2px;
  border: 1px solid var(--ink-soft);
  background: var(--bg);
  color: var(--paper);
  font-family: 'Oswald', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s ease;
}
.tag-cart-btn:hover:not(:disabled) { background: var(--steel); border-color: var(--steel); }
.tag-cart-btn.in-cart { background: var(--gold); color: #1b1405; border-color: var(--gold); }
.tag-cart-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 32px;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, .tab:focus-visible {
  outline: 2px solid var(--steel-soft);
  outline-offset: 2px;
}

/* ==========================================================================
   PAGE : PANIER / COMMANDE
   ========================================================================== */
.panier-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 50px 24px 100px;
}
.panier-header .tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--steel-soft);
  text-transform: uppercase;
}
.panier-header h1 {
  font-size: clamp(28px, 4vw, 38px);
  color: var(--paper);
  margin-top: 8px;
}

.panier-list {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panier-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.panier-item img {
  width: 64px;
  height: 44px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--bg-raised);
  flex-shrink: 0;
}
.panier-item .ph {
  width: 64px;
  height: 44px;
  border-radius: 2px;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  opacity: 0.5;
}
.panier-item .info { flex: 1; min-width: 0; }
.panier-item .info .name { font-size: 14.5px; color: var(--paper); }
.panier-item .info .ref {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 2px;
}
.panier-item .price {
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  color: var(--gold-soft);
  white-space: nowrap;
}
.panier-item .remove {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
}
.panier-item .remove:hover { color: var(--red-stamp); }

.panier-total {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.panier-total .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.panier-total .value {
  font-family: 'Oswald', sans-serif;
  font-size: 28px;
  color: var(--gold);
}

.panier-cta {
  margin-top: 24px;
  width: 100%;
  background: var(--gold);
  color: #1b1405;
  border: none;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 15px;
  border-radius: var(--radius);
  cursor: pointer;
}
.panier-cta:hover { background: var(--gold-soft); }
.panier-cta[disabled] { opacity: 0.5; cursor: not-allowed; }

.checkout-form {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px dashed var(--line);
  display: none;
  flex-direction: column;
  gap: 16px;
}
.checkout-form.show { display: flex; }
.checkout-form h2 {
  font-size: 18px;
  color: var(--paper);
}
.checkout-form textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 11px 12px;
  border-radius: var(--radius);
  outline: none;
}
.checkout-form textarea:focus { border-color: var(--steel-soft); }
.checkout-hint {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: -8px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
