/* Agnès Rabaca, site personnel
   Couleurs et typographie : brandbook v1.0 (juillet 2026) */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
}

:root {
  --ink: #273234;        /* anthracite */
  --ink-soft: #4d585a;   /* texte secondaire, contraste 7:1 sur blanc */
  --fuchsia: #ef0084;    /* jalons et repères, jamais en aplat */
  --rose: #f6e8e5;       /* beige rosé */
  --pearl: #f2f2f2;      /* gris perle */
  --taupe: #b8aca1;      /* lignes secondaires du logo */
  --white: #ffffff;

  --font: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space-section: clamp(4rem, 9vw, 7.5rem);
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.65;
  font-weight: 400;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 700;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: text-decoration-color 0.15s ease;
}
a:hover { text-decoration-color: var(--fuchsia); }

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  transform: translateY(-200%);
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { transform: none; }

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

.site-header {
  border-bottom: 1px solid var(--pearl);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  padding-block: 1.1rem;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--ink);
}
.mark { width: 2.4rem; height: auto; }
.lockup-name { font-size: 1.35rem; letter-spacing: -0.01em; line-height: 1; }
.lockup-name .first { font-weight: 300; }
.lockup-name .last { font-weight: 800; }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.98rem;
  font-weight: 500;
}
.nav-list a { text-decoration: none; padding-block: 0.3rem; }
.nav-list a:hover { text-decoration: underline; text-decoration-color: var(--fuchsia); }

/* ---------- Accueil ---------- */

.hero { padding-top: clamp(3rem, 7vw, 5.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hello {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 13ch;
}

.lead {
  margin-top: 1.75rem;
  font-size: clamp(1.15rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  max-width: 34em;
}
.facts {
  margin-top: 1rem;
  color: var(--ink-soft);
  max-width: 36em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 2.25rem;
}
.btn {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  padding: 0.85rem 1.4rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: #1b2426; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--rose); }
.btn-note { font-weight: 400; font-size: 0.9em; color: var(--ink-soft); }

/* Portrait dans un cadre ouvert, repris du monogramme */
.portrait {
  position: relative;
  margin: 0;
  padding: 1.1rem 0 1.1rem 1.1rem;
  justify-self: end;
  width: 100%;
  max-width: 26rem;
}
.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  position: relative;
}
.frame { position: absolute; pointer-events: none; }
.frame-top {
  top: 0;
  left: 0;
  width: 62%;
  height: 58%;
  border-top: 5px solid var(--ink);
  border-left: 5px solid var(--ink);
}
.frame-bottom {
  bottom: 0;
  left: 0;
  width: 34%;
  height: 16%;
  border-bottom: 5px solid var(--taupe);
  border-left: 5px solid var(--taupe);
}
.frame-top::after {
  content: "";
  position: absolute;
  top: -5px;
  left: calc(100% + 0.9rem);
  width: 0.9rem;
  height: 0.9rem;
  background: var(--fuchsia);
  transform: translateY(-0.45rem);
}

/* Trajectoire : imbroglio, jalons, trajectoire claire */
.trajectory {
  width: 100%;
  height: auto;
  margin-top: clamp(3rem, 7vw, 5rem);
  overflow: visible;
}
.traj-tangle, .traj-line {
  fill: none;
  stroke-width: 2.75;
  vector-effect: non-scaling-stroke; /* trait de même épaisseur sur mobile */
}
.traj-tangle {
  stroke: var(--taupe);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.traj-line { stroke: var(--ink); }
.traj-step { fill: var(--taupe); }
.traj-step.s1 { fill: var(--rose); stroke: var(--taupe); stroke-width: 1; }
.traj-step.s3 { fill: var(--ink); }
.traj-key { fill: var(--fuchsia); }

@media (prefers-reduced-motion: no-preference) {
  .traj-tangle, .traj-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
  }
  .traj-tangle { animation: draw 1.6s cubic-bezier(.45,.05,.35,1) 0.3s forwards; }
  .traj-line { animation: draw 0.9s cubic-bezier(.3,.1,.3,1) 1.85s forwards; }
  .traj-step {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: pop 0.35s ease-out forwards;
  }
  .traj-step.s1 { animation-delay: 0.9s; }
  .traj-step.s2 { animation-delay: 1.4s; }
  .traj-step.s3 { animation-delay: 2.25s; }
  .traj-step.s4 { animation-delay: 2.7s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--space-section); }
.section-rose { background: var(--rose); }
.section-pearl { background: var(--pearl); }

.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section-head h2, .edu-grid h2, .contact-grid h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}
.section-head p { margin-top: 1rem; color: var(--ink-soft); }

/* Réalisations, dans la logique du CV : la preuve chiffrée à gauche */
.projects { margin: 0; padding: 0; list-style: none; }
.project {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr);
  gap: 1rem clamp(1.5rem, 5vw, 4rem);
  padding-block: 2.25rem;
  border-top: 1px solid #e3dfdc;
}
.project:last-child { border-bottom: 1px solid #e3dfdc; }

.figure { display: flex; flex-direction: column; gap: 0.35rem; }
.figure-num {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: proportional-nums lining-nums;
  white-space: nowrap;
}
.figure-label {
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 14rem;
}

.project-body { max-width: 40rem; }
.project h3 { font-size: 1.35rem; }
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.4rem;
  margin: 0.45rem 0 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.meta span + span { font-weight: 500; }

.others { margin-top: 2.75rem; max-width: 46rem; }
.others h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.others p { color: var(--ink-soft); }

/* Méthode : une ligne, cinq jalons */
.steps {
  --dot: 0.85rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  left: 0;
  right: calc(20% - 1.6rem); /* la ligne s'arrête au dernier jalon */
  top: calc(2.4rem + var(--dot) / 2);
  height: 2px;
  background: var(--ink);
}
.step { position: relative; padding-top: calc(2.4rem + var(--dot) + 1.4rem); }
.step::before {
  content: "";
  position: absolute;
  top: 2.4rem;
  left: 0;
  width: var(--dot);
  height: var(--dot);
  background: var(--ink);
  outline: 4px solid var(--rose);
}
.step-key::before { background: var(--fuchsia); width: 1.1rem; height: 1.1rem; top: calc(2.4rem - 0.125rem); }
.step-num {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.step h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.step p { font-size: 1rem; line-height: 1.55; color: var(--ink-soft); }

/* Parcours */
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
  max-width: 54rem;
}
.tl-item {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0.5rem 2.5rem;
  position: relative;
  padding-bottom: 2.75rem;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: calc(8rem + 1.25rem - 1px);
  top: 0.7rem;
  bottom: 0;
  width: 2px;
  background: var(--pearl);
}
.tl-item:last-child::before { display: none; }
.tl-item::after {
  content: "";
  position: absolute;
  left: calc(8rem + 1.25rem - 0.35rem);
  top: 0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--ink);
}
.tl-quiet::after { background: var(--white); border: 2px solid var(--taupe); }
.tl-when {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  padding-top: 0.05rem;
}
.tl-body { padding-left: 1rem; max-width: 42rem; }
.tl-body h3 { font-size: 1.25rem; }
.tl-sub { color: var(--ink-soft); font-weight: 500; margin-top: 0.15rem; }
.tl-body > p:not(.tl-sub) { margin-top: 0.6rem; }
.tl-quiet .tl-body h3 { font-size: 1.05rem; font-weight: 600; color: var(--ink-soft); }

.roles { margin: 1.25rem 0 0; padding: 0; list-style: none; }
.roles li { padding: 1rem 0; border-top: 1px solid var(--pearl); }
.role-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.1rem 1rem;
  margin-bottom: 0.3rem;
}
.role-title { font-weight: 700; }
.role-when { color: var(--ink-soft); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.roles li > p:last-child { color: var(--ink-soft); font-size: 1.02rem; }

.quote {
  margin: 1.5rem 0 0;
  padding: 1.25rem 1.5rem;
  background: var(--rose);
  border-left: 3px solid var(--ink);
}
.quote p { font-size: 1.08rem; font-weight: 500; line-height: 1.55; }
.quote footer { margin-top: 0.6rem; font-size: 0.9rem; color: var(--ink-soft); }

/* Formations et outils */
.edu-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(3rem, 6vw, 5rem);
}
.edu-grid h2 { margin-bottom: 1.75rem; }
.sub-title {
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  margin-bottom: 1.1rem;
  padding-top: 0.7rem;
}
.tools + .sub-title { margin-top: 2.5rem; }

.edu-list { margin: 0; }
.edu-list > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  padding-block: 1rem;
  border-top: 1px solid #dedede;
}
.edu-list dt { font-weight: 600; font-size: 0.98rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.edu-list dd { margin: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.edu-list dd strong { font-weight: 650; line-height: 1.4; }
.edu-list dd span { color: var(--ink-soft); font-size: 1rem; }

.tools { display: grid; gap: 1.1rem; }
.tool-group h4 { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.tool-group p { color: var(--ink-soft); font-size: 1.02rem; }
.langs { color: var(--ink-soft); }

/* ---------- Contact ---------- */

.site-footer {
  background: var(--ink);
  color: var(--white);
  padding-top: var(--space-section);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem clamp(3rem, 6vw, 5rem);
  align-items: start;
}
.contact-lead { margin-top: 1rem; font-size: 1.2rem; color: #d7dcdd; max-width: 28em; }
.contact-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.7rem; }
.contact-list a { color: var(--white); text-decoration-color: rgba(255,255,255,.45); }
.contact-list a:hover { text-decoration-color: var(--fuchsia); }
.contact-mail {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.contact-place { color: #c9cfd0; }
.site-footer :focus-visible { outline-color: var(--white); }

.legal {
  margin-top: var(--space-section);
  padding-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #b9c0c1;
}
.legal p { padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.14); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { justify-self: start; max-width: 20rem; }
  h1 { max-width: 15ch; }

  .project { grid-template-columns: 1fr; gap: 0.9rem; padding-block: 1.9rem; }
  .figure { flex-direction: row; align-items: baseline; gap: 0.75rem; }
  .figure-label { max-width: none; }

  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps::before { display: none; }
  .step { padding: 0 0 1.75rem 2.75rem; }
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(var(--dot) / 2 - 1px);
    top: 1.5rem;
    bottom: -0.2rem;
    width: 2px;
    background: var(--ink);
  }
  .step::before { top: 0.35rem; }
  .step-key::before { top: 0.25rem; left: -0.125rem; }
  .step-num { position: static; display: block; margin-bottom: 0.1rem; font-size: 0.92rem; }

  .edu-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .header-inner { padding-block: 0.9rem; }
  .nav-list { gap: 0.15rem 1.1rem; font-size: 0.95rem; }

  .tl-item { grid-template-columns: 1fr; padding-left: 1.75rem; gap: 0.2rem; }
  .tl-item::before { left: 0.3rem; top: 0.75rem; }
  .tl-item::after { left: 0; top: 0.45rem; }
  .tl-body { padding-left: 0; }

  .edu-list > div { grid-template-columns: 1fr; gap: 0.15rem; }
  .btn { width: 100%; justify-content: center; }
}

@media print {
  .site-header nav, .skip-link, .trajectory, .actions { display: none; }
  .section-rose, .section-pearl, .site-footer { background: none; color: var(--ink); }
  .contact-list a, .site-footer { color: var(--ink); }
}
