/* =========================================================
   LIFT STORE — espace client (s'ajoute à site.css, même DA)
   ========================================================= */
.acc-page { display: flex; flex-direction: column; min-height: 100vh; }
.acc { position: relative; z-index: 1; flex: 1; padding-top: calc(76px + env(safe-area-inset-top)); }
.acc-light { position: fixed; z-index: -1; right: -18%; top: -22%; width: 1000px; height: 1000px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .09), transparent 70%); animation: breathe 9s ease-in-out infinite; }
.acc [hidden] { display: none !important; }
.acc-nav { margin-left: auto; }

/* Entrée en cascade quand une partie s'affiche */
.acc-in { opacity: 0; transform: translateY(24px); }
.show .acc-in, .acc-in.show { animation: up .85s var(--ease) calc(var(--i, 0) * .08s) forwards; }
html:not(.js) .acc-in { opacity: 1; transform: none; }

/* ---------- Chargement ---------- */
.acc-loading { min-height: calc(100vh - 260px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--fg2); animation: fade .4s var(--ease); }

/* ---------- Connexion ---------- */
.acc-login-in { min-height: calc(100vh - 76px - 140px); display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; padding-top: 40px; padding-bottom: 60px; }
.acc-login-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.acc-login h1 { font: clamp(40px, 6vw, 72px)/1.02 var(--display); letter-spacing: .02em; }
.acc-perks { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.acc-perks li { display: flex; align-items: center; gap: 16px; }
.acc-perks svg { flex: none; width: 46px; height: 46px; padding: 12px; fill: none; stroke: var(--white); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line2); clip-path: var(--facet-s); transition: background .3s, transform .45s var(--ease); }
.acc-perks li:hover svg { background: rgba(255, 255, 255, .14); transform: rotate(-6deg) scale(1.06); }
.acc-perks span { display: flex; flex-direction: column; color: var(--fg2); font-size: 15px; line-height: 1.45; }
.acc-perks b { color: var(--fg); font-weight: 600; font-size: 16px; }
.discord-ico { position: relative; z-index: 1; width: 22px; height: 22px; fill: currentColor; }
.acc-note { font-size: 14px; color: var(--fg3); max-width: 460px; }
.acc-login-visual { display: flex; justify-content: center; }
.acc-crystal { width: min(400px, 74vw); }
.btn[aria-busy="true"] { pointer-events: none; opacity: .75; }

/* ---------- Messages ---------- */
.acc-notice { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 20px 16px 22px; background: var(--panel2); border: 1px solid var(--line2); font-size: 15px; color: var(--fg); animation: pop .45s var(--ease); }
.acc-notice::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--white); box-shadow: 0 0 14px rgba(255, 255, 255, .6); }
.acc-notice.err::before { background: #8e949d; box-shadow: none; }
.acc-notice .spinner { flex: none; width: 22px; height: 22px; border-width: 2px; }
.acc-notice a, .acc-notice button { text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; }

/* ---------- Tableau de bord ---------- */
.acc-dash { padding: 44px 0 110px; }
.acc-dash > .wrap { display: flex; flex-direction: column; gap: 28px; }
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.acc-user { display: flex; align-items: center; gap: 20px; min-width: 0; }
.acc-user h1 { font: clamp(26px, 3.6vw, 42px)/1.1 var(--display); margin-top: 6px; overflow-wrap: anywhere; }
.acc-avatar { position: relative; flex: none; width: 76px; height: 76px; padding: 2px; background: rgba(255, 255, 255, .5);
  clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%); }
.acc-avatar img, .acc-avatar i { width: 100%; height: 100%; display: block; object-fit: cover; clip-path: inherit; background: var(--panel2); }
.acc-avatar i { display: grid; place-items: center; font: 26px var(--display); font-style: normal; padding-top: 8px; }
.acc-dash h2 { font-size: clamp(22px, 2.6vw, 28px); }
.acc-block { display: flex; flex-direction: column; gap: 18px; }
.acc-block-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.acc-refresh { width: 42px; height: 42px; display: grid; place-items: center; border: 0; cursor: pointer; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line2); clip-path: var(--facet-s); transition: background .3s; }
.acc-refresh:hover { background: rgba(255, 255, 255, .12); }
.acc-refresh svg { width: 18px; height: 18px; fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .6s var(--ease); }
.acc-refresh:hover svg { transform: rotate(90deg); }
.acc-refresh.busy svg { animation: spin .8s linear infinite; }

/* Une licence */
.lic-list { display: flex; flex-direction: column; gap: 16px; }
.lic { position: relative; padding: 26px 28px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; overflow: hidden;
  transition: border-color .35s, box-shadow .45s var(--ease), transform .45s var(--ease); }
.lic:hover { border-color: rgba(255, 255, 255, .26); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.lic.is-active::before { content: ''; position: absolute; inset: -1px; pointer-events: none; border: 1px solid transparent;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%) border-box; background-size: 260% 100%;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: sweepBg 6s linear infinite; }
.lic.is-off { opacity: .78; }
.lic-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.lic-top h3 { font: 20px/1.3 var(--display); }
.lic-sub { margin-top: 4px; font-size: 14px; color: var(--fg3); }
.pill { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; clip-path: var(--facet-s); }
.pill.on { background: var(--white); color: #0a0b0d; }
.pill.on::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #0a0b0d; animation: blink 2.4s ease-in-out infinite; }
.pill.off { background: rgba(255, 255, 255, .07); color: var(--fg2); box-shadow: inset 0 0 0 1px var(--line2); }
.lic-key { display: flex; align-items: stretch; gap: 8px; }
.lic-key code { flex: 1; min-width: 0; display: flex; align-items: center; padding: 14px 18px; background: #0b0c0f; border: 1px solid var(--line2);
  font: 600 17px/1.2 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .1em; color: var(--white); overflow-x: auto; white-space: nowrap; }
.key-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 112px; padding: 0 16px; border: 0; cursor: pointer; font-weight: 700; font-size: 14px;
  background: rgba(255, 255, 255, .06); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line2); clip-path: var(--facet-s); transition: background .25s, color .25s; }
.key-btn:hover { background: rgba(255, 255, 255, .13); }
.key-btn.done { background: var(--white); color: #0a0b0d; }
.key-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lic-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lic-info > div { padding: 14px 16px 14px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lic-info > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.lic-info dt { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fg3); }
.lic-info dd { margin: 0; font-size: 15px; color: var(--fg); overflow-wrap: anywhere; }
.lic-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lic-hint { font-size: 14px; color: var(--fg3); }
.lic-reason { font-size: 14px; color: var(--fg2); }

/* Aucune licence */
.lic-empty { padding: 46px 30px; text-align: center; background: var(--panel); border: 1px dashed var(--line2); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lic-empty img { width: 64px; height: 64px; object-fit: contain; opacity: .9; filter: drop-shadow(0 0 18px rgba(255, 255, 255, .3)); animation: float 7s ease-in-out infinite; }
.lic-empty h3 { font: 19px var(--display); }
.lic-empty p { color: var(--fg2); max-width: 460px; }

/* Cartes du bas */
.acc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.acc-card { padding: 28px; background: linear-gradient(160deg, var(--panel2), #0f1013); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; transition: border-color .35s; }
.acc-card:hover { border-color: rgba(255, 255, 255, .2); }
.acc-card-title { display: flex; align-items: center; gap: 12px; font: 18px/1.3 var(--display) !important; }
.acc-card-title svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--white); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.acc-card p { color: var(--fg2); font-size: 15px; }
.dl { display: flex; flex-direction: column; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.dl:first-child { border-top: 0; padding-top: 0; }
.dl h3 { font-size: 16px; font-weight: 600; }
.dl .btn { align-self: flex-start; }
.dl .btn svg { position: relative; z-index: 1; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acc-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.acc-steps li { counter-increment: s; position: relative; padding-left: 46px; color: var(--fg2); font-size: 15px; min-height: 32px; }
.acc-steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; display: grid; place-items: center; padding-top: 3px;
  font: 13px var(--display); color: #0a0b0d; background: var(--white); clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%); }
.acc-steps b { color: var(--fg); font-weight: 600; }
.acc-code { display: flex; align-items: stretch; gap: 8px; margin-top: 10px; }
.acc-code code { flex: 1; min-width: 0; padding: 11px 14px; background: #0b0c0f; border: 1px solid var(--line2); font: 600 14px/1.4 ui-monospace, 'Cascadia Mono', Consolas, monospace; color: var(--white); overflow-x: auto; white-space: nowrap; }
.acc-copy { flex: none; padding: 0 14px; border: 0; cursor: pointer; font-weight: 700; font-size: 14px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px var(--line2); clip-path: var(--facet-s); transition: background .25s, color .25s; }
.acc-copy:hover { background: rgba(255, 255, 255, .14); }
.acc-copy.done { background: var(--white); color: #0a0b0d; }
.acc-copy { display: inline-flex; align-items: center; gap: 6px; }
.acc-copy svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Récupérer un achat */
.acc-claim { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; align-items: start; }
.acc-claim-copy { display: flex; flex-direction: column; gap: 12px; }
.acc-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.acc-form label { display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 600; color: var(--fg2); }
.acc-form input { width: 100%; padding: 13px 15px; background: #0b0c0f; border: 1px solid var(--line2); color: var(--fg); font: 15px var(--body); outline: none; transition: border-color .25s, box-shadow .25s; border-radius: 0; }
.acc-form input::placeholder { color: #6c727b; }
.acc-form input:focus { border-color: rgba(255, 255, 255, .6); box-shadow: 0 0 0 3px rgba(255, 255, 255, .08); }
.acc-form .btn { grid-column: 1 / -1; justify-self: start; }
.acc-form-msg { grid-column: 1 / -1; font-size: 15px; min-height: 0; }
.acc-form-msg:empty { display: none; }
.acc-form-msg.ok { color: var(--white); }
.acc-form-msg.err { color: #c3c7cd; }

.acc-footer { margin-top: auto; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Écrans plus petits ---------- */
@media (max-width: 900px) {
  .acc-login-in { grid-template-columns: minmax(0, 1fr); text-align: center; gap: 16px; padding-top: 24px; }
  .acc-login-copy { align-items: center; }
  .acc-perks { align-items: flex-start; text-align: left; }
  .acc-login-visual { order: -1; }
  .acc-crystal { width: min(220px, 56vw); }
  .acc-grid, .acc-claim { grid-template-columns: minmax(0, 1fr); }
  .lic-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lic-info > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .lic-info > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .acc-dash { padding-top: 30px; }
}
@media (max-width: 560px) {
  .lic { padding: 22px 18px; }
  .lic-key { flex-wrap: wrap; }
  .lic-key code { flex-basis: 100%; font-size: 15px; letter-spacing: .06em; padding: 13px 14px; }
  .key-btn { flex: 1; min-height: 44px; }
  .acc-form { grid-template-columns: minmax(0, 1fr); }
  .acc-form .btn { justify-self: stretch; }
  .acc-card { padding: 22px 18px; }
  .acc-avatar { width: 60px; height: 60px; }
  .acc-head .btn { width: 100%; }
  .acc-nav .btn { padding: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .acc-in { opacity: 1 !important; transform: none !important; }
}
