/* Gadget « Mes compétences » — style compact, assorti au desktop WxCC */
:root {
  --accent: #00bceb;
  --accent-dark: #0082a8;
  --bg: #f4f7f9;
  --card: #ffffff;
  --text: #1c2833;
  --muted: #5e6c78;
  --border: #dbe3e9;
  --err: #b3261e;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Cisco Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  min-height: 100vh;
}
.hidden { display: none !important; }

/* ---------- barre supérieure ---------- */
#topbar {
  display: flex; justify-content: space-between; align-items: center;
  background: #0f1c26; color: #fff; padding: 10px 16px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.logo {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}
.user { display: flex; align-items: center; gap: 12px; font-size: 13px; }

/* ---------- vues / cartes ---------- */
.view { padding: 16px; max-width: 860px; margin: 0 auto; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 18px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 8px; font-size: 16px; }
.card h1 { margin: 0 0 10px; font-size: 19px; }

/* ---------- login ---------- */
.login-card { max-width: 560px; margin: 40px auto; }
.help { color: var(--muted); font-size: 13px; padding-left: 18px; }
.help a, code { color: var(--accent-dark); }
textarea {
  width: 100%; padding: 8px 10px; margin: 6px 0 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-family: ui-monospace, monospace; font-size: 12px; resize: vertical;
}
label { font-weight: 600; font-size: 13px; }
.fineprint { color: var(--muted); font-size: 12px; }

/* ---------- boutons ---------- */
.btn {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 8px; padding: 8px 14px; font-size: 14px; cursor: pointer;
}
.btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #06232f; font-weight: 600; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: #4a5a66; color: #cfe6f2; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- profil ---------- */
.profile-head { display: flex; justify-content: space-between; align-items: center; }
.badge {
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: #e3f6fd; color: var(--accent-dark);
}
.badge.team { background: #fdf3e3; color: #b55d00; }
.badge.none { background: #f1f3f5; color: var(--muted); }
.profile-meta { color: var(--muted); margin: 6px 0 4px; }
.notice {
  background: #fdf3e3; border: 1px solid #f3d9a4; color: #7a4400;
  border-radius: 8px; padding: 10px 12px; margin-top: 10px; font-size: 13px;
}

/* ---------- compétences ---------- */
.hint { color: var(--muted); font-size: 13px; margin-top: 0; }
.skills { display: flex; flex-direction: column; gap: 8px; }
.skill-row {
  display: grid; grid-template-columns: 1fr auto auto 32px;
  gap: 12px; align-items: center;
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
}
.skill-name { font-weight: 600; }
.skill-desc { color: var(--muted); font-size: 12px; }
.skill-type {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #eef2f5; color: var(--muted); white-space: nowrap;
}
input[type="range"] { width: 160px; accent-color: var(--accent); }
.prof-value {
  min-width: 30px; text-align: center; font-weight: 700; color: var(--accent-dark);
}
input[type="text"].skill-text { width: 160px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; }
.switch { position: relative; width: 40px; height: 22px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; background: #c9d4db; border-radius: 999px; transition: .2s;
}
.switch .track::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: .2s;
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { left: 21px; }
.remove-btn {
  border: none; background: none; color: var(--muted); font-size: 16px; cursor: pointer;
}
.remove-btn:hover { color: var(--err); }
.empty { color: var(--muted); font-style: italic; padding: 8px 0; }
.add-skill { margin-top: 10px; }
.add-skill summary { cursor: pointer; color: var(--accent-dark); font-weight: 600; }
.add-skill select { margin: 8px 8px 8px 0; max-width: 320px; padding: 6px; border: 1px solid var(--border); border-radius: 6px; }

/* ---------- changer de profil ---------- */
.assign-row { display: flex; gap: 10px; align-items: center; }
.assign-row select { flex: 0 1 320px; padding: 7px; border: 1px solid var(--border); border-radius: 6px; }

/* ---------- audit / alertes ---------- */
.audit { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.audit li { margin: 3px 0; }
.alert {
  background: #fceceb; border: 1px solid #f0c2bf; color: var(--err);
  border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 13px;
  white-space: pre-wrap; word-break: break-word;
}
.toast {
  position: fixed; bottom: 18px; right: 18px; background: #0b3d24; color: #d9f5e6;
  padding: 10px 16px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.25);
  font-size: 13.5px; z-index: 50;
}
.loading { text-align: center; color: var(--muted); padding: 30px; }

