/* ============================================================================
 * QR_PASS — Démo vitrine · Design system (fidèle au thème « navy premium »)
 * Primaire #1B2A44, secondaire #A53D2F (rouge brique). Clair + sombre + zoom.
 * ========================================================================== */

:root {
  --primary:        #1B2A44;
  --primary-mid:    #26395a;
  --secondary:      #A53D2F;
  --bg:             #F2F4F8;
  --card:           #FFFFFF;
  --banner:         #EAEEF5;
  --banner-text:    #1B2A44;
  --secret:         #C62828;
  --text:           #1E2633;
  --text-soft:      #5B6675;
  --text-faint:     #8A94A3;
  --border:         #E1E6EE;
  --border-strong:  #C9D2DF;
  --hover:          #EEF2F8;
  --selected:       #E3ECFB;
  --selected-bar:   #1B2A44;
  --amber:          #E9A23B;
  --green:          #2E7D32;
  --orange:         #E65100;
  --heart:          #E53935;
  --shadow-1:       0 1px 2px rgba(16,24,38,.08), 0 1px 3px rgba(16,24,38,.06);
  --shadow-2:       0 2px 6px rgba(16,24,38,.10), 0 1px 3px rgba(16,24,38,.08);
  --shadow-4:       0 6px 18px rgba(16,24,38,.16), 0 2px 6px rgba(16,24,38,.10);
  --app-bar:        linear-gradient(90deg, #101826, #1B2A44);
  --radius-card:    14px;
  --zoom:           1;
}

:root[data-theme="dark"] {
  --primary:        #6E9BE0;
  --primary-mid:    #5A83c4;
  --secondary:      #E08574;
  --bg:             #0F1827;
  --card:           #182336;
  --banner:         #213048;
  --banner-text:    #E6EBF4;
  --secret:         #FF8A80;
  --text:           #E6EBF4;
  --text-soft:      #A7B2C4;
  --text-faint:     #6E7C93;
  --border:         #29374F;
  --border-strong:  #3A4A66;
  --hover:          #1E2C42;
  --selected:       #223250;
  --selected-bar:   #6E9BE0;
  --shadow-1:       0 1px 2px rgba(0,0,0,.35);
  --shadow-2:       0 2px 8px rgba(0,0,0,.40);
  --shadow-4:       0 8px 22px rgba(0,0,0,.50);
  --app-bar:        linear-gradient(90deg, #0A1120, #16233b);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body { overflow: hidden; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* Zoom global (préférence Normal/Grand/Très grand) */
#zoom-root { font-size: calc(14px * var(--zoom)); }

/* ————— Bandeau démo ————— */
#demo-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 30px; font-size: 12px; font-weight: 600; letter-spacing: .3px;
  background: repeating-linear-gradient(45deg, #E9A23B, #E9A23B 14px, #d9922f 14px, #d9922f 28px);
  color: #2a1c05;
}
#demo-banner .close { margin-left: 12px; opacity: .7; background: none; border: none; font-size: 15px; color: #2a1c05; }
#demo-banner .close:hover { opacity: 1; }
.with-banner #app { top: 30px; }

/* ————— Conteneur applicatif (simule la fenêtre WPF) ————— */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }

/* ============================================================================
 * CONNEXION
 * ========================================================================== */
#login {
  position: absolute; inset: 0; display: flex;
  background: linear-gradient(135deg, #0A1322, #1B2A44 55%, #243553);
  z-index: 100;
}
.login-left {
  flex: 3; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 0 6vw; color: #EAF0FA; gap: 24px;
}
.login-left img { width: 220px; max-width: 60%; image-rendering: pixelated; }
.login-left p.slogan { font-size: 16px; opacity: .82; margin: 0; max-width: 460px; line-height: 1.5; }
.login-pills { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.login-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
}
.login-pill svg { width: 16px; height: 16px; fill: #E9A23B; }
.login-right {
  flex: 2; min-width: 340px; display: flex; align-items: center; justify-content: center;
  background: var(--card); border-radius: 18px 0 0 18px; padding: 40px;
}
.login-card { width: 100%; max-width: 320px; }
.login-card h2 { font-size: 26px; margin: 0 0 4px; color: var(--text); }
.login-card .hint { color: var(--text-soft); font-size: 13px; margin: 0 0 24px; }
.login-note {
  background: var(--banner); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-size: 12.5px; color: var(--text-soft); margin-bottom: 20px; line-height: 1.5;
}
.login-note b { color: var(--text); }
.login-foot { margin-top: 26px; font-size: 11.5px; color: var(--text-faint); text-align: center; }

/* Sélecteur de rôle (spécifique démo) */
.role-choice { display: grid; gap: 10px; margin-bottom: 8px; }
.role-opt {
  display: flex; align-items: flex-start; gap: 12px; text-align: left;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 12px;
  padding: 13px 15px; transition: border-color .12s, background .12s;
}
.role-opt:hover { border-color: var(--primary); background: var(--hover); }
.role-opt.active { border-color: var(--primary); background: var(--selected); }
.role-opt .ic { width: 38px; height: 38px; border-radius: 19px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; background: var(--banner); }
.role-opt .ic svg { width: 20px; height: 20px; fill: var(--primary); }
.role-opt .txt strong { display: block; font-size: 14.5px; color: var(--text); }
.role-opt .txt span { font-size: 12px; color: var(--text-soft); line-height: 1.45; }

/* ============================================================================
 * COMPOSANTS génériques (boutons, cartes, chips, champs)
 * ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: none; border-radius: 6px; padding: 9px 16px; font-size: 13px; font-weight: 600;
  letter-spacing: .3px; text-transform: uppercase; transition: filter .12s, background .12s;
}
.btn svg { width: 17px; height: 17px; }
.btn-raised { background: var(--primary); color: #fff; box-shadow: var(--shadow-1); }
.btn-raised svg { fill: #fff; }
.btn-raised:hover { filter: brightness(1.12); }
.btn-outlined { background: transparent; color: var(--primary); border: 1.4px solid var(--border-strong); }
.btn-outlined svg { fill: var(--primary); }
.btn-outlined:hover { background: var(--hover); }
.btn-flat { background: transparent; color: var(--primary); }
.btn-flat svg { fill: var(--primary); }
.btn-flat:hover { background: var(--hover); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary svg { fill: #fff; }
.btn:disabled { opacity: .42; pointer-events: none; }

.tool {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 16px; border: none; background: transparent;
  color: var(--text-soft); transition: background .12s;
}
.tool svg { width: 18px; height: 18px; fill: var(--text-soft); }
.tool:hover { background: var(--hover); }
.tool:hover svg { fill: var(--primary); }

.card {
  background: var(--card); border-radius: var(--radius-card);
  box-shadow: var(--shadow-2); border: 1px solid var(--border);
}

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 600;
  background: var(--banner); color: var(--text-soft);
}
.chip svg { width: 12px; height: 12px; fill: currentColor; }
.chip.conforme  { background: rgba(46,125,50,.14);  color: var(--green); }
.chip.nonconf   { background: rgba(230,81,0,.14);   color: var(--orange); }
.chip.archive   { background: rgba(198,40,40,.14);  color: var(--secret); }
.chip.desactive { background: rgba(120,130,145,.16);color: var(--text-soft); }
.chip.totp      { background: rgba(110,155,224,.16);color: #3a6bb0; }
.chip.lien      { background: rgba(165,61,47,.13);  color: var(--secondary); }

.field-label { text-transform: uppercase; font-size: 10.5px; font-weight: 600;
  letter-spacing: .6px; color: var(--text-faint); margin-bottom: 3px; }

.input {
  width: 100%; padding: 10px 12px; font-size: 14px; font-family: inherit;
  color: var(--text); background: var(--card);
  border: 1.4px solid var(--border-strong); border-radius: 6px; outline: none;
}
.input:focus { border-color: var(--primary); }
.input::placeholder { color: var(--text-faint); }
label.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin: 0 0 5px; }
.req::after { content: ' *'; color: var(--secondary); font-weight: 700; }

/* Switch */
.switch { position: relative; display: inline-block; width: 38px; height: 20px; }
.switch input { display: none; }
.switch .slider {
  position: absolute; inset: 0; background: var(--border-strong); border-radius: 20px; transition: .18s;
}
.switch .slider::before {
  content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: .18s; box-shadow: var(--shadow-1);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text); }

/* ============================================================================
 * FENÊTRE PRINCIPALE — barre d'app + 3 panneaux + pied
 * ========================================================================== */
#main { display: none; flex-direction: column; height: 100%; }
#main.show { display: flex; }

.appbar {
  display: flex; align-items: center; gap: 16px; padding: 0 22px; height: 76px;
  background: var(--app-bar); color: #EAF0FA; box-shadow: var(--shadow-4); z-index: 10;
}
.appbar img { height: 52px; image-rendering: pixelated; }
.appbar .titles h1 { font-size: 20px; margin: 0; font-weight: 700; }
.appbar .titles p { font-size: 12px; margin: 0; opacity: .72; }
.appbar .spacer { flex: 1; }
.appbar .actions { display: flex; align-items: center; gap: 2px; }
.appbar .tool { color: #cdd8ec; }
.appbar .tool svg { fill: #cdd8ec; }
.appbar .tool:hover { background: rgba(255,255,255,.12); }
.appbar .tool:hover svg { fill: #fff; }
.appbar .sep { width: 1px; height: 26px; background: rgba(255,255,255,.28); margin: 0 8px; }

.panels { flex: 1; display: flex; gap: 0; padding: 14px; min-height: 0; overflow: hidden; }
.panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.panel.vault   { width: 288px; flex-shrink: 0; }
.panel.list    { flex: 1; min-width: 320px; margin: 0 12px; }
.panel.detail  { width: 384px; flex-shrink: 0; }
.panel-inner { display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; }
.panel-head { padding: 14px 16px 10px; }
.panel-body { flex: 1; overflow-y: auto; padding: 0 8px 10px; }

/* — Panneau coffre (arbre) — */
.vault h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-faint); margin: 0 0 10px; display: flex; align-items: center; gap: 7px; }
.vault h3 svg { width: 16px; height: 16px; fill: var(--text-faint); }
.tree-node { user-select: none; }
.tree-row {
  display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 8px;
  font-size: 13.5px; color: var(--text); cursor: pointer;
}
.tree-row:hover { background: var(--hover); }
.tree-row.active { background: var(--selected); font-weight: 600; }
.tree-row .twist { width: 16px; height: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.tree-row .twist svg { width: 14px; height: 14px; fill: var(--text-faint); transition: transform .12s; }
.tree-row.open .twist svg { transform: rotate(90deg); }
.tree-row .tic { width: 18px; height: 18px; flex-shrink: 0; }
.tree-row .tic svg { width: 18px; height: 18px; fill: var(--amber); }
.tree-row .tic.client svg { fill: var(--text-soft); }
.tree-row .cnt { margin-left: auto; font-size: 11px; color: var(--text-faint); }
.tree-children { margin-left: 16px; display: none; }
.tree-node.open > .tree-children { display: block; }
.recents { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.recents .rhead { font-size: 12px; font-weight: 600; color: var(--text-soft); padding: 4px 8px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.recents .rhead svg { width: 14px; height: 14px; fill: var(--text-faint); }
.recents .ritem { font-size: 12.5px; padding: 5px 8px 5px 26px; color: var(--text-soft); border-radius: 6px; cursor: pointer; }
.recents .ritem:hover { background: var(--hover); color: var(--text); }

/* — Panneau liste — */
.list-head { display: flex; align-items: center; gap: 12px; padding: 4px 8px 12px; }
.list-head .scope-ic { width: 40px; height: 40px; border-radius: 20px; background: var(--banner); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.list-head .scope-ic svg { width: 22px; height: 22px; fill: var(--primary); }
.list-head .scope-name { font-size: 18px; font-weight: 600; color: var(--text); }
.list-head .scope-sub { font-size: 12px; color: var(--text-faint); }
.actionbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 8px 10px; }
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 8px 12px; }
.filterbar .search { flex: 1; min-width: 160px; position: relative; }
.filterbar .search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: var(--text-faint); }
.filterbar .search input { padding-left: 32px; }
.select {
  padding: 8px 10px; font-size: 13px; font-family: inherit; color: var(--text);
  background: var(--card); border: 1.4px solid var(--border-strong); border-radius: 6px; outline: none;
}
.toggle-filter {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 12.5px; font-weight: 600;
  border: 1.4px solid var(--border-strong); border-radius: 18px; background: var(--card); color: var(--text-soft);
}
.toggle-filter svg { width: 15px; height: 15px; fill: currentColor; }
.toggle-filter.on { background: var(--selected); border-color: var(--primary); color: var(--primary); }

.pw-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px;
  cursor: pointer; border: 1px solid transparent; position: relative;
}
.pw-item:hover { background: var(--hover); }
.pw-item.selected { background: var(--selected); border-color: var(--primary); }
.pw-item.selected::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--selected-bar); }
.pw-item.grise { opacity: .5; }
.pw-item .fav { flex-shrink: 0; }
.pw-item .fav svg { width: 18px; height: 18px; fill: var(--text-faint); }
.pw-item .fav.on svg { fill: var(--heart); }
.pw-item .pw-ic { width: 34px; height: 34px; border-radius: 8px; background: var(--banner); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pw-item .pw-ic svg { width: 19px; height: 19px; fill: var(--primary); }
.pw-item .pw-main { flex: 1; min-width: 0; }
.pw-item .pw-lib { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-item .pw-sub { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-item .pw-badges { display: flex; gap: 4px; flex-shrink: 0; }
.pw-badge { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: var(--banner); }
.pw-badge svg { width: 13px; height: 13px; fill: var(--text-soft); }

.empty { text-align: center; color: var(--text-faint); padding: 48px 20px; }
.empty svg { width: 46px; height: 46px; fill: var(--border-strong); margin-bottom: 12px; }
.empty p { margin: 4px 0; font-size: 14px; }
.empty .sub { font-size: 12.5px; }

/* — Panneau détail — */
.detail-nav { display: flex; align-items: center; gap: 4px; padding: 4px 8px 8px; }
.detail-nav .spacer { flex: 1; }
.detail-title { font-size: 20px; font-weight: 700; color: var(--text); padding: 2px 10px 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qr-box { margin: 8px auto 6px; width: 232px; height: 232px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-2); display: flex; align-items: center; justify-content: center; padding: 12px; }
.qr-box svg, .qr-box img { width: 100%; height: 100%; }
.qr-caption { text-align: center; font-size: 12px; color: var(--text-faint); margin: 2px 0 14px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.qr-caption svg { width: 15px; height: 15px; fill: var(--text-faint); }
.secret-line { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 6px; }
.secret-val { font-family: 'Consolas', 'Courier New', monospace; font-size: 18px; font-weight: 700; color: var(--secret); letter-spacing: .5px; }
.detail-field { padding: 10px 10px; border-top: 1px solid var(--border); }
.detail-field .df-top { display: flex; align-items: center; gap: 8px; }
.detail-field .df-val { flex: 1; min-width: 0; font-size: 14px; color: var(--text); word-break: break-word; }
.detail-field .df-val.mono { font-family: 'Consolas', monospace; }
.detail-field a.df-val { color: #3a6bb0; text-decoration: none; }
.detail-field a.df-val:hover { text-decoration: underline; }
.totp-block { display: flex; align-items: center; gap: 14px; }
.totp-code { font-family: 'Consolas', monospace; font-size: 22px; font-weight: 700; letter-spacing: 3px; color: var(--primary); }
.totp-ring { position: relative; width: 34px; height: 34px; flex-shrink: 0; }
.totp-ring .sec { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text-soft); }
.link-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13.5px; color: #3a6bb0; cursor: pointer; }
.link-item svg { width: 15px; height: 15px; fill: var(--secondary); }
.versions summary { cursor: pointer; font-size: 12.5px; color: var(--text-soft); padding: 8px 0; }
.version-row { display: flex; align-items: center; gap: 8px; padding: 5px 0 5px 12px; font-size: 12.5px; color: var(--text-soft); }
.version-row .vdate { flex: 1; }

/* — Pied de page — */
.footer {
  display: flex; align-items: center; gap: 12px; padding: 8px 18px; height: 40px;
  background: var(--banner); border-top: 1px solid var(--border); font-size: 12px; color: var(--text-soft);
}
.footer .spacer { flex: 1; }
.env-badge { padding: 2px 8px; border-radius: 3px; color: #fff; font-size: 10.5px; font-weight: 600; }
.env-badge.dev  { background: var(--orange); }
.env-badge.prod { background: var(--green); }
.footer .theme-toggle { display: flex; align-items: center; gap: 8px; }
.footer .theme-toggle svg { width: 16px; height: 16px; fill: var(--text-faint); }

/* ============================================================================
 * MODALES / FENÊTRES secondaires
 * ========================================================================== */
.overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(10,16,26,.5);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  backdrop-filter: blur(2px);
}
.with-banner .overlay { top: 30px; }
.modal { background: var(--card); border-radius: 14px; box-shadow: var(--shadow-4); display: flex; flex-direction: column; max-height: 100%; overflow: hidden; }
.modal-bar {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  background: var(--banner); color: var(--banner-text); border-bottom: 1px solid var(--border);
}
.modal-bar svg { width: 22px; height: 22px; fill: var(--banner-text); }
.modal-bar h2 { font-size: 17px; margin: 0; font-weight: 600; }
.modal-bar .spacer { flex: 1; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }
.modal-foot .spacer { flex: 1; }
.modal-msg { font-size: 12.5px; color: var(--text-soft); }

/* QR éphémère */
.modal.qr-temp { width: 380px; }
.qr-temp .modal-body { text-align: center; }
.qr-temp .field-name { font-size: 13px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .5px; }
.qr-temp .field-preview { font-family: 'Consolas', monospace; font-size: 15px; color: var(--text); margin: 4px 0 16px; word-break: break-all; }
.qr-temp .qr-big { width: 240px; height: 240px; margin: 0 auto 14px; background: #fff; border-radius: 10px; padding: 12px; box-shadow: var(--shadow-2); position: relative; }
.qr-temp .qr-big svg, .qr-temp .qr-big img { width: 100%; height: 100%; }
.qr-temp .qr-mask {
  position: absolute; inset: 0; background: var(--card); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-soft);
}
.qr-temp .qr-mask svg { width: 40px; height: 40px; fill: var(--text-faint); }
.qr-temp .maskmsg { font-size: 12px; color: var(--text-faint); }

/* Onglets (édition, admin, référentiels) */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 4px; flex-wrap: wrap; }
.tab { padding: 12px 16px; font-size: 13.5px; font-weight: 600; color: var(--text-soft); border-bottom: 2.5px solid transparent; background: none; border-top: none; border-left: none; border-right: none; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tabpage { display: none; }
.tabpage.active { display: block; }

/* Édition */
.form-section { margin-bottom: 18px; }
.form-section .sec-title { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-faint); font-weight: 700; margin-bottom: 10px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.form-row { display: flex; gap: 14px; margin-bottom: 14px; }
.form-row > div { flex: 1; }
.strength { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 8px; }
.strength > span { display: block; height: 100%; transition: width .2s, background .2s; }
.strength-lbl { font-size: 12px; font-weight: 600; margin-top: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1.4px solid var(--border-strong); border-radius: 8px; font-size: 12.5px; color: var(--text-soft); }
.check-chip input { display: none; }
.check-chip.on { background: var(--selected); border-color: var(--primary); color: var(--primary); }
.check-chip svg { width: 14px; height: 14px; fill: currentColor; }
.champ-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }

/* Grilles (data grid) */
.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.grid th { text-align: left; padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-faint); border-bottom: 1.5px solid var(--border); font-weight: 700; }
.grid td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.grid tr:hover td { background: var(--hover); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 6px; }
.dot.ok { background: var(--green); }
.dot.off { background: var(--text-faint); }

/* Cartes de réglages */
.set-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.set-card h4 { margin: 0 0 4px; font-size: 15px; color: var(--text); }
.set-card .desc { font-size: 12.5px; color: var(--text-soft); margin: 0 0 16px; }
.policy-summary { background: var(--banner); border-radius: 10px; padding: 14px; font-size: 13px; color: var(--text); line-height: 1.7; }
.policy-summary b { color: var(--primary); }

/* Toast */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #263242; color: #fff; padding: 11px 20px; border-radius: 8px; font-size: 13px;
  box-shadow: var(--shadow-4); z-index: 400; opacity: 0; transition: transform .25s, opacity .25s;
  display: flex; align-items: center; gap: 9px;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast svg { width: 17px; height: 17px; fill: #7FD48A; }

/* Aide raccourcis */
.kbd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kbd-card h4 { margin: 0 0 10px; font-size: 14px; color: var(--primary); }
.kbd-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 13px; }
.kbd { font-family: 'Consolas', monospace; font-size: 11.5px; background: var(--banner); border: 1px solid var(--border-strong); border-radius: 5px; padding: 2px 7px; color: var(--text); }

/* Responsive (pour l'iframe étroite) */
@media (max-width: 1100px) {
  .panel.detail { width: 340px; }
  .panel.vault { width: 250px; }
}
@media (max-width: 900px) {
  .panels { flex-direction: column; overflow-y: auto; }
  .panel.vault, .panel.list, .panel.detail { width: 100%; margin: 0 0 12px; max-height: none; }
  .login-left { display: none; }
  .login-right { border-radius: 0; }
  .kbd-grid { grid-template-columns: 1fr; }
}
