/* ============================================================
   DIAG FM3A — Feuille de styles principale
   Police: Outfit + Noto Sans (Google Fonts CDN)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Noto+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ── Variables de thème (modifiables via admin) ─────────────── */
:root {
  --color-primary:       #1e3a5f;
  --color-primary-light: #2d5282;
  --color-primary-dark:  #152a44;
  --color-accent:        #f59e0b;
  --color-accent-light:  #fcd34d;

  /* 4 champs */
  --color-c1:       #16a34a;
  --color-c1-light: #dcfce7;
  --color-c1-dark:  #166534;
  --color-c2:       #d97706;
  --color-c2-light: #fef3c7;
  --color-c2-dark:  #92400e;
  --color-c3:       #0891b2;
  --color-c3-light: #e0f2fe;
  --color-c3-dark:  #0c4a6e;
  --color-c4:       #7c3aed;
  --color-c4-light: #ede9fe;
  --color-c4-dark:  #4c1d95;

  /* Statuts */
  --color-fait:       #16a34a;
  --color-fait-bg:    #dcfce7;
  --color-refaire:    #d97706;
  --color-refaire-bg: #fef3c7;
  --color-planifier:  #dc2626;
  --color-planifier-bg: #fee2e2;
  --color-prioritaire: #7c3aed;
  --color-prioritaire-bg: #ede9fe;

  /* Likert */
  --color-l1: #dc2626; --color-l1-bg: #fee2e2;
  --color-l2: #ea580c; --color-l2-bg: #ffedd5;
  --color-l3: #d97706; --color-l3-bg: #fef3c7;
  --color-l4: #16a34a; --color-l4-bg: #dcfce7;
  --color-l5: #0d9488; --color-l5-bg: #ccfbf1;

  /* Grille et espacements */
  --sidebar-width: 250px;
  --topbar-height: 64px;
  --radius:  10px;
  --radius-lg: 16px;
  --shadow:  0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --transition: .2s ease;

  /* Fonds de sections (couleurs de repère visuel) */
  --bg-associations: #f0f9ff;
  --bg-diagnostic:   #f0fdf4;
  --bg-interventions:#fffbeb;
  --bg-pratiques:    #faf5ff;
  --bg-evaluation:   #fff1f2;
  --bg-rapports:     #f8fafc;
  --bg-admin:        #1e3a5f;
}

/* ── Reset & base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Outfit', 'Noto Sans', sans-serif;
  background: #f4f6fb;
  color: #1e293b;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-light); }
img { max-width: 100%; }

h1,h2,h3,h4,h5,h6 { font-family: 'Outfit', sans-serif; font-weight: 700; line-height: 1.3; }

/* ── Layout principal ────────────────────────────────────────── */
.app-wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-primary);
  background-image: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.sidebar-logo img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: rgba(255,255,255,.15); padding: 4px; }

.sidebar-logo-text { font-size: 1rem; font-weight: 800; letter-spacing: .5px; }
.sidebar-logo-sub  { font-size: .72rem; opacity: .7; font-weight: 400; }

.sidebar-section {
  padding: 12px 12px 4px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.45);
  margin-top: 8px;
}

.sidebar-nav { list-style: none; padding: 4px 10px 10px; flex: 1; }

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: rgba(255,255,255,.8);
  font-size: .88rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.sidebar-nav li a:hover { background: rgba(255,255,255,.12); color: #fff; }
.sidebar-nav li a.active { background: var(--color-accent); color: #1e293b; font-weight: 700; }
.sidebar-nav li a .nav-icon { font-size: 1.1rem; width: 20px; flex-shrink: 0; }
.sidebar-nav li a .nav-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  border-radius: 20px;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  min-width: 20px;
  text-align: center;
}

.sidebar-champs { padding: 8px 10px; }
.sidebar-champ {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px;
  font-size: .8rem; font-weight: 500; color: rgba(255,255,255,.8);
  cursor: pointer; transition: all var(--transition); margin-bottom: 2px;
  text-decoration: none;
}
.sidebar-champ:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-champ .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: .85rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: .7rem; color: rgba(255,255,255,.6); }

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.topbar-title { font-size: 1.1rem; font-weight: 700; color: var(--color-primary); flex: 1; }
.topbar-breadcrumb { font-size: .8rem; color: #64748b; }
.topbar-breadcrumb a { color: #64748b; }
.topbar-breadcrumb a:hover { color: var(--color-primary); }

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.btn-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: #f1f5f9;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #475569;
  font-size: 1.1rem;
  transition: all var(--transition);
  position: relative;
  text-decoration: none;
}
.btn-icon:hover { background: var(--color-primary); color: #fff; }
.btn-icon .badge-notif {
  position: absolute; top: -3px; right: -3px;
  background: #ef4444; color: #fff;
  border-radius: 50%; width: 16px; height: 16px;
  font-size: .6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Sélecteur langue */
.lang-switcher { display: flex; gap: 4px; }
.lang-btn {
  padding: 4px 10px; border-radius: 7px; border: 1px solid #e2e8f0;
  font-size: .75rem; font-weight: 600; cursor: pointer;
  background: #fff; color: #64748b; transition: all var(--transition);
}
.lang-btn.active, .lang-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ── Contenu principal ───────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-content {
  flex: 1;
  padding: 28px 28px;
  background: var(--page-bg, #f4f6fb);
}

/* Fonds spécifiques par section */
.page-associations   { --page-bg: var(--bg-associations); }
.page-diagnostic     { --page-bg: var(--bg-diagnostic); }
.page-interventions  { --page-bg: var(--bg-interventions); }
.page-pratiques      { --page-bg: var(--bg-pratiques); }
.page-evaluation     { --page-bg: var(--bg-evaluation); }
.page-rapports       { --page-bg: var(--bg-rapports); }

/* ── Cartes / Cards ─────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; gap: 10px;
}
.card-title { font-size: 1rem; font-weight: 700; color: var(--color-primary); flex: 1; }
.card-body { padding: 22px; }
.card-footer { padding: 14px 22px; border-top: 1px solid #f1f5f9; background: #fafbfc; }

/* Cards colorées (champs) */
.card-c1 { border-top: 4px solid var(--color-c1); }
.card-c2 { border-top: 4px solid var(--color-c2); }
.card-c3 { border-top: 4px solid var(--color-c3); }
.card-c4 { border-top: 4px solid var(--color-c4); }

/* ── Grille statistiques (KPI cards) ─────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 5px solid transparent;
  text-decoration: none; color: inherit;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.kpi-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.kpi-value { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.kpi-label { font-size: .78rem; color: #64748b; font-weight: 500; margin-top: 2px; }
.kpi-delta { font-size: .72rem; font-weight: 600; margin-top: 4px; }
.kpi-delta.up   { color: #16a34a; }
.kpi-delta.down { color: #dc2626; }

/* ── Tableaux ────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); }
.fm3a-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.fm3a-table thead th {
  background: var(--color-primary);
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}
.fm3a-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.fm3a-table thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
.fm3a-table tbody tr { transition: background var(--transition); }
.fm3a-table tbody tr:hover { background: #f8faff; }
.fm3a-table tbody td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: .72rem; font-weight: 700;
  white-space: nowrap;
}
.badge-fait       { background: var(--color-fait-bg);       color: var(--color-fait); }
.badge-a_refaire  { background: var(--color-refaire-bg);    color: var(--color-refaire); }
.badge-planifier  { background: var(--color-planifier-bg);  color: var(--color-planifier); }
.badge-prioritaire{ background: var(--color-prioritaire-bg);color: var(--color-prioritaire); }
.badge-c1 { background: var(--color-c1-light); color: var(--color-c1-dark); }
.badge-c2 { background: var(--color-c2-light); color: var(--color-c2-dark); }
.badge-c3 { background: var(--color-c3-light); color: var(--color-c3-dark); }
.badge-c4 { background: var(--color-c4-light); color: var(--color-c4-dark); }

/* ── Score Likert visuel ─────────────────────────────────────── */
.likert-bar {
  display: flex; align-items: center; gap: 8px;
}
.likert-bar-track {
  flex: 1; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden;
}
.likert-bar-fill {
  height: 100%; border-radius: 4px; transition: width .5s;
}
.likert-score {
  font-size: 1.1rem; font-weight: 800; min-width: 28px; text-align: right;
}
.likert-label { font-size: .75rem; color: #64748b; }

/* ── Boutons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 9px;
  font-family: 'Outfit', sans-serif;
  font-size: .875rem; font-weight: 600;
  border: none; cursor: pointer;
  transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary   { background: var(--color-primary);   color: #fff; }
.btn-accent    { background: var(--color-accent);    color: #1e293b; }
.btn-success   { background: var(--color-fait);      color: #fff; }
.btn-warning   { background: var(--color-refaire);   color: #fff; }
.btn-danger    { background: var(--color-planifier); color: #fff; }
.btn-outline   { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: .8rem; border-radius: 7px; }
.btn-lg { padding: 13px 28px; font-size: 1rem; border-radius: 12px; }
.btn-ghost { background: #f1f5f9; color: #475569; }
.btn-ghost:hover { background: #e2e8f0; }
.btn-c1 { background: var(--color-c1); color: #fff; }
.btn-c2 { background: var(--color-c2); color: #fff; }
.btn-c3 { background: var(--color-c3); color: #fff; }
.btn-c4 { background: var(--color-c4); color: #fff; }

/* ── Formulaires ─────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .83rem; font-weight: 600; color: #374151; margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  font-family: 'Outfit', sans-serif;
  font-size: .875rem;
  color: #1e293b;
  background: #fff;
  transition: all var(--transition);
}
.form-control:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(30,58,95,.1); }
.form-control.is-invalid { border-color: #dc2626; }
.form-error { font-size: .75rem; color: #dc2626; margin-top: 4px; }
.form-hint  { font-size: .75rem; color: #64748b; margin-top: 4px; }

/* ── Likert Input ────────────────────────────────────────────── */
.likert-input { display: flex; gap: 8px; flex-wrap: wrap; }
.likert-option { display: none; }
.likert-option + label {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 16px; border-radius: 10px;
  border: 2px solid #e2e8f0;
  cursor: pointer; font-size: .8rem; font-weight: 600;
  transition: all var(--transition);
  min-width: 72px; text-align: center;
}
.likert-option + label .likert-num { font-size: 1.4rem; font-weight: 800; }
.likert-option:checked + label, .likert-option + label:hover {
  border-color: currentColor;
  transform: translateY(-2px);
}
.likert-option[value="1"] + label { color: var(--color-l1); }
.likert-option[value="2"] + label { color: var(--color-l2); }
.likert-option[value="3"] + label { color: var(--color-l3); }
.likert-option[value="4"] + label { color: var(--color-l4); }
.likert-option[value="5"] + label { color: var(--color-l5); }
.likert-option[value="1"]:checked + label { background: var(--color-l1-bg); }
.likert-option[value="2"]:checked + label { background: var(--color-l2-bg); }
.likert-option[value="3"]:checked + label { background: var(--color-l3-bg); }
.likert-option[value="4"]:checked + label { background: var(--color-l4-bg); }
.likert-option[value="5"]:checked + label { background: var(--color-l5-bg); }

/* ── Carte GPS ───────────────────────────────────────────────── */
#map { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.map-popup img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.map-popup h4 { font-size: .9rem; font-weight: 700; color: var(--color-primary); margin-bottom: 4px; }
.map-popup p  { font-size: .78rem; color: #475569; margin-bottom: 2px; }
.map-popup a  { font-size: .8rem; font-weight: 600; color: var(--color-primary); }

/* Marqueurs par champ */
.marker-c1 { filter: hue-rotate(120deg); }
.marker-c2 { filter: hue-rotate(30deg); }
.marker-c3 { filter: hue-rotate(180deg); }
.marker-c4 { filter: hue-rotate(260deg); }

/* ── Notifications panel ─────────────────────────────────────── */
.notif-panel {
  position: fixed; top: var(--topbar-height); right: 0;
  width: 360px; max-height: calc(100vh - var(--topbar-height));
  background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,.1);
  z-index: 300; overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition);
}
.notif-panel.open { transform: translateX(0); }

.notif-item {
  padding: 14px 18px; border-bottom: 1px solid #f1f5f9;
  display: flex; gap: 12px; align-items: flex-start;
  cursor: pointer; transition: background var(--transition);
}
.notif-item:hover { background: #f8faff; }
.notif-item.unread { background: #faf5ff; border-left: 3px solid var(--color-c4); }
.notif-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.notif-titre { font-size: .85rem; font-weight: 700; color: #1e293b; }
.notif-msg   { font-size: .78rem; color: #64748b; margin-top: 2px; line-height: 1.4; }
.notif-date  { font-size: .7rem; color: #94a3b8; margin-top: 3px; }

/* ── Avatar ──────────────────────────────────────────────────── */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
}
.avatar-initiales {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

/* ── Flash messages ──────────────────────────────────────────── */
.flash {
  padding: 13px 18px; border-radius: 10px;
  display: flex; align-items: center; gap: 10px;
  font-size: .875rem; font-weight: 500;
  margin-bottom: 18px; animation: fadeIn .3s;
}
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.flash-info    { background: #e0f2fe; color: #0c4a6e; border: 1px solid #bae6fd; }

/* ── Progress bars ───────────────────────────────────────────── */
.progress { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; transition: width .6s; }

/* ── Radar chart placeholder ─────────────────────────────────── */
.chart-container { position: relative; width: 100%; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chart-legend-item { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: #475569; }
.chart-legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ── Section headers (couleurs de repère) ────────────────────── */
.section-header {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 24px; border-radius: var(--radius-lg);
  margin-bottom: 22px; color: #fff;
}
.section-header .sh-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.section-header h1 { font-size: 1.25rem; font-weight: 800; color: #fff; }
.section-header p  { font-size: .83rem; opacity: .85; margin-top: 2px; }
.sh-associations { background: linear-gradient(120deg, #0891b2, #0e7490); }
.sh-diagnostic   { background: linear-gradient(120deg, #16a34a, #166534); }
.sh-interventions{ background: linear-gradient(120deg, #d97706, #92400e); }
.sh-pratiques    { background: linear-gradient(120deg, #7c3aed, #4c1d95); }
.sh-evaluation   { background: linear-gradient(120deg, #dc2626, #991b1b); }
.sh-rapports     { background: linear-gradient(120deg, #1e3a5f, #152a44); }
.sh-admin        { background: linear-gradient(120deg, #374151, #111827); }

/* ── Champ diagnostic card ───────────────────────────────────── */
.champ-card {
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.champ-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.champ-card.c1 { background: var(--color-c1-light); border-color: var(--color-c1); }
.champ-card.c2 { background: var(--color-c2-light); border-color: var(--color-c2); }
.champ-card.c3 { background: var(--color-c3-light); border-color: var(--color-c3); }
.champ-card.c4 { background: var(--color-c4-light); border-color: var(--color-c4); }
.champ-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.champ-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff;
}
.champ-card-titre { font-size: .95rem; font-weight: 700; }
.champ-card-question { font-size: .82rem; color: #475569; font-style: italic; }

/* ── Intervention item ───────────────────────────────────────── */
.intervention-item {
  background: #fff; border-radius: 10px; padding: 14px 18px;
  margin-bottom: 10px; box-shadow: var(--shadow);
  display: flex; align-items: flex-start; gap: 12px;
  transition: all var(--transition);
  border-left: 4px solid transparent;
}
.intervention-item:hover { box-shadow: var(--shadow-lg); }
.intervention-item.prioritaire { border-left-color: var(--color-prioritaire); }
.intervention-item.fait       { border-left-color: var(--color-fait); }
.intervention-item.a_refaire  { border-left-color: var(--color-refaire); }
.intervention-item.planifier  { border-left-color: var(--color-planifier); }
.intervention-code { font-size: .75rem; font-weight: 700; color: #94a3b8; }
.intervention-nom  { font-size: .9rem; font-weight: 700; color: #1e293b; }
.intervention-actions { margin-left: auto; display: flex; gap: 6px; }

/* ── Pratique item ───────────────────────────────────────────── */
.pratique-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 9px; background: #f8fafc;
  margin-bottom: 8px; transition: all var(--transition);
}
.pratique-item:hover { background: #f1f5f9; }
.pratique-type-badge {
  font-size: .65rem; font-weight: 700; padding: 3px 8px; border-radius: 20px;
  background: #e2e8f0; color: #475569; white-space: nowrap;
}

/* ── Evaluation stars ────────────────────────────────────────── */
.eval-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.eval-critere {
  background: #f8fafc; border-radius: 12px; padding: 16px;
  text-align: center;
}
.eval-critere-label { font-size: .78rem; font-weight: 600; color: #475569; margin-bottom: 8px; }
.eval-note { font-size: 2rem; font-weight: 800; }
.stars i { font-size: .9rem; }

/* ── Tooltip ─────────────────────────────────────────────────── */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: #1e293b; color: #fff;
  padding: 6px 10px; border-radius: 7px;
  font-size: .73rem; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  z-index: 999;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 500; display: none;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-lg);
  max-width: 600px; width: 95%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: slideUp .3s;
}
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; gap: 10px;
}
.modal-title { font-size: 1.05rem; font-weight: 700; color: var(--color-primary); flex: 1; }
.modal-body   { padding: 24px; }
.modal-footer { padding: 14px 24px; border-top: 1px solid #f1f5f9; display: flex; gap: 8px; justify-content: flex-end; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.page-item {
  padding: 7px 12px; border-radius: 8px; font-size: .83rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  background: #fff; border: 1.5px solid #e2e8f0; color: #475569;
  text-decoration: none;
}
.page-item:hover, .page-item.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ── Search & Filters ────────────────────────────────────────── */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 10px; padding: 8px 14px;
  width: 100%; max-width: 380px;
}
.search-bar input { border: none; outline: none; flex: 1; font-family: 'Outfit', sans-serif; font-size: .875rem; }
.search-bar i { color: #94a3b8; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

/* ── Loading spinner ─────────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid #e2e8f0;
  border-top-color: var(--color-primary);
  animation: spin .7s linear infinite;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeIn   { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideUp  { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes spin     { to { transform: rotate(360deg); } }

.fade-in { animation: fadeIn .4s ease both; }
.fade-in-1 { animation-delay: .1s; }
.fade-in-2 { animation-delay: .2s; }
.fade-in-3 { animation-delay: .3s; }
.fade-in-4 { animation-delay: .4s; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main-content { margin-left: 0; }
  .topbar { padding: 0 14px; }
  .page-content { padding: 16px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .eval-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .likert-input { gap: 4px; }
  .likert-option + label { min-width: 54px; padding: 8px 8px; }
  .modal { max-width: 100%; border-radius: var(--radius); }
}

/* ── Print ───────────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .btn, .notif-panel { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  .card { box-shadow: none !important; break-inside: avoid; }
}
