/* Anthony Gallo — site public.
   Système « Modernist » de la maquette : Archivo, rouge unique sur fond clair, grille visible,
   filets de 2 px, aucun angle arrondi, images en noir et blanc.
   Tailles relevées par rapport à la maquette pour la lisibilité : texte courant 17 px,
   plus petits libellés 15 px, dates et compétences 17 à 21 px. */

@font-face { font-family: Archivo; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../fonts/archivo-normal-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Archivo; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../fonts/archivo-normal-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #ec3013;
  --color-divider: color-mix(in srgb, #201e1d 40%, transparent);
  --color-neutral-100: #f8f4f4;
  --color-neutral-300: #d7d3d3;
  --color-neutral-800: #444141;
  --color-accent-100: #fff2ef;
  --color-accent-600: #dd2b0f;
  --color-accent-700: #ae1800;
  --color-accent-800: #7c1405;
  --font-heading: "Archivo", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow-md: 0 3px 10px color-mix(in srgb, #2d2b2b 16%, transparent);
  --pad-x: clamp(20px, 4vw, 48px);
  --ease-orbit: 1.6s cubic-bezier(.65, 0, .25, 1);

  /* Échelle de texte */
  --fs-small: 15px;   /* codes, légendes, petits libellés */
  --fs-label: 14px;   /* surtitres, étiquettes, menu */
  --fs-body: 17px;    /* texte courant */
  --fs-lede: clamp(17px, 1.5vw, 20px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.6; }
h1, h2, h3 { margin: 0; font-family: var(--font-heading); font-weight: 800; }
p, dl, dd, figure { margin: 0; }
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent); }
img { display: block; max-width: 100%; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
[id] { scroll-margin-top: 76px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 20; padding: 10px 14px; background: var(--color-text); color: var(--color-bg); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; color: var(--color-bg); }
.preview-note { position: sticky; top: 0; z-index: 7; padding: 8px var(--pad-x); background: var(--color-text); color: var(--color-bg); font: 700 var(--fs-small)/1.4 var(--mono); }

/* — Boutons, étiquettes, sélecteur de langue — */
.btn { display: inline-flex; align-items: center; justify-content: flex-start; gap: 6px; padding: 12px 18px; border: 1px solid transparent; font: 800 16px/1.2 var(--font-heading); text-decoration: none; cursor: pointer; }
.btn-primary { min-width: 240px; 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); }

.tag { display: inline-flex; align-items: center; padding: 4px 11px; font-size: var(--fs-small); line-height: 1.35; letter-spacing: .01em; }
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent-700); }

.seg { display: inline-flex; border: 1px solid var(--color-divider); }
.seg-opt { display: inline-flex; align-items: center; padding: 8px 13px; font-size: var(--fs-label); color: var(--color-text); text-decoration: none; }
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.seg-opt[aria-current] { font-weight: 800; }

.code { font-size: var(--fs-small); font-family: var(--mono); }
.kicker { font-size: var(--fs-label); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--color-accent-700); }

/* — Barre de navigation — */
.nav { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 16px var(--pad-x); background: var(--color-bg); border-bottom: 2px solid var(--color-divider); }
.nav-brand { font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--color-text); text-decoration: none; }
.nav-brand:hover { color: var(--color-accent); }
.nav-links { display: flex; gap: 24px; font-size: 16px; }
.nav-links a { padding-bottom: 2px; border-bottom: 2px solid transparent; color: var(--color-text); text-decoration: none; white-space: nowrap; transition: border-color .3s, color .3s; }
.nav-links a:hover { color: var(--color-accent); }
.nav-links a.is-active { font-weight: 700; color: var(--color-accent-700); border-bottom-color: var(--color-accent); }
.nav .seg { margin-left: auto; }

/* — Accueil — */
.hero { position: relative; padding: clamp(40px, 6vw, 80px) var(--pad-x) 0; border-bottom: 2px solid var(--color-divider); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px; align-items: center; }
.hero-kick { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: var(--fs-label); letter-spacing: .1em; text-transform: uppercase; }
.kick-accent { font-weight: 700; color: var(--color-accent-700); }
.hero-name { margin-top: 24px; font-size: clamp(56px, 9.5vw, 156px); line-height: .86; letter-spacing: -.04em; overflow-wrap: anywhere; }
.hero-role { max-width: 640px; margin-top: 32px; font-size: clamp(21px, 2.3vw, 30px); line-height: 1.25; text-wrap: pretty; }

.orrery-fig { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 560px; justify-self: end; }
.orrery-box { display: block; width: 100%; aspect-ratio: 1; }
.orrery-box svg { display: block; width: 100%; height: 100%; overflow: visible; }
.orrery-cap { display: flex; justify-content: space-between; gap: 16px; padding-top: 10px; border-top: 2px solid var(--color-text); font: var(--fs-small)/1.4 var(--mono); }
.orrery-name { font-weight: 700; color: var(--color-accent-700); }

.o-ring { fill: none; stroke: var(--color-divider); stroke-width: 2; }
.o-ink { fill: var(--color-text); }
.o-red { fill: var(--color-accent); }
.o-bg { fill: var(--color-bg); }
.o-stroke-red { fill: none; stroke: var(--color-accent); stroke-width: 9; }
.o-stroke-ink { fill: none; stroke: var(--color-text); stroke-width: 3; }
.o-move { transition: transform var(--ease-orbit); }
.o-tick { transition: fill .4s; }

.facts { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: clamp(40px, 6vw, 80px); border-top: 2px solid var(--color-divider); }
.fact { margin-right: 20px; padding: 20px 20px 24px 0; border-right: 2px solid var(--color-divider); }
.fact dt { font-size: var(--fs-small); letter-spacing: .08em; text-transform: uppercase; }
.fact dd { margin-top: 10px; font-size: clamp(26px, 2.7vw, 36px); font-weight: 800; line-height: 1.05; }

/* — Sections — */
.sec { padding: clamp(56px, 6vw, 88px) var(--pad-x); border-bottom: 2px solid var(--color-divider); }
.sec-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: end; }
.h-sec { margin-top: 12px; font-size: clamp(38px, 5vw, 66px); line-height: .95; letter-spacing: -.02em; }
.h-sec-gap { margin-bottom: 32px; }
.lede { max-width: 540px; font-size: var(--fs-lede); line-height: 1.5; }

/* Parcours : dates | poste | missions (colonne la plus large, pour des lignes confortables) */
.traj { display: grid; margin-top: 40px; border-top: 2px solid var(--color-text); }
.traj span { height: 18px; border-right: 1px solid var(--color-divider); background: var(--color-neutral-300); }
.traj .is-mid { background: var(--color-text); }
.traj .is-now { background: var(--color-accent); }
.traj-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 16px; font-weight: 600; }
.jobs { margin-top: 36px; }
.job { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 40px; padding: 32px 0; border-top: 2px solid var(--color-divider); }
.job-when { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.job-dates { font: 700 clamp(18px, 1.5vw, 21px)/1.3 var(--font-body); font-variant-numeric: tabular-nums; }
.job-when .tag { padding: 6px 13px; font-size: 16px; font-weight: 600; }
.job-role { font-size: clamp(23px, 2.1vw, 28px); line-height: 1.12; }
.job-company { margin-top: 8px; font-size: 16px; font-weight: 600; letter-spacing: .02em; }
.job-points { display: flex; flex-direction: column; gap: 10px; max-width: 72ch; margin: 0; padding: 0 0 0 20px; font-size: var(--fs-body); line-height: 1.55; }
.job-points li::marker { color: var(--color-accent); }

/* Compétences */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 40px; border-top: 2px solid var(--color-divider); border-left: 2px solid var(--color-divider); }
.skill { display: flex; flex-direction: column; gap: 18px; padding: 28px; border-right: 2px solid var(--color-divider); border-bottom: 2px solid var(--color-divider); }
.skill-title { font-size: clamp(22px, 2vw, 26px); line-height: 1.12; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.skill .tag { padding: 8px 14px; font-size: clamp(17px, 1.3vw, 19px); font-weight: 500; border-width: 1.5px; }
.skill .code { font-size: 17px; font-weight: 600; }

/* Projets */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 28px; margin-top: 40px; }
.project { display: flex; flex-direction: column; border-top: 2px solid var(--color-text); }
.shot { position: relative; margin-top: 16px; aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-surface); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.shot-empty { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 16px; font: var(--fs-label)/1.4 var(--mono); }
.grayscale { filter: grayscale(1) contrast(1.08); }
.project-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 16px; font: var(--fs-small)/1.4 var(--mono); }
.project-title { margin-top: 8px; font-size: clamp(23px, 2vw, 26px); line-height: 1.15; }
.project-desc { margin-top: 8px; font-size: var(--fs-body); line-height: 1.55; }
.project-link { align-self: flex-start; margin-top: 14px; font-size: 16px; font-weight: 700; }

/* Formation */
.edu-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px; align-items: baseline; padding: 22px 0; border-top: 2px solid var(--color-divider); }
.edu-year { font-size: clamp(22px, 2.1vw, 30px); font-weight: 800; color: var(--color-accent); }
.edu-title { font-size: clamp(19px, 1.9vw, 24px); font-weight: 700; line-height: 1.25; }
.edu-detail { margin-top: 6px; font-size: 16px; }
.edu-lang { font-size: 15px; font-weight: 700; }
.edu-lang-value { font-size: var(--fs-body); }

/* Intérêts : le seul aplat rouge de la page */
.sec-accent { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 112px) var(--pad-x); background: var(--color-accent); color: #fff; border-bottom: 0; }
.sec-accent .kicker { color: #fff; }
.sec-accent ::selection { background: var(--color-text); color: #fff; }
.h-poster { max-width: 1000px; margin-top: 16px; font-size: clamp(48px, 9vw, 128px); line-height: .88; letter-spacing: -.035em; }
.constellation { position: relative; height: 96px; margin-top: 24px; pointer-events: none; }
.constellation span { position: absolute; background: #fff; }
.interests { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 24px 0 0; padding: 0; list-style: none; border-top: 2px solid #fff; }
.interests li { display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 0 0; }
.interest-label { font-size: clamp(22px, 2vw, 26px); font-weight: 800; }

/* Contact */
.contact { padding: clamp(56px, 8vw, 112px) var(--pad-x) clamp(32px, 4vw, 48px); }
.h-contact { margin-top: 16px; }
.mail-big { display: inline-block; margin-top: 32px; font-size: clamp(28px, 5.5vw, 72px); font-weight: 800; letter-spacing: -.02em; color: var(--color-text); text-decoration: none; border-bottom: 4px solid var(--color-accent); overflow-wrap: anywhere; }
.mail-big:hover { color: var(--color-accent); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: clamp(64px, 8vw, 112px); padding-top: 16px; border-top: 2px solid var(--color-divider); font-size: var(--fs-label); }

/* Page introuvable */
.lost { min-height: 60vh; border-bottom: 0; }
.h-lost { margin-bottom: 24px; }

/* Mini-système : apparaît en bas à droite une fois l'accueil dépassé (écrans larges) */
.mini-orrery { position: fixed; right: 20px; bottom: 20px; z-index: 6; display: flex; flex-direction: column; gap: 6px; width: 164px; padding: 8px; background: var(--color-bg); border: 2px solid var(--color-text); color: var(--color-text); text-decoration: none; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s, transform .3s, visibility 0s .3s; }
.mini-orrery.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .3s; }
.mini-orrery:hover { color: var(--color-text); border-color: var(--color-accent); }
.mini-cap { display: flex; justify-content: space-between; padding-top: 6px; border-top: 2px solid var(--color-text); font: 11px/1.4 var(--mono); }

/* Parcours sur deux colonnes (dates | poste puis missions), puis trois sur grand écran. */
@media (min-width: 720px) {
  .job { grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr); }
  .job > :nth-child(3) { grid-column: 2; }
}
@media (min-width: 1100px) {
  .job { grid-template-columns: minmax(170px, .75fr) minmax(0, 1.35fr) minmax(0, 2.3fr); }
  .job > :nth-child(3) { grid-column: auto; }
}

@media (max-width: 899px) {
  .mini-orrery { display: none; }
}

@media (max-width: 859px) {
  [id] { scroll-margin-top: 118px; }
  .nav { padding-top: 12px; padding-bottom: 0; }
  /* Liens du menu sur une ligne défilante sous le nom, pour garder la barre compacte. */
  .nav-links { order: 3; width: calc(100% + 2 * var(--pad-x)); margin: 0 calc(-1 * var(--pad-x)); padding: 10px var(--pad-x) 12px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--color-divider); }
  .nav-links::-webkit-scrollbar { display: none; }
  .orrery-fig { justify-self: center; }
}

@media (max-width: 480px) {
  :root { --fs-body: 16.5px; }
  .fact { margin-right: 0; padding-right: 0; border-right: 0; border-bottom: 2px solid var(--color-divider); }
  .fact:last-child { border-bottom: 0; }
  .edu-row { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; }
  .skill { padding: 22px 20px; }
  .btn-primary { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .o-move, .o-tick, .nav-links a, .mini-orrery { transition: none !important; }
}

@media print {
  .nav, .mini-orrery, .skip { display: none !important; }
  .sec-accent { background: none; color: var(--color-text); }
  .sec-accent .kicker { color: var(--color-accent-700); }
  .constellation { display: none; }
  .interests { border-top-color: var(--color-divider); }
}
