/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-top) + var(--bar-h) + var(--anchor-gap)); } /* les ancres s'arrêtent juste sous la barre */
body {
  margin: 0; color: var(--c-text);
  /* Fond : motif répété qui défile avec la page (la vidéo du haut le recouvre) */
  background: var(--page-bg-color) var(--page-bg-image) 0 0 / var(--page-bg-size) repeat;
  font: 400 var(--fs-body)/1.6 var(--font-body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: var(--lh-tight); letter-spacing: 0; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section-title { font-size: var(--fs-h2); font-weight: 800; text-transform: uppercase; margin-bottom: clamp(32px, 4vw, 56px); }

/* ===== Boutons ===== */
.btn {
  display: inline-flex; align-items: center; gap: .6em; padding: .95em 1.7em;
  border-radius: var(--radius-pill); background: var(--c-accent); color: var(--c-accent-contrast);
  font: 700 .95rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .04em;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.btn::after { content: "→"; transition: transform .3s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--c-accent); }
.btn:hover::after { transform: translateX(4px); }
.btn--ghost { background: transparent; border: 1.5px solid var(--c-line); color: var(--c-text); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--c-accent-2); outline-offset: 3px; }

/* Bouton graphique (image fournie) */
.btn-img { display: inline-block; height: var(--btn-img-h); transition: transform .3s var(--ease), filter .3s var(--ease); }
.btn-img img { height: 100%; width: auto; max-width: none; } /* image affichée telle quelle, sans effet ajouté */
.btn-img:hover { transform: translateY(-3px) scale(1.03); filter: brightness(1.06); }
.btn-img:active { transform: translateY(0) scale(.98); }

/* ===== Placeholders ===== */
.ph {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: repeating-linear-gradient(45deg, var(--c-surface) 0 14px, var(--c-surface-2) 14px 28px);
  color: var(--c-text-muted); font: 600 var(--fs-small)/1.3 var(--font-body); text-align: center; padding: 8px;
}

/* ===== Header ===== */
/* Barre flottante : panneau translucide arrondi, détaché des bords,
   avec une tuile logo opaque à gauche et des liens séparés par des filets. */
.header {
  position: fixed; z-index: 50;
  top: var(--bar-top); left: var(--bar-inset); right: var(--bar-inset);
  height: var(--bar-h);
  transition: transform .45s var(--ease), top .45s var(--ease);
}
/* La barre reste toujours visible en haut de l'écran (pas de masquage au défilement). */
.header__inner {
  position: relative; isolation: isolate;
  width: 100%; height: 100%; margin: 0;
  display: flex; align-items: stretch; justify-content: space-between;
}
/* Fond de la barre sur un calque dédié qui démarre DERRIÈRE le logo (--bar-start = moitié du logo,
   calculée en JS) : à gauche, seul le contour de l'image logo est visible. */
.header__inner::before {
  content: ""; position: absolute; z-index: -1;
  top: 0; bottom: 0; right: 0; left: var(--bar-start, 0px);
  border-radius: 0 var(--bar-radius) var(--bar-radius) 0;
  background: var(--bar-bg);
  backdrop-filter: blur(var(--bar-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--bar-blur)) saturate(140%);
  box-shadow: 0 6px 24px -10px rgba(0,0,0,.25);
  transition: background .4s var(--ease);
}
.header.is-scrolled .header__inner::before { background: var(--bar-bg-scrolled); }
.logo {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: var(--logo-tile-w); padding: 6px 18px;
  background: var(--logo-tile-bg); border-radius: var(--bar-radius); overflow: hidden;
  box-shadow: 0 4px 14px -6px rgba(0,0,0,.45);
  font: 900 1.7rem/1 var(--font-display); letter-spacing: .02em; color: var(--c-text-on-dark);
  transition: filter .3s, transform .3s var(--ease);
}
.logo:hover { filter: brightness(1.12); }
/* Même effet que le bouton About Us : léger agrandissement au survol (ancré à gauche) */
.logo.is-wordmark { transform-origin: left center; }
.logo.is-wordmark:hover { transform: scale(1.02); filter: brightness(1.06); } /* ancré au milieu gauche : grandit vers la droite, autant en haut qu'en bas */
.logo.is-wordmark:active { transform: scale(.98); }
/* Reflet de lumière qui balaie le logo (speedlight) */
.logo.is-wordmark::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 44%, rgba(255,255,255,.75) 50%, transparent 56%) no-repeat;
  background-size: 250% 100%; background-position: 150% 0;
  border-radius: 10px;   /* suit les coins arrondis du logo (pas de masque : bloqué en ouverture locale) */
  animation: logo-shine var(--shine-every) ease-in-out infinite;
}
@keyframes logo-shine {
  0%   { background-position: 150% 0; }
  35%  { background-position: -50% 0; }   /* passage du reflet (~0,7 s) */
  100% { background-position: -50% 0; }   /* pause jusqu'au prochain passage */
}
.logo img { max-height: 100%; width: auto; }
/* Logo-image carré (badge) : remplit toute la tuile */
.logo.is-badge { width: var(--bar-h); aspect-ratio: 1; padding: 0; background: none; }
.logo.is-badge img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
/* Logo-image libre (ex. pilule « STICK GAMES ») : pas de tuile, hauteur de la barre, largeur naturelle */
.logo.is-wordmark { position: relative; z-index: 1; width: auto; padding: 0; background: none; box-shadow: none; overflow: visible; }
.logo.is-wordmark img { height: 100%; width: auto; max-height: none; }
.nav { display: flex; align-items: center; padding-right: clamp(16px, 2vw, 36px); }
.nav a {
  position: relative; padding: 4px clamp(10px, 1.1vw, 16px);
  font: 800 var(--nav-fs)/1 var(--font-display); text-transform: uppercase; letter-spacing: .01em;
  color: var(--bar-text); text-shadow: 0 1px 3px rgba(0,0,0,.45); /* ombre légère : lisible sur fond clair comme sombre */
  transition: color .25s, transform .25s var(--ease);
}
.nav a + a { border-left: 1px solid var(--bar-divider); }
.nav a:hover { color: var(--bar-text-hover); transform: translateY(-1px); }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; color: inherit; cursor: pointer; position: relative; }
.burger span, .burger::before, .burger::after { content: ""; position: absolute; left: 10px; right: 10px; height: 2px; background: currentColor; transition: transform .35s var(--ease), opacity .2s; }
.burger::before { top: 15px; } .burger span { top: 21px; } .burger::after { top: 27px; }
.menu-open .burger::before { transform: translateY(6px) rotate(45deg); }
.menu-open .burger span { opacity: 0; }
.menu-open .burger::after { transform: translateY(-6px) rotate(-45deg); }

/* ===== Hero ===== */
/* Texte centré verticalement entre le bas de la barre et le bas de l'écran */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden;
  padding-top: calc(var(--bar-top) + var(--bar-h)); }
.hero > .container {
  /* Texte aligné sur la barre : il commence --hero-text-indent après le bord gauche de la barre */
  width: 100%; max-width: none; margin: 0;
  padding-block: clamp(24px, 4vw, 48px);
  padding-left: calc(var(--bar-inset) + var(--hero-text-indent));
  padding-right: var(--gutter);
}
.hero__media { position: absolute; inset: 0; z-index: -1; will-change: transform; }
.hero__media img, .hero__media .ph { width: 100%; height: 110%; object-fit: cover; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 110%; object-fit: cover; object-position: var(--hero-video-focus, center); }
.hero__media .ph { place-items: start end; padding: calc(var(--header-h) + 16px) var(--gutter); }
.hero__media::after { content: ""; position: absolute; inset: 0; background: var(--c-overlay); }
.hero__content { max-width: 900px; }
/* Illustration à droite : posée sur la vidéo, sous le texte, collée en bas, peut sortir à droite */
.hero { isolation: isolate; }
.hero__art { position: absolute; bottom: 0; z-index: 0; max-width: none; pointer-events: none;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); } /* pas d'animation : présente dès l'ouverture */
.hero__art.is-hidden { display: none; }
.hero > .container { position: relative; z-index: 1; }

.hero__eyebrow { display: inline-block; font: 800 var(--fs-h3)/1.2 var(--font-display); color: var(--c-eyebrow); text-transform: uppercase; margin-bottom: 16px; }
.hero__title { font-size: var(--fs-hero); font-weight: 900; text-transform: uppercase; margin-bottom: 32px; color: var(--c-text-on-dark); text-shadow: 0 2px 18px rgba(0,0,0,.35); }

/* ===== Games ===== */
/* Bannière image à la place du titre texte */
.section-title__img { display: block; height: var(--title-img-h); width: auto; max-width: 100%; }
.section-title:has(.section-title__img) { margin-bottom: var(--games-gap); line-height: 0; } /* même écart que entre deux rangées de cartes */
/* Fond de la zone des jeux : une seule image (lignes ondulées), recadrée pour couvrir, défile avec la page.
   Mettre --games-bg: none pour revenir au motif répété de la page. */
.section.games { background: var(--games-bg) center top / cover no-repeat; }
.games__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--games-gap); }
/* Carte de jeu en image (grise → rouge au survol, et légère mise à l'échelle) */
.game-tile { position: relative; display: block; aspect-ratio: 1; transition: transform .35s var(--ease); }
.game-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.game-tile__hover { opacity: 0; transition: opacity .3s var(--ease); }
.game-tile:not(.is-empty):hover, a.game-tile:focus-visible { transform: scale(1.05); z-index: 2; }
.game-tile:not(.is-empty):hover .game-tile__hover, a.game-tile:focus-visible .game-tile__hover { opacity: 1; }
a.game-tile:active { transform: scale(1.02); }
/* Emplacement vide (en attendant les autres jeux) */
.game-tile.is-empty { display: grid; place-items: center; padding: 0; }
.game-tile__ph { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; border-radius: 10px;
  background: #b9b9b9; border: 6px solid #b9b9b9; outline: 2px dashed rgba(255,255,255,.6); outline-offset: -14px;
  color: #fff; font: 700 .85rem/1.4 var(--font-display); text-transform: uppercase; letter-spacing: .04em; }
.game-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 6 / 5; background: var(--c-surface); isolation: isolate; box-shadow: 0 14px 34px -18px rgba(0,0,0,.45); }
.game-card__img { position: absolute; inset: 0; transition: transform .8s var(--ease); }
.game-card__img img, .game-card__img .ph { width: 100%; height: 100%; object-fit: cover; }
.game-card::after { content: ""; position: absolute; inset: 0; background: var(--c-overlay); z-index: 0; }
.game-card__body { position: absolute; inset: auto 0 0; z-index: 1; padding: clamp(18px, 2vw, 28px); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.game-card__logo { width: 70%; aspect-ratio: 852 / 229; }
.game-card__logo img { width: 100%; height: 100%; object-fit: contain; object-position: left bottom; }
.game-card__logo .ph { background: rgba(255,255,255,.7); border: 1px dashed rgba(0,0,0,.2); border-radius: var(--radius-sm); }
.game-card__cta { font: 700 .85rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .05em; padding: .8em 1.3em; border-radius: var(--radius-pill); background: var(--c-accent); color: var(--c-accent-contrast); opacity: 0; transform: translateY(10px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.game-card:hover .game-card__img { transform: scale(1.06); }
.game-card:hover .game-card__cta, .game-card:focus-visible .game-card__cta { opacity: 1; transform: none; }
@media (hover: none) { .game-card__cta { opacity: 1; transform: none; } }

/* ===== Partners marquee ===== */
.partners-strip { background: var(--c-strip-bg); }
.marquee { overflow: hidden; padding-block: clamp(32px, 5vw, 64px); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; align-items: center; gap: clamp(40px, 6vw, 96px); width: max-content; animation: marquee var(--marquee-duration) linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { height: clamp(48px, 6vw, 80px); width: clamp(90px, 11vw, 150px); flex: none; opacity: .75; transition: opacity .3s; }
.marquee__item:hover { opacity: 1; }
.marquee__item img { height: 100%; width: 100%; object-fit: contain; }
/* Vrais logos : hauteur fixe, largeur naturelle (les logos larges ne sont pas rétrécis) */
.marquee__item.has-img { width: auto; opacity: .9; height: calc(clamp(48px, 6vw, 80px) * var(--s, 1)); align-self: center; } /* --s = scale du logo */
.marquee__item.has-img img { width: auto; height: 100%; max-width: none; transition: transform .3s var(--ease); }
.marquee__item.has-img:hover img { transform: scale(1.06); }
.marquee__item.is-glow img { filter: drop-shadow(0 0 1px rgba(255,255,255,.9)) drop-shadow(0 0 6px rgba(255,255,255,.35)); }
.marquee__item .ph { border-radius: var(--radius-sm); font-size: .7rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== Partnerships ===== */
.partnerships__box { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: end; padding: clamp(32px, 6vw, 88px); border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--c-red), var(--c-red-dark)); color: var(--c-text-on-dark); box-shadow: 0 24px 50px -28px rgba(203,22,25,.8); }
.partnerships__title { font-size: var(--fs-h2); font-weight: 900; text-transform: uppercase; }
.partnerships__subtitle { font-size: var(--fs-h3); margin-top: 16px; font-weight: 700; }
.partnerships__text p { margin: 0 0 28px; color: rgba(255,255,255,.9); }
.partnerships .btn { background: var(--c-white); color: var(--c-black); }

/* ===== News ===== */
.news__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: clamp(32px, 4vw, 56px); }
.news__head .section-title { margin: 0; }
.news__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(20px, 3vw, 40px); }
.news-card { display: grid; gap: 14px; align-content: start; }
.news-card__img { box-shadow: 0 10px 26px -16px rgba(0,0,0,.4); border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16 / 9; }
.news-card__img img, .news-card__img .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.news-card:hover .news-card__img img, .news-card:hover .news-card__img .ph { transform: scale(1.05); }
.news-card__date { font-size: var(--fs-small); color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .06em; }
.news-card__title { font-size: var(--fs-h3); font-weight: 800; transition: color .3s; }
.news-card:hover .news-card__title { color: var(--c-accent); }
.news-card__excerpt { margin: 0; color: var(--c-text-muted); }
.news-card--featured .news-card__title { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.news__list { display: grid; gap: clamp(16px, 2vw, 24px); }
.news__list .news-card { grid-template-columns: 42% 1fr; align-items: center; gap: 18px; }
.news__list .news-card__title { font-size: 1.05rem; }

/* ===== Hiring ===== */
.hiring__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.hiring__img { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1616 / 997; }
.hiring__img img, .hiring__img .ph { width: 100%; height: 100%; object-fit: cover; }
.hiring__title { font-size: var(--fs-h2); font-weight: 900; text-transform: uppercase; margin-bottom: 20px; }
.hiring__text p { margin: 0 0 16px; color: var(--c-text-muted); }
.hiring__text .btn { margin-top: 12px; }

/* ===== Footer ===== */
.footer { background: var(--c-surface); position: relative; padding-block: clamp(48px, 6vw, 80px) 32px; border-top: 1px solid var(--c-line); overflow: hidden; }
.footer__inner { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.footer__legal { font-size: var(--fs-small); color: var(--c-text-muted); display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer__legal a:hover, .footer__socials a:hover { color: var(--c-text); }
.footer__socials { display: flex; gap: 12px; }
.footer__socials a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--c-line); font: 700 .75rem/1 var(--font-display); color: var(--c-text-muted); transition: border-color .3s, color .3s; }
.footer__socials a:hover { border-color: var(--c-accent); color: var(--c-accent); }
/* Icônes rondes : toutes à la même taille (--social-size) */
.footer__socials a.has-icon { width: var(--social-size); height: var(--social-size); border: 0; padding: 0; transition: transform .25s var(--ease); }
.footer__socials a.has-icon img { width: 100%; height: 100%; display: block; }
.footer__socials a.has-icon:hover { transform: scale(1.1); }
.footer__graphic { width: clamp(140px, 18vw, 240px); aspect-ratio: 483 / 520; }
.footer__graphic img, .footer__graphic .ph { width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius-md); }

/* ===== Animations d'apparition ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.is-in { opacity: 1; transform: none; }
/* Une fois apparue, la carte n'a plus de délai : le survol réagit tout de suite */
.game-tile.reveal.is-settled { transition: transform .35s var(--ease); transition-delay: 0s; }
.hero .reveal:not(.is-in) { transform: translateY(24px); } /* :not(.is-in) sinon le texte restait décalé de 24 px */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .games__grid { grid-template-columns: repeat(2, 1fr); }
  .news__grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --bar-top: 12px; --bar-inset: 10px; --bar-h: 52px; }
  .burger { display: block; align-self: center; margin-right: 8px; color: var(--bar-text); }
  .header__inner { position: relative; }
  .nav {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; padding: 8px 20px 16px;
    border-radius: var(--bar-radius); background: var(--bar-bg-scrolled);
    backdrop-filter: blur(var(--bar-blur)); -webkit-backdrop-filter: blur(var(--bar-blur));
    clip-path: inset(0 0 100% 0 round var(--bar-radius)); visibility: hidden;
    transition: clip-path .5s var(--ease), visibility 0s .5s;
  }
  .nav a { font-size: 1.35rem; padding: 14px 0; }
  .nav a + a { border-left: 0; border-top: 1px solid var(--bar-divider); }
  .menu-open .nav { clip-path: inset(0 0 0 0 round var(--bar-radius)); visibility: visible; transition: clip-path .5s var(--ease); }
  .partnerships__box, .hiring__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .games__grid { grid-template-columns: 1fr; }
  .news__list .news-card { grid-template-columns: 38% 1fr; }
  .news__head { flex-direction: column; align-items: start; }
  .footer__inner { flex-direction: column; align-items: start; }
}
