/* ===== Variables CSS Globales (cohérentes avec Admin Panel) ===== */
:root {
  /* Thème sombre (par défaut) */
  --bg: #0a0d14;
  --bg-elevated: #0f1419;
  --bg-card: #151a21;
  --bg-card-hover: #1a2028;
  --border: #1e2530;
  --border-light: #252d3a;
  --text-primary: #e8ecf0;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --brand: #6366f1;
  --brand-hover: #818cf8;
  --brand-light: rgba(99, 102, 241, 0.1);
  --brand-dark: #4f46e5;
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Thème clair */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-elevated: #f8f9fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f3f5;
  --border: #e1e4e8;
  --border-light: #d1d5db;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --brand: #6366f1;
  --brand-hover: #818cf8;
  --brand-light: rgba(99, 102, 241, 0.1);
  --brand-dark: #4f46e5;
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===== Reset & Base ===== */
* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  background-color: var(--bg);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Auto-mask liens non autorisés */
.ntool-link-disabled {
  pointer-events: none;
  opacity: 0.55;
  filter: saturate(0.75);
}

/* ===== Scrollbar ===== */
*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
  background: var(--border);
  border: 2px solid var(--bg);
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

* {
  scrollbar-color: var(--border) var(--bg);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem 0;
  color: var(--text-secondary);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--brand);
  color: var(--brand);
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-elevated);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.main-container {
  padding: 40px 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* ===== Grid ===== */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

