:root {
  --bg: #0c0d12;
  --bg-subtle: #10121a;
  --surface: #141721;
  --surface-raised: #1a1e2b;
  --surface-hover: #212637;
  --border: #232736;
  --border-subtle: #1c202d;
  --border-focus: #3b82f6;
  
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-sub: #64748b;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --green: #10b981;
  --red: #ef4444;
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
}

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

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* NAVIGATION ÉPURÉE STYLE SUPABASE / VERCEL */
.nav {
  background: rgba(12, 13, 18, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  height: 24px;
  width: auto;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a.active {
  color: #fff;
  font-weight: 600;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.dot-green {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* BUTTONS SOLIDES STYLE DASHBOARD */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: #fff;
  color: #0c0d12;
  font-weight: 600;
}

.btn-primary:hover {
  background: #e5e7eb;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-main);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-raised);
  border-color: #333a4d;
}

.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
}

.btn-full {
  width: 100%;
}

.btn-danger {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
}

/* HERO MINIMALISTE */
.hero {
  max-width: 860px;
  margin: 3.5rem auto 2.5rem;
  padding: 0 1.5rem;
  text-align: center;
}

.badge-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 3.5rem;
}

/* SECTION HEADER */
.section-head {
  max-width: 1000px;
  margin: 0 auto 1.5rem;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-head h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* CARTES ET GRILLES */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto 4.5rem;
  padding: 0 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, background 0.15s;
}

.card:hover {
  border-color: #3b4256;
  background: var(--surface-raised);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.card-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg);
}

.card-tag.tag-free {
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--green);
  background: rgba(16, 185, 129, 0.05);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.15rem;
  min-height: 42px;
}

.card-specs {
  list-style: none;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.card-specs li {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
}

.card-specs li span.val {
  color: var(--text-main);
  font-weight: 500;
  font-family: var(--font-mono);
}

/* MODALES */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-wide {
  max-width: 520px;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
}

.alert {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  margin-bottom: 1rem;
  display: none;
}

.alert-err {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.alert-ok {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

.modal-footer-text {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.modal-footer-text a {
  color: #fff;
  text-decoration: underline;
  margin-left: 0.25rem;
}

/* COCKPIT */
.cockpit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.cockpit-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.cockpit-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.srv-list {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 1.25rem;
}

.srv-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.srv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.45rem;
}

.srv-name {
  font-size: 0.88rem;
  font-weight: 600;
}

.srv-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.cockpit-actions {
  text-align: right;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.mono {
  font-family: var(--font-mono);
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-sub);
  font-size: 0.82rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  color: #fff;
}
