/* =========================================================
   CS-PILOT — Design premium v2
   Thème sombre · Bricolage Grotesque + Plus Jakarta Sans
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700;12..96,800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg:       #07091a;
  --bg-alt:   #0c0f22;
  --bg-card:  #10142b;
  --bg-glass: rgba(255,255,255,.035);
  --text:     #eef2ff;
  --text-soft:#8892b0;
  --line:     rgba(255,255,255,.08);
  --line-soft:rgba(255,255,255,.04);
  --brand:    #4f8cff;
  --brand-2:  #a78bfa;
  --teal:     #2dd4bf;
  --shadow:   0 24px 64px rgba(0,0,0,.55);
  --shadow-sm:0 8px 24px rgba(0,0,0,.4);
  --radius:   20px;
  --radius-sm:14px;
  --max:      1300px;
  --font-head:'Bricolage Grotesque', sans-serif;
  --font-body:'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(79,140,255,.13), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(167,139,250,.08), transparent);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
p { margin: 0 0 1rem; line-height: 1.7; }
ul { margin: 0; padding-left: 1.2rem; }
h1,h2,h3 { font-family: var(--font-head); margin: 0 0 1rem; line-height: 1.05; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 3.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3vw, 3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }

.container { width: min(var(--max), calc(100% - 2.4rem)); margin: 0 auto; }

main, header, footer, section { position: relative; z-index: 1; }

/* ---- HEADER ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(7,9,26,.82);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.brand img { width: 48px; height: 56px; object-fit: contain; flex: 0 0 auto; }
.brand-title {
  font-family: var(--font-head);
  font-weight: 800; font-size: 1.05rem; letter-spacing: .04em;
  background: linear-gradient(135deg, #fff 30%, var(--brand));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-subtitle { display: block; color: var(--text-soft); font-size: .74rem; max-width: 240px; line-height: 1.3; margin-top: .1rem; }
.site-nav { display: flex; gap: .15rem; align-items: center; flex-wrap: nowrap; justify-content: flex-end; flex: 1 1 auto; }
.site-nav a { padding: .52rem .72rem; border-radius: 999px; color: var(--text-soft); font-size: .83rem; font-weight: 500; white-space: nowrap; transition: color .16s, background .16s; }
.site-nav a:hover, .site-nav a.active { background: rgba(79,140,255,.12); color: #a5c8ff; }
.menu-toggle { display: none; border: 1px solid var(--line); background: var(--bg-glass); padding: .6rem .85rem; border-radius: 12px; font-size: 1rem; color: var(--text); cursor: pointer; }

/* ---- EYEBROW ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(79,140,255,.12); color: #93b8ff;
  border: 1px solid rgba(79,140,255,.2);
  border-radius: 999px; padding: .42rem .82rem;
  text-transform: uppercase; font-weight: 700; letter-spacing: .1em; font-size: .76rem;
  margin-bottom: 1.1rem;
}

/* ---- HERO ---- */
.hero { padding: 4rem 0 3rem; position: relative; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(79,140,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,140,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 20%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 20%, black 30%, transparent 80%);
}
.hero::after {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 70% 80% at 65% 50%, rgba(79,140,255,.07), transparent),
    radial-gradient(ellipse 40% 60% at 5% 30%, rgba(167,139,250,.09), transparent);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: start; }
.hero-copy { padding-top: .5rem; }
.hero-copy h1 { max-width: 17ch; color: #fff; }
.lead { font-size: 1.08rem; color: var(--text-soft); max-width: 58ch; line-height: 1.75; }
.lead strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; margin: 1.6rem 0 1.2rem; }
.stat-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .4rem; }
.stat-row span { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .78rem; color: var(--text-soft); font-size: .82rem; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; border-radius: 999px; padding: .85rem 1.4rem;
  font-weight: 700; font-family: var(--font-body); font-size: .92rem;
  transition: transform .18s ease, box-shadow .18s ease; cursor: pointer; border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: 0 12px 32px rgba(79,140,255,.3);
}
.btn-primary:hover { box-shadow: 0 18px 42px rgba(79,140,255,.45); }
.btn-secondary { background: rgba(255,255,255,.07); border: 1px solid var(--line); color: var(--text); }
.btn-secondary:hover { background: rgba(255,255,255,.12); }

/* ---- CARDS GENERIC ---- */
.hero-panel, .panel, .stat-card, .benefit-card, .category-card, .pricing-card, .placeholder-card, .detail-card, .cta-box, .page-hero {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.hero-panel, .panel, .page-hero { padding: 1.6rem; }

/* ---- HERO SHOWCASE ---- */
.hero-showcase { display: grid; gap: 1rem; align-self: start; }
.hero-showcase.single { max-width: 580px; width: 100%; justify-self: end; margin-left: auto; }
.hero-shot {
  display: block; background: var(--bg-card);
  border: 1px solid rgba(79,140,255,.2); border-radius: 24px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(79,140,255,.06), var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.hero-shot:hover { transform: translateY(-4px); border-color: rgba(79,140,255,.45); box-shadow: 0 0 0 1px rgba(79,140,255,.12), 0 32px 72px rgba(0,0,0,.6); }
.hero-shot figure { margin: 0; }
.hero-shot img { width: 100%; height: auto; }
.hero-shot figcaption { padding: 1rem 1.1rem 1.15rem; display: grid; gap: .28rem; background: linear-gradient(180deg, var(--bg-card), #0e1228); border-top: 1px solid var(--line); }
.hero-shot .shot-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.hero-shot strong { font-size: 1rem; color: var(--text); font-family: var(--font-head); }
.hero-shot span { color: var(--text-soft); font-size: .9rem; line-height: 1.55; }

/* ---- SECTIONS ---- */
.section { padding: 2.5rem 0; }
.section-alt { background: linear-gradient(180deg, rgba(255,255,255,.015) 0%, transparent 100%); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-heading { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-end; margin-bottom: 1.8rem; }
.section-heading h2 { color: #fff; }
.section-heading p { max-width: 52ch; color: var(--text-soft); margin: 0; }

/* ---- STATS ---- */
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; }
.stat-card { padding: 1.4rem 1.6rem; }
.stat-card strong {
  display: block; font-size: 2.4rem; font-family: var(--font-head); font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--brand));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: .3rem; line-height: 1;
}
.stat-card span { color: var(--text-soft); font-size: .9rem; }

/* ---- GRIDS ---- */
.benefits-grid, .mini-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.benefit-card { padding: 1.4rem 1.5rem; transition: border-color .2s; }
.benefit-card:hover { border-color: rgba(79,140,255,.28); }
.benefit-card h3 { font-size: 1rem; margin-bottom: .5rem; color: #fff; }
.benefit-card p { margin: 0; color: var(--text-soft); font-size: .93rem; }

.category-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.category-card { padding: 1.4rem 1.5rem; transition: transform .2s, border-color .2s; }
.category-card:hover { transform: translateY(-3px); border-color: rgba(79,140,255,.3); }
.category-card .icon { font-size: 1.8rem; margin-bottom: .75rem; }
.category-card h3 { font-size: 1.05rem; color: #fff; margin-bottom: .5rem; }
.category-card p { color: var(--text-soft); font-size: .91rem; margin-bottom: .8rem; }
.mini-list { color: var(--text-soft); padding-left: 1rem; font-size: .88rem; }
.mini-list li { margin: .3rem 0; }
.card-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; }

/* ---- TAGS ---- */
.tag-row, .jump-links, .pricing-tags, .hero-actions, .button-row, .card-actions, .stat-row {
  display: flex; gap: .7rem; flex-wrap: wrap; align-items: center;
}
.tag-row span, .pricing-tags span {
  background: rgba(79,140,255,.08); border: 1px solid rgba(79,140,255,.15);
  border-radius: 999px; padding: .38rem .72rem; color: #93b8ff; font-size: .83rem; font-weight: 500;
}
.jump-links a {
  background: rgba(79,140,255,.08); border: 1px solid rgba(79,140,255,.15);
  border-radius: 999px; padding: .38rem .72rem; color: #93b8ff; font-size: .83rem; font-weight: 500;
  transition: background .16s;
}
.jump-links a:hover { background: rgba(79,140,255,.18); }

/* ---- CATEGORY SECTIONS ---- */
.section-stack { display: grid; gap: 2rem; }
.category-section {
  background: rgba(255,255,255,.022); border: 1px solid var(--line);
  border-radius: 28px; padding: 1.8rem; transition: border-color .2s;
}
.category-section:hover { border-color: rgba(79,140,255,.18); }
.split-heading { display: grid; grid-template-columns: 1fr .85fr; gap: 1.5rem; align-items: start; margin-bottom: 1.3rem; }
.split-heading h2 { color: #fff; font-size: clamp(1.5rem, 2.2vw, 2.2rem); }
.split-heading p { color: var(--text-soft); margin: 0; }

/* ---- DETAIL CARDS ---- */
.details-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.detail-card {
  padding: 1.1rem 1.2rem;
  background: rgba(255,255,255,.03); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); transition: border-color .2s, background .2s;
}
.detail-card:hover { background: rgba(79,140,255,.06); border-color: rgba(79,140,255,.2); }
.detail-card h3 { margin-bottom: .35rem; font-size: .97rem; color: #e2eaff; }
.detail-card p { margin: 0; color: var(--text-soft); font-size: .9rem; line-height: 1.55; }

/* ---- SCREENSHOTS ---- */
.section-heading-tight { align-items: center; margin-bottom: 1rem; }
.screenshot-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: .5rem; }
.screenshot-grid-home { margin-top: .4rem; }
.screenshot-card {
  display: block; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.screenshot-card:hover { transform: translateY(-3px); border-color: rgba(79,140,255,.3); box-shadow: 0 20px 56px rgba(0,0,0,.6); }
.screenshot-card figure { margin: 0; }
.screenshot-card img { width: 100%; height: auto; }
.screenshot-card figcaption { padding: .9rem 1rem 1rem; display: grid; gap: .25rem; border-top: 1px solid var(--line); }
.screenshot-card figcaption strong { font-size: .96rem; color: var(--text); }
.screenshot-card figcaption span { color: var(--text-soft); font-size: .88rem; line-height: 1.5; }

/* ---- PRICING ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.pricing-card { padding: 1.5rem; }
.pricing-card.featured {
  background: linear-gradient(160deg, #131836, #0e1a3a);
  border: 1px solid rgba(79,140,255,.35);
  box-shadow: 0 0 0 1px rgba(79,140,255,.08), var(--shadow);
}
.kicker { font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: .75rem; }
.pricing-card h3 { color: #fff; margin-bottom: .5rem; }
.price { display: flex; align-items: flex-end; gap: .35rem; margin: .6rem 0 1rem; }
.price strong { font-family: var(--font-head); font-size: 3.5rem; line-height: 1; font-weight: 800; color: var(--teal); }
.price span { color: var(--text-soft); padding-bottom: .55rem; }
.pricing-list { padding-left: 1rem; color: var(--text-soft); }
.pricing-list li { margin: .5rem 0; font-size: .93rem; }
.pricing-card.featured .pricing-list li { color: #c7d8ff; }
.pricing-card p { color: var(--text-soft); font-size: .93rem; }
.pricing-tags { margin-bottom: 1rem; }

/* ---- TABLE ---- */
.compare {
  width: 100%; border-collapse: collapse; background: var(--bg-card);
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
.compare th, .compare td { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare th { background: rgba(79,140,255,.07); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-soft); }
.compare td { color: var(--text-soft); font-size: .93rem; }
.compare td strong { display: block; color: var(--text); margin-bottom: .2rem; }
.compare tr:last-child td { border-bottom: none; }
.compare tr:hover td { background: rgba(255,255,255,.02); }

/* ---- CTA BOX ---- */
.cta-box {
  display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center;
  background: linear-gradient(120deg, #0e1228, #131836);
  border: 1px solid rgba(79,140,255,.25); border-radius: 24px; padding: 2rem 2.2rem;
  box-shadow: 0 0 0 1px rgba(79,140,255,.05), var(--shadow);
}
.cta-box h2 { color: #fff; font-size: clamp(1.4rem, 2vw, 2rem); margin-bottom: .5rem; }
.cta-box .eyebrow { margin-bottom: .6rem; }
.cta-box p { color: var(--text-soft); margin: 0; max-width: 52ch; }

/* ---- FOOTER ---- */
.footer { padding: 2.5rem 0 3.5rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 2rem; align-items: start; }
.footer-card { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem; }
.small { font-size: .91rem; color: var(--text-soft); }
.hr { height: 1px; background: var(--line); margin: 1.2rem 0; }
.small-links { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; }
.small-links a { color: var(--brand); font-weight: 600; font-size: .9rem; transition: color .14s; }
.small-links a:hover { color: #93b8ff; }

/* ---- MISC ---- */
.muted { color: var(--text-soft); }
.code-block { background: #060812; color: #a5b4fc; border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.2rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; overflow: auto; }
.note { margin-top: .9rem; padding: .9rem 1rem; border-radius: 14px; background: rgba(79,140,255,.07); border: 1px solid rgba(79,140,255,.15); color: var(--text-soft); }
.page-hero { margin-top: 2rem; }
.page-hero p { max-width: 68ch; color: var(--text-soft); }
.placeholder-card { background: linear-gradient(135deg, rgba(79,140,255,.07), rgba(167,139,250,.05)); min-height: 160px; display: flex; flex-direction: column; justify-content: center; }
.placeholder-card .placeholder-badge { display: inline-flex; align-self: flex-start; background: rgba(79,140,255,.12); color: var(--brand); border: 1px solid rgba(79,140,255,.2); border-radius: 999px; padding: .42rem .75rem; font-size: .8rem; font-weight: 700; margin-bottom: .9rem; }
.split-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 1.5rem; align-items: center; }

/* ---- LIGHTBOX ---- */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(5,7,18,.88); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; padding: 1rem; z-index: 300; }
.lightbox-overlay.open { display: flex; }
.lightbox-dialog { position: relative; background: var(--bg-card); border: 1px solid rgba(79,140,255,.25); border-radius: 24px; overflow: hidden; box-shadow: 0 32px 96px rgba(0,0,0,.7); max-width: min(1200px,96vw); width: auto; }
.lightbox-image-wrap { display: flex; align-items: center; justify-content: center; background: var(--bg-card); max-height: calc(92vh - 72px); }
.lightbox-dialog img { display: block; max-width: min(1200px,96vw); max-height: calc(92vh - 72px); width: auto; height: auto; }
.lightbox-caption { padding: 1rem 1.1rem 1.1rem; border-top: 1px solid var(--line); background: var(--bg-card); }
.lightbox-caption .shot-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.lightbox-caption strong { display: block; font-size: 1rem; color: var(--text); margin: .2rem 0; }
.lightbox-caption span { display: block; color: var(--text-soft); line-height: 1.55; font-size: .92rem; }
.lightbox-close { position: absolute; top: .75rem; right: .75rem; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .16s; }
.lightbox-close:hover { background: rgba(255,255,255,.15); }

/* ---- REVEAL ANIMATIONS ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1180px) {
  .brand-subtitle { display: none; }
  .site-nav a { padding: .48rem .58rem; font-size: .8rem; }
}
@media (max-width: 1000px) {
  .hero-grid, .split-grid, .footer-grid, .split-heading, .cta-box { grid-template-columns: 1fr; }
  .hero-showcase.single { max-width: 100%; justify-self: stretch; margin-left: 0; }
  .stats-grid, .benefits-grid, .category-grid, .pricing-grid, .mini-grid, .details-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cta-box { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .site-nav { position: absolute; right: 1rem; top: 68px; background: #0d1122; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 18px; padding: .65rem; min-width: 220px; display: none; flex-direction: column; align-items: stretch; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .8rem 1rem; }
  h1 { max-width: none; }
  .stats-grid, .benefits-grid, .category-grid, .pricing-grid, .mini-grid, .details-grid { grid-template-columns: 1fr; }
  .container { width: min(var(--max), calc(100% - 1.4rem)); }
  .hero { padding: 3.5rem 0 2rem; }
  .section { padding: 2rem 0; }
  .screenshot-grid { grid-template-columns: 1fr; }
  .lightbox-dialog { max-width: 96vw; }
  .lightbox-dialog img { max-width: 96vw; max-height: 74vh; }
}

/* ---- CAROUSEL HERO ---- */
.hero-carousel { position: relative; }
.carousel-slide {
  display: none;
  animation: fadeSlide .45s ease;
}
.carousel-slide.active { display: block; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.carousel-dots {
  display: flex; justify-content: center; gap: .5rem;
  margin-top: .75rem;
}
.carousel-dot {
  width: 8px; height: 8px; border-radius: 999px;
  border: none; background: rgba(255,255,255,.2);
  cursor: pointer; padding: 0;
  transition: background .2s, width .2s;
}
.carousel-dot.active {
  background: var(--brand);
  width: 24px;
}
