:root {
  --jaune:#facc15;
  --noir:#111827;
  --vert:#16a34a;
  --orange:#f59e0b;
  --rouge:#dc2626;
  --bleu:#60a5fa;
  --fond:#fffef7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, system-ui, sans-serif;
  background: var(--fond);
  color: var(--noir);
  line-height: 1.5;
}

header {
  background: var(--jaune);
  text-align: center;
  padding: 1.2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

h1 {
  margin: 0;
  font-size: 1.8rem;
}
h2 {
  text-align: center;
  margin: 1.2rem 0;
  font-weight: 600;
}

.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem;
}

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,.08);
  padding: 1rem 1.2rem;
  flex: 1 1 480px;
  max-height: 2000px;
  position: relative;
  overflow: hidden;
}

svg {
  width: 100%;
  border-radius: 12px;
  background: #fdfdfd;
}

.legend {
  display: flex;
  justify-content: space-around;
  margin-top: .6rem;
  font-size: .9rem;
  flex-wrap: wrap;
}
.legend div {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0.2rem;
}
.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}
.green { background: var(--vert); }
.orange { background: var(--orange); }
.red { background: var(--rouge); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin-top: .6rem;
}
th, td {
  padding: .4rem .6rem;
  border-bottom: 1px solid #eee;
  text-align: center;
}
th {
  background: var(--jaune);
}

footer {
  text-align: center;
  font-size: .8rem;
  padding: 1rem;
  color: #555;
  background: #fffbea;
}

.tooltip {
  position: absolute;
  background: rgba(17,24,39,.9);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: .8rem;
  display: none;
  pointer-events: none;
  z-index: 100;
  max-width: 240px;
  line-height: 1.3;
}

.widget {
  background: linear-gradient(to right,var(--vert),var(--jaune));
  color: #111;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
  margin: 1rem auto;
  max-width: 400px;
}
.widget.blue {
  background: linear-gradient(to right,var(--bleu),var(--jaune));
}
.progress {
  background: #eee;
  height: 10px;
  border-radius: 10px;
  overflow: hidden;
  margin: 0.4rem auto;
  width: 80%;
}
.progress div {
  height: 100%;
  background: var(--vert);
  transition: width 0.8s ease-in-out;
}

/* Impression A4 paysage */
@media print {
  body {
    background: white;
    color: black;
  }
  header, footer {
    background: none;
    box-shadow: none;
  }
  .card {
    box-shadow: none;
    page-break-inside: avoid;
  }
}

/* Responsive */
@media (max-width: 600px) {
  h1 { font-size: 1.4rem; }
  .card { max-width: 100%; }
  table { font-size: 0.8rem; }
  .widget { max-width: 90%; }
}
