/* =====================================================================
   SAKRA GAMES — feuille de style (thème sombre)
   ---------------------------------------------------------------------
   ⚙️  Pour tout changer, éditez les VARIABLES ci-dessous.
       --accent = la couleur de votre marque (boutons, liens, détails).
   ===================================================================== */

:root {
  /* ---- COULEUR DE MARQUE (changez-la pour la vôtre) ---- */
  --accent:      #22d3ee;
  --accent-dark: #0891b2;
  --on-accent:   #052a30;

  /* ---- FONDS & TEXTE (thème noir) ---- */
  --bg:         #0a0a0d;   /* fond principal (full noir) */
  --bg-alt:     #0e0e13;   /* sections alternées (légèrement relevé) */
  --surface:    #15151c;   /* cartes */
  --surface-2:  #1d1d26;   /* survol / éléments relevés */
  --text:       #f4f4f7;   /* texte principal */
  --muted:      #9a9aa7;   /* texte secondaire */
  --line:       rgba(255,255,255,.09); /* traits, bordures fines */

  /* ---- POLICES ---- */
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* ---- MISE EN PAGE ---- */
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 16px;
  --header-h: 70px;
}

/* --------------------------- RESET LÉGER --------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap {
  width: 100%; max-width: var(--maxw);
  margin-inline: auto; padding-inline: var(--gutter);
}

/* ----------------------------- BOUTONS ---------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-body); font-weight: 600; font-size: .98rem;
  padding: .8em 1.5em; border-radius: 999px; white-space: nowrap;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .55em 1.1em; font-size: .9rem; }
.btn-lg { padding: 1em 1.9em; font-size: 1.05rem; }

.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--text); }

/* ------------------------ EYEBROW / INTITULÉS --------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow-lg {
  font-size: clamp(1.6rem, 4.5vw, 2.9rem); font-weight: 700; letter-spacing: .05em;
}
.section-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  line-height: 1.05; letter-spacing: -.02em; margin-top: .4rem;
}

/* =============================== HEADER =========================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #050506;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: 100%; height: var(--header-h);
  padding-left: var(--gutter); padding-right: var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
/* Groupe de gauche : logo + liens, collés ensemble (façon riotgames.com) */
.nav-left { display: flex; align-items: center; gap: clamp(1.6rem, 3vw, 3rem); }

.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand-mark { display: block; border-radius: 8px; }
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 1.18rem;
  letter-spacing: -.01em; color: var(--text); white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.2rem); }
.nav > a:not(.btn) {
  position: relative; top: 4px; white-space: nowrap;
  font-family: var(--font-body);
  font-size: .82rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  padding-bottom: .4rem;
  transition: color .2s ease;
}
.nav > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: #fff;
  transform: scaleX(0); transform-origin: center;
  transition: transform .25s ease;
}
.nav > a:not(.btn):hover { color: var(--text); }
.nav > a:not(.btn):hover::after { transform: scaleX(1); }
.nav .btn { text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; }
.nav-cta-mobile { display: none; }

/* Groupe de droite : langue + recherche + bouton de contact */
.nav-utils { display: flex; align-items: center; gap: .8rem; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.icon-btn:hover { color: var(--text); background: var(--surface); }

/* Sélecteur de langue : petit menu qui s'ouvre sous l'icône globe */
.lang-switcher { position: relative; }
.lang-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: 220px; max-height: 320px; overflow-y: auto;
  margin: 0; padding: .45rem; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top right;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s cubic-bezier(.16,1,.3,1);
}
.lang-menu.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.lang-option {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  width: 100%; padding: .55rem .7rem; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .03em; text-transform: uppercase; text-align: left;
  transition: background .15s ease, color .15s ease;
}
.lang-option:hover { background: var(--surface-2); color: var(--text); }
.lang-option .check { flex: 0 0 auto; color: var(--accent); opacity: 0; stroke: currentColor; }
.lang-option[aria-selected="true"] { color: var(--accent); }
.lang-option[aria-selected="true"] .check { opacity: 1; }

.nav-search {
  display: flex; align-items: center; gap: .3rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .3rem .3rem .95rem;
}
.nav-search input {
  background: transparent; border: 0; outline: 0; color: var(--text);
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .04em;
  width: clamp(90px, 9vw, 140px);
}
.nav-search input::placeholder { color: var(--muted); text-transform: uppercase; }
.nav-search .icon-btn { width: 30px; height: 30px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px;
  background: transparent; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================ HERO =========================== */
.hero {
  position: relative; overflow: hidden;
  min-height: min(94vh, 900px);
  display: flex; align-items: center;
  padding: clamp(4rem, 12vh, 8rem) 0;
}
.hero .wrap { max-width: 900px; }

/* Fond d'ambiance plein écran façon lanceur : les deux illustrations
   (Velthar à gauche, Ivarys à droite) coupées en diagonale avec un trait
   blanc fin sur la coupure, en noir & blanc pour matcher le thème sombre.
   ⚠️ Pour changer d'image : remplacez url('assets/velthar.png') /
   url('assets/ivarys.png') ci-dessous (le voile sombre en ::after reste
   utile pour la lisibilité du texte par-dessus). */
.hero-bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: #050506; }
.hero-bg-half {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.75);
}
.hero-bg-left  { background-image: url('assets/velthar.png'); clip-path: polygon(0 0, calc(58% - 2px) 0, calc(42% - 2px) 100%, 0 100%); }
.hero-bg-right { background-image: url('assets/ivarys.png');  clip-path: polygon(calc(58% + 2px) 0, 100% 0, 100% 100%, calc(42% + 2px) 100%); }
/* trait fin sur la coupure diagonale */
.hero-bg-seam {
  position: absolute; inset: 0; z-index: 1;
  background: rgba(255,255,255,.85);
  clip-path: polygon(calc(58% - 2px) 0, calc(58% + 2px) 0, calc(42% + 2px) 100%, calc(42% - 2px) 100%);
}
/* grain discret pour la texture "photo" */
.hero-bg::before {
  content: ""; position: absolute; inset: 0; z-index: 2; opacity: .35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
}
/* voile sombre pour la lisibilité du texte */
.hero-bg::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  background: radial-gradient(65% 55% at 30% 35%, transparent, rgba(5,5,6,.7) 100%);
}
/* Fondu en bas du hero : dissout l'image vers le noir exact de la section
   suivante (#050506, même valeur que .games-section) pour éviter la coupe
   nette. ⚠️ Pour ajuster la longueur du fondu, changez juste --hero-fade-h. */
.hero-bg-fade {
  --hero-fade-h: 150px;
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  height: var(--hero-fade-h);
  background: linear-gradient(to bottom, transparent, #050506 100%);
  pointer-events: none;
}

/* Bloc de marque : logo + wordmark stylé, façon "carte d'identité studio"
   (logo + nom du studio en gros, rien d'autre — pas de pitch, pas de CTA). */
.hero-brand {
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
  text-align: center;
}
.hero-logo {
  width: clamp(110px, 14vw, 200px); height: auto;
}
.hero-wordmark {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.8rem, 9vw, 6.2rem);
  line-height: .95; letter-spacing: -.01em;
  color: var(--text); text-shadow: 0 12px 40px rgba(0,0,0,.6);
}

/* ============================== SECTIONS ========================== */
.section { padding: clamp(4rem, 10vh, 7rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 42em; margin-bottom: clamp(2rem, 5vh, 3.5rem); }
.section-head-center { max-width: none; margin-inline: auto; text-align: center; }

/* ====================== SECTION SERVEURS (grille de pochettes) ========================= */
.games-section { position: relative; background: #050506; overflow: hidden; }
/* texture "mur" discrète derrière les pochettes (façon riotgames.com) */
.games-section::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
}
.games-section > .wrap { position: relative; z-index: 1; }

/* Grille de pochettes en couleur : chaque carte est un lien vers le site
   du serveur, elle grandit légèrement au survol par-dessus ses voisines. */
.games-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .6rem;
  margin-top: clamp(2rem, 5vh, 3.5rem);
}

.game-card {
  display: block; position: relative; overflow: hidden; border-radius: 10px;
  aspect-ratio: 5 / 4;
  background: linear-gradient(155deg, var(--c1, #6d28d9), var(--c2, #2563eb));
  background-size: cover; background-position: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.4);
  transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease;
}
.game-card::after { /* voile en haut pour la lisibilité du nom */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.75) 0%, transparent 34%);
}
.game-card:hover,
.game-card:focus-visible {
  transform: scale(1.06);
  z-index: 5;
  box-shadow: 0 30px 60px rgba(0,0,0,.6);
}
.game-card.no-hover {
  transform: none;
  z-index: auto;
  box-shadow: 0 10px 24px rgba(0,0,0,.4);
}

.game-mono {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 0;
  font-family: var(--font-display); font-weight: 800; font-size: 3.4rem;
  color: rgba(255,255,255,.14); letter-spacing: .02em;
}

.game-top {
  position: relative; z-index: 1;
  padding: 1rem 1rem 0;
}
.game-title h3 {
  font-family: var(--font-display); font-weight: 800; font-size: 1.02rem;
  text-transform: uppercase; letter-spacing: -.01em; color: #fff;
}

/* ----- À propos ----- */
.about-grid { display: grid; grid-template-columns: 1fr; align-items: start; }
.about-text { max-width: 46em; }
.lede { font-size: 1.3rem; line-height: 1.7; color: var(--muted); margin-top: 1.6rem; }
.lede strong { color: var(--text); }
.pillars { list-style: none; padding: 0; display: grid; gap: 1rem; }
.pillars li { padding: 1.2rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pillars h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.pillars p { color: var(--muted); margin-top: .25rem; }

/* ----- Actualités ----- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.post { display: flex; flex-direction: column; gap: .5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.post:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(0,0,0,.4); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.post-date { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); letter-spacing: .06em; }
.post h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -.01em; }
.post p { color: var(--muted); flex: 1; }
.post-more { font-weight: 600; color: var(--accent); font-size: .95rem; }
.hl-green { color: #22c55e; }
.hl-red { color: #f97316; }
.hl-cyan { color: var(--accent); }

/* ----- CTA ----- */
.cta {
  padding: clamp(4rem, 10vh, 6.5rem) 0; text-align: center;
  background:
    radial-gradient(70% 120% at 50% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    var(--bg-alt);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cta-inner { max-width: 34em; margin-inline: auto; }
.cta h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
.cta p { color: var(--muted); margin: .8rem 0 2rem; font-size: 1.1rem; }

/* ----- Footer ----- */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); padding: 2.5rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; }
.footer-brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 800; }
.footer-brand img { border-radius: 6px; }
.footer-nav { display: flex; gap: 1.4rem; }
.footer-nav a { color: var(--muted); font-size: .95rem; }
.footer-nav a:hover { color: var(--text); }
.footer-social { display: flex; align-items: center; gap: .4rem; }
.footer-legal { color: var(--muted); font-size: .85rem; width: 100%; text-align: center; padding-top: .6rem; border-top: 1px solid var(--line); }

/* ==================== ANIMATIONS D'APPARITION ===================== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ============================ RESPONSIVE ========================== */
@media (max-width: 980px) {
  .posts { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}
/* Palier intermédiaire (tablette / fenêtre réduite) : on retire d'abord la
   recherche pour dégager de la place, avant de basculer en menu hamburger. */
@media (max-width: 1040px) {
  .nav-search { display: none; }
}
@media (max-width: 880px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.2rem;
    transform: translateY(-130%); transition: transform .3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,.5);
  }
  .nav.open { transform: translateY(0); }
  .nav > a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav-cta-mobile { display: flex; margin-top: 1rem; }
  .nav-utils { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 720px) {
  .posts { grid-template-columns: 1fr; }
}