/* isibuild — le bleu du logo sert à tout ce qui « entre » (déposer, lancer),
   le vert à tout ce qui « sort » (résultat, téléchargement). */

@font-face { font-family: "Poppins"; src: url("../fonts/poppins-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --blue: #1560cf;
  --blue-deep: #0d47a0;
  --green: #27ae71;
  --green-deep: #14784a;
  --ink: #0c1f3f;
  --ink-soft: #46556f;
  --paper: #ffffff;
  --mist: #eef4fc;
  --line: #d3deee;
  --danger: #b42318;
  --font: "Poppins", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 68rem;
  --hex: polygon(50% 0, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--blue-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--blue); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.25rem); }
h2 { font-size: clamp(1.45rem, 1.2rem + 1.1vw, 1.95rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 10; }
.skip:focus { top: 1rem; color: #fff; }

/* ---------- En-tête ---------- */
.top { border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-block: .9rem; }
.top__logo { display: block; line-height: 0; }
.top__logo img { height: 34px; width: auto; }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; margin-inline: -.75rem; }
.nav a { padding: .45rem .75rem; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--ink); text-decoration: none; }
.nav a:hover { background: var(--mist); color: var(--blue-deep); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }

/* ---------- Titre de page ---------- */
.head { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 3vw, 2rem); }
.head p { margin-top: 1rem; max-width: 40rem; font-size: 1.15rem; color: var(--ink-soft); }
.crumbs { font-size: .875rem; color: var(--ink-soft); margin-bottom: 1rem; }
.crumbs a { color: inherit; }

/* ---------- Établi : la zone de travail de chaque outil ---------- */
.bench { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.drop {
  position: relative; display: grid; place-items: center; text-align: center;
  min-height: clamp(15rem, 38vh, 22rem); padding: 2rem 1.25rem;
  background: var(--mist); border: 2.5px dashed var(--blue); border-radius: 28px;
  transition: background-color .15s, transform .15s;
}
.drop:hover { background: #e4eefb; }
.drop.is-over { background: #d9f2e6; border-color: var(--green-deep); border-style: solid; transform: scale(1.01); }
.drop { cursor: pointer; }
.drop__label { display: grid; justify-items: center; gap: .85rem; }
.drop__hex { width: 4.5rem; height: 4.5rem; display: grid; place-items: center; background: var(--blue); color: #fff; clip-path: var(--hex); }
.drop.is-over .drop__hex { background: var(--green-deep); }
.drop__hex svg { width: 1.9rem; height: 1.9rem; }
.drop__cta {
  display: inline-block; background: var(--blue); color: #fff; font: 700 1.15rem var(--font);
  padding: .95rem 1.9rem; border: 0; border-radius: 999px; cursor: pointer;
}
.drop:hover .drop__cta { background: var(--blue-deep); }
.drop__cta:focus-visible { outline-color: var(--ink); border-radius: 999px; }
.drop__hint { color: var(--ink-soft); font-size: .98rem; }
.private { display: flex; align-items: flex-start; gap: .55rem; margin-top: 1rem; color: var(--ink-soft); font-size: .95rem; }
.private svg { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .22rem; color: var(--green-deep); }

.alert { margin-top: 1rem; padding: .85rem 1.1rem; border-radius: 14px; background: #fdecea; color: var(--danger); font-weight: 500; }
.done { margin-top: 1rem; padding: .85rem 1.1rem; border-radius: 14px; background: #ddf4e8; color: #0d5232; font-weight: 500; }

.work { background: var(--mist); border-radius: 28px; padding: clamp(1rem, 3vw, 1.75rem); }
.opts { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; align-items: end; padding-bottom: 1.25rem; }
.field { display: grid; gap: .3rem; font-size: .9rem; font-weight: 500; color: var(--ink-soft); }
.field select {
  font: 500 1.05rem var(--font); color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  border-radius: 12px; padding: .6rem 2.4rem .6rem .9rem; min-width: 11rem; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230c1f3f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: .75rem;
}
.field select:disabled { opacity: .5; }
.field--range { min-width: min(100%, 15rem); }
.field--range span { display: flex; justify-content: space-between; }
.field--range output { color: var(--ink); }
input[type="range"] { accent-color: var(--blue); width: 100%; height: 1.6rem; }

.files { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.file { display: grid; grid-template-columns: 3.25rem 1fr auto; gap: .9rem; align-items: center; background: #fff; border-radius: 16px; padding: .55rem .7rem; }
.file__thumb, .page__thumb { background: repeating-conic-gradient(#e6ecf5 0 25%, #fff 0 50%) 0 0/14px 14px; }
.file__thumb { width: 3.25rem; height: 3.25rem; object-fit: cover; border-radius: 10px; }
.is-blank { visibility: hidden; }
.file__body { min-width: 0; display: grid; }
.file__name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file__meta { font-size: .875rem; color: var(--ink-soft); }
.file__meta strong { color: var(--green-deep); }
.file__meta--error { color: var(--danger); }
.file__meta--busy { color: var(--blue-deep); }
.file__actions { display: flex; align-items: center; gap: .4rem; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.25rem; }
.actions__main { margin-left: auto; display: flex; flex-wrap: wrap; gap: .75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer;
  font: 700 1.05rem var(--font); text-decoration: none; border: 0; border-radius: 999px; padding: .9rem 1.7rem;
  transition: background-color .15s;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn--go { background: var(--blue); color: #fff; }
.btn--go:hover:not(:disabled) { background: var(--blue-deep); color: #fff; }
.btn--get { background: var(--green); color: var(--ink); }
.btn--get:hover:not(:disabled) { background: #36c483; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 500; }
.btn--ghost:hover:not(:disabled) { background: #fff; color: var(--ink); }
.btn--small { font-size: .9rem; padding: .5rem 1rem; }
.icon-btn {
  width: 2.4rem; height: 2.4rem; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft);
  font: 500 1rem var(--font); cursor: pointer;
}
.icon-btn:hover:not(:disabled) { background: var(--mist); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* Image en PDF : vignettes ordonnées */
.pages { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.page { position: relative; background: #fff; border-radius: 16px; padding: .6rem; display: grid; gap: .4rem; cursor: grab; }
.page__thumb { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; border-radius: 8px; background-color: #fff; }
.page__num {
  position: absolute; top: .25rem; left: .25rem; width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-weight: 700; font-size: .85rem; clip-path: var(--hex);
}
.page__name { font-size: .8rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page__tools { display: flex; justify-content: space-between; }
.page__tools .icon-btn { width: 2.2rem; height: 2.2rem; }
.count { margin-top: .9rem; font-size: .9rem; color: var(--ink-soft); }

/* Suppression d'arrière-plan : avant / après */
.stage { background: var(--mist); border-radius: 28px; padding: clamp(1rem, 3vw, 1.75rem); }
.compare { --cut: 50%; --bg: transparent; position: relative; width: fit-content; max-width: 100%; margin-inline: auto; border-radius: 14px; overflow: hidden; background: var(--bg); line-height: 0; }
.compare.is-checker { background: repeating-conic-gradient(#dfe7f2 0 25%, #fff 0 50%) 0 0/22px 22px; }
.compare img { display: block; max-width: 100%; max-height: 52vh; width: auto; height: auto; }
.compare #before { position: absolute; inset: 0; width: 100%; height: 100%; clip-path: inset(0 calc(100% - var(--cut)) 0 0); }
.compare::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--cut); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(12, 31, 63, .35); pointer-events: none; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }
.compare.is-loading #before { position: static; clip-path: none; width: auto; height: auto; opacity: .55; }
.compare.is-loading #after, .compare.is-loading input, .compare.is-loading::after { display: none; }
.progress { margin-top: 1.25rem; display: grid; gap: .5rem; justify-items: center; text-align: center; font-weight: 500; }
.progress progress { width: min(100%, 26rem); height: .7rem; accent-color: var(--blue); }
.swatches { border: 0; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; }
.swatches legend { float: left; margin-right: 1.25rem; padding: 0; font-size: .9rem; font-weight: 500; color: var(--ink-soft); }
.swatches label { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.swatches input[type="radio"] { accent-color: var(--blue); width: 1.1rem; height: 1.1rem; }
.swatches input[type="color"] { width: 2.2rem; height: 2.2rem; padding: 0; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }

/* ---------- Accueil ---------- */
.choose { background: var(--mist); border-radius: 28px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.choose p { font-weight: 500; font-size: 1.15rem; }
.choose__list { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue-deep); text-decoration: underline; cursor: pointer; }

.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.tile { display: flex; flex-direction: column; gap: .6rem; min-height: 12.5rem; padding: 1.6rem; border-radius: 28px; text-decoration: none; color: #fff; }
.tile h3 { font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.15; }
.tile p { font-size: 1rem; line-height: 1.5; opacity: .92; }
.tile__go { margin-top: auto; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
.tile--blue { background: var(--blue); }
.tile--green { background: var(--green); color: var(--ink); }
.tile--ink { background: var(--ink); }
.tile:hover { color: #fff; filter: brightness(1.06); }
.tile--green:hover { color: var(--ink); }

/* ---------- Contenu éditorial ---------- */
.band { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.band--mist { background: var(--mist); }
.band > .wrap > h2 { margin-bottom: 1.5rem; }
.band--flush, .band--prose + .band--prose { padding-top: 0; }
.prose p + h2 { margin-top: 2.5rem; }
.prose { max-width: 44rem; }
.prose p + p, .prose p + h3, .prose ul + p { margin-top: 1rem; }
.prose h3 { margin-top: 1.75rem; }
.prose h3 + p { margin-top: .4rem; }
.prose ul { padding-left: 1.2rem; margin: .75rem 0 0; }
.prose li + li { margin-top: .35rem; }
.prose h2 + p { margin-top: 0; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.75rem 1fr; gap: .9rem; align-items: start; }
.steps li::before {
  content: counter(step); width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-weight: 700; clip-path: var(--hex);
}
.steps li:last-child::before { background: var(--green); color: var(--ink); }
.steps strong { display: block; line-height: 1.3; margin-bottom: .2rem; }
.steps span { color: var(--ink-soft); font-size: .98rem; line-height: 1.55; display: block; }

.cols { display: grid; gap: 2rem 3rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.cols p { margin-top: .4rem; color: var(--ink-soft); }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.chips a {
  display: inline-block; padding: .55rem 1.05rem; border-radius: 999px; background: #fff; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line); text-decoration: none; font-weight: 500; font-size: .98rem;
}
.chips a:hover { box-shadow: inset 0 0 0 1.5px var(--blue); color: var(--blue-deep); }

.faq { max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; font-weight: 500; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.5rem; line-height: 1; color: var(--blue); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 1.25rem; color: var(--ink-soft); max-width: 42rem; }

/* ---------- Pied de page ---------- */
.foot { background: var(--ink); color: #c9d6ea; padding-block: 3rem 2rem; font-size: .95rem; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; color: #fff; }
.foot__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.foot h2 { font-size: 1rem; letter-spacing: 0; color: #fff; margin-bottom: .75rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.foot__legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .15); display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }

@media (max-width: 40rem) {
  .top__in { padding-block: .7rem; gap: .5rem; }
  .top__logo img { height: 28px; }
  .nav a { font-size: .875rem; padding: .4rem .65rem; }
  .file { grid-template-columns: 2.75rem 1fr; }
  .file__thumb { width: 2.75rem; height: 2.75rem; }
  .file__actions { grid-column: 1 / -1; justify-content: flex-end; }
  .actions > .btn--ghost { flex: 1 1 auto; padding-inline: 1rem; font-size: .95rem; }
  .actions__main { margin-left: 0; width: 100%; }
  .actions__main .btn { flex: 1 1 100%; }
  .drop__hint .kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
