/* Charte societe.com : Roboto, #005eff, #000e47, fond hero #eef2ff */

:root {
  --so-blue: #005eff;
  --so-blue-hover: #0047e0;
  --so-blue-light: #e1ecff;
  --so-blue-soft: #f0f5ff;
  --so-text: #000e47;
  --so-muted: #646e9f;
  --so-muted2: #45518c;
  --so-border: #babfd6;
  --so-input-border: #596395;
  --so-hero-bg: #f2f9fd;
  --so-ok: #067f43;
  --so-ko: #ce0031;
  --r: 12px;
  --r-sm: 6px;
  --r-pill: 999px;
  --shadow-card: 0 8px 32px rgba(0, 14, 71, 0.10);
  --shadow-search: 0 4px 20px rgba(0, 94, 255, 0.12);
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--so-text);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ─── Header ─────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--so-border);
  box-shadow: 0 1px 0 rgba(0,14,71,0.04);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { text-decoration: none; display: flex; align-items: center; }
.brand-logo { height: 40px; width: auto; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header-auth {
  gap: 1rem;
}

/* Crédits : au survol (ou focus), lien vers l’espace API membre */
.header-credits-wrap {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}

.header-credits-account {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.875rem;
  border-radius: var(--r-sm);
  background: var(--so-blue-soft);
  border: 1.5px solid rgba(0, 94, 255, 0.35);
  color: var(--so-blue);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  line-height: 1.25;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.header-credits-account:hover {
  background: var(--so-blue-light);
}

@media (hover: hover) {
  .header-credits-account {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
  }

  .header-credits-wrap:hover .header-credits-account,
  .header-credits-account:focus-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .header-credits-wrap:hover .header-credits,
  .header-credits-wrap:has(.header-credits-account:focus-visible) .header-credits {
    visibility: hidden;
    pointer-events: none;
  }
}

@media (hover: none) {
  .header-credits-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 0.375rem;
  }

  .header-credits-account {
    font-size: 0.75rem;
    padding: 0.4rem 0.65rem;
    border-color: rgba(0, 94, 255, 0.22);
  }
}

.header-credits {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.45rem 0.875rem 0.45rem 0.625rem;
  border-radius: var(--r-sm);
  background: var(--so-blue-soft);
  border: 1.5px solid rgba(0, 94, 255, 0.22);
  color: var(--so-text);
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
  box-shadow: 0 1px 4px rgba(0, 94, 255, 0.07);
}

.header-credits-icon {
  color: var(--so-blue);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.header-credits-body {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 0.2rem;
}

.header-credits-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--so-text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.header-credits-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--so-muted2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.header-credits-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-left: 0.625rem;
  margin-left: 0.125rem;
  border-left: 1px solid rgba(0, 94, 255, 0.2);
}

.header-credits--low .header-credits-actions {
  display: flex;
}

.header-credits--low .header-credits-value {
  color: var(--so-ko);
}

.header-credits--low .header-credits-icon {
  color: var(--so-ko);
}

.header-credits-link {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--so-blue);
  text-decoration: none;
}

.header-credits-link:hover {
  text-decoration: underline;
}

@keyframes creditsSoftPulse {
  0%, 100% {
    background: var(--so-blue-soft);
    border-color: rgba(0, 94, 255, 0.22);
    box-shadow: 0 1px 4px rgba(0, 94, 255, 0.07);
  }
  50% {
    background: rgba(255, 88, 88, 0.07);
    border-color: rgba(255, 88, 88, 0.4);
    box-shadow: 0 4px 16px rgba(255, 88, 88, 0.16);
  }
}

.header-credits--low {
  animation: creditsSoftPulse 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .header-credits--low { animation: none; }
}

.header-nav-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--so-blue);
  text-decoration: none;
  white-space: nowrap;
}

.header-nav-link:hover {
  text-decoration: underline;
}

/* ─── Page wrap / Hero ───────────────────────────────────── */

.page-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Index : hero fills remaining space so footer is always visible */
/* Décor de fond societe.com : anneau en haut à droite */
.page-index .hero-section {
  flex: 1;
  background-image: url('/images/bg_hero_deco.svg');
  background-position: calc(100% + 114px) -24px;
  background-repeat: no-repeat;
  background-size: 376px;
}

@media (min-width: 1024px) {
  .page-index .hero-section {
    background-position: calc(100% + 160px) -212px;
    background-size: 612px;
  }
}

.hero-section {
  background: var(--so-hero-bg);
  padding: 4rem 1.5rem 5rem;
  display: flex;
  justify-content: center;
}

.hero-content {
  width: 100%;
  max-width: 680px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hero-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--so-text);
}

.hero-accent { color: var(--so-blue); }

.hero-sub {
  margin: 0;
  font-size: 1rem;
  color: var(--so-muted);
  max-width: 42ch;
}

.hero-doc-cta {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.hero-doc-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 1.15rem;
  border-radius: var(--r-pill);
  border: 2px solid var(--so-blue);
  background: #fff;
  color: var(--so-blue);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0, 94, 255, 0.12);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.hero-doc-link:hover {
  background: var(--so-blue-light);
  box-shadow: 0 4px 16px rgba(0, 94, 255, 0.18);
}

.hero-doc-hint {
  font-size: 0.8125rem;
  color: var(--so-muted2);
}

.hero-section--compact {
  padding: 2rem 1.25rem 2.25rem;
}

.hero-section--compact .hero-content {
  max-width: 1100px;
}

.hero-section--compact .hero-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.hero-section--compact .hero-sub {
  max-width: none;
}

.cache-meta-code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(0, 94, 255, 0.08);
  color: var(--so-text);
}

/* ─── Search card ────────────────────────────────────────── */

.search-card {
  width: 100%;
  background: #fff;
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* ─── Tabs ───────────────────────────────────────────────── */

.mode-tabs {
  display: flex;
  border-bottom: 1px solid var(--so-border);
}

.tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  border: none;
  background: transparent;
  color: var(--so-muted);
  font: 500 0.9375rem var(--font);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab-btn + .tab-btn {
  border-left: 1px solid var(--so-border);
}

.tab-btn::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: var(--so-blue);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.tab-btn.is-active {
  color: var(--so-blue);
  font-weight: 700;
}

.tab-btn.is-active::after { transform: scaleX(1); }
.tab-btn:hover:not(.is-active) { color: var(--so-text); }

/* ─── Mode blocks ────────────────────────────────────────── */

.mode-block { display: none; }
.mode-block.is-visible { display: block; }

/* ─── Formulaire recherche unitaire ─────────────────────── */

.form-fields {
  padding: 1rem 1rem 0;
  text-align: left;
}

.xfield-full {
  display: block;
  margin-bottom: 0.75rem;
}

.extra-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 720px) {
  .extra-grid { grid-template-columns: 1fr; }
}

.btn-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 10rem;
  height: 48px;
  padding: 0 1.75rem;
  border: none;
  border-radius: var(--r-pill);
  background: var(--so-blue);
  color: #fff;
  font: 700 1rem var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

a.btn-search {
  text-decoration: none;
  box-sizing: border-box;
}

.btn-search:hover:not(:disabled):not(.is-loading) { background: var(--so-blue-hover); }
.btn-search:disabled { cursor: not-allowed; }
.btn-search.is-loading {
  opacity: 0.92;
  pointer-events: none;
}

.btn-search-spinner {
  display: none;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-search-spin 0.65s linear infinite;
}

.btn-search.is-loading .btn-search-spinner {
  display: block;
}

@keyframes btn-search-spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-search-text {
  font: inherit;
  font-weight: 700;
  color: inherit;
}

.xfield span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--so-input-border);
  margin-bottom: 0.25rem;
}

.xfield input {
  width: 100%;
  height: 42px;
  padding: 0 0.75rem;
  border: 1.5px solid var(--so-border);
  border-radius: var(--r-sm);
  font: 0.9375rem var(--font);
  color: var(--so-text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.xfield input::placeholder { color: var(--so-muted); opacity: 0.8; }
.xfield input:focus { border-color: var(--so-blue); }

/* ─── Form footer (inside card) ──────────────────────────── */

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 1rem;
  gap: 1rem;
}

.form-footer--end {
  justify-content: flex-end;
}

.form-help-link {
  font-size: 0.875rem;
  color: var(--so-muted2);
  text-decoration: none;
  white-space: nowrap;
}

.form-help-link:hover {
  color: var(--so-blue);
  text-decoration: underline;
}

/* ─── File drop zone ──────────────────────────────────────── */

.file-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  margin: 1rem;
  border: 2px dashed var(--so-border);
  border-radius: var(--r-sm);
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  color: var(--so-muted);
}

.file-drop-zone.is-over {
  border-color: var(--so-blue);
  background: var(--so-blue-soft);
}

.xls-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.xls-logo-img {
  display: block;
  width: 72px;
  height: auto;
  max-height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(22, 107, 68, 0.25));
}

.drop-title { margin: 0; font-weight: 700; font-size: 1rem; color: var(--so-text); }
.drop-sub { margin: 0; font-size: 0.875rem; }
.drop-hint {
  margin: 0;
  max-width: 100%;
  text-align: center;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.drop-hint-primary,
.drop-hint-secondary {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--so-muted);
}
.drop-hint-primary {
  font-weight: 600;
  color: var(--so-text);
}
.drop-hint-secondary {
  font-size: 0.75rem;
}
.drop-hint.has-file {
  display: block;
  color: var(--so-ok);
  font-weight: 600;
  font-size: 0.875rem;
  word-break: break-all;
}
.drop-hint.has-file .drop-hint-primary,
.drop-hint.has-file .drop-hint-secondary {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.btn-file-pick {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 1.25rem;
  background: var(--so-blue-light);
  color: var(--so-blue);
  border: 1.5px solid var(--so-blue);
  border-radius: var(--r-pill);
  font: 500 0.9375rem var(--font);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-file-pick:hover { background: #d1e3ff; }
.btn-file-pick input[type="file"] { display: none; }

.btn-search-file {
  border-radius: var(--r-pill);
  height: 40px;
  padding: 0 1.25rem;
  font-size: 0.9375rem;
}

/* ─── Results section ─────────────────────────────────────── */

.results-section {
  padding: 2.5rem 1.5rem 4rem;
  display: flex;
  justify-content: center;
  background: #fff;
}

.results-inner {
  width: 100%;
  max-width: min(1680px, 96vw);
}

.results-title {
  margin: 0 0 1.25rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--so-text);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--so-border);
}

.hidden { display: none !important; }

.toast {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: min(720px, calc(100vw - 24px));
  padding: 0.65rem 0.9rem;
  border-radius: var(--r-pill);
  background: rgba(0, 14, 71, 0.92);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 14, 71, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.toast.toast--success {
  background: rgba(6, 127, 67, 0.94);
}

.toast.toast--error {
  background: rgba(206, 0, 49, 0.94);
}

@media (prefers-reduced-motion: no-preference) {
  .toast {
    animation: toastSlideIn 180ms ease-out both;
  }
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.alert-error {
  background: #fff5f7;
  color: var(--so-ko);
  border: 1px solid rgba(206, 0, 49, 0.22);
}

.alert-success {
  background: #f0faf4;
  color: var(--so-ok);
  border: 1px solid rgba(6, 127, 67, 0.22);
}

.alert > p {
  margin: 0;
}

.alert > p + p {
  margin-top: 0.5rem;
}

.alert-error a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--so-border);
  border-radius: var(--r-sm);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.results-table th,
.results-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--so-border);
  text-align: left;
  vertical-align: top;
}

.results-table th {
  background: #f4f4fa;
  color: var(--so-text);
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.results-table tbody tr:hover { background: #f8f9ff; }

.results-table tbody tr.is-selected {
  background: #e8efff;
}

.results-table tbody tr.is-selected:hover {
  background: #dde8ff;
}

.results-status--ok {
  color: var(--so-ok);
  font-weight: 700;
}

.results-status--ko {
  color: var(--so-ko);
  font-weight: 700;
}

.results-status--warn {
  color: #b45309;
  font-weight: 700;
}

.badge-retained {
  color: var(--so-blue);
  font-size: 0.65rem;
  vertical-align: super;
}

.cache-action-col {
  white-space: nowrap;
  vertical-align: middle;
}

.cache-retained-label {
  font-size: 0.8125rem;
  color: var(--so-muted);
}

.btn-cache-pick {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--so-border);
  background: #fff;
  color: var(--so-blue);
  cursor: pointer;
}

.btn-cache-pick:hover:not(:disabled) {
  background: #f0f4ff;
  border-color: var(--so-blue);
}

.btn-cache-pick:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.cache-intro {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--so-muted);
  line-height: 1.45;
}

.cache-empty {
  color: var(--so-muted);
}

.cache-tech {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--so-border);
  border-radius: var(--r-sm);
  background: #fafbff;
}

.cache-tech-title {
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: var(--so-text);
}

.cache-params-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.625rem 1rem;
}

.cache-params-item {
  margin: 0;
}

.cache-params-item dt {
  margin: 0 0 0.125rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--so-muted);
  font-weight: 600;
}

.cache-params-item dd {
  margin: 0;
  color: var(--so-text);
  font-weight: 500;
  word-break: break-word;
}

.results-table td a.societe-link {
  color: var(--so-blue);
  font-weight: 500;
  text-decoration: none;
}

.results-table td a.societe-link:hover {
  text-decoration: underline;
}

/* ─── Page documentation (aide) ─────────────────────────── */

.doc-hero {
  text-align: center;
}

.doc-hero .doc-back {
  margin: 0;
  font-size: 0.9375rem;
}

.doc-hero .doc-back a {
  color: var(--so-blue);
  font-weight: 500;
  text-decoration: none;
}

.doc-hero .doc-back a:hover {
  text-decoration: underline;
}

.doc-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.doc-card {
  background: #fff;
  border: 1px solid var(--so-border);
  border-radius: var(--r);
  padding: 1.35rem 1.5rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 14, 71, 0.06);
}

.doc-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--so-text);
  letter-spacing: -0.02em;
}

.doc-card h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--so-text);
}

.doc-card h3:first-of-type {
  margin-top: 0.75rem;
}

.doc-card p {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--so-muted2);
  line-height: 1.55;
}

.doc-card p:last-child {
  margin-bottom: 0;
}

.doc-list {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  color: var(--so-muted2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.doc-list li {
  margin-bottom: 0.35rem;
}

.doc-list li:last-child {
  margin-bottom: 0;
}

.doc-card--accent {
  background: var(--so-blue-soft);
  border-color: rgba(0, 94, 255, 0.22);
}

.doc-note {
  font-size: 0.8125rem !important;
  color: var(--so-muted) !important;
  font-style: italic;
}

.doc-actions {
  margin: 0.25rem 0 1rem !important;
}

.doc-ext-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 1.1rem;
  border-radius: var(--r-pill);
  background: var(--so-blue);
  color: #fff !important;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.doc-ext-link:hover {
  background: var(--so-blue-hover);
}

.doc-ext-link--secondary {
  background: var(--so-text);
}

.doc-ext-link--secondary:hover {
  background: #001a5c;
}

/* ─── Footer ──────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--so-border);
  padding: 1.75rem 1.5rem;
  background: #fff;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.125rem 1.5rem;
}

.footer-nav a {
  font-size: 0.8125rem;
  color: var(--so-muted);
  text-decoration: none;
  white-space: nowrap;
}

.footer-nav a:hover {
  color: var(--so-blue);
  text-decoration: underline;
}

.footer-legal {
  margin: 0;
  font-size: 0.75rem;
  color: var(--so-muted);
  text-align: center;
  line-height: 1.5;
}

.footer-legal a {
  color: inherit;
  text-decoration: underline;
}

.footer-legal a:hover {
  color: var(--so-blue);
}

/* ─── Responsive tweaks ────────────────────────────────────── */

@media (max-width: 600px) {
  .hero-section { padding: 2.5rem 1rem 3.5rem; }
  .btn-search { width: 100%; justify-content: center; }
  .form-footer--end { justify-content: stretch; }
  .form-footer--end .btn-search { width: 100%; }
  .hero-title { font-size: 1.75rem; }
}

/* ─── Landing marketing (siretisation.fr) ─────────────────── */

.lp-header-cta {
  min-width: auto;
  height: 40px;
  padding: 0 1.35rem;
  font-size: 0.9375rem;
}

.lp-page .page-wrap {
  min-height: auto;
}

.lp-hero {
  padding: 3rem 1.5rem 4rem;
  background: linear-gradient(180deg, var(--so-hero-bg) 0%, #fff 100%);
}

.lp-hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .lp-hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.lp-hero-copy {
  text-align: left;
}

.lp-hero-copy .hero-title {
  text-align: left;
  max-width: 18ch;
}

.lp-hero-copy .hero-sub {
  max-width: none;
}

.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-pill);
  background: rgba(0, 94, 255, 0.1);
  color: var(--so-blue);
  font-size: 0.8125rem;
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.lp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  align-items: center;
}

.lp-link-secondary {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--so-muted2);
  text-decoration: none;
}

.lp-link-secondary:hover {
  color: var(--so-blue);
  text-decoration: underline;
}


.lp-visual-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  min-height: 220px;
  align-items: stretch;
}

@media (max-width: 640px) {
  .lp-visual-body {
    grid-template-columns: 1fr;
  }
}

.lp-visual-col {
  padding: 1.25rem 1rem;
  font-size: 0.8125rem;
}

/* ─── Deux "feuilles Excel" en chevauchement diagonal ──────── */

.lp-sheets-stage {
  position: relative;
  min-height: 230px;
  padding: 1.5rem 1.25rem 3rem 1.25rem;
  background: transparent;
  border-radius: var(--r);
  overflow: visible;
}

.lp-sheet-card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--so-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 14, 71, 0.12);
  padding: 0.65rem 0.75rem 0.6rem;
  width: max-content;
  max-width: calc(100% - 1.5rem);
  overflow: hidden;
}

.lp-sheet-card--before {
  top: 1rem;
  left: 1rem;
  z-index: 1;
  transform: rotate(-1.75deg);
}

.lp-sheet-card--after {
  top: 3.25rem;
  left: 3.25rem;
  z-index: 2;
  transform: rotate(1.25deg);
  border-color: rgba(0, 94, 255, 0.3);
  box-shadow: 0 12px 32px rgba(0, 94, 255, 0.16);
}

@media (max-width: 640px) {
  .lp-sheets-stage {
    min-height: 290px;
  }
  .lp-sheet-card--after {
    top: 3.75rem;
    left: 1.5rem;
  }
}

.lp-sheet-label {
  margin: 0 0 0.4rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--so-muted2);
}

.lp-sheet-table {
  border-collapse: collapse;
  font-family: ui-monospace, "Segoe UI Mono", monospace;
  font-size: 0.72rem;
  white-space: nowrap;
}

.lp-sheet-table th,
.lp-sheet-table td {
  border: 1px solid rgba(186, 191, 214, 0.8);
  padding: 0.25rem 0.5rem;
  text-align: left;
  vertical-align: middle;
}

.lp-sheet-table thead th {
  background: #f0f2f8;
  font-weight: 700;
  color: var(--so-text);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lp-th-added {
  background: rgba(0, 94, 255, 0.1) !important;
  color: var(--so-blue) !important;
}

.lp-td-added {
  background: rgba(0, 94, 255, 0.04);
}

.lp-td-ok {
  color: var(--so-ok);
  font-weight: 600;
}

.lp-td-warn {
  color: #b45309;
  font-weight: 600;
}

.lp-row-faded td {
  color: var(--so-muted);
  opacity: 0.55;
}

.lp-visual-col--before {
  background: #fafafa;
  color: var(--so-muted);
}

.lp-visual-col--after {
  background: var(--so-blue-soft);
  color: var(--so-text);
}

.lp-visual-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-left: 1px solid var(--so-border);
  border-right: 1px solid var(--so-border);
  color: var(--so-blue);
  font-size: 1.5rem;
  font-weight: 800;
}

@media (max-width: 640px) {
  .lp-visual-arrow {
    border: none;
    border-top: 1px solid var(--so-border);
    border-bottom: 1px solid var(--so-border);
    padding: 0.5rem;
    transform: rotate(90deg);
  }
}

.lp-mono {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  line-height: 1.5;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.lp-visual-label {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--so-muted2);
}

.lp-section {
  padding: 3.5rem 1.5rem;
}

.lp-section--alt {
  background: var(--so-hero-bg);
}

.lp-section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.lp-section-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--so-text);
  text-align: center;
}

.lp-section-lead {
  margin: 0 auto 2.5rem;
  max-width: 52ch;
  text-align: center;
  font-size: 1.0625rem;
  color: var(--so-muted2);
  line-height: 1.55;
}

.lp-section-help {
  margin: 2rem auto 0;
  max-width: 52ch;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--so-muted2);
}

.lp-section-help a {
  color: var(--so-blue);
  text-decoration: none;
}

.lp-section-help a:hover {
  text-decoration: underline;
}

/* ─── Section définition (SEO) ───────────────────────────── */

.lp-definition-cards .lp-card {
  box-shadow: 0 2px 14px rgba(0, 14, 71, 0.06);
}

.lp-definition-cards .lp-card h3 {
  margin-top: 0;
}

/* ─── Steps ──────────────────────────────────────────────── */

.lp-steps {
  display: grid;
  gap: 1.25rem;
  counter-reset: lpstep;
}

@media (min-width: 720px) {
  .lp-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.lp-step {
  position: relative;
  background: #fff;
  border: 1px solid var(--so-border);
  border-radius: var(--r);
  padding: 1.5rem 1.35rem 1.35rem;
  box-shadow: 0 2px 14px rgba(0, 14, 71, 0.06);
}

.lp-step::before {
  counter-increment: lpstep;
  content: counter(lpstep);
  position: absolute;
  top: -0.65rem;
  left: 1.25rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--so-blue);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-step h3 {
  margin: 0.5rem 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--so-text);
}

.lp-step p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--so-muted2);
  line-height: 1.5;
}

.lp-grid-2 {
  display: grid;
  gap: 1.25rem;
}

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

.lp-card {
  background: #fff;
  border: 1px solid var(--so-border);
  border-radius: var(--r);
  padding: 1.35rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 14, 71, 0.05);
}

.lp-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--so-text);
}

.lp-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--so-muted2);
  line-height: 1.55;
}

.lp-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-sm);
  background: var(--so-blue-light);
  color: var(--so-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.lp-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: center;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.lp-trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--so-muted2);
}

.lp-trust li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--so-ok);
  flex-shrink: 0;
}

.lp-cta-band {
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  background: var(--so-text);
  color: #fff;
}

.lp-cta-band .lp-section-title {
  color: #fff;
}

.lp-cta-band .lp-section-lead {
  color: rgba(255, 255, 255, 0.82);
}

.lp-cta-band .btn-search {
  margin-top: 0.5rem;
  background: var(--so-blue);
}

.lp-cta-band .btn-search:hover:not(:disabled):not(.is-loading) {
  background: #1a6fff;
}

.lp-footer-note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--so-muted);
  line-height: 1.5;
}

/* ─── FAQ ────────────────────────────────────────────────── */

.lp-faq-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lp-faq-item {
  border-bottom: 1px solid var(--so-border);
  padding: 1.35rem 0;
}

.lp-faq-item:first-child {
  border-top: 1px solid var(--so-border);
}

.lp-faq-item dt {
  font-size: 1rem;
  font-weight: 800;
  color: var(--so-text);
  margin-bottom: 0.6rem;
}

.lp-faq-item dd {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--so-muted2);
  line-height: 1.65;
}

/* ─── Bloc crédits ───────────────────────────────────────── */

.lp-credits-band {
  padding: 3rem 1.5rem 3.5rem;
  background: var(--so-blue-soft);
  border-top: 1px solid rgba(0, 94, 255, 0.12);
  border-bottom: 1px solid rgba(0, 94, 255, 0.12);
}

.lp-credits-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .lp-credits-inner {
    flex-direction: column;
    text-align: center;
  }
}

.lp-credits-copy {
  flex: 1;
}

.lp-credits-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--so-blue);
}

.lp-credits-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--so-text);
}

.lp-credits-body {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--so-muted2);
  line-height: 1.6;
  max-width: 52ch;
}

@media (max-width: 768px) {
  .lp-credits-body {
    max-width: none;
  }
}

.lp-credits-action {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.lp-credits-hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--so-muted);
}

/* ─── Page Aide ───────────────────────────────────────────── */

.aide-page {
  --aide-card-border: rgba(0, 94, 255, 0.14);
}

/* Ancres : remonter légèrement l’arrivée (header sticky) */
.aide-page :target {
  scroll-margin-top: 96px;
}

.aide-hero {
  background: var(--so-hero-bg);
  padding: 4rem 1.5rem 4.5rem;
  text-align: center;
  display: flex;
  justify-content: center;
}

.aide-hero-inner {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.aide-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--so-blue);
}

.aide-hero-title {
  margin: 0;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--so-text);
}

.aide-hero-sub {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--so-muted2);
  line-height: 1.6;
  max-width: 56ch;
}

/* ─── Grille colonnes attendues ─────────────────────────── */

.aide-cols-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

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

.aide-col-card {
  background: #fff;
  border: 1px solid var(--so-border);
  border-radius: var(--r);
  padding: 1.5rem 1.4rem 1.4rem;
  box-shadow: 0 2px 12px rgba(0, 14, 71, 0.05);
  position: relative;
}

.aide-col-card--required {
  border-color: var(--aide-card-border);
  box-shadow: 0 4px 20px rgba(0, 94, 255, 0.09);
}

.aide-col-badge {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--r-pill);
  background: var(--so-blue-soft);
  color: var(--so-muted2);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.aide-col-badge--required {
  background: var(--so-blue);
  color: #fff;
}

.aide-col-badge--optional {
  background: #f0f2f8;
  color: var(--so-muted);
}

.aide-col-card h3 {
  margin: 0.5rem 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--so-text);
}

.aide-col-card p {
  margin: 0 0 0.6rem;
  font-size: 0.9375rem;
  color: var(--so-muted2);
  line-height: 1.55;
}

.aide-col-card p:last-child {
  margin-bottom: 0;
}

.aide-col-examples {
  font-size: 0.8125rem !important;
  color: var(--so-muted) !important;
}

.aide-col-examples em {
  font-style: normal;
  background: var(--so-blue-soft);
  padding: 0.05em 0.3em;
  border-radius: 3px;
  color: var(--so-text);
}

/* ─── Tip / encadré conseil ─────────────────────────────── */

.aide-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid rgba(0, 94, 255, 0.18);
  border-left: 4px solid var(--so-blue);
  border-radius: var(--r-sm);
  margin-top: 1.5rem;
}

.aide-tip-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.aide-tip p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--so-muted2);
  line-height: 1.55;
}

.aide-tip strong {
  color: var(--so-text);
}

.aide-tip--notes {
  align-items: flex-start;
}

.aide-tip--notes p {
  margin: 0 0 0.6rem;
}

.aide-notes-list {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.aide-notes-list li {
  font-size: 0.9375rem;
  color: var(--so-muted2);
  line-height: 1.55;
}

/* ─── Tableau colonnes de sortie ────────────────────────── */

.aide-output-table-wrap {
  overflow-x: auto;
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
  margin-bottom: 1.75rem;
}

.aide-output-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9375rem;
}

.aide-output-table thead th {
  padding: 0.85rem 1.25rem;
  background: var(--so-text);
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  white-space: nowrap;
}

.aide-output-table thead th:first-child {
  border-radius: var(--r) 0 0 0;
}

.aide-output-table thead th:last-child {
  border-radius: 0 var(--r) 0 0;
}

.aide-output-table tbody tr {
  border-bottom: 1px solid var(--so-border);
  transition: background 0.15s;
}

.aide-output-table tbody tr:last-child {
  border-bottom: none;
}

.aide-output-table tbody tr:hover {
  background: var(--so-blue-soft);
}

.aide-output-table td {
  padding: 0.8rem 1.25rem;
  color: var(--so-muted2);
  line-height: 1.5;
}

.aide-col-name {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.8125rem !important;
  font-weight: 700;
  color: var(--so-blue) !important;
  white-space: nowrap;
  background: rgba(0, 94, 255, 0.04);
}

.aide-status-ok {
  color: var(--so-ok);
}

.aide-status-ko {
  color: var(--so-ko);
}

/* ─── Steps crédits ─────────────────────────────────────── */

.aide-credits-steps {
  margin-bottom: 0;
}

.aide-link {
  color: var(--so-blue);
  text-decoration: none;
  font-weight: 600;
}

.aide-link:hover {
  text-decoration: underline;
}

/* ─── Cartes tarifs ─────────────────────────────────────── */

.aide-tarifs-grid {
  margin-bottom: 0;
}

.aide-tarif-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.aide-tarif-card h3 {
  margin: 0.5rem 0 0.5rem;
}

.aide-tarif-card p {
  flex: 1;
  margin-bottom: 1.25rem;
}

.aide-tarif-card--featured {
  border-color: rgba(0, 94, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 94, 255, 0.1);
}

.aide-tarif-featured-badge {
  position: absolute;
  top: -0.75rem;
  right: 1.25rem;
  padding: 0.2rem 0.75rem;
  background: var(--so-blue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-radius: var(--r-pill);
}

.aide-tarif-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--so-blue);
  text-decoration: none;
  transition: gap 0.15s;
}

.aide-tarif-link:hover {
  text-decoration: underline;
  gap: 0.5rem;
}

/* ─── Lien aide dans le footer ─────────────────────────── */

.footer-nav-aide {
  color: var(--so-blue);
  font-weight: 600;
}

