/* Konvizi — feuille de style unique (mobile d'abord). */
:root {
  --blue: #628eee;
  --indigo: #484cbd;
  --turquoise: #0ca9c3;
  --yellow: #f0b840;
  --pink: #e9416c;
  --white: #fff;
  --ink: #101014;
  --muted: #4a4d5e;
  --tint: #eef1ff;
  --display: "Chango", "Baloo 2", "Arial Black", system-ui, sans-serif;
  --body: "DM Sans", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 28px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--indigo);
  color: var(--white);
  font: 400 1rem/1.6 var(--body);
  overflow-x: hidden;
  overflow-x: clip;
}

img, svg { max-width: 100%; display: block; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--yellow);
}

.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 16px; }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 10;
  padding: 10px 18px; border-radius: 999px;
  background: var(--white); color: var(--ink); font-weight: 700;
}
.skip:focus { top: 12px; }

/* ---------- En-tête + héros (fond bleu, coins bas arrondis) ---------- */
.top {
  background: var(--blue);
  border-radius: 0 0 44px 44px;
  padding-bottom: 44px;
}
.top--full { min-height: 72vh; }

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 400 1.5rem/1 var(--display); color: var(--white); text-decoration: none;
}
.brand img { width: 44px; height: 44px; }

.lang { position: relative; }
.lang summary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: var(--white); color: var(--ink); font-weight: 700;
  cursor: pointer; list-style: none; user-select: none;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after {
  content: ""; width: 8px; height: 8px; margin-top: -4px;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
}
.lang[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 5;
  min-width: 190px; padding: 8px;
  background: var(--white); border-radius: 20px;
  box-shadow: 0 12px 32px rgb(16 16 20 / 0.28);
}
.lang a {
  display: block; padding: 10px 14px; border-radius: 12px;
  color: var(--ink); font-weight: 700; text-decoration: none;
}
.lang a:hover { background: var(--tint); }
.lang a[aria-current] { background: var(--yellow); }

.hero { text-align: center; padding-top: 20px; }
.hero--home { padding-block: 28px 12px; }

h1 {
  font: 400 clamp(2rem, 8.2vw, 4.6rem)/1.06 var(--display);
  color: var(--white);
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: break-word;
  margin-top: 18px;
}
:lang(hi) h1 { font-size: clamp(1.7rem, 6vw, 3.4rem); line-height: 1.25; }

.hero__sub {
  max-width: 44rem; margin: 18px auto 0;
  color: var(--ink); font-size: 1.125rem; font-weight: 700;
  text-wrap: pretty;
}

.pills { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 4px; }
.pill {
  display: inline-block; padding: 9px 22px;
  border-radius: 50%;
  color: var(--ink); font: 700 0.95rem/1.2 var(--body);
  white-space: nowrap;
}
.pill--yellow { background: var(--yellow); transform: rotate(-7deg); }
.pill--pink { background: var(--pink); color: var(--white); transform: rotate(5deg) translateY(6px); font-size: 1.2rem; padding: 8px 22px; }
:lang(hi) .pill--pink { font-size: 1.2rem; }

/* ---------- Cartes ---------- */
.card {
  background: var(--white); color: var(--ink);
  border-radius: var(--radius);
  padding: 22px;
}

/* ---------- Outil ---------- */
.tool {
  max-width: 760px; margin: 30px auto 0; padding: 14px;
  text-align: left;
  box-shadow: 8px 8px 0 var(--indigo);
}
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 28px 16px;
  border: 3px dashed var(--indigo); border-radius: 20px;
  background: var(--tint);
  text-align: center; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.drop.is-over { background: #fdf0cf; border-color: var(--pink); border-style: solid; }
.drop__icon { width: 64px; height: 64px; }
.drop__title { font: 400 1.2rem/1.25 var(--display); color: var(--indigo); text-wrap: balance; }
:lang(hi) .drop__title { line-height: 1.5; }
.drop__or { color: var(--muted); font-size: 0.95rem; }
.drop__hint { margin-top: 6px; color: var(--muted); font-size: 0.9rem; text-align: center; text-wrap: balance; }
.drop__lock { display: inline-block; vertical-align: -2px; }
.drop__lock svg { display: block; width: 16px; height: 16px; fill: var(--turquoise); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none;
  transition: transform 0.12s, filter 0.12s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }
.btn--primary { background: var(--indigo); color: var(--white); }
.btn--accent { background: var(--yellow); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--small { min-height: 38px; padding: 6px 16px; font-size: 0.92rem; }
.btn--icon { min-height: 38px; width: 38px; padding: 0; background: var(--tint); color: var(--ink); font-size: 1rem; }

.files { margin-top: 4px; max-height: 26rem; overflow-y: auto; }
.files:empty { display: none; }
.file {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px;
  padding: 12px 6px; border-bottom: 1px solid #e3e6f3;
}
.file__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__meta { grid-column: 1; color: var(--muted); font-size: 0.88rem; }
.file__meta.is-error { color: #b3123f; font-weight: 700; }
.file__side { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--tint); color: var(--ink); font-size: 0.82rem; font-weight: 700; white-space: nowrap;
}
.badge--working { background: #fdf0cf; }
.badge--done { background: #d3f3f8; }
.badge--error { background: #fde0e7; color: #8f0e32; }
.badge--working::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px;
  border: 2px solid var(--ink); border-right-color: transparent; border-radius: 50%;
  vertical-align: -1px; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pages { grid-column: 1 / -1; margin-top: 6px; padding-left: 12px; border-left: 3px solid var(--tint); }
.pages li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 0.92rem; }
.pages span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pages small { color: var(--muted); }

/* Réglages des outils (mot de passe, compression, pages…) */
.options { display: grid; gap: 6px; padding: 14px 6px 0; }
.options label, .options legend { font-weight: 700; }
.options input[type="password"], .options input[type="text"], .options input[type="number"], .options select {
  width: 100%; max-width: 22rem; min-height: 44px; padding: 8px 14px;
  border: 2px solid var(--ink); border-radius: 14px; background: var(--white); color: var(--ink); font: inherit;
}
.options select { appearance: auto; }
.options .options__check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 0.92rem; }
.options__check input { width: 18px; height: 18px; margin: 0; accent-color: var(--indigo); }
.options__hint { color: var(--muted); font-size: 0.9rem; }
.options__choice { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; border: 0; }
.options__choice legend { width: 100%; margin-bottom: 6px; padding: 0; }
.options__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.options__row[hidden] { display: none; }
.options__row span { display: grid; gap: 6px; }
.options__row input[type="number"] { width: 9rem; }
.options audio { width: 100%; max-width: 32rem; margin-bottom: 6px; }
.options__row--cut input[type="text"] { width: 9rem; }
.options__row--cut span { grid-template-columns: auto auto; align-items: center; }
.options__row--cut label { grid-column: 1 / -1; }

/* Texte reconnu (OCR) */
.ocr-text {
  grid-column: 1 / -1; width: 100%; min-height: 8rem; margin-top: 8px; padding: 10px 12px; resize: vertical;
  border: 2px solid var(--ink); border-radius: 14px; background: var(--white); color: var(--ink); font: inherit; font-size: 0.92rem;
}

/* Pages d'un PDF (Pivoter, Supprimer des pages, Organiser) */
.org {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px;
  margin: 0; padding: 10px; border-radius: 18px; background: #dfe3f5; list-style: none;
}
.org__page { display: grid; gap: 6px; justify-items: center; padding: 8px; border-radius: 16px; background: var(--white); }
.org__thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 1; overflow: hidden; }
.org__thumb canvas { box-shadow: 0 1px 5px rgba(16, 16, 20, 0.3); transition: transform 0.2s; }
.org__num { font-size: 0.88rem; font-weight: 700; }
.org__tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.org__tools .btn--icon { min-height: 32px; width: 32px; font-size: 0.9rem; }
.org__page.is-deleted .org__thumb, .org__page.is-deleted .org__num { opacity: 0.3; }
.org__page.is-deleted .org__num { text-decoration: line-through; }
.org__page.is-deleted [data-act="delete"] { background: var(--yellow); }

/* Éditeur (Modifier / Signer un PDF) */
.editor__bar {
  position: sticky; top: 8px; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px; border-radius: 22px; background: var(--white); box-shadow: 0 2px 10px rgba(16, 16, 20, 0.18);
}
.editor__bar .btn { flex: 1 1 auto; padding-inline: 10px; font-size: 0.82rem; }
.editor__bar #ed-save { flex-basis: 100%; }
@media (min-width: 640px) {
  .editor__bar .btn { flex: none; padding-inline: 16px; font-size: 0.92rem; }
  .editor__bar #ed-save { flex-basis: auto; margin-left: auto; }
}
.editor__hint { padding: 8px 6px; color: var(--muted); font-size: 0.9rem; }
.editor__pages { display: grid; gap: 14px; padding: 12px; border-radius: 18px; background: #dfe3f5; }
.editor__page { position: relative; --s: 1; background: #fff; box-shadow: 0 1px 5px rgba(16, 16, 20, 0.3); }
.editor__page canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ed-item { position: absolute; z-index: 1; outline: 2px dashed transparent; outline-offset: 2px; cursor: move; touch-action: none; }
.ed-item:hover, .ed-item.is-selected { outline-color: var(--indigo); }
.ed-item.is-selected { z-index: 2; }
.ed-item.is-moving { opacity: 0.8; }
.ed-item__text {
  min-width: 1ch; color: #000; font-family: "KvPdf", sans-serif; font-weight: 400; line-height: 1.2;
  white-space: pre; cursor: text; outline: none; box-shadow: none;
}
.ed-item--sign img { width: 100%; pointer-events: none; user-select: none; -webkit-user-select: none; }
.ed-item__tools { position: absolute; left: 0; bottom: 100%; display: none; gap: 4px; padding-bottom: 8px; }
.ed-item.is-selected > .ed-item__tools { display: flex; }
.ed-item__tools .btn--icon {
  min-height: 34px; width: 34px; background: var(--white); font-size: 0.85rem; box-shadow: 0 1px 5px rgba(16, 16, 20, 0.35);
}
.ed-item__grip {
  position: absolute; right: -11px; bottom: -11px; display: none; width: 22px; height: 22px;
  border: 3px solid var(--white); border-radius: 50%; background: var(--indigo); cursor: nwse-resize; touch-action: none;
}
.ed-item.is-selected > .ed-item__grip { display: block; }

.signpad { width: min(92vw, 560px); padding: 20px; border: 0; border-radius: 24px; color: var(--ink); }
.signpad::backdrop { background: rgba(16, 16, 20, 0.6); }
.signpad__title { font: 400 1.15rem/1.3 var(--display); color: var(--indigo); }
.signpad__canvas {
  display: block; width: 100%; aspect-ratio: 5 / 2; margin-top: 12px;
  border: 2px dashed var(--indigo); border-radius: 14px; background: #fff; cursor: crosshair; touch-action: none;
}
.signpad__hint { margin-top: 6px; color: var(--muted); font-size: 0.9rem; }
.signpad__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.tool__actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 6px 6px; }
.tool__status { padding: 0 6px; color: var(--muted); font-weight: 700; }
.tool__status:empty { display: none; }
.tool__status.is-error { color: #b3123f; }
.tool__result {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin: 10px 0 0; padding: 16px; border-radius: 20px; background: #d3f3f8;
}
.tool__result strong { display: block; font: 400 1.05rem/1.3 var(--display); }
.tool__result small { color: var(--muted); }
.tool__noscript { margin: 12px 6px 4px; color: #b3123f; font-weight: 700; }

/* ---------- Bandeau défilant ---------- */
.marquee-clip { overflow: hidden; padding: 26px 0 14px; }
.marquee {
  margin: 0 -3%; padding: 12px 0;
  background: var(--yellow); color: var(--ink);
  transform: rotate(-1.5deg);
  overflow: hidden;
}
.marquee__track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee__group { display: flex; align-items: center; flex-shrink: 0; }
.marquee span { padding: 0 14px; font: 400 1.05rem/1.4 var(--display); text-transform: uppercase; white-space: nowrap; }
.marquee .star { color: var(--pink); padding: 0; }
@keyframes marquee { to { transform: translateX(-33.3333%); } }

/* ---------- Sections ---------- */
.section { padding-top: 52px; }
h2 {
  font: 400 clamp(1.45rem, 4.6vw, 2.5rem)/1.15 var(--display);
  text-wrap: balance;
}
:lang(hi) h2 { line-height: 1.4; }
.section > h2 { margin-bottom: 22px; }
h3 { font-size: 1.1rem; line-height: 1.3; }

.steps, .features, .formats { display: grid; gap: 16px; }
.step__n {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 12px;
  border-radius: 50%; font: 400 1.3rem/1 var(--display); color: var(--ink);
}
.step:nth-child(1) .step__n { background: var(--yellow); }
.step:nth-child(2) .step__n { background: var(--pink); color: var(--white); }
.step:nth-child(3) .step__n { background: var(--turquoise); }
.step h3, .feature h3 { margin-bottom: 6px; }
.step p, .feature p { color: var(--muted); }

.features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature { padding: 18px; }
.feature__icon {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 12px;
  border-radius: 16px; transform: rotate(-6deg);
}
.feature__icon svg { width: 26px; height: 26px; fill: var(--ink); }
.feature--1 .feature__icon { background: var(--turquoise); }
.feature--2 .feature__icon { background: var(--yellow); }
.feature--3 .feature__icon { background: var(--blue); }
.feature--4 .feature__icon { background: var(--pink); }
.feature--4 .feature__icon svg { fill: var(--white); }
.feature p { font-size: 0.95rem; }

.prose h2 { font-size: clamp(1.25rem, 3.4vw, 1.7rem); color: var(--indigo); margin-bottom: 12px; }
.prose p + p { margin-top: 10px; }
.prose--wide { padding: 26px; }

.faq { display: grid; gap: 12px; }
.faq details { padding: 0; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 22px; font-weight: 700; font-size: 1.05rem; cursor: pointer; list-style: none;
  border-radius: var(--radius);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: var(--yellow); font: 700 1.3rem/1 var(--body);
}
.faq details[open] summary::after { content: "–"; background: var(--pink); color: var(--white); }
.faq p { padding: 0 22px 20px; color: var(--muted); }

.links__group + .links__group { margin-top: 22px; }
.links__group h3 { margin-bottom: 12px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.chips, .langs { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  background: var(--white); color: var(--ink); font-weight: 700; text-decoration: none;
  transition: transform 0.12s, background-color 0.12s;
}
.chip:hover { background: var(--yellow); transform: translateY(-2px) rotate(-2deg); }
.chip[aria-current] { background: var(--yellow); }
.langs { justify-content: center; margin-top: 30px; }
.chip--big { padding: 16px 30px; font-size: 1.25rem; }
.notfound { margin-top: 24px; display: grid; gap: 10px; color: var(--ink); font-weight: 700; }

/* ---------- Pied de page ---------- */
.footer { padding-block: 56px 40px; display: grid; gap: 10px; font-size: 0.95rem; }
.footer__privacy { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; font-size: 1.05rem; max-width: 46rem; }
.footer__lock { flex: none; margin-top: 2px; }
.footer__lock svg { width: 22px; height: 22px; fill: var(--yellow); }
.footer a { font-weight: 700; }
.footer__small { opacity: 0.85; font-size: 0.85rem; }

/* ---------- En bref, avantages, comparatif ---------- */
.summary__lead { font-size: 1.1rem; font-weight: 700; text-wrap: pretty; }
.facts { margin-top: 16px; }
.facts > div { display: grid; gap: 2px 18px; padding: 10px 0; border-top: 2px solid var(--tint); }
.facts dt { font-weight: 700; color: var(--indigo); }
.facts dd { margin: 0; color: var(--muted); }
.benefit p { color: var(--muted); }
.compare { padding: 8px; overflow-x: auto; }
.compare table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 12px 10px; border-top: 2px solid var(--tint); }
.compare thead th { border-top: 0; font-size: 1.02rem; }
.compare thead th:nth-child(2), .compare td { font-weight: 700; }
.compare thead th:nth-child(2), .compare td:nth-of-type(1) { background: var(--tint); }
.compare td:nth-of-type(2) { font-weight: 400; color: var(--muted); }
.compare tbody th { font-weight: 700; color: var(--indigo); }
.about-link { margin-top: 14px; }
.about-link a { font-weight: 700; color: var(--indigo); }

/* ---------- Écrans plus larges ---------- */
@media (min-width: 720px) {
  .wrap { padding-inline: 28px; }
  .top { border-radius: 0 0 88px 88px; padding-bottom: 68px; }
  .brand { font-size: 1.8rem; }
  .hero { padding-top: 34px; }
  .hero--home { padding-block: 48px 24px; }
  .hero__sub { font-size: 1.25rem; }
  .pill { font-size: 1.05rem; padding: 11px 28px; }
  .tool { padding: 18px; margin-top: 38px; box-shadow: 12px 12px 0 var(--indigo); }
  .drop { padding: 40px 24px; }
  .drop__title { font-size: 1.4rem; }
  .card { padding: 28px; }
  .tool.card { padding: 18px; }
  .faq details { padding: 0; }
  .marquee span { font-size: 1.3rem; }
  .section { padding-top: 76px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .formats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .feature { padding: 22px; }
  .facts > div { grid-template-columns: 13rem 1fr; }
  .compare { padding: 14px 18px; }
  .compare th, .compare td { padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .badge--working::before { animation: none; }
  .org__thumb canvas { transition: none; }
  .btn, .chip, .drop { transition: none; }
  .chip:hover, .btn:hover { transform: none; }
}

/* Page « Konvizi pour les assistants IA » : blocs de configuration à copier, exemples. */
.prose h3 { font-size: 1.1rem; color: var(--indigo); margin: 18px 0 4px; }
.prose pre {
  margin: 10px 0 0; padding: 14px 16px; overflow-x: auto; border-radius: 14px;
  background: var(--ink); color: var(--white); font: 0.9rem/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.prose pre code { white-space: pre; }
.examples { margin: 0; padding-left: 1.2em; }
.examples li + li { margin-top: 6px; }
