/* Chastenay Corp : feuille de style unique, mobile d'abord, polices système */

:root {
  --ink: #1f2a37;
  --ink-strong: #111827;
  --muted: #4b5563;
  --line: #d9dee5;
  --soft: #f4f6f8;
  --paper: #ffffff;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --brand: "Avenir Next", Avenir, Futura, "Century Gothic", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --wrap: 68rem;
  --gutter: 1.25rem;
}

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--brand);
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

main:focus {
  outline: none;
}

ul {
  margin: 0;
  padding: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Masqué visuellement, lu par les lecteurs d'écran */
.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Lien d'évitement */
.skip {
  position: absolute;
  left: var(--gutter);
  top: -10rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
  outline-color: var(--ink);
}

/* En-tête */
.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 1.25rem;
  padding-bottom: 1rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.25rem;
}

.brand-mark {
  display: block;
  width: 6.75rem;
  height: auto;
}

.brand-name {
  display: block;
  font-family: var(--brand);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  /* compense l'espacement après la dernière lettre pour un centrage exact */
  margin-right: -0.16em;
  white-space: nowrap;
}

.lang ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.lang a {
  display: inline-block;
  min-width: 2.75rem;
  padding: 0.5rem 0.6rem;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--muted);
}

.lang a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.lang a[aria-current] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.main-nav {
  flex-basis: 100%;
  order: 3;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.25rem 1.25rem;
}

.main-nav a {
  display: inline-block;
  padding: 0.4rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.main-nav a:hover {
  text-decoration: underline;
}

.lang {
  order: 2;
}

@media (min-width: 56rem) {
  .header-inner {
    flex-wrap: nowrap;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .main-nav {
    flex-basis: auto;
    order: 2;
    margin-left: auto;
  }

  .main-nav ul {
    gap: 0 2rem;
  }

  .lang {
    order: 3;
  }
}

/* Accroche */
.hero {
  padding: 3.5rem 0 3.5rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 9vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tagline {
  margin: 1rem 0 2rem;
  font-family: var(--brand);
  font-size: clamp(1.0625rem, 3.6vw, 1.375rem);
  font-weight: 500;
  line-height: 1.4;
}

.lead {
  max-width: 40rem;
  font-size: 1.125rem;
  line-height: 1.7;
}

.signature {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.button {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.85rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border-radius: 2px;
}

.button:hover {
  background: var(--ink-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

@media (min-width: 48rem) {
  .hero {
    padding: 6rem 0 5.5rem;
  }

  .lead {
    font-size: 1.25rem;
  }
}

/* Sections de la page d'accueil */
.section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(1.625rem, 5vw, 2.25rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.section-intro {
  max-width: 40rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

@media (min-width: 48rem) {
  .section {
    padding: 5.5rem 0;
  }
}

/* Offre */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  list-style: none;
}

.card {
  padding: 1.5rem 1.5rem 1.25rem;
  background: var(--soft);
  border-top: 3px solid var(--ink);
}

.card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--muted);
  font-size: 1rem;
}

@media (min-width: 40rem) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 64rem) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hero .explain {
  max-width: 44rem;
  margin-top: 0.75rem;
  padding: 0.9rem 1.1rem;
  background: var(--soft);
  font-size: 0.98rem;
  color: var(--ink);
}

/* Épigraphe (Clarke) et récit de l'accroche */
.epigraph {
  margin: 1.75rem 0 1.5rem;
  padding-left: 1.1rem;
  border-left: 3px solid var(--ink);
}

.epigraph blockquote {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-strong);
}

.epigraph blockquote p {
  margin: 0;
}

.epigraph figcaption {
  margin-top: 0.4rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.hero p:not(.tagline):not(.signature) {
  max-width: 44rem;
}

/* Offre : moment et livrables, puis expertises */
.card .when {
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.card .label {
  font-weight: 600;
  color: var(--ink);
}

.skills-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.skills li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--paper);
}

/* Approche */
.principles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  list-style: none;
  margin-top: 2rem;
}

.principles li {
  padding-left: 1.25rem;
  border-left: 3px solid var(--ink);
}

.principles h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.principles p {
  color: var(--muted);
  margin: 0;
}

@media (min-width: 48rem) {
  .principles {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 3rem;
  }
}

/* Parcours */
.timeline {
  list-style: none;
  margin-top: 2rem;
  max-width: 52rem;
}

.timeline li {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.timeline li:last-child {
  border-bottom: 1px solid var(--line);
}

.timeline .when {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.timeline h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.timeline h3 .role {
  font-weight: 500;
}

.timeline p {
  margin: 0;
}

@media (min-width: 48rem) {
  .timeline li {
    display: grid;
    grid-template-columns: 9rem 1fr;
    column-gap: 2rem;
  }

  .timeline .when {
    grid-row: 1 / span 2;
    margin: 0.1rem 0 0;
  }
}

/* Contact */
.contact-list {
  display: grid;
  gap: 1.25rem;
  margin: 2rem 0 0;
}

.contact-list div {
  display: grid;
  gap: 0.15rem;
}

.contact-list dt {
  color: var(--muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-list dd {
  margin: 0;
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

@media (min-width: 48rem) {
  .contact-list {
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 2rem 4rem;
  }
}

/* Pages de texte (mentions légales, confidentialité, 404) */
.prose {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

/* colonne de lecture alignée à gauche sur le logo */
.prose > * {
  max-width: 44rem;
}

.prose h1 {
  font-size: clamp(1.875rem, 6vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.prose h2 {
  font-size: 1.3125rem;
  font-weight: 600;
  margin: 2.5rem 0 0.75rem;
}

.prose ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose .updated {
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.facts {
  margin: 0 0 1rem;
}

.facts div {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  font-size: 0.9375rem;
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (min-width: 40rem) {
  .facts div {
    display: grid;
    grid-template-columns: 13rem 1fr;
    column-gap: 1.5rem;
  }
}

@media (min-width: 48rem) {
  .prose {
    padding-top: 4.5rem;
    padding-bottom: 5.5rem;
  }
}

.notfound + .notfound {
  padding-top: 0;
}

/* Pied de page */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 2.5rem 0 3rem;
  font-size: 0.9375rem;
}

.site-footer a {
  color: var(--paper);
}

.site-footer :focus-visible {
  outline-color: var(--paper);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.5rem 1.75rem;
  margin-bottom: 1.25rem;
}

.site-footer li a {
  display: inline-block;
  padding: 0.25rem 0;
  font-weight: 500;
}

.site-footer p {
  margin: 0 0 0.4rem;
}

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

@media print {
  .skip,
  .main-nav,
  .lang,
  .button {
    display: none;
  }

  .site-footer {
    background: none;
    color: #000;
  }

  .site-footer a {
    color: #000;
  }
}
