/* shell.css — base commune à tous les outils alexlab.fr/tools
   Contient : reset, tokens couleur communs, typo de base, .controls/.btn.
   Chaque outil garde son propre <style> pour sa mise en page et ses
   variables spécifiques (--accent, --warn, etc.) — inclure ce fichier
   AVANT le <style> local pour que le local puisse surcharger si besoin. */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

:root {
  --bg: #f4f3ee;
  --surface: #ffffff;
  --text: #1a1a18;
  --text-muted: #6b6b66;
  --border: rgba(0,0,0,0.08);
  --btn-hover: rgba(0,0,0,0.05);
}
[data-theme="dark"] {
  --bg: #0b0b0b;
  --surface: #161614;
  --text: #ffffff;
  --text-muted: #8c8c88;
  --border: rgba(255,255,255,0.10);
  --btn-hover: rgba(255,255,255,0.07);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  transition: background 0.35s ease, color 0.35s ease;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.controls {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top));
  right: calc(20px + env(safe-area-inset-right));
  display: flex;
  gap: 10px;
  z-index: 20;
}
.controls-left {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top));
  left: calc(20px + env(safe-area-inset-left));
  display: flex;
  gap: 10px;
  z-index: 20;
}

.dropdown-wrap { position: relative; }
.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  max-width: 280px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.dropdown-panel.open { display: flex; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s ease;
}
.dropdown-item:hover { background: var(--btn-hover); }
.dropdown-item img { width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0; }
.dropdown-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; margin: 0 9px; }
.dropdown-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.dropdown-label { font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-muted); padding: 8px 10px 4px; }
.btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.btn:hover { background: var(--btn-hover); }
.btn:active { transform: scale(0.94); }
.btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: reduce) {
  body, .btn { transition: none; }
}
