/* AudienceFlow : styles communs à toutes les pages (complète Tailwind 2 par CDN) */

/* Polices hébergées dans le dépôt (licence SIL OFL, voir /fonts) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/space-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/space-mono-latin-700-normal.woff2') format('woff2'); }

/* Design system « Surligneur » (design-system.md), composants partagés générés par Gemini */
:root {
  --paper: #faf8f3;
  --ink: #111111;
  --ink-soft: #44403c;
  --muted: #57534e;
  --highlight: #fcef9c;
  --grid-gray: #e7e3d8;
  --sheet-head: #f1eee6;
  --sheet-white: #ffffff;

  /* Anciens jetons, rattachés à la nouvelle palette */
  --accent: var(--ink);
  --accent-dark: var(--ink-soft);
  --accent-soft: var(--sheet-head);
  --accent-line: var(--grid-gray);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  line-height: 1.5;
}

h1, h2, h3, .font-heading {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.font-mono {
  font-family: 'Space Mono', monospace;
  text-transform: none;
}

:target { scroll-margin-top: 88px; }

a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, .sheet-scroll:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* Aides */
.highlight-inline {
  background-color: var(--highlight);
  padding: 0 0.15em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.text-soft { color: var(--ink-soft); }
.text-muted { color: var(--muted); }
.spreadsheet-bg {
  background-image:
    linear-gradient(to right, var(--grid-gray) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-gray) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Lien d'évitement */
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 60;
  background: var(--sheet-white); color: var(--ink); padding: 8px 12px; border: 1px solid var(--ink);
}
.skip-link:focus { left: 8px; }

/* Couleur d'accent */
.text-accent { color: var(--ink); }
.bg-accent-soft { background: var(--sheet-head); }
.border-accent { border-color: var(--ink); }
.link { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--ink-soft); }

/* Bande encre : le texte blanc reste lisible */
.hero-bg {
  background: var(--ink);
}

.logo-mark { color: var(--ink); }
.logo-mark .logo-highlight { fill: var(--highlight); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  padding: 0.8rem 1.4rem; border-radius: 0;
  border: 1px solid var(--ink); text-align: center; line-height: 1.25;
  transition: background-color 0.15s ease, color 0.15s ease;
  text-transform: none;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-soft); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--sheet-head); }
.btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.875rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper); border-bottom: 1px solid var(--ink);
}
.site-header .btn { border-radius: 0; }
.site-header .nav-link { color: var(--ink-soft); font-weight: 500; }
.site-header .nav-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.nav-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* Étiquettes */
.tag {
  display: inline-flex; align-items: center;
  font-family: 'Space Mono', monospace; font-size: 0.75rem; font-weight: 400;
  padding: 0.25rem 0.6rem; border-radius: 0;
  background: var(--sheet-head); color: var(--ink); border: 1px solid var(--ink);
}
.tag-neutral { background: transparent; color: var(--muted); border-color: var(--grid-gray); }

/* Cartes */
.card { background: var(--sheet-white); border: 1px solid var(--ink); border-radius: 0; }

/* Numéros d'étape */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 0; flex-shrink: 0;
  background: var(--sheet-white); color: var(--ink); font-family: 'Space Mono', monospace;
  font-weight: 700; border: 1px solid var(--ink);
}

/* Faux tableur */
.sheet {
  border: 1px solid var(--ink); border-radius: 0; overflow: hidden;
  background: var(--sheet-white); box-shadow: none;
}
.sheet-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.6rem 0.9rem; background: var(--sheet-white); border-bottom: 1px solid var(--ink);
  font-family: 'Space Mono', monospace; font-size: 0.75rem; color: var(--ink);
}
.sheet-file { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; min-width: 0; }
.sheet-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-scroll { overflow: auto; max-height: 23rem; -webkit-overflow-scrolling: touch; }
.sheet table { border-collapse: separate; border-spacing: 0; width: 100%; font-family: 'Space Mono', monospace; font-size: 0.75rem; counter-reset: ligne; }
.sheet th, .sheet td {
  padding: 0.5rem 0.75rem; white-space: nowrap; text-align: left;
  border-right: 0.5px solid var(--grid-gray); border-bottom: 0.5px solid var(--grid-gray);
}
.sheet thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--ink); color: #fff; font-weight: 700; border-right: 0.5px solid var(--ink-soft);
}
.sheet tbody td { color: var(--ink); background: var(--sheet-white); }
.sheet tbody tr:nth-child(even) td { background: var(--sheet-white); }
.sheet tbody tr.is-cible td { background-color: var(--highlight) !important; }
/* Numéros de ligne, comme dans un tableur */
.sheet tr::before {
  display: table-cell; content: ""; width: 32px; padding: 0.5rem 0.4rem; text-align: center;
  background: var(--sheet-head); color: var(--muted); font-size: 0.75rem;
  border-right: 1px solid var(--grid-gray); border-bottom: 0.5px solid var(--grid-gray);
}
.sheet thead tr::before { position: sticky; top: 0; z-index: 1; content: ""; background: var(--ink); border-right: 1px solid var(--ink-soft); border-bottom: 0; }
.sheet tbody tr::before { counter-increment: ligne; content: counter(ligne); }
.pill {
  display: inline-block; font-size: 0.65rem; font-weight: 700;
  padding: 0 4px; border-radius: 0; background: var(--ink); color: var(--highlight);
  text-transform: none;
}

/* Tableau des tarifs */
.pricing { width: 100%; border-collapse: collapse; border: 1px solid var(--ink); }
.pricing th, .pricing td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--grid-gray); }
.pricing thead th {
  font-family: 'Space Mono', monospace; font-size: 0.8125rem; font-weight: 400;
  color: var(--ink); background: var(--sheet-head);
}
.pricing tbody tr:last-child td { border-bottom: 0; }
.pricing td:last-child, .pricing th:last-child { text-align: right; white-space: nowrap; }
.pricing td:last-child {
  font-family: 'Space Mono', monospace; font-weight: 700;
  font-size: 1.125rem; color: var(--ink);
}

/* FAQ en details / summary, sans JavaScript */
.faq details { border-bottom: 1px solid var(--ink); }
.faq details:first-child { border-top: 1px solid var(--ink); }
.faq summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 0; cursor: pointer; font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; color: var(--ink); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex-shrink: 0; font-family: 'Inter', sans-serif; font-size: 1.4rem;
  line-height: 1; font-weight: 400; color: var(--ink);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 1.25rem; color: var(--ink-soft); max-width: 46rem; }

/* Formulaire */
.field label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--ink); margin-bottom: 0.4rem; }
.field input {
  width: 100%; padding: 0.75rem 0.9rem; font-size: 1rem; color: var(--ink);
  border: 1px solid var(--ink); border-radius: 0; background: var(--sheet-white);
}
.field input:focus { outline: 3px solid var(--ink); outline-offset: 2px; }
.field input::placeholder { color: var(--muted); }

/* Pages de texte (mentions légales, confidentialité) */
.prose h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem;
  font-weight: 700; color: var(--ink); margin: 2.25rem 0 0.75rem;
}
.prose p, .prose li { color: var(--ink-soft); line-height: 1.7; }
.prose p + p { margin-top: 0.75rem; }
.prose a { color: var(--ink); text-decoration: underline; font-weight: 600; }
.prose ul { list-style: disc; padding-left: 1.25rem; margin-top: 0.75rem; }
.prose li + li { margin-top: 0.35rem; }

/* Hero : design system « Surligneur » (généré par Gemini, voir design-system.md) */
.hero {
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.5;
}
.hero h1, .hero .font-heading {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}
.hero h1 { text-wrap: balance; }
.hero .font-mono {
  font-family: 'Space Mono', monospace;
  text-transform: none;
}
.hero .spreadsheet-bg {
  background-image:
    linear-gradient(to right, var(--grid-gray) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-gray) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero .sheet-container {
  border: 1px solid var(--ink);
  background: var(--sheet-white);
}
.hero .sheet-header-black {
  background: var(--ink);
  color: var(--sheet-white);
}
.hero th, .hero td {
  border: 0.5px solid var(--grid-gray);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  white-space: nowrap;
}
.hero .row-number {
  width: 32px;
  background: var(--sheet-head);
  color: var(--muted);
  text-align: center;
  border-right: 1px solid var(--grid-gray);
}
.hero .highlight-row {
  background-color: var(--highlight) !important;
}
.hero .badge-target {
  background: var(--ink);
  color: var(--highlight);
  font-size: 0.65rem;
  padding: 0 4px;
  font-weight: bold;
}
.hero .btn-primary {
  background-color: var(--ink);
  color: #ffffff;
  border: 1px solid var(--ink);
  transition: background-color 0.15s ease;
}
.hero .btn-primary:hover {
  background-color: var(--ink-soft);
}
.hero .btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.hero .btn-secondary:hover {
  background: var(--grid-gray);
}
.hero .counter-box {
  border-left: 4px solid var(--ink);
  background: var(--sheet-white);
}
.hero .highlight-inline {
  background-color: var(--highlight);
  padding: 0 0.15em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hero .text-muted { color: var(--muted); }
.hero .text-soft { color: var(--ink-soft); }
.hero .spreadsheet-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.hero a:focus-visible, .hero .spreadsheet-wrapper:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* Hero : étiquette, carte de page entreprise et annotation (Gemini) */
.hero-label {
  display: inline-block;
  background: var(--highlight);
  padding: 0.25rem 0.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--ink);
}
.hero-page-card {
  border: 1px solid var(--ink);
  background: var(--sheet-white);
}
.hero-avatar-logo {
  background: var(--ink);
  color: var(--sheet-white);
  border: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-annotation {
  background-color: var(--highlight);
  font-family: 'Inter', sans-serif;
}
.hero-btn-mock {
  border: 1px solid var(--ink);
  background: var(--paper);
}
.hero-arrow-svg {
  stroke: var(--ink);
  fill: none;
}

/* Home : sections (Gemini) */
.etapes-line { left: calc(1.125rem - 0.5px); }
.preuve-stat { background: var(--sheet-head); border: 1px solid var(--ink); }

/* Bandes encre : contour de focus blanc, sauf dans les panneaux blancs */
.hero-bg a:focus-visible, .hero-bg button:focus-visible { outline-color: #fff; }
.hero-bg form a:focus-visible, .hero-bg form button:focus-visible { outline-color: var(--ink); }

/* Pied de page (Gemini) */
.site-footer { background-color: var(--paper); border-top: 1px solid var(--ink); }
.site-footer .separator { width: 1px; height: 2rem; background-color: var(--grid-gray); }
.site-footer .nav-link { color: var(--ink-soft); text-decoration: none; }
.site-footer .nav-link:hover { color: var(--ink); text-decoration: underline; }

/* Pages de cas client (Gemini) */
.case-sheet-head { background: var(--ink); color: var(--sheet-white); }
.case-row { border-bottom: 1px solid var(--grid-gray); }
.case-col { border-right: 1px solid var(--grid-gray); }
.case-table tr + tr td { border-top: 1px solid var(--grid-gray); }
.case-table td:first-child { border-right: 1px solid var(--grid-gray); }
.case-dot { width: 0.5rem; height: 0.5rem; margin-top: 0.4rem; background: var(--ink); flex-shrink: 0; }
.case-check { width: 0.5rem; height: 0.5rem; border: 1px solid var(--ink); flex-shrink: 0; }
.case-minus { width: 0.5rem; height: 1px; margin-top: 0.65rem; background: var(--muted); flex-shrink: 0; }

/* Page « Ouvrir l'accès » (Gemini) */
.acces-card { background: var(--sheet-white); border: 1px solid var(--ink); }
.acces-step-row + .acces-step-row { border-top: 1px solid var(--ink); }
.acces-schema-box { background: var(--sheet-head); border-top: 1px solid var(--grid-gray); }
@media (min-width: 1024px) {
  .acces-schema-box { border-top: 0; border-left: 1px solid var(--ink); }
}
.acces-placeholder-bar { height: 8px; background-color: var(--grid-gray); }
.acces-list-row { padding: 0.75rem; border-bottom: 1px solid var(--grid-gray); }
.acces-list-row:last-child { border-bottom: 0; }
.acces-arrow { width: 1rem; height: 1rem; flex-shrink: 0; }
.acces-radio-circle { width: 16px; height: 16px; border: 1px solid var(--ink); border-radius: 9999px; display: inline-block; flex-shrink: 0; background: var(--sheet-white); }
.acces-radio-checked { background-color: var(--ink); box-shadow: inset 0 0 0 3px var(--sheet-white); }
.acces-highlight-box { background-color: var(--highlight); }
.acces-marker { width: 4px; height: 16px; background-color: var(--ink); }
.acces-btn-mockup { display: inline-block; background-color: var(--ink); color: var(--sheet-white); padding: 8px 12px; font-family: 'Space Grotesk', sans-serif; font-size: 0.75rem; font-weight: 700; }
.acces-halo { outline: 4px solid var(--highlight); }
.acces-avatar { background: var(--grid-gray); border: 1px solid var(--ink); }
