/* plopcom.fr — Gaëtan Janssens
   Sobriété suisse, forêt de montagne. Aucune ressource tierce. */

/* ---------- Polices (auto-hébergées, SIL Open Font License) ---------- */
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-tight-400.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-tight-500.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-tight-600.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-tight-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --paper: #f7f6f2;      /* fond de page */
  --sheet: #ffffff;      /* surface */
  --ink: #18201c;        /* texte principal */
  --ink-2: #3d4742;      /* texte secondaire */
  --muted: #6a736d;      /* texte discret (brief : #77817b, foncé pour le contraste AA) */
  --rule: #d9ddd8;       /* filets */
  --fir: #1f4536;        /* accent sapin */
  --moss: #57735a;       /* titres de section (brief : #5d7a5f, foncé pour le contraste AA) */
  --lichen: #a8b59a;     /* décor */
  --tag-bg: #eef1ec;
  --on-fir: #ffffff;

  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --max: 72rem;
  --gutter: 1rem;
  --section: 4rem;

  color-scheme: light dark;
}

@media (min-width: 48rem) {
  :root { --gutter: 2.5rem; --section: 6rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121a16;
    --sheet: #18221d;
    --ink: #e8ebe6;
    --ink-2: #b9c2bb;
    --muted: #8f9a92;
    --rule: #2c3832;
    --fir: #9fbfa6;
    --moss: #8fae92;
    --lichen: #45584b;
    --tag-bg: #1f2b25;
    --on-fir: #121a16;
  }
}

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

html {
  -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.55;
  font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--lichen);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover { color: var(--fir); text-decoration-color: var(--fir); }

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

.mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: .6rem 1rem;
  background: var(--fir);
  color: var(--on-fir);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------- Barre du haut ---------- */
.topbar {
  position: relative;
  z-index: 1;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 2rem;
}
.brand {
  font-family: var(--mono);
  font-size: .8125rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
}
.nav a {
  font-family: var(--mono);
  font-size: .8125rem;
  color: var(--ink-2);
  text-decoration: none;
}
.nav a:hover { color: var(--fir); text-decoration: underline; text-decoration-color: var(--fir); }

@media (max-width: 47.99rem) {
  .nav { width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 3.5rem 4rem;
  border-bottom: 1px solid var(--rule);
}
.contours {
  position: absolute;
  top: 0;
  right: 0;
  width: min(34rem, 52vw);
  height: auto;
  opacity: .9;
  color: var(--lichen);
  pointer-events: none;
}
.contours path { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.contours path.idx { stroke-width: 1.6; }

.hero .wrap { position: relative; }

.hero-meta {
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 9vw, 5.25rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 12ch;
}
.hero .role {
  margin-top: 1rem;
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fir);
}
.hero .subtitle {
  margin-top: .25rem;
  font-size: clamp(1.125rem, 2.4vw, 1.375rem);
  color: var(--ink-2);
}
.hero .lede {
  margin-top: 2rem;
  max-width: 40rem;
  font-size: 1.125rem;
  color: var(--ink-2);
}
.hero .where {
  margin-top: 1.5rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2.25rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .75rem 1.375rem;
  border: 1px solid var(--fir);
  border-radius: 2px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--fir); color: var(--on-fir); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-secondary { background: transparent; color: var(--fir); }
.btn-secondary:hover { background: var(--fir); color: var(--on-fir); }
.btn .mono { margin-left: .5rem; font-size: .75rem; font-weight: 400; opacity: .85; }

@media (max-width: 29.99rem) {
  .btn { flex: 1 1 100%; }
}

@media (min-width: 48rem) {
  .hero { padding-block: 5.5rem 6rem; }
  .hero-meta { margin-bottom: 3.5rem; }
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--section);
  border-bottom: 1px solid var(--rule);
}
#contact { border-bottom: 0; }

.section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.25rem;
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--moss);
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.intro {
  max-width: 40rem;
  color: var(--ink-2);
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* ---------- Ce que je fais ---------- */
.domains {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--rule);
}
.domains li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.domains .num { color: var(--muted); padding-top: .2rem; }
.domains p { margin-top: .25rem; color: var(--ink-2); }

@media (min-width: 40rem) {
  .domains { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
}
@media (min-width: 64rem) {
  .domains { grid-template-columns: repeat(3, 1fr); }
  .domains li { padding-block: 1.75rem; }
}

/* ---------- Réalisations ---------- */
.projects {
  display: grid;
  gap: 1rem;
}
@media (min-width: 48rem) {
  .projects { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
.card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.375rem;
  background: var(--sheet);
  border-left: 2px solid var(--fir);
}
.card .meta { color: var(--muted); margin-bottom: .5rem; }
.card h3 { font-size: 1.25rem; }
.card h3 a { text-decoration-color: var(--lichen); }
.card h3 .ext { font-family: var(--mono); font-size: .8125rem; font-weight: 400; color: var(--muted); margin-left: .35rem; }
.card p { margin-top: .5rem; color: var(--ink-2); }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-top: auto;
  padding-top: 1.25rem;
}
.tags li {
  padding: .2rem .5rem;
  background: var(--tag-bg);
  color: var(--fir);
  font-family: var(--mono);
  font-size: .75rem;
  line-height: 1.5;
  border-radius: 2px;
}

/* ---------- Compétences ---------- */
.skills {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--rule);
}
.skills > div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding-block: .875rem;
  border-bottom: 1px solid var(--rule);
}
.skills dt { font-weight: 600; }
.skills dd { color: var(--ink-2); }

@media (min-width: 48rem) {
  .skills { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
  .skills > div { grid-template-columns: 9rem 1fr; padding-block: 1rem; }
}

/* ---------- Parcours ---------- */
.timeline { border-top: 1px solid var(--rule); }
.timeline li {
  display: grid;
  grid-template-columns: 1fr;
  gap: .125rem;
  padding-block: .875rem;
  border-bottom: 1px solid var(--rule);
}
.timeline .when { color: var(--muted); }
.timeline .what { font-weight: 600; }
.timeline .role { color: var(--ink-2); font-weight: 400; }
.education {
  margin-top: 1.5rem;
  color: var(--ink-2);
}
.education strong { font-weight: 600; color: var(--ink); }

@media (min-width: 40rem) {
  .timeline li { grid-template-columns: 9rem 1fr; gap: 1.5rem; align-items: baseline; }
  .education { padding-left: 10.5rem; }
}

/* ---------- Deux colonnes (Parcours / Au-delà) ---------- */
.split > section + section { margin-top: var(--section); }
@media (min-width: 64rem) {
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
  .split > section + section { margin-top: 0; }
  .split .education { padding-left: 0; }
}

/* ---------- Au-delà du code ---------- */
.beyond p {
  max-width: 40rem;
  font-size: 1.125rem;
  color: var(--ink-2);
}
.beyond p + p { margin-top: 1rem; }

/* ---------- Contact ---------- */
.contact-mail {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fir);
  word-break: break-word;
}
.contact-list {
  display: grid;
  gap: 0;
  margin-top: 2.5rem;
  max-width: 40rem;
  border-top: 1px solid var(--rule);
}
.contact-list > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: .75rem;
  padding-block: .75rem;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 40rem) {
  .contact-list > div { grid-template-columns: 7rem 1fr; gap: 1rem; }
}
.contact-list dt { color: var(--muted); padding-top: .15rem; }
.contact-list dd { overflow-wrap: anywhere; }

/* ---------- Pied de page ---------- */
.footer {
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
}
.footer a { color: var(--ink-2); }

/* ---------- Page de texte (mentions légales) ---------- */
.legal { padding-block: 3.5rem var(--section); }
.legal h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 3rem;
}
.legal section { max-width: 42rem; margin-bottom: 2.75rem; }
.legal .section-title { margin-bottom: 1.25rem; }
.legal p { color: var(--ink-2); }
.legal p + p { margin-top: .75rem; }
.legal .contact-list { margin-top: 0; }

/* ---------- Placeholders à compléter ---------- */
.todo {
  font-family: var(--mono);
  font-size: .8125rem;
  background: #fff3c4;
  color: #5c4500;
  padding: .05rem .3rem;
}

/* ---------- Impression ---------- */
@media print {
  :root {
    --paper: #fff; --sheet: #fff; --ink: #000; --ink-2: #222; --muted: #555;
    --rule: #bbb; --fir: #1f4536; --moss: #1f4536; --tag-bg: #fff;
  }
  @page { margin: 1.6cm 1.8cm; }
  body { font-size: 10.5pt; line-height: 1.45; }
  .skip, .nav, .actions, .contours { display: none !important; }
  .hero, .section { padding-block: 1.25rem; }
  .hero h1 { font-size: 30pt; }
  .card { border: 1px solid var(--rule); border-left: 2px solid var(--fir); padding: .8rem 1rem; }
  .tags li { border: 1px solid var(--rule); }
  .card, .domains li, .skills > div, .timeline li { break-inside: avoid; }
  .section-title { break-after: avoid; }
  a { text-decoration: none; }
  .card h3 a[href^="http"]::after { content: " (" attr(href) ")"; font-family: var(--mono); font-size: 8pt; font-weight: 400; color: var(--muted); }
  .card h3 .ext { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.legal .after-list { margin-top: 1rem; }
