/* Charte FOCAL v1.0 */
:root {
  color-scheme: dark;
  --abysse: #161b29;
  --nuit: #1c2233;
  --panneau: #252c3e;
  --relief: #323a50;
  --bordure: #525c73;
  --acier: #929bb0;
  --brume: #d5dae3;
  --blanc: #ffffff;
  --rose: #ff7edb;
  --cyan: #36f9f6;
  --display: "Orbitron", "Space Grotesk", system-ui, sans-serif;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --glow-brand: 0 0 2px #1c2233, 0 0 5px #ff7edb33, 0 0 10px #ff7edb, 0 0 20px #ff7edb66;
  --focus-ring: 0 0 0 2px var(--nuit), 0 0 0 4px var(--rose);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(54, 249, 246, 0.07), transparent 60%),
    var(--nuit);
  color: var(--blanc);
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}

main {
  width: min(68rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 6rem 0 5rem;
}

header {
  text-align: center;
}

.mark {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 6.5vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: var(--glow-brand);
}

.tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 4rem;
}

.tile {
  display: flex;
  flex: 0 0 13rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 1rem;
  border: 1px solid var(--relief);
  border-radius: 1rem;
  background: var(--panneau);
  color: inherit;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.tile-focal {
  background:
    radial-gradient(90% 70% at 0% 0%, rgba(54, 249, 246, 0.12), transparent 60%),
    var(--panneau);
}

.tile-timer {
  background:
    radial-gradient(90% 70% at 0% 0%, rgba(255, 126, 219, 0.12), transparent 60%),
    var(--panneau);
}

.logo {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
}

.tile-heatmap .logo {
  filter: invert(0.88);
}

.tile:hover {
  transform: translateY(-3px);
  border-color: var(--rose);
  background-color: var(--relief);
}

.tile:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.name {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.line {
  margin-top: 0.4rem;
  color: var(--acier);
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  main {
    width: calc(100% - 2rem);
    padding-top: 4rem;
  }

  .tiles {
    margin-top: 3rem;
    gap: 0.75rem;
  }

  .tile {
    flex-basis: calc((100% - 0.75rem) / 2);
  }

  .logo {
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 0.75rem;
  }

  /* Réserve 2 lignes pour que les logos restent alignés si un nom passe à la ligne */
  .name {
    display: flex;
    align-items: center;
    min-height: 2.5em;
    font-size: 0.85rem;
  }

  .line {
    font-size: 0.85rem;
  }
}

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

  .tile:hover {
    transform: none;
  }
}
