/* ================================================
   FABRICE'S PIES — Account / Login / Register
   ================================================ */

/* ── Layout général ────────────────────────────── */
.acc-main {
  min-height: 100vh;
  background: var(--dark);
  padding: var(--nav-h) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.acc-section {
  width: 100%;
  padding: 48px 16px 64px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Garantit que les sections masquées restent invisibles même sous flexbox */
.acc-section[hidden] {
  display: none !important;
}

/* ── Nav override ──────────────────────────────── */
.acc-nav-back {
  font-size: .82rem;
  color: rgba(255,255,255,.38);
  letter-spacing: .06em;
  transition: color .2s;
}
.acc-nav-back:hover { color: var(--gold); }

/* ── Card ──────────────────────────────────────── */
.acc-card {
  background: #0e0804;
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,.7);
}
.acc-card--center { text-align: center; }

/* ── Hero logo ─────────────────────────────────── */
.acc-hero {
  padding: 40px 44px 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(201,168,76,.07) 0%, transparent 100%);
  border-bottom: 1px solid rgba(201,168,76,.1);
}
.acc-logo {
  height: 120px;
  width: auto;
  display: block;
  margin: 0 auto 14px;
  object-fit: contain;
}
.acc-tagline {
  font-size: .72rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}

/* ── Onglets ───────────────────────────────────── */
.acc-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(201,168,76,.1);
}
.acc-tab {
  padding: 16px;
  font-family: var(--font-h);
  font-size: .9rem;
  font-weight: 700;
  color: rgba(255,255,255,.32);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  letter-spacing: .04em;
}
.acc-tab:hover { color: rgba(255,255,255,.6); }
.acc-tab--on {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── Panel ─────────────────────────────────────── */
.acc-panel { padding: 28px 44px 40px; }

/* ── Formulaire ────────────────────────────────── */
.acc-form { display: flex; flex-direction: column; gap: 0; }
.acc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.acc-field { margin-bottom: 18px; }
.acc-field label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
  margin-bottom: 7px;
}
.acc-hint {
  font-size: .65rem;
  letter-spacing: .03em;
  color: rgba(255,255,255,.22);
  font-weight: 400;
  display: block;
  margin-top: 2px;
  text-transform: none;
}
.acc-field input:not([type="checkbox"]),
.acc-field select {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  font-size: .9rem;
  color: #fff;
  outline: none;
  transition: border-color .2s, background .2s;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.acc-field input:not([type="checkbox"])::placeholder { color: rgba(255,255,255,.15); }
.acc-field input:not([type="checkbox"]):focus { border-color: var(--gold); background: rgba(255,255,255,.07); }
.acc-field input:not([type="checkbox"]).acc-err   { border-color: #e04; box-shadow: 0 0 0 2px rgba(238,0,68,.15); }
.acc-field input:not([type="checkbox"]).acc-ok    { border-color: #3b9; box-shadow: 0 0 0 2px rgba(51,187,153,.12); }

/* Indicateur force mot de passe */
.acc-strength { display: flex; gap: 4px; margin-top: 6px; height: 3px; }
.acc-strength span { flex: 1; border-radius: 2px; background: rgba(255,255,255,.1); transition: background .25s; }
.acc-strength.s1 span:nth-child(1)                    { background: #e04; }
.acc-strength.s2 span:nth-child(-n+2)                 { background: #e80; }
.acc-strength.s3 span:nth-child(-n+3)                 { background: #fb0; }
.acc-strength.s4 span:nth-child(-n+4)                 { background: #3b9; }
.acc-strength-label { font-size:.62rem; color:rgba(255,255,255,.3); margin-top:4px; letter-spacing:.05em; }

/* Password wrap */
.acc-pass-wrap { position: relative; }
.acc-pass-wrap input { padding-right: 44px; }
.acc-eye {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  font-size: 1.1rem; cursor: pointer; opacity: .4;
  transition: opacity .2s; line-height: 1;
}
.acc-eye:hover { opacity: .9; }

/* OTP input */
.acc-otp-input {
  width: 230px !important;
  text-align: center;
  font-size: 2rem !important;
  font-family: var(--font-h) !important;
  font-weight: 700;
  letter-spacing: .3em;
  padding-left: calc(15px + .3em) !important;
  color: var(--gold) !important;
  margin: 0 auto;
  display: block !important;
  border-color: rgba(201,168,76,.4) !important;
}
.acc-field--center { display: flex; flex-direction: column; align-items: center; }

/* Checkbox */
.acc-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .8rem;
  color: rgba(255,255,255,.38);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  line-height: 1.5;
}
.acc-checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px;
  min-width: 16px;
  margin-top: 2px;
  accent-color: var(--gold);
}
.acc-checkbox-label a { color: var(--gold); text-decoration: underline; }

/* ── Bouton principal ──────────────────────────── */
.acc-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #c9a84c 0%, #e8c86a 50%, #c9a84c 100%);
  border: none;
  border-radius: 10px;
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: #1a0f07;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  margin-top: 6px;
}
.acc-btn:hover { opacity: .88; }
.acc-btn:active { transform: scale(.98); }
.acc-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Liens secondaires ─────────────────────────── */
.acc-forgot {
  background: none; border: none;
  color: rgba(255,255,255,.28);
  font-size: .78rem;
  cursor: pointer;
  text-align: center;
  padding: 10px;
  width: 100%;
  transition: color .2s;
}
.acc-forgot:hover { color: var(--gold); }
.acc-free-note {
  text-align: center;
  font-size: .74rem;
  color: rgba(255,255,255,.2);
  margin: 10px 0 0;
}

/* ── Messages ──────────────────────────────────── */
.acc-error {
  background: rgba(220,50,50,.12);
  border: 1px solid rgba(220,50,50,.3);
  border-radius: 8px;
  padding: 11px 15px;
  font-size: .83rem;
  color: #f87;
  margin-bottom: 14px;
  line-height: 1.5;
}
.acc-success-msg {
  background: rgba(50,180,100,.1);
  border: 1px solid rgba(50,180,100,.3);
  border-radius: 8px;
  padding: 11px 15px;
  font-size: .83rem;
  color: #7dc;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── OTP view ──────────────────────────────────── */
.acc-otp-icon { font-size: 3rem; margin: 0 0 16px; }
.acc-otp-title {
  font-family: var(--font-h);
  font-size: 1.5rem;
  color: #fff;
  margin: 0 0 10px;
}
.acc-otp-sub {
  font-size: .87rem;
  color: rgba(255,255,255,.4);
  margin: 0 0 28px;
  line-height: 1.6;
}
.acc-otp-sub strong { color: var(--gold); }

/* ── Back btn ──────────────────────────────────── */
.acc-back-btn {
  background: none; border: none;
  color: rgba(255,255,255,.3);
  font-size: .8rem;
  cursor: pointer;
  padding: 0 0 20px;
  display: block;
  transition: color .2s;
}
.acc-back-btn:hover { color: var(--gold); }
.acc-section-title {
  font-family: var(--font-h);
  font-size: 1.4rem;
  color: #fff;
  margin: 0 0 8px;
}
.acc-section-sub {
  font-size: .85rem;
  color: rgba(255,255,255,.38);
  margin: 0 0 24px;
  line-height: 1.6;
}

/* ── Dashboard ─────────────────────────────────── */
.acc-dashboard {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Profile header */
.acc-profile-header {
  background: #0e0804;
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Avatar avec photo upload */
.acc-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.acc-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a0f07;
  font-family: var(--font-h);
  font-size: 1.9rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid rgba(201,168,76,.4);
}
.acc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acc-avatar-edit {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #1a1000;
  border: 2px solid var(--gold);
  font-size: .75rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  line-height: 1;
}
.acc-avatar-edit:hover { background: rgba(201,168,76,.2); }

/* Infos profil */
.acc-profile-info { flex: 1; min-width: 0; }
.acc-profile-name {
  font-family: var(--font-h);
  font-size: 1.3rem;
  color: #fff;
  margin: 0 0 4px;
}
.acc-profile-email {
  font-size: .82rem;
  color: rgba(255,255,255,.38);
  margin: 0 0 6px;
}
.acc-badge-verified {
  font-size: .7rem;
  letter-spacing: .08em;
  color: #7dc;
  background: rgba(50,180,100,.1);
  border: 1px solid rgba(50,180,100,.25);
  border-radius: 4px;
  padding: 3px 8px;
}
.acc-logout-btn {
  margin-left: auto;
  background: none;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: rgba(255,255,255,.3);
  font-size: .78rem;
  padding: 8px 16px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.acc-logout-btn:hover { color: #f87; border-color: rgba(220,50,50,.4); }

/* Points card */
.acc-points-card {
  background: linear-gradient(135deg, #1a1000 0%, #0e0804 100%);
  border: 1px solid rgba(201,168,76,.3);
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.acc-points-label {
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
  margin: 0 0 6px;
}
.acc-points-value {
  font-family: var(--font-h);
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--gold);
  margin: 0 0 4px;
  line-height: 1;
}
.acc-points-sub {
  font-size: .78rem;
  color: rgba(255,255,255,.3);
  margin: 0;
}

/* Ring SVG */
.acc-points-right { text-align: center; }
.acc-points-ring { position: relative; width: 80px; height: 80px; margin: 0 auto 6px; }
.acc-ring-svg { width: 80px; height: 80px; transform: rotate(-90deg); }
.acc-ring-bg { fill: none; stroke: rgba(255,255,255,.06); stroke-width: 6; }
.acc-ring-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(.4,0,.2,1);
}
.acc-ring-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; color: var(--gold);
}
.acc-ring-label { font-size: .68rem; color: rgba(255,255,255,.28); }

/* Info grid */
.acc-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.acc-info-card {
  background: #0e0804;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.acc-info-icon { font-size: 1.4rem; }
.acc-info-count {
  font-family: var(--font-h);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}
.acc-info-status { font-size: .75rem; color: #7dc; }
.acc-info-label {
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
}

/* Actions */
.acc-actions { display: flex; flex-direction: column; gap: 10px; }

/* Accordéon changement mot de passe */
.acc-accordion {
  background: #0e0804;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  overflow: hidden;
}
.acc-accordion-btn {
  width: 100%;
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: .88rem;
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  transition: background .2s, color .2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.acc-accordion-btn::after { content: '▾'; font-size: .8rem; opacity: .5; transition: transform .25s; }
.acc-accordion-btn.open::after { transform: rotate(180deg); }
.acc-accordion-btn:hover { background: rgba(201,168,76,.07); color: #fff; }
.acc-accordion-body { padding: 0 20px 20px; border-top: 1px solid rgba(255,255,255,.06); }
.acc-action-btn {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  color: rgba(255,255,255,.6);
  font-size: .88rem;
  padding: 14px 20px;
  cursor: pointer;
  text-align: left;
  transition: background .2s, color .2s, border-color .2s;
  font-family: inherit;
}
.acc-action-btn:hover {
  background: rgba(201,168,76,.08);
  border-color: rgba(201,168,76,.25);
  color: #fff;
}
.acc-action-btn--danger:hover {
  background: rgba(220,50,50,.08);
  border-color: rgba(220,50,50,.3);
  color: #f87;
}

/* ── Footer ────────────────────────────────────── */
.acc-footer {
  background: var(--dark);
  text-align: center;
  padding: 24px 16px;
  border-top: 1px solid rgba(201,168,76,.1);
  font-size: .75rem;
  color: rgba(255,255,255,.22);
  line-height: 1.8;
}
.acc-footer a { color: var(--gold); text-decoration: none; }
.acc-footer a:hover { text-decoration: underline; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 600px) {
  .acc-panel { padding: 24px 24px 32px; }
  .acc-hero { padding: 32px 24px 22px; }
  .acc-row { grid-template-columns: 1fr; }
  .acc-profile-header { padding: 20px; }
  .acc-points-card { flex-direction: column; align-items: flex-start; }
  .acc-info-grid { grid-template-columns: repeat(2, 1fr); }
}
