/* =========================================================================
   Site vitrine — Steven Poulain
   Feuille de style unique. Aucune police externe, aucun CDN, aucun script.
   ========================================================================= */

/* ---------- Variables ---------- */

:root {
  --fond: #fdfdfc;
  --fond-doux: #f3f3f0;
  --texte: #17191b;
  --texte-doux: #5c6268;
  --trait: #e2e2de;
  --accent: #1a47c2;
  --accent-survol: #143a9f;
  --accent-texte: #ffffff;

  --largeur: 40rem;
  --marge-laterale: 1.5rem;
  --rayon: 6px;

  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #121417;
    --fond-doux: #1a1e23;
    --texte: #e9eaec;
    --texte-doux: #a2a8b0;
    --trait: #2a2f36;
    --accent: #8fb0ff;
    --accent-survol: #b3c8ff;
    --accent-texte: #101216;
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-underline-offset: 0.15em;
  -webkit-font-smoothing: antialiased;
}

.enveloppe {
  width: min(100% - (2 * var(--marge-laterale)), var(--largeur));
  margin-inline: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent-survol);
}

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

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--rayon);
  border: 1px solid var(--trait);
}

hr {
  border: 0;
  border-top: 1px solid var(--trait);
  margin: 2.5rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--fond-doux);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* ---------- Lien d'évitement ---------- */

.evitement {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--accent);
  color: var(--accent-texte);
  padding: 0.75rem 1rem;
  border-radius: 0 0 var(--rayon) 0;
  text-decoration: none;
}

.evitement:focus {
  left: 0;
  color: var(--accent-texte);
}

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

.entete {
  border-bottom: 1px solid var(--trait);
  padding: 1.75rem 0 1.25rem;
}

.entete__marque {
  display: block;
  text-decoration: none;
  color: inherit;
}

.entete__nom {
  display: block;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.entete__metier {
  display: block;
  font-size: 0.875rem;
  color: var(--texte-doux);
}

.entete__marque:hover .entete__nom {
  color: var(--accent);
}

.navigation {
  margin-top: 1.125rem;
}

.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.navigation a {
  display: inline-block;
  padding: 0.15rem 0;
  font-size: 0.9375rem;
  color: var(--texte-doux);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.navigation a:hover {
  color: var(--texte);
  border-bottom-color: var(--trait);
}

.navigation a[aria-current="page"] {
  color: var(--texte);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* ---------- Contenu ---------- */

.page {
  padding: 3rem 0 3.5rem;
}

.page h1 {
  font-size: clamp(1.875rem, 1.4rem + 2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

.page h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--trait);
  text-wrap: balance;
}

.page h3 {
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.5rem;
  text-wrap: balance;
}

.page p,
.page ul,
.page ol {
  margin: 0 0 1.15rem;
}

.page ul,
.page ol {
  padding-left: 1.25rem;
}

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

.page li::marker {
  color: var(--texte-doux);
}

.page blockquote {
  margin: 1.5rem 0;
  padding-left: 1.125rem;
  border-left: 3px solid var(--trait);
  color: var(--texte-doux);
}

/* Le paragraphe d'introduction n'est rien d'autre que le premier paragraphe
   du fichier Markdown : aucun texte à recopier dans l'en-tête du fichier. */
.page--texte > h1 + p {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--texte-doux);
  margin-bottom: 1.75rem;
}

.etat-vide {
  margin-top: 2rem;
  padding: 1.25rem 1.375rem;
  background: var(--fond-doux);
  border: 1px dashed var(--trait);
  border-radius: var(--rayon);
  color: var(--texte-doux);
}

.retour {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--trait);
  font-size: 0.9375rem;
}

.retour a::before {
  content: "← ";
}

/* ---------- Encadré (mise en avant dans le texte) ---------- */

.encadre {
  margin: 2rem 0;
  padding: 1.25rem 1.375rem;
  background: var(--fond-doux);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--rayon) var(--rayon) 0;
}

.encadre > *:first-child {
  margin-top: 0;
}

.encadre > *:last-child {
  margin-bottom: 0;
}

.encadre p {
  margin-bottom: 0.85rem;
}

/* ---------- Listes de projets et d'articles ---------- */

.liste {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.liste__element {
  padding: 1.5rem 0;
  border-top: 1px solid var(--trait);
}

.liste__titre {
  font-size: 1.1875rem;
  margin: 0 0 0.35rem;
  border: 0;
  padding: 0;
}

.liste__titre a {
  text-decoration: none;
}

.liste__titre a:hover {
  text-decoration: underline;
}

.liste__meta {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: var(--texte-doux);
}

.liste__resume {
  margin: 0;
  color: var(--texte-doux);
}

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

.bouton {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border-radius: var(--rayon);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  border: 1px solid transparent;
}

.bouton--principal {
  background: var(--accent);
  color: var(--accent-texte);
  border-color: var(--accent);
}

.bouton--principal:hover {
  background: var(--accent-survol);
  border-color: var(--accent-survol);
  color: var(--accent-texte);
}

.bouton--secondaire {
  background: transparent;
  color: var(--accent);
  border-color: var(--trait);
}

.bouton--secondaire:hover {
  border-color: var(--accent);
  color: var(--accent-survol);
}

/* ---------- Appel à l'action ---------- */

.appel-action {
  background: var(--fond-doux);
  border-top: 1px solid var(--trait);
  border-bottom: 1px solid var(--trait);
  padding: 2.75rem 0 3rem;
}

.appel-action__interieur {
  width: min(100% - (2 * var(--marge-laterale)), var(--largeur));
  margin-inline: auto;
}

.appel-action h2 {
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}

.appel-action__texte {
  margin: 0 0 1.5rem;
  color: var(--texte-doux);
}

.appel-action__boutons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.appel-action__note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--texte-doux);
}

/* ---------- Pied de page ---------- */

.pied {
  padding: 2.5rem 0 3rem;
  font-size: 0.875rem;
  color: var(--texte-doux);
}

.pied__liens ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.pied__liens a {
  color: var(--texte-doux);
  text-decoration: none;
  border-bottom: 1px solid var(--trait);
}

.pied__liens a:hover {
  color: var(--texte);
}

.pied__contact {
  margin: 0 0 1rem;
}

.pied__note,
.pied__mention {
  margin: 0 0 0.35rem;
}

.pied__mention {
  color: var(--texte-doux);
  opacity: 0.8;
}

/* ---------- Impression ---------- */

@media print {
  .evitement,
  .navigation,
  .appel-action {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
