@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

/* ===== DESIGN TOKENS — Repris de midrone.com ===== */
:root {
  --brand:        #a2ca0f;   /* vert lime Midrone */
  --brand-dark:   #7fa00a;
  --brand-glow:   rgba(162,202,15,0.18);

  --bg:           #0d0d0d;
  --bg-surface:   #161616;
  --bg-card:      #1e1e1e;
  --bg-card-hover:#252525;

  --text:         #f0f0f0;
  --text-muted:   #888;
  --border:       #2a2a2a;

  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    20px;

  --nav-h:        64px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* scroll-behavior smooth uniquement sur desktop (interfère avec le scroll natif iOS) */
@media (hover: hover) and (pointer: fine) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: 'Roboto', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;
}

img { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: #c8f020; }

/* ===== NAVBAR ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(10,10,10,0.97);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.5rem;
  /* backdrop-filter uniquement sur desktop — trop coûteux sur mobile */
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .site-nav {
    background: rgba(10,10,10,0.92);
    backdrop-filter: blur(12px);
  }
}

.site-nav .brand {
  display: flex;
  align-items: center;
  white-space: nowrap;
  color: #fff;
}

.site-nav .brand img {
  height: 32px;
  width: auto;
  display: block;
  filter: brightness(1);
}

/* Fallback texte si l'image ne charge pas */
.site-nav .brand span {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: none;
}

.site-footer .brand img {
  height: 28px;
  width: auto;
  display: block;
  filter: brightness(0.9);
}

.site-nav .nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  flex: 1;
}

.site-nav .nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.38rem 0.85rem;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
  white-space: nowrap;
}

.site-nav .nav-links a:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.site-nav .nav-links a.active {
  color: var(--brand);
  background: rgba(162,202,15,0.1);
  border-color: rgba(162,202,15,0.25);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: #000;
  padding: 5rem 2rem 4rem;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(162,202,15,0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Hero photo de fond — page d'accueil */
.hero-bg-img {
  position: absolute;
  inset: 0;
  background-image: url('./assets/brand/hero-home-bg.png');
  background-size: cover;
  background-position: center 20%;
  opacity: 0.28;
  filter: brightness(0.85) saturate(0.75);
  z-index: 0;
}

.hero > *:not(.hero-bg-img) {
  position: relative;
  z-index: 2;
}

/* Texte décalé à droite */
.hero-split {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: left;
  padding: 5rem 5% 4rem;
  min-height: 420px;
}

.hero-text-right {
  width: 100%;
  max-width: 520px;
}

.hero-split .btns {
  justify-content: flex-start;
}

@media (max-width: 640px) {
  .hero-split {
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem 3rem;
  }
  .hero-split .btns {
    justify-content: center;
  }
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-glow);
  border: 1px solid rgba(162,202,15,0.35);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.hero h1 span {
  color: var(--brand);
}

.hero .sub {
  font-size: 1.1rem;
  color: #aaa;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.93rem;
  font-weight: 700;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-primary {
  background: var(--brand);
  color: #000;
}
.btn-primary:hover {
  background: #c8f020;
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(162,202,15,0.35);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid #444;
}
.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btns { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }

/* ===== SECTIONS ===== */
.section {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 0.5rem;
}

.section-title span { color: var(--brand); }

.section-sub {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.97rem;
}

/* ===== PRODUCT HERO (Vision 420) ===== */
.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .product-hero { grid-template-columns: 1fr; }
}

.product-hero-img img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.product-hero-info h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.product-hero-info h2 span { color: var(--brand); }

.product-hero-info p {
  color: #aaa;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* ===== SPECS GRID ===== */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.spec-item {
  background: var(--bg-card);
  padding: 1.2rem 1rem;
  text-align: center;
}

.spec-item .val {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--brand);
  display: block;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.spec-item .lbl {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ===== CARDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color 0.2s, background 0.2s;
}

.card:hover {
  border-color: rgba(162,202,15,0.4);
  background: var(--bg-card-hover);
}

.card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #111;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

/* ===== LEGACY LIST ===== */
.legacy-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

.legacy-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0 1rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.legacy-section-header h2 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* ===== SEARCH INPUT ===== */
.search-wrap {
  position: relative;
  max-width: 520px;
  margin-bottom: 1.5rem;
}

.search-wrap input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.search-wrap input:focus {
  border-color: var(--brand);
}

.search-wrap::before {
  content: '🔍';
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  pointer-events: none;
}

/* ===== LINKS ROW ===== */
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: #ccc;
  background: var(--bg-surface);
  transition: border-color 0.18s, color 0.18s;
}

.link-pill:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.link-pill.primary {
  background: var(--brand-glow);
  border-color: rgba(162,202,15,0.5);
  color: var(--brand);
}

/* ===== SECTION RESOURCES ===== */
.resources-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resource-card .icon {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}

.resource-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.resource-card p {
  font-size: 0.83rem;
  color: var(--text-muted);
  flex: 1;
}

/* ===== COUNT CHIP ===== */
#count {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border);
  background: #090909;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer .brand {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

.site-footer .brand span { color: var(--brand); }

.site-footer p {
  font-size: 0.82rem;
  color: #555;
}

.site-footer .footer-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.site-footer .footer-links a {
  font-size: 0.82rem;
  color: #666;
}

.site-footer .footer-links a:hover {
  color: var(--brand);
}

/* ===== TABLES ===== */
.clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.clean-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border);
}

.clean-table td {
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid var(--border);
  color: #d0d0d0;
  vertical-align: top;
}

.clean-table tr:hover td {
  background: var(--bg-card);
}

/* ===== UTILS ===== */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.text-brand { color: var(--brand); }
.text-muted  { color: var(--text-muted); }
.fw-bold     { font-weight: 700; }
.mt-1        { margin-top: 0.5rem; }
.mt-2        { margin-top: 1rem; }
.mt-3        { margin-top: 1.5rem; }

/* ===== HAMBURGER MENU ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  padding: 4px; margin-left: auto; flex-shrink: 0;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px;
  background: #e0e0e0; border-radius: 2px;
  transition: transform .25s, opacity .25s;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== RESPONSIVE ===== */
body { overflow-x: hidden; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .site-nav .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(10,10,10,0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0;
    z-index: 99;
  }
  .site-nav .nav-links.open { display: flex; }
  .site-nav .nav-links a {
    padding: .75rem .5rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    font-size: .95rem;
  }
  .site-nav .nav-links a:last-child { border-bottom: none; }

  .hero { padding: 3rem 1rem 2.5rem; }
  .product-hero { padding: 2.5rem 1rem; }
  .section { padding: 2.5rem 1rem; }
  .hero-split { padding: 3rem 1.25rem 2.5rem; }
}
