/* ==========================================================================
   JoeyyFrench — design system (noir profond + rouge néon, motif « coupe du J »)
   ========================================================================== */

:root {
  --bg: #050505;
  --bg-2: #030303;
  --surface: #0e0e10;
  --surface-2: #09090a;
  --surface-3: #17171a;
  --border: #222226;
  --border-soft: #1b1b1f;
  --border-strong: #33333b;

  --text: #f4f4f5;
  --text-2: #c4c4cc;
  --muted: #a1a1aa;
  --faint: #8e8e98;

  --red: #e0060f;          /* fonds de boutons (contraste 5:1 avec le blanc) */
  --red-neon: #ff1a1a;     /* lueurs, traits */
  --red-text: #ff3b3b;     /* texte rouge sur noir */
  --red-soft: #ff5252;
  --red-tint: rgba(255, 26, 26, 0.12);
  --red-deep: #1a0505;
  --red-line: #3a0909;
  --red-line-2: #5a0f0f;

  --ok: #86efac;
  --ok-bg: rgba(34, 197, 94, 0.12);
  --warn: #fde047;
  --warn-bg: rgba(234, 179, 8, 0.12);
  --info: #a5b4fc;
  --discord: #5865f2;

  --glow: 0 0 22px rgba(255, 26, 26, 0.35);
  --glow-strong: 0 0 36px rgba(255, 26, 26, 0.6);

  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --container: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--red-text); }
a:hover { color: #ff7a7a; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red-neon); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; align-items: center; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.grid-auto { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 260px), 100%), 1fr)); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--font-mono); }
.red { color: var(--red-text); }

/* ---------- Typographie ---------- */
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4vw, 40px); }
.h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 3vw, 30px); }
.lead { font-size: 18px; line-height: 1.6; color: #b4b4bc; }
.title-slash { display: flex; align-items: center; gap: 14px; }
.title-slash::before {
  content: '';
  width: 7px;
  height: 0.9em;
  flex: none;
  background: var(--red-neon);
  transform: skewX(-38deg);
  box-shadow: 0 0 14px rgba(255, 26, 26, 0.7);
}
.neon { color: #ff2a2a; animation: jf-textglow 3.2s ease-in-out infinite; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 6px;
  background: var(--red-deep); border: 1px solid var(--red-line);
  color: var(--red-text); font: 500 11px var(--font-mono);
}
.chip {
  padding: 4px 8px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border);
  font: 500 11px var(--font-mono); color: var(--text-2);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.muted { background: var(--border); color: var(--muted); }
.pill.red { background: var(--red-tint); color: var(--red-soft); }
.pill.founder { background: var(--red); color: #fff; box-shadow: var(--glow); }

/* ---------- Boutons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 20px; border-radius: 12px; border: 0;
  background: var(--red); color: #fff; font-weight: 800; font-size: 15px; text-decoration: none;
  cursor: pointer; box-shadow: var(--glow);
  transition: transform .18s, box-shadow .25s, filter .2s;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--glow-strong); filter: brightness(1.08); }
.btn:active { transform: translateY(0) scale(.98); }
.btn::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 40%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  transform: translateX(-130%) skewX(-30deg);
}
.btn:hover::after { animation: jf-shine .75s ease; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 16px; }
.btn-sm { height: 40px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-discord { background: var(--discord); box-shadow: none; }
.btn-discord:hover { box-shadow: 0 0 30px rgba(88, 101, 242, .55); }

.ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 20px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text);
  font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: border-color .2s, background-color .2s, transform .18s, color .2s;
}
.ghost:hover { color: var(--text); border-color: var(--red); background: rgba(255, 26, 26, .08); transform: translateY(-2px); }
.ghost.btn-lg { height: 56px; padding: 0 28px; }
.ghost.btn-sm { height: 40px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.ghost.danger { border-color: var(--red-line-2); color: var(--red-soft); }
.icon-btn {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--border); background: transparent; color: #e4e4e7; cursor: pointer;
}
.icon-btn:hover { border-color: var(--red); color: #fff; }
.badge-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}

/* ---------- Cartes ---------- */
.card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 20px;
}
.card-link { text-decoration: none; color: var(--text); }
.card-hover { transition: border-color .2s, transform .2s, box-shadow .25s; }
.card-hover:hover { color: var(--text); border-color: var(--red); transform: translateY(-4px); box-shadow: 0 10px 40px rgba(255, 26, 26, .18); }
.card-hover .arrow { transition: transform .2s; }
.card-hover:hover .arrow { transform: translateX(4px); }
.card-red { border-color: var(--red-line); background: radial-gradient(70% 120% at 100% 0%, rgba(255,26,26,.14), rgba(255,26,26,0) 70%), var(--surface); }
.empty {
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: 28px; text-align: center; color: var(--muted);
}

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.input, .field input, .field select, .field textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid #2a2a31; background: var(--surface-2); color: var(--text);
  font: 500 15px var(--font-body); outline: none; transition: border-color .2s, box-shadow .2s;
}
.field textarea { height: auto; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 26, 26, .18); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.5; font-weight: 500; }
.check input { flex: none; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.alert-error { background: rgba(255, 26, 26, .1); border: 1px solid var(--red-line-2); color: #ffd6d6; }
.alert-success { background: rgba(34, 197, 94, .08); border: 1px solid #1f4d2e; color: #c6f6d5; }
.alert-info { background: rgba(165, 180, 252, .08); border: 1px solid #2c3155; color: #dfe3ff; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(5, 5, 5, .94); border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(10px);
}
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 42px; height: 42px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: .01em; }
.brand-name span { color: #ff2a2a; text-shadow: 0 0 12px rgba(255, 26, 26, .5); }
.main-nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1 1 auto; }
.nl {
  position: relative; color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: 8px;
  font-weight: 600; font-size: 14px; transition: color .2s, background-color .2s;
}
.nl:hover, .nl.active { color: #fff; background: var(--surface-3); }
.nl::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px;
  background: var(--red-neon); box-shadow: 0 0 8px var(--red-neon); transform: scaleX(0); transition: transform .25s ease;
}
.nl:hover::after, .nl.active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.user-chip {
  height: 44px; padding: 0 14px 0 6px; display: flex; align-items: center; gap: 10px;
  border-radius: 10px; border: 1px solid var(--red); color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px;
}
.user-chip:hover { color: var(--text); background: rgba(255, 26, 26, .08); }
.avatar {
  width: 32px; height: 32px; border-radius: 8px; flex: none; object-fit: cover;
  background: #2a2a31; display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.avatar-logo { padding: 3px; background: var(--surface-2); }
.nav-toggle { display: none; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--border-soft); background: var(--bg-2); margin-top: 80px; }
.site-footer .container { padding-top: 56px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 40px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 40px 64px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; min-width: 160px; }
.footer-col h2 { font-family: var(--font-body); font-size: 14px; font-weight: 800; }
.fl { color: var(--muted); text-decoration: none; font-size: 14px; }
.fl:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border-soft); padding-top: 20px; font-size: 13px; color: var(--faint); }

/* ---------- Accueil ---------- */
.hero {
  position: relative; overflow: hidden; border-bottom: 1px solid #2a0707;
  background: radial-gradient(50% 70% at 76% 42%, rgba(255, 20, 20, .2), rgba(255, 20, 20, 0) 70%), var(--bg);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 80% at 60% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(70% 80% at 60% 40%, #000 30%, transparent 80%);
}
.beam { position: absolute; top: -20%; width: 2px; height: 150%; background: var(--red-neon); box-shadow: 0 0 22px 2px rgba(255, 26, 26, .9); opacity: 0; transform: rotate(45deg); animation: jf-beam 7s ease-in-out infinite both; pointer-events: none; }
.beam.b1 { left: 45%; }
.beam.b2 { left: 65%; width: 1px; animation-duration: 9s; animation-delay: 2.5s; }
.hero-inner { position: relative; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 96px; padding-bottom: 104px; }
.hero-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-title { font-size: clamp(38px, 5.4vw, 62px); }
.hero-badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--red-line); background: rgba(255, 26, 26, .1); color: var(--red-soft);
  font: 500 12px var(--font-mono); letter-spacing: .06em;
}
.hero-stats { display: flex; flex-wrap: wrap; gap: 0; padding-top: 8px; }
.hero-stats div { display: flex; flex-direction: column; gap: 2px; padding-right: 28px; margin-right: 28px; border-right: 1px solid var(--border); }
.hero-stats div:last-child { border-right: 0; }
.hero-stats strong { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.hero-stats span { font-size: 13px; color: var(--muted); }
.hero-visual { position: relative; flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; }
.hero-logo { align-self: center; width: 280px; height: 280px; animation: jf-flicker 2.2s ease-out 1, jf-pulse 3.4s ease-in-out 2.2s infinite, jf-float 6s ease-in-out infinite; }
.order-card {
  position: relative; z-index: 1; margin-top: -86px; border: 1px solid var(--red-line); border-radius: 18px;
  background: rgba(12, 12, 14, .78); backdrop-filter: blur(14px); padding: 22px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 50px rgba(255, 26, 26, .14);
}
.progress { display: flex; gap: 6px; }
.progress span { flex: 1; height: 6px; border-radius: 3px; background: #2a2a31; }
.progress span.on { background: var(--red); }
.bubble { border-radius: 4px 12px 12px 12px; padding: 10px 12px; font-size: 14px; line-height: 1.5; background: var(--surface-3); color: #d4d4d8; }
.bubble.me { border-radius: 12px 4px 12px 12px; background: #2a0707; color: #ffd6d6; }
.typing { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); padding-left: 40px; }
.dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--red-text); animation: jf-bounce 1.2s infinite; }
.dot:nth-child(2) { animation-delay: .15s; } .dot:nth-child(3) { animation-delay: .3s; }

.marquee { overflow: hidden; border-bottom: 1px solid var(--border-soft); background: #080808; padding: 18px 0; }
.marquee-track { display: flex; width: max-content; animation: jf-marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font-family: var(--font-display); font-size: 18px; font-weight: 600; color: #6b6b75; white-space: nowrap; }
.marquee-item::after { content: ''; width: 6px; height: 18px; background: var(--red-neon); transform: skewX(-38deg); box-shadow: 0 0 10px rgba(255, 26, 26, .8); }

.section { padding-top: 72px; display: flex; flex-direction: column; gap: 28px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.service-code {
  width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--red-deep); border: 1px solid var(--red-line);
  display: grid; place-items: center; font: 500 13px var(--font-mono); color: var(--red-text);
}
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.step { padding: 24px; background: var(--surface); border-right: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 10px; transition: background-color .25s; }
.step:hover { background: #120404; }
.step-n { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--red-neon); transition: text-shadow .25s; }
.step:hover .step-n { text-shadow: 0 0 18px rgba(255, 26, 26, .9); }
.discord-band { border: 1px solid var(--red-line); border-radius: 20px; background: #110303; padding: 40px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }

/* ---------- Développeurs ---------- */
.dev-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.dev-banner { height: 110px; background: radial-gradient(60% 120% at 80% 0%, rgba(255, 26, 26, .22), rgba(255, 26, 26, 0) 70%), #110303; border-bottom: 1px solid var(--border-soft); }
.dev-banner img { width: 100%; height: 100%; object-fit: cover; }
.dev-body { padding: 0 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.dev-avatar {
  width: 68px; height: 68px; border-radius: 16px; border: 4px solid var(--surface); margin-top: -32px;
  background: #3f3f46; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 18px; object-fit: cover;
}
.dev-avatar.logo { padding: 6px; background: var(--surface-2); box-shadow: 0 0 16px rgba(255, 26, 26, .3); }
.profile-banner { height: 240px; background: radial-gradient(60% 120% at 80% 0%, rgba(255, 26, 26, .25), rgba(255, 26, 26, 0) 70%), #110303; border-bottom: 1px solid #2a0707; }
.profile-banner img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar { width: 120px; height: 120px; border-radius: 26px; border: 6px solid var(--bg); background: #3f3f46; display: grid; place-items: center; font-family: var(--font-display); font-size: 34px; font-weight: 700; object-fit: cover; }
.profile-avatar.logo { padding: 12px; background: var(--surface-2); box-shadow: 0 0 30px rgba(255, 26, 26, .35); }
.work-img { aspect-ratio: 16 / 10; background: var(--surface-3); border-bottom: 1px solid var(--border-soft); display: grid; place-items: center; color: #6b6b75; font: 500 11px var(--font-mono); }
.work-img img { width: 100%; height: 100%; object-fit: cover; }
.like-btn {
  height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border); background: transparent; color: var(--text-2);
  font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: all .2s;
}
.like-btn[aria-pressed='true'] { background: rgba(255, 26, 26, .14); color: var(--red-soft); border-color: var(--red-line-2); }
.like-btn[aria-pressed='true'] svg { fill: currentColor; }
.filter-chip {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-weight: 700; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center;
  transition: background-color .2s, color .2s, border-color .2s;
}
.filter-chip:hover { color: #fff; border-color: var(--red); }
.filter-chip.active { background: var(--red); border-color: var(--red); color: #fff; box-shadow: var(--glow); }

/* ---------- Connexion ---------- */
.auth-wrap { display: flex; flex-wrap: wrap; min-height: calc(100vh - 69px); }
.auth-brand {
  flex: 1 1 480px; min-width: 0; padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 24px;
  background: radial-gradient(70% 60% at 30% 45%, rgba(255, 20, 20, .14), rgba(255, 20, 20, 0) 70%), var(--bg); border-right: 1px solid #2a0707;
}
.auth-brand img { width: 150px; height: 150px; margin-left: -18px; animation: jf-flicker 2.2s ease-out 1, jf-pulse 3.4s ease-in-out 2.2s infinite, jf-float 6s ease-in-out infinite; }
.auth-brand ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; color: #d4c4c6; }
.auth-brand li { display: flex; gap: 12px; align-items: center; }
.auth-brand li::before { content: '✓'; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.auth-form { flex: 1 1 480px; min-width: 0; padding: 48px 24px; display: grid; place-items: center; }
.auth-form > div { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px; }
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.tabs a { height: 42px; display: grid; place-items: center; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; transition: background-color .2s, color .2s; }
.tabs a.active { background: var(--red); color: #fff; box-shadow: var(--glow); }
.divider { display: flex; align-items: center; gap: 12px; color: #6b6b75; font-size: 12px; font-weight: 700; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- Pages légales / simples ---------- */
.page-head { padding-top: 48px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.prose { max-width: 820px; font-size: 16px; line-height: 1.75; color: #d4d4d8; }
.prose h2 { font-family: var(--font-display); font-size: 20px; color: var(--text); margin: 36px 0 12px; }
.prose h3 { font-size: 16px; color: var(--text); margin: 24px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.legal-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.legal-nav { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 90px; }
.legal-nav a { padding: 10px 12px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 700; font-size: 14px; }
.legal-nav a:hover { background: var(--surface-3); color: #fff; }
.legal-nav a.active { background: var(--red); color: #fff; }
.notice { padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--border-strong); color: var(--muted); font-size: 13px; }

/* ---------- Animations ---------- */
@keyframes jf-pulse { 0%, 100% { filter: drop-shadow(0 0 3px rgba(255,26,26,.45)); } 50% { filter: drop-shadow(0 0 12px rgba(255,26,26,.95)); } }
@keyframes jf-flicker { 0%, 17%, 21%, 24%, 52%, 56%, 100% { opacity: 1; } 19%, 23%, 54% { opacity: .25; } }
@keyframes jf-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes jf-ping { 0% { transform: scale(1); opacity: .75; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
@keyframes jf-shine { from { transform: translateX(-130%) skewX(-30deg); } to { transform: translateX(330%) skewX(-30deg); } }
@keyframes jf-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes jf-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(-2deg); } }
@keyframes jf-beam { 0% { transform: translateX(-420px) rotate(45deg); opacity: 0; } 20% { opacity: .55; } 80% { opacity: .35; } 100% { transform: translateX(520px) rotate(45deg); opacity: 0; } }
@keyframes jf-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes jf-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes jf-textglow { 0%, 100% { text-shadow: 0 0 16px rgba(255,26,26,.4); } 50% { text-shadow: 0 0 34px rgba(255,26,26,.9); } }

.jlogo { animation: jf-flicker 2.2s ease-out 1, jf-pulse 3.4s ease-in-out 2.2s infinite; }
.rv { animation: jf-up .7s cubic-bezier(.2, .7, .2, 1) both; }
.d1 { animation-delay: .06s; } .d2 { animation-delay: .14s; } .d3 { animation-delay: .22s; } .d4 { animation-delay: .3s; } .d5 { animation-delay: .38s; }
@supports (animation-timeline: view()) {
  .sr { animation: jf-up linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
}
.ping { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red-neon); }
.ping::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: jf-ping 1.6s cubic-bezier(0, 0, .2, 1) infinite; }
.shim { background-image: linear-gradient(90deg, #e0060f 0%, #ff6a6a 50%, #e0060f 100%) !important; background-size: 200% 100%; animation: jf-shimmer 2.2s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .nav-toggle { display: grid; margin-left: auto; }
  .main-nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; }
  .main-nav.open { display: flex; }
  .header-actions .label { display: none; }
  .hero-inner { padding-top: 56px; padding-bottom: 64px; }
  .hero-logo { width: 200px; height: 200px; }
  .hero-stats div { padding-right: 16px; margin-right: 16px; }
  .auth-brand { padding: 32px 16px; }
  .discord-band { padding: 24px; }
  .legal-nav { position: static; max-width: none; }
}

/* ==========================================================================
   Boutique
   ========================================================================== */
.search-box { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid #2a2a31; background: var(--surface); flex: 0 1 380px; min-width: 240px; }
.search-box:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 26, 26, .18); }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 500 15px var(--font-body); outline: none; }
.shop-filters { flex: 1 1 220px; max-width: 260px; }
.stars { color: var(--red-text); letter-spacing: 1px; font-size: 13px; }
.stars .faint { letter-spacing: 0; }
.price { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.page-link { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); color: var(--text-2); display: grid; place-items: center; text-decoration: none; font-weight: 700; }
.page-link.active { background: var(--red); border-color: var(--red); color: #fff; box-shadow: var(--glow); }

.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-3); border-bottom: 1px solid var(--border-soft); display: grid; place-items: center; overflow: hidden; }
.product-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-media img { transform: scale(1.04); }
.product-cat { position: absolute; top: 12px; left: 12px; background: var(--bg); z-index: 1; }
.product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.product-title { font-weight: 800; font-size: 16px; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: rgba(5, 5, 5, .8); color: var(--text); display: grid; place-items: center; cursor: pointer;
  opacity: 0; transition: opacity .2s, border-color .2s;
}
.carousel-btn.big { width: 44px; height: 44px; }
.product-media:hover .carousel-btn, .gallery-main:hover .carousel-btn, .carousel-btn:focus-visible { opacity: 1; }
.carousel-btn:hover { border-color: var(--red); }
.carousel-btn.prev { left: 10px; } .carousel-btn.next { right: 10px; }
.carousel-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 1; }
.carousel-dots span { width: 5px; height: 5px; border-radius: 3px; background: #4a4a52; transition: width .2s, background-color .2s; }
.carousel-dots span.on { width: 16px; background: var(--red); }
@media (hover: none) { .carousel-btn { opacity: 1; } }

.gallery-main { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.gallery-slide { position: absolute; inset: 0; display: grid; place-items: center; }
.gallery-slide img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.gallery-slide iframe { width: 100%; height: 100%; border: 0; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.thumb { aspect-ratio: 16 / 10; border-radius: 10px; border: 2px solid var(--border); background: var(--surface); color: var(--faint); font-size: 11px; cursor: pointer; overflow: hidden; padding: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--red); box-shadow: var(--glow); }

.buy-box { flex: 1 1 360px; min-width: 0; padding: 24px; }
.specs { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14px; border-top: 1px solid var(--border-soft); padding-top: 16px; }
.specs dt { color: var(--faint); }
.specs dd { margin: 0; text-align: right; font-weight: 700; }
.follow-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-soft); font-size: 14px; color: var(--text-2); font-weight: 600; }
.switch { width: 44px; height: 26px; border-radius: 13px; border: 0; background: var(--border-strong); position: relative; cursor: pointer; flex: none; transition: background-color .2s, box-shadow .2s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch[aria-checked='true'] { background: var(--red); box-shadow: 0 0 14px rgba(255, 26, 26, .45); }
.switch[aria-checked='true'] span { transform: translateX(18px); }

.tabs-card { padding: 0; overflow: hidden; }
.tab-list { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border-soft); overflow-x: auto; }
.tab-list button { height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background-color .2s, color .2s; }
.tab-list button:hover { color: #fff; background: var(--surface-3); }
.tab-list button[aria-selected='true'] { background: var(--red); color: #fff; box-shadow: var(--glow); }
.tab-panel { padding: 28px; min-height: 240px; }
.prose pre { padding: 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border-soft); overflow-x: auto; }
.prose code { font-family: var(--font-mono); color: #ff8a95; font-size: .92em; }
.prose img { border-radius: 12px; margin: 12px 0; }
.changelog-item { display: flex; flex-direction: column; gap: 6px; border-left: 2px solid var(--red); padding-left: 14px; }
.bar-track { flex: 1; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--red); transform-origin: left; animation: jf-growx 1s cubic-bezier(.2, .7, .2, 1) .2s both; }
@keyframes jf-growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 26px; color: #3f3f46; cursor: pointer; transition: color .15s, transform .15s; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--red-text); }
.star-input input:focus-visible + label { outline: 2px solid var(--red-neon); border-radius: 4px; }
.star-input label:hover { transform: scale(1.15); }

.cart-line { align-items: center; padding: 14px 16px; }
.cart-thumb { width: 88px; height: 56px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--border); overflow: hidden; flex: none; display: block; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pay-option { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); font-weight: 700; font-size: 14px; cursor: pointer; transition: border-color .2s; }
.pay-option:has(input:checked) { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 26, 26, .12); }
.pay-option input { flex: none; }
.license-key { padding: 6px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border-soft); font-family: var(--font-mono); color: #d4d4d8; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.table th { text-align: left; color: var(--faint); font-size: 12px; padding: 14px 18px; font-weight: 800; }
.table td { padding: 12px 18px; border-top: 1px solid var(--border-soft); }

.dropzone { border: 2px dashed var(--border-strong); border-radius: 12px; padding: 16px; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; background: var(--surface-2); transition: border-color .2s; }
.dropzone:hover { border-color: var(--red); }
.dropzone input { font-size: 13px; color: var(--text-2); }
.thumb-edit { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.thumb-edit img { width: 100%; height: 100%; object-fit: cover; }
.thumb-edit button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(5, 5, 5, .85); color: #fff; font-weight: 800; cursor: pointer; }
.thumb-edit button:hover { background: var(--red); }

@media (max-width: 760px) {
  .shop-filters { max-width: none; }
  .tab-panel { padding: 18px; }
  .buy-box { padding: 18px; }
}

/* ---------- Notifications ---------- */
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); flex: none; }
.notif.unread { border-color: var(--red-line); }
.notif.unread .notif-dot { background: var(--red-neon); box-shadow: 0 0 8px var(--red-neon); }

/* ==========================================================================
   Commandes sur devis
   ========================================================================== */
.step-title { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 800; }
.step-title span { width: 28px; height: 28px; border-radius: 8px; background: var(--red); display: grid; place-items: center; font-size: 13px; box-shadow: var(--glow); }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 10px; }
.type-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--border); background: var(--surface-2); transition: border-color .2s, background-color .2s, transform .15s, box-shadow .2s;
}
.type-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.type-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.type-card:has(input:checked) { border-color: var(--red); background: var(--red-deep); box-shadow: 0 0 24px rgba(255, 26, 26, .2); }
.type-card:has(input:focus-visible) { outline: 2px solid var(--red-neon); outline-offset: 2px; }
.pay-rules { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: #d4c4c6; font-size: 14px; line-height: 1.6; }
.pay-rules strong { color: #fff; }
.timeline { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; }
.timeline li { position: relative; padding: 0 0 18px 40px; display: flex; flex-direction: column; gap: 3px; counter-increment: step; }
.timeline li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--red); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--red-text); }
.timeline li::after { content: ''; position: absolute; left: 12px; top: 30px; bottom: 4px; width: 2px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline strong { font-size: 14px; }
.timeline span { font-size: 13px; color: var(--faint); line-height: 1.5; }

.stepper { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.stepper li { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 700; color: #6b6b75; }
.stepper li span { height: 6px; border-radius: 3px; background: var(--border); }
.stepper li.done { color: var(--text); }
.stepper li.done span { background: var(--red); }
.quote-why { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px; }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.proof-grid.small { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.proof { aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); text-decoration: none; padding: 6px; text-align: center; transition: border-color .2s; }
.proof:hover { border-color: var(--red); }
.proof img { width: calc(100% + 12px); height: calc(100% + 12px); margin: -6px; object-fit: cover; }
.details summary { cursor: pointer; color: var(--red-soft); font-weight: 700; font-size: 13px; }
.status-choice { display: inline-flex; }
.status-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.status-choice span { height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border-strong); display: inline-flex; align-items: center; font-weight: 700; font-size: 13px; cursor: pointer; transition: all .2s; }
.status-choice input:checked + span { background: var(--red); border-color: var(--red); color: #fff; box-shadow: var(--glow); }
.status-choice input:focus-visible + span { outline: 2px solid var(--red-neon); outline-offset: 2px; }
.crit { border: 1px solid var(--border-soft); border-radius: 12px; padding: 10px 12px; margin: 0; background: var(--surface-2); }
.crit legend { font-size: 13px; font-weight: 700; color: var(--muted); padding: 0 4px; }
.crit .star-input label { font-size: 22px; }

.chat { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.chat-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border-soft); }
.chat-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; max-height: 560px; overflow-y: auto; }
.sys-msg { align-self: center; max-width: 90%; text-align: center; font-size: 12px; color: var(--muted); padding: 5px 12px; border-radius: 999px; background: var(--surface-3); white-space: pre-line; }
.msg { display: flex; gap: 10px; align-items: flex-start; max-width: 82%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; text-align: right; }
.msg .avatar { width: 32px; height: 32px; border-radius: 9px; }
.msg .bubble { white-space: pre-line; text-align: left; }
.msg.mine .stack { align-items: flex-end; }
.msg-file { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: 12px; text-decoration: none; overflow: hidden; }
.msg-file img { width: 160px; height: 100px; object-fit: cover; border-radius: 6px; margin: -2px -6px; }
.chat-form { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border-soft); }
.chat-form textarea { width: 100%; border-radius: 11px; border: 1px solid #2a2a31; background: var(--surface-2); color: var(--text); padding: 12px 14px; font: 500 15px/1.5 var(--font-body); resize: vertical; outline: none; }
.chat-form textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 26, 26, .18); }
.attach-btn { position: relative; overflow: hidden; }
.attach-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.request { display: flex; flex-direction: column; gap: 6px; border-width: 2px; transition: border-color .2s, box-shadow .2s; }
.request:hover { border-color: var(--border-strong); }
.request.selected { border-color: var(--red); box-shadow: 0 0 24px rgba(255, 26, 26, .2); }
.quote-calc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-soft); font-size: 13px; }
.quote-calc span { display: flex; flex-direction: column; gap: 2px; }
.quote-calc strong { font-size: 17px; }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }
@media (max-width: 760px) {
  .msg { max-width: 100%; }
  .quote-calc { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Espaces client / développeur / administration
   ========================================================================== */
.space { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 28px; padding-bottom: 24px; }
.space-side { flex: 1 1 240px; max-width: 280px; min-width: 0; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 88px; }
.space-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.space-main > .container { padding: 0; max-width: none; }
.space-main > .container > .stack[role='status'] { margin-bottom: -4px; }
.side-card {
  border: 1px solid var(--red-line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px;
  background: radial-gradient(90% 80% at 0% 0%, rgba(255, 26, 26, .14), rgba(255, 26, 26, 0) 70%), var(--surface);
}
.side-avatar { width: 48px; height: 48px; border-radius: 13px; background: #2a2a31; display: grid; place-items: center; font-weight: 800; flex: none; object-fit: cover; }
.side-avatar.logo { padding: 4px; background: var(--surface-2); }
.side-line { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--border-soft); font-size: 13px; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-xs { align-self: flex-start; padding: 2px 8px; font-size: 11px; gap: 6px; }
.sdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.side-nav { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 8px; }
.side-head { padding: 12px 12px 4px; font-size: 11px; font-weight: 800; color: var(--faint); letter-spacing: .08em; }
.side-link {
  min-height: 42px; padding: 8px 12px; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-weight: 700; font-size: 14px; color: var(--text-2); text-decoration: none; transition: background-color .2s, color .2s;
}
.side-link:hover { background: var(--surface-3); color: #fff; }
.side-link.active { background: var(--red); color: #fff; box-shadow: var(--glow); }
.side-link.side-jump { color: var(--red-text); }
.side-link.side-jump.muted { color: var(--muted); }
.side-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; }
.side-badge.soft { background: var(--border-strong); }
.side-link.active .side-badge { background: #fff; color: var(--red); }
.side-sep { height: 1px; background: var(--border-soft); margin: 8px 4px; }
.avail-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.avail-switch button { height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--faint); font: 800 11px var(--font-body); letter-spacing: .04em; cursor: pointer; }
.avail-switch button:hover { color: #fff; }
.avail-switch button.on.ok { background: var(--ok-bg); color: var(--ok); }
.avail-switch button.on.warn { background: var(--warn-bg); color: var(--warn); }
.avail-switch button.on.muted { background: var(--border); color: var(--text); }

.space-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3vw, 28px); }
.space-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.space-head .sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.card-title { font-size: 16px; font-weight: 800; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi .k-label { font-size: 13px; color: var(--muted); font-weight: 700; }
.kpi .k-value { font-family: var(--font-display); font-weight: 600; font-size: 24px; }
.kpi .k-sub { font-size: 12px; color: var(--faint); }
.kpi .up { color: var(--ok); } .kpi .down { color: var(--red-soft); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; transition: border-color .2s, transform .2s; }
.quick a:hover { border-color: var(--red); transform: translateY(-2px); color: #fff; }
.quick .q-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--red-deep); border: 1px solid var(--red-line); color: var(--red-text); display: grid; place-items: center; font-family: var(--font-mono); font-size: 13px; flex: none; }
.cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; align-items: start; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border-soft); font-size: 14px; }
.list-row:first-of-type { border-top: 0; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.seg a, .seg button { height: 34px; padding: 0 12px; border: 0; border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; font: 700 13px var(--font-body); color: var(--muted); text-decoration: none; background: transparent; cursor: pointer; }
.seg a:hover, .seg button:hover { color: #fff; }
.seg a.active, .seg button.active { background: var(--red); color: #fff; }
.seg .n { font-size: 11px; opacity: .8; }
.table-card { padding: 0; overflow-x: auto; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.table tr:hover td { background: rgba(255, 255, 255, .015); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.inline-form { display: inline; }
.link-btn { border: 0; background: none; padding: 0; color: var(--red-text); font: 700 13px var(--font-body); cursor: pointer; }
.link-btn:hover { color: #ff7a7a; }
.mini-btn { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: transparent; color: var(--text); font: 700 12px var(--font-body); cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.mini-btn:hover { border-color: var(--red); color: #fff; }
.mini-btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.mini-btn.danger { border-color: var(--red-line-2); color: var(--red-soft); }
.gauge { height: 10px; border-radius: 5px; background: var(--border); overflow: hidden; }
.gauge span { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--red-neon)); box-shadow: 0 0 12px rgba(255, 26, 26, .5); transform-origin: left; animation: jf-growx 1s cubic-bezier(.2, .7, .2, 1) .2s both; }
.gauge.ok span { background: #22c55e; box-shadow: none; }

.bar-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; height: 200px; padding-top: 18px; }
.bar-chart .col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; position: relative; }
.bar-chart .bar { width: 100%; max-width: 36px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--red-neon), var(--red)); box-shadow: 0 0 14px rgba(255, 26, 26, .35); transform-origin: bottom; animation: jf-growy .9s cubic-bezier(.2, .7, .2, 1) both; }
.bar-chart .col:hover .bar { filter: brightness(1.25); }
.bar-chart .val { position: absolute; top: -2px; font-size: 11px; color: var(--text); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.bar-chart .col:hover .val { opacity: 1; }
.bar-chart .m { font-size: 11px; color: var(--faint); }
@keyframes jf-growy { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.funnel-row { display: grid; grid-template-columns: 170px 1fr 70px; gap: 12px; align-items: center; font-size: 13px; }
.funnel-row .bar-track { height: 10px; border-radius: 5px; }

.alert-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.alert-row.red { border-color: var(--red-line); }
.alert-level { font: 800 10px var(--font-mono); letter-spacing: .06em; padding: 4px 8px; border-radius: 6px; }
.alert-level.red { background: var(--red-tint); color: var(--red-soft); }
.alert-level.warn { background: var(--warn-bg); color: var(--warn); }
.alert-level.muted { background: var(--border); color: var(--muted); }
.alert-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--red-line-2); background: rgba(255, 26, 26, .08); }

.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; align-items: start; }
.kan-col { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.kan-col h3 { font-size: 13px; font-weight: 800; display: flex; justify-content: space-between; padding: 4px 6px; color: var(--text-2); }
.kan-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); font-size: 13px; transition: border-color .2s, transform .2s; }
.kan-card:hover { border-color: var(--red); transform: translateY(-2px); color: var(--text); }
.kan-card.late { border-color: var(--red-line-2); }

.site-banner { position: relative; z-index: 31; border-bottom: 1px solid var(--red-line); background: linear-gradient(90deg, var(--red-deep), #0b0b0d 70%); font-size: 14px; }
.site-banner .container { padding-top: 10px; padding-bottom: 10px; flex-wrap: nowrap; }
.site-banner.banner-maintenance { background: linear-gradient(90deg, #2a2205, #0b0b0d 70%); border-color: #4a3b0a; }
.banner-tag { font: 800 11px var(--font-mono); padding: 3px 8px; border-radius: 6px; background: var(--red); color: #fff; flex: none; }
.banner-maintenance .banner-tag { background: #a16207; }
.banner-text { flex: 1; min-width: 0; }
.banner-close { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border-strong); background: transparent; color: var(--text); cursor: pointer; flex: none; }

.code-box { font-family: var(--font-mono); font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border-soft); word-break: break-all; }
.codes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.qr { width: 180px; height: 180px; border-radius: 12px; background: #fff; padding: 10px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill { display: inline-flex; }
.check-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-pill span { height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-strong); display: inline-flex; align-items: center; font-weight: 700; font-size: 13px; cursor: pointer; transition: background-color .2s, border-color .2s; }
.check-pill input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.check-pill input:focus-visible + span { outline: 2px solid var(--red-neon); outline-offset: 2px; }
.tip { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid #2c3155; background: rgba(165, 180, 252, .06); font-size: 14px; line-height: 1.55; color: #dfe3ff; }
.thread-msg { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.thread-msg.staff { border-color: var(--red-line); }

/* Facture imprimable */
.invoice { max-width: 820px; margin: 32px auto; padding: 40px; border-radius: 16px; background: #fff; color: #111; font-size: 14px; line-height: 1.55; }
.invoice h1 { font-family: var(--font-display); font-size: 26px; }
.invoice table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.invoice th, .invoice td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #e5e5e5; }
.invoice td.num, .invoice th.num { text-align: right; }
.invoice .muted, .invoice .faint { color: #555; }
.invoice-actions { max-width: 820px; margin: 0 auto; display: flex; gap: 8px; justify-content: flex-end; }
@media print {
  body { background: #fff; }
  .site-header, .site-footer, .site-banner, .invoice-actions, .space-side { display: none !important; }
  .invoice { margin: 0; padding: 0; border-radius: 0; }
}

@media (max-width: 900px) {
  .space-side { position: static; max-width: none; flex-basis: 100%; width: 100%; }
  .side-nav { flex-direction: row; overflow-x: auto; padding: 6px; }
  .side-head, .side-sep { display: none; }
  .side-link { flex: none; }
  .funnel-row { grid-template-columns: 1fr 1fr 50px; }
  .bar-chart { gap: 4px; }
}
.space-main .page-head { padding-top: 0; padding-bottom: 8px; }
.space-main .h1 { font-size: clamp(24px, 3vw, 28px); }
.quick-list { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-3); }
.quick-list button { display: flex; gap: 10px; align-items: baseline; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; font-size: 13px; }
.quick-list button:hover, .quick-list button:focus-visible { background: var(--red-tint); }
.quick-list strong { font-family: var(--font-mono); color: var(--red-text); font-weight: 600; }
.quick-list span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   Fidélité, parrainage, badges
   ========================================================================== */
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.level { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); opacity: .7; }
.level.reached { opacity: 1; }
.level.current { border-color: var(--red); box-shadow: 0 0 22px rgba(255, 26, 26, .2); }
.level-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--border); }
.level.reached .level-dot { background: var(--red); box-shadow: var(--glow); }
.level-bronze { color: #e0a370; } .level-silver { color: #d4d4d8; } .level-gold { color: var(--warn); } .level-ruby { color: #ff4d6d; text-shadow: 0 0 16px rgba(255, 77, 109, .5); }
.pill.lvl-bronze { background: rgba(224, 163, 112, .12); color: #e0a370; }
.pill.lvl-silver { background: rgba(212, 212, 216, .12); color: #e4e4e7; }
.pill.lvl-gold { background: var(--warn-bg); color: var(--warn); }
.pill.lvl-ruby { background: rgba(255, 77, 109, .14); color: #ff6b85; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.badge-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px 10px; border-radius: 14px; border: 1px solid var(--border-soft); background: var(--surface-2); font-size: 13px; opacity: .55; }
.badge-item .faint { font-size: 11px; line-height: 1.4; }
.badge-item.on { opacity: 1; border-color: var(--red-line); }
.badge-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 800 15px var(--font-display); background: var(--surface-3); color: var(--faint); }
.badge-item.on .badge-ic { background: var(--red); color: #fff; box-shadow: 0 0 18px rgba(255, 26, 26, .45); }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-row .badge-ic { width: 30px; height: 30px; font-size: 11px; }
.prio { background: var(--warn-bg); color: var(--warn); }

/* ==========================================================================
   Éléments de base : cases, boutons radio, interrupteurs, listes, fichiers,
   barres de défilement, sélection, auto-remplissage.
   :where() garde une spécificité nulle : les composants existants (pastilles,
   choix de statut…) gardent la main.
   ========================================================================== */
:root { color-scheme: dark; accent-color: var(--red); }
::selection { background: rgba(255, 26, 26, .38); color: #fff; }
:where(input, textarea) { caret-color: var(--red-neon); }
::placeholder { color: #62626c; opacity: 1; }

/* ---------- Cases à cocher et boutons radio ---------- */
:where(input[type='checkbox'], input[type='radio']) {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 20px; height: 20px; display: inline-grid; place-content: center; vertical-align: middle;
  border: 1.5px solid #3a3a43; background: var(--surface-2); cursor: pointer;
  transition: background-color .18s, border-color .18s, box-shadow .2s, transform .12s;
}
:where(input[type='checkbox']) { border-radius: 6px; }
:where(input[type='radio']) { border-radius: 50%; }
:where(input[type='checkbox'], input[type='radio']):hover:not(:disabled) { border-color: var(--red); box-shadow: 0 0 0 4px rgba(255, 26, 26, .1); }
:where(input[type='checkbox'], input[type='radio']):active:not(:disabled) { transform: scale(.9); }
:where(input[type='checkbox'], input[type='radio']):focus-visible { outline: 2px solid var(--red-neon); outline-offset: 2px; }
:where(input[type='checkbox'])::before {
  content: ''; width: 12px; height: 12px; background: #fff; transform: scale(0); transition: transform .16s cubic-bezier(.3, 1.6, .5, 1);
  clip-path: polygon(14% 44%, 0 59%, 40% 98%, 100% 22%, 86% 8%, 39% 69%);
}
:where(input[type='checkbox']):checked,
:where(input[type='checkbox']):indeterminate { background: var(--red); border-color: var(--red); box-shadow: 0 0 14px rgba(255, 26, 26, .45); }
:where(input[type='checkbox']):checked::before { transform: scale(1); }
:where(input[type='checkbox']):indeterminate::before { transform: scale(1); clip-path: inset(42% 8% 42% 8% round 2px); }
:where(input[type='radio'])::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .16s cubic-bezier(.3, 1.6, .5, 1); }
:where(input[type='radio']):checked { background: var(--red); border-color: var(--red); box-shadow: 0 0 14px rgba(255, 26, 26, .45); }
:where(input[type='radio']):checked::before { transform: scale(1); }
:where(input[type='checkbox'], input[type='radio']):disabled { opacity: .45; cursor: not-allowed; }

/* Interrupteur : <input type="checkbox" class="toggle"> (réglages, préférences) */
input[type='checkbox'].toggle { width: 44px; height: 26px; border-radius: 13px; border: 0; background: var(--border-strong); display: inline-block; position: relative; }
input[type='checkbox'].toggle::before {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; clip-path: none; transform: none; box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
  transition: transform .22s cubic-bezier(.3, 1.4, .5, 1);
}
input[type='checkbox'].toggle:checked { background: var(--red); box-shadow: 0 0 14px rgba(255, 26, 26, .45); }
input[type='checkbox'].toggle:checked::before { transform: translateX(18px); }
input[type='checkbox'].toggle:hover:not(:disabled) { box-shadow: 0 0 0 4px rgba(255, 26, 26, .1); }
input[type='checkbox'].toggle:checked:hover:not(:disabled) { box-shadow: 0 0 0 4px rgba(255, 26, 26, .12), 0 0 14px rgba(255, 26, 26, .45); }
.check:has(.toggle) { align-items: center; gap: 12px; color: var(--text-2); font-weight: 600; cursor: pointer; }

/* Ligne « case + texte » : toute la ligne est cliquable */
.check { cursor: pointer; }
.check:hover { color: var(--text-2); }
.check input { margin-top: 0; }
.check:has(input:disabled) { cursor: not-allowed; }

/* ---------- Champs ---------- */
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: #3a3a43; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); }
:where(input, select, textarea):disabled { opacity: .55; cursor: not-allowed; }

/* Listes déroulantes : flèche du site */
:where(select), .field select, select.input {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ff3b3b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 14px;
}
:where(select[multiple]) { background-image: none; padding-right: 14px; }
option, optgroup { background: var(--surface); color: var(--text); }
option:checked { background: var(--red-deep); }

/* Nombres sans flèches, calendrier assorti */
:where(input[type='number']) { -moz-appearance: textfield; appearance: textfield; }
:where(input[type='number'])::-webkit-inner-spin-button,
:where(input[type='number'])::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .6; transition: opacity .2s; filter: invert(38%) sepia(98%) saturate(4000%) hue-rotate(345deg); }
::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* Fichiers : bouton « Parcourir » dans le style des boutons fantômes */
:where(input[type='file']) { font-size: 13px; color: var(--muted); max-width: 100%; cursor: pointer; }
::file-selector-button {
  height: 36px; margin-right: 12px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--surface-3); color: var(--text);
  font: 700 13px var(--font-body); cursor: pointer; transition: border-color .2s, background-color .2s, color .2s;
}
::file-selector-button:hover { border-color: var(--red); background: rgba(255, 26, 26, .1); color: #fff; }
.field input[type='file'] { height: auto; padding: 8px; }

/* Auto-remplissage du navigateur : pas de fond jaune / blanc */
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
  -webkit-text-fill-color: var(--text); caret-color: var(--red-neon);
  box-shadow: 0 0 0 1000px var(--surface-2) inset; transition: background-color 99999s;
}
input:-webkit-autofill:focus { box-shadow: 0 0 0 1000px var(--surface-2) inset, 0 0 0 3px rgba(255, 26, 26, .18); }

/* Blocs repliables */
.details summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; transition: color .2s; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after {
  content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s;
}
.details[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.details summary:hover { color: #fff; }

/* ---------- Barres de défilement ---------- */
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: #2e2e36 var(--bg-2); }
  * { scrollbar-width: thin; scrollbar-color: #2e2e36 transparent; }
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-track { background: var(--bg-2); border-left: 1px solid var(--border-soft); }
::-webkit-scrollbar-thumb { background: #2a2a31; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; transition: background-color .2s; }
::-webkit-scrollbar-thumb:hover { background: var(--red); background-clip: padding-box; box-shadow: inset 0 0 6px rgba(255, 26, 26, .6); }
::-webkit-scrollbar-thumb:active { background: var(--red-neon); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  :where(input[type='checkbox'], input[type='radio']), :where(input[type='checkbox'], input[type='radio'])::before,
  input[type='checkbox'].toggle::before { transition: none; }
}

/* Coordonnées de versement */
.payout-form:has(input[name='method'][value='paypal']:checked) .only-iban,
.payout-form:has(input[name='method'][value='iban']:checked) .only-paypal { display: none; }
.payout-current { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.payout-ic { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; font: 800 13px var(--font-display); background: var(--red-tint); color: var(--red-soft); }
.payout-recent { color: var(--warn); font-weight: 700; }
.iban { font-family: var(--font-mono); font-size: 13px; letter-spacing: .02em; white-space: nowrap; }

/* ==========================================================================
   Composants de formulaire sur mesure (public/js/forms.js)
   ========================================================================== */
/* Listes déroulantes */
.jf-select { position: relative; width: 100%; min-width: 0; }
.jf-select-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; }
.jf-select-btn {
  width: 100%; height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid #2a2a31; background: var(--surface-2);
  color: var(--text); font: 500 15px var(--font-body); text-align: left; cursor: pointer; outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.jf-select-btn:hover { border-color: #3a3a43; }
.jf-select-btn:focus-visible, .jf-select.is-open .jf-select-btn { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 26, 26, .18); }
.jf-select-btn:disabled { opacity: .55; cursor: not-allowed; }
.jf-select-btn.is-placeholder .jf-select-value { color: #7a7a85; }
.jf-select-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jf-select-chevron { flex: none; color: var(--red-text); transition: transform .2s; }
.jf-select.is-open .jf-select-chevron { transform: rotate(180deg); }
.jf-select-list {
  position: fixed; z-index: 80; overflow-y: auto; padding: 6px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: #0f0f12;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .65), 0 0 30px rgba(255, 26, 26, .08);
  animation: jf-pop .14s ease-out;
}
.jf-select-list.is-up { animation-name: jf-pop-up; }
@keyframes jf-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes jf-pop-up { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.jf-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 8px; font: 600 14px var(--font-body); color: var(--text-2);
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jf-option.is-active { background: var(--red-tint); color: #fff; }
.jf-option[aria-selected='true'] { color: var(--red-text); }
.jf-option[aria-selected='true']::after { content: ''; flex: none; width: 12px; height: 12px; background: currentColor; clip-path: polygon(14% 44%, 0 59%, 40% 98%, 100% 22%, 86% 8%, 39% 69%); }
.jf-option[aria-disabled='true'] { opacity: .4; cursor: not-allowed; }
.jf-option-group { padding: 10px 12px 4px; font: 800 11px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

/* Sélection de fichiers */
.dropzone.jf-file { position: relative; gap: 12px; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.dropzone.jf-file input[type='file'] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; }
.dropzone.jf-file:hover, .dropzone.jf-file.is-drag { border-color: var(--red); background: rgba(255, 26, 26, .05); }
.dropzone.jf-file.is-drag { box-shadow: 0 0 0 4px rgba(255, 26, 26, .12), inset 0 0 40px rgba(255, 26, 26, .08); }
.dropzone.jf-file:has(input:focus-visible) { outline: 2px solid var(--red-neon); outline-offset: 2px; }
.jf-file-ui { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.jf-file-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--surface-3); color: var(--text); font: 700 13px var(--font-body);
  transition: border-color .2s, background-color .2s, color .2s;
}
.jf-file-btn svg { color: var(--red-text); }
.dropzone.jf-file:hover .jf-file-btn { border-color: var(--red); background: var(--red); color: #fff; }
.dropzone.jf-file:hover .jf-file-btn svg { color: #fff; }
.jf-file-hint { font-size: 13px; color: var(--faint); }
.jf-file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jf-file-list:empty { display: none; }
.jf-file-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 9px; background: var(--surface-3); border: 1px solid var(--border-soft); font-size: 13px; color: var(--text); }
.jf-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.jf-file-name::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--red-neon); box-shadow: 0 0 8px rgba(255, 26, 26, .7); vertical-align: middle; }
.jf-file-size { flex: none; font: 500 12px var(--font-mono); color: var(--faint); }
.dropzone.has-files { border-style: solid; border-color: var(--red-line-2); }
.jf-attach-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; box-shadow: 0 0 10px rgba(255, 26, 26, .5); }

/* Messages d'erreur des formulaires (remplacent les bulles du navigateur) */
.field-error { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 0; font: 600 13px/1.45 var(--font-body); color: #ff8080; animation: jf-pop .16s ease-out; }
.field-error::before { content: '!'; flex: none; width: 17px; height: 17px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-size: 11px; font-weight: 900; box-shadow: 0 0 10px rgba(255, 26, 26, .5); }
.is-invalid, .field .is-invalid, .jf-select-btn.is-invalid, .dropzone.is-invalid { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(255, 26, 26, .15) !important; }
.dropzone.is-invalid { border-style: dashed; }

@media (prefers-reduced-motion: reduce) {
  .jf-select-list, .field-error { animation: none; }
}

/* Accueil : cartes compactes « Nos développeurs » (contenu centré) */
.dev-minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 220px)); gap: 16px; }
.dev-mini { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 16px 20px; }
.dev-mini .avatar { width: 60px; height: 60px; border-radius: 16px; margin-bottom: 6px; font-family: var(--font-display); }
.dev-mini .avatar-logo { padding: 6px; }
.dev-mini-name { font-weight: 800; font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-mini-title { color: var(--red-text); font-size: 13px; font-weight: 700; line-height: 1.35; }
.dev-mini-skills { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
@media (max-width: 460px) { .dev-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Redirection vers Stripe / PayPal */
.redirect-page { min-height: 60vh; display: grid; place-items: center; padding-top: 48px; padding-bottom: 48px; }
.redirect-card { max-width: 460px; width: 100%; align-items: center; text-align: center; padding: 36px 28px; }
.redirect-spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--red-neon); box-shadow: 0 0 22px rgba(255, 26, 26, .25); animation: jf-spin .8s linear infinite; }
@keyframes jf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .redirect-spinner { animation-duration: 2.4s; } }

/* Fenêtre de confirmation (remplace la boîte du navigateur) */
.jf-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.jf-modal[hidden] { display: none; }
.jf-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); animation: jf-fade .15s ease-out; }
.jf-modal-box {
  position: relative; width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  padding: 28px 24px 22px; border-radius: 18px; border: 1px solid var(--border-strong); background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 40px rgba(255, 26, 26, .08); animation: jf-pop .18s ease-out;
}
.jf-modal-box.is-danger { border-color: var(--red-line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 50px rgba(255, 26, 26, .2); }
.jf-modal-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font: 900 22px var(--font-display); background: var(--surface-3); color: var(--text-2); }
.jf-modal-box.is-danger .jf-modal-icon { background: var(--red); color: #fff; box-shadow: var(--glow); }
.jf-modal-title { font: 700 19px var(--font-display); margin: 0; }
.jf-modal-text { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0; }
.jf-modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; width: 100%; }
.jf-modal-actions > * { flex: 1 1 140px; }
.jf-modal-box:not(.is-danger) [data-modal-ok] { background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: none; }
.jf-modal-box:not(.is-danger) [data-modal-ok]:hover { background: var(--red); }
html.jf-modal-open { overflow: hidden; }
@keyframes jf-fade { from { opacity: 0; } }

/* Bouton en cours d'envoi */
.is-loading { position: relative; pointer-events: none; color: transparent !important; }
.is-loading::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: jf-spin .7s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .jf-modal-backdrop, .jf-modal-box { animation: none; } }

/* Configuration : zone de danger */
.danger-zone { border-color: var(--red-line-2); background: radial-gradient(80% 120% at 100% 0%, rgba(255, 26, 26, .08), transparent 60%), var(--surface); }
.reset-list { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-soft); font-size: 13px; }
.reset-list span { color: var(--text-2); }
.reset-list strong { font-family: var(--font-mono); color: var(--red-text); text-align: right; }

/* Portfolio : projets et serveurs */
.project-form .only-server, .project-form .only-discord, .project-form .only-live, .project-form .lbl { display: none; }
.project-form:has(input[name='kind'][value='gmod']:checked) .only-server,
.project-form:has(input[name='kind'][value='fivem']:checked) .only-server,
.project-form:has(input[name='kind'][value='discord']:checked) .only-discord { display: flex; }
.project-form:has(input[name='kind'][value='gmod']:checked) .only-live,
.project-form:has(input[name='kind'][value='fivem']:checked) .only-live,
.project-form:has(input[name='kind'][value='discord']:checked) .only-live,
.project-form:has(input[name='kind'][value='roblox']:checked) .only-live { display: flex; }
.project-form:has(input[name='kind'][value='roblox']:checked) .lbl-roblox,
.project-form:has(input[name='kind'][value='website']:checked) .lbl-site,
.project-form:has(input[name='kind'][value='other']:checked) .lbl-other,
.project-form:has(input[name='kind'][value='gmod']:checked) .lbl-server,
.project-form:has(input[name='kind'][value='fivem']:checked) .lbl-server,
.project-form:has(input[name='kind'][value='discord']:checked) .lbl-server { display: inline; }

.project-logo { width: 64px; height: 64px; flex: none; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: var(--red-deep); border: 1px solid var(--red-line); color: var(--red-soft); font: 800 11px var(--font-display); letter-spacing: .04em; }
.project-logo img { width: 100%; height: 100%; object-fit: cover; }
.project-logo.sm { width: 46px; height: 46px; border-radius: 12px; font-size: 9px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.project-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.project-head { display: flex; gap: 14px; align-items: center; min-width: 0; }
.project-head .stack { min-width: 0; }
.project-name { font: 700 17px var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-kind { font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--red-text); text-transform: uppercase; }
.project-role { font-size: 13px; color: var(--muted); }
.project-desc { font-size: 14px; line-height: 1.6; color: var(--text-2); white-space: pre-line; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.live-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.live-badge.on { color: var(--ok); border-color: #1f4d2e; background: var(--ok-bg); }
.live-badge.on::before { background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: jf-live 2s infinite; }
.live-badge.off { color: #ff8080; border-color: var(--red-line); }
.live-badge.off::before { background: var(--red-neon); }
@keyframes jf-live { 70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.project-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
@media (prefers-reduced-motion: reduce) { .live-badge.on::before { animation: none; } }

/* ---------- Aperçu de la structure du serveur Discord (admin) ---------- */
.dc-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-tree { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.dc-cat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface-2); }
.dc-cat-name { font-size: 12px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--text-2); margin-bottom: 4px; }
.dc-ch { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 3px 4px; border-radius: 6px; min-width: 0; overflow-wrap: anywhere; }
.dc-ico { width: 14px; flex: none; text-align: center; color: var(--faint); font-weight: 700; }
.cfg-sub { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); margin: 4px 0 -4px; }
.cfg-dc { font-size: 12px; font-weight: 600; }
.cfg-dc.ok { color: var(--ok); }
.cfg-dc.bad { color: var(--red-text); }
