:root {
  --bg-dark: #231911;      /* Ton fond principal sombre */
  --bg-sidebar: #422b19;   /* Ta couleur de sidebar */
  --bg-card: #332113;      /* Fond des cartes */
  --bg-input: #ffffff;     /* Fond blanc pour la lisibilité des champs */
  --text-main: #f5e6d3;    /* Texte clair beige */
  --text-muted: #d2b48c;   /* Texte secondaire */
  --accent: #c49a6c;       /* Couleur bouton / accentuation */
  --accent-hover: #b08455;
  --border: #523721;
  --success: #65a30d;      /* Vert pour le switch ON */
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: sans-serif; }
body { display: flex; background-color: var(--bg-dark); color: var(--text-main); min-height: 100vh; }

/* Sidebar */
.sidebar { width: 260px; background-color: var(--bg-sidebar); padding: 24px 16px; min-height: 100vh; }
.sidebar .logo { font-size: 1.4rem; font-weight: bold; color: var(--text-main); margin-bottom: 25px; }
.sidebar nav a { display: block; padding: 12px 16px; border-radius: 8px; color: var(--text-main); text-decoration: none; font-weight: 500; margin-bottom: 8px; transition: 0.2s; }
.sidebar nav a:hover, .sidebar nav a.active { background-color: var(--bg-card); color: #fff; }
.sidebar nav a.back-link { color: var(--text-muted); margin-bottom: 15px; }

/* Contenu Principal */
.main-content { flex: 1; padding: 40px; max-width: 900px; }
h1 { font-size: 2rem; margin-bottom: 10px; color: var(--text-main); }
.subtitle { color: var(--text-muted); margin-bottom: 30px; }

/* Formulaires & Cartes */
.config-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 6px; color: var(--text-main); }

/* Champs texte corrigés */
.form-group input[type="text"], .form-group textarea {
  width: 100%;
  padding: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #000;
  font-size: 0.95rem;
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* Interrupteurs ON / OFF */
.toggle-wrapper { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 15px; }
.switch { position: relative; display: inline-block; width: 48px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #555; transition: .3s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: var(--success); }
input:checked + .slider:before { transform: translateX(24px); }

/* Bouton principal */
.btn-primary { background: var(--accent); color: #231911; border: none; padding: 12px 20px; border-radius: 6px; font-weight: bold; cursor: pointer; transition: 0.2s; font-size: 1rem; width: 100%; }
.btn-primary:hover { background: var(--accent-hover); }