/* SNT Chat · Whitepaper premium (écran + impression PDF) */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500&display=swap");

:root {
  --snt-bg: #0a0f14;
  --snt-paper: #ffffff;
  --snt-ink: #111827;
  --snt-muted: #4b5563;
  --snt-accent: #22c55e;
  --snt-accent-2: #4ade80;
  --snt-deep: #14532d;
  --snt-border: #e5e7eb;
  --snt-soft: #f0fdf4;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 11pt;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--snt-ink);
  line-height: 1.55;
  background: #e8ecef;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* ── Couverture ── */
.wp-cover {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 2.75rem 2rem;
  background: linear-gradient(155deg, #111827 0%, #0d1f17 45%, #0a0f14 100%);
  color: #f8fafc;
  page-break-after: always;
  position: relative;
  overflow: hidden;
}

.wp-cover::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  top: -120px;
  right: -140px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.28), transparent 68%);
  pointer-events: none;
}

.wp-cover::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  bottom: -80px;
  left: -100px;
  background: radial-gradient(circle, rgba(20, 83, 45, 0.45), transparent 70%);
  pointer-events: none;
}

.wp-cover__top,
.wp-cover__main,
.wp-cover__foot {
  position: relative;
  z-index: 1;
}

.wp-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.wp-brand__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  padding: 8px;
  background: linear-gradient(145deg, #34d399, #22c55e 55%, #15803d);
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.35);
}

.wp-brand__icon img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.wp-brand__text strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.wp-brand__text span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--snt-accent-2);
}

.wp-badge {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bbf7d0;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(20, 83, 45, 0.35);
}

.wp-cover h1 {
  margin: 1.25rem 0 0.5rem;
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  max-width: 14ch;
}

.wp-cover__subtitle {
  margin: 0;
  font-size: 1.05rem;
  color: #9ca3af;
  max-width: 36rem;
}

.wp-cover__meta {
  margin-top: 2.5rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: #d1d5db;
}

.wp-cover__meta dt {
  font-weight: 700;
  color: var(--snt-accent-2);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wp-cover__meta dd {
  margin: 0 0 0.75rem;
}

.wp-cover__foot {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
  font-size: 0.78rem;
  color: #6b7280;
}

/* ── Corps document ── */
.wp-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 2rem 3rem;
  background: var(--snt-paper);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.08);
}

@media screen and (min-width: 900px) {
  .wp-body {
    margin: 2rem auto 3rem;
    border-radius: 4px;
  }
}

.wp-body hr {
  display: none;
  margin: 0;
  border: 0;
  height: 0;
}

.wp-body h1 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--snt-deep);
  margin: 1.75rem 0 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 3px solid var(--snt-accent);
  page-break-after: avoid;
}

.wp-body h1:first-child {
  margin-top: 0;
}

.wp-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--snt-ink);
  margin: 1.75rem 0 0.65rem;
  page-break-after: avoid;
}

.wp-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
}

.wp-body p,
.wp-body li {
  color: var(--snt-muted);
}

.wp-body strong {
  color: var(--snt-ink);
}

.wp-body a {
  color: var(--snt-deep);
  font-weight: 600;
}

.wp-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
  page-break-inside: avoid;
}

.wp-body th,
.wp-body td {
  border: 1px solid var(--snt-border);
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.wp-body th {
  background: var(--snt-soft);
  color: var(--snt-deep);
  font-weight: 700;
}

.wp-body pre,
.wp-body code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.85em;
}

.wp-body pre {
  background: #f3f4f6;
  border: 1px solid var(--snt-border);
  border-left: 4px solid var(--snt-accent);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border-radius: 8px;
  color: var(--snt-ink);
  page-break-inside: avoid;
}

.wp-body hr {
  border: none;
  border-top: 1px solid var(--snt-border);
  margin: 2rem 0;
}

/* Signature finale */
.wp-signature {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid rgba(34, 197, 94, 0.25);
  page-break-inside: avoid;
}

.wp-signature__title {
  margin: 0 0 0.5rem;
  font-weight: 800;
  color: var(--snt-deep);
}

.wp-signature__line {
  margin: 0.35rem 0;
  font-size: 0.92rem;
  color: var(--snt-muted);
}

.wp-signature__mark {
  margin-top: 1.25rem;
  font-family: "Plus Jakarta Sans", cursive;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--snt-deep);
  letter-spacing: 0.02em;
}

/* ── Impression ── */
@page {
  size: A4;
  margin: 18mm 16mm 22mm 16mm;
}

@page :first {
  margin: 0;
}

@media print {
  html {
    font-size: 10.5pt;
  }

  body {
    background: #fff;
  }

  .wp-cover {
    min-height: auto;
    height: 297mm;
    max-height: 297mm;
    padding: 18mm 16mm;
    page-break-after: always;
  }

  .wp-body {
    max-width: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  .wp-body hr {
    display: none;
  }

  .wp-no-print {
    display: none !important;
  }

  .wp-body h1 {
    page-break-before: avoid;
    page-break-after: avoid;
  }

  .wp-body h2 {
    page-break-after: avoid;
  }

  .wp-body table,
  .wp-body pre {
    page-break-inside: avoid;
  }
}

/* Barre actions écran */
.wp-toolbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wp-toolbar a,
.wp-toolbar button {
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(20, 83, 45, 0.4);
  color: #bbf7d0;
  text-decoration: none;
  cursor: pointer;
}

.wp-toolbar a:hover,
.wp-toolbar button:hover {
  background: rgba(34, 197, 94, 0.25);
}
