/* ──────────────────────────────────────────────────────────
   smart•builder — Global formatting CSS
   Shared across all tools (structure, style, app-sso, etc.)
   Contains: fonts, CSS variables, reset, body baseline,
             header bar, button system, generic modal.
   ────────────────────────────────────────────────────────── */

/* ── FONTS ── */
@font-face { font-family: 'Bellota'; src: url('../fonts/BellotaText-Regular.ttf'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'Bellota'; src: url('../fonts/BellotaText-Bold.ttf'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'Bellota'; src: url('../fonts/BellotaText-Light.ttf'); font-weight: 300; font-style: normal; }
@font-face { font-family: 'Bellota'; src: url('../fonts/BellotaText-Italic.ttf'); font-weight: 400; font-style: italic; }
@font-face { font-family: 'Bellota'; src: url('../fonts/BellotaText-BoldItalic.ttf'); font-weight: 700; font-style: italic; }
@font-face { font-family: 'Bellota'; src: url('../fonts/BellotaText-LightItalic.ttf'); font-weight: 300; font-style: italic; }
@font-face { font-family: 'Open Sans'; src: url('../fonts/OpenSans-Regular.ttf'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'Open Sans'; src: url('../fonts/OpenSans-Bold.ttf'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'Open Sans'; src: url('../fonts/OpenSans-SemiBold.ttf'); font-weight: 600; font-style: normal; }
@font-face { font-family: 'Open Sans'; src: url('../fonts/OpenSans-Medium.ttf'); font-weight: 500; font-style: normal; }
@font-face { font-family: 'Open Sans'; src: url('../fonts/OpenSans-Light.ttf'); font-weight: 300; font-style: normal; }
@font-face { font-family: 'Open Sans'; src: url('../fonts/OpenSans-Italic.ttf'); font-weight: 400; font-style: italic; }

/* ── CSS VARIABLES ── */
:root {
  --blue: #33393D;
  --blue-light: #4a5358;
  --cyan: #6c00fa;
  --cyan-dim: rgba(108,0,250,0.10);
  --yellow: #FFE100;
  --red: #fd0002;
  --black: #1a1a1a;
  --white: #ffffff;
  --bg: #ededed;
  --surface: #f5f5f5;
  --card: #ffffff;
  --border: #d0d0d0;
  --border-focus: #6c00fa;
  --text: #1a1a1a;
  --text-muted: #888888;
  --text-soft: #4a4a4a;
  --danger: #d94040;
  --danger-dim: rgba(217,64,64,0.1);
  --success: #6c00fa;
  --tag-bg: rgba(108,0,250,0.08);
  --tag-color: #33393D;
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

/* ── RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── BODY ── */
body {
  font-family: 'Bellota', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── HEADER BAR ── */
header {
  background: var(--cyan);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-logo {
  font-size: 18px;
  font-weight: 800;
  color: white;
  letter-spacing: 0.05em;
}
.header-file {
  font-family: monospace;
  font-size: 16px;
  color: rgba(255,255,255,0.75);
}
.header-actions { display: flex; gap: 8px; align-items: center; }

/* Séparateur vertical entre le bouton langue (global, injecté par shell.js)
   et les boutons spécifiques à la page. N'apparaît que si un élément suit. */
#ui-lang-trigger + * {
  position: relative;
  margin-left: 8px;
}
#ui-lang-trigger + *::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  height: 22px;
  width: 1.5px;
  background: rgba(255,255,255,0.30);
}

/* ── BUTTON SYSTEM ── */
.btn {
  padding: 9px 18px;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-family: 'Bellota', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--blue-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(51,57,61,0.25); }
.btn-accent { background: var(--yellow); color: var(--blue); }
.btn-accent:hover { background: #ffe900cc; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-outline {
  background: rgba(255,255,255,0.18);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.45);
}
.btn-outline:hover { border-color: white; background: rgba(255,255,255,0.30); }
.btn-danger-outline {
  color: var(--danger) !important;
  border-color: rgba(217,64,64,0.35) !important;
}
.btn-danger-outline:hover {
  border-color: var(--danger) !important;
  background: var(--danger-dim) !important;
}

/* ── MODAL (generic) ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-panel {
  background: var(--card);
  border-radius: 12px;
  width: 380px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.15s;
}
.modal-overlay.open .modal-panel { transform: scale(1); }
.modal-head {
  padding: 16px 20px 12px;
  border-bottom: 1.5px solid var(--border);
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--danger);
}
.modal-body {
  padding: 16px 20px;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  color: var(--text-soft);
  line-height: 1.55;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
}
