/* Espace membre (Site/compte/). S'appuie sur ../styles.css : couleurs (--surface, --gold...), polices, .btn, .nav. */

body.member { min-height: 100vh; }
.member [hidden] { display: none !important; }
/* styles.css donne 120 px de marge a toute <section> (page vitrine) : pas ici. */
.member section:not(.m-banner) { padding: 0; }

/* ---------------------------------------------------------------- barre */
.m-nav-user {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 14px 4px 4px; border: 1px solid var(--line-gold); border-radius: var(--r);
  background: var(--surface); font-family: var(--display); font-weight: 600; font-size: 15px;
}
.m-nav-user img { width: 32px; height: 32px; border-radius: 6px; }

/* ----------------------------------------------------------- connexion */
/* Proposition A de la maquette (2026-12-01) : Narkuss detoure a gauche, titre Kanit italique en degrade or, pastilles. */
.m-login {
  position: relative; overflow: hidden;
  min-height: calc(100vh - var(--navh)); padding: 48px 24px 56px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 22% 50%, #3b2483 0%, #17215a 38%, var(--ground) 75%);
}
.m-login-champ {
  position: absolute; z-index: 0; left: -290px; top: 50%; transform: translateY(-46%); width: min(560px, 42vw); height: auto;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); pointer-events: none;
}
.m-login-inner { position: relative; width: 100%; max-width: var(--maxw); display: flex; justify-content: flex-end; align-items: center; gap: 48px; flex-wrap: wrap; }
.m-login-pitch { position: relative; z-index: 1; flex: 1 1 360px; max-width: 440px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.m-login-kicker {
  padding: 6px 14px; border-radius: 999px; background: rgba(233,181,79,.14); border: 1px solid rgba(255,215,126,.5);
  font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-lit);
}
.m-login-pitch h1 {
  margin: 0; font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: clamp(42px, 5.4vw, 66px); line-height: .95; letter-spacing: -.01em;
  background: linear-gradient(180deg, #fff 0%, #ffe6a8 55%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.45));
}
.m-login-pitch p { color: #d4daf0; font-size: 19px; line-height: 1.45; margin: 0; text-shadow: 0 2px 8px rgba(7,10,29,.9); }
.m-login-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.m-login-chips li { padding: 7px 12px; border-radius: 8px; background: rgba(16,24,63,.85); border: 1px solid var(--rule); font-weight: 600; font-size: 15px; }
@media (max-width: 1100px) { .m-login-champ { opacity: .35; } }
@media (max-width: 760px) { .m-login-champ { display: none; } .m-login-pitch { max-width: none; } }
.m-login-card { position: relative; z-index: 1; flex: 0 1 440px; }
.m-login-help { border-top: 1px solid var(--rule); padding-top: 14px; font-size: 15px; color: var(--muted); }
.m-login-help p { margin: 0 0 6px; }

/* --------------------------------------------------------------- blocs */
.m-card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg);
  padding: 24px 26px; box-sizing: border-box;
}
.m-login-card { border-color: var(--line-gold); box-shadow: var(--shadow); padding: 32px; }
.m-card h2, .m-section-head h2 { font-size: 21px; margin: 0 0 14px; letter-spacing: .04em; }
.m-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.m-card-head a { font-weight: 600; font-size: 15px; }
.m-flush { padding: 0; overflow: hidden; }
.m-dim { color: var(--muted); }
.m-small { font-size: 14px; }
.m-center { display: flex; justify-content: center; margin-top: 18px; }
.m-empty { color: var(--dim); margin: 10px 0; }
.m-msg { margin: 0; padding: 10px 14px; border-radius: var(--r); background: rgba(255, 77, 92, .12); border: 1px solid rgba(255, 77, 92, .45); color: #ffc4ca; font-size: 15px; }
.m-msg.ok { background: rgba(212, 166, 79, .12); border-color: var(--line-gold); color: var(--gold-lit); }
.m-state { margin-bottom: 20px; }
.m-notice { margin: 0 0 18px; padding: 14px 18px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-gold); }

/* --------------------------------------------------------- formulaires */
.m-form { display: flex; flex-direction: column; gap: 10px; }
.m-form h2 { margin-bottom: 6px; }
.m-form label { font-weight: 600; font-size: 15px; color: var(--muted); }
.m-form input[type=email], .m-form input[type=password], .m-form input[type=text] {
  height: 48px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--rule);
  background: var(--ground); color: var(--text); font: inherit; width: 100%; box-sizing: border-box;
}
.m-form input:focus { border-color: var(--gold); outline: none; }
.m-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 6px; }
.m-label-row a { font-size: 14px; font-weight: 600; }
.m-check { display: flex; align-items: center; gap: 10px; font-weight: 500 !important; }
.m-check input, .m-toggle input { width: 20px; height: 20px; accent-color: var(--gold); flex-shrink: 0; }
.m-wide { width: 100%; justify-content: center; min-height: 52px; }
.m-back { text-align: center; font-size: 15px; font-weight: 600; margin-top: 4px; }
.m-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 8px; }
.m-grid3 > div { display: flex; flex-direction: column; gap: 6px; }
.m-toggle { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--rule); cursor: pointer; }
.m-toggle span { display: flex; flex-direction: column; }
.m-toggle small { color: var(--muted); font-size: 14px; }
.m-link { background: none; border: 0; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; text-decoration: underline; min-height: 44px; }
.m-link:hover { color: var(--gold-lit); }

/* -------------------------------------------------------------- onglets */
/* La barre du site est collante (sticky), pas fixe : rien a decaler sous elle. */
.m-tabs-wrap { background: var(--ground-2); border-bottom: 1px solid var(--rule); }
.m-tabs { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; overflow-x: auto; }
.m-tabs button {
  background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); cursor: pointer;
  font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .05em; text-transform: uppercase;
  padding: 16px 18px; white-space: nowrap; min-height: 52px;
}
.m-tabs button[aria-selected=true] { color: var(--gold-lit); border-bottom-color: var(--gold); }
.m-tabs button:hover { color: var(--text); }

.m-main { max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 24px; }
.m-main > section { display: flex; flex-direction: column; gap: 22px; }
.m-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.m-section-head h2 { font-size: 30px; margin: 0; }
.m-section-head p { margin: 4px 0 0; }

/* -------------------------------------------------------------- bandeau */
.m-banner {
  flex-direction: row !important; align-items: center; flex-wrap: wrap; gap: 28px !important;
  background: linear-gradient(100deg, var(--surface-2), var(--surface) 60%); border: 1px solid var(--line-gold);
  border-radius: var(--r-lg); padding: 26px 30px;
}
.m-banner-av { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.m-banner-av img { width: 120px; height: 120px; border-radius: 14px; border: 3px solid var(--gold); box-sizing: border-box; }
.m-level {
  position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); white-space: nowrap;
  background: var(--gold); color: var(--on-gold); font-family: var(--display); font-weight: 700; font-size: 14px;
  padding: 1px 12px; border-radius: 13px;
}
.m-banner-main { flex: 999 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.m-banner-name { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.m-banner-name h1 { margin: 0; font-size: clamp(30px, 4vw, 42px); line-height: 1.1; text-transform: none; overflow-wrap: anywhere; }
.m-top { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 21px; color: var(--gold-lit); }
.m-banner-title { color: var(--muted); }
.m-xp { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 15px; }
.m-xp-track { width: min(300px, 100%); height: 10px; border-radius: 5px; background: rgba(0,0,0,.5); overflow: hidden; }
.m-xp-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-lit)); }
.m-wallet { display: flex; gap: 12px; flex-wrap: wrap; }
.m-coin { background: var(--ground); border: 1px solid var(--rule); border-radius: var(--r); padding: 10px 18px; min-width: 112px; display: flex; flex-direction: column; }
.m-coin span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.m-coin strong { font-family: var(--display); font-size: 25px; }
.m-coin .gold { color: var(--gold-lit); }
.m-coin .diamond { color: var(--arcane); }

/* --------------------------------------------------------------- apercu */
.m-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.m-stat { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px 20px; }
.m-stat-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.m-stat-value { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.2; }
.m-stat-sub { font-size: 15px; color: var(--muted); }
.m-cols { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.m-cols > .m-card { flex: 1 1 320px; min-width: 0; }
.m-cols > .m-col-wide { flex: 999 1 520px; }
.m-cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between; background: var(--ground-2); border-style: dashed; }
.m-cta p { margin: 2px 0 0; color: var(--muted); }

.m-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--rule); }
.m-row-main { flex: 1 1 auto; min-width: 0; }
.m-row-title { font-family: var(--display); font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.m-row-sub { font-size: 14px; color: var(--muted); }
.m-row-side { font-family: var(--display); font-weight: 600; font-size: 17px; white-space: nowrap; }
.m-champ { width: 48px; height: 48px; border-radius: 8px; border: 2px solid var(--rule); box-sizing: border-box; flex-shrink: 0; display: inline-block; background: var(--ground); object-fit: cover; }

/* ---------------------------------------------------------- historique */
.m-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.m-chip {
  min-height: 44px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--rule); background: var(--surface);
  color: var(--muted); font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
}
.m-chip[aria-pressed=true] { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.m-match { border-top: 1px solid var(--rule); }
.m-match:first-child { border-top: 0; }
#ov-recent .m-match:first-child { border-top: 1px solid var(--rule); }
.m-match-head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: none; border: 0; color: inherit; font: inherit; text-align: left; }
#ov-recent .m-match-head { padding: 12px 0; }
button.m-match-head { cursor: pointer; }
button.m-match-head:hover, button.m-match-head[aria-expanded=true] { background: var(--surface-2); }
.m-bar { width: 6px; height: 44px; border-radius: 3px; flex-shrink: 0; background: var(--dim); }
.m-bar.win { background: var(--gold); }
.m-res.win, .m-row-side.win { color: var(--gold-lit); }
.m-res.loss, .m-row-side.loss { color: var(--muted); }
.m-vs { color: var(--muted); font-weight: 500; }
.m-match-detail { background: var(--ground-2); padding: 18px 20px 22px 40px; display: flex; gap: 24px 32px; flex-wrap: wrap; align-items: center; }
.m-draft-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.m-draft-row { display: flex; gap: 8px; }
.m-draft-row .m-champ { width: 54px; height: 54px; }
.m-draft-row.mine .m-champ { border-color: var(--arcane); }
.m-draft-row.theirs .m-champ { border-color: var(--blood); }
.m-draft-vs { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--dim); }
.m-detail-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.m-detail-stats .m-stat { padding: 10px 14px; background: var(--surface); }
.m-detail-stats .m-stat-value { font-size: 22px; }
.m-detail-note { flex-basis: 100%; margin: 0; font-size: 14px; color: var(--dim); }

/* -------------------------------------------------------------- succes */
.m-chips-wrap { margin-top: -6px; }
.m-ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.m-ach { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px; }
.m-ach.is-locked { background: var(--ground-2); }
.m-ach-icon { width: 72px; height: 72px; border-radius: 8px; flex-shrink: 0; }
.m-ach-icon.locked { opacity: .55; }
.m-ach-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.m-ach-name { font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1.25; }
.m-ach.tier-argent .m-ach-name { color: #c4cee0; }
.m-ach.tier-or .m-ach-name { color: #f0c45c; }
.m-ach.tier-legende .m-ach-name, .m-ach.tier-secret .m-ach-name { color: #ce94ff; }
.m-ach.tier-enfer .m-ach-name { color: #e86048; }
.m-ach.tier-bronze .m-ach-name { color: #d68e58; }
.m-ach.is-locked .m-ach-name { color: var(--text); }
.m-ach-desc { font-size: 14px; color: var(--muted); line-height: 1.4; }
.m-ach-foot { font-size: 13px; color: var(--dim); }
.m-stars { display: flex; gap: 4px; margin-top: 2px; }
.m-star { width: 12px; height: 12px; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); background: var(--rule); }
.m-star.on.g0 { background: #f0cf7a; }
.m-star.on.g1 { background: #82e0de; }
.m-star.on.g2 { background: #ce94ff; }
.m-progress { display: flex; align-items: center; gap: 10px; }
.m-progress-bar { flex: 1 1 auto; height: 6px; border-radius: 3px; background: rgba(0,0,0,.45); overflow: hidden; }
.m-progress-bar span { display: block; height: 100%; background: var(--gold); }
.m-progress-text { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------ boutique */
.m-packs { display: flex; flex-direction: column; gap: 20px; }
.m-pack { display: flex; flex-wrap: wrap; background: linear-gradient(110deg, var(--surface-2), var(--surface) 55%); border: 1px solid var(--line-gold); border-radius: var(--r-lg); overflow: hidden; }
.m-pack.owned { border-color: var(--rule); }
.m-pack-art { flex: 1 1 300px; background: var(--ground-2); display: flex; align-items: center; justify-content: center; padding: 20px; }
.m-pack-art img { width: 100%; max-width: 340px; height: auto; }
.m-pack-body { flex: 999 1 380px; min-width: 0; padding: 28px 30px; display: flex; flex-direction: column; gap: 12px; }
.m-pack-banner { font-size: 13px; color: var(--gold-lit); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.m-pack-name { margin: 0; font-size: 30px; }
.m-pack-desc { margin: 0; color: var(--muted); }
.m-pack-contents { margin: 0; padding-left: 20px; color: var(--muted); columns: 2; column-gap: 28px; }
.m-pack-buyrow { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 6px; }
.m-pack-prices { display: flex; align-items: baseline; gap: 10px; }
.m-pack-price { font-family: var(--display); font-weight: 800; font-size: 30px; }
.m-pack-old { color: var(--dim); }
.m-buy { min-height: 52px; }
.m-buy[disabled] { opacity: .5; cursor: default; }
.m-pack-legal { margin: 0; font-size: 13px; color: var(--dim); }
.m-line { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--rule); }
.m-line-side { color: var(--muted); }

/* --------------------------------------------------------------- compte */
.m-narrow { max-width: 860px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.m-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 0; }
.m-dl dt { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.m-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.m-dl dd.m-dim { font-weight: 400; }
.m-danger { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--ground-2); }
.m-danger p { margin: 2px 0 0; }
.m-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.m-btn-danger { border-color: rgba(255, 77, 92, .7) !important; color: #ff9aa3 !important; }
.m-foot { margin-top: 0; }

/* ------------------------------------------------------------- telephone */
@media (max-width: 760px) {
  .m-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-grid3, .m-dl { grid-template-columns: 1fr; }
  .m-banner { padding: 22px; }
  .m-pack-contents { columns: 1; }
  .m-match-detail { padding-left: 20px; }
  .m-ach-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

/* Compte cree mais jamais ouvert dans le jeu (pas de profil) : seul l'encart « Ton compte est pret » reste. */
#view-app.is-noprof .m-tabs-wrap, #view-app.is-noprof .m-banner, #view-app.is-noprof [role=tabpanel], #view-app.is-noprof .m-foot { display: none !important; }
.m-noprof { max-width: 720px; margin: 24px auto; border-color: var(--line-gold); text-align: center; }
.m-noprof h2 { font-size: 30px; }
.m-noprof p { color: var(--muted); font-size: 18px; overflow-wrap: anywhere; }
.m-noprof .m-btns { justify-content: center; }
.m-check a { color: var(--gold-lit); }
#view-app section.m-noprof { padding: 34px 40px; }
