/* Composants : cartes, boutons, pastilles, champs, navigation, bandeau, toast, dialogue, icônes. */
.demo-banner { background: var(--banner-bg); color: var(--banner-text); text-align: center; font-size: 12px; letter-spacing: 0.02em; padding: 6px 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin: 0 0 var(--gap); box-shadow: var(--shadow);
  transition: background-color var(--slow) var(--ease), border-color var(--slow) var(--ease);
}
.grid > .card { margin: 0; }
.card.accent { border-color: var(--line-strong); }
.tag {
  display: inline-block; margin-left: 8px; font: 500 11px/1.6 var(--sans); letter-spacing: 0.06em; padding: 1px 10px;
  border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); vertical-align: middle;
}
.lights, .rooms { list-style: none; margin: 0; padding: 0; }
.lights li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.lights li:first-child { border-top: 0; }
.lights small { margin-left: auto; color: var(--muted); }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.dot.fade { border: 1px solid transparent; transition: background-color 2.5s ease, border-color 2.5s ease; }
.dot.off { border: 1px solid var(--muted); }
.room-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.room-row:first-child { border-top: 0; }
.room-name { flex: 0 0 38%; font-size: 14px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08); }
.swatch.big { width: 40px; height: 40px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn {
  font: 500 14px/1 var(--sans); color: var(--text); background: transparent; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 12px 20px; min-height: 44px; cursor: pointer;
  transition: background-color var(--slow) var(--ease), border-color var(--slow) var(--ease), color var(--slow) var(--ease);
}
.btn:hover { border-color: var(--text); }
.btn.primary { background: var(--invert-bg); color: var(--invert-text); border-color: var(--invert-bg); }
.btn.chip { min-height: 36px; padding: 8px 14px; font-size: 13px; }
.btn.chip[aria-pressed='true'] { background: var(--invert-bg); color: var(--invert-text); border-color: var(--invert-bg); }
.btn.restore {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: calc(100% - 2 * var(--pad)); max-width: calc(var(--page) - 2 * var(--pad));
  margin: 0 auto 12px; background: var(--invert-bg); color: var(--invert-text); border: 0;
}
.link { min-height: 44px; min-width: 44px; background: none; border: 0; color: var(--muted); font: 500 13px/1 var(--sans); letter-spacing: 0.04em; cursor: pointer; padding: 8px; }
.link:hover { color: var(--text); }
.field { display: flex; align-items: center; gap: 12px; padding: 10px 0; min-height: 44px; border-top: 1px solid var(--line); }
.field input[type=checkbox], .field input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.field input[type=time], .field input[type=date], .search {
  font: inherit; margin-left: auto; background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 10px;
}
.field input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }
.clock-time { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
dialog.preview {
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  width: min(92vw, 460px); box-shadow: var(--shadow); animation: fade-in 500ms var(--ease) both;
}
dialog.preview::backdrop { background: rgb(0 0 0 / 0.45); }
nav {
  position: fixed; z-index: 5; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 560px); display: flex; padding: 6px; gap: 2px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
}
nav a {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px;
  color: var(--muted); text-decoration: none; font-size: 11px; border-radius: 999px; transition: color var(--slow) var(--ease), background-color var(--slow) var(--ease);
}
nav a span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
nav a.active { color: var(--text); background: var(--sand); }
.ico {
  width: 22px; height: 22px; flex: none; background-color: currentColor; display: inline-block;
  -webkit-mask-position: center; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat;
  mask-position: center; mask-size: contain; mask-repeat: no-repeat;
}
.toast {
  position: fixed; left: 16px; right: 16px; bottom: 100px; z-index: 6; max-width: 480px; margin: 0 auto; padding: 14px 18px;
  background: var(--invert-bg); color: var(--invert-text); border-radius: var(--radius-sm); opacity: 0; pointer-events: none;
  transition: opacity var(--slow) var(--ease);
}
.toast.show { opacity: 1; }
