/* Agri GP : styles des pages GP Troupeau et GP Sol (chargés après agri.css). */

/* héros GP Troupeau : la pâture remplit la scène, le compte posé sur un panneau blanc */
.hero__stage.coupe--photo { border-radius: var(--r-lg); overflow: hidden; }
.stage-count {
  position: absolute; left: 20px; top: 20px; z-index: 2; display: grid; gap: 4px; justify-items: start;
  background: #fff; border-radius: var(--r-md); padding: 14px 18px;
}
.stage-count__value { font-family: var(--font-display); font-weight: 800; font-size: 56px; line-height: 1; display: flex; align-items: baseline; gap: .14em; margin-top: 6px; }
.stage-count__label { font: 600 14px/1.3 var(--font-text); color: var(--muted); }
.stage-tag { position: absolute; right: 0; top: 0; z-index: 2; }
.stage-legend { display: none; }

/* étiquettes de conseil (GP Sol) */
.conseil-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; font: 700 14px/1 var(--font-text); white-space: nowrap; border: 1.5px solid var(--pature); }
.conseil-chip--arroser { background: var(--boucle); border-color: var(--boucle); color: var(--pature); }
.conseil-chip--semer { background: var(--pature); color: #fff; }
.conseil-chip--attendre { background: #fff; color: var(--pature); }
.conseil-chip--big { height: 40px; padding: 0 18px; font-size: 17px; }

/* le circuit de GP Troupeau : quatre étapes sur un rail */
.circuit__steps { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); position: relative; }
.circuit__rail { position: absolute; left: 36px; right: calc(25% - 36px); top: 35px; height: 2px; background: color-mix(in oklab, var(--pature) 16%, transparent); }
.circuit__fill { position: absolute; inset: 0; background: var(--pature); transform-origin: left; }
.circuit__pulse { position: absolute; top: -5px; left: 0; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--boucle); box-shadow: 0 0 0 4px #fff; opacity: 0; }
.circuit__step { display: grid; gap: var(--s-4); align-content: start; position: relative; }
.circuit__icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--craie); color: var(--pature); position: relative; z-index: 1; border: 2px solid var(--pature); }
.circuit__icon svg { width: 40px; height: 40px; }
.circuit__step h3 { font-size: var(--t-h3); margin-top: var(--s-3); }
.circuit__step p { font-size: var(--t-lead); line-height: 1.5; max-width: 26ch; }
@media (max-width: 1023px) {
  .circuit__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-8); }
  .circuit__rail { display: none; }
}
@media (max-width: 639px) { .circuit__steps { grid-template-columns: 1fr; row-gap: var(--s-7); } }

/* la fenêtre d'appli (écran d'exemple en HTML) */
.app { border: 1px solid var(--line-strong); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.app__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: 12px 20px; background: var(--pature); color: #fff; }
.app__bar .tag-exemple { background: var(--boucle); color: var(--pature); }
.app__name { font: 800 22px/1 var(--font-display); }
.app__body { display: grid; grid-template-columns: minmax(260px, 4fr) 8fr; }
.app__list { list-style: none; margin: 0; padding: 8px; border-right: 1px solid var(--line); background: var(--craie); display: grid; align-content: start; gap: 4px; }
.app__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: 14px; border-radius: var(--r-sm); font-weight: 600; font-size: 16px; }
.app__row small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 2px; }
.app__row.is-open { background: #fff; box-shadow: inset 3px 0 0 var(--pature); }
.app__row-count { font: 800 26px/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.app__row-count small { display: inline; font-size: 16px; font-family: var(--font-text); font-weight: 600; }
.app__row.is-alert .app__row-count { background: var(--boucle); padding: 4px 8px; border-radius: 6px; }
.app__detail { padding: 20px 24px 24px; display: grid; gap: var(--s-4); align-content: start; }
.app__detail-head { display: flex; justify-content: space-between; align-items: start; gap: var(--s-4); }
.app__title { font: 800 30px/1 var(--font-display); }
.app__meta { color: var(--muted); font-size: 15px; margin-top: 6px; }
.app__big { font: 800 56px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.app__big small { font-size: .45em; color: var(--muted); }
.app__alert { background: var(--boucle); color: var(--pature); padding: 12px 16px; border-radius: var(--r-sm); font-weight: 600; }
.app__thumb { border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 16 / 5; }
.app__thumb svg { width: 100%; height: 100%; }
.app__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin: 0; }
.app__facts dt { font-size: 14px; color: var(--muted); }
.app__facts dd { margin: 2px 0 0; font-weight: 600; font-size: 17px; }
.app__why { font-size: 17px; }
.app__chart-box { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px 10px; }
.app__chart-title { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.app__chart { width: 100%; height: auto; max-height: 220px; }
.app__keys { list-style: none; padding: 0; margin: 6px 0 0; display: flex; gap: var(--s-5); font-size: 14px; color: var(--muted); }
.app__keys i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
@media (max-width: 767px) {
  .app__body { grid-template-columns: 1fr; }
  .app__list { border-right: 0; border-bottom: 1px solid var(--line); }
  .app__thumb { display: none; }
}
@media (max-width: 639px) {
  .app__facts { grid-template-columns: 1fr 1fr; }
  .app__detail { padding: 16px; }
  .app__big { font-size: 44px; }
}

/* le téléphone et sa notification (GP Troupeau) */
.alerte__text { display: grid; gap: var(--s-5); align-content: start; }
.alerte__phone { display: grid; justify-items: center; }
.phone { width: min(100%, 300px); aspect-ratio: 9 / 17; border-radius: 44px; background: #1b2a17; padding: 12px; }
.phone__screen { position: relative; height: 100%; border-radius: 34px; background: linear-gradient(170deg, #3d6a2f, #24401c 70%); color: #fff; padding: 52px 16px 16px; display: grid; align-content: start; justify-items: center; gap: 4px; overflow: hidden; }
.phone__time { font: 800 64px/1 var(--font-display); letter-spacing: .01em; }
.phone__date { font-size: 15px; margin-bottom: var(--s-6); }
.notif { width: 100%; background: #fff; color: var(--pature); border-radius: 18px; padding: 12px 14px; display: grid; gap: 4px; text-align: left; }
.notif__head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.notif__app { font-weight: 700; color: var(--pature); display: inline-flex; align-items: center; gap: 6px; }
.notif__app::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--boucle); }
.notif__title { font-weight: 700; font-size: 16px; }
.notif__text { font-size: 15px; line-height: 1.35; }
.phone__tag { position: absolute; bottom: 20px; }
@media (max-width: 767px) { .alerte__phone { margin-top: var(--s-7); } .alerte__text, .alerte__phone { grid-column: 1 / -1; } }

/* la sonde éclatée (GP Sol) */
.eclate { margin: 0; }
.eclate svg { width: 100%; height: auto; overflow: visible; }
.eclate text { font-family: var(--font-text); }
.eclate__legend { display: none; }

@media (max-width: 639px) {
  .eclate .etiquette { display: none; }
  .eclate__legend { display: grid; margin: var(--s-6) 0 0; }
  .eclate__legend > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .eclate__legend dt { font-weight: 700; }
  .eclate__legend dd { margin: 2px 0 0; color: var(--muted); }
  .stage-legend { display: grid; gap: 10px; list-style: none; padding: 0; margin: var(--s-4) 0 0; font-size: 15px; }
  .stage-legend li { display: flex; align-items: center; gap: 10px; }
  .hero__stage .stage-tag, .hero__stage .conseil { display: none; }
  .stage-count { left: 10px; top: 10px; padding: 10px 12px; }
  .stage-count__value { font-size: 40px; }
}

/* sur téléphone et tablette, ces sections grandissent avec leur contenu */
@media (max-width: 1023px) {
  main > section#appli, main > section#conseils, main > section#alerte, main > section#circuit, main > section#sonde { height: auto; min-height: 100svh; }
}

/* vignettes du circuit */
.circuit__tile { aspect-ratio: 16 / 10; border-radius: var(--r-md); overflow: hidden; background: var(--craie); display: grid; place-items: center; margin-top: var(--s-2); }
.circuit__tile > svg { width: 100%; height: 100%; }
.circuit__tile--count { align-content: center; gap: 4px; }
.circuit__tile--count p { font: 800 26px/1 var(--font-display); color: var(--muted); }
.circuit__tile--count p span { font-size: 72px; color: var(--pature); }
.circuit__tile--count small { font-weight: 600; font-size: 14px; color: var(--muted); }
.circuit__tile--notif { background: #2f5426; padding: 16px; }
.circuit__tile--notif .notif { box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.circuit__step h3 { margin-top: var(--s-2); }
.app__thumb { aspect-ratio: 16 / 4.4; }
.eclate { margin-top: var(--s-7); }
.app__big { white-space: nowrap; }
.eclate__phone { display: contents; }
.eclate__phone > svg { display: none; }
@media (max-width: 1023px) { .app__chart text { font-size: 19px; } }
@media (max-width: 639px) {
  .eclate { display: none; }
  .eclate__phone { display: grid; grid-template-columns: 72px 1fr; gap: var(--s-5); align-items: start; }
  .eclate__phone > svg { display: block; width: 72px; height: auto; }
  .eclate__legend { margin: 0; }
  .app__big { font-size: 40px; }
}
.circuit__tile--count p span { font-size: 56px; }
