/* Style commun à toutes les pages. Volontairement court. */

body {
  font-family: system-ui, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  line-height: 1.5;
  color: #222;
  background: #fafafa;
}

h1 { font-size: 1.6rem; margin: 0.5rem 0; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }

a { color: #1a5fb4; }

/* Accueil : liste de liens */
.liens { padding-left: 1.2rem; }
.liens li { margin: 0.4rem 0; }
.bientot { color: #888; }

/* ---- Page d'une loi ---- */

.retour { font-size: 0.9rem; }

/* Configuration compacte : tout sur une ligne (retour à la ligne si l'écran est étroit) */
.config {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  padding: 0.6rem 0.8rem;
  background: #eef2f7;
  border-radius: 6px;
  margin: 1rem 0;
}
.config label { display: flex; align-items: center; gap: 0.4rem; }
.config input[type="number"] { width: 4.5em; }
.config input[type="range"] { width: 120px; }
.config select { padding: 0.15rem; }

button {
  font: inherit;
  padding: 0.35rem 0.9rem;
  border: 1px solid #1a5fb4;
  border-radius: 4px;
  background: #1a5fb4;
  color: white;
  cursor: pointer;
}
button.secondaire { background: white; color: #1a5fb4; }
button:disabled { opacity: 0.5; cursor: default; }

/* Simulation */
.etat {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  margin: 0.5rem 0;
}
.etat .compteur { font-size: 1.4rem; font-weight: bold; }

.riviere {
  display: block;
  width: 100%;
  height: 180px;
  border-radius: 6px;
}

/* Graphique et statistiques côte à côte (empilés si écran étroit) */
.resultats {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
@media (max-width: 700px) { .resultats { grid-template-columns: 1fr; } }

.graphique { width: 100%; height: auto; }
.graphique .barre { fill: #74a9d8; }
.graphique .theorie { stroke: #d62828; fill: #d62828; stroke-width: 2; }
.graphique .axe { stroke: #555; }
.graphique .grille { stroke: #ddd; }
.graphique text { font-size: 12px; fill: #333; }
.legende { font-size: 0.85rem; color: #555; }
.legende .carre { display: inline-block; width: 12px; height: 12px; background: #74a9d8; vertical-align: middle; }
.legende .point { display: inline-block; width: 10px; height: 10px; background: #d62828; border-radius: 50%; vertical-align: middle; }

.stats { margin: 0; }
.stats dt { color: #555; font-size: 0.85rem; margin-top: 0.5rem; }
.stats dd { margin: 0; font-weight: bold; }

/* Explications en bas de page */
.explications { margin-top: 2rem; border-top: 1px solid #ddd; padding-top: 1rem; }
.formule { font-size: 1.3rem; text-align: center; margin: 1rem 0; }
