/* ═══════════════════════════════════════════════════════════
   RH Manager — base.css
   Design system : variables, reset, typographie, utilitaires
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  /* Couleurs de base */
  --bg:       #F7F6F3;
  --surface:  #FFFFFF;
  --border:   #E5E2DC;
  --text:     #1A1A18;
  --text-2:   #6B6860;
  --text-3:   #9B9890;

  /* Marques */
  --wit:        #1D4ED8;
  --wit-light:  #EFF6FF;
  --wit-dark:   #1e40af;
  --con:        #0F766E;
  --con-light:  #F0FDFA;
  --con-dark:   #0d6460;

  /* Sémantiques */
  --success:  #10B981;
  --danger:   #EF4444;
  --warning:  #F59E0B;
  --info:     #3B82F6;

  /* Sémantiques light */
  --success-light: #DCFCE7;
  --danger-light:  #FEE2E2;
  --warning-light: #FEF9C3;
  --info-light:    #DBEAFE;

  /* Rayons */
  --r:    10px;
  --r-sm: 6px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Ombres */
  --shadow:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.18);

  /* Transitions */
  --transition: 0.15s ease;
  --transition-md: 0.25s ease;

  /* Sidebar */
  --sb-width: 240px;
  --sb-bg:    #252927;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Typographie ───────────────────────────────────────── */
.font-display { font-family: 'Space Grotesk', sans-serif; }

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

h1 { font-size: 40px; font-weight: 700; }
h2 { font-size: 28px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; }

.text-sm   { font-size: 12px; }
.text-xs   { font-size: 11px; }
.text-lg   { font-size: 16px; }
.text-xl   { font-size: 18px; }

.text-muted  { color: var(--text-2); }
.text-faint  { color: var(--text-3); }
.text-wit    { color: var(--wit); }
.text-con    { color: var(--con); }
.text-ok     { color: var(--success); }
.text-ng     { color: var(--danger); }
.text-wa     { color: var(--warning); }

.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ── Layout ────────────────────────────────────────────── */
.flex           { display: flex; }
.flex-center    { display: flex; align-items: center; justify-content: center; }
.flex-between   { display: flex; align-items: center; justify-content: space-between; }
.flex-start     { display: flex; align-items: flex-start; }
.flex-col       { display: flex; flex-direction: column; }
.flex-wrap      { flex-wrap: wrap; }
.flex-1         { flex: 1; }
.flex-shrink-0  { flex-shrink: 0; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }

.grid { display: grid; gap: 14px; }
.g2   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3   { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4   { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ── Espacement ────────────────────────────────────────── */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

/* ── Formulaires ───────────────────────────────────────── */
.form-group { margin-bottom: 14px; }

label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

label.inline {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  display: inline;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--wit);
  box-shadow: 0 0 0 3px rgba(29,78,216,.08);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  accent-color: var(--wit);
}

textarea { resize: vertical; min-height: 80px; }

input[readonly] { background: var(--bg); color: var(--text-2); }

/* ── Diviseur ──────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── Toast ─────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--sb-bg);
  color: #fff;
  padding: 11px 18px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(60px);
  opacity: 0;
  transition: all var(--transition-md);
  z-index: 9999;
  max-width: 320px;
  pointer-events: none;
}
#toast.show { transform: translateY(0); opacity: 1; }

/* ── Page skeleton ─────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .g4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
}
