/* ERP IFA CONSEIL — identité visuelle neutre provisoire */
:root { --brand: #1f4e79; --sidebar-w: 258px; }
body { background: #f4f6f9; font-size: .95rem; }
.skip-link { position: absolute; z-index: 2000; top: .5rem; left: .5rem; background: #fff; padding: .5rem 1rem; }
.app-shell { display: flex; min-height: 100vh; }
/* Bootstrap force « background-color: transparent !important » sur .offcanvas-lg en grand écran :
   on impose la couleur du menu, sinon le texte blanc se retrouve sur fond blanc. */
.sidebar, .sidebar.offcanvas-lg { width: var(--sidebar-w); background-color: var(--brand) !important; color: #fff; flex-shrink: 0; }
@media (min-width: 992px) {
  .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
.sidebar-brand { padding: 1rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.15); font-size: 1.05rem; }
.sidebar-nav { padding: .5rem 0 2rem; width: 100%; }
.sidebar-section { text-transform: uppercase; font-size: .7rem; letter-spacing: .06em; opacity: .7; padding: .9rem 1.1rem .3rem; }
.sidebar-link { display: flex; gap: .65rem; align-items: center; color: rgba(255,255,255,.92); text-decoration: none; padding: .42rem 1.1rem; border-left: 3px solid transparent; }
.sidebar-link:hover, .sidebar-link:focus { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-link.active { background: rgba(255,255,255,.18); border-left-color: #ffc107; color: #fff; font-weight: 600; }
.sidebar-link .bi { width: 1.1rem; text-align: center; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; padding: .6rem 1rem; border-bottom: 1px solid #dee2e6; position: sticky; top: 0; z-index: 1020; }
.search-form { max-width: 560px; }
.content { padding: 1.25rem; flex: 1; }
.content:focus { outline: none; }
.app-footer { padding: .75rem 1.25rem; border-top: 1px solid #e3e6ea; background: #fff; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.35rem; margin: 0; }
.card { border: 1px solid #e3e6ea; }
.card-header { background: #fff; font-weight: 600; }
.kpi { border-left: 4px solid var(--brand); transition: transform .1s; display: block; color: inherit; text-decoration: none; }
.kpi:hover, .kpi:focus { transform: translateY(-2px); box-shadow: 0 .25rem .75rem rgba(0,0,0,.08); color: inherit; }
.kpi .kpi-value { font-size: 1.35rem; font-weight: 700; }
.kpi .kpi-label { color: #5c6670; font-size: .85rem; }
.kpi.kpi-danger { border-left-color: #c0392b; } .kpi.kpi-success { border-left-color: #1e8449; } .kpi.kpi-warning { border-left-color: #d68910; }
.table thead th { background: #f1f3f6; font-weight: 600; white-space: nowrap; font-size: .85rem; }
.table td { vertical-align: middle; }
.table-actions { white-space: nowrap; text-align: right; }
.amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { filter: brightness(1.1); background: var(--brand); border-color: var(--brand); }
.form-label { font-weight: 500; margin-bottom: .25rem; }
.form-label .req { color: #c0392b; }
.form-text { font-size: .8rem; }
.dl-grid { display: grid; grid-template-columns: minmax(140px, 35%) 1fr; gap: .35rem 1rem; margin: 0; }
.dl-grid dt { color: #5c6670; font-weight: 500; }
.dl-grid dd { margin: 0; word-break: break-word; }
.auth-body { background: linear-gradient(135deg, var(--brand), #0d2238); min-height: 100vh; }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 3rem 1rem; color: #fff; }
.auth-wrap.auth-wide { max-width: 860px; }
.auth-wrap .card { color: #212529; }
.auth-logo { width: 64px; height: 64px; border-radius: 16px; background: rgba(255,255,255,.15); display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; }
.filter-bar { background: #fff; border: 1px solid #e3e6ea; border-radius: .5rem; padding: .75rem; margin-bottom: 1rem; }
.select-filter { margin-bottom: .25rem; }
.timeline { list-style: none; padding-left: 0; margin: 0; }
.timeline li { border-left: 2px solid #dee2e6; padding: 0 0 .75rem 1rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.calendar { table-layout: fixed; }
.calendar td { height: 105px; vertical-align: top; font-size: .8rem; }
.calendar .day-num { font-weight: 600; }
.calendar .today { background: #fff8e1; }
.calendar .ev { display: block; background: #e8f0fb; border-radius: .25rem; padding: 1px 4px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perm-matrix th, .perm-matrix td { font-size: .85rem; }
.progress { height: .6rem; }
.money-input { text-align: right; }

/* Page d'accueil pour débutants : gros boutons d'action et tuiles d'icônes */
.home-title { font-size: 1.1rem; font-weight: 700; margin: .25rem 0 .75rem; }
.home-section { text-transform: uppercase; font-size: .75rem; letter-spacing: .06em; color: #5c6670; font-weight: 600; margin: .25rem 0 .4rem; }
.action-btn { display: flex; align-items: center; gap: .9rem; min-height: 84px; height: 100%; padding: .9rem 1rem; border-radius: .75rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; box-shadow: 0 .15rem .4rem rgba(0,0,0,.12); transition: transform .1s, filter .1s; }
.action-btn:hover, .action-btn:focus { color: #fff; transform: translateY(-2px); filter: brightness(1.08); }
.action-btn .bi { font-size: 2.1rem; line-height: 1; flex-shrink: 0; }
.action-btn small { display: block; font-weight: 400; font-size: .82rem; opacity: .92; }
.action-brand { background: var(--brand); }
.action-success { background: #1e7b45; }
.action-danger { background: #b02a37; }
.action-warning { background: #a8550f; }
.action-info { background: #0b6577; }
.home-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .25rem; height: 100%; min-height: 118px; padding: .9rem .5rem; background: #fff; border: 1px solid #e3e6ea; border-radius: .75rem; color: #212529; text-decoration: none; transition: transform .1s, box-shadow .1s; }
.home-tile:hover, .home-tile:focus { transform: translateY(-2px); box-shadow: 0 .35rem .9rem rgba(0,0,0,.09); color: #212529; border-color: var(--brand); }
.home-tile .bi { font-size: 2.1rem; color: var(--brand); line-height: 1.1; }
.home-tile-label { font-weight: 600; font-size: .92rem; }
.home-tile-desc { font-size: .76rem; color: #5c6670; line-height: 1.25; }

/* Logo de l'entreprise */
.sidebar-logo { max-height: 40px; max-width: 120px; background: #fff; border-radius: .35rem; padding: 2px 4px; object-fit: contain; }
.auth-logo-img { max-height: 90px; max-width: 220px; background: #fff; border-radius: .75rem; padding: 6px 10px; object-fit: contain; }
.settings-logo { max-height: 90px; max-width: 240px; border: 1px solid #e3e6ea; border-radius: .5rem; padding: 6px; background: #fff; }
@media (max-width: 575.98px) {
  .content { padding: .75rem; }
  .page-head h1 { font-size: 1.15rem; }
  .table-responsive-stack td { display: block; }
}
@media print {
  .sidebar, .topbar, .app-footer, .no-print, .btn, form.filter-bar, .pagination, .alert { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .content { padding: 0; }
  .card { border: none; }
  a { color: #000; text-decoration: none; }
}
