/* ==========================================================================
   Profil v2 — espace membre (profile.html + js/profile.js)
   Noir profond, blanc chaud, champagne, Montserrat.
   ========================================================================== */

.pf {
  --pf-bg: #050505;
  --pf-surface: #0e0e0d;
  --pf-surface-2: #151513;
  --pf-line: rgba(245, 244, 241, 0.08);
  --pf-line-2: rgba(245, 244, 241, 0.14);
  --pf-text: #f5f4f1;
  --pf-muted: rgba(245, 244, 241, 0.62);
  --pf-faint: rgba(245, 244, 241, 0.42);
  --pf-gold: #c6a66a;
  --pf-gold-hover: #d4b984;
  position: relative;
  background: var(--pf-bg) !important;
  color: var(--pf-text);
  overflow: hidden;
}
.pf, .pf * { font-family: 'Montserrat', system-ui, -apple-system, sans-serif; box-sizing: border-box; }
.pf::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -220px;
  width: 1100px;
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(198, 166, 106, 0.14), transparent);
  pointer-events: none;
}
.pf a { color: inherit; text-decoration: none; }

.pf-wrap {
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 24px 4rem;
}

.pf-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1.5rem;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pf-muted) !important;
  transition: color 0.2s;
}
.pf-back:hover { color: var(--pf-text) !important; }

/* ——— Identité ——— */
.pf-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 2.5rem;
}
.pf-avatar-ring {
  flex: 0 0 auto;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #8a6f3e, #e6cf9c, #c6a66a, #8a6f3e);
  box-shadow: 0 20px 50px -20px rgba(198, 166, 106, 0.55);
}
.pf-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 25%, #2a2620, #0e0e0d 70%);
  border: 3px solid var(--pf-bg);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--pf-gold);
  letter-spacing: -0.02em;
}
.pf-identity { flex: 1 1 auto; min-width: 0; }
.pf-greeting {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--pf-gold);
}
.pf-name {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.8rem) !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.03em !important;
  color: var(--pf-text) !important;
  overflow-wrap: anywhere;
}
.pf-email {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--pf-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Boutons */
.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.pf-btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.pf-btn--ghost { border: 1px solid var(--pf-line-2); background: rgba(255, 255, 255, 0.03); color: var(--pf-text) !important; }
.pf-btn--ghost:hover { border-color: rgba(245, 244, 241, 0.32); background: rgba(255, 255, 255, 0.07); }
.pf-btn--gold { background: var(--pf-gold); color: #0b0a08 !important; box-shadow: 0 14px 30px -14px rgba(198, 166, 106, 0.7); }
.pf-btn--gold:hover { background: var(--pf-gold-hover); transform: translateY(-1px); }

/* ——— Grille ——— */
.pf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 2rem;
  align-items: start;
}
.pf-main-col { display: grid; gap: 1.5rem; min-width: 0; }
.pf-side-col { display: grid; gap: 1rem; position: sticky; top: 96px; }

.pf-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.pf-h2 { margin: 0; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.015em; color: var(--pf-text); }
.pf-link { font-size: 13.5px; font-weight: 600; color: var(--pf-gold) !important; }
.pf-link:hover { color: var(--pf-gold-hover) !important; }

/* Prochaine soirée */
.pf-next { min-height: 180px; }
.pf-next-skeleton {
  height: 220px;
  border-radius: 24px;
  border: 1px solid var(--pf-line);
  background: linear-gradient(100deg, var(--pf-surface) 30%, #181816 50%, var(--pf-surface) 70%);
  background-size: 300% 100%;
  animation: pf-shimmer 1.4s linear infinite;
}
.pf-next-skeleton span { display: none; }
@keyframes pf-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.pf-ticket {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--pf-line-2);
  background: var(--pf-surface);
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.9);
  transition: border-color 0.2s, transform 0.25s;
}
.pf-ticket:hover { border-color: rgba(198, 166, 106, 0.5); transform: translateY(-2px); }
.pf-ticket-media { position: relative; display: block; min-height: 220px; background: var(--pf-surface-2); }
.pf-ticket-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-ticket-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; font-weight: 800; color: var(--pf-gold); }
.pf-ticket-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px;
}
.pf-ticket-body::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  border-left: 2px dashed rgba(245, 244, 241, 0.12);
}
.pf-ticket-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.pf-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}
.pf-tag--gold { background: var(--pf-gold); color: #0b0a08; }
.pf-tag--ok { background: rgba(127, 207, 154, 0.12); color: #9fdcb3; }
.pf-tag--wait { background: rgba(240, 179, 91, 0.12); color: #f0b35b; }
.pf-tag--bad { background: rgba(240, 110, 110, 0.12); color: #f08c8c; }
.pf-ticket-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--pf-text); }
.pf-ticket-meta { font-size: 13.5px; color: var(--pf-muted); }
.pf-ticket-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pf-gold);
}
.pf-ticket-cta svg { width: 16px; height: 16px; transition: transform 0.2s; }
.pf-ticket:hover .pf-ticket-cta svg { transform: translateX(3px); }
.pf-ticket-cta.is-pay {
  align-self: flex-start;
  height: 42px;
  padding: 0 18px;
  margin-top: auto;
  border-radius: 999px;
  background: var(--pf-gold);
  color: #0b0a08;
}

.pf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 24px;
  border-radius: 24px;
  border: 1px dashed var(--pf-line-2);
  background: linear-gradient(180deg, rgba(198, 166, 106, 0.05), transparent 60%), var(--pf-surface);
}
.pf-empty-ico {
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--pf-gold);
  background: rgba(198, 166, 106, 0.1);
}
.pf-empty-ico svg { width: 24px; height: 24px; }
.pf-empty-title { margin: 0 0 6px; font-size: 1.1rem; font-weight: 700; color: var(--pf-text); }
.pf-empty-text { margin: 0 0 20px; max-width: 36ch; font-size: 14px; line-height: 1.6; color: var(--pf-muted); }
.pf-error { margin: 0; padding: 20px; border-radius: 18px; border: 1px solid var(--pf-line-2); font-size: 14px; color: var(--pf-muted); }

/* Compteurs */
.pf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pf-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid var(--pf-line-2);
  background: var(--pf-surface);
  transition: border-color 0.2s;
}
.pf-stat:hover { border-color: rgba(245, 244, 241, 0.3); }
.pf-stat strong { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--pf-text); font-variant-numeric: tabular-nums; }
.pf-stat span { font-size: 13px; font-weight: 500; color: var(--pf-muted); }

/* ——— Menu ——— */
.pf-menu {
  padding: 8px;
  border-radius: 22px;
  border: 1px solid var(--pf-line-2);
  background: var(--pf-surface);
}
.pf-menu-title {
  margin: 10px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pf-faint);
}
.pf-menu ul { list-style: none; margin: 0; padding: 0; }
.pf-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--pf-text) !important;
  transition: background 0.15s;
}
a.pf-item:hover { background: rgba(255, 255, 255, 0.05); }
.pf-item-ico {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 244, 241, 0.85);
}
.pf-item-ico svg { width: 18px; height: 18px; }
.pf-item-ico--wa { background: rgba(37, 211, 102, 0.12); color: #3ddc84; }
.pf-item-label { flex: 1 1 auto; min-width: 0; }
.pf-item-chev { width: 16px; height: 16px; flex: 0 0 auto; color: var(--pf-faint); transition: transform 0.2s; }
a.pf-item:hover .pf-item-chev { transform: translateX(2px); color: var(--pf-muted); }
.pf-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--pf-gold);
  color: #0b0a08;
  font-size: 11.5px;
  font-weight: 800;
}
.pf-badge[hidden] { display: none; }
.pf-item--disabled { color: var(--pf-faint) !important; cursor: default; }
.pf-item--disabled .pf-item-ico { opacity: 0.55; }
.pf-soon {
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--pf-line-2);
  font-size: 11px;
  font-weight: 700;
  color: var(--pf-muted);
}

.pf-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(240, 110, 110, 0.25);
  background: transparent;
  color: #f08c8c;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.pf-logout svg { width: 18px; height: 18px; }
.pf-logout:hover { background: rgba(240, 110, 110, 0.08); border-color: rgba(240, 110, 110, 0.45); }

/* ——— Responsive ——— */
@media (max-width: 959px) {
  .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .pf-side-col { position: static; }
}
@media (max-width: 640px) {
  .pf-wrap { padding: 1rem 16px 3rem; }
  .pf-back { margin-bottom: 1.25rem; }
  .pf-hero { flex-wrap: wrap; gap: 16px; margin-bottom: 2rem; }
  .pf-avatar { width: 72px; height: 72px; font-size: 1.75rem; }
  .pf-identity { flex: 1 1 calc(100% - 100px); }
  .pf-name { font-size: 1.75rem !important; }
  .pf-hero-edit { width: 100%; }
  .pf-ticket { grid-template-columns: minmax(0, 1fr); }
  .pf-ticket-media { min-height: 0; aspect-ratio: 16 / 9; }
  .pf-ticket-body::before { left: 18px; right: 18px; top: 0; bottom: auto; border-left: 0; border-top: 2px dashed rgba(245, 244, 241, 0.12); }
  .pf-ticket-body { padding: 20px; }
  .pf-stats { gap: 8px; }
  .pf-stat { padding: 14px; border-radius: 16px; }
  .pf-stat strong { font-size: 1.6rem; }
  .pf-stat span { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-next-skeleton { animation: none; }
  .pf-ticket, .pf-btn { transition: none; }
}

/* Neutralise les styles globaux section / nav / reveal */
.pf section.pf-hero,
.pf section.pf-section,
.pf section.pf-stats {
  padding: 0 !important;
  min-height: 0 !important;
  margin-top: 0 !important;
  opacity: 1 !important;
  transform: none !important;
  background: none !important;
  border: 0 !important;
}
.pf section.pf-hero { margin-bottom: 2.5rem !important; display: flex !important; }
.pf section.pf-stats { display: grid !important; }
.pf nav.pf-menu {
  display: block !important;
  position: static !important;
  height: auto !important;
  width: auto !important;
  padding: 8px !important;
  border: 1px solid var(--pf-line-2) !important;
  background: var(--pf-surface) !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
@media (max-width: 640px) {
  .pf section.pf-hero { margin-bottom: 2rem !important; flex-wrap: wrap; }
}
.pf nav.pf-menu { width: 100% !important; max-width: none !important; margin: 0 !important; left: auto !important; transform: none !important; border-radius: 22px !important; }
.pf .pf-side-col > * { width: 100%; }
