/* =========================================================
   La Maison Libre — styles
   Dark, premium, zero framework.
   ========================================================= */

:root {
  --bg: #0a0e12;
  --bg-alt: #0d1218;
  --surface: #131a22;
  --surface-2: #182029;
  --border: #232c36;
  --border-soft: #1a222b;

  --text: #eef3f6;
  --text-dim: #a7b3bd;
  --text-faint: #7c8794;

  --accent: #34f5c5;
  --accent-strong: #5bffd6;
  --accent-dim: #1c8f74;
  --accent-ink: #04120e;
  --accent-glow: rgba(52, 245, 197, 0.28);

  --radius: 14px;
  --radius-sm: 9px;

  --font-head: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1120px;
  --container-narrow: 780px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* , *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * , *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--text-dim); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { margin: 0; padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* Focus visibility */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-narrow { max-width: var(--container-narrow); }

/* =========================
   Reveal on scroll
   ========================= */
.reveal {
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   Header
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 18, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  color: var(--accent);
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
.logo-accent { color: var(--accent); }

.main-nav {
  display: none;
  gap: 28px;
  margin-left: auto;
}
.main-nav a {
  color: var(--text-dim);
  font-size: 0.94rem;
  font-weight: 500;
}
.main-nav a:hover { color: var(--text); text-decoration: none; }

.nav-cta.btn { display: none; }

.nav-toggle {
  margin-left: auto;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-alt);
}
.mobile-nav a {
  padding: 14px 24px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-soft);
  font-weight: 500;
}
.mobile-nav a:hover { color: var(--text); text-decoration: none; }

.mobile-nav[hidden] { display: none; }

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .nav-cta.btn { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* =========================
   Buttons
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 11px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-accent:hover {
  background: var(--accent-strong);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.btn-sm { padding: 8px 16px; font-size: 0.88rem; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-block { width: 100%; }

/* =========================
   Badge
   ========================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 28px;
}
.badge:hover {
  border-color: var(--accent-dim);
  color: var(--text);
  text-decoration: none;
}
.badge svg { color: var(--accent); flex-shrink: 0; }
.badge .ext { color: var(--text-faint); margin-left: 2px; }

.badge-pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.badge-pulse::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.7;
  animation: badgePing 2.4s var(--ease) infinite;
}
@keyframes badgePing {
  0% { transform: scale(0.4); opacity: 0.7; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* =========================
   Hero
   ========================= */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 30%, transparent 75%);
}

/* Subtle EnOcean-style radio pulse — decorative, desktop only */
.hero-radio {
  position: absolute;
  top: 8%;
  right: 4%;
  width: 320px;
  height: 320px;
  pointer-events: none;
  display: none;
}
.hero-radio span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: radioWave 5s var(--ease) infinite;
}
.hero-radio span:nth-child(2) { animation-delay: 1.4s; }
.hero-radio span:nth-child(3) { animation-delay: 2.8s; }
@keyframes radioWave {
  0% { transform: scale(0.3); opacity: 0.5; }
  70% { opacity: 0.08; }
  100% { transform: scale(1); opacity: 0; }
}
@media (min-width: 860px) {
  .hero-radio { display: block; }
}

.hero-inner {
  position: relative;
  max-width: 780px;
}

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  color: var(--text);
  margin-bottom: 0.4em;
}

.accent-text { color: var(--accent); }

.hero-sub {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: var(--text-dim);
  max-width: 620px;
  margin-bottom: 2em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 56px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 620px;
  border-top: 1px solid var(--border-soft);
  padding-top: 28px;
}
.hero-stats li { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-faint);
  line-height: 1.4;
}

/* =========================
   Sections
   ========================= */
.section { padding: 84px 0; }
.section-alt {
  position: relative;
  background: var(--bg-alt);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.section-alt::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 70%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.section h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  color: var(--text);
  max-width: 640px;
}

.lead {
  font-size: 1.05rem;
  max-width: 620px;
}

/* =========================
   Card grid
   ========================= */
.card-grid {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}
.card-grid.three { grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .card-grid.three { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { border-color: var(--border-soft); transform: translateY(-3px); }

/* Richer hover depth — desktop/pointer devices only, so touch isn't left with a stuck hover state */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    border-color: var(--accent-dim);
    box-shadow: 0 20px 48px -28px rgba(0,0,0,0.6), 0 0 0 1px rgba(52,245,197,0.1);
  }
  .card:hover .card-icon {
    background: rgba(52,245,197,0.16);
    color: var(--accent-strong);
  }
}

.card-icon { transition: background 0.25s var(--ease), color 0.25s var(--ease); }

.card h3 {
  color: var(--text);
  font-size: 1.15rem;
  margin-bottom: 0.5em;
}
.card p { margin-bottom: 0; font-size: 0.95rem; }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(52, 245, 197, 0.08);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* =========================
   Split layout (solution / pourquoi moi)
   ========================= */
.split {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 880px) {
  .split { grid-template-columns: 1.1fr 0.9fr; }
  .split.reverse { grid-template-columns: 0.9fr 1.1fr; }
  .split.reverse .split-text { order: 2; }
  .split.reverse .split-visual { order: 1; }
}

.split > *, .split-text, .split-visual, .code-window { min-width: 0; }

.split-text h2 { margin-bottom: 0.45em; }

.check-list { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.check-list svg {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 3px;
  background: rgba(52, 245, 197, 0.1);
  border-radius: 50%;
  padding: 3px;
  width: 22px;
  height: 22px;
}
.check-list span { color: var(--text-dim); font-size: 0.96rem; }

.split-visual { display: flex; justify-content: center; }

/* Hub illustration */
.hub {
  position: relative;
  width: 280px;
  height: 280px;
  max-width: 90vw;
}
.hub-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 84px; height: 84px;
  border-radius: 22px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px 6px rgba(52, 245, 197, 0.12);
}
.hub-node {
  position: absolute;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.hub-node::before {
  content: "";
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  top: 50%; left: -3px;
  transform: translateY(-50%);
  box-shadow: 0 0 8px 1px var(--accent-glow);
}
.n1 { top: 4%; left: 50%; transform: translateX(-50%); }
.n2 { top: 26%; right: 2%; }
.n3 { bottom: 22%; right: 6%; }
.n4 { bottom: 2%; left: 50%; transform: translateX(-50%); }
.n5 { top: 26%; left: 2%; }

/* Code window illustration */
.code-window {
  width: 100%;
  max-width: 420px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
}
.code-bar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.code-bar span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border);
}
.code-window pre {
  margin: 0;
  padding: 20px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-dim);
  overflow-x: auto;
}
.c-key { color: var(--text-dim); }
.c-val { color: var(--text); }
.c-bool { color: var(--accent); }

/* =========================
   Pillars — "Pourquoi Libre"
   ========================= */
.pillars {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border-soft);
}
.pillars > .eyebrow { margin-bottom: 20px; }
.pillars-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 760px) {
  .pillars-grid { grid-template-columns: repeat(3, 1fr); }
}
.pillar h3 {
  color: var(--text);
  font-size: 1.05rem;
}
.pillar h3::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 14px;
}
.pillar p { font-size: 0.92rem; margin-bottom: 0; }

/* =========================
   Pricing
   ========================= */
.pricing { align-items: stretch; }
.price-card {
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-card .price {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}
.price-card.featured {
  border-color: var(--accent-dim);
  background: linear-gradient(180deg, rgba(52,245,197,0.06), var(--surface) 40%);
  box-shadow: 0 0 0 1px var(--accent-dim), 0 20px 60px -30px var(--accent-glow);
}
.price-card.featured .price { color: var(--accent); }

@media (min-width: 760px) {
  .price-card.featured {
    transform: scale(1.045);
    z-index: 2;
  }
}
@media (hover: hover) and (pointer: fine) {
  .price-card.featured:hover { transform: scale(1.045) translateY(-6px); }
}

.ribbon {
  position: absolute;
  top: -13px;
  left: 28px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  flex-grow: 1;
}
.feature-list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.92rem;
  color: var(--text-dim);
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
}

.options-box {
  margin-top: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}
.options-box h3 { color: var(--text); font-size: 1.05rem; }
.options-list { margin: 18px 0 22px; display: flex; flex-direction: column; }
.options-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.92rem;
  color: var(--text-dim);
  min-width: 0;
}
.options-list li:last-child { border-bottom: none; }
.options-list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.opt-price { color: var(--text); font-weight: 600; white-space: nowrap; flex-shrink: 0; }

@media (max-width: 480px) {
  .options-box { padding: 24px 18px; }
  .options-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
}

.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--text-faint);
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.note svg { flex-shrink: 0; color: var(--accent); margin-top: 2px; }

/* =========================
   FAQ
   ========================= */
.faq-list { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
  font-weight: 400;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 22px 20px; }
.faq-a p { margin: 0; font-size: 0.94rem; }

/* =========================
   Contact
   ========================= */
.section-contact { padding: 90px 0 100px; }
.contact-box {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  padding: 56px 32px;
  background: radial-gradient(ellipse at 50% 0%, rgba(52,245,197,0.08), transparent 70%), var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.contact-box h2 { color: var(--text); }
.contact-box p { max-width: 480px; margin-left: auto; margin-right: auto; margin-bottom: 28px; }

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.contact-email-link {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contact-email-link:hover { color: var(--accent); }

/* =========================
   Footer
   ========================= */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 28px 0 0;
  background: var(--bg-alt);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 24px;
  font-size: 0.85rem;
  color: var(--text-faint);
}
.footer-inner a { color: var(--text-faint); }
.footer-inner a:hover { color: var(--accent); }

.mentions {
  border-top: 1px solid var(--border-soft);
  padding: 24px 0 40px;
}
.mentions h2 {
  font-size: 1.05rem;
  color: var(--text);
}
.mentions p {
  font-size: 0.85rem;
  color: var(--text-faint);
  max-width: 620px;
}
