/* The Ant | theant.ch
   Palette tirée de la fourmi : chitine brun-noir, ambre fossile, pierre et mousse. */

:root {
  --papier: #ECEEE8;
  --papier-clair: #F5F6F2;
  --chitine: #241A14;
  --chitine-doux: #54483F;
  --ambre: #B06A12;
  --ambre-texte: #8A500C;
  --ambre-clair: #E2B562;
  --mousse: #5B6753;
  --trait: rgba(36, 26, 20, .16);

  --serif: "Bodoni Moda", "Bodoni 72", "Didot", "GFS Didot", Georgia, serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(5rem, 11vw, 9rem);
}

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--chitine);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ambre);
  outline-offset: 3px;
  border-radius: 2px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mark-gaster { fill: var(--ambre); }
.crumb { fill: var(--ambre); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: .6rem 1rem;
  background: var(--chitine);
  color: var(--papier);
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 500 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--chitine); color: var(--papier-clair); }
.btn-primary:hover { background: #3A2B21; }
.btn-quiet { border-color: var(--chitine); color: var(--chitine); }
.btn-quiet:hover { background: var(--chitine); color: var(--papier-clair); }
.btn-light { background: var(--ambre-clair); color: var(--chitine); }
.btn-light:hover { background: #EDC67E; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- En-tête ---------- */
.site-header { padding-block: 1.5rem; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}
.brand-mark { width: 2.4rem; height: 2.4rem; color: var(--chitine); }
.brand-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.6vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  text-decoration: none;
  font-size: .975rem;
  padding-block: .4rem;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size .25s;
}
.nav a:hover { background-size: 100% 1px; }
.nav .nav-contact {
  padding: .55rem 1.1rem;
  border: 1px solid var(--chitine);
  border-radius: 999px;
  background: none;
}
.nav .nav-contact:hover { background: var(--chitine); color: var(--papier-clair); }

@media (max-width: 720px) {
  .nav-optional { display: none; }
}

/* ---------- Héros ---------- */
.hero { padding-top: clamp(3rem, 8vw, 6.5rem); }
.hero-inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2rem);
  row-gap: 2.5rem;
  align-items: end;
}
.hero h1 {
  grid-column: 1 / span 8;
  font-family: var(--serif);
  font-size: clamp(3rem, 8.2vw, 7.25rem);
  line-height: .98;
  letter-spacing: -.02em;
  max-width: 11ch;
  text-wrap: balance;
}
.hero-text {
  grid-column: 9 / span 4;
  padding-bottom: .6rem;
}
.lede {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--chitine-doux);
  max-width: 34ch;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.75rem;
}

@media (max-width: 960px) {
  .hero h1 { grid-column: 1 / -1; max-width: 12ch; }
  .hero-text { grid-column: 1 / span 9; }
  .lede { max-width: 46ch; }
}
@media (max-width: 600px) {
  .hero-text { grid-column: 1 / -1; }
}

/* La piste des fourmis */
.trail {
  height: clamp(150px, 16vw, 230px);
  margin-top: clamp(2rem, 5vw, 3.5rem);
  color: var(--chitine);
  overflow: hidden;
}
.trail svg { width: 100%; height: 100%; }
.trail-path {
  fill: none;
  stroke: var(--ambre);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: .1 11;
  opacity: .7;
}
.legs-a { animation: stride .32s ease-in-out infinite alternate; }
.legs-b { animation: stride .32s ease-in-out infinite alternate-reverse; }
@keyframes stride {
  from { transform: translateX(-.45px); }
  to   { transform: translateX(.45px); }
}

/* ---------- Énoncé ---------- */
.statement {
  padding-block: var(--section);
  border-top: 1px solid var(--trait);
}
.statement-inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2rem);
  row-gap: 2.5rem;
}
.statement-quote {
  grid-column: 1 / span 9;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  max-width: 22ch;
  text-wrap: balance;
}
.statement-body {
  grid-column: 6 / span 6;
  max-width: 60ch;
  color: var(--chitine-doux);
  font-size: 1.125rem;
}
@media (max-width: 860px) {
  .statement-quote, .statement-body { grid-column: 1 / -1; }
}

/* ---------- Titres de section ---------- */
.section-title {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -.01em;
}

/* ---------- Principes ---------- */
.principles {
  padding-block: 0 var(--section);
}
.principles .section-title { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 6vw, 6rem);
  row-gap: clamp(3rem, 6vw, 4.5rem);
}
.principle {
  padding-top: 1.5rem;
  border-top: 1px solid var(--chitine);
  max-width: 34rem;
}
.principle h3 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: .6rem;
}
.principle-echo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.45;
  color: var(--ambre-texte);
  margin-bottom: 1rem;
}
.principle p:not(.principle-echo) { color: var(--chitine-doux); }
@media (max-width: 720px) {
  .principles-grid { grid-template-columns: 1fr; }
}

/* ---------- Démarche ---------- */
.process {
  padding-block: var(--section);
  background: var(--papier-clair);
}
.process .section-title { margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.steps {
  --dot: 3.25rem;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* La piste qui relie les étapes */
.steps::before {
  content: "";
  position: absolute;
  top: calc(var(--dot) / 2);
  left: calc(var(--dot) / 2);
  right: 0;
  height: 2px;
  background: radial-gradient(circle, var(--ambre) 1.1px, transparent 1.4px) left center / 11px 2px repeat-x;
  opacity: .8;
}
.step { position: relative; }
.step-num {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--dot);
  height: var(--dot);
  margin-bottom: 1.5rem;
  border: 1px solid var(--chitine);
  border-radius: 50%;
  background: var(--papier-clair);
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1;
}
.step h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: .6rem;
}
.step p {
  color: var(--chitine-doux);
  max-width: 30ch;
}
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 2.25rem; }
  .steps::before { display: none; }
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: calc(var(--dot) + .35rem);
    bottom: calc(-2.25rem + .35rem);
    left: calc(var(--dot) / 2 - 1px);
    width: 2px;
    background: radial-gradient(circle, var(--ambre) 1.1px, transparent 1.4px) center top / 2px 11px repeat-y;
    opacity: .8;
  }
  .step {
    display: grid;
    grid-template-columns: var(--dot) 1fr;
    column-gap: 1.25rem;
  }
  .step-num { grid-row: 1 / span 2; margin-bottom: 0; }
  .step h3 { align-self: center; margin-top: .55rem; }
  .step p { grid-column: 2; max-width: 46ch; }
}

/* ---------- Rejoindre ---------- */
.join { padding-block: var(--section); }
.join-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.join-text p {
  max-width: 50ch;
  margin: 1.25rem 0 2rem;
  font-size: 1.125rem;
  color: var(--chitine-doux);
}
.join-mark {
  justify-self: center;
  width: min(100%, 300px);
  aspect-ratio: 1;
  height: auto;
  color: var(--chitine);
  transform: rotate(18deg);
  --mark-stroke: 1.05;
}
@media (max-width: 760px) {
  .join-inner { grid-template-columns: 1fr; }
  .join-mark { width: 150px; justify-self: start; order: -1; }
}

/* ---------- Contact ---------- */
.contact {
  background: var(--chitine);
  color: var(--papier);
  padding-top: var(--section);
}
.contact ::selection { background: var(--ambre-clair); color: var(--chitine); }
.contact :focus-visible { outline-color: var(--ambre-clair); }
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}
.contact-intro p {
  margin-top: 1.25rem;
  max-width: 36ch;
  font-size: 1.125rem;
  color: rgba(236, 238, 232, .78);
}
@media (max-width: 860px) {
  .contact-inner { grid-template-columns: 1fr; }
}

.form { display: grid; gap: 1.6rem; }
.field { display: grid; gap: .45rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}
.field label, .field legend {
  font-size: .95rem;
  font-weight: 500;
  color: var(--papier);
  padding: 0;
}
.optional { font-weight: 400; color: rgba(236, 238, 232, .6); }
.field-hint {
  margin: -.15rem 0 .1rem;
  font-size: .925rem;
  color: rgba(236, 238, 232, .66);
}
.field input,
.field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid rgba(236, 238, 232, .28);
  border-radius: 6px;
  background: rgba(236, 238, 232, .05);
  color: var(--papier);
  font: 400 1.0625rem/1.5 var(--sans);
  transition: border-color .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:hover,
.field textarea:hover { border-color: rgba(236, 238, 232, .5); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ambre-clair);
  background: rgba(236, 238, 232, .09);
  box-shadow: 0 0 0 3px rgba(226, 181, 98, .25);
}
.field [aria-invalid="true"] { border-color: #F0A38A; }
.field-error {
  margin: 0;
  font-size: .925rem;
  color: #F5B9A6;
}

.intents legend { margin-bottom: .65rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { position: relative; cursor: pointer; }
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.chip span {
  display: inline-block;
  padding: .6rem 1.1rem;
  border: 1px solid rgba(236, 238, 232, .35);
  border-radius: 999px;
  font-size: .975rem;
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover span { border-color: var(--papier); }
.chip input:checked + span {
  background: var(--papier);
  border-color: var(--papier);
  color: var(--chitine);
}
.chip input:focus-visible + span {
  outline: 2px solid var(--ambre-clair);
  outline-offset: 3px;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: .4rem;
}
.privacy {
  flex: 1 1 16rem;
  margin: 0;
  font-size: .9rem;
  color: rgba(236, 238, 232, .6);
}
.form-status { margin: 0; font-size: 1.05rem; }
.form-status:empty { display: none; }
.form-status.is-success { color: var(--ambre-clair); }
.form-status.is-error { color: #F5B9A6; }

/* ---------- Pied de page ---------- */
.site-footer {
  margin-top: var(--section);
  padding-block: 2rem 2.5rem;
  border-top: 1px solid rgba(236, 238, 232, .14);
  font-size: .925rem;
  color: rgba(236, 238, 232, .7);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.footer-inner p { margin: 0; }
.brand-small .brand-mark { width: 1.9rem; height: 1.9rem; color: var(--papier); }
.brand-small .brand-name { font-size: 1.2rem; color: var(--papier); }

/* ---------- Pages simples (merci, 404) ---------- */
.simple {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}
.simple-main {
  display: grid;
  align-content: center;
  padding-block: 4rem 6rem;
}
.simple-main h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -.015em;
  max-width: 16ch;
  margin-bottom: 1.25rem;
}
.simple-main p {
  max-width: 46ch;
  font-size: 1.125rem;
  color: var(--chitine-doux);
  margin-bottom: 2rem;
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .legs-a, .legs-b { animation: none; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
