/* Witensi — feuille de style unique. Mobile-first, propriétés logiques (RTL ok). */
:root {
  --bg: #0b0f1a;
  --bg-2: #111728;
  --bg-3: #182036;
  --text: #e8ebf5;
  --muted: #a3acc4;
  --line: rgba(255, 255, 255, 0.09);
  --violet: #7c3aed;
  --blue: #2f6bff;
  --cyan: #19c8f0;
  --accent: #4f8cff;
  --grad: linear-gradient(100deg, var(--violet), var(--blue) 55%, var(--cyan));
  --radius: 20px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --max: 1200px;
  --gutter: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }
a:hover { color: #7fe3ff; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; background: var(--cyan); color: #04121a; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.game-tagline { font-weight: 700; font-size: 1.1rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-tagline { font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 0.9em; }
.hero-ambition, .section-highlight { font-weight: 800; font-size: 1.08rem; color: #fff; }
.kicker { color: var(--cyan); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 700; margin-bottom: 0.6em; }
.lead { font-size: 1.1rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(47, 107, 255, 0.35); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 36px rgba(47, 107, 255, 0.5); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--text); background: rgba(255, 255, 255, 0.04); }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 15, 26, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand img { width: 150px; height: auto; }
.nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 48px; height: 48px; padding: 10px; background: transparent; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.nav-toggle-bar { display: block; width: 100%; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.site-nav { display: none; flex-basis: 100%; padding-block: 8px 16px; }
.site-nav.is-open { display: flex; flex-direction: column; gap: 14px; }
.site-nav ul { display: flex; flex-direction: column; gap: 4px; }
.site-nav a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.07); color: #fff; }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--cyan); }
.lang-select select { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex !important; flex-basis: auto; align-items: center; gap: 18px; padding: 0; }
  .site-nav ul { flex-direction: row; gap: 2px; }
  .lang-select select { width: auto; max-width: 180px; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding-block: 48px 40px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -20% auto; height: 120%; background: radial-gradient(60% 60% at 30% 20%, rgba(124, 58, 237, 0.35), transparent 70%), radial-gradient(50% 50% at 80% 10%, rgba(25, 200, 240, 0.25), transparent 70%); pointer-events: none; }
.hero > .container { position: relative; }
.hero-grid { display: grid; gap: 28px; }
.media-card { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--bg-2); }
.hero-game .hero-game-media { margin-bottom: 28px; }
.hero-game-copy { max-width: 760px; }
@media (min-width: 1000px) {
  .hero { padding-block: 72px 56px; }
  .hero-grid { grid-template-columns: 4fr 6fr; align-items: center; gap: 48px; }
}

/* ---------- sections ---------- */
.section { padding-block: 56px; }
.section + .section { border-top: 1px solid var(--line); }
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) {
  .section { padding-block: 88px; }
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .split-reverse .split-media { order: 2; }
  .split-reverse .split-copy { order: 1; }
}
.values { display: grid; gap: 16px; }
.values li { padding: 22px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); }
.values h3 { margin-bottom: 0.3em; color: #fff; }
.value-num { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.value-sep { color: var(--muted); margin-inline: 8px; }
.values p { margin: 0; color: var(--muted); }
.projects { display: grid; gap: 20px; }
.project-card { display: grid; gap: 18px; padding: 24px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); align-items: center; }
.project-card img { width: min(360px, 100%); margin-inline: auto; }
.project-more { background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(25, 200, 240, 0.12)); border-style: dashed; }
.project-more p { color: var(--muted); margin: 0; }
@media (min-width: 700px) { .project-card { grid-template-columns: 1fr 1.4fr; } .project-more { grid-template-columns: 1fr; } }

/* ---------- page jeu ---------- */
.game-logo { width: min(380px, 80%); margin-bottom: 20px; }
.store-zone { position: relative; width: min(440px, 100%); margin-inline: auto; }
.store-zone img { width: 100%; }
.store-hit { position: absolute; display: block; border-radius: 12px; outline-offset: 2px; }
.store-hit:not(.is-disabled):hover { box-shadow: 0 0 0 3px var(--cyan); }
.store-hit.is-disabled { cursor: not-allowed; }
.store-note { margin-top: 1em; color: var(--muted); font-size: 0.95rem; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(25, 200, 240, 0.16); color: var(--cyan); font-weight: 700; font-size: 0.8rem; margin-inline-end: 6px; }
.store-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.store-btn.is-disabled { opacity: 0.6; cursor: not-allowed; }
.store-btn em { font-style: normal; font-size: 0.85em; color: var(--muted); margin-inline-start: 6px; }
.store-list li { padding-block: 4px; }
.store-link.is-disabled { color: var(--muted); }
.store-link.is-disabled em { font-style: normal; font-size: 0.85em; }

/* carousel */
.section-carousel { padding-inline: 0; }
.carousel { position: relative; margin-top: 8px; }
.carousel-controls { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 16px; }
.carousel-btn { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--bg-2); color: var(--text); font-size: 1.1rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.carousel-btn:hover { background: var(--bg-3); }
.carousel-pause[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #fff; }
.carousel-viewport { overflow: hidden; padding-inline: var(--gutter); }
.carousel-track { display: flex; gap: 16px; transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); will-change: transform; }
.carousel-slide { flex: 0 0 min(36vw, 160px); }
.carousel-slide img { width: 100%; aspect-ratio: 720 / 1601; object-fit: cover; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-2); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.carousel-dot { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 1.5px solid var(--muted); background: transparent; cursor: pointer; }
.carousel-dot.is-active { background: var(--cyan); border-color: var(--cyan); }
@media (prefers-reduced-motion: reduce) { .carousel-track { transition: none; } }
@media (min-width: 1200px) { .carousel-viewport { padding-inline: calc((100vw - var(--max)) / 2 + var(--gutter)); } }

.story-text { max-width: 820px; }
.modes { display: grid; gap: 20px; margin-top: 32px; }
.mode-card { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; padding: 18px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); }
.mode-media img { width: 96px; aspect-ratio: 720 / 1601; object-fit: cover; border-radius: 14px; }
.mode-copy h3 { margin-bottom: 0.1em; text-transform: uppercase; letter-spacing: 0.02em; }
.mode-lead { margin: 0 0 0.4em; font-weight: 700; color: var(--cyan); }
.mode-copy p { margin: 0; color: var(--muted); }
@media (min-width: 800px) { .modes { grid-template-columns: 1fr 1fr; } }

/* ---------- pages texte ---------- */
.page-head { padding-block: 48px 8px; }
.page-head--tight { padding-block: 28px 8px; }
.page-head .lead { max-width: 760px; }
.support-banner { padding-block: 28px 0; }
.support-banner-img {
  display: block; width: 100%; height: auto; max-width: 1040px; margin-inline: auto;
  border-radius: 18px; border: 1px solid var(--line);
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.75);
}
.meta-line { color: var(--muted); font-size: 0.95rem; }
.prose { max-width: 800px; }
.prose h2 { font-size: 1.45rem; margin-top: 1.8em; }
.prose ul { list-style: disc; padding-inline-start: 1.4em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.4em; }
.prose a { overflow-wrap: anywhere; }
.notice { padding: 14px 18px; border-radius: 14px; background: rgba(25, 200, 240, 0.1); border: 1px solid rgba(25, 200, 240, 0.3); }
.contact-card { padding: 24px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 40px; }
.contact-line { font-size: 1.05rem; overflow-wrap: anywhere; }
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); margin-bottom: 10px; }
.faq-item summary { padding: 16px 18px; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--cyan); font-weight: 800; flex: 0 0 auto; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 18px 16px; margin: 0; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--bg-2); padding-block: 48px 24px; }
.footer-grid { display: grid; gap: 32px; }
.footer-grid h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 0.8em; }
.footer-grid a { color: var(--text); text-decoration: none; }
.footer-grid a:hover { color: var(--cyan); }
.footer-grid li { padding-block: 3px; }
.footer-brand img { width: 72px; margin-bottom: 12px; }
.footer-brand p { color: var(--muted); margin: 0; }
.footer-langs ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.footer-langs a[aria-current="true"] { color: var(--cyan); font-weight: 700; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.footer-bottom p { margin: 0; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }

/* ---------- 404 ---------- */
.page-404 main { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-block: 48px; }
.page-404 main > img { width: 180px; margin-bottom: 32px; }
.lang-list { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 32px; }
.lang-list a { color: var(--muted); }

/* ---------- RTL ---------- */
[dir="rtl"] .carousel-btn[data-prev], [dir="rtl"] .carousel-btn[data-next] { transform: scaleX(-1); }

/* Mobile : image au-dessus du texte (hero d'accueil + section « Notre philosophie ») */
@media (max-width: 999px) {
  .hero-grid .hero-media { order: -1; margin-bottom: 4px; }
}
@media (max-width: 899px) {
  .section-values .split-media { order: -1; }
}
