/* ═══════════════════════════════════════════════════════════════
   Hub central — styles clairs premium (auth, compte, légal)
   S'appuie sur les tokens de marketplace.css (--grad, --text…).
   ═══════════════════════════════════════════════════════════════ */

.header-actions { display: flex; align-items: center; gap: .6rem; }
.header-login { display: none; }
@media (min-width: 900px) { .header-login { display: inline-flex; } }
.footer-legal { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; padding: 1.4rem 0; border-top: 1px solid var(--border-2); }
.footer-legal a, .footer-link-btn { color: var(--muted-2); font-size: .85rem; text-decoration: none; }
.footer-legal a:hover, .footer-link-btn:hover { color: var(--brand); }

/* ── Conteneur de page centrée (auth, succès) ── */
.page { padding: 3.5rem 0 5rem; min-height: 60vh; }
@media (min-width:768px){ .page { padding: 5rem 0 6rem; } }
.page-narrow { max-width: 30rem; margin: 0 auto; }
.page-head { text-align: center; margin-bottom: 1.75rem; }
.page-head h1 { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: clamp(1.7rem,5vw,2.4rem); letter-spacing: -.02em; }
.page-head p { margin-top: .6rem; color: var(--muted); font-size: 1rem; line-height: 1.6; }

/* ── Carte ── */
.card-soft { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-lg); box-shadow: 0 8px 32px rgba(0,0,0,.25); padding: 1.75rem; }
@media (min-width:520px){ .card-soft { padding: 2.25rem; } }

/* ── Formulaires ── */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--text); }
.input { width: 100%; padding: .85rem 1rem; border-radius: var(--r); border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: var(--text); font: inherit; font-size: .95rem; transition: border-color .2s, box-shadow .2s, background .2s; }
.input:focus { outline: none; background: rgba(255,255,255,.08); border-color: var(--brand); box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.input::placeholder { color: rgba(139,158,196,.5); }
.form-btn { width: 100%; margin-top: .5rem; }
.form-foot { margin-top: 1.3rem; text-align: center; font-size: .9rem; color: var(--muted); }
.form-foot a { color: var(--brand); font-weight: 600; text-decoration: none; }
.form-foot a:hover { text-decoration: underline; }

/* Cases à cocher de consentement */
.check-row { display: flex; align-items: flex-start; gap: .65rem; margin-bottom: .85rem; font-size: .85rem; color: var(--muted); line-height: 1.5; }
.check-row input { margin-top: .15rem; width: 1.05rem; height: 1.05rem; accent-color: var(--brand); flex-shrink: 0; }
.check-row a { color: var(--brand); font-weight: 600; }

/* Champ OTP */
.otp-input { text-align: center; font-family: "JetBrains Mono", monospace; font-size: 1.6rem; letter-spacing: .5em; font-weight: 700; padding-left: 1.5rem; }

/* ── Alertes ── */
.alert { border-radius: var(--r); padding: .85rem 1.1rem; font-size: .9rem; margin-bottom: 1rem; display: flex; gap: .6rem; align-items: flex-start; line-height: 1.5; }
.alert-err  { background: rgba(239,68,68,.12);  border: 1px solid rgba(239,68,68,.25);  color: #FCA5A5; }
.alert-ok   { background: rgba(16,185,129,.1);  border: 1px solid rgba(16,185,129,.2);  color: #6EE7B7; }
.alert-info { background: rgba(245,158,11,.1);  border: 1px solid rgba(245,158,11,.2);  color: #FCD34D; }

/* ══════════════════════════════════════════════
   PAGE COMPTE — mobile-first
   ══════════════════════════════════════════════ */
.acc-page { padding: 2.5rem 0 5rem; min-height: 70vh; }
@media (min-width:768px){ .acc-page { padding: 4rem 0 6rem; } }
.acc-wrap { max-width: 62rem; }

/* ── Profil header ── */
.acc-profile {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem; flex-wrap: wrap; padding: 1.25rem 1.5rem;
}
.acc-avatar {
  width: 3rem; height: 3rem; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: 1.25rem;
  box-shadow: 0 0 0 3px rgba(245,158,11,.25);
}
.acc-profile-info { flex: 1; min-width: 0; }
.acc-profile-email { font-weight: 700; font-size: .9rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-profile-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.acc-chip {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem;
  color: var(--muted); background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: .18rem .55rem;
}
.acc-chip svg { flex-shrink: 0; }

/* ── Layout grille ── */
.acc-grid { display: grid; gap: 1.1rem; }
@media (min-width:800px) { .acc-grid { grid-template-columns: 1fr 21rem; align-items: start; gap: 1.25rem; } }
.acc-sidebar { display: flex; flex-direction: column; gap: 1.1rem; }
.acc-card { padding: 1.35rem; }
@media (min-width:520px){ .acc-card { padding: 1.6rem; } }

/* ── Section header ── */
.acc-section-head { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.1rem; }
.acc-section-icon {
  width: 1.9rem; height: 1.9rem; border-radius: .55rem; flex-shrink: 0;
  background: var(--grad-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.acc-section-title { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: .95rem; flex: 1; color: var(--text); }
.acc-badge-count {
  font-size: .68rem; font-weight: 800; line-height: 1;
  background: var(--grad); color: #fff; border-radius: 999px; padding: .2rem .5rem;
}
.acc-section-desc { font-size: .85rem; color: var(--muted); line-height: 1.55; margin-bottom: 1rem; }
.acc-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.acc-toggle-label { font-size: .875rem; font-weight: 600; color: var(--text); }

/* ── Empty ── */
.acc-empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); font-size: .9rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.acc-empty svg { margin-bottom: .5rem; }

/* ── Commandes ── */
.acc-orders { display: flex; flex-direction: column; gap: .75rem; }

.acc-order {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r); overflow: hidden;
  transition: background .2s, border-color .2s;
}
.acc-order:hover { background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.12); }

.acc-order-row { display: flex; align-items: flex-start; gap: .8rem; padding: .9rem 1rem; }
.acc-order-top { border-bottom: 1px solid rgba(255,255,255,.05); }
.acc-order-bottom { flex-wrap: wrap; gap: .65rem; align-items: center; background: rgba(255,255,255,.015); }

.acc-order-cover {
  width: 2.4rem; height: 2.4rem; min-width: 2.4rem; border-radius: .55rem;
  background: var(--grad-soft); border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--brand);
}
.acc-order-info { flex: 1; min-width: 0; }
.acc-order-name { font-weight: 700; font-size: .88rem; color: var(--text); line-height: 1.35; }
.acc-order-sub { font-size: .73rem; color: var(--muted-2); margin-top: .2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.acc-sep { opacity: .4; }
.acc-order-status { flex-shrink: 0; }
.acc-order-actions { display: flex; flex-wrap: wrap; gap: .4rem; flex-shrink: 0; }
.acc-order-actions .btn svg { display: inline-block; vertical-align: middle; margin-right: .25rem; }

.acc-order-price { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .8rem; flex: 1; }
.acc-price-orig  { text-decoration: line-through; color: var(--muted-2); }
.acc-price-paid  { color: #6EE7B7; font-weight: 700; }
.acc-price-normal { color: var(--text); font-weight: 600; }
.acc-promo-badge {
  background: rgba(16,185,129,.1); color: #6EE7B7;
  border: 1px solid rgba(16,185,129,.2); border-radius: .4rem;
  padding: .1rem .45rem; font-size: .68rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase;
}
.acc-date { color: var(--muted-2); font-size: .74rem; }

/* Badges statuts */
.badge-status { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: .25rem .55rem; border-radius: .5rem; }
.bs-paid    { background: rgba(16,185,129,.12);  color: #6EE7B7; border: 1px solid rgba(16,185,129,.2); }
.bs-pending { background: rgba(245,158,11,.1);   color: #FCD34D; border: 1px solid rgba(245,158,11,.2); }
.bs-other   { background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid var(--border); }

/* Boutons inline avec icône */
.acc-order-actions .btn svg { display: inline; vertical-align: middle; margin-right: .3rem; }

/* Zone danger */
.danger-zone { border: 1px solid rgba(239,68,68,.2); background: rgba(239,68,68,.06); border-radius: var(--r); padding: 1.1rem; }
.btn-danger-soft { background: rgba(239,68,68,.1); color: #FCA5A5; border: 1px solid rgba(239,68,68,.2); }
.btn-danger-soft:hover { background: rgba(239,68,68,.18); }

/* Ancien account-grid (keep pour compat) */
.account-grid { display: grid; gap: 1.5rem; }
.account-section-title { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: 1.1rem; margin-bottom: 1rem; }
.order-card { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: var(--r); padding: 1.1rem 1.25rem; transition: background .2s, border-color .2s; }
.order-card:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); }
.order-main { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.order-cover { width: 2.8rem; height: 2.8rem; border-radius: .7rem; background: var(--grad-soft); border: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; color: var(--brand); }
.order-name { font-weight: 700; font-size: .95rem; }
.order-meta { font-size: .78rem; color: var(--muted-2); margin-top: .15rem; }
.order-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Toggle newsletter */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; }
.switch-track { position: absolute; inset: 0; background: rgba(255,255,255,.12); border-radius: 999px; transition: background .2s; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }

/* ── Pages légales (prose) ── */
.legal { max-width: 46rem; margin: 0 auto; }
.legal h1 { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: clamp(1.8rem,5vw,2.6rem); letter-spacing: -.02em; }
.legal .updated { color: var(--muted-2); font-size: .85rem; margin: .5rem 0 2rem; }
.legal h2 { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 700; font-size: 1.2rem; margin: 2rem 0 .6rem; }
.legal p, .legal li { color: var(--muted); font-size: .95rem; line-height: 1.7; }
.legal ul { margin: .5rem 0 1rem 1.2rem; display: flex; flex-direction: column; gap: .3rem; }
.legal strong { color: var(--text); }
.legal a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .9rem; }
.legal th, .legal td { border: 1px solid var(--border); padding: .6rem .8rem; text-align: left; }
.legal th { background: rgba(255,255,255,.04); font-weight: 700; color: var(--text); }
.legal h1, .legal h2 { color: var(--text); }

/* ── Modal overlay (partagé avec product.css) ── */
.co-overlay { position: fixed; inset: 0; z-index: 9900; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(15,23,42,.45); backdrop-filter: blur(3px); }
.co-overlay[hidden] { display: none; }
.co-card { position: relative; width: 100%; max-width: 32rem; max-height: 92vh; display: flex; flex-direction: column; background: #0F172A; border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
@media (max-width: 599px) { .co-card { max-width: 90vw; } }
.co-topbar { height: 5px; background: var(--grad); }
.co-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.4rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.co-header-inner { display: flex; align-items: center; gap: .75rem; }
.co-logo { width: 2.2rem; height: 2.2rem; border-radius: .7rem; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.co-title { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: 1.05rem; }
.co-subtitle { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.co-close { width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.06); color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .2s; }
.co-close:hover { background: rgba(255,255,255,.1); }
.co-body { padding: 1.25rem 1.4rem; overflow-y: auto; }
.co-footer { padding: 1.1rem 1.4rem; border-top: 1px solid rgba(255,255,255,.08); }

/* ── Contacts / threads ── */
.acc-thread-open { display: block !important; }
.acc-thread-open ~ button .acc-thread-chevron,
button:has(+ .acc-thread-open) .acc-thread-chevron { transform: rotate(180deg); }
.acc-reply-open { display: block !important; }
