/* ──────────────────────────────────────────────────────────────
   Page de choix du jeu — akalavolo.com  (refonte « Partition »)
   Autonome : aucune dépendance au thème WordPress.
   Palette Akalavolo, structure modulaire : angles nets, filets 2px,
   alignement systématique à gauche.
   ────────────────────────────────────────────────────────────── */

:root {
  --onyx:          #373746;
  --black-coral:   #5A5A7A;
  --minion-yellow: #F0D351;
  --white-coffee:  #E6E0D4;
  --bg-deep:       #14121F;
  --bg-panel:      #1C192E;
  --muted:         #8D8AA3;

  --font-display: 'Cinzel Decorative', Georgia, serif;
  --font-body:    'Archivo', system-ui, -apple-system, sans-serif;

  --rule: 2px;
  --pad-x: clamp(1.25rem, 4vw, 3rem);
}

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

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--white-coffee);
  background: var(--bg-deep);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--minion-yellow); color: var(--bg-deep); }

a:focus-visible,
.game:focus-visible {
  outline: var(--rule) solid var(--minion-yellow);
  outline-offset: 2px;
}

.hub {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── En-tête ── */
.hub__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) var(--pad-x) clamp(1rem, 2vw, 1.6rem);
  border-bottom: var(--rule) solid var(--minion-yellow);
}

.hub__brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Logo en portrait : c'est la hauteur qui contraint. width/height auto sont
   nécessaires pour que les attributs HTML n'écrasent pas le ratio. */
.hub__logo {
  height: clamp(3rem, 7vw, 4.75rem);
  width: auto;
  max-width: 100%;
  display: block;
}

.hub__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  line-height: 1;
  letter-spacing: .02em;
  color: var(--minion-yellow);
}

.hub__tagline {
  margin: 0;
  max-width: 22rem;
  text-align: right;
  font-size: clamp(.8rem, 1.2vw, .875rem);
  color: var(--muted);
}

/* ── Les deux cellules ── */
.games {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr var(--rule) 1fr;
  min-height: 0;
}

/* Le filet central est dessiné par un pseudo-élément de la grille */
.games::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  background: var(--minion-yellow);
}

.game {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.75rem, 3vw, 2.75rem) var(--pad-x);
  text-decoration: none;
  color: inherit;
  background: var(--bg-deep);
  transition: background .2s ease;
}

.game:first-of-type { grid-column: 1; grid-row: 1; }
.game:last-of-type  { grid-column: 3; grid-row: 1; }

.game:hover,
.game:focus-visible { background: var(--bg-panel); }

.game__label {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.game__num { color: var(--minion-yellow); }

.game__art {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 1.5rem 0;
}

/* width/height auto sont indispensables : sans eux, les attributs width et
   height du HTML figent les dimensions et écrasent le ratio. */
.game__art img {
  max-width: 100%;
  max-height: 17.5rem;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Repli décoratif quand le logo est absent (l'image se retire elle-même) */
.game__art:empty::before {
  content: "";
  width: 6rem;
  height: 6rem;
  border: var(--rule) solid var(--onyx);
}

.game__cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .8rem 1.4rem;
  border: var(--rule) solid var(--minion-yellow);
  color: var(--minion-yellow);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease;
}

.game:hover .game__cta,
.game:focus-visible .game__cta {
  background: var(--minion-yellow);
  color: var(--bg-deep);
}

.game:active .game__cta { background: #d9bd3c; color: var(--bg-deep); }

/* ── Pied ── */
.hub__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 1.25rem var(--pad-x);
  border-top: var(--rule) solid var(--onyx);
  font-size: .75rem;
  letter-spacing: .06em;
}

.hub__foot a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}

.hub__foot a:hover { color: var(--minion-yellow); }

/* ── Mobile : les cellules s'empilent, le filet passe à l'horizontale ── */
@media (max-width: 52rem) {
  .hub__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .hub__tagline { text-align: left; }

  .games { grid-template-columns: 1fr; }
  .games::before { display: none; }
  .game:first-of-type,
  .game:last-of-type { grid-column: 1; grid-row: auto; }
  .game:first-of-type { border-bottom: var(--rule) solid var(--minion-yellow); }
  .game__art img { max-height: 11rem; }

  .hub__foot { gap: 1rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .game, .game__cta, .hub__foot a { transition: none; }
}
