/* =========  Design Tokens  ========= */
:root{
  --bg:#7a93a1;
  --ink:#0b1116;
  --panel:#708892c4;
  --panel-2:#8fbcce;
  --accent:#75ee9d;
  --ring:rgba(0,0,0,.5);
  --header-offset: 72px; /* hauteur du header fixe (+ marge si tu veux) */
}

/* =========  Liens (pas de soulignement) ========= */
a, nav a, .button-cta, .button-ghost, .button-pill{ text-decoration:none; }
a:hover, a:focus, nav a:hover, .button-cta:hover, .button-ghost:hover, .button-pill:hover{ text-decoration:none; }
a:focus-visible{ outline:2px solid #fff; outline-offset:2px; }

/* =========  Reset / Base  ========= */
*{ margin:0; padding:0; box-sizing:border-box; }
html{ scroll-behavior:smooth; }                /* smooth natif, utilisé par l’ancre */
html, body{ overflow-x:hidden; }
body{
  background-image:url(tile031.png);
  background-repeat:repeat;
  background-position: top center;
  font-family:"Roboto",system-ui,Arial,sans-serif;
  color:#fff;
}
/* ===== SoundCloud card matching your cards ===== */
.sc-embed{
  width:min(450px, 96%);
  margin:16px auto 40px;

  border:3px solid #333;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 8px 30px rgba(0,0,0,.45);
  background:rgba(0,0,0,.65);
}
footer {
  border-top: 2px solid #000;
  padding: 24px 0;
  text-align: center;
  background: rgba(0, 0, 0, 0.75);
}

footer .foot-note {
  font-size: 0.95rem;
  opacity: 0.95;
  color: #fff;
}

footer .legal-link {
  margin-left: 10px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

footer .legal-link:hover {
  text-decoration: underline;
}

/* make the iframe responsive and full width */
.sc-embed iframe{
  display:block;
  width:100%;
  height:166px;          /* hauteur standard SoundCloud */
}

/* option: tighten spacing on small screens */
@media (max-width:520px){
  .sc-embed{ margin:12px auto 28px; }
}
/* =========  Anchor shim (compense le header fixe pour toutes les ancres) ========= */
section[id]::before{
  content:"";
  display:block;
  height: var(--header-offset);
  margin-top: calc(var(--header-offset) * -1);
}

/* =========  Layout helpers  ========= */
.wrapper{ max-width:1200px; width:92%; margin:0 auto; }
section{ margin-block:80px; }

/* =========  Header  ========= */
#content > #main-video{ padding-top:72px; }   /* compense le header fixe au tout début */
.site-header{
  position:fixed; inset-block-start:0; inset-inline:0;
  height:72px; display:flex; align-items:center;
  background-color:var(--panel);
  box-shadow:0 8px 30px var(--ring);
  z-index:1000;
}
.header-container{ display:flex; align-items:center; justify-content:space-between; }
.brand{ color:#fff; text-shadow:2px 2px 4px #000; }
.brand .divider{ opacity:.6; margin-inline:.35rem; }
.brand small{ font-size:.9rem; opacity:.95; }

nav ul{ display:flex; gap:.6rem; list-style:none; }
nav a{
  display:inline-block; padding:.5rem .8rem; border-radius:.6rem;
  background:rgb(131,154,182); color:#fff; font-weight:700; font-size:.95rem;
  border:2px solid transparent; transition:all .2s ease;
}
nav a:hover{ background:var(--panel-2); color:#000; border-color:#fff; }
.nav-btn:hover{ background:var(--accent); }

/* =========  HERO  ========= */
.video-container{
  /* Réglage géométrique des CTA (appliqué à toutes tailles) */
  --gap-left: 20%;
  --gap-right: 15%;

  width:100%;
  max-width:100vw;
  margin:0 auto;
  position:relative;
  overflow:hidden;
  box-shadow:0 0 20px rgba(0,0,0,.7);
}
#bgVideo{ width:100%; height:100%; object-fit:cover; opacity:1; transition:opacity .45s ease; }
.fade-out{ opacity:0; }
.fade-in{ opacity:1; }

.main-title{
  position:absolute; inset-inline:50%; inset-block-start:22%;
  transform:translate(-50%, -50%);
  width:min(900px,90%);
  text-align:center; font-size:clamp(2rem,4.5vw,4.6rem);
  text-shadow:2px 2px 4px #000; color:#fff; z-index:10;
}
.bolds{ font-weight:900; }

/* CTA : occupe EXACTEMENT la zone entre les barres */
.cta-row{
  position:absolute;
  bottom: clamp(8%, 12vw, 16%);               /* hauteur responsive depuis le bas */
  left: var(--gap-left);
  right: var(--gap-right);
  transform: none;
  width: auto;

  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: min(2.4vw, 24px);
  z-index:10;
}
.button-cta{
  display:flex; align-items:center; justify-content:center;
  flex: 1 1 48%;
  max-width:360px;
  min-height:48px;
  padding:10px 16px;
  border-radius:.8rem;
  background:rgb(131,154,182);
  color:#fff; font-weight:800; letter-spacing:.2px;
  border:2px solid transparent; box-shadow:0 0 20px rgba(0,0,0,.7);
  transition:transform .12s ease, background .2s ease, color .2s ease, border-color .2s ease;
  line-height:1.2; text-align:center;
  white-space:normal; overflow-wrap:anywhere; word-break:break-word;
}
.button-cta:hover{ background:var(--panel-2); color:#000; border-color:#fff; transform:translateY(-1px); }

/* =========  BIO  ========= */
.bio-grid{
  display:grid; grid-template-columns:320px 1fr; gap:2rem; align-items:center;
}
#bio img{
  width:100%; max-width:320px; aspect-ratio:3/4; object-fit:cover; border-radius:32px;
  box-shadow:0 10px 20px rgba(0,0,0,.5);
}
#bio h2{ font-size:2rem; margin-bottom:.4rem; text-shadow:2px 2px 4px #000; }
#bio p{
  font-size:1.05rem; line-height:1.6; background:#7a9aa7c7; border:5px solid #7a9aa7c7;
  color:#fff; border-radius:10px; box-shadow:3px 3px 6px #000; padding:18px;
}

/* =========  DEMOS  ========= */
#video-demo{ padding-top:40px; }
#video-demo .wrapper>h2{ margin-bottom:20px; text-shadow:2px 2px 4px #000; }
.demos{
  display:grid; grid-template-columns:repeat(2, minmax(280px,1fr)); gap:40px; list-style:none;
}
.card{ text-align:center; }
.media{
  border:3px solid #333; border-radius:12px; overflow:hidden; box-shadow:0 8px 30px rgba(0,0,0,.45);
}
.lazy-demo{ display:block; width:100%; height:auto; background:#000; }

/* =========  FAVOURITES  ========= */
#possibilities .wrapper{
  display:grid; grid-template-columns:repeat(2,minmax(280px,1fr));
  gap:30px; align-items:stretch; justify-items:center;
}
#possibilities h2{ grid-column:1/-1; margin-bottom:6px; text-shadow:2px 2px 4px #000; }
.tile{
  position:relative; width:100%; height:240px; border-radius:12px; background-size:cover; background-position:center;
  box-shadow:0 8px 30px rgba(0,0,0,.45); overflow:hidden;
}
.overlay{
  position:absolute; inset:0; background:rgba(0,0,0,.45);
  display:grid; place-content:center; gap:.3rem; text-align:center; padding:20px;
}
.button-ghost{
  display:inline-block; border:2px double #abe4df; border-radius:10px; padding:8px 18px;
  background:#000; color:#fff; font-weight:700; transition:background .2s ease, color .2s ease;
}
.button-ghost:hover{ background:var(--panel-2); color:#000; }
/* === Cartes vidéo anti‑layout shift ===================================== */
/* Réserve l’espace des médias : choisis le bon ratio (16/9 recommandé) */
.media{
  position: relative;
  aspect-ratio: 16 / 9;                 /* ← change en 3/2 si tes vidéos sont 480x320 */
  border:3px solid #333;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 8px 30px rgba(0,0,0,.45);
  background:#000;                       /* fond noir pendant le lazy */
}

/* La vidéo remplit la carte sans changer la hauteur au chargement */
.media > video.lazy-demo{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;               /* override tout height:auto existant */
  object-fit: cover;
  display: block;
  background:#000;
}
/* =========  CONTACT  ========= */
.contact-box{ text-align:center; }
.button-pill{
  color: #a3d4ec;
  display:inline-block; background:rgba(0,0,0,.75); width:min(420px,90%); height:54px; line-height:54px;
  font-weight:800; border-radius:999px; margin-top:10px; transition:background .2s ease, color .2s ease;
}
.button-pill:hover{ background:#fff; color:#000; }

/* =========  Footer  ========= */
footer{ border-top:2px solid #000; padding:24px 0; text-align:center; }
.foot-note{ font-size:1rem; opacity:.95; }

/* =========  Responsive  ========= */
@media (max-width:1030px){
  .main-title{ font-size:clamp(1.8rem,5vw,3rem); inset-block-start:20%; }
}

@media (max-width:980px){
  .bio-grid{ grid-template-columns:1fr; justify-items:center; text-align:center; }
  .demos{ grid-template-columns:1fr; }
  #possibilities .wrapper{ grid-template-columns:1fr; }
}

/* ======= Header & CTA Mobile (<= 720px) ======= */
@media (max-width:720px){
  .site-header{ height:auto; padding-block:8px; }
  .header-container{ display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; row-gap:.45rem; }
  .brand{ display:flex; align-items:baseline; gap:.35rem; white-space:nowrap; font-size:1.15rem; }
  .brand small{ display:inline-block; font-size:.85rem; }
  .header-container nav{ flex:1 0 100%; }
  nav ul{ flex-wrap:wrap; justify-content:flex-end; gap:.4rem .55rem; }
  nav a{ padding:.35rem .6rem; font-size:.85rem; border-radius:.5rem; }

  /* Compense la hauteur variable du header */
  #content > #main-video{ padding-top:112px; }

  .cta-row{ flex-wrap:wrap; row-gap:12px; }
  .button-cta{ flex-basis:100%; max-width:none; }
}

/* Très petit écran : marge de sécurité */
@media (max-width:400px){
  .cta-row{row-gap:12px; }
}
@media (max-width: 600px) {
  .button-cta {
    font-size: 0.9rem; /* Réduit le texte */
    padding: 7px 14px; /* Moins de padding */
    margin: 0px 0;     /* Espacement vertical réduit */
    border-radius: 8px;
    
  }

  /* Optionnel : réduire les boutons header */
  .header-buttons a {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
}

/* =========  Accessibility / Motion  ========= */
@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; }
  #bgVideo{ animation:none; }
}

/* Ajustements CTA par largeur */
@media (max-width:480px){
  .video-container{
    --gap-left: 22%;
    --gap-right: 17%;
  }
}
@media (min-width:481px) and (max-width:600px){
  .video-container{
    --gap-left: 21%;
    --gap-right: 16%;
  }
}
@media (min-width:601px) and (max-width:768px){
  .video-container{
    --gap-left: 20.5%;
    --gap-right: 15.5%;
  }
}
@media (min-width:769px) and (max-width:1024px){
  .video-container{
    --gap-left: 19.5%;
    --gap-right: 14.5%;
  }
}
@media (min-width:1025px) and (max-width:1280px){
  .video-container{
    --gap-left: 20%;
    --gap-right: 14.8%;
  }
}
@media (orientation:landscape) and (max-height:480px){
  .video-container{
    --gap-left: 18.5%;
    --gap-right: 13.8%;
  }
}
/* ===== Games links ===== */
#games-links h2{
  margin-bottom: 12px;
  text-shadow: 2px 2px 4px #000;
}

.games-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 10px;
}

.game-card{
  background: rgba(0,0,0,1);
  border: 3px solid #333;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.game-card .thumb{
  aspect-ratio: 16/9;            /* réserve l’espace, anti-shift */
  background-size: cover;
  background-position: center;
}

.game-card h3{
  padding: 10px 14px 0 14px;
  font-size: 1.1rem;
}

.game-card .blurb{
  padding: 2px 14px 0 14px;
  opacity: .95;
}

.game-card .tags{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px 0 14px;
}
.game-card .tags li{
  font-size: .8rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  padding: 2px 8px;
}

.game-actions{
  display: flex;
  gap: 10px;
  padding: 12px 14px 16px 14px;
  margin-top: auto;              /* pousse les boutons en bas */
}

/* bouton ghost déjà existant : on le compacte un peu ici si besoin */
.game-actions .button-ghost{
  padding: 8px 14px;
}

/* CTA global en bas */
.more-games{
  margin-top: 16px;
  text-align: center;
}

/* Responsive: 2 colonnes puis 1 */
@media (max-width: 980px){
  .games-grid{ grid-template-columns: repeat(2, minmax(220px,1fr)); }
}
@media (max-width: 640px){
  .games-grid{ grid-template-columns: 1fr; }
}
/* Encadré noir semi-transparent sous les vidéos */
.text-box {
  background: rgba(0,0,0,0.65);
  padding: 15px 20px;
  border-radius: 10px;
  margin-top: 12px;
  color: #fff; /* garantit la lisibilité */
}
.text-box h3, 
.text-box h4 {
  margin-top: 0.6em;
}
.text-box ul{ margin:8px 0 0; padding-left:18px }
.text-box li{ margin:4px 0 }
.game-card:hover{ transform: translateY(-5px); box-shadow:0 14px 40px rgba(0,0,0,.5); transition:.18s ease }
[id]{ outline: none; }           /* évite l’anneau violet par défaut */
[id]:focus{ outline:2px solid #75ee9d; outline-offset:6px; }
@media (max-width:600px){
  .button-cta{font-size:.9rem;padding:8px 12px;border-radius:10px}
  .cta-row{gap:10px}
}
@media (prefers-reduced-data: reduce){
  .lazy-demo{ display:none; } /* ou poster-only si tu préfères */
}

