/* RECOPIÉ depuis ~/dev/domeo-ui — ne pas modifier ici.
 *
 * Recopie du 31/07/2026, commit 419f755 (PR n° 1 et 2 du dépôt partagé).
 * Le dépôt partagé est la source unique : « toute évolution de couleur se
 * fait ici d'abord » (domeo-ui/CLAUDE.md). Pour resynchroniser : recopier le
 * fichier d'origine, RÉTABLIR CET EN-TÊTE, et refaire passer la suite de
 * tests de rendu.
 */
/* domeo-ui — habillage commun de la gamme (chrome + sélecteur de thème).
 *
 * À charger APRÈS `theme.css` (qui fournit les tokens --bg, --accent, etc.).
 * Fournit :
 *   - la base typographique (Inter) ;
 *   - le gabarit d'écran : bandeau gauche (marque + déconnexion) + topbar ;
 *   - le sélecteur de thème clair / sombre / auto (mêmes icônes que les SPA).
 *
 * Volontairement sans logique : le câblage du sélecteur est dans theme.js.
 */

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Gabarit : bandeau gauche + colonne principale ─────────────────── */

.app-shell {
  display: grid;
  grid-template-columns: 256px 1fr;
  min-height: 100vh;
}

.app-sidebar {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 16px;
}

.app-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.app-sidebar__brand .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

.app-sidebar__spacer { flex: 1; }

.app-sidebar__footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.app-sidebar__logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.12s, color 0.12s;
}
.app-sidebar__logout:hover { background: var(--hover); color: var(--text); }
.app-sidebar__logout svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  flex-shrink: 0;
}

.app-main-col {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 14px clamp(16px, 5vw, 48px);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.app-content {
  flex: 1;
  padding: clamp(24px, 6vw, 56px) clamp(16px, 5vw, 48px);
}

/* Sur petit écran, le bandeau passe au-dessus du contenu. */
@media (max-width: 720px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    grid-column: 1;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px clamp(16px, 5vw, 48px);
  }
  .app-sidebar__footer { border-top: none; padding-top: 0; }
  .app-main-col { grid-column: 1; }
}

/* ── Sélecteur de thème (clair / sombre / auto) ────────────────────── */
/* Reproduit fidèlement le composant ThemeSwitcher.vue de la gamme. */

.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--surface-tinted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  flex-shrink: 0;
}
.theme-switcher button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-subtle, var(--text-muted));
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.theme-switcher button:hover { color: var(--text); }
.theme-switcher button.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.theme-switcher button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.theme-switcher svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
}
