/* Compléments à css/main.css : rendu par blocs, thème (variables), motion design.
   Les variables --c-* sont définies par index.php (réglées dans l'admin > Couleurs) ; les valeurs ci-dessous = repli.
   Aucune modification de main.css : ce fichier est chargé après et le surcharge. */
:root {
  --c-bg: #060c02; --c-onhead: #feffff; --c-panel: #232124; --c-header: #232124; --c-text: #feffff; --c-heading: #feffff;
  --c-accent: #EB6D07; --c-muted: #615D5E; --c-sub: #00C3FF; --c-select: #ff0000;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- thème ---------- */
body { background-color: var(--c-bg); color: var(--c-text); }
header { background-color: var(--c-header); box-shadow: 0 5px 20px var(--c-bg); }
footer { background-color: var(--c-header); box-shadow: 0 -5px 20px var(--c-bg); }
footer, footer a { color: var(--c-muted); }
.content section { background: var(--c-panel); }
h1 { color: var(--c-heading); }
h4 { color: var(--c-sub); }
a { color: var(--c-text); }
a:hover { color: var(--c-accent); }
header a { color: var(--c-onhead); }
header a:hover { color: var(--c-accent); }
nav ul li span { color: var(--c-muted); }
.button:hover { background-color: var(--c-accent); }
.thumb.active { border-color: var(--c-select); }
::selection { background: var(--c-accent); color: #fff; }
html { scrollbar-color: var(--c-accent) var(--c-bg); scroll-behavior: smooth; }

/* ---------- blocs ---------- */
.ta-center { text-align: center; }
.ta-right  { text-align: right; }
.img-block.c img { margin: 0 auto; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; }
.btn-row.c { justify-content: center; }
.btn-row.r { justify-content: flex-end; }
.btn-img.round { border-radius: 0 0 15px 15px; opacity: 0.8; }
.btn-img.round:hover { border-radius: 0 0 14px 14px; opacity: 1; }
.content section.pull-up { display: flex; justify-content: flex-end; margin-top: -18px; margin-bottom: 15px; }
.gallery-main { width: 100%; height: auto; }
/* sélecteur de langue : pastille qui glisse (--n = nb de langues, --i = rang de la langue active, posés par index.php) */
.lang { position: relative; display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); align-items: stretch; gap: 0;
        width: auto; height: 30px; padding: 3px; box-sizing: border-box; border-radius: 15px; flex-shrink: 0; align-self: center;
        background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.lang .pill { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n, 2)); border-radius: 12px;
              background: var(--c-accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
              transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .38s cubic-bezier(.34, 1.4, .5, 1); }
.lang a { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
          min-width: 34px; padding: 0 8px; border-radius: 12px; font-size: 13px; font-weight: 700; letter-spacing: .06em; line-height: 1;
          text-transform: uppercase; color: var(--c-onhead); opacity: .65; cursor: pointer; transition: opacity .2s, color .25s, transform .15s; }
.lang a:hover { opacity: 1; color: var(--c-onhead); }
.lang a:active { transform: scale(.92); }
.lang a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.lang a.active { opacity: 1; color: var(--c-header); pointer-events: none; cursor: default; }
@media screen and (max-width: 578px) { .lang { height: 28px; } .lang a { min-width: 28px; padding: 0 6px; font-size: 12px; } }

/* ---------- motion : base (sans JS) ---------- */
a { transition: color .2s var(--ease); }
.content section { box-shadow: 0 10px 30px rgba(0, 0, 0, .22); transition: opacity .7s var(--ease), transform .7s var(--ease), box-shadow .35s var(--ease); }
.largeVideo, .miniVideo { border-radius: 14px; }
header .logo { transition: height .3s var(--ease), margin .3s var(--ease); }
header.scrolled .logo { height: 54px; margin: 10px 0; }
@media screen and (max-width: 578px) { header.scrolled .logo { height: 42px; } }

/* menu : soulignement animé */
nav ul li a div, nav ul li span div { position: relative; display: inline-block; }
nav ul li a div { transition: transform .25s var(--ease), color .2s; }
nav ul li a div::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: 2px; height: 3px; border-radius: 2px;
                         background: var(--c-accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
nav ul li a:hover div { transform: translateY(-2px); }
nav ul li a:hover div::after { transform: scaleX(1); }

/* titres : trait d'accent qui se déploie */
.content section h2::after { content: ""; display: block; width: 48px; height: 3px; margin-top: 6px; border-radius: 2px;
                             background: var(--c-accent); transition: width .8s .3s var(--ease); }

/* cartes de la liste des jeux */
.band section { overflow: hidden; }
.band section:hover { transform: translateY(-6px); box-shadow: 0 16px 34px rgba(0, 0, 0, .5), 0 0 0 2px var(--c-accent); }
/* le lien couvre toute la carte et reste AU-DESSUS (sinon l'image zoomée l'intercepte et le clic ne fait rien) */
.band section > a { z-index: 3; }
.band section > a:hover { background: transparent; }
.band section > a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
/* le zoom reste dans son cadre : il ne recouvre plus le titre ni l'état (« Sortie le… ») */
.band section h2, .band section .role { position: relative; z-index: 1; }
.band section .gthumb { overflow: hidden; border-radius: 12px; }
.band section .image-member { transition: transform .8s var(--ease); }
.band section:hover .image-member { transform: scale(1.05); }

/* boutons images */
.btn-row a { display: inline-block; }
.btn-row img { transition: transform .25s var(--ease), opacity .25s, border-radius .25s; }
.btn-row a:hover img { transform: translateY(-3px) scale(1.04); }

/* carrousel */
.gallery-main { transition: opacity .25s ease; }
.thumb { transition: opacity .2s, transform .25s var(--ease), border-color .2s; }
.thumb:hover { opacity: 1; transform: translateY(-3px); }

/* images qui se chargent */
img { transition: opacity .6s ease; }
img.fp-wait { opacity: 0; }

/* barre de progression de lecture */
.fp-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; background: var(--c-accent); z-index: 5;
               transform: scaleX(0); transform-origin: left; pointer-events: none; }

/* lightbox + haut de page */
.fp-noscroll { overflow: hidden; }
.fp-lb { position: fixed; inset: 0; background: rgba(0, 0, 0, .88); z-index: 50; display: none; align-items: center; justify-content: center; }
.fp-lb.open { display: flex; animation: fp-fade .25s both; }
@keyframes fp-fade { from { opacity: 0; } }
.fp-lb img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 10px 50px #000; }
.fp-lb button, .fp-top { display: flex; align-items: center; justify-content: center; }
.fp-lb button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 50%; width: 46px; height: 46px;
                font-size: 26px; line-height: 1; cursor: pointer; opacity: 1; padding: 0; transition: background .2s; }
.fp-lb button:hover { background: var(--c-accent); opacity: 1; }
.fp-lb-prev { left: 16px; top: 50%; } .fp-lb-next { right: 16px; top: 50%; } .fp-lb-x { top: 16px; right: 16px; }
.fp-top { position: fixed; right: 18px; bottom: 54px; width: 42px; height: 42px; border-radius: 50%; background: var(--c-accent); color: #fff;
          font-size: 20px; line-height: 1; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .3s, transform .3s; z-index: 4; }
.fp-top.show { opacity: .9; pointer-events: auto; transform: none; }
.fp-top:hover { opacity: 1; }

/* transitions de page (navigateurs compatibles, ignoré sinon) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
@keyframes fp-down { from { transform: translateY(-100%); } }
header { animation: fp-down .55s var(--ease) both; }

/* ---------- motion : apparition au scroll (JS requis) ---------- */
.js .content section:not(.in) { opacity: 0; transform: translateY(28px); }
.js .content section:not(.in) h2::after { width: 0; }
/* filet de sécurité : si le script ne se charge pas, tout s'affiche après 2,5 s */
@keyframes fp-failsafe { to { opacity: 1; transform: none; } }
.js:not(.reveal-on) .content section:not(.in) { animation: fp-failsafe .01s 2.5s forwards; }

/* ---------- accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .content section:not(.in) { opacity: 1; transform: none; }
  .band section:hover, .band section:hover .image-member, .btn-row a:hover img { transform: none; }
  @view-transition { navigation: none; }
}
