/* ============================================================
   MUNKY 2.0 — SYSTÈME DE DESIGN (direction cinématique)
   Chargé en DERNIER sur chaque page : redéfinit les jetons et habille tous les composants communs.
   Noir profond · texte blanc · gris lisibles · lumière blanche/argentée, lavande très discrète.
   Boutons en pilule : .btn-primary (nacre blanche) · .btn-ghost (verre sombre) · .btn-gold (Premium).
   ============================================================ */
:root {
  --bg: #07070C;
  --bg-2: #0B0B12;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-solid: #14131D;
  --surface-2: #181723;
  --surface-3: #1F1D2B;
  --elevated: #14131D;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.11);
  --line-3: rgba(255, 255, 255, 0.18);

  --text: #FFFFFF;
  --text-dim: #B9B8C8;
  --text-dimmer: #9393A5;
  --text-faint: #727286;
  --white: #FFFFFF;
  --ink: #09090F;

  --accent: #CEC6EE;
  --accent-hover: #E6E1F7;
  --accent-2: #CEC6EE;
  --accent-deep: #5B4FB8;
  --accent-ink: #09090F;
  --accent-soft: rgba(206, 198, 238, 0.08);
  --accent-line: rgba(206, 198, 238, 0.28);
  --accent-grad: linear-gradient(180deg, #FFFFFF, #ECEAF6);

  --gold: #FFFFFF; --gold-2: #FFFFFF; --gold-deep: #9A99AE;
  --gold-soft: rgba(255, 255, 255, 0.05); --gold-line: rgba(255, 255, 255, 0.18);
  --gold-grad: linear-gradient(180deg, #FFFFFF, #ECEAF6);

  --green: #4ADE80; --green-soft: rgba(74, 222, 128, 0.10);
  --red: #F87171;   --red-soft: rgba(248, 113, 113, 0.10);
  --yellow: #FCD34D; --orange: #FB923C;
  --blue: #CEC6EE; --blue-hover: #E6E1F7; --purple: #CEC6EE;

  --r-sm: 10px; --r: 12px; --r-md: 18px; --r-lg: 22px; --r-full: 999px;
  --h-sm: 36px; --h: 44px; --h-lg: 54px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 40px -24px rgba(0, 0, 0, 0.9);
  --shadow-lg: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 40px 90px -40px rgba(0, 0, 0, 1);
  --focus: 0 0 0 3px rgba(230, 225, 247, 0.35);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.15s var(--ease);
  --t: 0.25s var(--ease);
  --t-slow: 0.45s var(--ease);

  --font: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ---------- Fond : noir profond + halo argenté en haut de page + grain très fin ---------- */
html { background: var(--bg); scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
body { background: var(--bg) !important; color: var(--text); font-family: var(--font); letter-spacing: -0.01em; }
body::before {
  background:
    radial-gradient(900px 420px at 50% -140px, rgba(200, 192, 240, 0.13), transparent 70%),
    radial-gradient(500px 300px at 50% -60px, rgba(255, 255, 255, 0.06), transparent 70%),
    var(--bg) !important;
}
body::after {
  display: block !important; content: ''; position: fixed; inset: 0; z-index: 10000; pointer-events: none; opacity: .03;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>") !important;
  -webkit-mask-image: none !important; mask-image: none !important;
}
::selection { background: rgba(206, 198, 238, 0.32); color: #fff; }
:focus-visible { outline: none; box-shadow: var(--focus); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Titres ---------- */
.page-title { font-size: clamp(30px, 4.4vw, 44px); font-weight: 650; letter-spacing: -0.045em; line-height: 1.06; }
.page-subtitle { color: var(--text-dim); font-size: 15.5px; line-height: 1.6; }
.section-title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.eyebrow { color: var(--text-dim) !important; font-family: var(--font) !important; font-size: 12px !important; font-weight: 650 !important; letter-spacing: 0.1em !important; text-transform: uppercase; }
.text-accent, .text-gold, .text-dim-grad { background: linear-gradient(180deg, #fff 30%, #D4CFEA) !important; -webkit-background-clip: text !important; background-clip: text !important; -webkit-text-fill-color: transparent !important; }

/* ---------- Boutons : pilules ---------- */
.btn {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: var(--h); padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: -0.012em; line-height: 1;
  cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none; overflow: visible; filter: none;
  transition: transform .3s var(--ease), box-shadow .45s var(--ease), background .3s, color .3s, border-color .3s, opacity .2s;
}
.btn::after { display: none; }
.btn:hover:not(:disabled) { transform: none; }
.btn:active:not(:disabled) { transform: scale(0.97); transition-duration: .1s; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn:focus-visible { box-shadow: var(--focus); }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  color: var(--ink) !important; border-color: transparent; text-shadow: none;
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F1F5 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 3px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.18), 0 2px 4px rgba(0, 0, 0, 0.5), 0 10px 30px -12px rgba(255, 255, 255, 0.3);
}
.btn-primary:hover:not(:disabled) { background: #fff; box-shadow: inset 0 1px 0 #fff, inset 0 -2px 3px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.5), 0 16px 44px -12px rgba(255, 255, 255, 0.5); }

/* Premium / Upgrade : même nacre, liseré argenté (plus de violet plein) */
.btn-gold, .btn-accent {
  color: var(--ink) !important; border-color: transparent;
  background: linear-gradient(180deg, #FFFFFF 0%, #ECEAF6 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 3px rgba(91, 79, 184, 0.12), 0 0 0 1px rgba(230, 225, 247, 0.45), 0 2px 4px rgba(0, 0, 0, 0.5), 0 12px 34px -12px rgba(230, 225, 247, 0.55);
}
.btn-gold:hover:not(:disabled), .btn-accent:hover:not(:disabled) { background: #fff; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(255, 255, 255, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5), 0 18px 48px -12px rgba(230, 225, 247, 0.7); }

.btn-ghost {
  color: #fff; border-color: transparent; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.btn-ghost:hover:not(:disabled) { color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 0 30px -10px rgba(255, 255, 255, 0.3); }

.btn-danger { color: #FCA5A5; background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.28); box-shadow: none; }
.btn-danger:hover:not(:disabled) { background: rgba(248, 113, 113, 0.14); border-color: rgba(248, 113, 113, 0.5); box-shadow: 0 0 26px -10px rgba(248, 113, 113, 0.6); }

.btn-sm { min-height: var(--h-sm); padding: 0 15px; font-size: 13px; }
.btn-lg { min-height: var(--h-lg); padding: 0 26px; font-size: 15.5px; }
.btn-block { width: 100%; }
/* Flèche dans un rond */
.btn .arr { width: 26px; height: 26px; margin-right: -10px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #0B0B12; color: #fff; box-shadow: none; transition: transform .4s var(--ease); }
.btn-ghost .arr { background: rgba(255, 255, 255, 0.1); }
.btn-lg .arr { width: 32px; height: 32px; margin-right: -14px; }
.btn-sm .arr { width: 22px; height: 22px; margin-right: -8px; }
.btn .arr svg { width: 13px; height: 13px; }
.btn:hover .arr { transform: translateX(3px); }

.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::before { border-color: rgba(255, 255, 255, 0.25); border-top-color: #fff; }
.btn-primary.is-loading::before, .btn-gold.is-loading::before { border-color: rgba(9, 9, 15, 0.2); border-top-color: var(--ink); }
.btn.is-loading::after { display: block; z-index: 1; background: none; }

/* ---------- Surfaces : verre sombre, reflet en haut, bord qui s'éclaire au survol ---------- */
.glass-card, .panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)) !important;
  border: 1px solid var(--line) !important; border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 50px -34px rgba(0, 0, 0, 0.9);
}
.glass-card:hover, a.panel:hover { border-color: var(--line-3) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 30px 60px -30px rgba(0, 0, 0, 0.9); }
.surface-elevated { background: var(--surface-solid); border-color: var(--line-2); }
.mk-spot::after { background: radial-gradient(380px circle at var(--mx) var(--my), rgba(230, 225, 247, 0.06), transparent 60%) !important; }

/* ---------- Champs ---------- */
.input, input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="url"], input[type="search"], textarea, select {
  background-color: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-2); border-radius: var(--r); color: var(--text);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35); transition: border-color var(--t-fast), box-shadow var(--t), background-color var(--t-fast);
}
.input:hover, input:hover, textarea:hover, select:hover { border-color: var(--line-3); }
.input:focus, input:focus, textarea:focus, select:focus { border-color: rgba(230, 225, 247, 0.6); background-color: rgba(0, 0, 0, 0.4); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(230, 225, 247, 0.12), 0 0 24px -8px rgba(230, 225, 247, 0.4); }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input[type="range"], input[type="checkbox"], input[type="radio"] { accent-color: #E6E1F7; }
.field-label { color: var(--text-dim); font-weight: 550; }

/* ---------- Badges ---------- */
.badge { border-radius: 999px; font-weight: 600; padding: 3px 9px; }
.badge-blue { background: rgba(255, 255, 255, 0.06); color: #fff; border: 1px solid var(--line-2); box-shadow: none; }
.badge-green { background: var(--green-soft); color: #86EFAC; border: 1px solid rgba(74, 222, 128, 0.25); box-shadow: none; }
.badge-gold { background: #fff; color: var(--ink); border: none; }

/* ---------- Bandeau Premium générique ---------- */
.upsell { background: radial-gradient(500px 200px at 100% 0%, rgba(200, 192, 240, 0.10), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)) !important; border: 1px solid var(--line-2) !important; border-radius: var(--r-lg) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important; }
.upsell-icon { background: rgba(255, 255, 255, 0.05) !important; color: #fff !important; border: 1px solid var(--line-2) !important; box-shadow: none !important; }

/* ---------- Divers ---------- */
.back-btn { border-radius: 999px; }
.back-btn:hover { border-color: var(--line-3); box-shadow: none; }
.empty-state .es-ic { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); border-radius: 14px; }
[data-tip]::after { background: var(--surface-solid) !important; color: var(--text) !important; border: 1px solid var(--line-2); }

/* ---------- Statuts (forme + texte + couleur) ---------- */
.mk-status { display: inline-flex; align-items: center; gap: 6px; height: 23px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.mk-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mk-status.ok { color: #86EFAC; background: var(--green-soft); }
.mk-status.no { color: var(--text-dimmer); background: rgba(255, 255, 255, 0.045); }
.mk-status.warn { color: #FCD34D; background: rgba(251, 191, 36, 0.09); }

/* ---------- Kit de mise en page des pages app ---------- */
.mk-page { position: relative; max-width: 1140px; margin: 0 auto; padding: 36px 28px 120px; z-index: 1; }
.mk-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 30px; }
.mk-kick { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.mk-kick::before { content: ''; width: 18px; height: 1px; background: linear-gradient(90deg, transparent, #E6E1F7); }
.mk-title { font-size: clamp(32px, 4.8vw, 50px); font-weight: 650; letter-spacing: -0.055em; line-height: 1.02; margin-top: 10px; background: linear-gradient(180deg, #fff 35%, #D8D4EA); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mk-sub { color: var(--text-dim); font-size: 16px; line-height: 1.6; margin-top: 10px; max-width: 600px; }
.mk-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 40px 2px 14px; font-size: 12.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dimmer); }
.mk-label a { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--text-dim); text-decoration: none; }
.mk-label a:hover { color: #fff; }
.mk-card { position: relative; padding: 22px; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 0 0 1px var(--line); }
.mk-halo { position: absolute; left: 50%; top: -260px; width: 1100px; height: 560px; transform: translateX(-50%); pointer-events: none; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(200, 192, 240, 0.16), rgba(110, 100, 180, 0.05) 55%, transparent); filter: blur(10px); }

/* Effets v6 retirés */
.glow-ring::before, .aurora { display: none !important; }

@media (max-width: 700px) {
  .mk-page { padding: 22px 16px 120px; }
  .mk-halo { width: 700px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
