/* TransfoPDF — feuille de style unique. Thème clair/sombre selon l'appareil du visiteur. */
:root {
  --bg: #F3F5F8;
  --surface: #FFFFFF;
  --ink: #12202E;
  --muted: #55657A;
  --line: #D6DDE5;
  --brand: #17304F;
  --brand-ink: #FFFFFF;
  --focus: #2B6BE4;
  --drop: #E8EEF8;
  --go: #167A47;
  --go-ink: #FFFFFF;
  --bad: #B3261E;
  --shadow: 0 1px 2px rgba(18, 32, 46, .06), 0 8px 24px rgba(18, 32, 46, .06);
  --f-pdf: #B8322A; --f-pdf-bg: #FBE6E4;
  --f-doc: #1F5FBF; --f-doc-bg: #E2ECFA;
  --f-xls: #1D7A46; --f-xls-bg: #DEF2E6;
  --f-img: #7A4CB0; --f-img-bg: #EDE5F7;
  --f-txt: #4A5866; --f-txt-bg: #E4E8EC;
  --f-data: #0F766E; --f-data-bg: #D9F0ED;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F141A; --surface: #171E26; --ink: #E6EBF0; --muted: #98A6B5; --line: #2A3440;
    --brand: #CFE0FA; --brand-ink: #0F1A2A; --focus: #7AA7F5; --drop: #1B2736;
    --go: #3DBB7D; --go-ink: #07230F; --bad: #FF8F86;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --f-pdf: #FF8F86; --f-pdf-bg: #3A1D1B;
    --f-doc: #8DB4F2; --f-doc-bg: #1B2B44;
    --f-xls: #6FD39A; --f-xls-bg: #163425;
    --f-img: #C9A6F0; --f-img-bg: #2E2140;
    --f-txt: #A9B6C3; --f-txt-bg: #252E37;
    --f-data: #5CD6C8; --f-data-bg: #14302D;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.55 var(--sans);
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
}
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 62rem; margin: 0 auto; padding-left: max(16px, 4vw); padding-right: max(16px, 4vw); }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--brand-ink); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* En-tête */
.top { padding-block: 1rem; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.logo svg { width: 2rem; height: 2rem; }
.nav { display: flex; gap: .25rem 1.25rem; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; padding: .4rem 0; }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 760px) { .nav { display: none; } }

/* Pastilles de format : PDF rouge, Word bleu, Excel vert, comme les icônes de fichiers */
.chip {
  display: inline-block; min-width: 3.3rem; text-align: center; white-space: nowrap;
  font: 600 .72rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase;
  padding: .45rem .55rem; border-radius: 5px; background: var(--c-bg, var(--f-txt-bg)); color: var(--c, var(--f-txt));
}
.chip[data-fam="pdf"] { --c: var(--f-pdf); --c-bg: var(--f-pdf-bg); }
.chip[data-fam="doc"] { --c: var(--f-doc); --c-bg: var(--f-doc-bg); }
.chip[data-fam="xls"] { --c: var(--f-xls); --c-bg: var(--f-xls-bg); }
.chip[data-fam="img"] { --c: var(--f-img); --c-bg: var(--f-img-bg); }
.chip[data-fam="txt"] { --c: var(--f-txt); --c-bg: var(--f-txt-bg); }
.chip[data-fam="data"] { --c: var(--f-data); --c-bg: var(--f-data-bg); }

/* Haut de page + outil */
.hero { padding-block: 1.5rem 3rem; }
.hero h1 { margin: 0 0 .75rem; font-size: clamp(2rem, 6vw, 3.1rem); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; max-width: 40rem; }
.lead { margin: 0 0 1.75rem; color: var(--muted); font-size: 1.12rem; max-width: 38rem; }
.trust { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: 1.1rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .95rem; }
.trust li::before { content: "✓"; color: var(--go); font-weight: 700; margin-right: .4rem; }

.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .9rem;
  padding: 2.6rem 1.25rem; background: var(--surface); border: 2px dashed var(--line); border-radius: 16px;
  box-shadow: var(--shadow); cursor: pointer; transition: background .15s, border-color .15s;
}
.drop:hover, .drop.over { background: var(--drop); border-color: var(--focus); }
.drop:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-btn {
  display: inline-flex; align-items: center; gap: .6rem; background: var(--brand); color: var(--brand-ink);
  font-size: 1.2rem; font-weight: 700; padding: 1rem 1.8rem; border-radius: 12px; pointer-events: none;
}
.drop-btn svg { width: 1.4rem; height: 1.4rem; }
.drop-hint { color: var(--muted); }
.formats { color: var(--muted); font-size: .88rem; }

.files { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.files:empty { display: none; }
.file { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.25rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .9rem; }
.file-head { display: flex; align-items: center; gap: .85rem; }
.file-meta { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-size { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.remove { flex: none; width: 2.75rem; height: 2.75rem; font-size: 1.5rem; line-height: 1; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.remove:hover { color: var(--ink); border-color: var(--muted); }
.note { margin: 0; padding: .7rem .9rem; border-radius: 10px; background: var(--drop); font-size: .93rem; }
.choose { display: flex; flex-direction: column; gap: .5rem; }
.choose-label { font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill {
  font: inherit; font-weight: 600; min-height: 2.9rem; padding: .55rem 1.1rem; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
}
.pill:hover:not(:disabled) { border-color: var(--brand); }
.pill[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pill:disabled { cursor: progress; opacity: .6; }
.result { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; min-height: 0; }
.status { margin: 0; color: var(--muted); display: flex; align-items: center; gap: .6rem; }
.status:empty { display: none; }
.file[data-state="done"] .status { color: var(--go); font-weight: 600; }
.file[data-state="error"] .status { color: var(--bad); font-weight: 500; }
.spin { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.go {
  display: inline-flex; flex-direction: column; align-items: flex-start; text-decoration: none; background: var(--go); color: var(--go-ink);
  font-weight: 700; font-size: 1.1rem; padding: .8rem 1.5rem; border-radius: 12px; line-height: 1.25;
}
.go small { font-weight: 500; font-size: .82rem; opacity: .92; overflow-wrap: anywhere; }
.go:hover { filter: brightness(1.08); }
.go[hidden], .toolbar[hidden] { display: none; }
.toolbar { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.btn { font: inherit; font-weight: 600; min-height: 2.9rem; padding: .6rem 1.2rem; border-radius: 10px; border: 2px solid var(--brand); background: transparent; color: var(--ink); cursor: pointer; }
.btn:hover { background: var(--drop); }

/* Sections */
section.block { padding-block: 2.75rem; border-top: 1px solid var(--line); }
section.block h2 { margin: 0 0 1.25rem; font-size: clamp(1.4rem, 3.5vw, 1.8rem); letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.25rem; display: flex; flex-direction: column; gap: .35rem; }
.steps li::before { content: counter(s); width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; }
.steps b { font-size: 1.08rem; }
.steps span { color: var(--muted); }
.groups { display: grid; gap: 1.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.group h3 { margin: 0 0 .6rem; font-size: 1rem; display: flex; align-items: center; gap: .6rem; }
.group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.group a { display: block; padding: .65rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; }
.group a:hover { color: var(--focus); }
.two { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.two p { margin: 0 0 .75rem; color: var(--muted); }
.two h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .95rem 1.2rem; }
.faq details + details { margin-top: .6rem; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin: .7rem 0 0; color: var(--muted); max-width: 46rem; }

/* Pied de page */
.foot { border-top: 1px solid var(--line); padding-block: 2rem 3rem; color: var(--muted); font-size: .93rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }

/* Pages de texte (mentions légales, etc.) */
.doc { max-width: 46rem; padding-block: 1.5rem 3rem; }
.doc h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 1rem; }
.doc h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
.doc p, .doc li { color: var(--ink); }
.todo { background: #FFE9A8; color: #3A2A00; padding: 0 .3rem; border-radius: 3px; font-weight: 600; }
.lead-link { display: inline-block; margin-top: 1rem; font-weight: 600; }

@media (max-width: 560px) {
  .drop { padding: 2rem 1rem; }
  .drop-btn { width: 100%; justify-content: center; }
  .go { width: 100%; }
  .file { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .drop { transition: none; } .spin { animation-duration: 2.4s; } }

.pairline { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; color: var(--muted); font-weight: 600; }
.related { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.related a { display: inline-block; padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 500; }
.related a:hover { border-color: var(--brand); }
.prose { max-width: 44rem; color: var(--muted); margin: 0; }
.prose + .prose { margin-top: .75rem; }

.bullets { margin: 0; padding-left: 1.25rem; color: var(--muted); display: grid; gap: .55rem; max-width: 46rem; }
.bullets li::marker { color: var(--brand); }
.bullets b { color: var(--text, inherit); }
.doc h2 + p, .doc p + h2 { margin-top: .5rem; }
.doc ul { padding-left: 1.25rem; }
