/**
 * GMod4Life BaseWars — Thème One Piece
 * Tokens partagés (site public + dashboard) et composants décoratifs.
 *
 * Palette :
 *   Abysse (fond)        #070d18 → #182a45
 *   Rouge Chapeau de Paille  #e63946
 *   Or trésor            #f4b942 / #ffd166
 *   Bleu Grand Line      #2ec4e6
 *   Parchemin            #f3e2c0
 */

:root {
  /* Fonds */
  --bg: #070d18;
  --bg2: #0c1526;
  --bg3: #122036;
  --bg4: #182a45;
  --glass: rgba(12, 21, 38, 0.78);
  --glass-strong: rgba(12, 21, 38, 0.94);

  /* Texte */
  --text: #f5efe0;
  --text2: #a9b4c9;
  --text3: #6b7a94;

  /* Bordures teintées or */
  --border: rgba(244, 185, 66, 0.12);
  --border-hover: rgba(244, 185, 66, 0.30);
  --border-soft: rgba(255, 255, 255, 0.06);

  /* Accent principal — rouge Chapeau de Paille */
  --accent: #e63946;
  --accent2: #ff5a5f;
  --accent-glow: rgba(230, 57, 70, 0.32);
  --accent-soft: rgba(230, 57, 70, 0.12);

  /* Or trésor */
  --gold: #f4b942;
  --gold2: #ffd166;
  --gold-soft: rgba(244, 185, 66, 0.12);
  --gold-glow: rgba(244, 185, 66, 0.30);

  /* Grand Line */
  --sea: #2ec4e6;
  --sea-soft: rgba(46, 196, 230, 0.12);

  /* Parchemin */
  --parchment: #f3e2c0;
  --parchment-dark: #d9c39a;
  --ink: #2b1d0e;

  /* Alias de compatibilité (anciens tokens) */
  --cyan: var(--sea);
  --blue: var(--sea);
  --violet: var(--gold);

  /* États */
  --success: #2dd4a0;
  --warning: #f4b942;
  --danger: #ef4444;

  /* Typo */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --brand: 'Pirata One', 'Plus Jakarta Sans', serif;

  /* Layout */
  --nav-h: 66px;
  --max: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

/* ---------- Fond océan (utilisé par .site-bg et .dash-bg) ---------- */
.op-ocean {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 10% -10%, rgba(46, 196, 230, 0.10), transparent 55%),
    radial-gradient(ellipse 55% 45% at 95% 5%, rgba(230, 57, 70, 0.10), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 110%, rgba(244, 185, 66, 0.08), transparent 55%),
    linear-gradient(180deg, #0a1426 0%, var(--bg) 45%, #050910 100%);
}
.op-ocean::before {
  /* Rose des vents en filigrane */
  content: '';
  position: absolute;
  right: -140px;
  top: -120px;
  width: 620px;
  height: 620px;
  background: url('../img/compass.svg') center / contain no-repeat;
  opacity: 0.045;
  animation: op-spin 240s linear infinite;
}
.op-ocean::after {
  /* Vagues en bas */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 180px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 180' preserveAspectRatio='none'%3E%3Cpath fill='%232ec4e6' fill-opacity='0.05' d='M0,96 C240,160 480,32 720,96 C960,160 1200,32 1440,96 L1440,180 L0,180 Z'/%3E%3Cpath fill='%23f4b942' fill-opacity='0.035' d='M0,128 C240,64 480,192 720,128 C960,64 1200,192 1440,128 L1440,180 L0,180 Z'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}
@keyframes op-spin { to { transform: rotate(360deg); } }

/* ---------- Titres façon logo ---------- */
.op-brand {
  font-family: var(--brand);
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--gold2);
  text-shadow:
    0 2px 0 #9a6a10,
    0 4px 0 #6d4a0b,
    0 8px 22px rgba(0, 0, 0, 0.55);
}
.op-brand--red {
  color: var(--accent2);
  text-shadow:
    0 2px 0 #8f1c26,
    0 4px 0 #5d0f16,
    0 8px 22px rgba(0, 0, 0, 0.55);
}
.op-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.op-kicker::before,
.op-kicker::after {
  content: '';
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.op-kicker::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* ---------- Boutons trésor ---------- */
.btn-gold {
  background: linear-gradient(135deg, var(--gold2), var(--gold) 55%, #d9962a);
  color: #2b1d0e;
  font-weight: 800;
  box-shadow: 0 10px 28px var(--gold-glow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.btn-gold:hover { filter: brightness(1.05); }

/* ---------- Carte « parchemin » ---------- */
.op-parchment {
  position: relative;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.35), transparent 40%),
    radial-gradient(ellipse at 80% 90%, rgba(0, 0, 0, 0.08), transparent 45%),
    linear-gradient(180deg, #f6e8c9, var(--parchment) 60%, #e8d3a8);
  color: var(--ink);
  border: 2px solid #b48a4a;
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 0 40px rgba(120, 80, 20, 0.18);
}
.op-parchment::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(120, 80, 20, 0.45);
  border-radius: 4px;
  pointer-events: none;
}

/* ---------- Avis de recherche (WANTED) ---------- */
.wanted {
  position: relative;
  padding: 22px 18px 18px;
  text-align: center;
  font-family: var(--display);
}
.wanted-head {
  font-family: var(--brand);
  font-size: 2.1rem;
  letter-spacing: 0.08em;
  color: #6d3b0f;
  line-height: 1;
}
.wanted-sub {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #8a5a22;
  margin-top: 4px;
}
.wanted-photo {
  width: 120px;
  height: 120px;
  margin: 14px auto 12px;
  border-radius: 8px;
  border: 3px solid #8a5a22;
  background: #dcc49a;
  display: grid;
  place-items: center;
  overflow: hidden;
  filter: sepia(0.35) contrast(1.05);
}
.wanted-photo img { width: 100%; height: 100%; object-fit: cover; }
.wanted-photo span {
  font-family: var(--brand);
  font-size: 2.6rem;
  color: #6d3b0f;
}
.wanted-name {
  font-family: var(--brand);
  font-size: 1.5rem;
  color: #2b1d0e;
  letter-spacing: 0.04em;
  line-height: 1.05;
}
.wanted-role {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border: 1.5px solid #8a5a22;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6d3b0f;
}
.wanted-bounty {
  margin-top: 12px;
  font-family: var(--brand);
  font-size: 1.15rem;
  color: #6d3b0f;
  letter-spacing: 0.05em;
}
.wanted-bounty small {
  display: block;
  font-family: var(--display);
  font-size: 0.72rem;
  color: #5a4021;
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: 0;
}

/* ---------- Séparateur corde ---------- */
.op-rope {
  height: 6px;
  border-radius: 3px;
  background: repeating-linear-gradient(
    -45deg,
    #c99a44 0 6px,
    #a97a2c 6px 12px
  );
  opacity: 0.55;
}

/* ---------- Puce Log Pose (statut serveur) ---------- */
.logpose {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: rgba(12, 21, 38, 0.8);
  border: 1px solid var(--border-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-weight: 700;
  font-size: 0.86rem;
}
.logpose-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(45, 212, 160, 0.18), 0 0 14px var(--success);
  animation: op-pulse 2s ease-in-out infinite;
}
.logpose.offline .logpose-dot,
.offline .logpose-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
  animation: none;
}
@keyframes op-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

/* ---------- Jolly Roger inline ---------- */
.jolly {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: url('../img/jolly-roger.svg') center / contain no-repeat;
  vertical-align: -0.15em;
}

/* ---------- Animations utilitaires ---------- */
.anim-fade-up { animation: op-fade-up 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
@keyframes op-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .op-ocean::before, .logpose-dot, .anim-fade-up { animation: none !important; }
}

/* Sélection / scrollbar */
::selection { background: rgba(244, 185, 66, 0.35); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: rgba(244, 185, 66, 0.35) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: rgba(244, 185, 66, 0.3); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(244, 185, 66, 0.5); }
