/* Container */
.velgi-container { max-width: 920px; margin: 20px auto; padding: 0 12px; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }

/* Head */
.velgi-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.velgi-head h2 { margin:0; font-size:22px; color:#000; }
.velgi-imm-meta { color:#555; font-size:13px; }

/* Tabs */
.velgi-tabs { display:flex; gap:8px; margin-bottom:16px; }
.velgi-tab { padding:8px 14px; border:1px solid #e7e7e7; border-radius:999px; text-decoration:none; color:#111; }
.velgi-tab.active { background:#7f38ec; color:#fff; border-color:#7f38ec; }

/* Notices / Alerts */
.velgi-notice { padding:10px 12px; border-radius:10px; margin:10px 0; }
.velgi-notice.success { background:#e9f8ef; color:#116b2e; border:1px solid #cfeedd; }
.velgi-notice.error { background:#fdeeee; color:#8a1522; border:1px solid #f4c9cf; }
.velgi-alert { background:#fff7e6; color:#7a4d00; border:1px solid #ffe0a6; padding:10px 12px; border-radius:10px; }
.velgi-empty { color:#666; margin:14px 0; }

/* Buttons */
.velgi-btn { appearance:none; border:1px solid #ddd; background:#fff; color:#111; padding:8px 12px; border-radius:12px; cursor:pointer; }
.velgi-btn.primary { background:#7f38ec; color:#fff; border-color:#7f38ec; }
.velgi-btn.danger { background:#d92f2f; color:#fff; border-color:#c32828; }
.velgi-btn.danger-outline { background:#fff; color:#d92f2f; border-color:#d92f2f; width:32px; height:32px; border-radius:50%; line-height:1; font-size:18px; }

/* Cards immeubles */
.velgi-list { display:flex; flex-direction:column; gap:12px; }
.velgi-card { position:relative; background:#fff; border:1px solid #eee; border-radius:16px; padding:16px; box-shadow:0 2px 8px rgba(0,0,0,0.04); }
.velgi-imm-card { display:flex; align-items:flex-start; gap:12px; }
.velgi-imm-title { margin:0 0 4px; font-size:18px; color:#000; }
.velgi-imm-desc { margin:8px 0 0; color:#333; }
.velgi-imm-link { position:absolute; inset:0; z-index:1; }
.velgi-imm-del { position:relative; z-index:2; }

/* Grid KPIs simple */
.velgi-grid.kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:16px; }
.kpi { background:#fff; border:1px solid #eee; border-radius:16px; padding:12px; text-align:center; box-shadow:0 2px 8px rgba(0,0,0,0.04); }
.kpi-title { color:#666; font-size:12px; }
.kpi-value { font-size:18px; color:#000; margin-top:6px; }

/* Modales */
.velgi-modal { position:fixed; inset:0; background:rgba(0,0,0,.35); display:none; align-items:center; justify-content:center; padding:16px; z-index:9999; }
.velgi-modal[aria-hidden="false"] { display:flex; }
.velgi-modal-dialog { width:100%; max-width:540px; background:#fff; border-radius:16px; box-shadow:0 10px 30px rgba(0,0,0,.2); overflow:hidden; }
.velgi-modal-head { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid #eee; }
.velgi-modal-head h3 { margin:0; font-size:18px; }
.velgi-modal-head.danger { background:#fff2f2; }
.velgi-modal-close { background:transparent; border:0; font-size:20px; cursor:pointer; }
.velgi-modal-foot { display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }
.velgi-form { padding:14px; }
.velgi-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.velgi-form label { display:block; font-size:13px; color:#222; margin-bottom:8px; }
.velgi-form input[type="text"],
.velgi-form input[type="number"],
.velgi-form textarea,
.velgi-form select { width:100%; border:1px solid #ddd; border-radius:10px; padding:8px 10px; }

/* Code block */
.velgi-code { display:inline-block; background:#f6f6f6; border:1px solid #eee; border-radius:8px; padding:6px 8px; }

/* Étages & Tiles */
.velgi-etage { margin:16px 0; }
.velgi-etage h3 { margin:0 0 8px; font-size:16px; color:#000; }
.velgi-tiles { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; }
@media (min-width: 680px){ .velgi-tiles { grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media (min-width: 960px){ .velgi-tiles { grid-template-columns:repeat(4, minmax(0,1fr)); } }

.velgi-tile { display:block; text-decoration:none; border:1px solid #eee; border-radius:16px; padding:12px; background:#fff; box-shadow:0 2px 8px rgba(0,0,0,0.04); color:#111; }
.velgi-tile .tile-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.velgi-tile .badge { display:inline-block; font-size:12px; background:#f3ecff; color:#7f38ec; padding:4px 8px; border-radius:999px; }
.velgi-tile .ref { font-size:12px; color:#666; }
.velgi-tile .tile-main { display:flex; align-items:center; justify-content:space-between; }
.velgi-tile .tile-occupant { font-weight:600; }
.velgi-tile .tile-loyer { font-size:12px; color:#333; }
.velgi-tile.free { outline:2px solid #e7f6ec; }
.velgi-tile.busy { outline:2px solid #ffe8e8; }
