/* ===================================================================
   Assuverif — direction Trust & Authority Navy (B2B SaaS verification)
   Palette validee par squad ui-ux-pro-max + business plan (2026-05-19)
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Palette */
  --navy-900: #0F172A;
  --navy-800: #1E293B;
  --navy-700: #334155;
  --navy-500: #64748B;
  --navy-400: #94A3B8;
  --navy-300: #CBD5E1;
  --navy-200: #E2E8F0;
  --navy-100: #F1F5F9;
  --navy-50:  #F8FAFC;

  --brand:        #0369A1;
  --brand-dark:   #075985;
  --brand-light:  #0EA5E9;

  --green:        #14B86B;
  --green-dark:   #0E9357;
  --green-bg:     #E8F9EF;
  --red:          #DC2626;
  --red-bg:       #FDECEC;
  --amber:        #F59E0B;
  --amber-bg:     #FFF7E6;

  --bg:           var(--navy-50);
  --card:         #FFFFFF;
  --text:         var(--navy-900);
  --muted:        var(--navy-500);
  --border:       var(--navy-200);
  --primary:      var(--brand);
  --primary-dark: var(--brand-dark);

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --shadow:    0 1px 3px rgba(15,23,42,.04), 0 8px 32px rgba(15,23,42,.06);
  --shadow-lg: 0 4px 12px rgba(15,23,42,.08), 0 12px 48px rgba(15,23,42,.10);

  --font:   'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono:   ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:     #020617;
    --card:   #0F172A;
    --text:   #F1F5F9;
    --muted:  #94A3B8;
    --border: #1E293B;
    --green-bg: rgba(20,184,107,.12);
    --red-bg:   rgba(220,38,38,.12);
    --amber-bg: rgba(245,158,11,.12);
  }
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Header ----- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.topbar .left { display: flex; align-items: center; gap: 12px; }
.logo { width: 38px; height: 38px; object-fit: contain; }
.brand h1 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand p  { margin: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.topbar nav { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-weight: 500; transition: color .15s; }
.topbar nav a:hover { color: var(--text); }

/* ----- Main layout ----- */
main {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 28px auto 60px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.card h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
  letter-spacing: -.02em;
}
.lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

/* ----- Trust badges ----- */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--navy-100);
  color: var(--navy-700);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
}
.trust-badge svg { width: 14px; height: 14px; color: var(--green); }
@media (prefers-color-scheme: dark) {
  .trust-badge { background: var(--navy-800); color: var(--navy-300); }
}

/* ----- Counter ----- */
.counter {
  font-size: 13px;
  color: var(--muted);
  margin: -8px 0 18px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.counter strong {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.counter .pulse-dot {
  width: 8px; height: 8px;
  background: var(--green); border-radius: 50%;
  animation: pulse-dot 1.6s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20,184,107,.4); }
  50%      { box-shadow: 0 0 0 6px rgba(20,184,107,0); }
}

/* ----- Dropzone ----- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 16px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
  background: var(--navy-50);
  outline: none;
}
@media (prefers-color-scheme: dark) { .dropzone { background: var(--navy-800); } }
.dropzone:hover, .dropzone:focus-visible {
  border-color: var(--brand);
  background: rgba(3,105,161,.04);
}
.dropzone:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.dropzone.dragover {
  border-color: var(--brand);
  background: rgba(3,105,161,.08);
  transform: scale(1.005);
}
.dropzone .ico {
  width: 40px; height: 40px;
  color: var(--brand);
  margin-bottom: 14px;
}
.dz-title { margin: 0 0 4px; font-weight: 700; font-size: 16px; }
.dz-sub { margin: 0; color: var(--muted); font-size: 13px; }
.dz-sub .link { color: var(--brand); text-decoration: none; font-weight: 600; }

/* ----- Preview ----- */
.preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--navy-50);
}
@media (prefers-color-scheme: dark) { .preview { background: var(--navy-800); } }
.thumb {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  background: var(--navy-200);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--brand);
  overflow: hidden; flex: 0 0 56px;
  font-size: 12px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.fileinfo { flex: 1; min-width: 0; }
.fname { margin: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.fsize { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.btn-clear {
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  flex: 0 0 36px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.btn-clear:hover { background: var(--border); color: var(--text); }

/* ----- Buttons ----- */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, transform .05s, box-shadow .15s;
  text-decoration: none;
  width: 100%;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 6px rgba(3,105,161,.25);
}
.btn-primary:hover:not(:disabled) {
  background: var(--brand-dark);
  box-shadow: 0 4px 12px rgba(3,105,161,.35);
}
.btn-primary:active:not(:disabled) { transform: scale(.99); }
.btn-primary:disabled {
  background: var(--navy-300);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--navy-50); }
@media (prefers-color-scheme: dark) {
  .btn-secondary:hover { background: var(--navy-800); }
}
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn-secondary { margin-top: 0; }

/* ----- Loader ----- */
.loader-card .lead { margin-bottom: 18px; }
.loader-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--navy-50);
}
@media (prefers-color-scheme: dark) { .loader-preview { background: var(--navy-800); } }
.loader-preview .thumb { width: 44px; height: 44px; flex: 0 0 44px; }
.loader-preview .fname { font-size: 13px; }

.stepper {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: step;
}
.stepper li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--navy-50);
  transition: color .2s, background .2s;
  font-weight: 500;
}
@media (prefers-color-scheme: dark) { .stepper li { background: var(--navy-800); } }
.stepper li::before {
  counter-increment: step;
  content: counter(step);
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--muted);
  flex: 0 0 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  transition: all .2s;
}
.stepper li.active {
  color: var(--text);
  background: rgba(3,105,161,.06);
  font-weight: 600;
}
.stepper li.active::before {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(3,105,161,.18);
  animation: pulse-step 1.6s infinite;
}
.stepper li.done { color: var(--text); }
.stepper li.done::before {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  content: "✓";
}
@keyframes pulse-step {
  0%, 100% { box-shadow: 0 0 0 4px rgba(3,105,161,.18); }
  50%      { box-shadow: 0 0 0 8px rgba(3,105,161,.06); }
}

.extracted {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(20,184,107,.08);
  border: 1px solid rgba(20,184,107,.2);
  font-size: 13px;
  display: none;
  animation: fade-in .3s ease-out;
}
.extracted.visible { display: block; }
.extracted strong { color: var(--green-dark); font-weight: 700; }
.extracted .row { font-family: var(--mono); font-size: 13px; margin-top: 4px; }

.tip-rotator {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--brand);
  background: rgba(3,105,161,.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  color: var(--muted);
  min-height: 44px;
  display: flex; align-items: center;
  transition: opacity .35s;
}
.tip-rotator b { color: var(--text); }

.hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ----- Result ----- */
.verdict {
  text-align: center;
  padding: 14px 6px 4px;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px; height: 96px;
  border-radius: 50%;
  font-size: 48px;
  font-weight: 700;
  background: var(--navy-100);
  color: var(--muted);
  margin-bottom: 16px;
  transition: transform .25s;
}
.badge.ok    { background: var(--green-bg); color: var(--green); }
.badge.ko    { background: var(--red-bg);   color: var(--red); }
.badge.warn  { background: var(--amber-bg); color: var(--amber); }
.badge.pop   { animation: pop .5s cubic-bezier(.2,.9,.3,1.4); }
@keyframes pop {
  0%   { transform: scale(.5) rotate(-8deg); opacity: 0; }
  60%  { transform: scale(1.08) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.verdict h2 { margin: 4px 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.verdict p { margin: 0; color: var(--muted); font-size: 15px; }

.details {
  margin: 24px 0 6px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 0 16px;
}
.details dt {
  color: var(--muted);
  font-size: 13px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.details dd {
  margin: 0;
  font-weight: 700;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 14px;
}
.details dd.muted { font-family: var(--font); font-weight: 600; }
.details > :last-child, .details > :nth-last-child(2) { border-bottom: none; }

.warning-banner {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--amber-bg);
  border-left: 3px solid var(--amber);
  font-size: 13px;
  color: var(--text);
}

/* ----- How it works ----- */
.how-section h3 { margin: 0 0 16px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.step-item {
  text-align: center;
  padding: 14px 8px;
}
.step-item .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  margin-bottom: 8px;
  font-size: 14px;
}
.step-item h4 { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.step-item p { margin: 0; font-size: 12px; color: var(--muted); }
@media (max-width: 520px) {
  .steps-row { grid-template-columns: 1fr; gap: 10px; }
  .step-item { text-align: left; display: flex; align-items: center; gap: 12px; padding: 8px; }
  .step-item .num { margin-bottom: 0; flex: 0 0 32px; }
  .step-item div { flex: 1; }
}

/* ----- Pricing teaser ----- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.tier {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  background: var(--card);
}
.tier.featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(3,105,161,.12);
}
.tier .label { font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .08em; }
.tier .price { font-size: 22px; font-weight: 800; margin: 6px 0 2px; letter-spacing: -.02em; }
.tier .price small { font-size: 12px; color: var(--muted); font-weight: 500; }
.tier ul { padding: 0; margin: 10px 0 0; list-style: none; font-size: 13px; color: var(--muted); }
.tier ul li { padding: 4px 0; }
.tier ul li::before { content: "✓ "; color: var(--green); font-weight: 700; }
@media (max-width: 600px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ----- Footer ----- */
footer {
  text-align: center;
  padding: 28px 16px 24px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
footer nav {
  display: flex; justify-content: center; gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ----- Cookie banner ----- */
.cookie-banner {
  position: fixed;
  bottom: 14px; left: 14px; right: 14px;
  max-width: 680px;
  margin: 0 auto;
  padding: 14px 16px;
  background: var(--navy-900);
  color: #F1F5F9;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 40;
  transform: translateY(120%);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.1);
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner p { margin: 0; flex: 1; }
.cookie-banner a { color: #93C5FD; }
.cookie-banner button {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font);
}

/* ----- Confetti canvas ----- */
.confetti-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
}

/* ----- Toast ----- */
.toast {
  position: fixed; top: 80px; left: 50%; transform: translate(-50%, -20px);
  background: var(--navy-900); color: #F1F5F9;
  padding: 10px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  z-index: 60; opacity: 0;
  display: flex; align-items: center; gap: 8px;
  transition: opacity .25s, transform .25s;
  box-shadow: var(--shadow-lg);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 16px; height: 16px; color: var(--green); }

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ----- Mobile sticky CTA + adjustments ----- */
@media (max-width: 520px) {
  main { margin: 16px auto 80px; }
  .card { padding: 22px 18px; }
  .dropzone { padding: 28px 12px; }
  .details { grid-template-columns: 1fr; gap: 0; }
  .details dd { border-bottom: 1px solid var(--border); padding-bottom: 10px; }
  .details dt { border-bottom: none; padding-bottom: 0; padding-top: 8px; }
  .btn-row { flex-direction: column; }
  .topbar nav { display: none; }
}

/* ----- Utilities ----- */
.fade-in { animation: fade-in .3s ease-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
