/* N11 : accueil premium, visuels validés, PWA et accessibilité unifiés. */
:root { --home-surface: #0b131f; --home-outline: rgba(192,203,219,.15); }

.catalog-shell { width:min(1220px,calc(100% - 44px)); padding:26px 0 64px; }
.home-hero { position:relative; isolation:isolate; overflow:hidden; max-width:none; min-height:218px; margin:0 0 19px; padding:31px clamp(24px,4vw,57px); display:flex; align-items:center; border:1px solid rgba(196,157,90,.18); border-radius:20px; background:#101a29; }
.home-hero-art { position:absolute; z-index:-1; inset:0; background-image:linear-gradient(90deg,rgba(5,10,18,.97) 0%,rgba(5,10,18,.89) 30%,rgba(5,10,18,.63) 52%,rgba(5,10,18,.11) 100%),url("./assets/portal/arkogames-hero-globe-n11.webp"); background-repeat:no-repeat; background-position:center,center 50%; background-size:cover; }
.home-hero-art::after { content:""; position:absolute; inset:0; background:linear-gradient(0deg,rgba(5,10,18,.2),transparent 55%); }
.home-hero-copy { position:relative; width:min(740px,73%); }
.home-hero .eyebrow { margin-bottom:10px; font-size:.64rem; }
.home-hero h1 { max-width:850px; margin:0 0 12px; font-size:clamp(2.15rem,4.4vw,4.35rem); line-height:.99; letter-spacing:-.046em; text-wrap:balance; }
.home-hero .hero-accent { display:block; color:#e4ba78; }
.home-hero-copy>p:last-child { margin:0; max-width:530px; color:#c6cfda; font-size:clamp(.88rem,1.3vw,1.02rem); line-height:1.5; }
.home-featured-games { display:grid; gap:18px; }
.home-featured-games .game-card,.home-secondary-games .game-card { border-color:var(--home-outline); border-radius:20px; }
.home-featured-games .featured { display:grid; grid-template-columns:minmax(0,1.04fr) minmax(0,.96fr); grid-template-rows:minmax(0,1fr); min-height:310px; }
.home-featured-games .imperium-art { height:auto; min-height:300px; overflow:hidden; }
.home-featured-games .imperium-art-image { object-position:center 46%; }
.home-featured-games .featured-content { position:relative; min-width:0; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; gap:20px; padding:clamp(22px,3vw,45px); border-top:0; border-left:1px solid rgba(255,255,255,.09); background:radial-gradient(ellipse at 95% 18%,rgba(188,141,62,.065),transparent 44%),linear-gradient(140deg,#0d1726,#090f1b); }
.home-featured-games .featured-copy { width:100%; }
.home-featured-games .imperium-brand-lockup { display:flex; align-items:center; gap:15px; margin:15px 0 10px; }
.home-featured-games .imperium-emblem { display:block; width:clamp(60px,7.6vw,100px); aspect-ratio:1; object-fit:contain; flex:none; filter:drop-shadow(0 7px 15px rgba(0,0,0,.36)); }
.home-featured-games .imperium-title { display:block; width:min(330px,calc(100% - 90px)); max-height:102px; object-fit:contain; object-position:left center; margin:0; }
.home-featured-games .featured-content p { font-size:.92rem; line-height:1.55; color:#b9c5d3; }
.home-featured-games .play-button { margin:0; border-radius:10px; padding:12px 20px; text-transform:none; font-size:.85rem; letter-spacing:0; }
.home-featured-games .origines-collection-card { grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr); min-height:370px; }
.home-featured-games .origines-collection-content { padding:22px clamp(22px,2.4vw,35px); }
.home-featured-games .origines-collection-brand-title { width:min(92%,495px); margin:4px 0 11px!important; }
.home-featured-games .origines-collection-content>p { margin-bottom:8px; line-height:1.5; font-size:.92rem; }
.home-featured-games .origines-switcher { gap:10px; margin:12px 0; }
.home-featured-games .origines-switcher .collection-games { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.home-featured-games .origines-switcher[data-expanded="true"] .collection-games { grid-template-columns:1fr; }
.home-featured-games .origines-switcher[data-expanded="true"] .collection-games { align-self:start; }
.home-featured-games .origines-switcher[data-expanded="true"] .collection-game-button.collection-game-tile[data-active="true"] { min-height:132px; height:auto; align-self:start; }
.home-featured-games .collection-game-button.collection-game-tile { min-height:69px; }
.home-featured-games .collection-discover { margin-top:auto; font-size:.92rem; }
.home-featured-games .origines-collection-visual { min-width:0; }
.community-strip { display:flex; align-items:center; gap:17px; margin:18px 0; padding:17px clamp(18px,3vw,32px); border:1px solid var(--home-outline); border-radius:17px; background:linear-gradient(120deg,#111d2e,#0b1421); }
.community-strip-symbol { display:grid; place-items:center; width:49px; height:49px; flex:none; border:1px solid rgba(218,175,97,.28); border-radius:15px; font-size:1.45rem; color:#dfbc80; background:rgba(218,175,97,.06); }
.community-strip-copy { min-width:0; flex:1; }
.community-strip-copy h2 { margin:0 0 3px; font-family:Georgia,serif; font-size:clamp(1.05rem,1.7vw,1.35rem); font-weight:400; }
.community-strip-copy p { margin:0; color:#aab8c9; font-size:.85rem; }
.community-strip-link { flex:none; color:#eac88e; border:1px solid rgba(217,174,98,.42); background:rgba(217,174,98,.055); padding:10px 14px; border-radius:10px; text-decoration:none; font-size:.78rem; font-weight:800; }
.community-strip-link:hover { background:rgba(217,174,98,.14); }
.home-secondary-games { display:grid; gap:16px; }
.home-secondary-games .sacra-card { color:inherit; text-decoration:none; min-height:264px; display:grid; grid-template-columns:minmax(0,.52fr) minmax(0,.48fr); }
.sacra-art { position:relative; isolation:isolate; min-height:264px; overflow:hidden; background:#0a111d; }
.sacra-art-image { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; object-position:center 42%; }
.sacra-art::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,transparent 55%,rgba(7,12,21,.45)),linear-gradient(0deg,rgba(7,12,21,.24),transparent 32%); }
.sacra-card-copy { padding:clamp(20px,3vw,33px); display:flex; flex-direction:column; justify-content:center; align-items:flex-start; gap:12px; min-width:0; background:linear-gradient(145deg,#10182a,#0a1020); }
.sacra-brand { display:flex; flex-direction:column; align-items:flex-start; gap:8px; width:100%; min-width:0; }
.sacra-title-lockup { margin:0; line-height:0; width:min(100%,440px); }
.sacra-title-image { display:block; width:100%; height:auto; object-fit:contain; object-position:left center; filter:drop-shadow(0 3px 8px rgba(0,0,0,.16)); }
/* The separate, user-approved planet appears in the Projects tab, avoiding two globes on the Sacra card. */
.projects-hub-tab .sacra-project-planet { width:27px; height:27px; display:block; flex:none; object-fit:contain; }
.projects-hub-tab:has(.sacra-project-planet) { display:inline-flex; align-items:center; gap:6px; }
.sacra-status { color:#caa5e4; letter-spacing:.08em; font-size:.66rem; }
.sacra-card h2 { margin:0; }
.sacra-card-copy p { margin:0; max-width:450px; color:#aebbd0; line-height:1.55; font-size:.87rem; }
.sacra-play { display:inline-flex; align-items:center; gap:15px; color:#e2bd78; border:1px solid rgba(217,174,98,.4); padding:10px 16px; border-radius:10px; font-size:.82rem; font-weight:850; background:rgba(217,174,98,.045); }
.sacra-card:hover .sacra-play { background:rgba(217,174,98,.13); }
.home-secondary-games .mxrush-card { display:grid; grid-template-columns: minmax(170px,.32fr) minmax(0,1fr) auto; min-height:128px; align-items:stretch; color:inherit; text-decoration:none; }
.mxrush-visual { display:grid; place-items:center; padding:17px; background:radial-gradient(ellipse at 50% 55%,rgba(191,57,43,.20),transparent 75%),#0e1420; }
.mxrush-visual img { display:block; width:min(185px,88%); height:76px; object-fit:contain; }
.mxrush-copy { padding:15px 20px; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; gap:4px; }
.mxrush-copy strong { font:400 1.5rem Georgia,serif; }
.mxrush-copy>span:last-child { color:#aebacf; font-size:.82rem; }
.mxrush-play { display:inline-flex; align-items:center; align-self:center; gap:15px; justify-content:center; padding:11px 18px; margin:12px 25px 12px 0; border:1px solid rgba(217,174,98,.5); border-radius:10px; color:var(--gold); font-weight:800; font-size:.87rem; }
.home-hero :focus-visible,.home-featured-games a:focus-visible,.home-secondary-games a:focus-visible,.community-strip a:focus-visible { outline:2px solid #f0cc87; outline-offset:4px; }
@media(max-width:940px) {
 .home-featured-games .featured { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
 .home-featured-games .origines-collection-card { grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); }
 .home-featured-games .origines-switcher .collection-games { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .home-featured-games .origines-switcher[data-expanded="true"] .collection-games { grid-template-columns:1fr; }
 .home-featured-games .imperium-emblem { width:60px; }
 .home-featured-games .imperium-title { width:min(290px,calc(100% - 75px)); }
}
@media(max-width:740px) {
 .catalog-shell { width:calc(100% - 30px); padding-top:16px; }
 .home-hero { min-height:190px; padding:26px 24px; }
 .home-hero-copy { width:90%; }
 .home-hero h1 { font-size:clamp(2.08rem,6.5vw,3.1rem); }
 .home-featured-games .featured { grid-template-columns:1fr; }
 .home-featured-games .imperium-art { aspect-ratio:2.1; min-height:0; }
 .home-featured-games .featured-content { border-left:0; border-top:1px solid rgba(255,255,255,.09); padding:24px; }
 .home-featured-games .imperium-emblem { width:65px; }
 .home-featured-games .featured-content p { max-width:620px; }
 .home-featured-games .play-button { width:auto; }
 .home-featured-games .origines-collection-card { grid-template-columns:1fr; }
 .home-featured-games .origines-collection-visual { aspect-ratio:2.4; min-height:0; }
 .home-featured-games .origines-collection-content { padding:24px; }
 .home-featured-games .origines-switcher .collection-games { grid-template-columns:repeat(4,minmax(0,1fr)); }
 .home-featured-games .origines-switcher[data-expanded="true"] .collection-games { grid-template-columns:1fr; }
 .home-secondary-games .sacra-card { grid-template-columns:1fr; }
 .sacra-art { min-height:0; aspect-ratio:2.35; }
 .home-hero-art { background-position:center,68% 48%; }
 .home-secondary-games .mxrush-card { grid-template-columns:180px minmax(0,1fr); }
 .mxrush-play { grid-column:2; justify-self:start; margin:0 0 15px 20px; }
 .mxrush-copy { padding-bottom:0; }
}
@media(max-width:480px) {
 .catalog-shell { width:calc(100% - 22px); }
 .home-hero { min-height:177px; margin-bottom:13px; border-radius:15px; padding:19px 18px; }
 .home-hero-copy { width:100%; }
 .home-hero h1 { font-size:clamp(1.92rem,9.1vw,2.6rem); }
 .home-hero-copy>p:last-child { max-width:305px; font-size:.85rem; }
 .home-featured-games { gap:13px; }
 .home-featured-games .featured-content { gap:14px; padding:19px; }
 .home-featured-games .imperium-art { aspect-ratio:1.7; }
 .home-featured-games .imperium-emblem { width:56px; }
 .home-featured-games .imperium-title { width:min(255px,calc(100% - 68px)); }
 .home-featured-games .origines-collection-visual { aspect-ratio:1.9; }
 .home-featured-games .origines-collection-content { padding:19px; }
 .home-featured-games .origines-switcher .collection-games { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .home-featured-games .origines-switcher[data-expanded="true"] .collection-games { grid-template-columns:1fr; }
 .community-strip { gap:10px; flex-wrap:wrap; padding:14px; }
 .community-strip-symbol { width:40px; height:40px; }
 .community-strip-copy { flex-basis:calc(100% - 60px); }
 .community-strip-link { margin-left:49px; }
 .sacra-art { aspect-ratio:2.12; }
 .home-hero-art { background-image:linear-gradient(90deg,rgba(5,10,18,.92),rgba(5,10,18,.64) 60%,rgba(5,10,18,.25)),url("./assets/portal/arkogames-hero-globe-n11.webp"); background-position:center,72% center; }
 .sacra-card-copy { padding:17px; }
 .sacra-title-lockup { width:min(100%,335px); }
 .home-secondary-games .mxrush-card { grid-template-columns:120px minmax(0,1fr); }
 .mxrush-visual { padding:9px; }
 .mxrush-visual img { width:100%; }
 .mxrush-copy { padding:12px 13px 0; }
 .mxrush-copy strong { font-size:1.24rem; }
 .mxrush-copy>span:last-child { font-size:.76rem; }
 .mxrush-play { margin-left:13px; }
}
@media(prefers-reduced-motion:reduce) {
 .home-featured-games .imperium-art-image { transition:none; }
}

.experience-home {
  --ag-surface: #101827;
  --ag-outline: rgba(196, 207, 223, .22);
  --ag-text-muted: #b9c6d5;
  --ag-accent: #efc889;
  --ag-focus: #ffdc9f;
  --ag-radius-card: 18px;
  --ag-font-editorial: Georgia, 'Times New Roman', serif;
  --ag-section-gap: clamp(24px, 5vw, 58px);
}

.experience-home .home-hero {
  min-height: clamp(190px, 28vw, 308px);
  padding: clamp(22px, 5vw, 62px);
  margin-bottom: var(--ag-section-gap);
}

.experience-home .home-featured-games,
.experience-home .home-secondary-games {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2.3vw, 25px);
}

.experience-home .home-game {
  display: grid;
  grid-template: auto 1fr / minmax(0, 1fr);
  border: 1px solid var(--ag-outline);
  border-radius: var(--ag-radius-card);
  min-height: auto;
  background: var(--ag-surface);
}

.experience-home .home-game-media {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 0;
}

.experience-home .home-game-media > img:not(.origines-collection-symbol) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.experience-home .home-game-media .origines-collection-art { object-position: 50% 49%; }
.experience-home .home-game-media .sacra-art-image { object-position: 50% 44%; }

.experience-home .home-game-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  min-width: 0;
  min-height: 172px;
  padding: clamp(15px, 2.6vw, 28px);
  gap: 12px;
  border: 0;
  border-top: 1px solid var(--ag-outline);
  background: linear-gradient(150deg, var(--ag-surface), #0b111e);
}

.experience-home .home-game-body p {
  max-width: 54ch;
  margin: 0;
  color: var(--ag-text-muted);
  line-height: 1.5;
}

.experience-home .imperium-brand-lockup { margin: 6px 0; }
.experience-home .imperium-emblem { width: clamp(38px, 4.5vw, 64px); }
.experience-home .imperium-title { width: clamp(140px, 24vw, 288px); max-width: calc(100% - 78px); }
.experience-home .origines-collection-brand-title { width: min(100%, 320px); margin: 0 !important; }
.experience-home .origines-collection-lockup { max-height: 78px; width: 100%; object-fit: contain; object-position: left; }
.experience-home .sacra-title-lockup { width: min(100%, 230px); }
.experience-home .mxrush-copy h2 { margin: 0; font: 1.5rem var(--ag-font-editorial); }
.experience-home .mxrush-visual {
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 50%, #51312e 0%, transparent 70%),
    repeating-linear-gradient(135deg, #172132 0 22px, #141c2b 22px 44px);
}
.experience-home .mxrush-wordmark {
  color: #ffede6;
  font-size: clamp(2.6rem, 7vw, 6.2rem);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.075em;
  line-height: 1;
}

.experience-home .home-game-action {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  min-height: 44px;
  max-width: 100%;
  margin: auto 0 0;
  padding: 9px 15px;
  color: var(--ag-accent);
  background: rgba(217, 174, 98, .09);
  border: 1px solid rgba(217, 174, 98, .52);
  border-radius: 10px;
  text-align: left;
  text-decoration: none;
  line-height: 1.3;
}
.experience-home .home-game:hover .home-game-action { background: rgba(217, 174, 98, .17); }
.experience-home :is(a, button):focus-visible { outline: 2px solid var(--ag-focus); outline-offset: 3px; }

.experience-home .home-collections {
  margin-block: var(--ag-section-gap);
  padding: clamp(14px, 2.8vw, 30px);
  border: 1px solid var(--ag-outline);
  border-radius: var(--ag-radius-card);
  background: var(--ag-surface);
}
.experience-home .home-collections h2 { margin: 0 0 16px; font: 1.6rem var(--ag-font-editorial); }
.experience-home .home-collections .origines-switcher { margin: 0; }
.experience-home .home-collections .origines-switcher[data-expanded="false"] .collection-games {
  grid-template-columns: repeat(auto-fit, minmax(min(136px, 100%), 1fr));
}
.experience-home .home-collections .collection-game-tile { min-height: 0; aspect-ratio: 4 / 3; }
.experience-home .home-collections .origines-variant-tile { min-height: max(84px, 3em); }

@media (max-width: 620px) {
  .experience-home .home-featured-games,
  .experience-home .home-secondary-games { grid-template-columns: minmax(0, 1fr); }
  .experience-home .home-game-body { min-height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .experience-home .home-game,
  .experience-home .home-collections .origines-switcher { transition: none; }
}

.header-button-library { min-height: 44px; }
.player-library {
  width: min(680px, calc(100% - 24px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: auto;
  color: var(--text);
  background: var(--panel);
  border: 1px solid rgba(217, 174, 98, .45);
  border-radius: 18px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, .6);
}
.player-library::backdrop { background: rgba(5, 9, 16, .75); }
.player-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(12px, 4vw, 24px);
  border-bottom: 1px solid var(--line);
}
.player-library-header h2 { margin: 0; font: 1.65rem Georgia, serif; }
.player-library-header button { width: auto; min-height: 44px; padding-inline: 10px; font-size: .91rem; }
.player-library-content { padding: 10px clamp(12px, 4vw, 24px) 22px; }
.player-library-content ul { padding: 0; list-style: none; }
.player-library-content li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.player-library-content a { color: #f1cd91; text-underline-offset: 4px; }
.player-library-content button {
  min-height: 44px;
  background: #202b3d;
  border: 1px solid #6b6154;
  border-radius: 8px;
  color: #f4e9d8;
  padding: 5px 10px;
}
.player-library-content button[aria-pressed="true"] { color: #ffe2b2; background: #40332b; }
.player-library :is(a, button):focus-visible { outline: 2px solid #ffdc9f; outline-offset: 3px; }

@media (max-width: 420px) {
  .player-library-content li { grid-template-columns: minmax(0, 1fr); }
  .player-library-content button { justify-self: start; }
}

/* Clear the compact Quick Social launcher on the single-column gallery. */
@media (max-width: 340px) {
  .experience-home .home-collections .collection-games { padding-inline: 10px; }
}

.player-library-content { display: grid; gap: 18px; }
.player-library-content h3 { margin: 0 0 8px; color: #f5e7cd; font-size: 1rem; }
.player-library-content p { margin: 0; color: #c4cddd; line-height: 1.45; }
.player-library-content .player-library-list { display: grid; gap: 8px; margin: 0; }
.player-library-content .player-library-list li { 
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 10px 0;
  margin: 0;
}
.player-library-content .player-library-list a { font-weight: 650; overflow-wrap: anywhere; }
.player-library-content .player-library-list button {
  min-width: 44px;
  min-height: 44px;
  justify-self: stretch;
  padding: 0 8px;
  line-height: 1;
  font-size: 1.27rem;
}
.player-library .player-library-profile, .player-library .player-library-activity {
  padding: 13px;
  border-radius: 10px;
  border: 1px solid #394458;
  background: #131e2e;
}
.player-library .player-library-profile { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.player-library .player-library-profile h3 { margin: 0; overflow-wrap: anywhere; }
.player-library .player-library-panels { display: grid; gap: 8px; }
@media (min-width: 520px) {
  .player-library .player-library-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.player-library-content .player-library-history { list-style: none; padding: 0; margin: 0; }
.player-library-content .player-library-history li { grid-template-columns: minmax(0, 1fr) auto; }
.player-library-content .player-library-history time { color: #c4cddd; font-size: .82rem; }
.player-library-content .player-library-device { font-size: .85rem; }
.player-library-content [role="status"]:empty { display: none; }


.player-library-profile [data-library-refresh] { margin-inline-start:8px; min-height:44px; }
