/* ============================================================
   Patrimonia - App overrides (Hope UI)
   ============================================================ */

:root{
  --pm-radius: 14px;
  --pm-sidebar-width: 260px;      /* largeur sidebar normale */
  --pm-sidebar-mini-width: 86px;  /* largeur sidebar mini */
}

html, body { height: 100%; }

body{
  margin: 0;
  background: #f8fafc;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.wrapper{ min-height: 100vh; }

/* ============================================================
   HOPE UI - Layout spacing (évite superposition content/sidebar)
   ============================================================ */
@media (min-width: 992px){
  .content-page{
    margin-left: var(--pm-sidebar-width);
  }

  /* Quand Hope UI met la sidebar en mini (classe sidebar-mini) */
  aside.sidebar.sidebar-mini ~ .content-page{
    margin-left: var(--pm-sidebar-mini-width);
  }
}

@media (max-width: 991.98px){
  .content-page{ margin-left: 0 !important; }
}

/* ============================================================
   HOPE UI - Sidebar tweaks
   ============================================================ */

/* Menu long : scroll interne */
aside.sidebar .sidebar-body{
  max-height: calc(100vh - 78px);
  overflow-y: auto;
}

/* Liens : arrondis + hover doux */
aside.sidebar .nav-link{
  border-radius: 12px;
}
aside.sidebar .nav-link:hover{
  background: rgba(0,0,0,.04);
}

/* Lien actif : texte + icônes en blanc */
aside.sidebar .nav-link.active,
aside.sidebar .nav-link.active .item-name,
aside.sidebar .nav-link.active i,
aside.sidebar .nav-link.active svg{
  color: #fff !important;
}

/* Sous-menu actif (niveau 2) */
aside.sidebar .collapse .nav-link.active{
  color: #fff !important;
}

/* Mini-sidebar : masquer les libellés */
aside.sidebar.sidebar-mini .sidebar-brand-text,
aside.sidebar.sidebar-mini .item-name{
  display: none !important;
}

/* ============================================================
   Tables / UI helpers
   ============================================================ */
.table td, .table th{ vertical-align: middle; }

.table-responsive{
  background: #fff;
  border-radius: var(--pm-radius);
  border: 1px solid #e5e7eb;
  padding: 10px;
  overflow-x: auto;
}

.pm-avatar{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: rgba(59,130,246,.12);
  color: #2563eb;
}

/* ============================================================
   (OPTIONNEL) Legacy dark sidebar
   -> À remettre UNIQUEMENT si tu as encore des pages qui utilisent
      .app-shell / .app-sidebar (sinon inutile)
   ============================================================ */
/*
.app-shell{ display:flex; min-height:100vh; width:100%; }

.app-sidebar{
  flex: 0 0 var(--pm-sidebar-width);
  width: var(--pm-sidebar-width);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  background: #111827;
  color: #fff;
}

.app-sidebar a,
.app-sidebar a:link,
.app-sidebar a:visited{
  color: rgba(255,255,255,.88) !important;
  text-decoration: none !important;
}

.sidebar-brand{ padding:16px 18px; border-bottom:1px solid rgba(255,255,255,.08); }
.sidebar-menu{ padding:10px 10px 16px; }

.app-sidebar .sidebar-item{
  display:block !important;
  padding:10px 12px;
  border-radius:10px;
  margin:2px 0;
  line-height:1.25;
  white-space: normal;
  word-break: break-word;
}
.app-sidebar .sidebar-item:hover{ background: rgba(255,255,255,.08); color:#fff !important; }
.app-sidebar .sidebar-item.active{ background: rgba(255,255,255,.14); color:#fff !important; }
*/
