/* ── Thème FarmOS (aligné sur aqua_smart/web/src/styles.scss) ── */
:root {
  --primary: #58D5C0; --primary-2: #45c9b3;
  --bg: #0D1117; --surface: #161B22; --card: #21262D; --border: #30363D;
  --text: #E6EDF3; --muted: #8B949E; --warning: #FFB74D; --danger: #F85149;
  --r: 16px;
  --sans: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Roboto Mono', ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before { content:""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(900px 520px at 70% -10%, rgba(88,213,192,.14), transparent 60%),
              radial-gradient(680px 480px at 0% 100%, rgba(88,213,192,.06), transparent 60%); }
body::after { content:""; position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .45;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(circle at 65% 5%, #000, transparent 72%); }
a { color: var(--primary); text-decoration: none; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 1.25rem; }
.material-icons { font-size: 20px; line-height: 1; vertical-align: middle; }

/* Header */
header.nav { padding: 1.05rem 0; position: sticky; top: 0; z-index: 20; background: rgba(13,17,23,.72); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; }
.brand .logo { flex: 0 0 auto; display: block; filter: drop-shadow(0 0 6px rgba(88,213,192,.45)); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 8px var(--primary); } 50% { box-shadow: 0 0 18px var(--primary); } }
.ln { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 600; color: var(--primary); border: 1px solid rgba(88,213,192,.4); padding: .45rem .9rem; border-radius: 8px; }
.ln .material-icons { font-size: 18px; }
.ln:hover { background: rgba(88,213,192,.1); }

/* Hero */
.hero { text-align: center; padding: 4rem 0 1.5rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600; color: var(--primary); background: rgba(88,213,192,.08); border: 1px solid rgba(88,213,192,.25); padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1.4rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 1rem; font-weight: 700; }
.hero h1 .accent { color: var(--primary); }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 660px; margin: 0 auto 1.8rem; }
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.5rem; font-weight: 700; cursor: pointer; color: #0D1117; background: var(--primary); border: none; border-radius: 10px; transition: transform .12s ease, background .15s ease; }
.btn .material-icons { font-size: 19px; }
.btn:hover { background: var(--primary-2); transform: translateY(-1px); }

/* Dashboard "live" (réplique de l'app, données illustratives) */
.device { max-width: 760px; margin: 2.5rem auto 0; }
.panel { background: linear-gradient(180deg, var(--surface), #12161c); border: 1px solid var(--border); border-radius: var(--r); box-shadow: 0 28px 70px rgba(0,0,0,.5); overflow: hidden; }
.panel-bar { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--border); background: rgba(0,0,0,.22); }
.panel-bar .dots span { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--border); }
.panel-bar .ttl { font-size: .82rem; font-weight: 600; color: var(--muted); }
.panel-bar .spacer { flex: 1; }
.panel-bar .badge { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 10px var(--primary); animation: pulse 2s infinite; }
.panel-body { padding: 1rem; }

.sensor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; }
.sensor-head { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.sensor-head .material-icons { color: var(--primary); font-size: 20px; }
.sensor-head span:last-child { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 1px; }
.sensor-vals { display: flex; justify-content: space-around; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tile .material-icons { color: var(--primary); font-size: 26px; }
.tile .v { font-size: 1.4rem; font-weight: 700; font-family: var(--mono); }
.tile .l { font-size: 11px; color: var(--muted); }

/* Mini-graphe VPD */
.chartcard { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: .85rem 1.1rem 1rem; margin-bottom: 1rem; }
.ch-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.ch-head .lft { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 1px; }
.ch-head .lft .material-icons { color: var(--primary); font-size: 17px; }
.ch-val { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: var(--text); }
.chartcard svg { width: 100%; height: 84px; display: block; }
.spark-line { fill: none; stroke: var(--primary); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark-area { fill: url(#vpdgrad); }
.spark-dot { fill: var(--primary); filter: drop-shadow(0 0 4px var(--primary)); }
.spark-band { fill: rgba(88,213,192,.10); }
.ch-legend { display: flex; align-items: center; gap: .4rem; font-size: .72rem; color: var(--muted); margin-top: .45rem; }
.ch-legend .bandkey { width: 14px; height: 8px; border-radius: 2px; background: rgba(88,213,192,.18); border: 1px solid rgba(88,213,192,.3); }

/* Master + modules */
.master { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1.1rem; }
.master-head { display: flex; align-items: center; gap: .55rem; margin-bottom: .7rem; }
.master-head .material-icons { color: var(--primary); }
.master-head .nm { font-weight: 600; }
.grow { flex: 1; }
.chip { font-size: 11px; font-weight: 600; padding: .12rem .5rem; border-radius: 999px; }
.chip.on { background: rgba(88,213,192,.16); color: var(--primary); }
.mod { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--border); }
.mod .material-icons.memory { color: var(--primary); }
.mod .info { flex: 1; min-width: 0; }
.mod .info .n { font-size: .92rem; font-weight: 500; display: flex; align-items: center; gap: .5rem; }
.mod .info .meta { font-size: .76rem; color: var(--muted); font-family: var(--mono); }
.chip-sm { font-size: 10px; padding: .05rem .4rem; border-radius: 999px; background: rgba(88,213,192,.16); color: var(--primary); }
.chev { color: var(--muted); font-size: 20px; }
.status-row { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--border); font-size: .8rem; }
.status-row .on { display: flex; align-items: center; gap: .45rem; color: var(--primary); }
.status-row .updated { color: var(--muted); font-family: var(--mono); }
.caption { text-align: center; font-size: .78rem; color: var(--muted); margin-top: .8rem; font-style: italic; }

/* Sections */
section.block { padding: 3rem 0; }
.block h2 { font-size: clamp(1.5rem,3vw,2rem); letter-spacing: -.02em; margin: 0 0 .6rem; text-align: center; }
.block .sub { color: var(--muted); max-width: 600px; margin: 0 auto 1.8rem; text-align: center; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 1rem; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 1.2rem; transition: transform .15s ease, border-color .15s ease; }
.feature:hover { transform: translateY(-3px); border-color: rgba(88,213,192,.45); }
.feature .material-icons { color: var(--primary); font-size: 26px; }
.feature h3 { margin: .5rem 0 .3rem; font-size: 1.02rem; } .feature p { color: var(--muted); font-size: .9rem; margin: 0; }

.final { text-align: center; background: linear-gradient(180deg, var(--surface), #12161c); border: 1px solid var(--border); border-radius: var(--r); padding: 3rem 1.5rem; }
.final h2 { margin-top: 0; }
.final .sub { margin: .3rem auto 0; }
.cta-wrap { margin: 1.4rem 0 0; }
.disclaimer { color: var(--muted); font-size: .88rem; font-style: italic; margin-top: 1.2rem; }
footer { padding: 2.4rem 0 3.4rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
footer .row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (max-width: 560px) { .sensor-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .pulse { animation: none; } }
