/*
 * Page « Mon compte » : les fenêtres laquées de l'accueil autour des
 * formulaires et du vote. Mêmes jetons que styles.css.
 */

.page-compte {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.compte {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 104px var(--gutter) 64px;
  isolation: isolate;
}

/* Une vue du monde, floue et voilée, derrière tout. */
.compte-fond {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.compte-fond img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) saturate(0.9);
  transform: scale(1.06);
}

.compte-fond .veil {
  background:
    radial-gradient(70% 60% at 50% 40%, rgb(20 11 5 / 0.4), rgb(20 11 5 / 0.74) 70%, var(--ink)),
    linear-gradient(180deg, rgb(20 11 5 / 0.4), transparent 30%, rgb(20 11 5 / 0.9));
}

.attente {
  margin: 20vh 0 0;
  color: var(--cream-dim);
}

/* ----- Fenêtre : le cadre laqué des cartes de l'accueil ----- */
.fenetre {
  position: relative;
  width: 100%;
  border: 1px solid var(--edge);
  border-radius: 18px;
  background:
    radial-gradient(90% 50% at 50% 0%, rgb(255 190 110 / 0.1), transparent 70%), var(--noise),
    linear-gradient(180deg, #3d3530, #2a2420);
  background-blend-mode: normal, soft-light, normal;
  box-shadow:
    0 0 0 4px var(--lacquer-2),
    0 0 0 5px var(--edge),
    inset 0 1px 0 rgb(255 236 200 / 0.12),
    0 24px 48px rgb(0 0 0 / 0.5);
  animation: rise 700ms var(--ease) both;
}

.fenetre::before,
.fenetre::after {
  content: '';
  position: absolute;
  top: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    var(--gold-light),
    var(--gold) 42%,
    var(--gold-deep) 78%,
    #4a300e
  );
  box-shadow: 0 0 0 1px var(--edge);
}

.fenetre::before {
  left: -1px;
}

.fenetre::after {
  right: -1px;
}

.fenetre h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.15;
  background: linear-gradient(180deg, #fff8e2, var(--gold) 60%, #c88a32);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fenetre h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-weight: 750;
  font-size: 14px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.fenetre h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgb(231 194 122 / 0.55), transparent);
}

.fenetre-dofus {
  margin: -62px auto 6px;
  filter: drop-shadow(0 0 16px rgb(255 190 90 / 0.45)) drop-shadow(0 10px 18px rgb(0 0 0 / 0.5));
  animation: float 6s ease-in-out infinite;
}

/* ----- Connexion, inscription, comptes pas encore ouverts ----- */
.entree,
.hors-ligne {
  max-width: 460px;
  margin-top: 40px;
  padding: 0 clamp(20px, 4vw, 36px) 30px;
  text-align: center;
}

.hors-ligne p {
  margin: 12px 0 26px;
  color: var(--cream-dim);
}

.sous-titre {
  margin: 10px auto 22px;
  max-width: 36ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--cream-dim);
}

.onglets {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-bottom: 22px;
  border-radius: 999px;
  background: rgb(14 8 4 / 0.55);
  box-shadow:
    inset 0 1px 3px rgb(0 0 0 / 0.6),
    0 0 0 1px rgb(231 194 122 / 0.22);
}

.onglets button {
  position: relative;
  z-index: 1;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: none;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  color: var(--cream-dim);
  cursor: pointer;
  transition: color 200ms ease;
}

.onglets button[aria-selected='true'] {
  color: var(--on-orange);
}

.onglet-marque {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background:
    linear-gradient(180deg, var(--gloss-strong), transparent 55%),
    linear-gradient(180deg, var(--orange-light), var(--orange) 55%, var(--orange-deep));
  box-shadow: 0 2px 10px rgb(240 138 36 / 0.35);
  transition: transform 320ms var(--spring);
}

.onglets[data-actif='inscription'] .onglet-marque {
  transform: translateX(100%);
}

.formulaire {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.formulaire[hidden] {
  display: none;
}

.champ {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.champ > span:first-child {
  font-weight: 650;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--title);
}

.champ small {
  font-size: 13px;
  line-height: 1.4;
  color: rgb(205 184 148 / 0.8);
}

.champ input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgb(231 194 122 / 0.28);
  border-radius: 12px;
  background: rgb(14 8 4 / 0.6);
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 0.5);
  font: inherit;
  font-size: 16px;
  color: var(--cream);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.champ input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow:
    inset 0 2px 4px rgb(0 0 0 / 0.5),
    0 0 0 3px rgb(231 194 122 / 0.22);
}

.champ input[aria-invalid='true'] {
  border-color: #e0634a;
}

.champ-mdp {
  position: relative;
  display: block;
}

.champ-mdp input {
  padding-right: 52px;
}

.voir-mdp {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--cream-dim);
  cursor: pointer;
}

.voir-mdp::before {
  content: '';
  position: absolute;
  inset: 9px;
  background: currentColor;
  -webkit-mask: var(--oeil) center / contain no-repeat;
  mask: var(--oeil) center / contain no-repeat;
  --oeil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.voir-mdp[aria-pressed='true'] {
  color: var(--gold);
}

.voir-mdp:focus-visible,
.onglets button:focus-visible,
.lien:focus-visible,
.btn-form:focus-visible,
.btn-voter:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.erreur {
  margin: 2px 0 0;
  padding: 10px 14px;
  border: 1px solid rgb(224 99 74 / 0.55);
  border-radius: 10px;
  background: rgb(120 30 15 / 0.35);
  font-size: 14px;
  line-height: 1.45;
  color: #ffd5c8;
}

.btn-form {
  width: 100%;
  height: 56px;
  margin-top: 6px;
  font: inherit;
  font-weight: 750;
  font-size: 18px;
  cursor: pointer;
}

.btn-form:disabled,
.btn-voter[aria-disabled='true'] {
  cursor: default;
  filter: saturate(0.35) brightness(0.8);
  transform: none;
}

.btn-form:disabled::before,
.btn-voter[aria-disabled='true']::before {
  animation: none;
}

.aide {
  margin: 4px 0 0;
  font-size: 13px;
  text-align: center;
  color: var(--cream-dim);
}

.aide a,
.lien {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgb(231 194 122 / 0.4);
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ----- Tableau du compte ----- */
.tableau {
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: 100%;
  max-width: 980px;
}

.tableau[hidden] {
  display: none;
}

.tete {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px clamp(18px, 3vw, 30px);
}

.tete-dofus {
  flex: none;
  width: 62px;
  filter: drop-shadow(0 0 14px rgb(255 190 90 / 0.45));
  animation: float 6s ease-in-out infinite;
}

.tete-texte {
  flex: 1;
  min-width: 0;
}

.tete-sur {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.tete h1 {
  overflow-wrap: anywhere;
}

.tete-email {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--cream-dim);
  overflow-wrap: anywhere;
}

/* Solde : un éclat doré et son nombre, toujours au complet. */
.solde {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  border: 1px solid rgb(231 194 122 / 0.4);
  border-radius: 999px;
  background: rgb(14 8 4 / 0.5);
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.5);
}

.solde span {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.solde b {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold-light);
}

.solde small {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.eclat {
  width: 34px;
  height: 34px;
  fill: #f0c46a;
  stroke: #6b3f0c;
  stroke-width: 1.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgb(255 200 100 / 0.6));
}

.eclat path + path {
  fill: none;
  stroke: rgb(255 248 220 / 0.75);
  stroke-width: 1;
}

.solde.monte b {
  animation: monte 900ms var(--spring);
}

/* Vote : l'action principale de la page. */
.vote-compte {
  padding: 24px clamp(18px, 3vw, 30px) 22px;
  background:
    radial-gradient(60% 90% at 0% 40%, rgb(240 138 36 / 0.16), transparent 70%), var(--noise),
    linear-gradient(180deg, #3d3530, #2a2420);
  background-blend-mode: normal, soft-light, normal;
}

.vote-corps {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 22px 30px;
  align-items: center;
}

.vote-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.vote-etat {
  margin: 0;
  font-size: clamp(18px, 1.9vw, 22px);
  font-weight: 650;
  line-height: 1.35;
  color: var(--title);
}

.vote-etat .compte-a-rebours {
  font-variant-numeric: tabular-nums;
  color: var(--gold-light);
}

.btn-voter {
  font: inherit;
  font-weight: 750;
  font-size: 19px;
  cursor: pointer;
}

.btn-voter.verifie::before {
  animation-duration: 1.4s;
  animation-delay: 0s;
}

.vote-lien {
  margin: 0;
  font-size: 14px;
  color: var(--cream-dim);
}

.vote-lien a {
  color: var(--gold);
  text-decoration: underline;
}

.vote-infos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.vote-infos div {
  padding: 12px 14px;
  border: 1px solid rgb(231 194 122 / 0.18);
  border-radius: 12px;
  background: rgb(14 8 4 / 0.38);
}

.vote-infos dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(205 184 148 / 0.85);
}

.vote-infos dd {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}

.vote-infos dd small {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--cream-dim);
}

.vote-regles {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgb(205 184 148 / 0.8);
}

/* Résultat d'un vote : la sorte, le gain qui jaillit, un éclat doré. */
.resultat {
  position: relative;
  display: grid;
  justify-items: center;
  margin-top: 20px;
  padding: 22px 16px 20px;
  overflow: hidden;
  border: 1px solid rgb(231 194 122 / 0.5);
  border-radius: 14px;
  background: radial-gradient(70% 120% at 50% 0%, rgb(255 200 110 / 0.22), rgb(14 8 4 / 0.5) 70%);
  text-align: center;
  animation: rise 600ms var(--ease) both;
}

.resultat[hidden] {
  display: none;
}

.resultat-eclat {
  position: absolute;
  top: -40%;
  left: 50%;
  width: 160%;
  aspect-ratio: 1;
  background: conic-gradient(
    from 0deg,
    transparent 0 8deg,
    rgb(255 220 140 / 0.2) 8deg 14deg,
    transparent 14deg 30deg
  );
  -webkit-mask: radial-gradient(closest-side, black, transparent);
  mask: radial-gradient(closest-side, black, transparent);
  transform: translateX(-50%);
  animation: rayons 18s linear infinite;
  pointer-events: none;
}

.resultat p {
  position: relative;
  margin: 0;
}

.resultat-sorte {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.resultat-gain {
  margin-top: 4px !important;
  font-weight: 850;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  background: linear-gradient(180deg, #fff8e2 10%, var(--gold) 55%, #c88a32);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgb(42 26 14 / 0.9));
  animation: jaillit 800ms var(--spring) both;
}

.resultat-plus {
  margin-top: 6px !important;
  font-size: 15px;
  color: var(--cream-dim);
}

.resultat.double {
  border-color: rgb(110 220 210 / 0.6);
  background: radial-gradient(70% 120% at 50% 0%, rgb(90 210 200 / 0.22), rgb(14 8 4 / 0.5) 70%);
}

.resultat.double .resultat-sorte {
  color: #8fe8dc;
}

.resultat.incroyable {
  border-color: var(--gold-light);
  box-shadow: 0 0 40px rgb(255 200 100 / 0.45);
}

.resultat.incroyable .resultat-eclat {
  background: conic-gradient(
    from 0deg,
    transparent 0 6deg,
    rgb(255 230 160 / 0.45) 6deg 14deg,
    transparent 14deg 24deg
  );
  animation-duration: 7s;
}

/* Listes : derniers votes, personnages. */
.colonnes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 26px;
}

.liste {
  padding: 22px clamp(18px, 3vw, 26px);
}

.historique,
.persos {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.historique li,
.persos li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgb(14 8 4 / 0.35);
}

.historique time {
  flex: none;
  min-width: 7.5em;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--cream-dim);
}

.historique .sorte {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
}

.historique .sorte.double {
  color: #8fe8dc;
}

.historique .sorte.incroyable {
  color: var(--gold-light);
}

.historique .gain,
.persos .niveau {
  flex: none;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}

.persos .nom {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.persos .classe {
  font-size: 14px;
  color: var(--cream-dim);
}

.vide {
  margin: 0;
  font-size: 15px;
  color: var(--cream-dim);
}

.sortie {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--cream-dim);
}

@keyframes monte {
  0% {
    transform: none;
  }
  35% {
    transform: translateY(-4px) scale(1.18);
    color: #fff;
  }
  100% {
    transform: none;
  }
}

@keyframes jaillit {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rayons {
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

@media (max-width: 760px) {
  .compte {
    padding-top: 88px;
  }

  .vote-corps {
    grid-template-columns: 1fr;
  }

  .vote-action {
    align-items: stretch;
    text-align: center;
  }

  .btn-voter {
    width: 100%;
  }

  .tete {
    flex-wrap: wrap;
  }

  .solde {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .vote-infos {
    grid-template-columns: 1fr;
  }

  .historique time {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fenetre,
  .fenetre-dofus,
  .tete-dofus,
  .resultat,
  .resultat-gain,
  .resultat-eclat,
  .solde.monte b {
    animation: none;
  }

  .onglet-marque {
    transition: none;
  }
}

/* Avertissement de la bêta, au-dessus des formulaires. */
.alerte-beta {
  margin: 0 0 18px;
  padding: 11px 14px;
  border: 1px solid rgb(240 138 36 / 0.7);
  border-radius: 10px;
  background: rgb(240 138 36 / 0.1);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.alerte-beta b {
  color: var(--orange-light);
}
