/* ==========================================================================
   justine-pastor.fr — feuille de style unique
   Design system « Organic » (tokens ci-dessous) + mise en page du portfolio.
   CSS pur, aucun JavaScript, aucun build.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens du design system
   -------------------------------------------------------------------------- */
:root {
  --color-bg: #f5ead8;
  --color-surface: #ebddc5;
  --color-text: #201e1d;
  --color-accent: #c67139;
  --color-accent-2: #7a8a5e;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);

  /* Rampes tonales : même échelle de luminosité pour tous les rôles. */
  --color-neutral-100: #f9f4ed;
  --color-neutral-200: #eee7db;
  --color-neutral-300: #dcd3c4;
  --color-neutral-400: #c0b6a5;
  --color-neutral-500: #a19786;
  --color-neutral-600: #82796a;
  --color-neutral-700: #645c50;
  --color-neutral-800: #474238;
  --color-neutral-900: #2e2b25;

  --color-accent-100: #fff2eb;
  --color-accent-200: #ffe1d0;
  --color-accent-300: #ffc6a5;
  --color-accent-400: #f6a06b;
  --color-accent-500: #d67f48;
  --color-accent-600: #b2622d;
  --color-accent-700: #8c491a;
  --color-accent-800: #643312;
  --color-accent-900: #402310;

  --color-accent-2-100: #f0fae1;
  --color-accent-2-200: #e1eecc;
  --color-accent-2-300: #ccdbb2;
  --color-accent-2-400: #aebf92;
  --color-accent-2-500: #8fa073;
  --color-accent-2-600: #728157;
  --color-accent-2-700: #56633f;
  --color-accent-2-800: #3d472b;
  --color-accent-2-900: #272e1b;

  --font-heading: "Caprasimo", Georgia, serif;
  --font-heading-weight: 400;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2e2b25 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2e2b25 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2e2b25 22%, transparent);

  /* Repli pour les navigateurs sans color-mix() (Safari < 16.2, vieux Edge). */
  --text-72: #4a4846;
  --text-58: #6d6a68;
  --text-55: #757371;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* Halos colorés du fond. Peints par un calque fixe plutôt que par
   `background-attachment: fixed`, qui saccade (voire disparaît) sur iOS. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 460px at 82% -14%, var(--color-accent-200), transparent 68%),
    radial-gradient(700px 380px at 5% 34%, var(--color-accent-2-200), transparent 62%),
    var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 8.8px;
}
h6 {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

p { margin: 0 0 13.2px; }

a {
  color: var(--color-accent-700);
  text-underline-offset: 3px;
  text-decoration-color: var(--color-accent-300);
}
a:hover { color: var(--color-accent-800); }

img {
  display: block;
  max-width: 100%;
}

strong { font-weight: 700; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

.text-muted { color: var(--text-55); color: color-mix(in srgb, var(--color-text) 55%, transparent); }

/* Lien d'évitement clavier */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-md) 0;
  background: var(--color-accent-700);
  color: var(--color-bg);
  font-size: 14px;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
  color: var(--color-bg);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

section[id] { scroll-margin-top: 96px; }

/* --------------------------------------------------------------------------
   3. Boutons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 15px;
  line-height: 1.2;
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
}
.btn-primary:hover {
  background: var(--color-accent-600);
  color: var(--color-bg);
}
.btn-primary:active { background: var(--color-accent-700); }

.btn-secondary {
  border-color: var(--color-divider);
  color: var(--color-text);
}
.btn-secondary:hover {
  background: color-mix(in srgb, var(--color-text) 7%, transparent);
  color: var(--color-text);
}
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }

/* Variante posée sur une surface teintée (section contact) */
.btn-on-surface { background: var(--color-bg); }

.btn-sm {
  font-size: 14px;
  padding: 9px 18px;
}

/* --------------------------------------------------------------------------
   4. Navigation
   -------------------------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 19px;
  color: var(--color-text);
  text-decoration: none;
}
.nav-brand:hover { color: var(--color-text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
  transition: background-color 0.16s ease;
}
.nav-link:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   5. En-tête / hero
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0 72px;
}

.hero-kicker {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-2-700);
}

.hero-title {
  font-size: clamp(38px, 6.2vw, 60px);
  line-height: 1.04;
  margin: 20px 0 12px;
}

.hero-lede {
  font-size: 20px;
  max-width: 46ch;
  margin: 0 0 26px;
  color: var(--text-72);
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--text-58);
  color: color-mix(in srgb, var(--color-text) 58%, transparent);
}

.portrait-wrap {
  position: relative;
  justify-self: center;
}
.portrait-blob-a {
  position: absolute;
  inset: -18px -14px 24px -22px;
  border-radius: 999px;
  background: var(--color-accent-200);
}
.portrait-blob-b {
  position: absolute;
  right: -8px;
  bottom: 6px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--color-accent-2-300);
}
.portrait {
  position: relative;
  width: 250px;
  height: 250px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  background: var(--color-neutral-200);
}

/* --------------------------------------------------------------------------
   6. Sections génériques
   -------------------------------------------------------------------------- */
.section { padding: 8px 0 72px; }

.section-title {
  font-size: 34px;
  margin: 0 0 18px;
}

.section-lede {
  margin: 0 0 28px;
  font-size: 16px;
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 13px;
  line-height: 1.12;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-700);
}

.section-title--spaced { margin-bottom: 28px; }

/* --------------------------------------------------------------------------
   7. À propos
   -------------------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}

.about-text > .section-title { margin-bottom: 18px; }
.about-text p {
  font-size: 17px;
  line-height: 1.65;
  max-width: 56ch;
}
.about-text p:last-child { margin-bottom: 0; }

.facts {
  display: flex;
  flex-direction: column;
  gap: 8.8px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
}
.fact-list {
  display: grid;
  gap: 12px;
  font-size: 15px;
}
.fact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.fact-row strong { text-align: right; }

/* --------------------------------------------------------------------------
   8. Du Sud au Grand Est
   -------------------------------------------------------------------------- */
.journey {
  position: relative;
  overflow: hidden;
  background: var(--color-accent-100);
  border-radius: var(--radius-lg);
  padding: 44px 46px;
  box-shadow: var(--shadow-sm);
}
.journey-blob-a {
  position: absolute;
  top: -70px;
  right: -40px;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background: var(--color-accent-300);
  opacity: 0.55;
}
.journey-blob-b {
  position: absolute;
  top: 34px;
  right: 120px;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: var(--color-accent-2-300);
  opacity: 0.5;
}
.journey-body {
  position: relative;
  max-width: 62ch;
}
.journey-body .eyebrow { margin: 0 0 12px; }
.journey-body .section-title { margin: 0 0 16px; }
.journey-body p {
  font-size: 17px;
  line-height: 1.65;
  margin: 0 0 12px;
}
.journey-body p:last-child { margin: 0; }

.journey-path {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.chip {
  background: var(--color-bg);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
}
.chip-now {
  background: var(--color-accent-600);
  color: var(--color-bg);
}
.chip-arrow {
  align-self: center;
  font-size: 18px;
  color: var(--color-accent-600);
}

.traits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.trait {
  background: var(--color-neutral-100);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.trait h3 {
  font-size: 18px;
  margin: 0 0 8px;
}
.trait p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   9. Compétences
   -------------------------------------------------------------------------- */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.skill {
  background: var(--color-neutral-100);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.skill h3 {
  font-size: 19px;
  margin: 0 0 10px;
}
.skill p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   10. Projet personnel
   -------------------------------------------------------------------------- */
.project {
  background: var(--color-accent-2-200);
  border-radius: var(--radius-lg);
  padding: 38px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}
.project .eyebrow {
  margin: 0 0 10px;
  color: var(--color-accent-2-800);
}
.project h2 {
  font-size: 28px;
  margin: 0 0 14px;
}
.project p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-accent-2-900);
}
.project p:last-child { margin: 0; }

.project-facts {
  display: grid;
  gap: 12px;
}
.project-fact {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   11. Parcours
   -------------------------------------------------------------------------- */
.timelines {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.timeline > .eyebrow { margin: 0 0 18px; }

.timeline-items {
  display: grid;
  gap: 22px;
  border-left: 2px solid var(--color-accent-300);
  padding-left: 22px;
}
.timeline-items--edu { border-left-color: var(--color-accent-2-300); }

.tl-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.tl-head h4 {
  font-size: 19px;
  margin: 0;
}
.tl-date {
  font-size: 13px;
  white-space: nowrap;
}
.tl-role {
  margin: 4px 0 8px;
  font-size: 15px;
  font-style: italic;
}
.tl-role--last { margin: 4px 0 0; }
.tl-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   12. Contact
   -------------------------------------------------------------------------- */
.contact { padding: 8px 0 40px; }
.contact-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 44px 44px 40px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.contact-card h2 {
  font-size: 36px;
  margin: 0 0 10px;
}
.contact-lede {
  max-width: 52ch;
  margin: 0 auto 26px;
  font-size: 17px;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.contact-actions .btn { padding: 13px 24px; }

/* --------------------------------------------------------------------------
   13. Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 26px 0 40px;
  font-size: 13px;
  color: var(--text-55);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.site-footer a {
  color: inherit;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   14. Page 404
   -------------------------------------------------------------------------- */
.notfound {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 62vh;
  padding: 64px 0;
}
.notfound h1 {
  font-size: clamp(34px, 6vw, 52px);
  margin: 0 0 14px;
}
.notfound p {
  font-size: 18px;
  max-width: 46ch;
  margin: 0 auto 26px;
}

/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 40px 0 56px;
  }
  .portrait-wrap {
    order: -1;
    justify-self: start;
  }
  .hero-lede { font-size: 19px; }

  .about {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .journey { padding: 36px 32px; }
  .journey-blob-b { display: none; }

  .traits,
  .skills { grid-template-columns: repeat(2, 1fr); }

  .project {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 32px 30px;
  }

  .timelines {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }

  .site-nav { gap: 10px; }
  .nav-links { gap: 2px; }
  /* Sur mobile on ne garde que l'appel à l'action : le sommaire prendrait
     deux lignes pour rien, la page se parcourt au pouce. */
  .nav-link { display: none; }

  .section { padding: 8px 0 56px; }
  .section-title { font-size: 28px; }

  .hero-kicker { font-size: 14px; }
  .hero-lede { font-size: 18px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .portrait,
  .portrait-blob-a { width: 200px; height: 200px; }
  .portrait-blob-a { inset: -14px -12px 20px -18px; }

  .about-text p,
  .journey-body p { font-size: 16px; }

  .journey { padding: 30px 24px; }
  .journey-blob-a {
    width: 150px;
    height: 150px;
    top: -50px;
    right: -30px;
  }
  .journey-path { gap: 8px; }
  .chip-arrow { display: none; }

  .traits,
  .skills { grid-template-columns: 1fr; }

  .facts { padding: 22px 22px; }
  .fact-row {
    flex-direction: column;
    gap: 2px;
  }
  .fact-row strong { text-align: left; }

  .project { padding: 26px 22px; }
  .project h2 { font-size: 24px; }

  .tl-head { flex-direction: column; gap: 2px; }

  .contact-card { padding: 32px 22px 30px; }
  .contact-card h2 { font-size: 28px; }
  .contact-lede { font-size: 16px; }
  .contact-actions .btn { flex: 1 1 100%; }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* --------------------------------------------------------------------------
   16. Confort & impression
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }
  .site-nav,
  .hero-actions,
  .contact-actions,
  .skip-link { display: none; }
  .journey-blob-a,
  .journey-blob-b,
  .portrait-blob-a,
  .portrait-blob-b { display: none; }
  .trait,
  .skill,
  .facts,
  .journey,
  .project,
  .contact-card { box-shadow: none; border: 1px solid #ddd; }
  .section { padding: 0 0 24px; page-break-inside: avoid; }
}
