/* Jacteur — site vitrine. Une seule famille (Bricolage Grotesque, auto-hébergée, OFL). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 100%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 100%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --bleu: #1b2cc1; /* bleu de travail : le fond de la parole */
  --nuit: #0a0f3c; /* encre */
  --papier: #f5f6fc; /* fond des sections écrites */
  --stabilo: #ffe14a; /* ce que Jacteur garde */
  --rature: #ff7aa2; /* ce que Jacteur retire */
  --gris: #5a6090;

  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 62ch;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--nuit);
  background: var(--papier);
  font-optical-sizing: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid var(--stabilo);
  outline-offset: 3px;
}
.papier :focus-visible,
.legal :focus-visible {
  outline-color: var(--bleu);
}

.skip {
  position: absolute;
  left: -999rem;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--stabilo);
  color: var(--nuit);
  padding: 0.5rem 0.75rem;
}

/* ---------- En-tête ---------- */

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.5rem var(--gutter);
}
.top .nom {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.top nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  flex-wrap: wrap;
  font-size: 1rem;
}
.top nav a {
  text-decoration: none;
}
.top nav a:hover {
  text-decoration: underline;
}

.parole {
  background: var(--bleu);
  color: #fff;
}

/* ---------- Héros : la phrase dite, puis la phrase écrite ---------- */

.hero {
  padding: clamp(2rem, 7vw, 6rem) var(--gutter) clamp(3rem, 8vw, 7rem);
}
.hero h1 {
  font-size: 1.125rem;
  font-weight: 400;
  max-width: 44ch;
  opacity: 0.9;
}
.dit {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  font-size: clamp(2.25rem, 7.4vw, 7rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 17ch;
  text-wrap: balance;
}
.dit .m {
  transition: opacity 0.18s linear;
}
.dit .x {
  /* mot retiré : barré d'un trait qui se trace */
  color: color-mix(in srgb, #fff 55%, var(--bleu));
  background: linear-gradient(var(--rature), var(--rature)) no-repeat 0 58% / 100% 0.07em;
  transition: background-size 0.35s ease-out, color 0.35s linear, opacity 0.18s linear;
}
.ecrit {
  margin-top: clamp(2rem, 5vw, 4rem);
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  transition: opacity 0.4s linear, transform 0.4s ease-out;
}
.ecrit p:first-child {
  font-size: clamp(1.5rem, 3.4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--nuit);
  background: var(--stabilo);
  padding: 0.12em 0.35em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.ecrit .suite {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  margin-top: 0.75rem;
}
.note {
  font-size: 0.95rem;
  opacity: 0.85;
  max-width: 46ch;
}

/* États d'animation : sans JS (ou mouvement réduit), tout est visible et barré. */
.anime .dit .m {
  opacity: 0;
}
.anime .dit .m.la {
  opacity: 1;
}
.anime .dit .x {
  color: #fff;
  background-size: 0 0.07em;
}
.anime .dit.corrige .x {
  color: color-mix(in srgb, #fff 55%, var(--bleu));
  background-size: 100% 0.07em;
}
.anime .ecrit {
  opacity: 0;
  transform: translateY(0.5rem);
}
.anime .ecrit.la {
  opacity: 1;
  transform: none;
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.btn.plein {
  background: #fff;
  color: var(--bleu);
  border-color: #fff;
}
.papier .btn.plein {
  background: var(--bleu);
  color: #fff;
  border-color: var(--bleu);
}
.btn:hover {
  background: var(--stabilo);
  border-color: var(--stabilo);
  color: var(--nuit);
}
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ---------- Sections ---------- */

.bloc {
  padding: clamp(3.5rem, 9vw, 8rem) var(--gutter);
}
.bloc > h2 {
  font-size: clamp(2rem, 4.6vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 18ch;
  text-wrap: balance;
}
.bloc > .chapo {
  margin-top: 1.25rem;
  max-width: var(--measure);
  font-size: 1.25rem;
}

/* Avant / après : ce qui est dit à gauche, ce qui est écrit à droite */
.paires {
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}
.paire {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1rem clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  padding-top: 1.5rem;
  border-top: 2px solid var(--nuit);
}
.paire h3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.paire h3 + p {
  margin-top: 0.6rem;
  color: var(--gris);
  max-width: 38ch;
}
.paire blockquote {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.paire blockquote s {
  text-decoration-color: var(--rature);
  text-decoration-thickness: 0.09em;
  color: var(--gris);
}
.paire blockquote + p {
  margin-top: 1rem;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.3;
  font-weight: 700;
}
mark {
  background: var(--stabilo);
  color: var(--nuit);
  padding: 0.05em 0.25em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Section Google : texte + liste de faits */
.deux {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: clamp(2rem, 5vw, 5rem);
}
.deux h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.deux p + p {
  margin-top: 0.9rem;
}
.faits {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.faits li {
  padding-left: 1.6rem;
  position: relative;
}
.faits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.9rem;
  height: 0.35rem;
  background: var(--stabilo);
}
.faits.non li::before {
  background: var(--rature);
}
.perimetre {
  margin-top: 1.25rem;
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.perimetre dt {
  font-weight: 700;
  margin-top: 0.9rem;
}
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
}

/* Téléchargement */
.os {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 2rem clamp(1.5rem, 4vw, 4rem);
}
.os li {
  border-top: 2px solid currentColor;
  padding-top: 1.25rem;
}
.os h3 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.os p {
  margin: 0.4rem 0 1.25rem;
  opacity: 0.85;
  font-size: 1rem;
}

/* Tarifs */
.tarifs {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.5rem;
  max-width: 62rem;
}
.tarif {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 2px solid var(--nuit);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.tarif.pro {
  background: var(--nuit);
  color: #fff;
}
.tarif h3 {
  font-size: 1.5rem;
  font-weight: 700;
}
.tarif .prix {
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.tarif .prix small {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
}
.tarif ul {
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
  align-content: start;
  font-size: 1rem;
  flex: 1;
}
.tarif .btn {
  align-self: start;
}
.tarif.pro .btn:not(:hover) {
  color: #fff;
}

/* ---------- Pied ---------- */

.pied {
  background: var(--nuit);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 2rem;
  font-size: 1rem;
}
.pied .nom {
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.03em;
}
.pied ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.pied p {
  max-width: 34ch;
  opacity: 0.85;
}

/* ---------- Pages légales ---------- */

.legal {
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(4rem, 8vw, 7rem);
}
.legal h1 {
  font-size: clamp(2.25rem, 6vw, 4.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  max-width: 16ch;
  text-wrap: balance;
}
.legal .maj {
  margin-top: 1rem;
  color: var(--gris);
}
.legal .resume {
  margin-top: 2rem;
  max-width: var(--measure);
  font-size: 1.3rem;
  line-height: 1.45;
}
.legal h2 {
  margin-top: 3.5rem;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 28ch;
  scroll-margin-top: 1.5rem;
}
.legal h3 {
  margin-top: 1.75rem;
  font-size: 1.2rem;
  font-weight: 700;
}
.legal p,
.legal ul,
.legal ol,
.legal .tableau {
  margin-top: 1rem;
  max-width: var(--measure);
}
.legal li + li {
  margin-top: 0.4rem;
}
.legal a {
  color: var(--bleu);
}
.legal .tableau {
  max-width: 60rem;
  overflow-x: auto;
}
.legal table {
  border-collapse: collapse;
  width: 100%;
  font-size: 1rem;
}
.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem 0.75rem 0;
  border-top: 1px solid color-mix(in srgb, var(--nuit) 25%, transparent);
}
.legal thead th {
  border-top: 2px solid var(--nuit);
}
.legal .encadre {
  margin-top: 1.5rem;
  max-width: var(--measure);
  padding: 1.25rem 1.5rem;
  background: var(--stabilo);
}
.legal .encadre p {
  margin-top: 0;
}
.legal .encadre a {
  color: var(--nuit);
}

@media (max-width: 46rem) {
  .paire {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* ---------- Utilitaires ---------- */

.visually {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.deux h3.suivant {
  margin-top: 2rem;
}
.deux p.renvoi {
  margin-top: 1.5rem;
}
.bloc.colle {
  padding-top: 0;
}
code {
  overflow-wrap: anywhere;
}
.legal table {
  min-width: 34rem;
}
