/*
 * Styles du site LED IT, d'après le design system « LED IT Studio ».
 * Toutes les valeurs viennent de tokens.css ; seul le bandeau de jeu
 * (.brand-band) utilise les couleurs propres au jeu.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem; /* body : 17px */
  line-height: 1.6;
}

main {
  flex: 1;
}

main:focus {
  outline: none;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

/* ---------- Typographie ---------- */

h1,
h2 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-weight: 400;
  text-wrap: balance;
}

/* display-xl */
h1 {
  font-size: clamp(2.5rem, 3.5vw + 1.25rem, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

/* display-m */
h2 {
  font-size: clamp(1.75rem, 1.5vw + 1.25rem, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* heading */
h3 {
  margin: 0 0 var(--space-1);
  font-family: var(--font-text);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}

p,
ul,
ol {
  margin: 0 0 var(--space-2);
}

/* label : surtitres en capitales, identifiants, versions */
.hero__kicker,
.prose .toc h2 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  background: var(--surface-sunken);
  border-radius: var(--radius-s);
}

.container {
  width: min(100% - 2 * var(--space-2), var(--content-width));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2 * var(--space-2), var(--text-width));
}

/* Les éléments masqués par l'attribut hidden le restent, même s'ils ont un display. */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -10rem;
  z-index: 30;
  padding: 12px var(--space-2);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--ink-soft);
  border-radius: var(--radius-m);
}

.skip-link:focus {
  top: var(--space-2);
}

/* ---------- En-tête ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 4.5rem;
}

/* Logo : symbole + « LED IT » en Hanken Grotesk 600, capitales, interlettrage 0,04 em. */
.logotype {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-text);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
}

a.logotype:hover {
  color: var(--ink);
}

.logotype__led {
  color: var(--ink);
}

.logotype__it {
  color: var(--accent);
}

.logo-mark {
  flex: none;
  width: auto;
  height: 1.5em;
}

.logo-mark__halo {
  fill: var(--accent-tint);
}

.logo-mark__body {
  fill: var(--ink);
}

.logo-mark__legs {
  fill: none;
  stroke: var(--ink);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-mark__line {
  fill: none;
  stroke: var(--line);
  stroke-width: 2.8;
  stroke-linecap: round;
}

.logo-mark__neon {
  fill: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* button : libellés du menu */
.nav > li > a,
.dropdown__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 2.75rem;
  padding: 0 12px;
  border-radius: var(--radius-m);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.nav > li > a:hover {
  background: var(--surface-sunken);
  color: var(--ink);
}

.nav > li > a[aria-current="page"] {
  color: var(--accent);
}

.nav .lang-switch {
  min-width: 2.75rem;
  justify-content: center;
  border: 1px solid var(--ink-soft);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* ---------- Menu déroulant « Applications » ---------- */

.dropdown {
  position: relative;
}

.dropdown__toggle {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.dropdown__toggle::-webkit-details-marker {
  display: none;
}

.dropdown__toggle:hover,
.dropdown[open] .dropdown__toggle {
  background: var(--surface-sunken);
}

.dropdown__toggle.is-current {
  color: var(--accent);
}

.dropdown__chevron {
  transform: rotate(90deg);
  transition: transform 0.15s ease;
}

.dropdown[open] .dropdown__chevron {
  transform: rotate(-90deg);
}

.dropdown__panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-1));
  z-index: 20;
  width: min(20rem, calc(100vw - 2 * var(--space-2)));
  margin: 0;
  padding: var(--space-1);
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-float);
}

.dropdown__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-s);
  color: var(--ink);
  text-decoration: none;
}

.dropdown__item:hover {
  background: var(--surface-sunken);
  color: var(--ink);
}

.dropdown__item[aria-current="page"] {
  background: var(--accent-tint);
  color: var(--ink);
}

.dropdown__item img {
  flex: none;
  border-radius: var(--radius-m);
}

.dropdown__name {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}

.dropdown__desc {
  display: block;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.dropdown__all {
  display: block;
  margin-top: var(--space-1);
  padding: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

/* Petits écrans : le panneau prend toute la largeur du contenu. */
@media (max-width: 40rem) {
  .dropdown {
    position: static;
  }

  .dropdown__panel {
    left: 0;
    right: 0;
    top: calc(100% - 4px);
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dropdown__chevron {
    transition: none;
  }
}

/* ---------- Boutons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 22px;
  background: transparent;
  border: 1px solid var(--ink-soft);
  border-radius: var(--radius-m);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
}

.button:hover {
  background: var(--surface-sunken);
  color: var(--ink);
}

.button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.button--primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ---------- Accueil ---------- */

.hero {
  padding-block: clamp(3.5rem, 8vw, var(--space-5));
  border-bottom: 1px solid var(--line);
}

.hero__kicker {
  margin-bottom: var(--space-2);
}

.hero__title {
  max-width: 17em;
  margin-bottom: var(--space-3);
}

.hero__lead {
  max-width: 36rem;
  font-size: 1.1875rem;
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: var(--space-3) 0 0;
}

.section {
  padding-top: var(--space-4);
  scroll-margin-top: var(--space-2);
}

.section h2 {
  scroll-margin-top: var(--space-2);
}

.section__intro {
  max-width: 40rem;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.feature,
.mode {
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

.feature h3,
.mode h3 {
  margin-top: var(--space-2);
}

.feature p,
.mode p {
  margin: 0;
  color: var(--ink-soft);
}

/* Pastille d'icône : trait en accent sur fond accent-tint. */
.tile {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-s);
  background: var(--accent-tint);
  color: var(--accent);
}

.tile svg {
  width: 1.375rem;
  height: 1.375rem;
}

/* ---------- Carte d'application ---------- */

.apps {
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.game-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2) 24px;
  align-items: start;
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

.game-card__icon,
.app-icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 22%;
}

.game-card__title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.15;
}

.game-card__tagline {
  margin-bottom: var(--space-1);
  font-size: 1.0625rem;
}

.meta {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.game-card__footer {
  grid-column: 1 / -1;
}

.game-card__footer > p {
  max-width: 40rem;
}

.more-link {
  font-weight: 600;
}

/* ---------- Badges des stores (charte des stores : fond noir) ---------- */

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 var(--space-2);
  padding: 0;
  list-style: none;
}

.store-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 10rem;
  min-height: 3.25rem;
  padding: 6px 18px;
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  border-radius: var(--radius-m);
  line-height: 1.2;
  text-decoration: none;
}

.store-badge:hover {
  color: #ffffff;
}

.store-badge__kicker {
  font-size: 0.75rem;
}

.store-badge__store {
  font-size: 1.2rem;
  font-weight: 600;
}

/* ---------- Page Lettrain ---------- */

/* Bandeau de jeu : l'identité Néon de Lettrain, encadrée dans la page du studio. */
.brand-band {
  width: min(100% - 2 * var(--space-2), var(--content-width));
  margin: var(--space-3) auto 0;
  background:
    radial-gradient(36rem 16rem at 50% 110%, rgba(77, 232, 240, 0.14), transparent 70%),
    var(--game-night);
  color: var(--game-tile);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  text-align: center;
}

.brand-band__inner {
  width: auto;
  padding: clamp(2.5rem, 7vw, 4.5rem) var(--space-2);
}

.brand-band__logo {
  margin: 0 auto var(--space-3);
  max-width: 22.5rem;
}

.brand-band__logo img {
  width: 100%;
}

.brand-band__tagline {
  margin-bottom: 12px;
  color: var(--game-neon);
  font-family: var(--font-text);
  font-size: clamp(1.375rem, 1.5vw + 1rem, 1.75rem);
  font-weight: 600;
}

.brand-band__lead {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--game-tile);
  font-size: 1.125rem;
}

.brand-band .store-badges {
  justify-content: center;
  margin: var(--space-3) 0 0;
}

.brand-band .store-badge {
  border-color: var(--game-track);
}

.brand-band :focus-visible {
  outline-color: var(--game-neon);
}

.modes {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  padding: 0;
  list-style: none;
}

.mode h3 {
  margin-top: var(--space-2);
}

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(12rem, 15rem);
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  padding: 0 0 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  list-style: none;
}

.shots li {
  scroll-snap-align: start;
}

.shots figure {
  margin: 0;
}

.shots img {
  width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.shots figcaption {
  margin-top: var(--space-1);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.callout {
  padding: var(--space-3);
  margin-bottom: var(--space-2);
  background: var(--surface-sunken);
  border-radius: var(--radius-m);
}

.callout > :last-child {
  margin-bottom: 0;
}

/* Sur la page Lettrain, rythme vertical des rubriques. */
.brand-band + .container > section {
  padding-top: var(--space-4);
}

.brand-band + .container > section:last-child {
  padding-bottom: var(--space-4);
}

/* ---------- Pages de texte (légal, confidentialité) ---------- */

.prose {
  padding-block: clamp(3rem, 7vw, var(--space-4)) var(--space-4);
}

.prose h1 {
  font-size: clamp(2.25rem, 3vw + 1.25rem, 3rem);
}

.prose h2 {
  margin-top: var(--space-4);
  font-size: clamp(1.5rem, 1vw + 1.1rem, 1.875rem);
  scroll-margin-top: var(--space-2);
}

.prose h3 {
  margin-top: var(--space-3);
}

.prose li {
  margin-bottom: 6px;
}

.prose li::marker {
  color: var(--ink-soft);
}

.updated {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.toc {
  margin-block: var(--space-3);
  padding: var(--space-3);
  background: var(--surface-sunken);
  border-radius: var(--radius-m);
}

.prose .toc h2 {
  margin: 0 0 12px;
}

.toc ol {
  margin: 0;
  padding-left: 1.5rem;
}

.toc li:last-child {
  margin-bottom: 0;
}

address {
  font-style: normal;
}

.legal-list {
  margin: 0 0 var(--space-2);
}

.legal-list dt {
  font-weight: 600;
}

.legal-list dd {
  margin: 0 0 12px;
  color: var(--ink-soft);
}

/* ---------- 404 ---------- */

.not-found {
  padding-block: clamp(3.5rem, 8vw, var(--space-5));
  display: grid;
  gap: var(--space-3);
}

.not-found h1,
.not-found h2 {
  margin-top: 0;
  font-size: clamp(1.75rem, 2vw + 1.25rem, 2.5rem);
}

.not-found__code {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(5rem, 16vw, 8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
}

/* ---------- Pied de page ---------- */

.site-footer {
  margin-top: var(--space-4);
  padding-block: var(--space-3);
  background: var(--surface-sunken);
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.site-footer p {
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding-block: 6px;
}

@media (min-width: 40rem) {
  .game-card__footer {
    grid-column: 2;
  }
}

@media (min-width: 40rem) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 48rem) {
  .modes {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
  }
}

@media (min-width: 64rem) {
  .features {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
  }
}
