/* =========================================================================
   Lorenzo Sanna : portfolio
   Palette bordeaux nuit et saumon, mode clair automatique. Tête de lecture fine
   liée au défilement dans l'en-tête. Interface de montage réservée au Parcours.
   Aucun dégradé, flou, ombre, lueur ni animation d'apparition ; angles de 4 px au plus.
   ========================================================================= */

@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  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: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #160f12;
  --surface: #21171b;
  --raised: #2b1e23;
  --line: #3d2b32; /* filets de séparation uniquement */
  --text: #f0e8e2;
  --muted: #bbaaa6;
  --outline: #bbaaa6; /* contours qui portent une information (blocs, boutons) */
  --accent: #f29e8e;
  --on-accent: #160f12;

  --sans: "Archivo", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r: 4px;
  --gutter: 16px;
  --gap: 28px;
  --header-h: 92px;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbf5f2;
    --surface: #ffffff;
    --raised: #f3e9e5;
    --line: #e2d2cc;
    --text: #160f12;
    --muted: #6e5b57;
    --outline: #8a7671;
    --accent: #b4402f;
    --on-accent: #ffffff;

    color-scheme: light;
  }
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
    --gap: 32px;
  }
}

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

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

html {
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.15;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

main:focus {
  outline: none;
}

/* Au clavier, l'élément focalisé ne s'arrête pas collé au bas de l'écran */
:where(a, button, video, iframe) {
  scroll-margin-bottom: 24px;
}

.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-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  border-radius: var(--r);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

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

/* Timecode et dates : seule place de la police mono */
time,
.ruler__tc,
.tl__year {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* ---------- Liens et boutons : survol fin (1 px), focus plus épais (2 px décalé) ---------- */

.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.link:hover {
  text-decoration-thickness: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--outline);
  border-radius: var(--r);
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.12s linear, border-color 0.12s linear;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  color: var(--on-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* ---------- En-tête : navigation et règle de défilement ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.125rem;
  font-weight: 800;
  font-stretch: 112%;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 5px;
}

.nav-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--outline);
  border-radius: var(--r);
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.12s linear, border-color 0.12s linear;
}

.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.no-js .nav-toggle {
  display: none;
}

.no-js .site-header__bar {
  flex-wrap: wrap;
}

.no-js .site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}

.site-nav__list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 4px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.site-nav__list a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.site-nav__list a[aria-current="true"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.js .site-nav__list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 4px var(--gutter) 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.js .site-nav.is-open .site-nav__list {
  display: block;
}

.js .site-nav__list li + li a {
  border-top: 1px solid var(--line);
}

@media (min-width: 1080px) {
  .nav-toggle {
    display: none;
  }

  .js .site-nav__list,
  .site-nav__list {
    display: flex;
    position: static;
    gap: 4px;
    padding: 0;
    background: none;
    border: 0;
  }

  .js .site-nav__list li + li a {
    border-top: 0;
  }

  .site-nav__list a {
    min-height: 44px;
    padding: 0 10px;
    color: var(--muted);
  }

  .site-nav__list a:hover {
    color: var(--text);
  }
}

/* Règle : graduations dessinées par un masque SVG (pas de dégradé), tête de lecture déplacée par script.js */
.ruler {
  border-top: 1px solid var(--line);
}

.ruler__inner {
  display: flex;
  align-items: stretch;
  gap: 14px;
  height: 30px;
}

.ruler__tc {
  display: flex;
  flex: none;
  align-items: center;
  color: var(--muted);
  font-size: 0.8125rem;
}

.ruler__track {
  position: relative;
  flex: 1;
  min-width: 0;
}

.ruler__track::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='30'%3E%3Crect x='0' y='16' width='1' height='14'/%3E%3Crect x='12' y='24' width='1' height='6'/%3E%3Crect x='24' y='24' width='1' height='6'/%3E%3Crect x='36' y='24' width='1' height='6'/%3E%3Crect x='48' y='24' width='1' height='6'/%3E%3C/svg%3E") left bottom / 60px 30px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='30'%3E%3Crect x='0' y='16' width='1' height='14'/%3E%3Crect x='12' y='24' width='1' height='6'/%3E%3Crect x='24' y='24' width='1' height='6'/%3E%3Crect x='36' y='24' width='1' height='6'/%3E%3Crect x='48' y='24' width='1' height='6'/%3E%3C/svg%3E") left bottom / 60px 30px repeat-x;
  opacity: 0.55;
}

/* Repères des sections sur la règle */
.ruler__marker {
  position: absolute;
  top: 3px;
  width: 1px;
  height: 9px;
  background: var(--text);
}

.ruler__playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: var(--accent);
  will-change: transform;
}

.ruler__playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: -4px;
  width: 10px;
  height: 9px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}

/* ---------- Hero : vidéo de fond muette, voile pour le texte ---------- */

/* Le hero reste sombre dans les deux modes : c'est de la vidéo */
.hero {
  --text: #f0e8e2;
  --muted: #bbaaa6;
  --outline: #bbaaa6;
  --accent: #f29e8e;
  --on-accent: #160f12;

  position: relative;
  display: grid;
  align-items: end;
  min-height: min(86vh, 920px);
  overflow: hidden;
  background: #160f12;
  color: var(--text);
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Voile uni (aucun dégradé) : #160F12 à 70 %, 5,9:1 pour le texte même sur une image blanche */
.hero__veil {
  position: absolute;
  inset: 0;
  background: rgba(22, 15, 18, 0.7);
}

@media (min-width: 900px) {
  .hero__veil {
    right: auto;
    width: min(100%, calc((100% - min(100%, 1360px)) / 2 + 900px));
  }
}

.hero__inner {
  position: relative;
  padding-top: 112px;
  padding-bottom: 64px;
}

.hero__inner > * {
  max-width: 820px;
}

.hero__name {
  font-size: clamp(2.75rem, 1.6rem + 4.6vw, 5.25rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.hero__role {
  margin-top: 18px;
  font-size: clamp(1.1875rem, 1rem + 0.7vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* Boutons du hero sur fond plein : le texte accent garde son contraste quelle que soit l'image */
.hero .btn:not(.btn--primary) {
  background: #160f12;
}

/* Pause / lecture : contrôle de lecteur en bas à droite de la vidéo, aligné sur la marge du contenu.
   Fond #160F12 à 70 % et contour clair : contour et icône restent à 5,8:1 au moins sur leur fond, même sur une image blanche (accent au survol : 3,4:1).
   Placé sous la rangée de contact (marge basse du hero de 64 px) : aucun chevauchement, même sur mobile. */
.hero__pause {
  position: absolute;
  right: calc(max(0px, (100% - 1360px) / 2) + var(--gutter) + env(safe-area-inset-right, 0px));
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(22, 15, 18, 0.7);
  border: 1px solid var(--text);
  border-radius: var(--r);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.12s linear, color 0.12s linear;
}

.hero__pause:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero__pause-icon--play,
.hero__pause.is-paused .hero__pause-icon--pause {
  display: none;
}

.hero__pause.is-paused .hero__pause-icon--play {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .hero__pause {
    display: none;
  }
}

/* ---------- Sections et rangées de projets ---------- */

.section {
  padding-top: clamp(64px, 3rem + 3vw, 112px);
}

.section__title {
  margin-bottom: 24px;
  font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.875rem);
  font-weight: 700;
  font-stretch: 110%;
}

.section__intro {
  max-width: 60ch;
  margin-bottom: 24px;
}

.section__foot {
  padding-top: 12px;
}

/* Colonnes de largeurs inégales, séparées par des filets de 1 px */
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap);
  padding-block: var(--gap);
  border-top: 1px solid var(--line);
}

.row:last-of-type {
  border-bottom: 1px solid var(--line);
}

.row > .project + .project {
  padding-top: var(--gap);
  border-top: 1px solid var(--line);
}

@media (min-width: 768px) {
  .row--2-1,
  .row--1-2 {
    gap: 0;
  }

  .row--2-1 {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }

  .row--1-2 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }

  .row > .project:first-child:not(:last-child) {
    padding-right: var(--gap);
  }

  .row > .project + .project {
    padding-top: 0;
    padding-left: var(--gap);
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

.project {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.project__info {
  display: grid;
  gap: 2px;
  max-width: 62ch;
}

.project__title {
  font-size: 1.25rem;
  font-stretch: 105%;
}

.project--full .project__title {
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
}

.project__meta,
.project__keys {
  color: var(--muted);
}

.project__desc {
  margin-top: 6px;
}

.project__keys {
  margin-top: 4px;
}

/* ---------- Lecteurs (YouTube et vidéos locales), chargés au clic ---------- */

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  background: var(--raised);
}

/* Pleine largeur : cadre large 2,39:1 tant que la vidéo n'est pas lancée */
.project--full .player:not(.is-playing) {
  aspect-ratio: 2.39 / 1;
}

.player__play {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--raised);
  cursor: pointer;
  transition: border-color 0.12s linear;
}

.player__play:hover {
  border-color: var(--accent);
}

.player__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
}

.player__frame,
.player__video {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--r);
  background: #160f12;
}

/* Commande de lecture : carré plein posé sur l'image, mêmes couleurs dans les deux modes */
.glyph-play {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: #160f12;
  border: 1px solid #bbaaa6;
  border-radius: var(--r);
  transition: border-color 0.12s linear;
}

.glyph-play::before {
  content: "";
  width: 12px;
  height: 14px;
  margin-left: 3px;
  background: #f0e8e2;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.player__play:hover .glyph-play,
.reel__play:hover .glyph-play {
  border-color: #f29e8e;
}

/* ---------- Créateur de contenu : un panneau « Mes vidéos » ---------- */

.creator__handles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

/* Profils : logo officiel + pseudo, le tout cliquable (zone de 44 px de haut au moins) */
.profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 12px 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.12s linear;
}

.profile:hover {
  border-color: var(--accent);
}

.profile__logo {
  flex: none;
  width: 28px;
  height: 28px;
}

.profile__handle {
  font-weight: 600;
}

.videos {
  padding-top: var(--gap);
  border-top: 1px solid var(--line);
}

.videos__title {
  margin-bottom: 16px;
  font-size: 1.25rem;
  font-stretch: 105%;
}

/* Vignettes verticales : défilement horizontal aimanté sur mobile, trois colonnes ensuite.
   Le retrait de 4 px laisse la place au contour de focus, que le défilement couperait sinon. */
.reels {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  padding: 4px 4px 8px;
}

.reel {
  flex: 0 0 min(260px, 78%);
  min-width: 0;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .reels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 260px));
    overflow: visible;
  }
}

.reel__play,
.reel__iframe {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--r);
  background: var(--raised);
}

.reel__play {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.12s linear;
}

.reel__play:hover {
  border-color: var(--accent);
}

.reel__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
}

.reel__iframe {
  display: block;
  border: 0;
}

/* ---------- Parcours : timeline (seul panneau d'interface de montage) ---------- */

.tl-panel {
  margin-bottom: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.tl-panel__bar {
  padding: 8px 14px;
  background: var(--raised);
  border-bottom: 1px solid var(--line);
  border-radius: 3px 3px 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Couleur par type de piste, AA avec le texte posé dessus (#160F12 en sombre, blanc en clair) */
.tl-panel {
  --tl-poste: #f29e8e;
  --tl-stage: #8fd19e;
  --tl-formation: #8eb8f2;
  --tl-creation: #5fcfc4;
  --tl-on-type: #160f12;
}

@media (prefers-color-scheme: light) {
  .tl-panel {
    --tl-poste: #b4402f;
    --tl-stage: #2e7a45;
    --tl-formation: #2f5fae;
    --tl-creation: #0f7470;
    --tl-on-type: #ffffff;
  }
}

[data-type="poste"] {
  --type: var(--tl-poste);
}

[data-type="stage"] {
  --type: var(--tl-stage);
}

[data-type="formation"] {
  --type: var(--tl-formation);
}

[data-type="creation"] {
  --type: var(--tl-creation);
}

/* Détail de ce qui se trouve sous la tête de lecture. Hauteur réservée par script.js : la timeline ne bouge pas. */
.tl-detail {
  padding: 14px 14px 16px;
  border-bottom: 1px solid var(--line);
}

.tl-detail__date {
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.875rem;
}

.tl-detail__entries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px 32px;
}

.tl-detail__entry {
  padding-left: 12px;
  border-left: 3px solid var(--type);
}

.tl-detail__title {
  font-weight: 700;
}

.tl-detail__dates {
  font-family: var(--mono);
  font-size: 0.875rem;
}

.tl-detail__desc,
.tl-detail__empty {
  max-width: 64ch;
  color: var(--muted);
}

.tl {
  --label-w: 132px;
  --head: var(--now);

  position: relative;
  touch-action: pan-y; /* le glissement horizontal déplace la tête de lecture, le vertical fait défiler la page */
}

.js .tl {
  cursor: pointer;
}

.tl.is-dragging {
  cursor: ew-resize;
  user-select: none;
}

.tl__track {
  display: grid;
  grid-template-columns: var(--label-w) minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.tl__track:last-of-type {
  border-bottom: 0;
}

.tl__label {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

.tl__lane {
  position: relative;
  height: 46px;
}

.tl__track--ruler .tl__lane {
  height: 32px;
}

.tl__year {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--at) / var(--total) * 100%);
  padding: 7px 0 0 6px;
  border-left: 1px solid var(--outline);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1;
}

/* Bloc : position et largeur suivent les dates exactes ; nom tronqué si le bloc est court */
.tl__clip {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: calc(var(--from) / var(--total) * 100%);
  width: calc((var(--to) - var(--from)) / var(--total) * 100%);
  min-width: 3px;
  overflow: hidden;
  padding: 0 4px 0 6px;
  background: var(--raised);
  border: 1px solid var(--outline);
  border-radius: var(--r);
  font-size: 0.875rem;
  line-height: 28px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background-color 0.12s linear, border-color 0.12s linear, color 0.12s linear;
}

/* Sous la tête de lecture : remplissage plein à la couleur du type ; les autres blocs s'atténuent */
.tl__clip.is-active {
  background: var(--type);
  border-color: var(--type);
  color: var(--tl-on-type);
  font-weight: 600;
}

.tl.has-active .tl__clip:not(.is-active),
.tl.has-active .tl__marker:not(.is-active) {
  background: transparent;
  color: var(--muted);
}

/* Marqueur : seule l'année est connue, donc pas de durée */
.tl__marker {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: calc(var(--at) / var(--total) * 100%);
  padding-left: 14px;
  font-size: 0.875rem;
  line-height: 30px;
  white-space: nowrap;
}

.tl__marker::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 9px;
  height: 20px;
  background: var(--text);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
}

.tl__marker.is-active {
  font-weight: 600;
}

.tl__marker.is-active::before {
  background: var(--type);
}

.tl.has-active .tl__marker:not(.is-active)::before {
  background: var(--muted);
}

/* Tête de lecture de la timeline : trait plein, poignée sur la règle.
   Distincte du repère « aujourd'hui » (pointillé) et du curseur de défilement de l'en-tête (saumon, en haut de page). */
.tl__head {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--label-w) + (100% - var(--label-w)) * var(--head) / var(--total) - 12px);
  z-index: 2;
  width: 24px;
  border-radius: var(--r);
  cursor: ew-resize;
  touch-action: none;
}

.tl__head::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 11px;
  width: 2px;
  background: var(--text);
}

.tl__head::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 16px;
  height: 22px;
  background: var(--text);
  border: 2px solid var(--surface);
  border-radius: 2px;
}

.tl__head:focus-visible {
  outline-offset: 2px;
}

/* Aujourd'hui : pointillé, distinct de la tête de lecture du défilement */
.tl__today {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--label-w) + (100% - var(--label-w)) * var(--now) / var(--total) - 1px);
  border-left: 2px dotted var(--outline);
  pointer-events: none;
}

.tl__today-label {
  position: absolute;
  top: 92px;
  right: 8px;
  color: var(--muted);
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* Sur mobile, la timeline graphique laisse la place à la liste ci-dessous */
@media (max-width: 639px) {
  .tl-panel {
    display: none;
  }
}

/* ---------- Index des montages : vrai tableau ---------- */

.index {
  width: 100%;
  border-collapse: collapse;
}

.index__caption {
  padding-bottom: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  font-stretch: 105%;
  text-align: left;
}

.index th,
.index td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.index thead th {
  padding-block: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.index__track {
  color: var(--muted);
  white-space: nowrap;
}

.index th.index__name {
  font-weight: 400;
}

.index__title {
  display: block;
  font-weight: 700;
}

.index__desc {
  display: block;
  max-width: 56ch;
  margin-top: 4px;
  color: var(--muted);
}

.index__date {
  white-space: nowrap;
}

.index__date time {
  font-size: 0.9375rem;
}

/* Mobile : le tableau se replie en liste verticale (rôles ARIA conservés dans le HTML) */
@media (max-width: 767px) {
  .index,
  .index tbody,
  .index tr,
  .index th,
  .index td {
    display: block;
  }

  .index__caption {
    display: block;
  }

  .index thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .index tbody tr {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-block: 16px;
    border-top: 1px solid var(--line);
  }

  .index th,
  .index td {
    padding: 0;
    border: 0;
  }

  .index th.index__name {
    order: -1;
    margin-bottom: 4px;
  }

  .index td[data-label]::before {
    content: attr(data-label) "\00a0: ";
    color: var(--muted);
  }
}

/* ---------- Logiciels et compétences ---------- */

.skills {
  display: grid;
  gap: 12px;
  margin-top: 48px;
}

.skills__title {
  font-size: 1.25rem;
  font-stretch: 105%;
}

.skills__title + * {
  margin-bottom: 20px;
}

.software {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 32px;
}

.software__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.software__logo {
  flex: none;
  width: 28px;
  height: 28px;
}

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

.site-footer {
  padding-block: clamp(64px, 3rem + 3vw, 112px) 40px;
}

.contact__lead {
  max-width: 40ch;
  margin-bottom: 24px;
  font-size: 1.25rem;
}

.contact-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 16px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}

.contact-item:last-child {
  border-bottom: 1px solid var(--line);
}

.contact-item__label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.9375rem;
}

.contact-item__value {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.25rem;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.contact-item__value:hover {
  text-decoration-thickness: 2px;
}

@media (min-width: 768px) {
  .contact-item {
    grid-template-columns: 9rem minmax(0, 1fr) auto;
  }

  .contact-item__label {
    grid-column: auto;
  }
}

.site-footer__legal {
  margin-top: 40px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- Mouvement réduit : aucune transition ni défilement animé ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
