/* ═══════════════════════════════════════════════════════════════
   PLZ FACTORY — Design System Partagé v3
   Inclus sur toutes les pages via <link rel="stylesheet" href="plz.css">
═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #7c3aed; --brand2: #a855f7; --brand3: #6d28d9;
  --gold: #f59e0b;
  --bg:   #06060a; --bg2: #0a0a12; --bg3: #0f0f1a; --bg4: #141420;
  --bdr:  rgba(255,255,255,.06); --bdr2: rgba(255,255,255,.10); --bdr3: rgba(255,255,255,.15);
  --txt:  #f0f0f6; --muted: #7c7c94; --muted2: #4a4a60;
  --green: #22c55e; --red: #ef4444; --blue: #3b82f6; --amber: #f59e0b;
  --radius: 16px; --radius-sm: 10px; --radius-lg: 22px; --radius-xl: 28px;
  --shadow-brand: 0 8px 32px rgba(124,58,237,.35);
  --shadow-brand-hover: 0 14px 48px rgba(124,58,237,.55);
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ── BG GLOBAL GRADIENT (violet → noir vers le bas) ─────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(124,58,237,.22) 0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 10% 20%,  rgba(109,40,217,.10) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 90% 15%,  rgba(168,85,247,.09) 0%, transparent 50%);
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background: var(--bg);
  pointer-events: none;
}

/* ── GRID OVERLAY ────────────────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .028;
  background-image:
    linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 52px 52px;
}

/* ── LANG SYSTEM ─────────────────────────────────────────────── */
[data-le] { display: none !important; }
[data-le].on { display: revert !important; }

/* ── NAV PARTAGÉE ────────────────────────────────────────────── */
.plz-nav {
  position: sticky; top: 0; z-index: 200;
  padding: 0 24px;
  height: 62px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(6,6,10,.88);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--bdr2);
  transition: background .3s;
}
.plz-nav.scrolled { background: rgba(6,6,10,.97); }
.plz-nav-logo img { height: 30px; object-fit: contain; }
.plz-nav-center { display: flex; align-items: center; gap: 4px; }
.plz-nav-right  { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── LANG SWITCHER ───────────────────────────────────────────── */
.ls {
  display: flex; align-items: center; gap: 2px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--bdr2);
  border-radius: 12px; padding: 3px;
}
.lb {
  width: 32px; height: 28px; border-radius: 9px;
  font-size: 16px; border: none; background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; cursor: pointer;
}
.lb:hover { background: rgba(255,255,255,.08); }
.lb.on { background: rgba(124,58,237,.32); box-shadow: 0 0 0 1px rgba(124,58,237,.5); }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; border: none; border-radius: var(--radius);
  padding: 13px 24px; font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow-brand);
  transition: opacity .18s, transform .18s, box-shadow .18s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: var(--shadow-brand-hover); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: rgba(255,255,255,.05);
  color: var(--txt); border: 1px solid var(--bdr2); border-radius: var(--radius);
  padding: 12px 20px; font-size: 14px; font-weight: 600;
  transition: background .18s, border-color .18s;
  white-space: nowrap;
}
.btn-ghost:hover { background: rgba(255,255,255,.09); border-color: var(--bdr3); }

.btn-sm { padding: 8px 15px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-full { width: 100%; }

/* ── INPUTS ──────────────────────────────────────────────────── */
.inp {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--bdr2);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 14px; color: var(--txt);
  font-family: inherit; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.inp:hover { background: rgba(255,255,255,.06); }
.inp:focus {
  border-color: rgba(124,58,237,.65);
  box-shadow: 0 0 0 3px rgba(124,58,237,.13);
  background: rgba(255,255,255,.06);
}
.inp::placeholder { color: var(--muted); }
.inp:read-only { opacity: .45; cursor: default; }
.inp:read-only:hover { background: rgba(255,255,255,.04); }

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--bg3);
  border: 1px solid var(--bdr2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-body { padding: 24px 26px; }

/* ── ALERTS ──────────────────────────────────────────────────── */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; margin-bottom: 16px; }
.alert-err { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.22); color: #f87171; }
.alert-ok  { background: rgba(34,197,94,.08);  border: 1px solid rgba(34,197,94,.22);  color: #4ade80; }
.alert-info{ background: rgba(124,58,237,.08); border: 1px solid rgba(124,58,237,.22); color: #c4b5fd; }

/* ── FIELDS ──────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  color: #b0b0c8; margin-bottom: 7px;
}
.req { color: #f87171; font-weight: 800; }
.hint { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.5; }

/* ── PASSWORD TOGGLE ─────────────────────────────────────────── */
.pwd-wrap { position: relative; }
.pwd-toggle {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  transition: background .15s, color .15s;
}
.pwd-toggle:hover { background: rgba(255,255,255,.08); color: var(--txt); }
.pwd-toggle svg { width: 16px; height: 16px; }

/* ── STRENGTH BAR ────────────────────────────────────────────── */
.strength-track { height: 4px; background: var(--bdr2); border-radius: 4px; margin-top: 7px; overflow: hidden; }
.strength-fill  { height: 100%; border-radius: 4px; transition: width .35s, background .35s; width: 0; }
.strength-hint  { font-size: 11px; margin-top: 4px; min-height: 16px; transition: color .3s; }

/* ── DIVIDER ─────────────────────────────────────────────────── */
.divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--muted2); font-size: 12px; font-weight: 500;
  margin: 22px 0;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--bdr); }

/* ── STATUS PILLS ────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 4px 11px; border-radius: 99px; white-space: nowrap;
}
.pill-pending     { color: #fbbf24; background: rgba(251,191,36,.1);  border: 1px solid rgba(251,191,36,.2); }
.pill-inprogress  { color: #60a5fa; background: rgba(96,165,250,.1);  border: 1px solid rgba(96,165,250,.2); }
.pill-validated   { color: #4ade80; background: rgba(74,222,128,.1);  border: 1px solid rgba(74,222,128,.2); }
.pill-cancelled   { color: #f87171; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.2); }

/* ── PAGE WRAPPER ────────────────────────────────────────────── */
.page-wrap { max-width: 960px; margin: 0 auto; padding: 40px 18px 100px; }
.page-wrap-sm { max-width: 520px; margin: 0 auto; padding: 36px 16px 100px; }

/* ── SECTION HEADERS ─────────────────────────────────────────── */
.sec-label {
  font-size: 10px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #a78bfa; margin-bottom: 10px;
}
.sec-title {
  font-size: clamp(22px, 4vw, 36px); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.15;
}
.sec-sub { font-size: 15px; color: var(--muted); line-height: 1.7; margin-top: 10px; }

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.8); }
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}
.animate-fadeup { animation: fadeUp .5s ease both; }
.animate-fadeup-d1 { animation: fadeUp .5s .1s ease both; }
.animate-fadeup-d2 { animation: fadeUp .5s .2s ease both; }
.animate-fadeup-d3 { animation: fadeUp .5s .3s ease both; }

/* ── MOBILE ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .page-wrap  { padding: 24px 14px 80px; }
  .page-wrap-sm { padding: 24px 14px 80px; }
  .plz-nav { padding: 0 14px; height: 56px; }
  .hide-mobile { display: none !important; }
}
