/* ============================================================
   ESPACE MEMBRE — habillage de l'espace privé et sections de #member-space
   ============================================================
   En-tête bleu et conteneur de l'espace privé (.route--member,
   .member-header, .container--member : aussi utilisés par l'administration),
   profil, adhésion en cours, virement en attente, formules, historique,
   « Modifier mes infos » (avatar), mes inscriptions aux événements.
   Sorti de dashboard.css sans réécriture.
   ============================================================ */

/* ============================================================
   ESPACE MEMBRE — historique (.history-list)
   (sorti de styles.css sans réécriture ; en tête de fichier pour garder
   l'ordre de la cascade ; l'ancienne mise en page .member-*, inutilisée,
   a été supprimée)
   ============================================================ */

.history-list { display: flex; flex-direction: column; }
.history-list li {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--c-line);
  align-items: center;
  font-size: 14px;
}
.history-list li:last-child { border-bottom: 1px solid var(--c-line); }
.history-date { color: var(--c-mute); font-size: 13px; }
.history-amount { font-weight: 500; color: var(--c-deep); }

.route--member {
  background: var(--c-cream);
  color: var(--c-ink);
  min-height: calc(100vh - var(--header-h));
}
.route--member h1,
.route--member h2,
.route--member h3,
.route--member h4 {
  color: var(--c-deep);
}
.route--member .member-header h1 { color: white; }

.route--member .current-membership,
.route--member .current-membership h1,
.route--member .current-membership h2,
.route--member .current-membership h3 { color: white; }
.route--member .admin-card-progress,
.route--member .admin-card-progress h1,
.route--member .admin-card-progress h2,
.route--member .admin-card-progress h3 { color: white; }
.route--member .admin-card-progress h2 { color: white; }

.member-header {
  position: relative;
  background: linear-gradient(135deg, #0A1F38 0%, #133A5F 60%, #1B4A75 100%);
  color: white;
  padding: clamp(40px, 5vw, 56px) 0 clamp(40px, 5vw, 56px);
  overflow: hidden;
  isolation: isolate;
}
.member-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--c-gold) 0%, var(--c-cyan) 100%);
}
.member-header::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -200px;
  width: 480px;
  height: 480px;
  margin-top: -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(50, 188, 236, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.member-header > .container {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.member-header h1 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 14px;
  color: white;
}
.member-lede {
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  max-width: 620px;
  margin: 0;
}

.eyebrow--member {
  color: var(--c-cyan);
  margin-bottom: 16px;
}
.eyebrow--member .eyebrow-icon {
  background: rgba(212, 162, 74, 0.18);
  box-shadow: 0 0 0 1px rgba(212, 162, 74, 0.3);
}

.container--member {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.route--member .dash-grid {
  padding: clamp(28px, 4vw, 48px) 0 clamp(40px, 6vw, 80px);
}
.route--member .admin-tabs {
  padding: clamp(20px, 3vw, 32px) 6px 0;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: clamp(40px, 6vw, 80px) 0;
}
@media (min-width: 900px) {
  .dash-grid { grid-template-columns: 320px 1fr; gap: 48px; }
}

.dash-profile-card {
  background: linear-gradient(180deg, var(--c-paper) 0%, var(--c-cream) 100%);
  border: 1px solid var(--c-line);
  border-radius: 0;
  padding: 32px 24px;
  text-align: center;
  position: sticky;
  top: calc(var(--header-h) + 20px);
  overflow: hidden;
}
.dash-profile-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c-blue), var(--c-cyan), var(--c-gold));
}
.dash-profile-card .user-avatar {
  margin: 0 auto 16px;
  box-shadow: 0 8px 20px -8px rgba(35, 111, 168, 0.4);
}
.dash-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-cyan));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 30px;
  margin: 0 auto 16px;
}
.dash-profile-card h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 24px;
  margin-bottom: 8px;
}
.dash-info {
  text-align: left;
  margin: 24px 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 13px;
}
.dash-info dt {
  color: var(--c-mute);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.dash-info dd {
  margin: 0;
  color: var(--c-ink);
  word-break: break-word;
}

.dash-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.dash-section {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: 0;
  padding: 28px 28px 28px;
  position: relative;
  transition: box-shadow 0.3s var(--ease);
}
.dash-section:hover {
  box-shadow: 0 12px 30px -20px rgba(10, 31, 56, 0.15);
}
.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-section-head h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 24px;
  margin: 0;
  color: var(--c-deep);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.dash-section-head h2::before {
  content: '';
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, var(--c-blue), var(--c-cyan));
  border-radius: 0;
  flex-shrink: 0;
}
.dash-section-aside {
  font-size: 13px;
  color: var(--c-mute);
}

.current-membership {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
  padding: 28px 32px;
  background: linear-gradient(135deg, #0A1F38 0%, #133A5F 100%);
  color: white;
  border-radius: 0;
  border-left: 4px solid var(--c-gold);
  position: relative;
  overflow: hidden;
}
.current-membership::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(50, 188, 236, 0.15);
  border-radius: 50%;
  pointer-events: none;
}
.current-membership::after {
  content: '';
  position: absolute;
  top: -30%;
  right: 5%;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(212, 162, 74, 0.25);
  border-radius: 50%;
  pointer-events: none;
}
.current-membership-main { position: relative; z-index: 1; }
/* Adhésion en attente d'un VIREMENT : instructions (pas de paiement carte). */
.transfer-pending {
  position: relative; z-index: 1;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(50, 188, 236, 0.35);
}
.transfer-pending-title {
  margin: 0 0 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--c-cyan);
}
.transfer-pending-bank {
  display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px;
  margin: 0 0 10px; font-size: 14px;
}
.transfer-pending-bank dt { color: rgba(255, 255, 255, 0.6); }
.transfer-pending-bank dd { margin: 0; color: #fff; }
/* Coupure forcée seulement pour l'IBAN/BIC (longues chaînes sans espace utile). */
.transfer-pending-bank dd.mono { font-size: 13px; letter-spacing: 0.02em; word-break: break-all; }
.transfer-pending-note { margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.72); line-height: 1.5; }
@media (min-width: 900px) {
  .current-membership.current-membership--transfer { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
}
.current-membership .pay-pending,
.current-membership .membership-ok { position: relative; z-index: 1; }
.current-membership .pay-pending.btn-primary {
  background: var(--c-gold);
  color: var(--c-deep) !important;
}
.current-membership .pay-pending.btn-primary:hover {
  background: white;
  color: var(--c-deep) !important;
  box-shadow: 0 12px 28px rgba(212, 162, 74, 0.4);
}
@media (min-width: 600px) {
  .current-membership { grid-template-columns: 1fr auto; }
}
.tier-label {
  font-size: 12px;
  color: var(--c-cyan);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tier-price {
  font-family: var(--f-display);
  font-size: 42px;
  font-weight: 500;
  color: white;
  margin: 0 0 8px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.tier-meta { font-size: 13px; color: rgba(255, 255, 255, 0.7); margin: 0; }
.tier-meta .badge { margin-left: 8px; }
.membership-ok {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  gap: 8px;
}
.membership-ok span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1D9E75;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.no-membership-lede {
  font-size: 15px;
  color: var(--c-mute);
  margin-bottom: 24px;
}
.tier-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 700px) { .tier-options { grid-template-columns: repeat(3, 1fr); } }
.tier-option {
  padding: 24px;
  background: var(--c-cream);
  border-radius: 0;
  text-align: center;
  border: 1px solid transparent;
  transition: all 0.3s var(--ease);
}
.tier-option:hover { border-color: var(--c-blue); }
.tier-option h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 20px;
  margin-bottom: 8px;
}
.tier-option-price {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--c-blue);
  line-height: 1;
  margin-bottom: 16px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-list li {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  background: var(--c-cream);
  border-radius: 0;
  font-size: 14px;
}
.hist-season { font-weight: 600; }
.hist-tier { color: var(--c-mute); }

.avatar-edit {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(35, 111, 168, 0.04), rgba(50, 188, 236, 0.03));
  border-radius: 0;
  margin-bottom: 8px;
}
.avatar-edit-preview {
  flex-shrink: 0;
}
.avatar-edit-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.avatar-edit-actions .btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  margin-bottom: 4px;
}
.avatar-edit-actions .btn-link-danger {
  font-size: 12px;
  margin-bottom: 2px;
}
.avatar-edit-hint {
  font-size: 11px;
  color: var(--c-mute);
  margin: 4px 0 0;
}
/* ---------- Espace membre : mes inscriptions aux événements ---------- */
.myreg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.myreg {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-blue);
}
.myreg-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 48px; flex-shrink: 0;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-mute);
}
.myreg-date strong { font-size: 20px; line-height: 1.1; color: var(--c-deep); }
.myreg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.myreg-title { font-weight: 600; color: var(--c-deep); text-decoration: none; }
.myreg-title:hover { color: var(--c-blue); }
.myreg-meta { font-size: 13px; color: var(--c-mute); }
.myreg-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
@media (max-width: 720px) {
  .myreg { flex-wrap: wrap; row-gap: 10px; }
  .myreg-actions { width: 100%; padding-left: 64px; justify-content: space-between; }
}

/* Sécurité du compte (module auth) : carte sous le profil, lien « adresse de connexion ». */
.dash-security { margin-top: 16px; padding: 24px; text-align: left; background: var(--c-paper); border: 1px solid var(--c-line); }
.dash-change-email { display: block; margin: 10px auto 0; font-size: 13px; }
