/* jaikit-pilote IHM — Design system (palette jaikit-patterns) */

/* ── Variables couleurs ─────────────────────────────────────────────────── */
:root {
  --or:       #d4a853;
  --or-clair: #e8c278;
  --or-pale:  #f5e6c0;
  --accent:   #4a9eff;
  --rouge:    #e85d4a;
  --vert:     #52c07e;
}

/* Dark — défaut */
:root, :root[data-theme="dark"] {
  --bg:         #0a0a0f;
  --bg-2:       #12121a;
  --bg-3:       #1c1c28;
  --text:       #f0ece4;
  --text-dim:   #c8c4bc;
  --text-muted: #6b6878;
  --text-inv:   #000000;
  --border:     #334155;
  --shadow:     0 4px 24px rgba(0,0,0,.5);
}

/* Light */
:root[data-theme="light"] {
  --bg:         #ffffff;
  --bg-2:       #f8fafc;
  --bg-3:       #f1f5f9;
  --text:       #0f172a;
  --text-dim:   #475569;
  --text-muted: #94a3b8;
  --text-inv:   #ffffff;
  --border:     #e2e8f0;
  --shadow:     0 4px 24px rgba(15,23,42,.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: .75rem 2rem;
  display: flex;
  flex-wrap: wrap;             /* mobile : la nav se replie, la page ne déborde jamais */
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.navbar-brand h1 { font-size: 1.25rem; font-weight: 700; color: var(--or); letter-spacing: -.01em; }
.navbar-menu { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.navbar-menu a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; padding: 0 .5rem;
  color: var(--text-dim); text-decoration: none; font-size: .9rem; transition: color .2s;
}
.navbar-menu a:hover { color: var(--or); }
.navbar-menu span { font-size: .85rem; color: var(--text-muted); }

.btn-theme {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .3rem .55rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  line-height: 1;
  transition: border-color .2s, background .2s;
}
.btn-theme:hover { border-color: var(--or); background: var(--bg-3); }

/* ── Container ──────────────────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  min-height: calc(100vh - 160px);
}

/* ── Login ──────────────────────────────────────────────────────────────── */
.login-container {
  max-width: 400px;
  margin: 5rem auto;
  background: var(--bg-2);
  padding: 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.login-container h2 { margin-bottom: 1.5rem; text-align: center; color: var(--or); }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .4rem; font-weight: 500; font-size: .88rem; color: var(--text-dim); }
.form-group input {
  width: 100%; padding: .65rem .9rem;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  font-size: .95rem; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus { outline: none; border-color: var(--or); box-shadow: 0 0 0 3px rgba(212,168,83,.15); }

button[type="submit"] {
  width: 100%; padding: .75rem;
  background: var(--or); color: var(--text-inv);
  border: none; border-radius: 6px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: background .2s;
}
button[type="submit"]:hover { background: var(--or-clair); }

.alert { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: .9rem; }
.alert-error { background: rgba(232,93,74,.1); color: var(--rouge); border: 1px solid rgba(232,93,74,.3); }

/* ── Page content ────────────────────────────────────────────────────────── */
.page-content {
  background: var(--bg-2); padding: 2rem;
  border-radius: 8px; border: 1px solid var(--border);
}
.page-content h2 { margin-bottom: 1.5rem; }
.page-content h3 { margin: 1.5rem 0 1rem; color: var(--text-dim); font-size: 1.1rem; }
.page-content a { color: var(--accent); text-decoration: none; }
.page-content a:hover { color: var(--or-clair); text-decoration: underline; }
.page-content ul { margin-left: 1.5rem; margin-bottom: 1rem; }
.page-content li { margin-bottom: .5rem; }

/* ── Info block ──────────────────────────────────────────────────────────── */
.info { margin-top: 1.5rem; padding: 1rem; background: rgba(74,158,255,.08); border-left: 3px solid var(--accent); border-radius: 4px; }
.info p { font-size: .9rem; margin-bottom: .5rem; color: var(--text-dim); }
.info li { font-family: monospace; font-size: .85rem; color: var(--text-dim); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  text-align: center; padding: 1.5rem;
  color: var(--text-muted); font-size: .82rem;
  border-top: 1px solid var(--border); background: var(--bg-2);
  margin-top: 2rem;
}
