/* ═══════════════════════════════════════════════════════════════════
   DTISoft — Informations société / points de vente  (namespace `si-`)

   z-index 11500 : cet écran s'ouvre depuis la TOOLBAR globale, donc
   potentiellement par-dessus une fiche (dd- 1200) ou la fenêtre Historique
   (au- 9000). Il reste SOUS la visionneuse de classeurs (fx- 11800) et
   très en dessous du verrou de session (2147483000), qui doit garder le
   dernier mot.
   ═══════════════════════════════════════════════════════════════════ */

/* Garde-fou § 7.41 : `[hidden]` est posé par la feuille du NAVIGATEUR en
   (0,1,0) et perd contre toute classe qui déclare `display`. Cette règle est
   en (0,2,0) : elle repasse devant, y compris pour les classes à venir. */
.si-overlay [hidden] { display: none; }

.si-overlay {
    position: fixed; inset: 0; z-index: 11500;
    background: rgba(15, 23, 42, .55);
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.si-box {
    background: #fff; border-radius: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
    width: 900px; max-width: 100%; max-height: 90vh;
    display: flex; flex-direction: column; font-size: 13px; color: #1e293b;
}

.si-head {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid #e5e7eb;
    background: #f8fafc; border-radius: 10px 10px 0 0;
}
.si-title { font-weight: 600; font-size: 14px; flex: 0 0 auto; }
.si-title i { color: #2563eb; margin-right: 7px; }
/* `min-width:0` : sans lui un conteneur flex refuse de se comprimer sous la
   largeur de son contenu et pousse la croix hors de la boîte (piège § 7.32). */
.si-head-actions { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; gap: 8px; }
.si-close {
    border: 0; background: transparent; font-size: 24px; line-height: 1;
    color: #94a3b8; cursor: pointer; padding: 0 4px; flex: 0 0 auto;
}
.si-close:hover { color: #ef4444; }

.si-body { overflow: auto; padding: 14px 16px; flex: 1 1 auto; }

/* ── Onglets (un par PDV) ───────────────────────────────────────── */
.si-tabs {
    display: flex; flex-wrap: wrap; gap: 6px;
    border-bottom: 1px solid #e5e7eb; padding-bottom: 9px; margin-bottom: 12px;
}
.si-tab {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid #e2e8f0; background: #fff; color: #334155;
    border-radius: 7px; padding: 6px 13px; font-size: 12.5px; cursor: pointer;
    font-weight: 600;
}
.si-tab:hover { background: #f1f5f9; }
.si-tab-actif { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.si-tab-add { font-weight: 400; color: #16a34a; border-color: #bbf7d0; }
.si-tab-add:hover { background: #f0fdf4; }
.si-tab-new { border-color: #16a34a; background: #f0fdf4; color: #166534; }
/* Repère « session » : c'est CE point de vente qui alimente les {Company…}
   des e-mails partant de ce poste. Sans marque, on modifie un site en croyant
   en modifier un autre. */
.si-tab-session {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
    background: #2563eb; color: #fff; border-radius: 10px; padding: 1px 7px;
}

/* ── Bandeaux d'information ─────────────────────────────────────── */
.si-note {
    margin: 0 0 12px; font-size: 12px; line-height: 1.5; color: #475569;
    background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 7px; padding: 8px 11px;
}
.si-note i { color: #0284c7; margin-right: 6px; }
.si-note-new { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.si-note-new i { color: #16a34a; }
.si-ro {
    margin: 0 0 12px; font-size: 12px; color: #92400e;
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 7px; padding: 8px 11px;
}
.si-ro i { margin-right: 6px; }
.si-vide { padding: 30px 10px; text-align: center; color: #64748b; }
.si-vide i { margin-right: 6px; color: #f59e0b; }

/* ── Groupes de champs ──────────────────────────────────────────── */
.si-grp {
    border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px 12px;
    margin: 0 0 12px; min-width: 0;
}
.si-grp legend {
    font-size: 11.5px; font-weight: 700; color: #475569;
    text-transform: uppercase; letter-spacing: .4px; padding: 0 6px;
}
.si-grp legend i { color: #94a3b8; margin-right: 5px; }
.si-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 14px; }
.si-fld { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.si-lbl { font-size: 11.5px; font-weight: 600; color: #64748b; }
.si-fld input[type="text"] {
    border: 1px solid #cbd5e1; border-radius: 6px; padding: 6px 9px;
    font-size: 12.5px; width: 100%; box-sizing: border-box; color: #1e293b;
}
.si-fld input[type="text"]:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.si-fld input:disabled { background: #f8fafc; color: #64748b; cursor: not-allowed; }
/* Zone multiligne (horaires d'ouverture, 2026-10-06) : pleine largeur de la grille. */
.si-fld-zone { grid-column: 1 / -1; }
.si-fld textarea {
    border: 1px solid #cbd5e1; border-radius: 6px; padding: 6px 9px; font: inherit;
    font-size: 12.5px; line-height: 1.45; width: 100%; box-sizing: border-box; color: #1e293b; resize: vertical;
}
.si-fld textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.si-fld textarea:disabled { background: #f8fafc; color: #64748b; cursor: not-allowed; }
.si-aide { font-size: 10.5px; color: #94a3b8; line-height: 1.35; }

.si-ck { display: flex; align-items: center; gap: 7px; font-size: 12.5px; margin: 2px 0 6px; cursor: pointer; }

/* ── Pied ───────────────────────────────────────────────────────── */
.si-foot {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 16px; border-top: 1px solid #e5e7eb; background: #f8fafc;
    border-radius: 0 0 10px 10px;
}
.si-msg { font-size: 12.5px; color: #64748b; flex: 1 1 auto; min-width: 0; }
.si-msg-ok  { color: #166534; }
.si-msg-err { color: #b91c1c; }
.si-actions { display: flex; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.si-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid #cbd5e1; background: #fff; color: #334155;
    border-radius: 6px; padding: 6px 14px; font-size: 12.5px; cursor: pointer;
}
.si-btn:hover:not(:disabled) { background: #f1f5f9; }
.si-btn:disabled { opacity: .5; cursor: not-allowed; }
.si-btn-go { background: #2563eb; border-color: #2563eb; color: #fff; }
.si-btn-go:hover:not(:disabled) { background: #1d4ed8; }

@media (max-width: 700px) {
    .si-overlay { padding: 8px; }
    .si-grid { grid-template-columns: 1fr; }
}
