:root {
  --bg: #f5f9ff;
  --card: #ffffff;
  --ink: #10305e;
  --muted: #5b7396;
  --blue: #1d6ceb;
  --sky: #37b6f6;
  --grad: linear-gradient(120deg, #1d6ceb, #37b6f6);
  --ok: #14b380;
  --err: #e2544a;
  --line: #dbe7f7;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(29, 108, 235, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background:
    radial-gradient(900px 420px at 85% -100px, rgba(55, 182, 246, .16), transparent 65%),
    radial-gradient(700px 380px at 0% 0%, rgba(29, 108, 235, .10), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", "Nunito", "Trebuchet MS", -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 36px;
}
.logo {
  font-size: 26px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--ink); text-decoration: none;
}
.logo span { color: var(--blue); }
nav { display: flex; gap: 12px; align-items: center; }
.nav-link { color: var(--muted); font-size: 15px; cursor: pointer; font-weight: 600; }
.nav-link:hover { color: var(--blue); }
#user-email { color: var(--muted); margin-right: 8px; font-size: 14px; }
#account-box { position: relative; }
#account-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 48px rgba(16,48,94,.18);
  min-width: 240px; padding: 10px; z-index: 45;
  display: flex; flex-direction: column; gap: 4px;
}
#account-menu[hidden] { display: none; }
.acc-email { font-weight: 800; font-size: 13.5px; padding: 6px 10px 2px; word-break: break-all; }
.acc-wallet { color: var(--muted); font-size: 12.5px; padding: 0 10px 8px; border-bottom: 1.5px solid var(--line); line-height: 1.7; }
.acc-item { padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--ink); font-weight: 600; }
.acc-item:hover { background: #f2f8ff; color: var(--blue); }

.jobs-toggle {
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 700;
  padding: 8px 2px;
  margin-top: 34px;
}
.jobs-toggle:hover { color: var(--blue); transform: none; box-shadow: none; }
#jobs-caret { display: inline-block; transition: transform .15s; }
#jobs-body[hidden] { display: none; }
.jobs-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 6px 0 14px; flex-wrap: wrap; }
.jobs-hint { color: var(--muted); font-size: 13px; margin: 0; }
.job-head-left { display: flex; align-items: center; gap: 14px; }
.job-check { width: 19px; height: 19px; accent-color: var(--blue); cursor: pointer; flex-shrink: 0; }

button {
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(29, 108, 235, .25);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(29, 108, 235, .32); }
button:active { transform: translateY(0); }
button:disabled { opacity: .5; cursor: default; transform: none; }
button.ghost {
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink);
  box-shadow: none;
}
button.ghost:hover { border-color: var(--blue); color: var(--blue); box-shadow: none; }

main { flex: 1; max-width: 940px; width: 100%; margin: 0 auto; padding: 16px 24px; }

/* ─────────── page de vente ─────────── */
.hero { text-align: center; padding: 56px 0 30px; }
.hero-badge {
  display: inline-block;
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--blue);
  border-radius: 30px;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 22px;
}
.hero h1 { font-size: 48px; line-height: 1.12; letter-spacing: -1.2px; font-weight: 800; }
.hero h1 span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { color: var(--muted); max-width: 620px; margin: 22px auto 34px; line-height: 1.7; font-size: 17px; }
.hero-sub b { color: var(--ink); }

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta { font-size: 18px; padding: 16px 30px; border-radius: 14px; }
.cta-pill {
  background: #fff;
  color: var(--blue);
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 800;
  padding: 3px 10px;
  margin-left: 8px;
  vertical-align: 2px;
}
.cta-alt {
  background: #fff;
  color: var(--blue);
  border: 2px solid var(--blue);
  box-shadow: var(--shadow);
}
.cta-alt:hover { background: #f2f8ff; }

.trust-row {
  display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center;
  margin-top: 30px; color: var(--muted); font-size: 14px; font-weight: 600;
}

.section { padding: 44px 0 8px; }
.section h2 { font-size: 30px; letter-spacing: -0.6px; text-align: center; margin-bottom: 26px; }

.steps-cards, .cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step-card, .case {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  box-shadow: var(--shadow);
}
.step-card b, .case b { color: var(--ink); display: block; margin-bottom: 8px; font-size: 16px; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; margin-bottom: 14px;
}

.formats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 26px; }
.formats span {
  background: #fff; border: 1.5px solid var(--line); border-radius: 20px;
  padding: 5px 15px; font-size: 12.5px; color: var(--muted); font-weight: 700;
}

.final-cta { text-align: center; padding-bottom: 40px; }

/* ─────────── parcours réparation ─────────── */
.back-link { color: var(--muted); font-size: 14px; cursor: pointer; font-weight: 600; }
.back-link:hover { color: var(--blue); }
#view-repair h2 { font-size: 32px; letter-spacing: -0.6px; margin: 0; }
.repair-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; margin: 18px 0 26px;
}
.repair-switch { width: 260px; flex-shrink: 0; margin: 0; }

.sub-item {
  display: flex; flex-direction: column; gap: 2px;
  background: #f7fafd; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px; font-size: 14.5px;
}
.sub-item span { color: var(--muted); font-size: 13px; }
.sub-empty { color: var(--muted); font-size: 14px; }
#view-repair h3 { font-size: 20px; margin: 40px 0 14px; }

.stepper { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.stp { display: flex; align-items: center; gap: 10px; }
.stp i {
  width: 34px; height: 34px; border-radius: 50%; font-style: normal;
  background: #fff; border: 2px solid var(--line); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-weight: 800;
  transition: all .2s;
}
.stp em { font-style: normal; font-weight: 700; color: var(--muted); font-size: 15px; }
.stp.active i { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(29,108,235,.35); }
.stp.active em { color: var(--ink); }
.stp.done i { background: var(--ok); border-color: var(--ok); color: #fff; }
.stp-line { flex: 1; height: 2px; background: var(--line); border-radius: 2px; }

.panel {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.panel-hint { color: var(--muted); font-size: 14px; margin-top: 14px; }

#dropzone {
  border: 2px dashed #b9d2f5;
  border-radius: 14px;
  background: #f7fbff;
  padding: 52px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
#dropzone:hover, #dropzone.drag { border-color: var(--blue); background: #eef6ff; }
.dz-icon { font-size: 42px; margin-bottom: 10px; }
.dz-title { font-size: 19px; font-weight: 800; }
.dz-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }

.progress-wrap { padding: 18px 6px; }
.progress-track { height: 10px; background: #e8f0fc; border-radius: 6px; overflow: hidden; }
#upload-bar { height: 100%; width: 0; background: var(--grad); border-radius: 6px; transition: width .25s; }
.step2-status { margin-top: 16px; color: var(--muted); font-weight: 600; font-size: 15px; }

.result-report { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 12px 0 4px; }
.result-actions { margin-top: 16px; display: flex; gap: 12px; flex-wrap: wrap; }
.panel video, .panel img, .panel audio, .job video, .job img, .job audio {
  width: 100%; max-height: 420px; border-radius: 12px; margin-top: 6px;
  background: #0b1e3a; object-fit: contain;
}

/* ─────────── historique ─────────── */
.job {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.job-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.job-name { font-weight: 800; word-break: break-all; }
.job-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.badge { font-size: 12.5px; font-weight: 800; border-radius: 20px; padding: 5px 13px; white-space: nowrap; }
.badge.processing { background: #eaf1fc; color: var(--muted); }
.badge.repaired { background: rgba(20,179,128,.13); color: var(--ok); }
.badge.failed { background: rgba(226,84,74,.12); color: var(--err); }
.badge.reference { background: #fff4e0; color: #b7791f; }
.ref-box { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ref-share { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 12.5px; line-height: 1.5; cursor: pointer; }
.ref-share input { width: 16px; height: 16px; accent-color: var(--blue); flex-shrink: 0; margin-top: 1px; }
.job-report { color: var(--muted); font-size: 14px; margin-top: 10px; line-height: 1.55; }
.job-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }

footer { text-align: center; color: #93a8c4; font-size: 13px; padding: 34px; }
.foot-links { margin-bottom: 10px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.foot-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--blue); }

#cookie-banner {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  background: #fff; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(16,48,94,.18);
  padding: 12px 16px; font-size: 14px;
  display: flex; gap: 14px; align-items: center;
  max-width: min(560px, calc(100vw - 110px));
  z-index: 55;
}
#cookie-banner[hidden] { display: none; }
#cookie-banner button { padding: 8px 16px; font-size: 13px; white-space: nowrap; }

/* ─────────── blog & pages légales ─────────── */
.article { max-width: 720px; margin: 0 auto; padding: 10px 24px 50px; }
.article h1 { font-size: 34px; letter-spacing: -0.8px; line-height: 1.2; margin: 18px 0 10px; }
.article h2 { font-size: 22px; letter-spacing: -0.4px; margin: 30px 0 10px; }
.article p, .article li { color: var(--muted); line-height: 1.75; font-size: 16px; margin-bottom: 12px; }
.article ul { padding-left: 22px; }
.article .art-date { color: #93a8c4; font-size: 13px; }
.article .todo { background: #fff7e6; border: 1.5px solid #f4d9a0; color: #8a6d1e;
  border-radius: 8px; padding: 2px 8px; font-size: 14px; font-weight: 700; }
.cta-box {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px; text-align: center; margin-top: 34px;
}
.cta-box p { margin-bottom: 16px; }
.blog-list { display: grid; gap: 14px; max-width: 720px; margin: 0 auto; padding: 10px 24px 50px; }
.blog-card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; text-decoration: none; display: block;
}
.blog-card b { color: var(--ink); font-size: 18px; display: block; margin-bottom: 8px; }
.blog-card span { color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.blog-card:hover { border-color: var(--blue); }

/* ─────────── modales ─────────── */
.modal {
  position: fixed; inset: 0;
  background: rgba(16, 48, 94, .45);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
}
.modal[hidden] { display: none !important; }
.modal-box {
  background: #fff;
  border-radius: 18px;
  padding: 30px;
  width: 360px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 24px 70px rgba(16, 48, 94, .25);
}
.modal-box h3 { font-size: 22px; letter-spacing: -0.4px; }
.modal-box input {
  background: #f7fafd;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
}
.modal-box input:focus { outline: none; border-color: var(--blue); }
.error { color: var(--err); font-size: 13px; }
.switch-link { color: var(--blue); font-size: 13.5px; text-align: center; cursor: pointer; font-weight: 700; }
.switch-link:hover { text-decoration: underline; }

.pricing-box { width: min(780px, 92vw); max-height: 88vh; overflow-y: auto; }
.pricing-sub { color: var(--muted); font-size: 14.5px; line-height: 1.5; }

.tabs {
  display: flex; gap: 8px;
  background: #eef4fd;
  border-radius: 12px;
  padding: 5px;
  margin: 4px 0 10px;
}
.tab {
  flex: 1;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  border-radius: 9px;
  padding: 10px;
  font-size: 15px;
}
.tab:hover { transform: none; box-shadow: none; color: var(--blue); }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 3px 10px rgba(29,108,235,.14); }

.pricing-legal { color: #93a8c4; font-size: 11.5px; line-height: 1.5; }
.pricing-legal a { color: var(--muted); }
.plan-star { border: 2px solid var(--blue); background: #f4f9ff; position: relative; }
.plan-star::after {
  content: "Le plus complet";
  position: absolute; top: -11px; right: 12px;
  background: var(--grad); color: #fff;
  font-size: 11px; font-weight: 800;
  border-radius: 12px; padding: 3px 10px;
}
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 6px; }
.plan {
  background: #fbfdff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.plan-free { border-color: var(--ok); background: #f4fcf9; }
.plan-name { font-weight: 800; }
.plan-price { font-size: 25px; font-weight: 800; }
.plan-price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.plan ul { list-style: none; flex: 1; }
.plan li { color: var(--muted); font-size: 13px; line-height: 1.6; padding-left: 17px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }

.spinner {
  display: inline-block; width: 15px; height: 15px;
  border: 2.5px solid #dbe7f7; border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: -2px; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────── chatbot ─────────── */
#chat-bubble {
  position: fixed; right: 22px; bottom: 22px;
  width: 58px; height: 58px;
  border-radius: 50%;
  font-size: 25px;
  padding: 0;
  z-index: 60;
  box-shadow: 0 10px 28px rgba(29,108,235,.4);
}
#chat-panel {
  position: fixed; right: 22px; bottom: 92px;
  width: min(360px, calc(100vw - 44px));
  height: min(480px, calc(100vh - 130px));
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(16,48,94,.3);
  display: flex; flex-direction: column;
  overflow: hidden;
  z-index: 60;
}
#chat-panel[hidden] { display: none; }
.chat-head {
  background: var(--grad); color: #fff;
  padding: 14px 16px;
  font-weight: 800;
  display: flex; justify-content: space-between; align-items: center;
}
.chat-x { background: transparent; box-shadow: none; padding: 2px 8px; font-size: 15px; }
.chat-x:hover { transform: none; box-shadow: none; }
#chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.chat-msg.bot { background: #eef4fd; color: var(--ink); border-bottom-left-radius: 4px; align-self: flex-start; }
.chat-msg.user { background: var(--grad); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-msg.agent { background: #e7f9f1; color: var(--ink); border-bottom-left-radius: 4px; align-self: flex-start; border: 1px solid #bceedd; }
.chat-msg a { color: inherit; }
.chat-wa {
  margin: 0 14px 8px; text-align: center;
  color: var(--blue); font-size: 13px; font-weight: 700; text-decoration: none;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 8px;
  cursor: pointer;
}
.chat-wa:hover { border-color: var(--blue); }
#support-form {
  display: flex; flex-direction: column; gap: 8px;
  margin: 0 14px 8px; padding: 12px;
  background: #f2f8ff; border: 1.5px solid var(--line); border-radius: 12px;
}
#support-form[hidden] { display: none; }
#support-form input, #support-form textarea {
  border: 1.5px solid var(--line); border-radius: 9px;
  padding: 9px 11px; font-size: 13.5px; font-family: inherit; color: var(--ink);
  resize: vertical;
}
#support-form input:focus, #support-form textarea:focus { outline: none; border-color: var(--blue); }
#support-form button { padding: 9px; font-size: 13.5px; }
.chat-inputrow { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1.5px solid var(--line); }
.chat-inputrow input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; font-family: inherit; color: var(--ink);
}
.chat-inputrow input:focus { outline: none; border-color: var(--blue); }
.chat-inputrow button { padding: 10px 15px; }

@media (max-width: 640px) {
  .hero h1 { font-size: 34px; }
  header { padding: 16px 20px; flex-wrap: wrap; gap: 10px; }
  .stp em { display: none; }
}
