/* ============================================================
   COCKPIT — Auth & Account (connexion, inscription, compte)
   S'appuie sur styles.css (tokens, boutons, logo).
   ============================================================ */

/* ---------- Layout auth (split) ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-form { display: flex; flex-direction: column; justify-content: space-between; padding: 32px 40px; }
.auth-inner { width: 100%; max-width: 380px; margin: auto; padding: 24px 0; }
.auth-top { display: flex; justify-content: space-between; align-items: center; }
.auth-back { font-size: 13px; color: var(--zinc-500); display: inline-flex; align-items: center; gap: 6px; }
.auth-back:hover { color: var(--zinc-900); }

.auth-inner h1 { font-size: 26px; letter-spacing: -0.03em; margin-top: 26px; }
.auth-sub { font-size: 14.5px; color: var(--text-soft); margin-top: 8px; line-height: 1.5; }

.sso { display: flex; flex-direction: column; gap: 9px; margin-top: 26px; }
.sso-btn { height: 44px; border: 1px solid var(--border); border-radius: var(--r-btn); background: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; font-weight: 550; color: var(--zinc-800); transition: background .15s, border-color .15s; }
.sso-btn:hover { background: var(--zinc-50); border-color: var(--zinc-300); }
.sso-btn svg, .sso-btn img { width: 18px; height: 18px; }

.auth-or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--zinc-400); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.field { margin-bottom: 16px; }
.field label { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 550; color: var(--zinc-700); margin-bottom: 7px; }
.field label a { font-size: 12.5px; font-weight: 500; color: var(--zinc-500); }
.field label a:hover { color: var(--zinc-900); }
.inp-wrap { position: relative; }
.inp {
  width: 100%; height: 44px; padding: 0 14px; font-size: 14px; font-family: inherit;
  border: 1px solid var(--border); border-radius: var(--r-btn); background: #fff; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.inp::placeholder { color: var(--zinc-400); }
.inp:focus { border-color: var(--zinc-900); box-shadow: 0 0 0 3px var(--accent-ring); }
.inp-wrap .pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: none; background: none; color: var(--zinc-400); display: grid; place-items: center; cursor: pointer; }
.inp-wrap .pw-toggle:hover { color: var(--zinc-700); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkrow { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--zinc-600); line-height: 1.45; margin: 4px 0 18px; cursor: pointer; }
.checkrow input { margin-top: 2px; accent-color: var(--zinc-900); width: 15px; height: 15px; flex: none; }
.checkrow a { color: var(--zinc-900); text-decoration: underline; text-underline-offset: 2px; }

.auth-alt { text-align: center; font-size: 13.5px; color: var(--zinc-500); margin-top: 22px; }
.auth-alt a { color: var(--zinc-900); font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }

.auth-foot { font-size: 11.5px; color: var(--zinc-400); text-align: center; line-height: 1.5; }
.auth-foot a { color: var(--zinc-500); text-decoration: underline; text-underline-offset: 2px; }

/* Strength meter */
.pw-meter { display: flex; gap: 4px; margin-top: 9px; }
.pw-meter i { height: 3px; border-radius: 2px; flex: 1; background: var(--zinc-200); transition: background .2s; }
.pw-meter.s1 i:nth-child(1) { background: var(--error); }
.pw-meter.s2 i:nth-child(-n+2) { background: var(--warning); }
.pw-meter.s3 i:nth-child(-n+3) { background: #15803d; }
.pw-meter.s4 i { background: var(--success); }
.pw-hint { font-size: 11.5px; color: var(--zinc-400); margin-top: 6px; }

/* Brand panel */
.auth-brand { position: relative; background: var(--zinc-950); color: #fff; padding: 44px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-brand::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(80% 70% at 70% 20%, #000, transparent 80%);
          mask-image: radial-gradient(80% 70% at 70% 20%, #000, transparent 80%);
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .logo-word { color: #fff; }
.brand-quote { max-width: 420px; }
.brand-quote .stars { color: #fff; letter-spacing: 2px; font-size: 13px; }
.brand-quote blockquote { margin: 16px 0 0; font-family: var(--font-display); font-size: 23px; line-height: 1.32; letter-spacing: -0.02em; font-weight: 500; }
.brand-quote .who { display: flex; align-items: center; gap: 11px; margin-top: 22px; }
.brand-quote .who .nm { font-size: 13.5px; font-weight: 600; }
.brand-quote .who .ro { font-size: 12px; color: var(--zinc-400); }
.brand-stats { display: flex; gap: 32px; }
.brand-stats .bs .n { font-family: var(--font-mono); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.brand-stats .bs .l { font-size: 12px; color: var(--zinc-400); margin-top: 3px; }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form { padding: 24px; }
}

/* ============================================================
   COMPTE (account settings shell)
   ============================================================ */
.acc { display: flex; min-height: 100vh; background: var(--bg-soft); }
.acc-side {
  width: 240px; flex: none; background: var(--zinc-950); color: #fff;
  display: flex; flex-direction: column; padding: 18px 14px;
  position: sticky; top: 0; height: 100vh;
}
.acc-brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 18px; }
.acc-brand .logo-word { color: #fff; }
.acc-user { display: flex; align-items: center; gap: 11px; padding: 12px 10px; border-radius: 10px; background: var(--zinc-900); margin-bottom: 14px; }
.acc-user .nm { font-size: 13px; font-weight: 600; }
.acc-user .pl { font-size: 11px; color: var(--zinc-400); margin-top: 1px; }
.acc-nav { display: flex; flex-direction: column; gap: 2px; }
.acc-grp { font-size: 10.5px; font-weight: 600; color: var(--zinc-600); text-transform: uppercase; letter-spacing: .05em; padding: 14px 10px 6px; }
.acc-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px;
  font-size: 13.5px; color: var(--zinc-400); font-weight: 500; cursor: pointer; border: none; background: none; width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.acc-link svg { width: 16px; height: 16px; color: var(--zinc-500); flex: none; }
.acc-link:hover { background: var(--zinc-900); color: #fff; }
.acc-link.active { background: var(--zinc-800); color: #fff; }
.acc-link.active svg { color: #fff; }
.acc-link .badge { margin-left: auto; }
.acc-side-foot { margin-top: auto; padding-top: 14px; }
.acc-logout { color: var(--zinc-400); }
.acc-logout:hover { background: var(--zinc-900); color: #fff; }

.acc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acc-top { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; border-bottom: 1px solid var(--border); background: #fff; position: sticky; top: 0; z-index: 10; }
.acc-top h1 { font-size: 18px; letter-spacing: -0.02em; }
.acc-top .acc-top-r { display: flex; align-items: center; gap: 12px; }
.acc-burger { display: none; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 8px; background: #fff; place-items: center; }

.acc-body { padding: 32px; max-width: 820px; width: 100%; }
.acc-panel { display: none; }
.acc-panel.show { display: block; animation: accIn .35s ease both; }
@keyframes accIn { from { transform: translateY(8px); } to { transform: none; } }

.acc-sec { background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); padding: 26px; margin-bottom: 18px; }
.acc-sec h2 { font-size: 16px; }
.acc-sec .sec-desc { font-size: 13.5px; color: var(--text-soft); margin-top: 5px; margin-bottom: 22px; line-height: 1.5; }
.acc-sec h2 + .sec-desc { margin-top: 5px; }

.acc-avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.acc-avatar-row .gav { width: 64px; height: 64px; font-size: 27px; border-radius: 50%; }
.acc-avatar-row .av-act { display: flex; gap: 8px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.acc-sec .field { margin-bottom: 0; }
.acc-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-soft); }

.seg { display: inline-flex; gap: 6px; background: var(--zinc-100); padding: 4px; border-radius: 9px; }
.seg button { height: 32px; padding: 0 14px; border: none; background: transparent; border-radius: 6px; font-size: 12.5px; font-weight: 550; color: var(--zinc-600); cursor: pointer; }
.seg button.on { background: var(--zinc-950); color: #fff; }

/* Plan / usage */
.plan-now { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid var(--zinc-950); border-radius: 12px; background: var(--zinc-950); color: #fff; margin-bottom: 22px; flex-wrap: wrap; }
.plan-now .pn-l .t { font-size: 13px; color: var(--zinc-400); }
.plan-now .pn-l .v { font-size: 22px; font-weight: 600; font-family: var(--font-display); letter-spacing: -0.02em; margin-top: 2px; }
.plan-now .pn-l .v span { font-size: 14px; color: var(--zinc-400); font-weight: 500; }
.plan-now .pn-r { display: flex; gap: 8px; }
.plan-now .btn-ghost { background: transparent; color: #fff; border-color: var(--zinc-700); }
.plan-now .btn-ghost:hover { background: var(--zinc-800); }

.usage { display: flex; flex-direction: column; gap: 16px; }
.use { }
.use-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 7px; }
.use-h .k { font-weight: 550; color: var(--zinc-800); display: inline-flex; align-items: center; gap: 7px; }
.use-h .k .star { width: 12px; height: 12px; fill: var(--zinc-900); }
.use-h .v { font-family: var(--font-mono); font-size: 12px; color: var(--zinc-500); white-space: nowrap; padding-left: 12px; }
.use-bar { height: 8px; border-radius: 4px; background: var(--zinc-100); overflow: hidden; }
.use-bar i { display: block; height: 100%; border-radius: 4px; background: var(--zinc-900); }
.use-bar i.inf { background: repeating-linear-gradient(45deg, var(--zinc-900), var(--zinc-900) 6px, var(--zinc-700) 6px, var(--zinc-700) 12px); width: 100% !important; }

/* Connected accounts */
.conn { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; }
.conn + .conn { margin-top: 12px; }
.conn-logo { width: 44px; height: 44px; border-radius: 10px; background: var(--zinc-100); display: grid; place-items: center; font-weight: 700; font-size: 15px; color: var(--zinc-800); flex: none; }
.conn-meta { min-width: 0; }
.conn-meta .nm { font-size: 14px; font-weight: 600; }
.conn-meta .sub { font-size: 12.5px; color: var(--zinc-500); margin-top: 2px; }
.conn-act { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* Billing table */
.bill-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 22px; }
.bill-card .cc { width: 46px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, var(--zinc-800), var(--zinc-950)); flex: none; }
.bill-card .ccm { flex: 1; }
.bill-card .ccm .nm { font-size: 14px; font-weight: 600; }
.bill-card .ccm .sub { font-size: 12.5px; color: var(--zinc-500); margin-top: 2px; }
.inv { width: 100%; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.inv-row { display: grid; grid-template-columns: 1.2fr 1fr 0.8fr 0.6fr; gap: 12px; align-items: center; padding: 13px 16px; font-size: 13px; border-bottom: 1px solid var(--border-soft); }
.inv-row:last-child { border-bottom: none; }
.inv-row.head { background: var(--zinc-50); font-size: 11px; font-weight: 600; color: var(--zinc-500); text-transform: uppercase; letter-spacing: .03em; }
.inv-row .num { font-family: var(--font-mono); }
.inv-row a { color: var(--zinc-900); font-weight: 600; font-size: 12.5px; }
.inv-row a:hover { text-decoration: underline; }

/* Security */
.sec-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; }
.sec-toggle + .sec-toggle { margin-top: 12px; }
.sec-toggle .st-m .nm { font-size: 14px; font-weight: 600; }
.sec-toggle .st-m .sub { font-size: 12.5px; color: var(--zinc-500); margin-top: 3px; line-height: 1.45; max-width: 460px; }
.danger { border-color: #fecaca !important; }
.danger .nm { color: var(--error); }
.btn-danger { background: #fff; color: var(--error); border: 1px solid #fecaca; }
.btn-danger:hover { background: var(--error-bg); }

.acc-overlay { display: none; }

@media (max-width: 760px) {
  .acc-side { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .3s cubic-bezier(.16,1,.3,1); }
  .acc-side.open { transform: none; }
  .acc-burger { display: grid; }
  .acc-body { padding: 20px; }
  .acc-top { padding: 0 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .acc-overlay.show { display: block; position: fixed; inset: 0; background: rgba(9,9,11,.4); z-index: 55; }
  .inv-row { grid-template-columns: 1.2fr 0.8fr 0.6fr; }
  .inv-row .hide-m { display: none; }
}
