/* ==========================================================================
   Julien Jimenez, profil professionnel
   Feuille de style unique. Aucune dependance externe, polices systeme.
   Sommaire :
   01. Variables et themes
   02. Reset et bases
   03. Typographie
   04. Mise en page generale (rail lateral + contenu)
   05. Colonne laterale : portrait, identite, indicateurs, sommaire
   06. Barre superieure et progression de lecture
   07. Cartes et titres de section
   08. Icones dessinees en CSS
   09. Competences et barres animees
   10. Stack d'outils et filtres
   11. Chronologie des experiences
   12. Statistiques et preuves
   13. Secteurs
   14. Modalites et figures
   15. Distinction
   16. Accordeon des questions
   17. Contact et pied de page
   18. Boutons, badges, bouton retour en haut
   19. Animations d'apparition
   20. Page 404
   21. Points de rupture responsives
   22. Preferences de mouvement reduit et impression
   ========================================================================== */

/* -------------------------------------------------------------------------
   01. Variables et themes
   ------------------------------------------------------------------------- */

:root {
  /* Palette sombre par defaut */
  --bg: #0F0E17;
  --bg-soft: #14131F;
  --card: #1A1926;
  --card-2: #201F2E;
  --line: #2A2838;
  --line-strong: #383551;
  --text: #E5E7EB;
  --muted: #A1A1AA;
  --indigo: #6366F1;
  --violet: #8B5CF6;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --accent-ring: rgba(139, 92, 246, 0.34);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.36);
  --shadow-2: 0 10px 30px -12px rgba(0, 0, 0, 0.62);
  --shadow-3: 0 26px 60px -28px rgba(0, 0, 0, 0.78);
  --glow: 0 0 0 1px rgba(99, 102, 241, 0.22), 0 18px 44px -22px rgba(99, 102, 241, 0.55);

  /* Rayons */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Espacements */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 22px;
  --s-6: 30px;
  --s-7: 40px;
  --s-8: 56px;
  --s-9: 76px;
  --s-10: 104px;

  /* Typographie */
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* Rythme */
  --rail-w: 336px;
  --content-max: 900px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.42s;

  color-scheme: dark;
}

/* Theme clair explicite */
:root[data-theme="light"] {
  --bg: #F7F7FB;
  --bg-soft: #FFFFFF;
  --card: #FFFFFF;
  --card-2: #F2F2F8;
  --line: #E4E4EF;
  --line-strong: #CFCFE2;
  --text: #18181B;
  --muted: #5B5B69;
  --indigo: #6366F1;
  --violet: #8B5CF6;
  --accent-soft: rgba(99, 102, 241, 0.10);
  --accent-ring: rgba(139, 92, 246, 0.26);
  --shadow-1: 0 1px 2px rgba(24, 24, 27, 0.06);
  --shadow-2: 0 10px 28px -14px rgba(24, 24, 27, 0.24);
  --shadow-3: 0 24px 56px -30px rgba(24, 24, 27, 0.30);
  --glow: 0 0 0 1px rgba(99, 102, 241, 0.16), 0 16px 40px -24px rgba(99, 102, 241, 0.40);
  color-scheme: light;
}

/* Theme sombre force */
:root[data-theme="dark"] {
  color-scheme: dark;
}

/* -------------------------------------------------------------------------
   02. Reset et bases
   ------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 8% -6%, rgba(99, 102, 241, 0.13), transparent 62%),
    radial-gradient(900px 560px at 96% 4%, rgba(139, 92, 246, 0.11), transparent 58%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

::selection {
  background: var(--violet);
  color: #FFFFFF;
}

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--indigo);
  color: #FFFFFF;
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* -------------------------------------------------------------------------
   03. Typographie
   ------------------------------------------------------------------------- */

h1, h2, h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.018em;
  font-weight: 700;
}

h1 { font-size: clamp(1.65rem, 1.2rem + 1.6vw, 2.1rem); }
h2 { font-size: clamp(1.4rem, 1.05rem + 1.35vw, 1.95rem); }
h3 { font-size: clamp(1.06rem, 0.98rem + 0.42vw, 1.22rem); }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

strong { color: var(--text); font-weight: 650; }

.lead {
  font-size: clamp(1.04rem, 0.98rem + 0.42vw, 1.18rem);
  color: var(--text);
  line-height: 1.62;
}

/* -------------------------------------------------------------------------
   04. Mise en page generale
   ------------------------------------------------------------------------- */

.page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--s-4);
}

.content {
  min-width: 0;
  padding: var(--s-6) 0 var(--s-8);
}

.sect {
  margin: 0 0 var(--s-9);
  scroll-margin-top: 20px;
}

.sect__head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: 0 0 var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}

.sect__num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: linear-gradient(140deg, var(--indigo), var(--violet));
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-2);
}

.sect__intro {
  color: var(--muted);
  max-width: 68ch;
  margin-bottom: var(--s-5);
}

/* -------------------------------------------------------------------------
   05. Colonne laterale
   ------------------------------------------------------------------------- */

.rail {
  padding: var(--s-6) 0 0;
}

.rail__inner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-5);
  box-shadow: var(--shadow-3);
  position: relative;
  overflow: hidden;
}

.rail__inner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--indigo), var(--violet), transparent);
}

.rail__top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--s-3);
}

/* Bascule clair et sombre */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--card-2);
  font-size: 0.76rem;
  color: var(--muted);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.theme-toggle__track {
  position: relative;
  width: 34px;
  height: 19px;
  border-radius: var(--r-full);
  background: linear-gradient(120deg, var(--indigo), var(--violet));
  flex: none;
}

.theme-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform var(--dur) var(--ease-out);
  box-shadow: var(--shadow-1);
}

:root[data-theme="light"] .theme-toggle__thumb {
  transform: translateX(15px);
}

/* Portrait */
.portrait {
  margin: 0 0 var(--s-4);
  text-align: center;
}

.portrait__frame {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto var(--s-3);
}

.portrait__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-2);
  position: relative;
  z-index: 1;
  transition: transform 0.6s var(--ease-out);
}

.portrait__frame:hover img {
  transform: translateY(-3px) scale(1.015);
}

.portrait__ring {
  position: absolute;
  inset: -8px;
  border-radius: calc(var(--r-lg) + 8px);
  background: linear-gradient(140deg, var(--indigo), var(--violet), transparent 72%);
  opacity: 0.42;
  filter: blur(2px);
  z-index: 0;
}

.portrait__caption {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: 5px 13px;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2.6s infinite;
  flex: none;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.rail__name {
  text-align: center;
  margin-bottom: 4px;
  background: linear-gradient(100deg, var(--text) 30%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rail__role {
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: var(--s-5);
  line-height: 1.5;
}

/* Fiche d'identite */
.idcard {
  border-top: 1px dashed var(--line);
  padding-top: var(--s-4);
  margin-bottom: var(--s-5);
  display: grid;
  gap: var(--s-3);
}

.idcard li {
  display: grid;
  gap: 2px;
}

.idcard__key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-weight: 600;
}

.idcard__val {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 550;
}

/* Indicateurs de la colonne */
.rail__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}

.metric {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-2);
  text-align: center;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.metric:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.metric__num {
  display: block;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--indigo), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.metric__lab {
  display: block;
  font-size: 0.64rem;
  line-height: 1.35;
  color: var(--muted);
  margin-top: 3px;
}

/* Sommaire lateral */
.railnav {
  border-top: 1px dashed var(--line);
  padding-top: var(--s-4);
  margin-bottom: var(--s-4);
}

.railnav__title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
  margin-bottom: var(--s-2);
  font-weight: 700;
}

.railnav ol {
  display: grid;
  gap: 1px;
}

.railnav a {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 7px 10px;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  color: var(--muted);
  position: relative;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}

.railnav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--indigo), var(--violet));
  border-radius: 2px;
  transform: translateY(-50%);
  transition: height var(--dur) var(--ease-out);
}

.railnav a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.railnav a.is-current {
  color: var(--text);
  background: var(--accent-soft);
  padding-left: 14px;
  font-weight: 600;
}

.railnav a.is-current::before {
  height: 62%;
}

.railnav__n {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--line-strong);
  flex: none;
  transition: color var(--dur) var(--ease);
}

.railnav a.is-current .railnav__n { color: var(--violet); }

.rail__mail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 11px var(--s-3);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--card-2);
  font-size: 0.8rem;
  color: var(--text);
  word-break: break-all;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.rail__mail:hover {
  border-color: var(--indigo);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

/* -------------------------------------------------------------------------
   06. Barre superieure et progression de lecture
   ------------------------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-7);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.topbar__eyebrow {
  margin: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--violet);
}

.topbar__meta {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.topbar__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
}

.topbar__progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  transition: width 0.12s linear;
}

/* -------------------------------------------------------------------------
   07. Cartes
   ------------------------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-2);
  position: relative;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
}

.card--lead {
  padding: var(--s-6);
}

.card--lead .lead {
  padding-left: var(--s-4);
  border-left: 2px solid var(--violet);
  margin-bottom: var(--s-4);
}

/* -------------------------------------------------------------------------
   08. Icones dessinees en CSS
   ------------------------------------------------------------------------- */

.ico {
  display: inline-block;
  width: 15px;
  height: 15px;
  position: relative;
  flex: none;
  color: var(--violet);
  vertical-align: -2px;
}

.ico--pin::before {
  content: "";
  position: absolute;
  left: 2px; top: 0;
  width: 11px; height: 11px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.ico--clock::before {
  content: "";
  position: absolute;
  inset: 1px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.ico--clock::after {
  content: "";
  position: absolute;
  left: 6.5px; top: 4px;
  width: 2px; height: 4px;
  background: currentColor;
  border-radius: 1px;
}

.ico--globe::before {
  content: "";
  position: absolute;
  inset: 1px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.ico--globe::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 13px;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-top: 0;
  border-bottom: 0;
}

.ico--doc::before {
  content: "";
  position: absolute;
  left: 2px; top: 0;
  width: 11px; height: 15px;
  border: 2px solid currentColor;
  border-radius: 2px;
}
.ico--doc::after {
  content: "";
  position: absolute;
  left: 5px; top: 5px;
  width: 5px; height: 2px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.ico--mail::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 15px; height: 11px;
  border: 2px solid currentColor;
  border-radius: 3px;
}
.ico--mail::after {
  content: "";
  position: absolute;
  left: 3px; top: 4.5px;
  width: 8px; height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) scale(0.86);
}

.ico--check::before {
  content: "";
  position: absolute;
  left: 2px; top: 3px;
  width: 10px; height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.ico--up::before {
  content: "";
  position: absolute;
  left: 3px; top: 5px;
  width: 9px; height: 9px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.ico--gear::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.ico--gear::after {
  content: "";
  position: absolute;
  left: 6px; top: -1px;
  width: 3px; height: 17px;
  border-left: 2px dotted currentColor;
  opacity: 0.85;
}

.ico--link::before,
.ico--link::after {
  content: "";
  position: absolute;
  width: 9px; height: 6px;
  border: 2px solid currentColor;
  border-radius: var(--r-full);
}
.ico--link::before { left: -1px; top: 4px; }
.ico--link::after  { left: 6px;  top: 4px; }

.ico--pen::before {
  content: "";
  position: absolute;
  left: 2px; top: 2px;
  width: 12px; height: 3px;
  background: currentColor;
  border-radius: 1px;
  transform: rotate(45deg);
  transform-origin: left center;
}
.ico--pen::after {
  content: "";
  position: absolute;
  left: 1px; bottom: 0;
  width: 4px; height: 4px;
  background: currentColor;
  clip-path: polygon(0 100%, 100% 100%, 0 0);
}

.ico--chart::before {
  content: "";
  position: absolute;
  left: 1px; bottom: 1px;
  width: 3px; height: 7px;
  background: currentColor;
  box-shadow: 5px -3px 0 currentColor, 10px -6px 0 currentColor;
  border-radius: 1px;
}

/* -------------------------------------------------------------------------
   09. Competences
   ------------------------------------------------------------------------- */

.skills {
  display: grid;
  gap: var(--s-4);
}

.skillgroup__head {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding-bottom: var(--s-4);
  margin-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}

.skillgroup__ico {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  transform: scale(1);
}

.skillgroup__ico::before,
.skillgroup__ico::after {
  transform-origin: center;
}

.skillgroup__ico.ico--gear::before { inset: 10px; }
.skillgroup__ico.ico--gear::after { left: 15px; top: 8px; height: 18px; }
.skillgroup__ico.ico--link::before { left: 7px; top: 14px; }
.skillgroup__ico.ico--link::after { left: 16px; top: 14px; }
.skillgroup__ico.ico--pen::before { left: 10px; top: 10px; }
.skillgroup__ico.ico--pen::after { left: 9px; bottom: 9px; }
.skillgroup__ico.ico--chart::before { left: 9px; bottom: 10px; }

.skillgroup__head h3 { margin-bottom: 3px; }

.skillgroup__head p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.skilllist {
  display: grid;
  gap: var(--s-5);
}

.skill {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px var(--s-3);
  align-items: baseline;
}

.skill__name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.skill__val {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--violet);
  font-variant-numeric: tabular-nums;
}

.skill__bar {
  grid-column: 1 / -1;
  display: block;
  height: 6px;
  border-radius: var(--r-full);
  background: var(--card-2);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}

.skill__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  transition: width 1.25s var(--ease-out);
  position: relative;
}

.skill__bar i::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 22px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42));
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}

.skill.is-filled .skill__bar i::after { opacity: 1; }

.skill__note {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* -------------------------------------------------------------------------
   10. Stack d'outils
   ------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 550;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform 0.2s var(--ease);
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.chip.is-active {
  color: #FFFFFF;
  border-color: transparent;
  background: linear-gradient(120deg, var(--indigo), var(--violet));
  box-shadow: var(--shadow-2);
}

.chip__c {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.72;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--card-2);
  font-size: 0.83rem;
  color: var(--text);
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease-out), border-color var(--dur) var(--ease);
}

.tool:hover {
  border-color: var(--violet);
  transform: translateY(-2px);
}

.tool__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--indigo), var(--violet));
  flex: none;
}

.tool.is-hidden {
  display: none;
}

.tool.is-dim {
  opacity: 0.24;
  filter: saturate(0.2);
}

.tools__count {
  margin: var(--s-4) 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* -------------------------------------------------------------------------
   11. Chronologie
   ------------------------------------------------------------------------- */

.timeline {
  display: grid;
  gap: var(--s-4);
  position: relative;
  padding-left: var(--s-5);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: linear-gradient(180deg, var(--indigo), var(--violet), transparent);
  opacity: 0.5;
  border-radius: 2px;
}

.tl__marker {
  position: absolute;
  left: calc(var(--s-5) * -1 + 1px);
  top: 26px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--violet);
  box-shadow: 0 0 0 4px var(--accent-soft);
  transition: transform var(--dur) var(--ease-out);
}

.tl:hover .tl__marker { transform: scale(1.22); }

.tl__meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-bottom: var(--s-2);
}

.tl__where {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.tl h3 { margin-bottom: var(--s-3); }

.tl p { font-size: 0.94rem; color: var(--muted); }

.tl__gain {
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px dashed var(--line);
  font-size: 0.86rem;
}

/* -------------------------------------------------------------------------
   12. Statistiques
   ------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.stat {
  padding: var(--s-4);
  text-align: left;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--accent-soft);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.stat:hover::after { opacity: 1; }

.card.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }

.stat__n {
  display: block;
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 1.95rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--indigo), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}

.stat__l {
  display: block;
  font-size: 0.79rem;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.proofs h3 { margin-bottom: var(--s-4); }

.proofs__list {
  display: grid;
  gap: var(--s-3);
}

.proofs__list li {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--muted);
  padding-bottom: var(--s-3);
  border-bottom: 1px dashed var(--line);
}

.proofs__list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.proofs__list .ico { margin-top: 4px; }

/* -------------------------------------------------------------------------
   13. Secteurs
   ------------------------------------------------------------------------- */

.sectors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--s-3);
}

.sector {
  padding: var(--s-4);
}

.sector h3 {
  font-size: 1rem;
  margin-bottom: var(--s-2);
  padding-left: var(--s-3);
  position: relative;
}

.sector h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 3px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--indigo), var(--violet));
  transition: opacity var(--dur) var(--ease);
  opacity: 0.6;
}

.sector:hover h3::before { opacity: 1; }
.card.sector:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }

.sector p {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0;
}

/* -------------------------------------------------------------------------
   14. Modalites et figures
   ------------------------------------------------------------------------- */

.figure {
  margin: 0 0 var(--s-5);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-2);
}

.figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}

.figure:hover img { transform: scale(1.03); }

.figure figcaption {
  padding: var(--s-3) var(--s-4);
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--card);
}

.figure--tall img { aspect-ratio: 4 / 5; }

.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-3);
}

.mode__ico {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  margin-bottom: var(--s-3);
  display: block;
}

.mode__ico.ico--doc::before { left: 9px; top: 7px; width: 14px; height: 18px; }
.mode__ico.ico--doc::after { left: 13px; top: 13px; width: 6px; }
.mode__ico.ico--clock::before { inset: 8px; }
.mode__ico.ico--clock::after { left: 15px; top: 12px; height: 5px; }
.mode__ico.ico--globe::before { inset: 8px; }
.mode__ico.ico--globe::after { left: 12px; top: 8px; width: 8px; height: 16px; }
.mode__ico.ico--check::before { left: 9px; top: 11px; width: 14px; height: 7px; }

.mode h3 { margin-bottom: var(--s-3); }

.mode ul,
.mode ol {
  display: grid;
  gap: var(--s-3);
}

.mode li {
  font-size: 0.87rem;
  color: var(--muted);
  padding-left: var(--s-4);
  position: relative;
  line-height: 1.55;
}

.mode li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(120deg, var(--indigo), var(--violet));
}

.mode__steps {
  counter-reset: step;
}

.mode__steps li {
  padding-left: var(--s-6);
  counter-increment: step;
}

.mode__steps li::before {
  content: counter(step);
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.66rem;
  font-weight: 700;
  color: #FFFFFF;
}

/* -------------------------------------------------------------------------
   15. Distinction
   ------------------------------------------------------------------------- */

.split {
  display: grid;
  gap: var(--s-4);
}

.split__text {
  display: grid;
  gap: var(--s-3);
}

.diff {
  padding: var(--s-4) var(--s-5);
}

.diff h3 {
  margin-bottom: var(--s-2);
  font-size: 1.02rem;
}

.diff p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.diff::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--s-5);
  bottom: var(--s-5);
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--indigo), var(--violet));
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.diff:hover::before { opacity: 1; }
.card.diff:hover { transform: translateX(3px); }

/* -------------------------------------------------------------------------
   16. Accordeon des questions
   ------------------------------------------------------------------------- */

.faq {
  display: grid;
  gap: var(--s-2);
}

.qa {
  padding: 0;
  overflow: hidden;
}

.qa h3 { font-size: inherit; }

.qa__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  width: 100%;
  text-align: left;
  padding: var(--s-4) var(--s-5);
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.qa__q:hover { background: var(--accent-soft); }

.qa__sign {
  position: relative;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.qa__sign::before,
.qa__sign::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--violet);
  border-radius: 1px;
  transform: translate(-50%, -50%);
  transition: opacity var(--dur) var(--ease), background var(--dur) var(--ease);
}

.qa__sign::before { width: 9px; height: 1.5px; }
.qa__sign::after  { width: 1.5px; height: 9px; }

.qa__q[aria-expanded="true"] .qa__sign {
  transform: rotate(180deg);
  background: linear-gradient(120deg, var(--indigo), var(--violet));
  border-color: transparent;
}

.qa__q[aria-expanded="true"] .qa__sign::before { background: #FFFFFF; }
.qa__q[aria-expanded="true"] .qa__sign::after { opacity: 0; }

.qa__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out);
}

.qa__a p {
  padding: 0 var(--s-5) var(--s-5);
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.qa.is-open {
  border-color: var(--line-strong);
  box-shadow: var(--glow);
}

/* -------------------------------------------------------------------------
   17. Contact et pied de page
   ------------------------------------------------------------------------- */

.contact {
  display: grid;
  gap: var(--s-5);
  padding: var(--s-6);
}

.contact__left img {
  width: 108px;
  height: 108px;
  border-radius: var(--r-lg);
  object-fit: cover;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-2);
}

.contact__right h3 { margin-bottom: var(--s-3); }

.contact__right p {
  font-size: 0.93rem;
  color: var(--muted);
}

.contact__note {
  font-size: 0.8rem;
  font-style: italic;
}

.contact__facts {
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px dashed var(--line);
}

.contact__facts li {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.foot {
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
}

.foot__name {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.foot__role,
.foot__legal {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 62ch;
}

.foot__mail a {
  font-size: 0.9rem;
  color: var(--violet);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}

.foot__mail a:hover { border-color: var(--violet); }

.foot__legal {
  font-size: 0.75rem;
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px dashed var(--line);
}

/* -------------------------------------------------------------------------
   18. Boutons, badges, retour en haut
   ------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 12px 22px;
  border-radius: var(--r-full);
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.24s var(--ease-out), box-shadow var(--dur) var(--ease), filter var(--dur) var(--ease);
}

.btn--primary {
  background: linear-gradient(120deg, var(--indigo), var(--violet));
  color: #FFFFFF;
  box-shadow: var(--shadow-2);
}

.btn--primary .ico { color: #FFFFFF; }

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
  filter: brightness(1.06);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: var(--r-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--muted);
}

.badge--soft {
  color: var(--text);
  background: var(--accent-soft);
  border-color: transparent;
}

.badge--accent {
  color: #FFFFFF;
  background: linear-gradient(120deg, var(--indigo), var(--violet));
  border-color: transparent;
}

.totop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.9);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease-out), visibility var(--dur);
}

.totop.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.totop:hover {
  border-color: var(--violet);
  box-shadow: var(--glow);
}

/* -------------------------------------------------------------------------
   19. Animations d'apparition
   ------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.62s var(--ease-out), transform 0.62s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* -------------------------------------------------------------------------
   20. Page 404
   ------------------------------------------------------------------------- */

.nf {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--s-7) var(--s-4);
  text-align: center;
}

.nf__box {
  max-width: 620px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-7) var(--s-6);
  box-shadow: var(--shadow-3);
  position: relative;
  overflow: hidden;
}

.nf__box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--indigo), var(--violet), transparent);
}

.nf__code {
  font-size: clamp(3rem, 2rem + 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(120deg, var(--indigo), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--s-3);
}

.nf__box img {
  width: 96px;
  height: 96px;
  border-radius: var(--r-lg);
  object-fit: cover;
  margin: 0 auto var(--s-4);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-2);
}

/* Le code d'erreur garde sa propre taille, seules les autres lignes sont attenuees */
.nf__box p:not(.nf__code) {
  color: var(--muted);
  font-size: 0.94rem;
}

.nf__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  justify-content: center;
  margin-top: var(--s-5);
}

.nf__links a.ghost {
  padding: 10px 18px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--card-2);
  font-size: 0.85rem;
  color: var(--muted);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform 0.22s var(--ease);
}

.nf__links a.ghost:hover {
  color: var(--text);
  border-color: var(--violet);
  transform: translateY(-2px);
}

/* -------------------------------------------------------------------------
   21. Points de rupture
   ------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .page { padding: 0 var(--s-5); }

  .contact {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: var(--s-6);
  }

  .rail__inner { padding: var(--s-6); }

  .tl__gain { font-size: 0.88rem; }
}

@media (min-width: 900px) {
  html { scroll-padding-top: 32px; }

  .page {
    display: grid;
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    gap: var(--s-6);
    align-items: start;
    padding: 0 var(--s-6);
  }

  .rail {
    position: sticky;
    top: var(--s-5);
    max-height: calc(100vh - var(--s-7));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
    padding-bottom: var(--s-5);
  }

  .rail::-webkit-scrollbar { width: 6px; }
  .rail::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: var(--r-full);
  }
  .rail::-webkit-scrollbar-track { background: transparent; }

  .content { padding-top: var(--s-6); }

  .sect { margin-bottom: var(--s-10); }

  .split {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    align-items: start;
  }

  .split .figure {
    position: sticky;
    top: var(--s-5);
    margin-bottom: 0;
  }

  .totop { right: 26px; bottom: 26px; }
}

@media (min-width: 1200px) {
  :root { --rail-w: 356px; }

  .page {
    gap: var(--s-7);
    padding: 0 var(--s-7);
  }

  .content { max-width: var(--content-max); }

  .skills { gap: var(--s-5); }

  .card { padding: var(--s-6); }

  .stat { padding: var(--s-5); }

  .sector { padding: var(--s-5); }
}

@media (max-width: 899px) {
  .rail__inner { border-radius: var(--r-lg); }
  .portrait__frame { width: 144px; height: 144px; }
  .railnav ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .railnav a {
    border: 1px solid var(--line);
    background: var(--card-2);
    font-size: 0.76rem;
    padding: 6px 11px;
  }
  .railnav a.is-current { padding-left: 11px; }
  .railnav a.is-current::before { display: none; }
  .topbar { margin-bottom: var(--s-6); }
}

@media (max-width: 639px) {
  body { font-size: 15.5px; }
  .card { padding: var(--s-4); }
  .card--lead { padding: var(--s-5) var(--s-4); }
  .sect { margin-bottom: var(--s-8); }
  .rail__metrics { grid-template-columns: repeat(3, 1fr); }
  .qa__q { padding: var(--s-4); font-size: 0.92rem; }
  .qa__a p { padding: 0 var(--s-4) var(--s-4); }
  .timeline { padding-left: var(--s-4); }
  .tl__marker { left: calc(var(--s-4) * -1 + 2px); }
  .contact { padding: var(--s-4); }
  .contact__left img { width: 84px; height: 84px; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

/* -------------------------------------------------------------------------
   22. Mouvement reduit et impression
   ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .figure:hover img,
  .portrait__frame:hover img { transform: none; }

  .pulse { animation: none; }

  .skill__bar i { transition: none; }
}

@media print {
  body {
    background: #FFFFFF;
    color: #000000;
  }
  .rail, .totop, .theme-toggle, .filters, .topbar__progress { display: none; }
  .card { box-shadow: none; border-color: #CCCCCC; break-inside: avoid; }
  .qa__a { max-height: none; }
  .reveal { opacity: 1; transform: none; }
}
