:root {
  --gpc-bleu: #00235c;
  --gpc-bleu-clair: #e8edf5;
  --gpc-vert: #17a703;
  --gpc-vert-texte: #0d7a02;
  --gpc-orange: #ec9b80;
  --gpc-orange-texte: #a8471f;
  --gpc-gris-fond: #f4f6fa;
  --gpc-gris-bordure: #dde3ee;
  --gpc-texte: #1c2733;
}

* {
  box-sizing: border-box;
}

body.gpc-body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--gpc-gris-fond);
  color: var(--gpc-texte);
}

/* --- Topbar --- */
.gpc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gpc-bleu);
  color: #fff;
  padding: 0.6rem 1.25rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.gpc-topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gpc-logo {
  height: 36px;
  background: #fff;
  border-radius: 6px;
  padding: 2px;
}

.gpc-app-name {
  font-weight: 600;
  font-size: 1.1rem;
}

.gpc-app-name small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  opacity: 0.85;
}

.gpc-topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.gpc-user-roles {
  opacity: 0.8;
  font-size: 0.78rem;
}

.gpc-btn-outline {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
}

.gpc-btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* --- Shell / sidebar --- */
.gpc-shell {
  display: flex;
  min-height: calc(100vh - 110px);
}

.gpc-sidebar {
  width: 230px;
  background: #fff;
  border-right: 1px solid var(--gpc-gris-bordure);
  padding: 1rem 0;
  flex-shrink: 0;
}

.gpc-sidebar-nav .nav-link {
  color: var(--gpc-texte);
  padding: 0.6rem 1.25rem;
  border-left: 3px solid transparent;
  font-weight: 500;
}

.gpc-sidebar-nav .nav-link:hover {
  background: var(--gpc-bleu-clair);
}

.gpc-sidebar-nav .nav-link.active {
  background: var(--gpc-bleu-clair);
  border-left-color: var(--gpc-vert);
  color: var(--gpc-bleu);
}

.gpc-content {
  flex: 1;
  padding: 1.5rem 2rem;
  min-width: 0;
}

.gpc-footer {
  text-align: center;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: #6b7686;
  border-top: 1px solid var(--gpc-gris-bordure);
}

/* --- Page headers --- */
.gpc-page-title {
  color: var(--gpc-bleu);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.gpc-page-subtitle {
  color: #5c6b7f;
  margin-bottom: 1.25rem;
}

/* --- Cards & KPIs --- */
.gpc-card {
  background: #fff;
  border: 1px solid var(--gpc-gris-bordure);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.gpc-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.gpc-kpi {
  background: #fff;
  border: 1px solid var(--gpc-gris-bordure);
  border-left: 4px solid var(--gpc-bleu);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}

.gpc-kpi.accent-vert { border-left-color: var(--gpc-vert); }
.gpc-kpi.accent-orange { border-left-color: var(--gpc-orange); }

.gpc-kpi-valeur {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--gpc-bleu);
}

.gpc-kpi-libelle {
  font-size: 0.82rem;
  color: #5c6b7f;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* --- Tables --- */
.gpc-table thead th {
  background: var(--gpc-bleu);
  color: #fff;
  font-weight: 500;
  border: none;
  white-space: nowrap;
}

.gpc-table tbody tr:hover {
  background: var(--gpc-bleu-clair);
}

.gpc-badge-statut {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.gpc-badge-ok { background: #e6f7e4; color: var(--gpc-vert-texte); }
.gpc-badge-attention { background: #fdece5; color: var(--gpc-orange-texte); }
.gpc-badge-neutre { background: #eceff4; color: #46546b; }

a.gpc-link {
  color: var(--gpc-bleu);
  font-weight: 600;
  text-decoration: none;
}

a.gpc-link:hover {
  text-decoration: underline;
}

/* --- Connexion --- */
body.gpc-body-connexion {
  background: linear-gradient(135deg, var(--gpc-bleu) 0%, #013a7a 100%);
  min-height: 100vh;
}

.gpc-connexion-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.gpc-connexion-card {
  background: #fff;
  border-radius: 14px;
  padding: 2.25rem 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.gpc-connexion-card img {
  height: 56px;
  margin-bottom: 0.75rem;
}

.gpc-connexion-comptes {
  background: var(--gpc-bleu-clair);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  margin-top: 1.25rem;
}

.gpc-connexion-comptes code {
  color: var(--gpc-bleu);
}
