/* ============================================================
   MYTHÉO — Portail
   ============================================================ */

body.portal {
  min-height: 100%;
  padding: calc(28px + var(--safe-t)) calc(20px + var(--safe-r)) calc(28px + var(--safe-b)) calc(20px + var(--safe-l));
  background:
    radial-gradient(circle at 20% -10%, rgba(143, 164, 255, .16), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(226, 143, 63, .10), transparent 45%),
    var(--bg);
}

.portal-wrap {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* --- en-tête --- */
.portal-head { text-align: center; }
.portal-head .mark {
  font-size: 22px;
  color: var(--accent-strong);
  margin-bottom: 4px;
}
.portal-head h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.portal-head h1 em {
  font-style: normal;
  color: var(--accent-strong);
}
.portal-head p {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 16px;
  max-width: 42ch;
  margin-inline: auto;
}

/* --- progression globale --- */
.global-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}
.global-progress .ring circle.val { stroke: var(--accent-strong); }
.global-progress .txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.global-progress strong { font-size: 16px; }
.global-progress small { color: var(--text-dim); font-size: 14px; }

/* --- grille des mondes --- */
.myth-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 480px) {
  .myth-grid { grid-template-columns: 1fr 1fr; }
}

.myth-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  min-height: 160px;
  background: linear-gradient(155deg, var(--bg-raised-2), var(--bg-raised));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s ease, transform .1s ease;
}
.myth-card:hover { border-color: var(--accent); }
.myth-card:active { transform: scale(.98); }
.myth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
  pointer-events: none;
}

.mc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mc-emoji { font-size: 30px; }
.mc-glyph { font-size: 20px; color: var(--accent-strong); opacity: .8; }
.mc-name { font-size: 19px; font-weight: 700; }
.mc-tag { color: var(--text-dim); font-size: 14px; flex: 1; }

.mc-bottom { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.mc-count { font-size: 13px; color: var(--text-faint); }
.mc-bar {
  display: block;
  height: 6px;
  border-radius: var(--radius-round);
  background: var(--line);
  overflow: hidden;
}
.mc-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

/* --- pied de page --- */
.portal-foot details {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 4px 18px;
}
.portal-foot summary {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dim);
}
.portal-foot .inner {
  padding: 4px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: var(--text-dim);
}
.portal-foot h3 {
  font-size: 15px;
  color: var(--text);
  margin-top: 6px;
}
.portal-foot ol { padding-left: 20px; list-style: decimal; }
.portal-foot .danger-btn { margin-top: 8px; align-self: flex-start; }
