:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --text: #141821;
  --muted: #5b6475;
  --border: #dfe3ec;
  --accent: #3d63e6;
  --accent-soft: #e6ecff;
  --shadow: 0 1px 2px rgba(20, 24, 33, .05), 0 8px 24px rgba(20, 24, 33, .06);
  --radius: 14px;
  --c-quotidien: #0f9d76;
  --c-ia: #9b4de0;
  --c-finance: #d9822b;
  --c-data: #d6456b;
  --c-infra: #3d63e6;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1017; --surface: #151a23; --surface-2: #1c2230; --text: #e8ebf2; --muted: #98a1b3;
    --border: #262d3b; --accent: #7896ff; --accent-soft: #1d2747;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --c-quotidien: #3cc79c; --c-ia: #bb86f5; --c-finance: #f0a35a; --c-data: #f07494; --c-infra: #7896ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1017; --surface: #151a23; --surface-2: #1c2230; --text: #e8ebf2; --muted: #98a1b3;
  --border: #262d3b; --accent: #7896ff; --accent-soft: #1d2747;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --c-quotidien: #3cc79c; --c-ia: #bb86f5; --c-finance: #f0a35a; --c-data: #f07494; --c-infra: #7896ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font: .88em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.muted { color: var(--muted); }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(16px, calc((100vw - 1120px) / 2));
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; }
.topbar nav { display: flex; align-items: center; gap: 18px; font-size: .95rem; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover { color: var(--text); text-decoration: none; }
.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 1rem;
}
.icon-btn:hover { border-color: var(--accent); }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.hero { padding: 72px 0 40px; }
.eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.1; margin: 0 0 16px; letter-spacing: -.02em; }
.accent { color: var(--accent); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 640px; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 36px; max-width: 720px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.6rem; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .85rem; }

.section { padding: 40px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: 1.6rem; letter-spacing: -.01em; }
.section-head p { margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .88rem;
}
.chip:hover { color: var(--text); }
.chip[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.card {
  --cat: var(--accent);
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); cursor: pointer; text-align: left; font: inherit; color: inherit;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-2px); border-color: var(--cat); outline: none; }
.card-top { display: flex; align-items: center; gap: 12px; }
.card-icon {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px;
  background: color-mix(in srgb, var(--cat) 15%, transparent); color: var(--cat);
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { margin: 0; font-size: 1.1rem; }
.card .tagline { margin: 0; color: var(--muted); font-size: .9rem; }
.card .desc { margin: 0; font-size: .95rem; }
.badge { margin-left: auto; align-self: flex-start; font-size: .75rem; font-weight: 600; color: var(--cat);
  background: color-mix(in srgb, var(--cat) 12%, transparent); padding: 3px 9px; border-radius: 999px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag { font-size: .78rem; background: var(--surface-2); color: var(--muted); padding: 3px 8px; border-radius: 6px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 12px; }
.card-foot .host { font-family: ui-monospace, Menlo, monospace; }

.cat-quotidien { --cat: var(--c-quotidien); }
.cat-ia { --cat: var(--c-ia); }
.cat-finance { --cat: var(--c-finance); }
.cat-data { --cat: var(--c-data); }
.cat-infra { --cat: var(--c-infra); }

.infra { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.infra-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.infra-group h3 { margin: 0 0 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.infra-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.infra-group li strong { display: block; font-size: .95rem; }
.infra-group li span { color: var(--muted); font-size: .86rem; }

.pipeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
.pipeline li { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.pipeline li p { margin: 6px 0 0; color: var(--muted); font-size: .88rem; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; margin-right: 8px; }

.footer { max-width: 1120px; margin: 40px auto 0; padding: 24px 16px 40px; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }

.detail {
  width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  border: 1px solid var(--border); border-radius: 18px; padding: 28px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.detail::backdrop { background: rgba(10, 12, 18, .55); backdrop-filter: blur(3px); }
.detail .close { position: absolute; top: 14px; right: 14px; }
.detail h3 { margin: 0; font-size: 1.4rem; }
.detail h4 { margin: 22px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.detail ul { margin: 0; padding-left: 20px; }
.detail .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .92rem; border: 1px solid var(--border); color: var(--text); background: var(--surface-2); }
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }

@media (max-width: 860px) {
  .pipeline { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .topbar nav a { display: none; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}

/* Aperçus des applications */
.shot { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg); }
.shot-bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.shot-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.shot-bar span { margin-left: 8px; font: 11px ui-monospace, Menlo, monospace; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot svg, .shot img { display: block; width: 100%; aspect-ratio: 324 / 180; height: auto; object-fit: cover; object-position: top; }
.shot svg { stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shot .a { fill: var(--cat); }
.shot .a2 { fill: color-mix(in srgb, var(--cat) 28%, var(--surface)); }
.shot .s { fill: var(--surface-2); }
.shot .b { fill: var(--border); }
.shot .m { fill: color-mix(in srgb, var(--muted) 45%, var(--surface)); }
.shot .t { fill: color-mix(in srgb, var(--text) 75%, var(--surface)); }
.shot .w { fill: #fff; }
.shot .ok { fill: #22a06b; }
.shot .ko { fill: #e5484d; }
.shot .card-bg { fill: var(--surface); }
.shot [class^="stroke"] { fill: none; }
.shot .stroke-a { stroke: var(--cat); }
.shot .stroke-a2 { stroke: color-mix(in srgb, var(--cat) 35%, var(--surface)); }
.shot .stroke-m { stroke: color-mix(in srgb, var(--muted) 55%, var(--surface)); }
.shot .stroke-b { stroke: var(--border); }
.shot .stroke-w { stroke: #fff; }
.shot circle.b[fill="none"] { fill: none; stroke: var(--border); }
.card .shot { margin: -8px -8px 4px; transition: border-color .15s ease; }
.card:hover .shot { border-color: color-mix(in srgb, var(--cat) 50%, var(--border)); }
.detail-shot { --cat: var(--accent); margin-top: 18px; }
.detail-shot.cat-quotidien { --cat: var(--c-quotidien); }
.detail-shot.cat-ia { --cat: var(--c-ia); }
.detail-shot.cat-finance { --cat: var(--c-finance); }
.detail-shot.cat-data { --cat: var(--c-data); }
.detail-shot.cat-infra { --cat: var(--c-infra); }

/* Démos : affiche dans la carte, lecture dans le lecteur */
.stage { position: relative; aspect-ratio: 16 / 9; background: var(--bg); overflow: hidden; }
.stage img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.stage--mobile { display: grid; place-items: center; padding: 6% 0 0;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--cat) 22%, var(--surface)), var(--surface-2)); }
.phone { height: 100%; aspect-ratio: 390 / 780; border-radius: 14px 14px 0 0; overflow: hidden;
  border: 3px solid color-mix(in srgb, var(--text) 85%, transparent); border-bottom: 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18); background: #000; }
.detail-shot .stage--mobile { aspect-ratio: 4 / 3; padding-top: 4%; }
.detail-shot .phone { border-radius: 22px 22px 0 0; border-width: 5px; }
.demo-note { margin: 10px 0 0; font-size: .82rem; color: var(--muted); }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px; border: 0; border-radius: 999px; font: 600 .85rem/1 system-ui, sans-serif; color: #fff; cursor: pointer;
  background: rgba(15, 18, 26, .72); backdrop-filter: blur(6px); box-shadow: 0 4px 18px rgba(0, 0, 0, .25); transition: transform .15s, background .15s; }
.play-ico { width: 22px; height: 22px; border-radius: 50%; background: var(--cat, var(--accent)); position: relative; }
.play-ico::after { content: ""; position: absolute; left: 8px; top: 6px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #fff; }
.play:hover, .play:focus-visible { background: rgba(15, 18, 26, .9); transform: translate(-50%, -50%) scale(1.06); outline: none; }
.detail-shot .play { font-size: .95rem; padding: 10px 18px 10px 12px; }
.detail-shot .play-ico { width: 26px; height: 26px; }
.detail-shot .play-ico::after { left: 10px; top: 8px; }

/* Lecteur plein écran */
.player { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(8, 10, 14, .94); color: #fff; display: none; flex-direction: column; }
.player[open] { display: flex; }
.player::backdrop { background: rgba(8, 10, 14, .6); }
.player-bar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; font-size: .92rem; }
.player-bar strong { font-size: 1rem; }
.player-note { color: rgba(255, 255, 255, .6); font-size: .82rem; margin-right: auto; }
.player-link { color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 8px; padding: 4px 10px; font-size: .82rem; }
.player-link:hover { text-decoration: none; border-color: #fff; }
.player-bar form { margin: 0; }
.player-close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1rem; cursor: pointer; }
.player-close:hover { background: rgba(255, 255, 255, .24); }
.player-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 16px 16px; }
/* La vidéo garde son format et tient dans l'écran, quelle que soit sa taille */
.player video { --ar: 16 / 9; aspect-ratio: var(--ar); width: min(100%, calc((100dvh - 76px) * (var(--ar)))); max-height: 100%;
  border-radius: 10px; background: #000; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.player video.is-mobile { --ar: 1 / 2; border-radius: 22px; }
@media (max-width: 560px) {
  .player-note { display: none; }
  .player-bar strong { margin-right: auto; }
  .player-stage { padding: 0 8px 8px; }
}

/* Choix de la langue */
.lang-btn { height: 34px; min-width: 40px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: 600 .8rem/1 system-ui, sans-serif; letter-spacing: .04em; cursor: pointer; }
.lang-btn:hover { border-color: var(--accent); }
