/* TREESTEP — Guides SEO · CSS partagé */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #08080F;
  --bg2: #0d0d1a;
  --card: rgba(15,15,25,.7);
  --forest: #16A34A;
  --leaf: #4ADE80;
  --amber: #F59E0B;
  --purple: #7C3AED;
  --text: #F1F0FF;
  --text2: #A89EC9;
  --text3: #5B5380;
  --border: rgba(22,163,74,.18);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  font-size: 17px;
  min-height: 100vh;
}

/* ── Ambient — repris exact du hero de la landing (LandingPage2) ── */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 20% 5%,  rgba(22,163,74,.13) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(245,158,11,.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 15% 90%, rgba(74,222,128,.09) 0%, transparent 55%),
    radial-gradient(ellipse 30% 40% at 88% 20%, rgba(124,58,237,.05) 0%, transparent 55%);
}

/* ── Fireflies — lucioles mobiles (injectées par fireflies.js) ───── */
.firefly-dot {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(1px);
  opacity: 0;
  will-change: transform, opacity;
  animation: firefly-move linear infinite;
  --fx: 0px;
  --fy: 0px;
}
@keyframes firefly-move {
  0%   { opacity: 0;   transform: translate(0, 0) scale(1); }
  8%   { opacity: 1; }
  40%  { opacity: .85; transform: translate(calc(var(--fx) * .45), calc(var(--fy) * .45)) scale(1.15); }
  70%  { opacity: .6;  transform: translate(calc(var(--fx) * .8),  calc(var(--fy) * .75)) scale(.9); }
  92%  { opacity: .4; }
  100% { opacity: 0;   transform: translate(var(--fx), var(--fy)) scale(1); }
}

/* ── Silhouettes V2 — arbre + fougère avec sway (injectés par fireflies.js) ── */
.deco-tree {
  position: fixed;
  bottom: -10px;
  pointer-events: none;
  z-index: 0;
  transform-origin: bottom center;
  animation: sway 8s ease-in-out infinite;
  will-change: transform;
}
.deco-tree.left  { left: -3%;  width: 22%;  opacity: .35; }
.deco-tree.right { right: 0;   width: 18%;  opacity: .4; animation-duration: 11s; animation-direction: reverse; }
@keyframes sway { 0%, 100% { transform: rotate(-1deg); } 50% { transform: rotate(2deg); } }
@media (max-width: 720px) {
  .deco-tree.left  { width: 14%; }
  .deco-tree.right { width: 12%; }
}

a { color: var(--leaf); text-decoration: none; transition: color .2s; }
a:hover { color: var(--amber); }

/* HEADER / NAV — repris exact de la landing (LandingPage2) */
.site-header {
  background: rgba(8,8,15,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(22,163,74,.1);
  position: sticky; top: 0; z-index: 1000;
}
.site-nav {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 60px;
}
.site-brand {
  display: flex; align-items: center; gap: 12px;
  flex: 0 0 auto; text-decoration: none;
}
.site-brand img {
  width: 52px; height: 52px; object-fit: contain; display: block;
}
.brand-name {
  font-weight: 800; font-size: 20px;
  color: #F1F0FF;
  letter-spacing: -.03em;
}

/* Liens centraux (desktop) */
.nav-links {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 36px;
}
.nav-links a { color: #F1F0FF; font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--leaf); }

/* Bloc d'actions à droite */
.nav-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }

/* Sélecteur de langue */
.lang-switcher {
  display: flex; gap: 3px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(22,163,74,.15);
  border-radius: 10px; padding: 3px;
}
.lang-switcher button {
  background: transparent; border: 1px solid transparent; border-radius: 7px;
  padding: 5px 8px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  color: #A89EC9; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 12px;
  transition: all .2s;
}
.lang-switcher button img {
  width: 22px; height: 15px; border-radius: 2px; object-fit: cover;
  border: 1px solid rgba(255,255,255,.12); display: block;
}
.lang-switcher button.active {
  background: rgba(74,222,128,.15);
  border-color: rgba(74,222,128,.4);
  color: #4ADE80;
}

/* CTA */
.nav-cta {
  background: linear-gradient(135deg, var(--forest), var(--leaf));
  color: #fff !important;
  padding: 12px 24px;
  border-radius: 18px 28px 18px 28px / 28px 18px 28px 18px;
  font-weight: 700; font-size: 15px;
  box-shadow: 0 8px 24px rgba(22,163,74,.35);
  display: inline-flex; align-items: center; white-space: nowrap;
  transition: transform .2s;
}
.nav-cta:hover { color: #fff !important; transform: translateY(-1px); }
.nav-cta-short { display: none; }

/* Hamburger (mobile only) */
.nav-burger {
  display: none; background: none; border: none; cursor: pointer;
  color: #F1F0FF; padding: 4px; align-items: center;
}

/* Overlay menu mobile */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1001;
  background: rgba(8,8,15,.97); backdrop-filter: blur(24px);
  flex-direction: column; padding: 88px 32px 40px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu:not([hidden]) { display: flex; }
.mobile-menu-close {
  position: absolute; top: 20px; right: 20px;
  background: none; border: none; cursor: pointer; color: #A89EC9;
}
.mobile-menu-links { display: flex; flex-direction: column; gap: 0; }
.mobile-menu-links a {
  color: #F1F0FF; font-size: 24px; font-weight: 700;
  padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.07);
  letter-spacing: -.02em;
  display: flex; align-items: center; justify-content: space-between;
}
.mobile-menu-links a:hover { color: var(--leaf); }
.mobile-menu-cta { margin-top: auto; padding-top: 32px; }
.mobile-menu-cta .nav-cta {
  width: 100%; justify-content: center; padding: 16px; font-size: 16px;
}

/* ── RESPONSIVE MOBILE (≤767px) — calqué sur la landing ── */
@media (max-width: 767px) {
  .site-nav { padding: 12px 16px; justify-content: space-between; }
  .site-brand img { width: 32px; height: 32px; }
  .brand-name { font-size: 13px; }
  .nav-links.nav-desktop { display: none; }
  .nav-cta-full { display: none; }
  .nav-cta-short { display: inline; }
  .nav-cta { padding: 9px 16px; font-size: 13px; }
  .lang-switcher .lang-text { display: none; }
  .nav-burger { display: flex; }
}

/* CONTENT */
.container { max-width: 760px; margin: 0 auto; padding: 24px 20px; }

.breadcrumb {
  font-size: 13px; color: var(--text3);
  margin-bottom: 24px;
  font-family: 'Space Mono', monospace;
}
.breadcrumb a { color: var(--text2); }
.breadcrumb a:hover { color: var(--leaf); }

article h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text);
}

article .lede {
  font-size: 18px;
  color: var(--text2);
  margin-bottom: 32px;
  line-height: 1.55;
}

article h2 {
  font-size: 26px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 18px;
  letter-spacing: -.02em;
  color: var(--leaf);
  border-left: 3px solid var(--leaf);
  padding-left: 14px;
}

article h3 {
  font-size: 19px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text);
}

article p, article li { margin-bottom: 16px; color: var(--text); }

article ul, article ol { padding-left: 24px; margin-bottom: 16px; }
article li { margin-bottom: 8px; }
article li strong { color: var(--leaf); }

article strong { color: var(--text); font-weight: 700; }
article em { color: var(--amber); font-style: normal; font-weight: 600; }

article table {
  width: 100%; border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
}
article th, article td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
article th {
  background: rgba(22,163,74,.1);
  color: var(--leaf);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
article tr:last-child td { border-bottom: none; }

article blockquote {
  border-left: 3px solid var(--amber);
  padding: 12px 18px;
  margin: 24px 0;
  background: rgba(245,158,11,.06);
  border-radius: 0 12px 12px 0;
  color: var(--text);
  font-style: italic;
}

.callout {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px 14px 24px 16px / 16px 24px 14px 20px;
  padding: 20px 22px;
  margin: 28px 0;
}
.callout-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--leaf);
  font-weight: 700;
  margin-bottom: 8px;
}

/* CTA BLOCKS */
.cta-block {
  background: linear-gradient(135deg, rgba(22,163,74,.12), rgba(74,222,128,.06));
  border: 1.5px solid var(--border);
  border-radius: 28px 18px 32px 22px / 22px 32px 18px 28px;
  padding: 28px 26px;
  margin: 36px 0;
  text-align: center;
}
.cta-block h3 {
  font-size: 22px;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 8px;
}
.cta-block p {
  color: var(--text2);
  margin-bottom: 18px;
}
.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--forest), var(--leaf));
  color: #fff !important;
  padding: 14px 28px;
  border-radius: 18px 28px 18px 28px / 28px 18px 28px 18px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(22,163,74,.3);
  transition: all .25s;
}
.cta-btn:hover {
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(22,163,74,.45);
}

/* RELATED */
.related {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.related h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text3);
  margin-bottom: 18px;
}
.related-list {
  list-style: none; padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .related-list { grid-template-columns: 1fr 1fr; }
}
.related-list a {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 14px 18px;
  border-radius: 14px 20px 14px 20px / 20px 14px 20px 14px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  transition: all .2s;
}
.related-list a:hover {
  border-color: var(--leaf);
  color: var(--leaf);
  transform: translateY(-2px);
}

/* HUB (index) */
.hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}
@media (min-width: 700px) {
  .hub-grid { grid-template-columns: 1fr 1fr; }
}
.hub-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 22px 22px;
  border-radius: 20px 14px 24px 16px / 16px 24px 14px 20px;
  transition: all .25s;
  display: block;
}
.hub-card:hover {
  border-color: var(--leaf);
  transform: translateY(-3px);
  color: var(--text) !important;
}
.hub-card h2 {
  font-size: 18px;
  color: var(--text);
  margin: 0 0 8px 0;
  border: none;
  padding: 0;
  letter-spacing: -.01em;
}
.hub-card p { color: var(--text2); font-size: 14px; margin: 0; line-height: 1.5; }
.hub-card .tag {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--leaf);
  background: rgba(22,163,74,.12);
  padding: 3px 9px;
  border-radius: 5px;
  margin-bottom: 10px;
  font-weight: 700;
}

/* FOOTER */
.site-footer {
  margin-top: 80px;
  padding: 32px 20px;
  border-top: 1px solid var(--border);
  background: rgba(8,8,15,.5);
  color: var(--text3);
  font-size: 13px;
  text-align: center;
}
.site-footer a { color: var(--text2); margin: 0 10px; }

/* FAQ */
details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
details[open] { border-color: var(--leaf); }
summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  font-size: 16px;
  list-style: none;
  position: relative;
  padding-right: 24px;
}
summary::after {
  content: '+';
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  color: var(--leaf); font-size: 22px; font-weight: 700;
}
details[open] summary::after { content: '−'; }
details > p {
  margin-top: 12px;
  color: var(--text2);
  font-size: 15px;
}
