/* Vigia · page d'accueil (/vigia). Polices : celles du moteur (vigia.css), auto-hébergées. */
:root {
  --night: #060c18; --night-2: #0b1628; --night-line: rgba(34, 211, 238, .16);
  --cyan: #22d3ee; --brand: #0891b2; --brand-d: #0e7490; --orange: #fb923c; --hot: #c2410c;
  --ink: #0f172a; --muted: #5b6b7d; --line: #dbe4ee; --bg: #f6f8fb; --band: #eef3f8; --card: #fff;
  --head: "Vigia Grotesk", system-ui, sans-serif; --body: "Vigia Inter", system-ui, sans-serif; --mono: "Vigia Mono", ui-monospace, monospace;
  --r: 14px; --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 32px -12px rgba(15, 23, 42, .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-d); }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.sp { flex: 1; }

/* ---- Boutons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 15px/1 var(--body); text-decoration: none; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .sw:focus-visible, summary:focus-visible, .tabs a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn.small { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn.big { min-height: 52px; padding: 14px 24px; font-size: 16px; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- Barre du haut */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(6, 12, 24, .86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--night-line); }
.topbar .wrap { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 700 19px/1 var(--head); letter-spacing: .01em; }
.logo small { font-weight: 500; color: #8fb2d0; font-size: 15px; }
.logo img { border-radius: 7px; }
.tabs { display: flex; gap: 4px; }
.tabs a { color: #b9d3ea; text-decoration: none; font-size: 14px; padding: 8px 12px; border-radius: 8px; }
.tabs a:hover { color: #fff; background: rgba(34, 211, 238, .1); }

/* ---- Hero */
.hero { position: relative; overflow: hidden; background: var(--night); color: #d6ecff; padding: 72px 0 64px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--night-line) 1px, transparent 1px), linear-gradient(90deg, var(--night-line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%); opacity: .55; }
.hero::after { content: ""; position: absolute; z-index: -1; width: 900px; height: 900px; left: 50%; top: -420px; transform: translateX(-50%); background: radial-gradient(circle, rgba(34, 211, 238, .22), transparent 62%); }
.hero-txt { max-width: 860px; margin: 0 auto; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border: 1px solid var(--night-line); border-radius: 999px; font: 500 12.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); background: rgba(34, 211, 238, .06); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(251, 146, 60, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(251, 146, 60, 0); } 100% { box-shadow: 0 0 0 0 rgba(251, 146, 60, 0); } }
.hero h1 { margin: 22px 0 18px; color: #fff; font-size: clamp(40px, 6.4vw, 74px); font-weight: 700; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--cyan), #7dd3fc 55%, var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin: 0 auto; max-width: 700px; font-size: clamp(17px, 2vw, 19.5px); color: #a9c4dc; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.hero .btn.ghost { background: transparent; color: #e6f4ff; border-color: rgba(214, 236, 255, .25); }
.hero .btn.ghost:hover { border-color: var(--cyan); }
.facts { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 40px; list-style: none; padding: 0; margin: 34px 0 0; font: 500 12.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #8fb2d0; }
.facts b { display: block; font: 700 30px/1.1 var(--head); letter-spacing: -.02em; color: #fff; text-transform: none; margin-bottom: 2px; }

.showcase { margin-top: 54px; }
.switch { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
.sw { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(214, 236, 255, .18); background: rgba(12, 24, 44, .7); color: #b9d3ea; font: 500 13.5px/1 var(--body); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.sw:hover { color: #fff; border-color: rgba(34, 211, 238, .5); }
.sw.on { color: #fff; border-color: var(--cyan); background: rgba(34, 211, 238, .14); }
.sw.run::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--cyan); transform-origin: left; animation: run 7s linear forwards; }
@keyframes run { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.d { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.d.night { background: conic-gradient(#22d3ee 0 50%, #060c18 0); box-shadow: 0 0 0 1px #22d3ee; }
.d.day { background: conic-gradient(#0891b2 0 50%, #eef3f8 0); }
.d.paper { background: conic-gradient(#b4351a 0 50%, #f5efe3 0); }
.d.pop { background: conic-gradient(#4f46e5 0 50%, #fb7185 0); }
.d.control { background: conic-gradient(#2dd4bf 0 50%, #f5a524 0); }
.d.aurora { background: conic-gradient(#a78bfa 0 50%, #22d3ee 0); }
.d.corporate { background: conic-gradient(#2563eb 0 50%, #f5f6f8 0); }
.d.bento { background: conic-gradient(#c2613b 0 50%, #dfe7d8 0); }
.d.neon { background: conic-gradient(#ff2bd6 0 50%, #00f0ff 0); }
.d.swiss { background: conic-gradient(#e11d2e 0 50%, #ffffff 0); }
.d.terminal { background: conic-gradient(#33ff66 0 50%, #040904 0); box-shadow: 0 0 0 1px #33ff66; }
.d.holo { background: conic-gradient(#2ee6d6 0 50%, #1d2f38 0); box-shadow: 0 0 0 1px #2ee6d6; }

.screen { border-radius: 16px; overflow: hidden; border: 1px solid rgba(34, 211, 238, .28); background: #0b1628; box-shadow: 0 40px 120px -30px rgba(34, 211, 238, .35), 0 30px 60px -30px rgba(0, 0, 0, .8); }
.bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #0f1d33; border-bottom: 1px solid rgba(34, 211, 238, .14); }
.bar > span { width: 11px; height: 11px; border-radius: 50%; background: #2b3d57; }
.bar small { margin-left: 10px; font: 500 12px/1 var(--mono); color: #8fb2d0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .live { margin-left: auto; font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; font-style: normal; color: var(--orange); white-space: nowrap; }
.viewport { position: relative; aspect-ratio: 1440 / 900; overflow: hidden; background: #060c18; }
.viewport .still { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.viewport .stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; }
.viewport .stage > .vg { height: 900px; overflow: hidden; }
.viewport.on .stage { transition: opacity .16s; }
.viewport.swap .stage { opacity: 0; }
.caption { margin: 14px 0 0; text-align: center; font-size: 14px; color: #7f9cb8; }

/* ---- Sources K2 */
.sources { background: var(--night-2); color: #b9d3ea; border-top: 1px solid var(--night-line); border-bottom: 1px solid var(--night-line); }
.sources .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; padding-top: 20px; padding-bottom: 20px; }
.sources p { margin: 0; font: 500 12px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.sources ul { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; margin: 0; padding: 0; }
.sources li { display: flex; align-items: baseline; gap: 8px; }
.sources b { color: #fff; font: 600 15px/1.2 var(--head); }
.sources span { font: 400 12.5px/1 var(--mono); color: #7f9cb8; }

/* ---- Sections */
section { padding: 96px 0; }
section.hero { padding: 72px 0 64px; }
section.sources { padding: 0; }
.band { background: var(--band); }
.head { max-width: 760px; margin-bottom: 48px; }
.head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { margin: 0 0 12px; font: 600 12.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.head h2 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 700; }
.head p:not(.eyebrow) { margin: 16px 0 0; color: var(--muted); font-size: 18px; }

/* ---- Questions */
.q-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.q { position: relative; padding: 26px 22px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.q::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--brand), var(--orange)); }
.q-n { font: 600 13px/1 var(--mono); color: var(--hot); letter-spacing: .08em; }
.q h3 { margin: 12px 0 10px; font-size: 21px; }
.q p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.q small { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); font: 500 12px/1.4 var(--mono); color: var(--brand-d); }

/* ---- Étapes */
.features { display: flex; flex-direction: column; gap: 72px; }
.feature { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.feature.flip .feature-txt { order: 2; }
.num-badge { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--night); color: var(--cyan); font: 700 18px/1 var(--head); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .4); }
.feature h3 { margin: 18px 0 12px; font-size: 30px; }
.feature p { margin: 0; color: var(--muted); font-size: 17px; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-size: 15.5px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 4px; background: rgba(8, 145, 178, .12); box-shadow: inset 0 0 0 1px rgba(8, 145, 178, .5); }
.ticks li::after { content: ""; position: absolute; left: 5px; top: 8px; width: 6px; height: 8px; border: solid var(--brand-d); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.frame { border-radius: 12px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.frame .bar { background: #f1f5f9; border-bottom: 1px solid var(--line); }
.frame .bar > span { background: #cbd5e1; }
.frame .bar small { color: var(--muted); }
.studio-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; margin-top: 64px; }

/* ---- Thèmes */
.dark { background: var(--night); color: #d6ecff; }
.dark .eyebrow { color: var(--cyan); }
.dark .head h2 { color: #fff; }
.dark .head p:not(.eyebrow) { color: #a9c4dc; }
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.theme { margin: 0; border-radius: 12px; overflow: hidden; background: #0b1628; border: 1px solid rgba(214, 236, 255, .12); transition: transform .2s, border-color .2s; }
.theme:hover { transform: translateY(-3px); border-color: rgba(34, 211, 238, .5); }
.theme.wide { grid-column: span 4; display: grid; grid-template-columns: 2fr 1fr; align-items: stretch; }
.theme.wide figcaption { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.theme.wide figcaption b { font-size: 28px; }
.theme img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; }
.theme figcaption { padding: 14px 16px 16px; display: grid; gap: 4px; }
.theme figcaption b { font: 700 17px/1.2 var(--head); color: #fff; }
.theme figcaption span { font-size: 13.5px; color: #8fb2d0; }
.theme figcaption em { font: 600 11px/1 var(--mono); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.theme[hidden] { display: none; }
.themes.filtered .theme.wide { grid-column: auto; display: block; }
@media (min-width: 1021px) { .themes:not(.filtered) .theme:nth-last-child(-n+2) { grid-column: span 2; } .themes:not(.filtered) .theme:nth-last-child(-n+2) img { aspect-ratio: 16 / 7; } }
.themes.filtered .theme.wide figcaption { padding: 14px 16px 16px; }
.themes.filtered .theme.wide figcaption b { font-size: 17px; }
.style-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -16px 0 28px; }
.style-filter button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 15px; border-radius: 999px; border: 1px solid rgba(214, 236, 255, .18); background: rgba(12, 24, 44, .7); color: #b9d3ea; font: 500 14px/1 var(--body); cursor: pointer; }
.style-filter button em { font: 600 12px/1 var(--mono); font-style: normal; color: #7f9cb8; }
.style-filter button:hover { color: #fff; border-color: rgba(34, 211, 238, .5); }
.style-filter button.on { color: #fff; border-color: var(--cyan); background: rgba(34, 211, 238, .14); }
.style-filter button.on em { color: var(--cyan); }
.style-filter button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ---- Catalogue */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.cat:nth-child(2) { grid-row: span 2; }
.cat header { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 10px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cat h3 { font-size: 21px; }
.cat em { font: 700 13px/1 var(--mono); font-style: normal; color: var(--hot); background: rgba(194, 65, 12, .08); padding: 5px 8px; border-radius: 6px; }
.cat header p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 14px; }
.cat ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat:nth-child(2) ul { grid-template-columns: 1fr; }
.cat li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; background: var(--bg); font-size: 14px; line-height: 1.25; }
.cat svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Dans K2 */
.inside { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mode { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.mode header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.mode .ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--night); flex: none; }
.mode .ico svg { width: 22px; height: 22px; fill: none; stroke: var(--cyan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mode h3 { font-size: 18px; }
.mode p { margin: 0; color: var(--muted); font-size: 15px; }
.flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 40px; font: 500 13px/1.2 var(--mono); }
.flow span { padding: 10px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.flow span.k2 { background: var(--night); color: #d6ecff; border-color: var(--night); }
.flow b { color: var(--hot); }

/* ---- FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 22px; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 30px 18px 0; position: relative; font: 600 17px/1.35 var(--head); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font: 400 24px/1 var(--body); color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); }

/* ---- Fin */
.final { padding-top: 24px; }
.final .box { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: 72px 32px; border-radius: 22px; background: var(--night); color: #a9c4dc; }
.final .box::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--night-line) 1px, transparent 1px), linear-gradient(90deg, var(--night-line) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse 70% 80% at 50% 100%, #000, transparent 70%); }
.final .box::after { content: ""; position: absolute; z-index: -1; width: 700px; height: 700px; left: 50%; bottom: -480px; transform: translateX(-50%); background: radial-gradient(circle, rgba(251, 146, 60, .25), transparent 60%); }
.final h2 { color: #fff; font-size: clamp(30px, 4.4vw, 48px); }
.final p { max-width: 600px; margin: 16px auto 0; font-size: 18px; }
.final .btn.ghost { background: transparent; color: #e6f4ff; border-color: rgba(214, 236, 255, .25); }

footer { padding: 36px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
footer .logo { color: var(--ink); font-size: 17px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer nav a { color: var(--muted); text-decoration: none; }
footer nav a:hover { color: var(--ink); }
footer .legal { flex-basis: 100%; margin: 0; font-size: 12.5px; }

/* ---- Apparition */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.seen { opacity: 1; transform: none; }

/* ---- Le tableau du haut garde sa mise en page d'écran large, même sur téléphone (vigia.css l'empile sous 860 px) */
@media (max-width: 860px) {
  .viewport .vg-grid { display: grid; }
  .viewport .vg-in { padding: 22px 26px 30px; }
  .viewport .vg-b { min-height: 0; }
  .viewport .vg-filter select { max-width: 220px; }
}

/* ---- Écrans moyens et petits */
@media (max-width: 1020px) {
  .tabs { display: none; }
  .q-grid, .inside { grid-template-columns: 1fr 1fr; }
  .cats { grid-template-columns: 1fr 1fr; }
  .cat:nth-child(2) { grid-row: auto; }
  .cat:nth-child(2) ul { grid-template-columns: 1fr 1fr; }
  .themes { grid-template-columns: 1fr 1fr; }
  .theme.wide { grid-column: span 2; grid-template-columns: 1fr; }
  .theme.wide figcaption { padding: 16px; }
  .theme.wide figcaption b { font-size: 20px; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .feature-txt { order: 0; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  section { padding: 64px 0; }
  .hero { padding: 48px 0 44px; }
  .topbar .long { display: none; }
  .facts { gap: 10px 26px; }
  .facts b { font-size: 26px; }
  .showcase { margin-top: 40px; margin-left: -6px; margin-right: -6px; }
  .switch { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .sw { flex: none; }
  .bar .live { display: none; }
  .q-grid, .inside, .cats, .themes { grid-template-columns: 1fr; }
  .theme.wide { grid-column: auto; }
  .cat ul, .cat:nth-child(2) ul { grid-template-columns: 1fr; }
  .head h2 { font-size: 30px; }
  .feature h3 { font-size: 25px; }
  .final .box { padding: 52px 20px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pill .dot { animation: none; }
  .btn, .theme, .btn .arrow { transition: none; }
}
