:root {
  --bg: #03080d;
  --bg-soft: #071118;
  --panel: rgba(6, 18, 26, 0.76);
  --panel-strong: rgba(7, 20, 29, 0.94);
  --text: #f5f7fb;
  --muted: #a1acba;
  --muted-2: #6f7c8c;
  --green: #24f082;
  --green-dark: #0fae5c;
  --cyan: #4de1ff;
  --orange: #ffb444;
  --red: #ff5b5b;
  --border: rgba(36, 240, 130, 0.38);
  --border-soft: rgba(255, 255, 255, 0.09);
  --radius: 20px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 70% 24%, rgba(36, 240, 130, 0.16), transparent 26rem),
    radial-gradient(circle at 28% 16%, rgba(77, 225, 255, 0.08), transparent 24rem),
    linear-gradient(145deg, #02060a 0%, var(--bg) 50%, #061018 100%);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 62% 28%, #000 0%, transparent 72%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(3,8,13,0.55));
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(255,255,255,0.075);
  background: rgba(3, 8, 13, 0.72);
  backdrop-filter: blur(18px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.brand strong { color: var(--green); }
.brand-text { text-transform: uppercase; }
.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
  color: #cbd3df;
  font-size: 1rem;
}
.main-nav a { opacity: 0.9; transition: color 180ms ease, opacity 180ms ease, text-shadow 180ms ease; }
.main-nav a:hover,
.main-nav a.is-active { color: var(--green); opacity: 1; text-shadow: 0 0 18px rgba(36, 240, 130, 0.30); }

/* Logo header : compatible index.html + pages internes */
.mini-logo,
.brand-mark {
  position: relative;
  width: 44px;
  height: 38px;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 14px rgba(36, 240, 130, 0.36));
}
.mini-head,
.brand-droid {
  position: absolute;
  left: 2px;
  top: 10px;
  width: 32px;
  height: 22px;
  border-radius: 18px 18px 5px 5px;
  border: 2px solid var(--green);
}
.mini-head::before,
.mini-head::after,
.brand-droid::before,
.brand-droid::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 2px;
  height: 12px;
  background: var(--green);
  border-radius: 99px;
}
.mini-head::before,
.brand-droid::before { left: 7px; transform: rotate(-28deg); }
.mini-head::after,
.brand-droid::after { right: 7px; transform: rotate(28deg); }
.mini-head span {
  position: absolute;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
}
.mini-head span:first-child { left: 8px; }
.mini-head span:last-child { right: 8px; }
.mini-glass,
.brand-lens {
  position: absolute;
  right: 2px;
  bottom: 3px;
  width: 15px;
  height: 15px;
  border: 3px solid #d9e8f1;
  border-radius: 50%;
}
.mini-glass::after,
.brand-lens::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 3px;
  right: -8px;
  bottom: -5px;
  border-radius: 99px;
  background: #d9e8f1;
  transform: rotate(45deg);
}

main {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

/* Accueil : vrai index.html fourni */
.hero-shell {
  min-height: calc(100vh - 78px);
  display: grid;
  place-items: start center;
  padding: clamp(42px, 7vw, 76px) 0 40px;
}
.hero {
  width: min(820px, 100%);
  margin: 0 auto;
  text-align: center;
}
.logo-mark {
  position: relative;
  width: 150px;
  height: 130px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 0 26px rgba(36, 240, 130, 0.28));
}
.logo-mark .android-head {
  position: absolute;
  left: 26px;
  top: 22px;
  width: 96px;
  height: 66px;
  border-radius: 54px 54px 13px 13px;
  background: linear-gradient(145deg, #9cff65 0%, #24f082 46%, #0fae5c 100%);
  box-shadow: inset 14px 10px 22px rgba(255,255,255,0.18), inset -18px -20px 26px rgba(0,0,0,0.18), 0 0 35px rgba(36,240,130,0.28);
}
.logo-mark .android-head::before,
.logo-mark .android-head::after {
  content: "";
  position: absolute;
  top: -18px;
  width: 6px;
  height: 30px;
  border-radius: 99px;
  background: linear-gradient(#b9ff78, var(--green-dark));
  transform-origin: bottom;
}
.logo-mark .android-head::before { left: 22px; transform: rotate(-30deg); }
.logo-mark .android-head::after { right: 22px; transform: rotate(30deg); }
.eye {
  position: absolute;
  top: 28px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #061017;
  box-shadow: inset 3px 3px 0 rgba(255,255,255,0.45);
}
.eye-left { left: 28px; }
.eye-right { right: 28px; }
.android-base {
  position: absolute;
  left: 26px;
  top: 92px;
  width: 96px;
  height: 14px;
  border-radius: 3px 3px 10px 10px;
  background: linear-gradient(90deg, rgba(36,240,130,0.55), rgba(36,240,130,0.95));
}
.magnifier {
  position: absolute;
  right: 4px;
  bottom: 12px;
  width: 52px;
  height: 52px;
  border: 6px solid #d9e8f1;
  border-radius: 50%;
  background: rgba(3,8,13,0.72);
  box-shadow: inset 0 0 16px rgba(77,225,255,0.22), 0 0 20px rgba(77,225,255,0.16);
}
.magnifier::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 7px;
  right: -22px;
  bottom: -10px;
  border-radius: 99px;
  background: #d9e8f1;
  transform: rotate(45deg);
}
.orbit {
  position: absolute;
  inset: 50% auto auto 50%;
  border: 1px solid rgba(36,240,130,0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
}
.orbit-one { width: 190px; height: 190px; }
.orbit-two { width: 250px; height: 250px; opacity: 0.35; }

h1 {
  margin: 0;
  font-size: clamp(4rem, 11vw, 7.6rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
  text-transform: uppercase;
  text-shadow: 0 18px 42px rgba(0,0,0,0.35);
}
h1 span { color: var(--green); text-shadow: 0 0 30px rgba(36, 240, 130, 0.36); }
.hero-subtitle,
.subtitle {
  max-width: 720px;
  margin: 22px auto 28px;
  color: #c2cbd6;
  font-size: clamp(1.14rem, 2.4vw, 1.55rem);
  line-height: 1.38;
}
.search-box,
.search-panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(680px, 100%);
  min-height: 72px;
  margin: 0 auto;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(5, 14, 21, 0.74);
  box-shadow: 0 0 0 4px rgba(36,240,130,0.045), 0 18px 60px rgba(0,0,0,0.32), 0 0 34px rgba(36, 240, 130, 0.11);
}
.search-box:focus-within,
.search-panel:focus-within {
  border-color: rgba(36,240,130,0.78);
  box-shadow: 0 0 0 4px rgba(36,240,130,0.09), 0 18px 70px rgba(0,0,0,0.38), 0 0 44px rgba(36, 240, 130, 0.17);
}
.search-icon { color: #d6e3ec; display: inline-grid; place-items: center; flex: 0 0 auto; }
.search-icon svg { width: 30px; height: 30px; }
#search {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}
#search::placeholder { color: #8d99a7; }
.clear-search {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  color: #bfc9d4;
  background: rgba(255,255,255,0.04);
  font-size: 1.35rem;
  line-height: 1;
}
.clear-search.is-visible { display: grid; place-items: center; }
.clear-search:hover { color: #fff; border-color: rgba(36,240,130,0.44); }
.hero-stats {
  margin: 18px auto 22px;
  color: var(--muted);
  font-size: 0.98rem;
}
.hero-stats strong { color: var(--text); }
.hero-stats span { color: var(--green); margin: 0 7px; }
.source-note {
  margin: 22px 0 0;
  color: var(--muted-2);
}

/* Résultats dynamiques */
.results { display: grid; gap: 10px; text-align: left; }
.results-count {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 9px;
  margin: 6px 0 8px;
  padding: 9px 13px;
  border: 1px solid rgba(36,240,130,0.22);
  border-radius: 999px;
  color: #c9ffd8;
  background: rgba(36,240,130,0.055);
}
.result-card {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(110px, 0.8fr) minmax(260px, 2fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding: 14px 18px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018));
  box-shadow: 0 18px 40px rgba(0,0,0,0.24);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}
.result-card:hover {
  transform: translateY(-2px);
  border-color: rgba(36,240,130,0.32);
  background: linear-gradient(180deg, rgba(36,240,130,0.055), rgba(255,255,255,0.02));
}
.device-title { font-size: 1.08rem; font-weight: 760; }
.device-brand { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.codename { color: #d4dde8; font-family: var(--mono); font-size: 0.92rem; }
.rom-list { display: flex; flex-wrap: wrap; gap: 8px; }
.rom-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: rgba(5, 14, 21, 0.78);
  color: #eef5f8;
}
a.rom-pill:hover { border-color: rgba(36,240,130,0.42); color: var(--green); }
.rom-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(36,240,130,0.62); flex: 0 0 auto; }
.status-badge { color: var(--green); background: rgba(36,240,130,0.10); border: 1px solid rgba(36,240,130,0.18); padding: 5px 9px; border-radius: 999px; font-size: 0.8rem; }
.chevron { color: #d2dbe5; font-size: 1.8rem; }
.empty-state,
.loading-state,
.error-state,
.intro-state {
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255,255,255,0.025);
  text-align: center;
}
.error-state { border-color: rgba(255,91,91,0.28); color: #ffc8c8; }
.pagination-wrap { padding: 22px 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; }
.pagination button {
  border: 1px solid rgba(36,240,130,0.25);
  border-radius: 999px;
  padding: 10px 15px;
  color: #fff;
  background: rgba(255,255,255,0.04);
}
.pagination button:disabled { cursor: not-allowed; opacity: 0.4; }
.pagination span { color: var(--muted); }
.result-link,
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #39ff88;
  font-weight: 760;
  text-decoration: none;
  transition: color 180ms ease, text-shadow 180ms ease, transform 180ms ease;
}
.result-link:hover,
.cta-link:hover {
  color: #7dffb2;
  text-shadow: 0 0 12px rgba(57,255,136,0.48);
  transform: translateX(2px);
}

/* Pages internes : À propos / Liens */
.content-page { padding: clamp(44px, 7vw, 86px) 0 48px; }
.page-hero { max-width: 900px; margin: 0 auto 34px; text-align: center; }
.page-hero h1 { font-size: clamp(3rem, 8vw, 6.4rem); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 9px 16px;
  border: 1px solid rgba(36,240,130,0.40);
  border-radius: 999px;
  color: var(--green);
  background: rgba(36,240,130,0.055);
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.eyebrow::before { content: "▣"; font-size: 0.9em; }
.page-intro {
  max-width: 760px;
  margin: 22px auto 0;
  color: #c2cbd6;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.5;
}
.content-grid,
.links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}
.info-card,
.link-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.018));
  box-shadow: 0 22px 58px rgba(0,0,0,0.25);
}
.info-card { padding: clamp(22px, 3vw, 30px); }
.info-card::before,
.link-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 18% 0%, rgba(36,240,130,0.13), transparent 28rem);
  opacity: 0.85;
}
.info-card > *,
.link-card > * { position: relative; z-index: 1; }
.featured-card {
  grid-column: span 2;
  border-color: rgba(36,240,130,0.22);
  background: linear-gradient(145deg, rgba(36,240,130,0.075), rgba(255,255,255,0.018));
}
.info-card h2,
.link-card h2 { margin: 0 0 14px; color: #f8fbff; font-size: clamp(1.25rem, 2vw, 1.65rem); }
.info-card p,
.link-card p { margin: 0 0 14px; color: #b7c2cf; line-height: 1.68; }
.info-card strong { color: #ffffff; }
.contact-card { border-color: rgba(77,225,255,0.20); }
.link-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: flex-start;
  padding: clamp(22px, 3vw, 30px);
}
.link-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(36,240,130,0.32);
  border-radius: 16px;
  color: var(--green);
  background: rgba(36,240,130,0.07);
  box-shadow: 0 0 24px rgba(36,240,130,0.10);
  font-family: var(--mono);
  font-weight: 900;
}
.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 9px;
  padding: 20px 16px 34px;
  color: var(--muted-2);
  text-align: center;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .site-header { position: relative; flex-direction: column; align-items: flex-start; }
  .main-nav { flex-wrap: wrap; }
  .result-card { grid-template-columns: 1fr; gap: 10px; }
  .chevron { display: none; }
}
@media (max-width: 760px) {
  .content-grid,
  .links-grid { grid-template-columns: 1fr; }
  .featured-card { grid-column: span 1; }
  .link-card { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  main { width: min(100% - 24px, 1280px); }
  .hero-shell { padding-top: 32px; }
  h1 { font-size: clamp(3.2rem, 16vw, 4.5rem); }
  .hero-subtitle,
  .subtitle { font-size: 1.12rem; }
  .search-box,
  .search-panel { min-height: 64px; padding: 0 14px; }
  .logo-mark { transform: scale(0.86); margin-bottom: 2px; }
  .pagination { flex-wrap: wrap; }
}

/* Compatibilité avec le rendu actuel de app.js : .card / .rom */
.home-page .results .card {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.018));
  box-shadow: 0 18px 40px rgba(0,0,0,0.24);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}
.home-page .results .card:hover {
  transform: translateY(-2px);
  border-color: rgba(36,240,130,0.32);
  background: linear-gradient(180deg, rgba(36,240,130,0.055), rgba(255,255,255,0.02));
}
.home-page .results .card h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.25rem;
}
.muted { color: var(--muted); }
.rom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(5, 14, 21, 0.58);
  color: #eef5f8;
}
.rom strong { color: #fff; }
.rom a { color: #39ff88; font-weight: 760; }
.rom a:hover { color: #7dffb2; text-shadow: 0 0 12px rgba(57,255,136,0.48); }
