/* ═══════════════════════════════════════════
   NSI GAMES — Page d'accueil globale
═══════════════════════════════════════════ */

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

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

body {
  background: #f1f5f9;
  color: #0f172a;
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Hero ────────────────────────────────── */
.hero {
  background: #0f172a;
  color: #fff;
  padding: 40px 24px 40px;
  text-align: center;
}

.hero-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}

.hero-icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.hero-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #94a3b8;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: #fff;
}

.hero-title span {
  background: linear-gradient(135deg, #60A5FA, #3B82F6, #1D4ED8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  color: #94a3b8;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Grille de jeux ──────────────────────── */
.games-section {
  flex: 1;
  padding: 24px 24px 24px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.section-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #94a3b8;
  margin-bottom: 24px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  border: 2px solid #e2e8f0;
  border-top: 4px solid transparent;
  transition: border-color .2s, transform .15s;
}

.card:hover { transform: translateY(-3px); }

.card.codeweb    { border: 2px solid #e2e8f0; border-top: 4px solid #f97316; }
.card.execubot   { border: 2px solid #e2e8f0; border-top: 4px solid #38bdf8; }
.card.affectabot { border: 2px solid #e2e8f0; border-top: 4px solid #7c00ff; }
.card.bases      { border: 2px solid #e2e8f0; border-top: 4px solid #eab308; }
.card.netenquete { border: 2px solid #e2e8f0; border-top: 4px solid #ef4444; }
.card.linuxshell { border: 2px solid #e2e8f0; border-top: 4px solid #10b981; }

.card.codeweb:hover    { border-color: #f97316; }
.card.execubot:hover   { border-color: #38bdf8; }
.card.affectabot:hover { border-color: #7c00ff; }
.card.bases:hover      { border-color: #eab308; }
.card.netenquete:hover { border-color: #ef4444; }
.card.linuxshell:hover { border-color: #10b981; }

.card-icon {
  font-size: 1.8rem;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card.codeweb .card-icon    { background: #fff7ed; }
.card.execubot .card-icon   { background: #f0f9ff; }
.card.affectabot .card-icon { background: #f5f0ff; }
.card.bases .card-icon      { background: #fefce8; }
.card.netenquete .card-icon { background: #fff1f2; }
.card.linuxshell .card-icon { background: #f0fdf4; }

.card h2 { font-size: 1.1rem; font-weight: 700; color: #0f172a; }
.card p  { font-size: .85rem; color: #64748b; line-height: 1.65; flex: 1; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: 4px;
}

.card.codeweb .tag    { background: #f0f9ff; color: #fb923c; }
.card.execubot .tag   { background: #f0f9ff; color: #0369a1; }
.card.affectabot .tag { background: #f5f0ff; color: #6d00e8; }
.card.bases .tag      { background: #fefce8; color: #a16207; }
.card.netenquete .tag { background: #fff1f2; color: #dc2626; }
.card.linuxshell .tag { background: #f0fdf4; color: #059669; }

.btn-play {
  align-self: flex-start;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: #fff;
  transition: opacity .15s;
}
.btn-play:hover { opacity: .85; }

.card.codeweb .btn-play    { background: #f97316; }
.card.execubot .btn-play   { background: #0284c7; }
.card.affectabot .btn-play { background: #7c00ff; }
.card.bases .btn-play      { background: #eab308; }
.card.netenquete .btn-play { background: #ef4444; }
.card.linuxshell .btn-play { background: #10b981; }

/* ── Footer ──────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 12px 24px;
  font-size: .75rem;
  color: #484c4f;
  border-top: 1px solid #e2e8f0;
  background-color: #dee2e6;
}

@media (max-width: 600px) {
  .hero { padding: 20px 20px 16px; }
  .cards { grid-template-columns: 1fr; }
}
