:root {
  --bg: #0b0d14;
  --bg-alt: #10131c;
  --card: #151926;
  --border: #232a3d;
  --text: #e8ebf5;
  --muted: #8d95ad;
  --accent: #6c7bff;
  --accent-2: #22d3ee;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
:root[data-theme="light"] {
  --bg: #fafbff;
  --bg-alt: #f0f2fa;
  --card: #ffffff;
  --border: #e2e6f2;
  --text: #141828;
  --muted: #5d6580;
  --shadow: 0 20px 50px rgba(40, 50, 100, .15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent); font-weight: 600; font-size: .8rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.2; letter-spacing: -.6px; margin-bottom: 14px; }
.section { padding: 70px 0; }

/* Barre du haut */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--border); }
.top__inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.back { font-weight: 600; font-size: .92rem; color: var(--muted); transition: color .2s; }
.back:hover { color: var(--text); }
.lang { display: flex; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.lang button { border: 0; background: none; color: var(--muted); padding: 0 10px; height: 30px; border-radius: 7px; font: 600 .8rem 'Inter', sans-serif; cursor: pointer; }
.lang button.active { background: var(--accent); color: #fff; }

/* En-tête */
.hero { padding: 64px 0 20px; text-align: center; }
.badge { display: inline-block; font-size: .8rem; font-weight: 700; padding: 6px 14px; border-radius: 999px; color: #f59e0b; background: rgba(245, 158, 11, .12); margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; letter-spacing: -1.5px; line-height: 1.05;
  background: linear-gradient(90deg, var(--text), var(--accent) 70%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 720px; margin: 18px auto 34px; color: var(--muted); font-size: 1.1rem; }
.meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 48px; text-align: left; }
.meta div { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.meta dt { font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 600; }
.meta dd { font-weight: 600; font-size: .92rem; margin-top: 4px; }

/* Cadre « navigateur » */
.frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: #0d1017; cursor: zoom-in; }
.frame__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #161a24; }
.frame__bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.frame__bar i:nth-child(2) { background: #febc2e; }
.frame__bar i:nth-child(3) { background: #28c840; }
.frame__bar span { margin-left: 10px; color: #6b7390; font: .76rem 'JetBrains Mono', monospace; }

/* Besoin / solution */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.story article { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.story h2 { font-size: 1.4rem; }
.story p:last-child { color: var(--muted); }

/* Modules */
.modules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.mod { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: transform .25s, border-color .25s; }
.mod:hover { transform: translateY(-4px); border-color: var(--accent); }
.mod span { font-size: 1.6rem; }
.mod h3 { font-size: 1rem; margin: 10px 0 6px; }
.mod p { font-size: .88rem; color: var(--muted); }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.shot { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); cursor: zoom-in; transition: transform .25s, box-shadow .25s; text-align: left; padding: 0; font: inherit; color: inherit; }
.shot:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.shot img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; width: 100%; }
.shot span { display: block; padding: 12px 14px; font-weight: 600; font-size: .9rem; }

/* Appel à l'action */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 36px; border-radius: 20px; border: 1px solid var(--border);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--card)), var(--card)); }
.cta p { color: var(--muted); max-width: 560px; }
.btn { flex-shrink: 0; padding: 13px 26px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #8a6cff); color: #fff; font-weight: 600; transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(108, 123, 255, .4); }

.footer { padding: 30px 0 40px; color: var(--muted); font-size: .88rem; border-top: 1px solid var(--border); }

/* Visionneuse */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(5, 7, 12, .92); display: flex; align-items: center; justify-content: center; padding: 20px 70px; }
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: 1200px; width: 100%; }
.lightbox img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: 10px; }
.lightbox figcaption { color: #e8ebf5; text-align: center; margin-top: 12px; font-weight: 600; }
.lb-close, .lb-nav { position: absolute; border: 0; background: rgba(255, 255, 255, .1); color: #fff; border-radius: 50%; cursor: pointer; font-size: 1.6rem; width: 46px; height: 46px; display: grid; place-items: center; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-close { top: 18px; right: 18px; font-size: 1.1rem; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }

@media (max-width: 900px) {
  .meta, .modules { grid-template-columns: 1fr 1fr; }
  .story { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .meta, .modules, .gallery { grid-template-columns: 1fr; }
  .lightbox { padding: 20px 10px; }
  .lb-nav { top: auto; bottom: 18px; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
