/* GuzPDF — thème sombre premium, accents rouge (inspiration type “tech / SaaS”), sans copier un site existant */

:root {
  --bg-deep: #050506;
  --bg-elevated: #0c0c10;
  --bg-card: #101014;
  --bg-card-hover: #15151c;
  --border: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(127, 29, 29, 0.45);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #991b1b;
  --accent-soft: #b91c1c;
  --accent-deep: #450a0a;
  --glow: 0 0 80px rgba(153, 27, 27, 0.14);
  --radius: 14px;
  --radius-lg: 22px;
  --font: "Instrument Sans", system-ui, sans-serif;
  --font-brand: "Outfit", "Instrument Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(153, 27, 27, 0.2), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(69, 10, 10, 0.18), transparent 45%),
    linear-gradient(180deg, #08080b 0%, var(--bg-deep) 40%);
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Navigation — barre premium */
.nav-shell {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(5, 5, 8, 0.82);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-shell__line {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(153, 27, 27, 0.6), rgba(127, 29, 29, 0.4), transparent);
  opacity: 0.95;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--font-brand);
}

.nav-brand__text {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.045em;
}

.nav-brand__name {
  color: var(--text);
}

.nav-brand__suffix {
  color: var(--accent-soft);
  font-weight: 700;
}

/* Logo — cadre dégradé animé + pile de feuilles */
.nav-brand__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.45));
}

.footer-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
}

.brand-logo-halo {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  overflow: hidden;
  flex-shrink: 0;
  animation: brandLogoLift 5s ease-in-out infinite;
}

.brand-logo-halo--sm {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  animation-duration: 5.5s;
}

.brand-logo-halo__spin {
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, #450a0a, #b91c1c, #7f1d1d, #c53030, #450a0a);
  animation: brandLogoHaloSpin 4.8s linear infinite;
}

.brand-logo-halo__core {
  position: absolute;
  inset: 2px;
  border-radius: 13px;
  background: linear-gradient(160deg, #12121a 0%, #070708 100%);
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand-logo-halo--sm .brand-logo-halo__core {
  inset: 2px;
  border-radius: 10px;
}

.brand-logo-halo .brand-logo-svg {
  width: 70%;
  height: 70%;
  display: block;
  overflow: visible;
}

.brand-logo__stack--back {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: brandStackBack 4s ease-in-out infinite;
}

.brand-logo__stack--mid {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: brandStackMid 4s ease-in-out infinite;
}

.brand-logo__stack--front {
  transform-origin: 14px 25px;
  animation: brandStackFront 4s ease-in-out infinite;
}

.brand-logo__line-accent {
  animation: brandLineGlow 2.6s ease-in-out infinite;
}

.brand-logo__corner {
  animation: brandCornerGlint 3.2s ease-in-out infinite;
}

@keyframes brandLogoLift {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.02);
  }
}

@keyframes brandLogoHaloSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes brandStackBack {
  0%,
  100% {
    transform: translate(0, 0) rotate(-4deg);
  }
  50% {
    transform: translate(-0.5px, 0.5px) rotate(-5deg);
  }
}

@keyframes brandStackMid {
  0%,
  100% {
    transform: translate(0, 0) rotate(2.5deg);
  }
  50% {
    transform: translate(0.5px, -0.5px) rotate(3.5deg);
  }
}

@keyframes brandStackFront {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(0, -0.5px) rotate(0.5deg);
  }
}

@keyframes brandLineGlow {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

@keyframes brandCornerGlint {
  0%,
  100% {
    opacity: 0.82;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo-halo,
  .brand-logo-halo__spin,
  .brand-logo__stack--back,
  .brand-logo__stack--mid,
  .brand-logo__stack--front,
  .brand-logo__line-accent,
  .brand-logo__corner {
    animation: none !important;
  }

  .brand-logo-halo__spin {
    transform: rotate(22deg);
  }
}

.nav-tray {
  display: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s;
}

.nav-link__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(161, 161, 170, 0.5);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link:hover .nav-link__dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.nav-link--ghost {
  border: 1px solid rgba(153, 27, 27, 0.25);
  background: rgba(153, 27, 27, 0.06);
  color: var(--accent-soft);
}

.nav-link--ghost:hover {
  background: rgba(153, 27, 27, 0.12);
  color: #fff;
}

.nav-actions {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

.nav-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 11px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(153, 27, 27, 0.35);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.nav-cta__glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 55%);
  opacity: 0.5;
  pointer-events: none;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(153, 27, 27, 0.45);
}

.nav-cta__label,
.nav-cta__icon {
  position: relative;
  z-index: 1;
}

.nav-burger {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(16, 16, 20, 0.9);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
}

.nav-burger__bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--text-muted), var(--text));
}

.nav-drawer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 8, 12, 0.98);
}

.nav-drawer[hidden] {
  display: none !important;
}

.nav-drawer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-drawer__link {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-drawer__link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav-drawer__cta {
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
}

@media (min-width: 960px) {
  .nav-tray,
  .nav-actions {
    display: flex;
  }
  .nav-burger {
    display: none;
  }
  .nav-drawer {
    display: none !important;
  }
}

.tool-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.dual-upload {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .dual-upload {
    grid-template-columns: 1fr 1fr;
  }
}

.upload-slot__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.upload-zone--compact {
  padding: 1.25rem 1rem;
  min-height: 100px;
  position: relative;
}

.upload-zone__mini {
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
  position: relative;
  z-index: 0;
}

.upload-zone--compact input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.tool-fields {
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.tool-textarea,
.tool-input,
.tool-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.tool-textarea {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  resize: vertical;
  min-height: 140px;
}

.tool-input:focus,
.tool-select:focus,
.tool-textarea:focus {
  outline: none;
  border-color: rgba(153, 27, 27, 0.45);
  box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.12);
}

.compare-result {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(153, 27, 27, 0.2);
  background: rgba(153, 27, 27, 0.06);
}

.compare-inner h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.compare-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
}

.tool-ocr .upload-zone--single {
  position: relative;
  margin-top: 0.5rem;
}

.tool-ocr .upload-zone--single input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.ocr-status {
  min-height: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
}

/* Hero */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.25rem 5rem;
  position: relative;
}

.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
  }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 1rem;
}

.hero__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  color: var(--text);
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, #fff 0%, var(--accent-soft) 45%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36ch;
  margin: 0 0 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 4px 24px rgba(153, 27, 27, 0.35);
}

.btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(153, 27, 27, 0.45);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover:not(:disabled) {
  border-color: rgba(153, 27, 27, 0.4);
  background: rgba(153, 27, 27, 0.06);
}

.hero__visual {
  position: relative;
  min-height: min(360px, 52vw);
}

/* Illustration hero — piles PDF + halos animés (CSS pur) */
.hero-illus {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.hero-illus__ambient {
  position: absolute;
  width: min(340px, 90%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(153, 27, 27, 0.35) 0%, rgba(69, 10, 10, 0.2) 40%, transparent 70%);
  filter: blur(28px);
  animation: heroIllusPulse 5.5s ease-in-out infinite alternate;
}

.hero-illus__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(153, 27, 27, 0.22);
}

.hero-illus__ring--outer {
  width: min(300px, 85%);
  aspect-ratio: 1;
  border-style: dashed;
  border-color: rgba(127, 29, 29, 0.4);
  animation: heroIllusOrbit 48s linear infinite;
  box-shadow: inset 0 0 50px rgba(153, 27, 27, 0.06);
}

.hero-illus__ring--inner {
  width: min(240px, 68%);
  aspect-ratio: 1;
  border-color: rgba(255, 255, 255, 0.06);
  animation: heroIllusOrbit 32s linear infinite reverse;
}

.hero-illus__stack {
  position: relative;
  width: min(200px, 52vw);
  height: min(248px, 64vw);
  animation: heroIllusFloat 5s ease-in-out infinite;
  z-index: 2;
}

.hero-illus__page {
  position: absolute;
  width: 100%;
  height: 88%;
  bottom: 0;
  left: 50%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(22, 22, 28, 0.98) 0%, var(--bg-card) 100%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
}

.hero-illus__page--back {
  transform: translate(-50%, 10px) rotate(-8deg) scale(0.92);
  opacity: 0.55;
  z-index: 0;
}

.hero-illus__page--mid {
  transform: translate(-42%, 4px) rotate(5deg) scale(0.96);
  opacity: 0.72;
  z-index: 1;
}

.hero-illus__page--front {
  transform: translate(-50%, 0) rotate(0deg);
  z-index: 3;
  overflow: hidden;
  border-color: rgba(153, 27, 27, 0.35);
  box-shadow:
    var(--glow),
    0 24px 56px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-illus__shimmer {
  position: absolute;
  inset: -40% -60%;
  width: 40%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.07) 45%,
    rgba(185, 28, 28, 0.14) 50%,
    transparent 70%
  );
  transform: skewX(-18deg) translateX(-120%);
  animation: heroIllusShimmer 6.5s ease-in-out infinite;
  pointer-events: none;
}

.hero-illus__face {
  position: relative;
  height: 100%;
  padding: 1.35rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hero-illus__bar {
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  width: 78%;
  animation: heroIllusBar 4s ease-in-out infinite alternate;
}

.hero-illus__bar--full {
  width: 100%;
  animation-delay: -0.5s;
}

.hero-illus__bar--short {
  width: 52%;
  animation-delay: -1s;
}

.hero-illus__label {
  margin-top: auto;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  color: var(--accent-soft);
  border: 1px solid rgba(153, 27, 27, 0.4);
  background: rgba(153, 27, 27, 0.12);
  box-shadow: 0 0 18px rgba(153, 27, 27, 0.2);
}

.hero-illus__dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 14px var(--accent);
  z-index: 4;
  animation: heroIllusSpark 2.8s ease-in-out infinite;
}

.hero-illus__dot--a {
  top: 18%;
  right: 16%;
  animation-delay: 0s;
}

.hero-illus__dot--b {
  bottom: 26%;
  left: 12%;
  animation-delay: 0.85s;
}

.hero-illus__dot--c {
  top: 42%;
  right: 10%;
  animation-delay: 1.65s;
}

@keyframes heroIllusFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes heroIllusPulse {
  0% {
    opacity: 0.65;
    transform: scale(0.94);
  }
  100% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes heroIllusOrbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes heroIllusShimmer {
  0%,
  35% {
    transform: skewX(-18deg) translateX(-130%);
    opacity: 0;
  }
  45% {
    opacity: 1;
  }
  55%,
  100% {
    transform: skewX(-18deg) translateX(220%);
    opacity: 0;
  }
}

@keyframes heroIllusBar {
  0% {
    opacity: 0.55;
  }
  100% {
    opacity: 0.95;
  }
}

@keyframes heroIllusSpark {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.8);
  }
  35% {
    opacity: 1;
    transform: scale(1.15);
  }
  60% {
    opacity: 0.45;
    transform: scale(0.95);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-illus__stack,
  .hero-illus__ambient,
  .hero-illus__ring--outer,
  .hero-illus__ring--inner,
  .hero-illus__shimmer,
  .hero-illus__bar,
  .hero-illus__bar--full,
  .hero-illus__bar--short,
  .hero-illus__dot {
    animation: none !important;
  }

  .hero-illus__ring--outer,
  .hero-illus__ring--inner {
    transform: none;
  }

  .hero-illus__shimmer {
    display: none;
  }
}

/* Sections */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.section__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.section__intro {
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 2rem;
}

.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s;
}

.feature-card:hover {
  border-color: rgba(153, 27, 27, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.feature-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.feature-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Tool cards grid (listing) */
.tools-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tool-card {
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tool-card:hover {
  border-color: rgba(153, 27, 27, 0.3);
  box-shadow: 0 0 0 1px rgba(153, 27, 27, 0.08), var(--glow);
  transform: translateY(-2px);
}

.tool-card--soon {
  opacity: 0.92;
}

.tool-card--soon .tool-card__badge {
  background: rgba(161, 161, 170, 0.15);
  color: var(--text-muted);
}

.tool-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tool-card__icon-svg svg {
  display: block;
}

.tool-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(153, 27, 27, 0.12);
  border: 1px solid rgba(153, 27, 27, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-soft);
}

.tool-card__badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.tool-card__badge--soon {
  background: rgba(161, 161, 170, 0.12);
  color: var(--text-muted);
}

.tool-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.tool-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tool-category {
  margin: 2.5rem 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

/* Tool page */
.tool-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.tool-page__header {
  margin-bottom: 2rem;
}

.tool-page__header h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.tool-page__header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Upload zone */
.upload-zone {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(153, 27, 27, 0.35);
  background: linear-gradient(180deg, rgba(153, 27, 27, 0.05), transparent);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.upload-zone:hover,
.upload-zone:focus-within,
.upload-zone.is-dragover {
  border-color: rgba(153, 27, 27, 0.6);
  box-shadow: inset 0 0 40px rgba(153, 27, 27, 0.06);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-zone__title {
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.upload-zone__hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.upload-zone__mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.progress {
  margin-top: 1.5rem;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: none;
}

.progress.is-active {
  display: block;
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-soft));
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}

.alert {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

.alert--error {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #fecaca;
}

.alert--success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #bbf7d0;
}

.soon-panel {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-align: center;
}

.soon-panel p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 2.5rem 1.25rem;
  background: rgba(0, 0, 0, 0.35);
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer__brand .brand-wordmark {
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.site-footer__links {
  display: flex;
  gap: 1.25rem;
}

.site-footer__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-footer__links a:hover {
  color: var(--accent-soft);
}

.site-footer__legal {
  max-width: 1200px;
  margin: 1.25rem auto 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.8;
}

/* Layout wrapper */
.page-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#main {
  flex: 1;
}

/* Split options */
.field {
  margin: 1.25rem 0;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.field input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.field input:focus {
  outline: none;
  border-color: rgba(153, 27, 27, 0.5);
  box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.12);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Éditeur PDF — aperçu + zone live */
.pdf-edit-workspace {
  margin-top: 1.5rem;
}

.pdf-edit-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.pdf-edit-toolbar__item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.pdf-edit-toolbar__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pdf-edit-select {
  max-width: 280px;
}

.pdf-edit-stats {
  flex: 1 1 200px;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.pdf-edit-stage-wrap {
  margin-top: 0.5rem;
}

.pdf-edit-live-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
  line-height: 1.45;
}

.pdf-edit-live-hint__kbd {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  margin-right: 0.25rem;
}

.pdf-edit-stage {
  max-width: 100%;
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #020203;
  padding: 0.75rem;
}

.pdf-edit-canvas-layer {
  position: relative;
  display: inline-block;
  vertical-align: top;
  line-height: 0;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.pdf-edit-canvas {
  display: block;
  vertical-align: top;
}

.pdf-edit-text-layer {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 2;
}

.pdf-edit-text-run {
  position: absolute;
  pointer-events: auto;
  white-space: pre;
  min-width: 0.35ch;
  margin: 0;
  padding: 0 1px;
  font-family: var(--font-mono);
  color: rgba(244, 244, 245, 0.96);
  caret-color: var(--accent-soft);
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.9);
  outline: 1px solid transparent;
  border-radius: 2px;
  cursor: text;
  box-sizing: border-box;
}

.pdf-edit-text-run:hover {
  outline-color: rgba(185, 28, 28, 0.55);
  background: rgba(0, 0, 0, 0.25);
}

.pdf-edit-text-run:focus {
  outline: 2px solid var(--accent-soft);
  outline-offset: 1px;
  background: rgba(0, 0, 0, 0.45);
}

.pdf-edit-text-run--locked {
  pointer-events: none;
  opacity: 0.5;
  cursor: default;
  outline: 1px dashed rgba(255, 255, 255, 0.12);
}

.pdf-edit .btn--primary {
  margin-top: 1.25rem;
}

.pdf-edit .upload-zone--single {
  margin-top: 0;
}

@media (max-width: 600px) {
  .pdf-edit-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pdf-edit-select {
    max-width: none;
  }
}
