/* ============================================================
   WIQAYA — Admin (design system)
   UNICEF Mauritanie | PANEOTECH - EfficaSYS
   Refonte visuelle. Conserve tous les noms de classes existants ;
   toutes les pages heritent du nouveau style sans modification.
   ============================================================ */

:root {
  /* Identite Wiqaya (vert) + accent UNICEF (cyan) */
  --wq-green:     #2E7D32;
  --wq-green-d:   #1B5E20;
  --wq-green-700: #2A6E2E;
  --wq-green-50:  #EAF4EB;
  --wq-green-100: #D6E9D8;
  --wq-cyan:      #1CABE2;
  --wq-cyan-50:   #E7F6FC;

  /* Encre & neutres */
  --ink:    #14271C;
  --ink-2:  #43544A;
  --muted:  #788A80;
  --bg:     #F2F5F2;
  --surface:#FFFFFF;
  --line:   #E1E8E2;
  --line-2: #EDF1ED;

  /* Statuts */
  --amber:    #C97B0A;
  --amber-bg: #FBEFD7;
  --red:      #C5453F;
  --red-bg:   #FBE7E6;
  --grey:     #6B7A71;
  --grey-bg:  #ECF0ED;

  --radius:   14px;
  --radius-sm:9px;
  --shadow:   0 1px 2px rgba(16,40,26,.05), 0 6px 22px rgba(16,40,26,.06);
  --shadow-sm:0 1px 2px rgba(16,40,26,.06);
  --sb-w:     250px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

a { color: var(--wq-green-700); text-decoration: none; }
a:hover { color: var(--wq-green-d); }

/* ---------- Coque applicative ---------- */
.app-shell { display: flex; min-height: 100vh; }
.main-col  { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.content {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.6rem 1.9rem 3rem;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -.015em;
  color: var(--ink);
  margin: .2rem 0 1.4rem;
}

/* ---------- Barre superieure (mobile) ---------- */
.topbar {
  display: none;
  align-items: center;
  gap: .75rem;
  height: 56px;
  padding: 0 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar-brand { font-weight: 700; letter-spacing: -.01em; }
.nav-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  width: 38px; height: 38px; border-radius: 10px;
  font-size: 1.15rem; line-height: 1; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--wq-green-50); border-color: var(--wq-green-100); }

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sb-w);
  flex: 0 0 var(--sb-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  padding: 1.1rem .85rem;
}
.sidebar .brand {
  display: flex; align-items: center; gap: .6rem;
  padding: .25rem .35rem .15rem;
  margin-bottom: .25rem;
}
.sidebar .brand .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(145deg, var(--wq-green) 0%, var(--wq-green-d) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: -.03em;
  box-shadow: 0 2px 8px rgba(46,125,50,.35);
}
.sidebar .brand .brand-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--wq-green);
}
.sidebar .brand .wordmark { line-height: 1.05; }
.sidebar .brand .wordmark strong { font-size: 1.12rem; letter-spacing: -.02em; color: var(--ink); display: block; }
.sidebar .brand .wordmark small { font-size: .68rem; color: var(--muted); letter-spacing: .02em; }

.nav-scroll { flex: 1 1 auto; overflow-y: auto; margin-top: .4rem; padding-right: 2px; }
.nav-scroll::-webkit-scrollbar { width: 7px; }
.nav-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 7px; }

.sidebar .nav-section {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
  margin: 1rem .55rem .3rem;
}
.sidebar .nav-section:first-child { margin-top: .2rem; }

.sidebar .nav-link {
  display: flex; align-items: center; gap: .1rem;
  color: var(--ink-2); border-radius: 10px;
  padding: .5rem .6rem; font-size: .925rem; font-weight: 500;
  margin-bottom: 1px; transition: background .12s ease, color .12s ease;
}
.sidebar .nav-link .ico {
  width: 1.5rem; text-align: center; margin-right: .35rem;
  font-size: 1rem; opacity: .92;
}
.sidebar .nav-link:hover { background: var(--wq-green-50); color: var(--wq-green-d); }
.sidebar .nav-link.active {
  background: var(--wq-green); color: #fff;
  box-shadow: 0 2px 10px rgba(46,125,50,.28);
}
.sidebar .nav-link.active .ico { opacity: 1; }

.side-foot { border-top: 1px solid var(--line-2); padding-top: .7rem; margin-top: .4rem; }
.side-foot .who { font-size: .82rem; color: var(--ink-2); padding: 0 .5rem .35rem; }
.side-foot .who .role {
  display: inline-block; margin-top: .15rem; font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--wq-green-d); background: var(--wq-green-50);
  border-radius: 6px; padding: .08rem .4rem;
}
.side-foot .logout {
  display: flex; align-items: center; gap: .45rem;
  color: var(--ink-2); font-size: .9rem; padding: .45rem .6rem; border-radius: 10px;
}
.side-foot .logout:hover { background: var(--red-bg); color: var(--red); }

.sidebar-backdrop {
  display: none; position: fixed; inset: 0; z-index: 35;
  background: rgba(16,30,22,.42);
}

/* ---------- Typo de contenu ---------- */
h1, h2, h3, h4, h5 { color: var(--ink); }
h2.h5, .h5 { font-weight: 700; letter-spacing: -.01em; }
.text-muted { color: var(--muted) !important; }
code {
  background: var(--grey-bg); color: var(--ink-2);
  padding: .08rem .35rem; border-radius: 6px; font-size: .86em;
}
pre {
  background: #102017; color: #D9E8DC;
  border-radius: var(--radius-sm); border: 1px solid #1c3424;
}
pre code { background: transparent; color: inherit; padding: 0; }

/* ---------- Boutons ---------- */
.btn { border-radius: 10px; font-weight: 600; letter-spacing: -.005em; }
.btn-sm { border-radius: 8px; }
.btn-green {
  background: var(--wq-green); border: 1px solid var(--wq-green);
  color: #fff; box-shadow: 0 1px 2px rgba(46,125,50,.25);
}
.btn-green:hover { background: var(--wq-green-d); border-color: var(--wq-green-d); color: #fff; }
.btn-green:active { transform: translateY(.5px); }
.btn-outline-green {
  border: 1px solid var(--wq-green-100); color: var(--wq-green-d); background: var(--surface);
}
.btn-outline-green:hover { background: var(--wq-green); border-color: var(--wq-green); color: #fff; }
.btn:focus-visible, .nav-link:focus-visible, .form-control:focus-visible, .nav-toggle:focus-visible {
  outline: 2px solid var(--wq-cyan); outline-offset: 1px;
}

/* ---------- Cartes (Bootstrap .card) ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line-2);
  font-weight: 650; letter-spacing: -.005em;
  padding: .85rem 1.1rem;
}
.card-body { padding: 1.1rem; }

/* ---------- Stat cards (dashboard) ---------- */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, transform .15s ease;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-card .num {
  font-size: 1.95rem; font-weight: 780; line-height: 1.1;
  color: var(--wq-green-d); font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.stat-card .num.text-warning { color: var(--amber) !important; }
.stat-card .num.text-secondary { color: var(--grey) !important; }
.stat-card .lbl { font-size: .82rem; color: var(--muted); margin-top: .1rem; }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; color: var(--ink); margin-bottom: 0; }
.table thead th {
  font-size: .73rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .045em; color: var(--muted);
  border-bottom: 1px solid var(--line); padding: .7rem .9rem; background: var(--line-2);
}
.table tbody td { padding: .72rem .9rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--wq-green-50); }
.card > .table:first-child thead th:first-child { border-top-left-radius: var(--radius); }
.card > .table:first-child thead th:last-child  { border-top-right-radius: var(--radius); }
.card > .table tbody tr:last-child td { border-bottom: none; }

/* ---------- Badges & statuts (pilules douces) ---------- */
.badge { font-weight: 600; letter-spacing: .01em; border-radius: 7px; padding: .34em .6em; }
.badge.bg-secondary { background: var(--grey-bg) !important; color: var(--ink-2) !important; }
.badge.st-p { background: var(--wq-green-50); color: var(--wq-green-d); }
.badge.st-r { background: var(--amber-bg); color: var(--amber); }
.badge.st-d { background: var(--grey-bg);  color: var(--grey); }
.badge.bg-danger  { background: var(--red-bg) !important;  color: var(--red) !important; }
.badge.bg-warning { background: var(--amber-bg) !important; color: var(--amber) !important; }

/* Pastille couleur (categories / tags) */
.cdot {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  vertical-align: -2px; margin-right: 6px; border: 1px solid rgba(0,0,0,.12);
}

/* ---------- Formulaires ---------- */
.form-control, .form-select {
  border: 1px solid var(--line); border-radius: 9px; color: var(--ink);
  padding: .5rem .7rem; background: var(--surface);
}
.form-control:focus, .form-select:focus {
  border-color: var(--wq-green); box-shadow: 0 0 0 3px var(--wq-green-50);
}
.form-control::placeholder { color: #A8B4AC; }
.form-label { font-weight: 600; font-size: .86rem; color: var(--ink-2); margin-bottom: .3rem; }
[dir="rtl"] textarea, [dir="rtl"] input[type="text"] { text-align: right; }

/* ---------- Onglets multilingues ---------- */
.lang-tabs { border-bottom: 1px solid var(--line); gap: .15rem; }
.lang-tabs .nav-link {
  font-size: .85rem; font-weight: 600; color: var(--muted);
  border: none; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0;
  padding: .45rem .8rem;
}
.lang-tabs .nav-link:hover { color: var(--wq-green-d); background: var(--wq-green-50); }
.lang-tabs .nav-link.active { color: var(--wq-green-d); background: transparent; border-bottom-color: var(--wq-green); }
.lang-tabs .nav-link .native { color: var(--muted); font-size: .78rem; font-weight: 500; }
.lang-tabs .nav-link.has-content::after { content: " ●"; color: var(--wq-green); font-size: .7em; vertical-align: 2px; }

/* ---------- Modales — en-tete vert ---------- */
.modal-content { border: none; border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 48px rgba(16,40,26,.22); }
.mh-g { background: var(--wq-green); color: #fff; }
.mh-g .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }

/* ---------- Matrice traductions ---------- */
.matrix-cell-ok   { background: var(--wq-green-100); }
.matrix-cell-part { background: var(--amber-bg); }
.matrix-cell-none { background: var(--red-bg); }

/* ---------- Alertes ---------- */
.alert { border: 1px solid transparent; border-radius: var(--radius-sm); }
.alert-success { background: var(--wq-green-50); border-color: var(--wq-green-100); color: var(--wq-green-d); }
.alert-danger  { background: var(--red-bg); border-color: #F1C9C7; color: var(--red); }
.alert-info    { background: var(--wq-cyan-50); border-color: #BDE7F5; color: #0E6E94; }
.alert-warning { background: var(--amber-bg); border-color: #F2D9A8; color: var(--amber); }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 500px at 50% -10%, #E8F3E9 0%, var(--bg) 55%);
}
.login-card {
  width: 390px; max-width: 92vw; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; padding: 2.1rem;
  box-shadow: 0 10px 40px rgba(16,40,26,.10);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .topbar { display: flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 40; height: 100vh;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 6px 0 30px rgba(16,40,26,.16);
  }
  .app-shell.nav-open .sidebar { transform: translateX(0); }
  .app-shell.nav-open .sidebar-backdrop { display: block; }
  .content { padding: 1.1rem 1.1rem 2.5rem; }
  .page-title { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   Page de connexion — design premium deux volets
   (classes dediees, n'affecte aucune autre page)
   ============================================================ */
.auth { background: var(--surface); }
.auth-split { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }

/* --- Volet gauche : marque, fond sombre --- */
.auth-brand {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 3rem 3.4rem;
  color: #EAF3EC;
  background:
    radial-gradient(900px 520px at 18% -5%, rgba(28,171,226,.16) 0%, transparent 55%),
    radial-gradient(700px 600px at 100% 110%, rgba(46,125,50,.30) 0%, transparent 55%),
    linear-gradient(158deg, #0E2A16 0%, #0A1F11 100%);
}
.auth-brand::after {
  content: ""; position: absolute; right: -120px; top: 50%; transform: translateY(-50%);
  width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.05); box-shadow: 0 0 0 60px rgba(255,255,255,.02);
  pointer-events: none;
}
.auth-brand-top { display: flex; align-items: center; gap: .75rem; position: relative; z-index: 1; }
.auth-mark { width: 46px; height: 46px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.auth-org { font-size: .74rem; letter-spacing: .04em; color: rgba(234,243,236,.72); }

.auth-hero { position: relative; z-index: 1; margin: auto 0; max-width: 460px; }
.auth-hero h1 { font-size: 3.1rem; font-weight: 800; letter-spacing: -.03em; margin: 0; color: #fff; }
.auth-tag { color: #5BC6EE; font-weight: 600; font-size: 1.05rem; margin: .35rem 0 1rem; }
.auth-desc { color: rgba(234,243,236,.80); font-size: .96rem; line-height: 1.6; margin-bottom: 1.8rem; }
.auth-features { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.auth-feature {
  display: flex; gap: .65rem; align-items: flex-start;
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.09);
  border-radius: 13px; padding: .8rem .85rem;
}
.auth-feature .af-ico { font-size: 1.2rem; line-height: 1; }
.auth-feature strong { display: block; font-size: .9rem; color: #fff; font-weight: 650; }
.auth-feature small { color: rgba(234,243,236,.65); font-size: .76rem; }

.auth-foot { position: relative; z-index: 1; display: flex; gap: 2.4rem; align-items: flex-end; flex-wrap: wrap; }
.auth-credit { display: flex; flex-direction: column; gap: .4rem; }
.auth-credit-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(234,243,236,.55); }
.auth-logochip {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 9px; padding: .5rem .7rem; height: 40px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); transition: transform .15s ease;
}
.auth-logochip:hover { transform: translateY(-1px); }
.auth-logochip img { height: 20px; width: auto; display: block; }

/* --- Volet droit : formulaire --- */
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--surface); }
.auth-form-inner { width: 100%; max-width: 384px; }
.auth-lang {
  display: inline-flex; gap: .15rem; padding: .25rem; margin-bottom: 2.2rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
}
.auth-lang button {
  border: none; background: transparent; cursor: pointer;
  font-size: .82rem; font-weight: 600; color: var(--ink-2);
  padding: .35rem .9rem; border-radius: 999px;
}
.auth-lang button.active { background: var(--wq-green-d); color: #fff; }
.auth-welcome { font-size: 2rem; font-weight: 780; letter-spacing: -.02em; margin: 0 0 .25rem; }
.auth-sub { color: var(--muted); margin-bottom: 1.8rem; }
.auth-label { display: block; font-size: .82rem; font-weight: 650; color: var(--ink-2); margin: 0 0 .4rem; }
.auth-input {
  width: 100%; border: 1px solid var(--line); border-radius: 11px;
  padding: .8rem .9rem; font-size: .95rem; margin-bottom: 1.2rem; background: var(--surface); color: var(--ink);
}
.auth-input:focus { outline: none; border-color: var(--wq-green); box-shadow: 0 0 0 3px var(--wq-green-50); }
.auth-forgot { display: block; text-align: right; font-size: .82rem; font-weight: 600; margin: -.6rem 0 1.4rem; }
.auth-submit {
  width: 100%; border: none; cursor: pointer;
  background: linear-gradient(180deg, #2E7D32 0%, #1B5E20 100%);
  color: #fff; font-size: .98rem; font-weight: 700; letter-spacing: -.005em;
  padding: .85rem 1rem; border-radius: 11px;
  box-shadow: 0 6px 18px rgba(27,94,32,.28); transition: filter .15s ease, transform .1s ease;
}
.auth-submit:hover { filter: brightness(1.06); }
.auth-submit:active { transform: translateY(1px); }
.auth-newacct { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 1.4rem; }
.auth-form-inner[dir="rtl"] .auth-label,
.auth-form-inner[dir="rtl"] .auth-input { text-align: right; }
.auth-form-inner[dir="rtl"] .auth-forgot { text-align: left; }

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { padding: 2rem 1.6rem; }
  .auth-brand::after { display: none; }
  .auth-hero { margin: 1.4rem 0; }
  .auth-hero h1 { font-size: 2.2rem; }
  .auth-features { display: none; }
  .auth-foot { gap: 1.6rem; margin-top: 1rem; }
  .auth-form { padding: 2rem 1.4rem 3rem; }
  .auth-lang { margin-bottom: 1.6rem; }
}

/* Logos partenaires (pied de sidebar) */
.side-partners {
  display: flex; align-items: center; gap: .9rem;
  padding: .7rem .6rem 0; margin-top: .55rem;
  border-top: 1px solid var(--line-2);
}
.side-partners img { height: 15px; width: auto; opacity: .5; transition: opacity .15s ease; }
.side-partners a:hover img { opacity: 1; }

/* ============================================================
   Page de connexion — ajustements (logo plus grand, footer épuré)
   Ces regles, placees en fin de fichier, priment sur les precedentes.
   ============================================================ */
.auth-brand { justify-content: center; }
.auth-logo {
  width: 320px; max-width: 80%; height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 10px 28px rgba(0,0,0,.40));
}
.auth-hero { margin: 0; max-width: 500px; }
.auth-tag { font-size: 1.15rem; }
.auth-desc { font-size: 1rem; max-width: 440px; }

.auth-foot {
  position: absolute; left: 3.4rem; right: 3.4rem; bottom: 2.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.4rem;
}
.auth-logochip { background: #fff; border-radius: 11px; box-shadow: 0 6px 20px rgba(0,0,0,.22); display: inline-flex; align-items: center; }
.auth-chip-unicef { padding: .6rem 1rem; }
.auth-chip-unicef img { height: 38px; width: auto; }
.auth-credit { display: flex; flex-direction: column; gap: .35rem; align-items: flex-end; }
.auth-credit-label { color: rgba(234,243,236,.6); }
.auth-chip-paneo { padding: .42rem .7rem; }
.auth-chip-paneo img { height: 18px; width: auto; }

@media (max-width: 900px) {
  .auth-brand { padding-bottom: 7.5rem; }
  .auth-logo { width: 230px; margin-bottom: 1rem; }
  .auth-foot { left: 1.6rem; right: 1.6rem; bottom: 1.4rem; }
  .auth-chip-unicef img { height: 28px; }
  .auth-chip-paneo img { height: 15px; }
}

/* ============================================================
   Login : UNICEF en haut (grand) / PANEOTECH en bas (petit)
   + sidebar : UNICEF plus grand que PANEOTECH. (regles finales)
   ============================================================ */
.auth-brand { justify-content: space-between; }
.auth-top { display: flex; }
.auth-unicef {
  display: inline-flex; align-items: center; background: #fff;
  border-radius: 12px; padding: .7rem 1.15rem; box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.auth-unicef img { height: 48px; width: auto; display: block; }
.auth-hero { margin: 1.6rem 0; }
.auth-foot {
  position: static; left: auto; right: auto; bottom: auto;
  display: flex; align-items: center; gap: .75rem; justify-content: flex-start;
}
.auth-foot .auth-credit-label { color: rgba(234,243,236,.62); font-size: .68rem; }
.auth-chip-paneo {
  background: #fff; border-radius: 9px; padding: .42rem .72rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); display: inline-flex; align-items: center;
}
.auth-chip-paneo img { height: 18px; width: auto; }

@media (max-width: 900px) {
  .auth-brand { padding-bottom: 2.2rem; }
  .auth-unicef img { height: 34px; }
  .auth-logo { width: 220px; margin: 1rem 0; }
}

/* Sidebar : logo UNICEF plus grand que PANEOTECH */
.side-partners { align-items: center; }
.side-partners img[alt="UNICEF"]    { height: 23px; opacity: .65; }
.side-partners img[alt="PANEOTECH"] { height: 14px; opacity: .5; }

/* ==============================================================
   UPGRADE VISUEL  —  icones Bootstrap + composants raffines
   Ce bloc est volontairement en fin de fichier : il prime sur
   les regles precedentes (last-wins). N'altere pas le login.
   ============================================================== */

.bi { vertical-align: -.125em; line-height: 1; }

/* --- Navigation laterale : icones nettes + etats --- */
.sidebar .nav-link { gap: 0; padding: .55rem .65rem; margin-bottom: 2px; font-weight: 500; }
.sidebar .nav-link .ico {
  width: 1.7rem; height: 1.5rem; margin-right: .5rem;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.08rem; color: #5d6f64; opacity: 1; transition: color .14s ease;
}
.sidebar .nav-link:hover { background: var(--wq-green-50); color: var(--wq-green-d); }
.sidebar .nav-link:hover .ico { color: var(--wq-green); }
.sidebar .nav-link.active {
  background: linear-gradient(180deg, var(--wq-green) 0%, var(--wq-green-700) 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(46,125,50,.30);
}
.sidebar .nav-link.active .ico { color: #fff; opacity: 1; }
.side-foot .logout .bi { font-size: 1rem; }
.nav-toggle .bi { font-size: 1.25rem; }

/* --- Titre de page : un filet d'accent --- */
.page-title {
  font-size: 1.5rem; font-weight: 760; letter-spacing: -.02em; color: var(--ink);
  margin: 0 0 1.1rem; position: relative; padding-left: .85rem;
}
.page-title::before {
  content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 4px;
  border-radius: 4px; background: linear-gradient(180deg, var(--wq-green), var(--wq-cyan));
}

/* --- Stat-cards : pastille d'icone + chiffre + label --- */
.stat-card {
  display: flex; align-items: center; gap: .85rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .95rem 1rem; box-shadow: var(--shadow-sm);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
a:hover .stat-card { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--wq-green-100); }
.stat-card .stat-ico {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--wq-green-50); color: var(--wq-green-d); font-size: 1.3rem;
}
.stat-card .stat-meta { line-height: 1.1; }
.stat-card .num { font-size: 1.6rem; font-weight: 780; color: var(--ink); letter-spacing: -.02em; }
.stat-card .lbl { font-size: .82rem; color: var(--muted); font-weight: 500; }

/* --- Cartes --- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header {
  background: var(--surface); border-bottom: 1px solid var(--line-2);
  font-weight: 650; color: var(--ink); padding: .8rem 1rem; letter-spacing: -.01em;
}
.card-header .bi { color: var(--wq-green); }

/* --- Tables --- */
.table > thead th {
  background: var(--bg); color: var(--muted);
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--line); padding: .6rem .8rem;
}
.table > tbody td { padding: .65rem .8rem; vertical-align: middle; border-color: var(--line-2); }
.table-hover > tbody > tr:hover > * { background: var(--wq-green-50); }

/* --- Boutons --- */
.btn-green {
  background: linear-gradient(180deg, var(--wq-green) 0%, var(--wq-green-700) 100%);
  border: none; color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(46,125,50,.25);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn-green:hover { color: #fff; filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(46,125,50,.32); }
.btn-green:active { transform: translateY(0); }
.btn-outline-green {
  border: 1px solid var(--wq-green); color: var(--wq-green-d); background: var(--surface); font-weight: 600;
  transition: background .12s ease, color .12s ease;
}
.btn-outline-green:hover { background: var(--wq-green); color: #fff; }
.btn .bi { vertical-align: -.12em; }

/* --- Champs : focus vert Wiqaya --- */
.form-control:focus, .form-select:focus {
  border-color: var(--wq-green); box-shadow: 0 0 0 .2rem rgba(46,125,50,.15);
}

/* --- Badges de statut en pilule --- */
.badge.st-p, .badge.st-r, .badge.st-d { font-weight: 600; padding: .32em .6em; border-radius: 999px; }
