/* Pages Connexion & Installation — DZDHIVE */
:root {
  --orange: #ff8c00; --orange-deep: #ff5a00; --honey: #ffb000;
  --ink: #1b1a19; --ink-2: #605e5c; --line: #e1dfdd; --bg: #faf9f8; --card: #fff;
  --danger: #c4314b; --ok: #107c10;
  --font: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); min-height: 100vh; font-size: 14px; }
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-brand {
  position: relative; overflow: hidden; background: #0b0805; color: #f5ede3;
  display: flex; flex-direction: column; justify-content: space-between; padding: 48px;
}
.auth-brand::before {
  content: ""; position: absolute; inset: 0; opacity: .9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16.2v32.4L28 64.8 0 48.6V16.2zM28 64.8l28 16.2v32.4M28 64.8L0 81v32.4' fill='none' stroke='%23ff8c00' stroke-opacity='0.12' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  mask-image: radial-gradient(ellipse at 30% 70%, #000 10%, transparent 75%);
}
.auth-brand::after {
  content: ""; position: absolute; width: 520px; height: 600px; right: -180px; bottom: -160px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: radial-gradient(circle at 40% 40%, rgba(255,140,0,.45), rgba(255,90,0,.08) 60%, transparent 70%);
}
.auth-brand > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .04em; font-size: 18px; }
.brand svg { width: 32px; height: 36px; }
.brand b { color: var(--orange); }
.auth-brand h1 { font-size: clamp(34px, 4vw, 54px); line-height: 1.04; letter-spacing: -.03em; font-weight: 800; max-width: 520px; }
.auth-brand h1 em { font-style: normal; background: linear-gradient(90deg, var(--honey), var(--orange-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand p { color: #a8978a; margin-top: 16px; max-width: 440px; font-size: 15px; line-height: 1.6; }
.auth-brand small { color: #6e6157; font-size: 12px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.card {
  width: 100%; max-width: 440px; background: var(--card); border-radius: 12px; padding: 40px;
  box-shadow: 0 1.6px 3.6px rgba(0,0,0,.08), 0 12px 40px rgba(0,0,0,.08);
}
.card.wide { max-width: 640px; }
.card h2 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 6px; }
.card .sub { color: var(--ink-2); margin-bottom: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field input {
  width: 100%; height: 38px; padding: 0 12px; font: inherit; color: var(--ink);
  border: 1px solid #8a8886; border-radius: 4px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field input:hover { border-color: var(--ink); }
.field input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.field .hint { color: var(--ink-2); font-size: 12px; margin-top: 4px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row.r3 { grid-template-columns: 2fr 1fr; }
.check { display: flex; align-items: center; gap: 8px; margin: 4px 0 22px; color: var(--ink-2); cursor: pointer; }
.check input { accent-color: var(--orange); width: 16px; height: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 22px;
  border: none; border-radius: 4px; font: inherit; font-weight: 600; cursor: pointer; width: 100%;
  background: linear-gradient(135deg, var(--honey), var(--orange-deep)); color: #1b1006;
  transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.alert { padding: 10px 14px; border-radius: 4px; margin-bottom: 18px; font-size: 13px; line-height: 1.5; }
.alert.err { background: #fde7e9; color: #a4262c; border-left: 3px solid var(--danger); }
.fieldset-title {
  display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--orange-deep); margin: 26px 0 14px;
}
.fieldset-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.checks { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 13px; }
.checks li { display: flex; align-items: center; gap: 8px; }
.checks .dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; flex-shrink: 0; }
.checks .ok .dot { background: var(--ok); }
.checks .ko { color: var(--danger); font-weight: 600; }
.checks .ko .dot { background: var(--danger); }
.foot { margin-top: 22px; text-align: center; color: var(--ink-2); font-size: 12px; }
.foot a { color: var(--orange-deep); text-decoration: none; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 28px 24px; min-height: 220px; }
  .auth-brand h1 { font-size: 30px; }
  .card { padding: 28px 22px; }
  .row, .checks { grid-template-columns: 1fr; }
}

/* ---------- v2.2 : code à 6 chiffres, mot de passe ---------- */
.alert.ok { background: #e7f6ec; color: #0e6b2b; border-left: 3px solid var(--ok); }
.alert.info { background: #fff4e6; color: #8a4500; border-left: 3px solid var(--orange); }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.field-head a, .linkish { color: var(--orange-deep); font-size: 12.5px; font-weight: 600; text-decoration: none; background: none; border: 0; cursor: pointer; font-family: inherit; padding: 0; }
.field-head a:hover, .linkish:hover { text-decoration: underline; }
.linkish:disabled { color: var(--ink-2); cursor: default; text-decoration: none; }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 6px 0 8px; }
.otp input { width: 100%; height: 56px; text-align: center; font-size: 26px; font-weight: 700; font-family: Consolas, Menlo, monospace; border: 1px solid var(--line-strong, #c8c0b8); border-radius: 10px; background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s; }
.otp input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 140, 0, .18); }
.otp.err input { border-color: var(--danger); }
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--line, #e6ded6); }
.steps span.on { background: linear-gradient(90deg, var(--honey), var(--orange-deep)); }
.resend { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 14px 0 0; font-size: 12.5px; color: var(--ink-2); }
.meter { height: 6px; border-radius: 6px; background: var(--line, #e6ded6); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }
.rules { list-style: none; margin: 8px 0 18px; display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-2); padding: 0; }
.rules li::before { content: "○"; margin-right: 6px; color: var(--ink-2); }
.rules li.ok { color: var(--ok); }
.rules li.ok::before { content: "●"; color: var(--ok); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; color: var(--ink-2); font-size: 12px; font-weight: 600; font-family: inherit; }
@media (max-width: 420px) { .otp { gap: 6px; } .otp input { height: 48px; font-size: 22px; } }

/* v4.0 — mode SaaS : adresse d'espace (sous-domaine + domaine) */
a.btn { text-decoration: none; }
.suffix-input { display: flex; align-items: stretch; border: 1px solid #8a8886; border-radius: 4px; background: #fff; overflow: hidden; }
.suffix-input:focus-within { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.suffix-input input { border: none !important; box-shadow: none !important; flex: 1; min-width: 0; }
.suffix-input span { display: flex; align-items: center; padding: 0 12px; background: var(--bg); color: var(--ink-2); border-left: 1px solid var(--line); white-space: nowrap; }

/* v4.1 — inscription en ligne */
.stack { width: 100%; max-width: 440px; display: grid; gap: 18px; }
.stack .card { max-width: none; }
.plans-mini { display: grid; gap: 8px; margin-bottom: 16px; }
.plan-mini { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; }
.plan-mini:hover { border-color: var(--orange); background: #fff8ef; }
.plan-mini span { color: var(--orange-deep); font-weight: 600; }
.plan-mini small { grid-column: 1 / -1; color: var(--ink-2); font-size: 12px; }
.plan-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 8px; }
.plan-opt { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.plan-opt:has(input:checked) { border-color: var(--orange); background: #fff8ef; box-shadow: 0 0 0 1px var(--orange); }
.plan-opt input { accent-color: var(--orange); margin-top: 3px; }
.plan-opt b { display: block; }
.plan-opt em { display: block; font-style: normal; color: var(--orange-deep); font-weight: 600; margin: 2px 0 4px; }
.plan-opt small { display: block; color: var(--ink-2); font-size: 11.5px; line-height: 1.4; }

/* v4.81 — assistant d'inscription en trois étapes */
.card.wz { max-width: 720px; }
.wz .field select {
  width: 100%; height: 38px; padding: 0 10px; font: inherit; color: var(--ink);
  border: 1px solid #8a8886; border-radius: 4px; background: #fff;
}
.wz .field select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.wz .field input[type=file] { height: auto; padding: 7px 10px; background: var(--bg); }
.wz .opt { font-weight: 400; color: var(--ink-2); font-size: 11.5px; letter-spacing: 0; text-transform: none; }
.wz .row.r3b { grid-template-columns: 1.2fr 1.4fr .8fr; }
.wz-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: -12px 0 24px; counter-reset: s; }
.wz-steps li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding-bottom: 10px; border-bottom: 3px solid var(--line); }
.wz-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink-2); font-size: 12px; flex-shrink: 0; }
.wz-steps li.on { color: var(--ink); border-color: var(--orange); }
.wz-steps li.on span { background: var(--orange); color: #fff; }
.wz-steps li.done { border-color: var(--ok); }
.wz-steps li.done span { background: var(--ok); color: #fff; }
.wz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.wz-nav .btn { width: auto; min-width: 140px; }
.btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn:disabled { opacity: .6; cursor: wait; }
.link { background: none; border: none; color: var(--orange-deep); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline; letter-spacing: 0; text-transform: none; padding: 0; }
.field.invalid input, .field.invalid select, .field.invalid .suffix-input { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.field .err-msg { display: block; color: var(--danger); font-size: 12px; margin-top: 4px; }
.recap { display: grid; gap: 12px; margin-bottom: 20px; }
.rc-group { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.rc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rc-group dl { display: grid; grid-template-columns: minmax(130px, 36%) 1fr; gap: 4px 12px; font-size: 13px; }
.rc-group dt { color: var(--ink-2); }
.rc-group dd { font-weight: 600; word-break: break-word; }
.muted { color: var(--ink-2); font-weight: 400; }
.cgv-box { max-height: 220px; overflow: auto; white-space: pre-line; border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; background: var(--bg); font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
.wz .check { align-items: flex-start; margin-top: 12px; }
.wz .check input { margin-top: 2px; flex-shrink: 0; }
@media (max-width: 900px) {
  .card.wz { padding: 28px 20px; }
  .wz .row.r3b { grid-template-columns: 1fr; }
  .wz-steps li { font-size: 0; gap: 0; justify-content: center; }
  .wz-steps li span { font-size: 12px; }
  .rc-group dl { grid-template-columns: 1fr; }
  .rc-group dd { margin-bottom: 6px; }
}
.wz .hint a, .wz p.hint a { color: var(--orange-deep); }

/* v4.89 : forfait indicatif dans l'assistant */
.wz .vh { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.wz .plan-note { position: relative; padding: 10px 14px; border-radius: 8px; background: var(--bg); margin-bottom: 16px; }
.wz .plan-note small { color: var(--ink-2); margin-left: 4px; }
