/* ═══════════════════════════════════════
   NexHéberge — Design System v3
   Typographie : Plus Jakarta Sans
   Couleurs : dark navy premium
═══════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --bg:   #07090f;
  --bg2:  #0d1117;
  --bg3:  #141b27;
  --border: #1c2740;
  --fg:   #dde5f0;
  --fg2:  #7a8ba8;
  --fg3:  #4a5a72;
  --accent:  #2563eb;
  --accent2: #4f90f8;
  --accent-glow: rgba(37,99,235,0.13);
  --green:  #10b981;
  --red:    #f43f5e;
  --yellow: #f59e0b;
  --purple: #8b5cf6;

  /* Typographie */
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius: 12px;

  /* Espacements de texte */
  --tracking-tight: -0.04em;
  --tracking-wide:  0.08em;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.9375rem;   /* 15px */
  font-weight: 400;
  line-height: 1.7;
  min-height: 100%;
}

img { max-width: 100%; }
.hidden { display: none !important; }
button { cursor: pointer; font-family: inherit; }
a { color: inherit; text-decoration: none; }
input, select, textarea {
  font-family: inherit;
  font-size: 0.875rem;
}

/* ── Hiérarchie titre globale ── */
h1 {
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
  margin-bottom: 1.25rem;
}
h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin-bottom: 0.85rem;
}
h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
p { line-height: 1.7; }


/* ════════════════════════════════════
   NAV
════════════════════════════════════ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,9,15,0.88);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 1.25rem;
}
.logo {
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #7ab8fb 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 2px; }
.nav-btn {
  padding: 6px 13px;
  border-radius: 8px;
  color: var(--fg2);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: none;
  background: none;
  transition: color .15s, background .15s;
}
.nav-btn:hover { color: var(--fg); background: var(--bg3); }
.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 7px 17px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  border: none;
  transition: opacity .15s;
}
.nav-cta:hover { opacity: 0.82; }
#nav-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8125rem; color: #fff; flex-shrink: 0;
}
.nav-username { font-size: 0.875rem; font-weight: 500; letter-spacing: -0.01em; }


/* ════════════════════════════════════
   PAGE
════════════════════════════════════ */
.page { min-height: 100vh; }


/* ════════════════════════════════════
   HERO
════════════════════════════════════ */
.hero {
  padding: 7rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
}
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(37,99,235,0.1) 0%, transparent 62%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-glow);
  border: 1px solid rgba(37,99,235,0.22);
  padding: 5px 15px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--accent2);
  margin-bottom: 2rem;
}
.dot-green {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--green);
}
.text-accent { color: var(--accent2); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  font-weight: 400;
  color: var(--fg2);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  text-wrap: balance;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  border: none;
  transition: opacity .15s, transform .15s;
}
.btn-primary:hover { opacity: 0.86; transform: translateY(-1px); }

.btn-secondary {
  background: var(--bg3);
  color: var(--fg);
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  border: 1px solid var(--border);
  transition: border-color .15s;
}
.btn-secondary:hover { border-color: var(--accent); }

.hero-stats {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.stat-num {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-label {
  font-size: 0.8125rem;
  color: var(--fg2);
  font-weight: 400;
  margin-top: 3px;
  letter-spacing: 0.01em;
}


/* ════════════════════════════════════
   SECTIONS
════════════════════════════════════ */
section { padding: 5rem 1.5rem; }
.section-alt { background: var(--bg2); }
.section-inner { max-width: 1200px; margin: 0 auto; }

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.75rem;
}
.section-desc {
  color: var(--fg2);
  font-size: 1rem;
  font-weight: 400;
  max-width: 500px;
  margin-bottom: 3rem;
  line-height: 1.7;
  text-wrap: balance;
}


/* ════════════════════════════════════
   FEATURES
════════════════════════════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.625rem;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-icon { font-size: 1.5rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.feature-card p { font-size: 0.875rem; color: var(--fg2); line-height: 1.65; }


/* ════════════════════════════════════
   PRICING
════════════════════════════════════ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.pricing-loading { color: var(--fg2); font-size: 0.875rem; }
.pricing-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  transition: border-color .2s;
}
.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
}
.popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 3px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: uppercase;
}
.plan-name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.plan-desc { font-size: 0.8125rem; color: var(--fg2); margin-bottom: 1.125rem; }
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 1.5rem;
}
.price-amount {
  font-size: 2.625rem;
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.price-period { font-size: 0.875rem; color: var(--fg2); font-weight: 400; }
.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 1.75rem;
}
.plan-features li {
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 9px;
  line-height: 1.5;
}
.plan-features li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }
.btn-plan {
  width: 100%;
  padding: 0.6875rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  border: none;
  transition: all .15s;
  cursor: pointer;
  font-family: inherit;
}
.btn-plan-primary { background: var(--accent); color: #fff; }
.btn-plan-primary:hover { opacity: 0.86; }
.btn-plan-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-plan-outline:hover { border-color: var(--accent); color: var(--accent2); }


/* ════════════════════════════════════
   CONTACT / FORM
════════════════════════════════════ */
.contact-wrap { max-width: 480px; margin: 0 auto; }
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg2);
  letter-spacing: 0.01em;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 13px;
  color: var(--fg);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  font-size: 0.875rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-error { color: var(--red); font-size: 0.8125rem; margin-top: -6px; margin-bottom: 6px; }
.btn-full {
  width: 100%;
  padding: 0.6875rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  border: none;
  transition: opacity .15s;
  margin-top: 6px;
  font-family: inherit;
}
.btn-full:hover { opacity: 0.86; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }


/* ════════════════════════════════════
   FOOTER
════════════════════════════════════ */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--fg3);
  font-size: 0.8125rem;
  font-weight: 400;
}
.footer-inner { max-width: 600px; margin: 0 auto; }


/* ════════════════════════════════════
   DASHBOARD LAYOUT
════════════════════════════════════ */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 224px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.625rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #7ab8fb 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 4px 12px;
  margin-bottom: 1.5rem;
}
.sidebar-section {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg3);
  padding: 0 12px;
  margin: 14px 0 4px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg2);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background .13s, color .13s;
}
.sidebar-item:hover { background: var(--bg3); color: var(--fg); }
.sidebar-item.active {
  background: var(--accent-glow);
  color: var(--accent2);
  border: 1px solid rgba(37,99,235,0.18);
  font-weight: 600;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.main-content {
  flex: 1;
  min-width: 0;
  padding: 2rem;
  overflow-y: auto;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}


/* ════════════════════════════════════
   TILES
════════════════════════════════════ */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 1.5rem;
}
.tile {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
}
.tile-label {
  font-size: 0.6875rem;
  color: var(--fg3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: 6px;
}
.tile-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.tile-sub { font-size: 0.75rem; color: var(--fg2); margin-top: 3px; }
.tile-green { border-color: rgba(16,185,129,0.25); }
.tile-green .tile-value { color: var(--green); }


/* ════════════════════════════════════
   CARD
════════════════════════════════════ */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 1.125rem;
  overflow: hidden;
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.card-body { padding: 1.25rem; }
.card-body-pad0 { padding: 0; }


/* ════════════════════════════════════
   TABLE
════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th {
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg3);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 11px 14px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  line-height: 1.5;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg3); }


/* ════════════════════════════════════
   BADGES
════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-green  { background: rgba(16,185,129,0.13); color: var(--green); }
.badge-blue   { background: var(--accent-glow); color: var(--accent2); }
.badge-yellow { background: rgba(245,158,11,0.13); color: var(--yellow); }
.badge-red    { background: rgba(244,63,94,0.13); color: var(--red); }


/* ════════════════════════════════════
   BUTTONS SMALL
════════════════════════════════════ */
.btn-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-sm {
  padding: 4px 11px;
  border-radius: 7px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--fg);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .13s, color .13s;
  white-space: nowrap;
}
.btn-sm:hover { border-color: var(--accent); color: var(--accent2); }
.btn-sm-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-sm-primary:hover { opacity: 0.84; color: #fff; border-color: var(--accent); }
.btn-sm-danger { border-color: rgba(244,63,94,0.28); color: var(--red); }
.btn-sm-danger:hover { background: rgba(244,63,94,0.08); border-color: var(--red); }


/* ════════════════════════════════════
   SERVICE CARD
════════════════════════════════════ */
.service-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}
.service-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--accent-glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.0625rem; flex-shrink: 0;
}
.service-info { flex: 1; min-width: 0; }
.service-name { font-weight: 600; font-size: 0.875rem; margin-bottom: 2px; letter-spacing: -0.01em; }
.service-detail { font-size: 0.75rem; color: var(--fg2); }


/* ════════════════════════════════════
   TICKET
════════════════════════════════════ */
.ticket-item {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.ticket-item:last-child { border-bottom: none; }
.ticket-info { flex: 1; min-width: 0; }
.ticket-title { font-size: 0.875rem; font-weight: 500; margin-bottom: 2px; letter-spacing: -0.01em; }
.ticket-meta { font-size: 0.75rem; color: var(--fg2); }


/* ════════════════════════════════════
   MODAL
════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.125rem;
  width: 100%;
  max-width: 400px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 13px; right: 13px;
  background: none;
  border: none;
  color: var(--fg2);
  font-size: 1.1875rem;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
  transition: background .13s, color .13s;
}
.modal-close:hover { background: var(--bg3); color: var(--fg); }
.modal h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.modal-sub { color: var(--fg2); font-size: 0.875rem; margin-bottom: 1.5rem; line-height: 1.5; }
.auth-switch { text-align: center; margin-top: 14px; font-size: 0.875rem; color: var(--fg2); }
.auth-switch button {
  color: var(--accent2);
  background: none; border: none;
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer;
}
.hint-box {
  margin-top: 1rem;
  padding: 11px;
  background: var(--bg3);
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--fg2);
  line-height: 1.7;
}


/* ════════════════════════════════════
   TOAST
════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 9999;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translateY(16px);
  opacity: 0;
  transition: all .22s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
  max-width: 300px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(16,185,129,0.35); }
.toast.success::before { content: '✓'; color: var(--green); font-weight: 700; }
.toast.error { border-color: rgba(244,63,94,0.35); }
.toast.error::before { content: '✕'; color: var(--red); font-weight: 700; }


/* ════════════════════════════════════
   ADMIN / MISC
════════════════════════════════════ */
.admin-actions { display: flex; gap: 10px; margin-bottom: 1.125rem; flex-wrap: wrap; }

.empty-state {
  text-align: center;
  padding: 3rem 1.25rem;
  color: var(--fg2);
}
.empty-state .icon { font-size: 2.25rem; margin-bottom: 0.625rem; }
.empty-state p { font-size: 0.875rem; line-height: 1.6; }

.text-muted { color: var(--fg2); }
.text-small { font-size: 0.75rem; }
.fw600 { font-weight: 600; }


/* ════════════════════════════════════
   MOBILE
════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .sidebar { display: none; }
  .main-content { padding: 1rem; }
  .hero { padding: 3.75rem 1rem 3rem; }
  .hero-stats { gap: 1.25rem; }
  .input-row { grid-template-columns: 1fr; }
  .dashboard-layout { flex-direction: column; }
  h1 { letter-spacing: -0.03em; }
}
