/* Charte graphique Omnibat : le fichier commun à tous les modules (accueil, Compte rendu, Phasage, modules futurs).
   Publié à l'adresse www.omnibat.fr/charte/omnibat.css et chargé par chaque module avant sa propre feuille.
   Référence de l'apparence : l'application Phasage (barre bleu nuit, police du système, bleu vif, panneaux blancs).

   Règles :
   - Toutes les classes commencent par « ob- » : elles ne peuvent pas se mélanger avec celles d'un module.
   - Les couleurs sont des variables « --ob-… » : un module les utilise, il ne les redéfinit pas.
   - Ce fichier ne change que dans le dépôt omnibat ; chaque évolution est vérifiée dans tous les modules.

   Plan : 1. Couleurs et police · 2. Barre du haut (et le composant commun <omnibat-bar>, omnibat-bar.js) · 3. Boutons, champs, groupes · 4. Panneaux et listes
          5. Fenêtre, menu, message · 6. Connexion */

/* ---------- 1. Couleurs et police ---------- */
:root {
  --ob-bg: #f4f5f7;          /* fond de page */
  --ob-panel: #ffffff;       /* panneaux, listes, fenêtres */
  --ob-line: #d9dce1;        /* filets et bords */
  --ob-line-soft: #eef0f2;   /* filets entre lignes d'un tableau */
  --ob-hover: #f7f9fc;       /* ligne survolée */
  --ob-text: #1d2330;
  --ob-muted: #6b7280;
  --ob-faint: #9ca3af;
  --ob-accent: #1f6feb;      /* actions et sélection */
  --ob-accent-hover: #1a5fd0;
  --ob-accent-weak: #e7f0ff;
  --ob-danger: #c62828;
  --ob-late: #c26a00;        /* retard */
  --ob-ok: #2e7d4f;
  --ob-head: #1d2330;        /* barre du haut */
  --ob-head-2: #2b3343;      /* boutons de la barre */
  --ob-head-line: #3d4658;
  --ob-head-muted: #aab3c2;
  --ob-teal: #0e7490;        /* couleur du module Phasage */
  --ob-steel: #2f5d7c;       /* couleur du module Compte rendu */
  --ob-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ob-radius: 6px;
  --ob-radius-lg: 10px;
  --ob-bar-h: 46px;
}

/* ---------- 2. Barre du haut ---------- */
.ob-bar { height: var(--ob-bar-h); display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--ob-head); color: #fff; font: 13px/1.35 var(--ob-font); position: sticky; top: 0; z-index: 20; }
.ob-bar .ob-sp { flex: 1; }
.ob-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: #fff; text-decoration: none; margin-right: 6px; white-space: nowrap; }
.ob-brand i { width: 22px; height: 22px; border-radius: 6px; background: var(--ob-accent); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 12px; }
.ob-bar .ob-btn { background: var(--ob-head-2); border-color: var(--ob-head-line); color: #fff; }
.ob-bar .ob-btn:hover { border-color: #56617a; }
.ob-bar .ob-btn.ob-primary { background: var(--ob-accent); border-color: var(--ob-accent); }
.ob-bar .ob-crumb { color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ob-bar .ob-dim { color: var(--ob-head-muted); }
/* Barre commune <omnibat-bar> (omnibat-bar.js) : les éléments que le module y place gardent l'aspect de la barre */
omnibat-bar { display: block; position: sticky; top: 0; z-index: 20; min-height: var(--ob-bar-h); background: var(--ob-head); color: #fff; font: 13px/1.35 var(--ob-font); }
omnibat-bar .ob-btn { background: var(--ob-head-2); border-color: var(--ob-head-line); color: #fff; }
omnibat-bar .ob-btn:hover { border-color: #56617a; }
omnibat-bar .ob-btn.ob-primary { background: var(--ob-accent); border-color: var(--ob-accent); }
omnibat-bar .ob-btn[aria-pressed="true"] { background: var(--ob-head-line); border-color: #56617a; font-weight: 600; }
omnibat-bar .ob-dim { color: var(--ob-head-muted); }
/* Choix du module (non utilisé pour l'instant : pas de modules dans la barre du haut) */
.ob-mods { display: inline-flex; border: 1px solid var(--ob-head-line); border-radius: 7px; overflow: hidden; flex: none; }
.ob-mods a, .ob-mods button { padding: 5px 11px; background: var(--ob-head-2); color: var(--ob-head-muted); border: 0; font: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; }
.ob-mods > * + * { border-left: 1px solid var(--ob-head-line) !important; }
.ob-mods .ob-on { background: var(--ob-head-line); color: #fff; font-weight: 600; }
.ob-mods a:hover, .ob-mods button:hover { color: #fff; }
.ob-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ob-head-line); color: #fff; display: grid; place-items: center; font: 600 11px var(--ob-font); border: 0; cursor: pointer; flex: none; }
@media (max-width: 640px) { .ob-bar { gap: 6px; padding: 0 8px; } .ob-bar .ob-hide-narrow { display: none; } }

/* ---------- 3. Boutons, champs, groupes ---------- */
.ob-btn { display: inline-flex; align-items: center; gap: 6px; font: 13px/1.35 var(--ob-font); padding: 5px 10px; border: 1px solid var(--ob-line); border-radius: var(--ob-radius); background: var(--ob-panel); color: var(--ob-text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.ob-btn:hover { border-color: #aab1bc; }
.ob-btn.ob-primary { background: var(--ob-accent); border-color: var(--ob-accent); color: #fff; }
.ob-btn.ob-primary:hover { background: var(--ob-accent-hover); }
.ob-btn.ob-danger { color: var(--ob-danger); }
.ob-btn:disabled { opacity: .45; cursor: default; }
.ob-btn:focus-visible, .ob-field:focus-visible, .ob-mods > *:focus-visible, .ob-avatar:focus-visible { outline: 2px solid var(--ob-accent); outline-offset: 1px; }
.ob-field { font: 13px/1.35 var(--ob-font); padding: 6px 8px; border: 1px solid var(--ob-line); border-radius: 5px; background: var(--ob-panel); color: var(--ob-text); min-width: 0; }
.ob-field:focus { outline: none; border-color: var(--ob-accent); box-shadow: 0 0 0 2px var(--ob-accent-weak); }
.ob-label { display: flex; flex-direction: column; gap: 4px; color: var(--ob-muted); font: 12.5px var(--ob-font); }
.ob-seg { display: inline-flex; border: 1px solid var(--ob-line); border-radius: 7px; overflow: hidden; background: var(--ob-panel); }
.ob-seg button { border: 0; background: none; font: 13px var(--ob-font); color: var(--ob-text); padding: 5px 11px; cursor: pointer; }
.ob-seg button + button { border-left: 1px solid var(--ob-line); }
.ob-seg button.ob-on { background: var(--ob-accent-weak); color: var(--ob-accent); font-weight: 600; }
.ob-link { border: 0; background: none; padding: 0; font: inherit; color: var(--ob-accent); cursor: pointer; text-decoration: none; }
.ob-link:hover { text-decoration: underline; }

/* ---------- 4. Panneaux et listes ---------- */
.ob-panel { background: var(--ob-panel); border: 1px solid var(--ob-line); border-radius: var(--ob-radius-lg); }
.ob-list { background: var(--ob-panel); border: 1px solid var(--ob-line); border-radius: var(--ob-radius-lg); overflow: hidden; list-style: none; margin: 0; padding: 0; }
.ob-list > li + li { border-top: 1px solid var(--ob-line); }
.ob-h2 { font: 600 12px var(--ob-font); text-transform: uppercase; letter-spacing: .05em; color: var(--ob-muted); margin: 0; }
.ob-muted { color: var(--ob-muted); }
.ob-empty { color: var(--ob-muted); font-style: italic; padding: 18px; text-align: center; }
.ob-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ob-line); border-radius: var(--ob-radius); padding: 2px 8px; font: 12px var(--ob-font); background: var(--ob-panel); color: var(--ob-text); text-decoration: none; white-space: nowrap; cursor: pointer; }
.ob-chip:hover { border-color: var(--ob-accent); }
.ob-chip b { font-weight: 600; }
.ob-chip .ob-dot { width: 7px; height: 7px; border-radius: 2px; }
.ob-chip.ob-off { color: var(--ob-muted); border-style: dashed; }
.ob-faces { display: flex; }
.ob-faces span { width: 22px; height: 22px; border-radius: 50%; background: #e5e7eb; color: #374151; border: 2px solid var(--ob-panel); display: grid; place-items: center; font: 700 9.5px var(--ob-font); margin-left: -5px; }

/* ---------- 5. Fenêtre, menu, message ---------- */
.ob-modal-bg { position: fixed; inset: 0; background: rgba(15, 20, 30, .45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.ob-modal { background: var(--ob-panel); border-radius: var(--ob-radius-lg); padding: 18px 20px; width: min(460px, 100%); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); display: flex; flex-direction: column; gap: 12px; font: 13px/1.4 var(--ob-font); color: var(--ob-text); }
.ob-modal h3 { margin: 0; font-size: 15px; }
.ob-modal .ob-row { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ob-menu-wrap { position: relative; }
.ob-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--ob-panel); color: var(--ob-text); border: 1px solid var(--ob-line); border-radius: 8px; box-shadow: 0 8px 28px rgba(0, 0, 0, .18); padding: 4px; min-width: 210px; display: flex; flex-direction: column; font: 13px var(--ob-font); }
.ob-menu .ob-who { padding: 6px 9px 8px; border-bottom: 1px solid var(--ob-line); margin-bottom: 4px; color: var(--ob-muted); font-size: 12px; }
.ob-menu .ob-who b { display: block; color: var(--ob-text); font-size: 13px; }
.ob-menu a, .ob-menu button { text-align: left; padding: 6px 9px; border-radius: 5px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-decoration: none; }
.ob-menu a:hover, .ob-menu button:hover { background: var(--ob-accent-weak); }
.ob-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ob-head); color: #fff; padding: 8px 14px; border-radius: var(--ob-radius); z-index: 60; max-width: calc(100vw - 32px); font: 13px var(--ob-font); }

/* ---------- 6. Connexion ---------- */
.ob-auth { min-height: 100vh; background: var(--ob-bg); display: grid; place-items: start center; padding: 12vh 16px 32px; font: 13px/1.4 var(--ob-font); color: var(--ob-text); }
.ob-auth form { width: min(380px, 100%); background: var(--ob-panel); border-radius: var(--ob-radius-lg); border: 1px solid var(--ob-line); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.ob-auth .ob-brand { color: var(--ob-text); font-size: 17px; }
.ob-auth h1 { margin: 0; font-size: 16px; }
.ob-auth .ob-field { padding: 7px 9px; font-size: 14px; }
.ob-auth .ob-btn { justify-content: center; padding: 7px 10px; }
.ob-auth .ob-links { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ob-error { color: var(--ob-danger); margin: 0; }
.ob-notice { margin: 0; padding: 9px 11px; border: 1px solid var(--ob-accent); border-radius: 8px; background: var(--ob-accent-weak); }
