:root {
  --fond: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --carte: #fff;
  --texte: #333;
  --gris: #777;
  --vert: #22c55e;
  --orange: #f59e0b;
  --rouge: #ef4444;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--fond);
  min-height: 100vh;
  padding: 32px 20px 60px;
  color: var(--texte);
}
.page { max-width: 1080px; margin: 0 auto; }

.barre {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 28px; flex-wrap: wrap;
}
.barre .qui { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; }
.pastille {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; background: #667eea; border: 2px solid rgba(255,255,255,.6);
}
.liens { display: flex; gap: 10px; align-items: center; }
.lien {
  color: #fff; text-decoration: none; font-size: .92rem;
  background: rgba(255,255,255,.18); padding: 8px 14px; border-radius: 999px;
  border: none; cursor: pointer; font-family: inherit;
}
.lien:hover { background: rgba(255,255,255,.3); }

h1 { color: #fff; font-size: 2rem; text-shadow: 0 2px 10px rgba(0,0,0,.2); }
.sous-titre { color: rgba(255,255,255,.8); font-size: 1.05rem; margin-top: 4px; }
.entete { text-align: center; margin-bottom: 40px; }

section { margin-bottom: 36px; }
.titre-section {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 14px; padding-bottom: 9px;
  border-bottom: 1px solid rgba(255,255,255,.25);
}
.titre-section h2 { color: #fff; font-size: 1.2rem; }
.titre-section .compte { color: rgba(255,255,255,.65); font-size: .88rem; }

.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.carte {
  background: var(--carte); border-radius: 18px; padding: 22px 20px;
  text-decoration: none; color: var(--texte);
  box-shadow: 0 8px 28px rgba(0,0,0,.14);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column; gap: 6px;
}
a.carte:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(0,0,0,.22); }
.carte .icone { font-size: 2.1rem; line-height: 1.1; margin-bottom: 4px; }
.carte .titre { font-size: 1.08rem; font-weight: 700; }
.carte .desc { font-size: .86rem; color: var(--gris); line-height: 1.45; }
.carte .dernier {
  margin-top: 8px; font-size: .8rem; color: var(--gris);
  border-top: 1px solid #eee; padding-top: 8px;
}

.bloc {
  background: #fff; border-radius: 18px; padding: 24px;
  box-shadow: 0 8px 28px rgba(0,0,0,.14); margin-bottom: 22px;
}
.bloc h2 { font-size: 1.15rem; margin-bottom: 14px; }
.bloc h3 { font-size: .95rem; margin: 18px 0 8px; color: var(--gris); }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #eee; }
th { color: var(--gris); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
td.num, th.num { text-align: right; }
.vide { color: var(--gris); font-style: italic; padding: 12px 0; }

.pct { font-weight: 700; }
.pct.bien { color: var(--vert); }
.pct.moyen { color: var(--orange); }
.pct.faible { color: var(--rouge); }

.jauge { background: #eee; border-radius: 999px; height: 8px; overflow: hidden; min-width: 90px; }
.jauge span { display: block; height: 100%; border-radius: 999px; background: var(--vert); }
.jauge span.moyen { background: var(--orange); }
.jauge span.faible { background: var(--rouge); }

form.ligne { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
label { display: block; font-size: .8rem; color: var(--gris); margin-bottom: 4px; }
input[type=text], input[type=password], input[type=color] {
  font: inherit; padding: 9px 12px; border: 1px solid #ddd; border-radius: 10px;
}
input[type=color] { padding: 2px; width: 46px; height: 40px; }
button.principal {
  font: inherit; font-weight: 600; padding: 10px 18px; border: none; border-radius: 10px;
  background: #667eea; color: #fff; cursor: pointer;
}
button.principal:hover { background: #5a6fd6; }
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 18px; }
.cases label { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--texte); margin: 0; padding: 5px 0; }

.carte.vide-carte { opacity: .5; }
.carte.vide-carte .dernier { color: #999; font-style: italic; }
