@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0e1310;
  --panel: #141a17;
  --panel-2: #1a211d;
  --border: #29332e;
  --text: #eae7e0;
  --text-dim: #93a09a;
  --accent: #ff5a00;
  --accent-strong: #ff7a1f;
  --accent-dim: #4a2a12;
  --live: #6fcf97;
  --live-dim: #26362d;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Inter', system-ui, sans-serif;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 32px 16px 64px;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(255, 145, 66, 0.05), transparent 45%),
    radial-gradient(circle at 80% 100%, rgba(111, 207, 151, 0.04), transparent 45%);
}

.console {
  width: 100%;
  max-width: 640px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* --- barre supérieure type console --- */
.console-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.dot-a { background: var(--accent); }
.dot-b { background: var(--live); opacity: 0.6; }
.dot-c { opacity: 0.5; }

.console-path {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.container {
  padding: 40px 32px 8px;
}

/* --- hero --- */
.hero {
  text-align: center;
  margin-bottom: 40px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-strong);
  margin: 0 0 12px;
}

h1 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(28px, 6vw, 38px);
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--text);
}

.hero-sub {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto 28px;
}

.board-frame {
  position: relative;
  display: inline-block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(255, 145, 66, 0.08), 0 12px 30px rgba(0, 0, 0, 0.35);
}

.board-img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
}

.board-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  background: rgba(14, 19, 16, 0.85);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

/* --- sections --- */
.section {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

h2 {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  color: var(--text);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-idle {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.status-live {
  background: var(--live);
  box-shadow: 0 0 0 3px var(--live-dim);
}

.section-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0 0 20px;
}

/* --- variantes de firmware --- */
.variants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.variant-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 20px 16px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.variant-tag {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 999px;
}

.variant-tag--cruise {
  color: var(--live);
  background: var(--live-dim);
}

.variant-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
  min-height: 60px;
}

esp-web-install-button { display: block; width: 100%; }

/* --- bouton flash --- */
.btn-flash {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 18px;
  background: var(--accent);
  color: #1a1006;
  border: none;
  border-radius: var(--radius);
  font-family: var(--sans);
  cursor: pointer;
  box-shadow: 0 6px 0 #a8420a, 0 10px 20px rgba(255, 90, 0, 0.35);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-flash:hover { background: var(--accent-strong); }

.btn-flash:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #a8420a, 0 4px 10px rgba(255, 90, 0, 0.35);
}

.btn-flash:focus-visible {
  outline: 2px solid var(--live);
  outline-offset: 3px;
}

.btn-flash--cruise {
  background: var(--live);
  color: #0a1710;
  box-shadow: 0 6px 0 #2f7d54, 0 10px 20px rgba(111, 207, 151, 0.15);
}

.btn-flash--cruise:hover { background: #85dba8; }

.btn-flash--cruise:active {
  box-shadow: 0 2px 0 #2f7d54, 0 4px 10px rgba(111, 207, 151, 0.15);
}

.btn-label {
  font-weight: 600;
  font-size: 14px;
}

.btn-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  opacity: 0.7;
}

/* --- carte OTA --- */
.ota-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 18px;
}

.ota-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.ota-row + .ota-row {
  border-top: 1px solid var(--border);
}

.ota-label {
  font-size: 13px;
  color: var(--text-dim);
}

.ota-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--live);
  background: var(--live-dim);
  padding: 4px 10px;
  border-radius: 6px;
}

/* --- footer --- */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
  background: var(--panel-2);
}

.version {
  font-family: var(--mono);
  color: var(--text-dim);
}

/* --- accessibilité / responsive --- */
@media (max-width: 480px) {
  .container { padding: 32px 20px 8px; }
  .footer { padding: 16px 20px; flex-direction: column; gap: 6px; text-align: center; }
  .variants { grid-template-columns: 1fr; }
  .variant-desc { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-flash { transition: none; }
}
