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

/* rythme : ces sections prennent la hauteur de leur contenu, avec le même espacement partout */
main > :is(section, .section).section--auto { height: auto; min-height: 0; padding: var(--s-10) 0; }
main > :is(section, .section).section--auto + .section--auto:not(.relance) { border-top: 1px solid var(--line); }
@media (max-width: 639px) { main > :is(section, .section).section--auto { padding: var(--s-9) 0; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------------------------------------------------------------- cartes capteurs / matériel */
.capteurs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.capteurs--deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.capteur { background: var(--craie); border-radius: var(--r-lg); padding: var(--s-5); display: grid; gap: var(--s-4); align-content: start; }
.capteur__art { border-radius: var(--r-md); overflow: hidden; background: #fff; aspect-ratio: 240 / 250; }
.capteur__art--pre { aspect-ratio: 240 / 170; }
.capteur__art svg { width: 100%; height: 100%; display: block; }
.capteur h3 { font-size: var(--t-h3); }
.capteur__role { font-size: 17px; line-height: 1.5; }
.capteur__faits { margin: 0; display: grid; border-top: 1px solid var(--line); }
.capteur__faits > div { display: grid; grid-template-columns: 9.5em 1fr; gap: var(--s-3); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.capteur__faits dt { color: var(--muted); font-weight: 600; }
.capteur__faits dd { margin: 0; }
@media (max-width: 1023px) { .capteurs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  .capteurs, .capteurs--deux { grid-template-columns: 1fr; }
  .capteur__faits > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------------------------------------------------------------- relance (appel intermédiaire) */
main > section.relance { background: var(--pature); color: #fff; padding: var(--s-9) 0; }
.relance__in { display: flex; align-items: center; justify-content: space-between; gap: var(--s-7); flex-wrap: wrap; }
.relance h2 { font-size: clamp(36px, 1.9vw + 29px, 56px); color: #fff; }
.relance__in p { color: #e6ece3; font-size: var(--t-lead); max-width: 52ch; margin-top: var(--s-3); }
.relance__actions { display: grid; gap: var(--s-3); justify-items: start; }
.relance__actions .btn--primary { background: var(--boucle); color: var(--pature); }
.relance__tel { font-weight: 600; }
.relance .slot { background: color-mix(in oklab, var(--boucle) 85%, white); color: var(--pature); }
.relance :focus-visible { box-shadow: 0 0 0 2px #fff; }

/* ---------------------------------------------------------------- trois points (appli) */
.trois { list-style: none; margin: 0 0 var(--s-7); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.trois li { display: grid; gap: var(--s-3); align-content: start; border-top: 2px solid var(--pature); padding-top: var(--s-4); }
.trois h3 { font-size: var(--t-h3); }
.trois p { font-size: 17px; line-height: 1.55; }
@media (max-width: 767px) { .trois { grid-template-columns: 1fr; row-gap: var(--s-6); } }
.app__body--stack { grid-template-columns: 1fr; }
.app__body--stack .app__list { border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 639px) { .app__body--stack .app__list { grid-template-columns: 1fr; } }
#appli .alerte__phone { align-self: center; }
@media (max-width: 1023px) { #appli .span-7, #appli .alerte__phone { grid-column: 1 / -1; } #appli .alerte__phone { margin-top: var(--s-8); } }

/* ---------------------------------------------------------------- tableaux (guide de choix, fiche technique) */
.legende { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: baseline; font-size: 16px; color: var(--muted); margin: 0 0 var(--s-5); }
.legende b { color: var(--ink); }
.legende span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: var(--pature); }
.legende span:nth-child(2)::before { background: var(--boucle); }
.legende span:nth-child(3)::before { background: #fff; border: 1.5px solid var(--pature); }
.tableau { overflow-x: auto; margin-top: var(--s-6); }
.tableau table { width: 100%; border-collapse: collapse; font-size: 16px; }
.tableau caption { text-align: left; font-weight: 600; color: var(--muted); padding-bottom: var(--s-3); }
.tableau th, .tableau td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tableau thead th { font: 800 22px/1.1 var(--font-display); color: var(--pature); border-bottom: 2px solid var(--pature); }
.tableau tbody th[scope="row"] { font-weight: 600; width: 28%; }
.tableau .tableau__groupe th { background: var(--craie); font: 600 14px/1.2 var(--font-text); color: var(--muted); padding: 10px 16px; letter-spacing: .01em; }
.tableau tbody tr:not(.tableau__groupe):hover td, .tableau tbody tr:not(.tableau__groupe):hover th { background: color-mix(in oklab, var(--craie) 60%, white); }
#la-sonde .tableau { margin-top: var(--s-8); }

/* sous 600 px : chaque ligne devient une carte, chaque cellule annonce sa colonne */
@media (max-width: 599px) {
  .tableau { overflow: visible; }
  .tableau table, .tableau tbody, .tableau tr, .tableau th, .tableau td { display: block; width: auto; }
  .tableau thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tableau caption { display: block; }
  .tableau .tableau__groupe th { background: none; padding: var(--s-6) 0 var(--s-2); font-size: 15px; border: 0; }
  .tableau tbody tr:not(.tableau__groupe) { background: var(--craie); border-radius: var(--r-md); padding: var(--s-4); margin-bottom: var(--s-3); }
  .tableau tbody th[scope="row"] { width: auto; padding: 0 0 var(--s-3); border-bottom: 1px solid var(--line-strong); font-size: 17px; }
  .tableau td { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tableau td:last-child { border-bottom: 0; padding-bottom: 0; }
  .tableau td::before { content: attr(data-label); font-weight: 600; color: var(--muted); }
  .tableau tbody tr:hover td, .tableau tbody tr:hover th { background: none; }
}

/* ---------------------------------------------------------------- installation */
.pose { list-style: none; counter-reset: pose; margin: 0; padding: 0; display: grid; gap: var(--s-6); }
.pose li { counter-increment: pose; position: relative; padding-left: 56px; display: grid; gap: var(--s-2); }
.pose li::before { content: counter(pose); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--pature); color: #fff; font: 800 19px/1 var(--font-display); }
.pose h3 { font-size: var(--t-h3); }
.pose p { font-size: 17px; line-height: 1.55; max-width: 46ch; }
.video-slot { margin: 0; aspect-ratio: 16 / 9; border-radius: var(--r-lg); background: var(--craie); border: 1px dashed color-mix(in oklab, var(--pature) 40%, transparent); display: grid; place-items: center; align-content: center; gap: var(--s-4); }
.video-slot svg { width: 72px; height: 72px; }
.video-slot figcaption { font-size: 17px; }
#installation .span-6 { align-self: start; position: sticky; top: calc(var(--nav) + var(--s-6)); }
@media (max-width: 1023px) {
  #installation .span-5, #installation .span-6 { grid-column: 1 / -1; position: static; }
  #installation .video-slot { margin-top: var(--s-7); }
}

/* ---------------------------------------------------------------- FAQ : un vrai accordéon */
.accordeon { border-top: 1px solid var(--pature); }
.accordeon details { border-bottom: 1px solid var(--line); }
.accordeon summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: 64px; padding: var(--s-4) 0; font: 600 19px/1.35 var(--font-text); color: var(--ink); }
.accordeon summary::-webkit-details-marker { display: none; }
.accordeon summary:hover span { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.accordeon__ico { width: 20px; height: 20px; flex: none; color: var(--pature); transition: transform 160ms var(--ease-out); }
.accordeon details[open] .accordeon__ico { transform: rotate(180deg); }
.accordeon__body { padding: 0 0 var(--s-5); display: grid; gap: var(--s-3); }
.accordeon__body p { font-size: 17px; line-height: 1.6; max-width: 62ch; }
@media (prefers-reduced-motion: reduce) { .accordeon__ico { transition: none; } }
@media (max-width: 1023px) { #faq .span-4, #faq .span-8 { grid-column: 1 / -1; } }
