/* Accueil (spec §5.1, §5.18.14) : widgets sur deux colonnes, panneaux repliables DIMO ; pastilles d'alerte (§2.2). */
.lg-home { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); align-items: start; }
.lg-home__col { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
@media (max-width: 900px) { .lg-home { grid-template-columns: minmax(0, 1fr); } }

.lg-widget__head { cursor: default; gap: var(--space-2); }
.lg-widget__toggle { flex: 1; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.lg-widget__tools { display: inline-flex; align-items: center; gap: var(--space-2); }
.lg-widget__tool { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: var(--radius); background: transparent; color: inherit; cursor: pointer; }
.lg-widget__tool:hover, .lg-widget__toggle:hover { opacity: .85; }
.lg-widget.is-collapsed .lg-panel__chevron { transform: rotate(-90deg); }
.lg-widget__sub { margin: var(--space-3) 0 var(--space-1); font-size: 13px; font-weight: 600; }
.lg-widget__foot { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; align-items: center; margin: var(--space-2) 0 0; }

/* Cartes par état (Avancement DI / BI) */
.lg-wcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.lg-wcard { display: flex; flex-direction: column; align-items: center; padding: var(--space-2); border-radius: var(--radius); background: var(--tone-info); color: #fff; text-decoration: none; }
.lg .lg-wcard, .lg .lg-wcard:hover { color: #fff; text-decoration: none; }
.lg-wcard:hover { filter: brightness(1.08); }
.lg-wcard--in_progress { background: var(--tone-warning); }
.lg-wcard--done { background: var(--tone-success); }
.lg-wcard--closed { background: #2e7d32; }
.lg-wcard--cancelled { background: var(--tone-neutral); }
.lg-wcard__value { font-size: 22px; font-weight: 700; line-height: 1.2; }
.lg-wcard__label { font-size: 12px; text-align: center; }

/* Listes par date (alertes, planning, non affectées) */
.lg-wday { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-2); padding: 3px 8px; border-radius: var(--radius); background: var(--link, #337ab7); color: #fff; font-weight: 600; }
.lg-wday--today { background: var(--tone-warning); }
.lg-wday__count { min-width: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: var(--text); text-align: center; font-size: 12px; }
.lg-wlist, .lg-events { margin: 0; padding: 0; list-style: none; }
.lg-wline, .lg-event { display: flex; flex-direction: column; gap: 2px; padding: 5px 8px; border-bottom: 1px solid var(--panel-border); border-left: 4px solid var(--tone-neutral); }
.lg-event { border-left: 0; padding-left: 0; display: block; }
.lg-wline__meta, .lg-event__meta { color: var(--text-muted); font-size: 12px; }
.lg-event__meta { display: block; }

/* Menus favoris */
.lg-favs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.lg-fav { display: flex; flex-direction: column; gap: 2px; min-height: 56px; padding: var(--space-2); border: 1px solid var(--panel-border); border-left: 6px solid var(--accent); border-radius: var(--radius); background: var(--bg-panel); text-decoration: none; }
.lg-fav:hover { background: var(--bg-app); }
.lg-fav__label { font-weight: 600; }
.lg-fav__path { color: var(--text-muted); font-size: 12px; }

.lg-wsearch { margin-bottom: var(--space-2); }
.lg-wsearch .lg-input { width: 100%; }

/* Pastilles d'alerte de la topbar (§2.2) */
.lg-alerts { display: inline-flex; gap: 6px; margin-left: var(--space-3); }
.lg-alert-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 12px; background: var(--danger); color: #fff; font-weight: 600; font-size: 12px; text-decoration: none; }
.lg .lg-alert-badge, .lg .lg-alert-badge:hover { color: #fff; text-decoration: none; }
