/* Styles de la version 1.2 : objectifs de poids à une date (fichier propre à cette partie, chargé après app.css). */

/* ------------------------------------------------------------------ pastille de niveau (icône + texte) */
.obj-pastille {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 700; border: 1px solid; white-space: nowrap;
}
.obj-pastille .icone { width: 18px; height: 18px; }
.obj-niveau-ok { background: var(--valide-fond); border-color: var(--valide-trait); color: var(--valide); }
.obj-niveau-soutenu, .obj-niveau-compromis { background: var(--attention-fond); border-color: var(--attention-trait); color: var(--attention); }
.obj-niveau-soutenu .icone, .obj-niveau-compromis .icone { color: var(--attention-icone); }
.obj-niveau-impossible, .obj-niveau-refuse, .obj-niveau-a_revoir { background: var(--critique-fond); border-color: var(--critique-trait); color: var(--critique); }

/* ------------------------------------------------------------------ carte de la journée et tableau du jour */
.obj-ligne-carte {
  display: flex; align-items: flex-start; gap: 6px; margin: 4px 0 2px; font-size: 0.925rem; color: var(--encre-2);
  font-variant-numeric: tabular-nums;
}
.obj-ligne-carte .icone { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--cuir); }
.obj-ligne-carte a { color: var(--encre); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.obj-ligne-carte a:hover { text-decoration: underline; }
.obj-ligne-compromis a { color: var(--attention); }
.obj-ligne-compromis .icone { color: var(--attention-icone); }
.obj-ligne-a-revoir a { color: var(--critique); }
.obj-ligne-a-revoir .icone { color: var(--critique); }

.obj-cellule { display: flex; flex-direction: column; gap: 2px; min-width: 9em; font-variant-numeric: tabular-nums; }
.obj-cellule-titre { font-weight: 700; color: var(--encre); white-space: nowrap; }
.obj-cellule .info-cellule { display: inline-flex; align-items: center; gap: 4px; }
.obj-cellule-attention .info-cellule { color: var(--attention); font-weight: 600; }
.obj-cellule-critique .info-cellule { color: var(--critique); font-weight: 600; }
.obj-cible-objectif { display: block; font-size: 0.75rem; color: var(--encre-3); font-weight: 400; }
.obj-note-plan { margin: 6px 0 10px; }
.obj-cellule .icone { width: 16px; height: 16px; flex: none; }

/* ------------------------------------------------------------------ encadré de la fiche et objectif en cours */
.obj-entete { align-items: center; margin-bottom: 0.4rem; }
.obj-entete .panneau-titre { margin: 0; }
.obj-titre { margin: 0 0 8px; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.obj-chiffres {
  list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}
.obj-chiffres li {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--trait); border-radius: var(--rayon-petit);
  background: var(--surface-2);
}
.obj-chiffres li span { font-size: 0.8rem; color: var(--encre-3); }
.obj-chiffres li strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.obj-message { margin: 0 0 10px; color: var(--encre-2); }
.obj-encadre .alerte, .obj-actif .alerte { margin: 0 0 10px; }
.obj-sous-titre { font-size: 1rem; font-weight: 700; margin: 16px 0 6px; }

/* ------------------------------------------------------------------ petit graphique */
.obj-graphique { margin: 4px 0 12px; }
.obj-graphique-zone { position: relative; width: 100%; min-height: 40px; }
.obj-svg { display: block; width: 100%; height: auto; overflow: visible; }
.obj-legende { margin-bottom: 4px; }
.go-plan { fill: none; stroke: var(--cuir); stroke-width: 2; stroke-dasharray: 6 4; stroke-linejoin: round; }
.go-prevu { fill: none; stroke: var(--serie-prevu); stroke-width: 2; stroke-dasharray: 2 3; stroke-linejoin: round; }
.go-cible { stroke: var(--valide); stroke-width: 1.5; }
.go-date { stroke: var(--encre-2); stroke-width: 1; stroke-dasharray: 3 3; }

/* ------------------------------------------------------------------ tableau du plan */
.obj-plan .cadre-tableau { max-height: 26rem; overflow: auto; }
.obj-tableau-plan th[scope="row"] { font-weight: 600; }
.obj-ligne-date > * { background: var(--cuir-pale); }
.obj-badge-date { margin-left: 6px; background: var(--cuir); color: var(--sur-cuir); }

/* ------------------------------------------------------------------ formulaire et simulation */
.obj-form { max-width: none; }
.obj-form .grille-2 { max-width: 640px; }
.obj-form .champ-grammes { text-align: left; }
.obj-regles { margin: 4px 0 12px; font-size: 0.925rem; color: var(--encre-2); }
.obj-regles summary { cursor: pointer; font-weight: 600; color: var(--info); min-height: 32px; display: flex; align-items: center; }
.obj-regles ul { margin: 6px 0 0; padding-left: 1.2em; }
.obj-regles li { margin: 4px 0; max-width: 80ch; }
.obj-resultat { margin: 8px 0; }
.obj-resultat[aria-busy="true"] { opacity: 0.6; }
.obj-resultat-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.obj-resultat .liste-conseils { margin: 8px 0; }
.obj-resultat .alerte { margin: 8px 0; }
.obj-jauge {
  position: relative; height: 12px; max-width: 480px; margin: 4px 0 10px; border-radius: 999px; overflow: visible;
  background: var(--critique-fond); border: 1px solid var(--trait);
}
.obj-jauge-ok { position: absolute; left: 0; top: 0; bottom: 0; background: var(--valide); opacity: 0.55; border-radius: 999px 0 0 999px; }
.obj-jauge-soutenu { position: absolute; top: 0; bottom: 0; background: var(--attention-icone); opacity: 0.6; }
.obj-jauge-marque {
  position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px;
  background: var(--encre); box-shadow: 0 0 0 2px var(--surface);
}
.obj-dates { margin: 6px 0; }
.obj-confirmation { padding: 8px 10px; border: 1px solid var(--attention-trait); background: var(--attention-fond); border-radius: var(--rayon-petit); }

@media (forced-colors: active) {
  .obj-jauge-ok, .obj-jauge-soutenu, .obj-jauge-marque { forced-color-adjust: none; }
}

@media print {
  .obj-ligne-carte .icone { display: none; }
}

/* ---------------------------------------------------------------------------
   Affichage (v1.2.1) : identité sous le nom, variation du poids, ration limitée
   --------------------------------------------------------------------------- */
.identite-oiseau {
  display: block; margin-top: 1px; font-size: 0.78rem; font-weight: 400; line-height: 1.2;
  color: var(--encre-2); overflow-wrap: anywhere;
}
.tableau-feuille .identite-feuille { display: block; font-size: 0.72rem; font-weight: 400; color: #333; }
.tableau-feuille .variation-feuille { display: block; font-size: 0.7rem; font-weight: 400; color: #333; white-space: nowrap; }
.tableau-feuille .limite-feuille {
  display: block; min-width: 6rem; font-size: 0.68rem; font-weight: 700; color: #333; white-space: normal; text-align: left;
}
.rp-limite {
  display: block; max-width: 11rem; margin-top: 2px; font-size: 0.75rem; font-weight: 600; line-height: 1.2;
  color: var(--cuir); white-space: normal;
}
.note-limitation {
  display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 6px;
  font-size: 0.88rem; font-weight: 600; color: var(--cuir);
}
.tendance-hier { font-weight: 600; white-space: nowrap; }
.tendance-7j { color: var(--encre-2); white-space: nowrap; }

/* Dialogue « Que signifie … ? » : suggestions du réseau de parcs (version 1.3) */
.suggestions-reseau { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--info-trait); border-radius: var(--rayon-petit);
  background: var(--info-fond); }
.suggestions-reseau p { margin: 0 0 4px; }
.liste-suggestions-reseau { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.liste-suggestions-reseau li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.liste-suggestions-reseau .bouton { white-space: normal; text-align: left; }
.liste-suggestions-reseau .aide-sens { flex-basis: 100%; margin: 0; }
