/* Styles propres aux pages « account » (refonte 2026-09). Tout dans @layer pages ; composants partagés : assets/css/site.css. */
@layer pages {
  /* ---------- Sous-navigation (Mes pools / Rejoindre / Créer) : un peu d'air sous l'en-tête ---------- */
  main#contenu > .container > .subnav-chips { padding-top: 12px; }

  /* ---------- Formulaires d'authentification (login, register, mot de passe, join, create-pool) ---------- */
  .auth-page { padding-top: 24px; }
  @media (min-width: 64rem) { .auth-page { padding-top: 48px; } }
  .auth-head { display: flex; flex-direction: column; gap: 6px; text-align: center; }
  .auth-head .page-title { font-size: 30px; }
  @media (min-width: 64rem) { .auth-head .page-title { font-size: 40px; } }
  .auth-eyebrow {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--red-text);
  }
  .auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .auth-label-row label { font-size: 13px; font-weight: 700; color: var(--muted); }
  .auth-forgot { font-size: 13px; font-weight: 600; }

  .auth-done { display: flex; gap: 12px; align-items: flex-start; }
  .auth-done-icon {
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--up) 16%, transparent); color: var(--up);
  }

  .auth-why { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
  .auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
  .auth-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); line-height: 1.45; }
  .auth-points svg { flex-shrink: 0; color: var(--up); margin-top: 1px; }

  .auth-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
  .auth-steps li { display: flex; gap: 12px; align-items: flex-start; }
  .auth-steps li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .auth-steps strong { font-size: 15px; }
  .auth-steps li div span { font-size: 14px; color: var(--muted); line-height: 1.45; }
  .auth-step-num {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--red); color: var(--on-red);
    font-family: var(--font-cond); font-weight: 800; font-size: 18px; line-height: 1;
  }

  /* Rejoindre : code en majuscules, pool trouvé */
  .field input.join-code { text-transform: uppercase; letter-spacing: .12em; font-family: var(--font-cond); font-weight: 700; font-size: 20px; }
  .join-pool { display: flex; gap: 12px; align-items: center; }
  .join-pool-mark, .pool-card-mark {
    width: 44px; height: 44px; border-radius: 12px; border: 0;
    background: var(--red); color: var(--on-red);
    font-family: var(--font-cond); font-weight: 800; font-size: 22px;
  }

  /* ---------- Mes pools ---------- */
  .pools-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pools-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  @media (min-width: 48rem) { .pools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 64rem) {
    .pools-layout {
      grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
      grid-template-areas: "head main" "aside main";
      grid-template-rows: auto 1fr;
      column-gap: 32px; row-gap: 20px; align-items: start;
    }
    .pools-head { grid-area: head; flex-direction: column; align-items: flex-start; }
    .pools-main { grid-area: main; }
    .pools-aside { grid-area: aside; }
    .pools-grid { gap: 16px; }
  }

  .pools-banner .grow { min-width: 0; }
  .pools-banner > svg { flex-shrink: 0; color: var(--up); margin-top: 1px; }
  .pools-banner-text { font-weight: 500; }
  .pools-empty-actions { justify-content: center; margin-top: 12px; }

  .pool-card { display: flex; flex-direction: column; gap: 12px; }
  .pool-card > * + * { margin-top: 0; }
  .pool-card-top { display: flex; align-items: center; gap: 12px; }
  .pool-card-name {
    font-family: var(--font-cond); font-weight: 800; font-size: 22px; line-height: 1.1;
    text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere;
  }
  .pool-card-rank b { font-size: 28px; }
  .pool-card-rank b.gold { color: var(--gold); }
  .pool-card .pills { gap: 6px; }
  .pool-pill-admin { background: color-mix(in srgb, var(--blue) 16%, transparent); color: var(--blue); font-weight: 700; }
  .pool-card .pill svg { flex-shrink: 0; }
  .pool-card-invite { padding-top: 12px; border-top: 1px solid var(--border); }
  .pool-card-pending .list { background: var(--surface-2); }
  .pool-card-pending .list-row { padding: 10px 12px; flex-wrap: wrap; }
  .pool-card-pending form { margin: 0; }
  /* les boutons d'action descendent au bas de la carte (cartes voisines alignées sur bureau) */
  .pool-card-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

  .pools-aside { display: flex; flex-direction: column; gap: 12px; }
  .pools-aside > * + * { margin-top: 0; }

  /* ---------- Profil ---------- */
  .profile-head { display: flex; align-items: center; gap: 16px; }
  .profile-id { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .profile-id .page-title { font-size: 32px; overflow-wrap: anywhere; }
  .profile-id .list-sub { font-size: 14px; overflow-wrap: anywhere; }
  @media (min-width: 64rem) { .profile-id .page-title { font-size: 44px; } }
  .field input.profile-file {
    padding: 6px; border-style: dashed; color: var(--muted); font-size: 16px;
  }
  .profile-file::file-selector-button {
    min-height: 36px; margin-right: 12px; padding: 0 14px;
    border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text);
    font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  }
  .profile-email { color: var(--text); overflow-wrap: anywhere; }
  .profile-delete { padding-top: 12px; border-top: 1px solid var(--border); }
}
