/* Pages de cartes du site : accueil (/) et jeux (/jeux). Pensées pour la TV ou l'ordinateur, lisibles aussi sur téléphone. */
body { display: flex; flex-direction: column; min-height: 100%; height: auto; }

main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: clamp(20px, 4vh, 40px); width: 100%;
  padding: 24px 20px max(24px, env(safe-area-inset-bottom)); max-width: 1100px; margin: 0 auto; }
h1 { margin: 0; font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: 1; font-weight: 800; letter-spacing: -.03em; text-align: center; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(16px, 3vw, 32px); }
.slide { display: contents; }
.arrow { display: none; }
.game { display: grid; align-content: start; gap: 12px; padding: clamp(20px, 3vw, 36px); border-radius: var(--radius);
  background: var(--panel); border: 2px solid var(--line); color: var(--text); text-decoration: none; }
a.game:hover, a.game:focus-visible, .game:has(.game-link:hover, .game-link:focus-visible) { border-color: var(--text); transform: translateY(-2px); }
.game-text { display: grid; gap: 12px; }
.art { order: -1; }
.art-rosey { display: none; }
/* Music Battle : la carte mène à l'accueil du jeu (lien du texte étendu à toute la carte), le mouton à la battle fictive. */
.game:has(.game-link) { position: relative; }
a.game-link { color: inherit; text-decoration: none; }
a.game-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.art-link { display: contents; }
.art-link img { position: relative; z-index: 1; }
.game img { width: clamp(72px, 10vw, 120px); height: auto; }
.game h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); line-height: .95; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.game h2 span:first-child { color: var(--a); }
.game h2 span:last-child { color: var(--b); }
.game p { margin: 0; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.25rem); }
.game .go { font-weight: 800; font-size: clamp(1.05rem, 1.8vw, 1.4rem); color: var(--a); }
.game .icon { font-size: clamp(56px, 8vw, 96px); line-height: 1; }

/* Carrousel (thèmes « Rosey » et « Boutique ») : un jeu par diapositive, flèches sur les côtés. Rosey : grande scène plein écran. */
:is([data-theme="rosey"], [data-theme="boutique"]) main { max-width: 1400px; padding-inline: 0; justify-content: flex-start; }
:is([data-theme="rosey"], [data-theme="boutique"]) h1 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(30, 10, 35, .6); }
:is([data-theme="rosey"], [data-theme="boutique"]) .games { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; }
:is([data-theme="rosey"], [data-theme="boutique"]) .games::-webkit-scrollbar { display: none; }
:is([data-theme="rosey"], [data-theme="boutique"]) .slide { display: block; position: relative; flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
:is([data-theme="rosey"], [data-theme="boutique"]) .game { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; align-content: center;
  gap: clamp(12px, 3vw, 40px); min-height: min(68vh, 620px); padding: clamp(16px, 3vw, 40px) clamp(64px, 8vw, 110px);
  background: none; border: 0; }
:is([data-theme="rosey"], [data-theme="boutique"]) a.game:hover, :is([data-theme="rosey"], [data-theme="boutique"]) a.game:focus-visible, :is([data-theme="rosey"], [data-theme="boutique"]) .game:has(.game-link:hover) { transform: none; }
:is([data-theme="rosey"], [data-theme="boutique"]) a.game:hover .go, :is([data-theme="rosey"], [data-theme="boutique"]) .game-link:hover .go { text-decoration: underline; text-underline-offset: 6px; }
:is([data-theme="rosey"], [data-theme="boutique"]) .game-text { gap: 16px; padding: clamp(18px, 2.5vw, 30px); border-radius: var(--radius);
  background: rgba(43, 22, 50, .55); backdrop-filter: blur(6px); }
:is([data-theme="rosey"], [data-theme="boutique"]) .game h2 { font-size: clamp(2.2rem, 5.5vw, 4.4rem); font-weight: 700; letter-spacing: 0; line-height: 1; }
:is([data-theme="rosey"], [data-theme="boutique"]) .game p { color: var(--text); }
:is([data-theme="rosey"], [data-theme="boutique"]) .go { justify-self: start; padding: .45em 1.1em; border-radius: 999px; background: var(--a); color: var(--on-accent); }
:is([data-theme="rosey"], [data-theme="boutique"]) .art { order: 0; justify-self: center; }
:is([data-theme="rosey"], [data-theme="boutique"]) .art-nuit { display: none; }
:is([data-theme="rosey"], [data-theme="boutique"]) .art-rosey { display: block; }
:is([data-theme="rosey"], [data-theme="boutique"]) .game img.art { width: min(100%, 52vh, 560px); filter: drop-shadow(0 18px 30px rgba(40, 10, 40, .55));
  animation: flotte 4s ease-in-out infinite; }
:is([data-theme="rosey"], [data-theme="boutique"]) .game .icon.art { font-size: clamp(120px, 26vh, 260px); filter: drop-shadow(0 18px 30px rgba(40, 10, 40, .55));
  animation: flotte 4s ease-in-out infinite; }
:is([data-theme="rosey"], [data-theme="boutique"]) .arrow { display: grid; place-items: center; position: absolute; top: 50%; translate: 0 -50%;
  width: 46px; height: 72px; border-radius: 4px; background: rgba(12, 6, 16, .82); color: #fff; text-decoration: none;
  font: 700 2.4rem/1 system-ui, sans-serif; }
:is([data-theme="rosey"], [data-theme="boutique"]) .arrow:hover, :is([data-theme="rosey"], [data-theme="boutique"]) .arrow:focus-visible { background: #000; }
:is([data-theme="rosey"], [data-theme="boutique"]) .prev { left: clamp(6px, 1.5vw, 24px); }
:is([data-theme="rosey"], [data-theme="boutique"]) .next { right: clamp(6px, 1.5vw, 24px); }
@keyframes flotte { 50% { translate: 0 -14px; rotate: -2deg; } }
@media (max-width: 720px) {
  :is([data-theme="rosey"], [data-theme="boutique"]) .game { grid-template-columns: minmax(0, 1fr); padding-inline: 56px; }
  :is([data-theme="rosey"], [data-theme="boutique"]) .art { order: -1; }
  :is([data-theme="rosey"], [data-theme="boutique"]) .game img.art { width: min(70vw, 34vh); }
  :is([data-theme="rosey"], [data-theme="boutique"]) .game .icon.art { font-size: min(30vw, 22vh); }
}
/* Thème « Boutique » : vitrine en tête de page, image à gauche, fiche à droite, bouton vert, flèches en dégradé. */
[data-theme="boutique"] main { max-width: 1100px; padding-inline: 16px; }
[data-theme="boutique"] h1 { text-align: left; font-size: clamp(.95rem, 1.4vw, 1.15rem); font-weight: 400; text-transform: uppercase;
  letter-spacing: .04em; color: #fff; text-shadow: none; padding-inline: clamp(44px, 5vw, 56px); }
[data-theme="boutique"] .slide { padding-inline: clamp(44px, 5vw, 56px); }
[data-theme="boutique"] .game { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: stretch; gap: 0; min-height: 0;
  padding: 0; overflow: hidden; border-radius: var(--radius); background: #0f1922; box-shadow: 0 0 7px rgba(0, 0, 0, .5); }
[data-theme="boutique"] .game-text { align-content: start; gap: 14px; padding: clamp(16px, 2.2vw, 26px); border-radius: 0;
  background: linear-gradient(to bottom, rgba(42, 71, 94, .35), rgba(15, 25, 34, 0)); backdrop-filter: none; }
[data-theme="boutique"] .game h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 400; line-height: 1.15; }
[data-theme="boutique"] .game h2 span { color: #fff; }
[data-theme="boutique"] .game p { color: var(--text); font-size: clamp(.95rem, 1.3vw, 1.1rem); }
[data-theme="boutique"] .go { margin-top: 6px; padding: .5em 1.3em; border-radius: 2px; font-weight: 400; font-size: clamp(1rem, 1.4vw, 1.15rem);
  background: linear-gradient(to right, #75b022 5%, #588a1b 95%); color: #d2efa9; }
[data-theme="boutique"] a.game:hover .go, [data-theme="boutique"] .game-link:hover .go, [data-theme="boutique"] a.game:focus-visible .go {
  background: linear-gradient(to right, #8ed629 5%, #6aa621 95%); color: #fff; text-decoration: none; }
[data-theme="boutique"] .art { order: -1; justify-self: stretch; }
[data-theme="boutique"] .game img.art, [data-theme="boutique"] .game .icon.art { width: 100%; height: 100%; min-height: clamp(200px, 40vh, 420px);
  filter: none; animation: none; background: radial-gradient(circle at 50% 45%, #2a475e, #0e1620 75%); transition: filter .2s; }
[data-theme="boutique"] .game img.art { object-fit: contain; padding: clamp(12px, 2vw, 28px); }
[data-theme="boutique"] .game .icon.art { display: grid; place-items: center; font-size: clamp(110px, 20vh, 200px); }
[data-theme="boutique"] .game:hover .art { filter: brightness(1.12); }
[data-theme="boutique"] .arrow { width: clamp(36px, 4vw, 46px); border-radius: 0; color: #fff; font-size: 2rem;
  background: linear-gradient(to right, rgba(0, 0, 0, .3) 5%, rgba(0, 0, 0, 0) 95%); }
[data-theme="boutique"] .next { background: linear-gradient(to left, rgba(0, 0, 0, .3) 5%, rgba(0, 0, 0, 0) 95%); }
[data-theme="boutique"] .prev { left: 0; }
[data-theme="boutique"] .next { right: 0; }
[data-theme="boutique"] .prev:hover, [data-theme="boutique"] .prev:focus-visible {
  background: linear-gradient(to right, rgba(171, 218, 244, .3) 5%, rgba(171, 218, 244, 0) 95%); }
[data-theme="boutique"] .next:hover, [data-theme="boutique"] .next:focus-visible {
  background: linear-gradient(to left, rgba(171, 218, 244, .3) 5%, rgba(171, 218, 244, 0) 95%); }
@media (max-width: 720px) {
  [data-theme="boutique"] .game { grid-template-columns: minmax(0, 1fr); padding-inline: 0; }
  [data-theme="boutique"] .game img.art, [data-theme="boutique"] .game .icon.art { width: 100%; min-height: 0; aspect-ratio: 16 / 9; }
}
[data-theme="boutique"] .back a { color: var(--b); }
.back { margin: 0; text-align: center; font-weight: 800; }
.back a { color: var(--muted); }
