/* ==========================================================================
   HAZEM BEN ROMDHANE — Édition II « Obsidienne & Cuivre »
   Portfolio ultra-premium : obsidienne bleutée, cuivre métallique,
   typographie Clash Display / Satoshi / IBM Plex Mono.
   ========================================================================== */

/* ---------- Jetons de design ---------- */
:root {
  --noir:       #07090D;                       /* fond de page — obsidienne bleutée */
  --noir-2:     #0A0E15;                       /* sections surélevées */
  --noir-3:     #0E1420;                       /* cartes */
  --os:         #EDEAE3;                       /* texte principal — blanc os */
  --gris:       #98A5B3;                       /* texte secondaire — gris bleuté */
  --cuivre:     #DE8E46;                       /* accent cuivre */
  --cuivre-vif: #E8A15C;
  --cuivre-2:   #C0662B;
  --plan:       #6F8FAD;                       /* bleu plan — repères techniques */
  --ligne:      rgba(154, 171, 189, .14);      /* filets */
  --degrade-cuivre: linear-gradient(120deg, #EDB27C 0%, #DE8E46 45%, #B95F26 100%);

  --f-display: "Clash Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-body:    "Satoshi", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --header-h: 76px;
  --conteneur: 1200px;
  --marge: clamp(20px, 5vw, 48px);
  --expo: cubic-bezier(.19, 1, .22, 1);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--os);
  background: var(--noir);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--cuivre-vif); text-decoration: none; }
em { font-style: normal; }

::selection { background: var(--cuivre); color: var(--noir); }

:focus-visible { outline: 2px solid var(--cuivre-vif); outline-offset: 3px; }

/* Barre de défilement */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--noir); }
::-webkit-scrollbar-thumb { background: #202836; border-radius: 8px; border: 2px solid var(--noir); }
::-webkit-scrollbar-thumb:hover { background: #31405499; }
html { scrollbar-color: #202836 var(--noir); scrollbar-width: thin; }

.container {
  max-width: var(--conteneur);
  margin-inline: auto;
  padding-inline: var(--marge);
}

section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

.skip-link {
  position: absolute;
  top: -120px; left: 12px;
  z-index: 300;
  padding: .7rem 1.2rem;
  background: var(--cuivre);
  color: var(--noir);
  font-family: var(--f-mono);
  font-size: .8125rem;
  border-radius: 999px;
}
.skip-link:focus { top: 12px; }

/* ---------- Grain cinéma ---------- */
.grain {
  position: fixed;
  inset: -2%;
  z-index: 90;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ---------- Préchargeur ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  background: var(--noir);
  transition: transform .85s var(--expo), visibility 0s linear .85s;
}
html.is-loaded .loader { transform: translateY(-101%); visibility: hidden; }
html.no-loader .loader { display: none; }

.loader-inner { display: grid; justify-items: center; gap: 1.1rem; width: min(320px, 74vw); }
.loader-mark { width: 30px; height: 30px; color: var(--cuivre); }
.loader-label {
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gris);
}
.loader-bar {
  width: 100%;
  height: 1px;
  background: var(--ligne);
  overflow: hidden;
}
.loader-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--degrade-cuivre);
  transform: scaleX(0);
  transform-origin: left;
}
.loader-pct {
  font-family: var(--f-mono);
  font-size: .75rem;
  color: var(--os);
  font-variant-numeric: tabular-nums;
}

/* ---------- Curseur personnalisé ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 260;
}
.cursor-dot { width: 6px; height: 6px; background: var(--cuivre-vif); }
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(237, 234, 227, .35);
  transition: width .25s ease, height .25s ease, border-color .25s ease, background-color .25s ease;
}
.cursor-ring.is-hover {
  width: 58px; height: 58px;
  border-color: rgba(222, 142, 70, .75);
  background: rgba(222, 142, 70, .07);
}
html.has-cursor body, html.has-cursor a, html.has-cursor button { cursor: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color .25s ease, background-color .25s ease,
              color .25s ease, box-shadow .25s ease, filter .25s ease;
  will-change: transform;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-lg { padding: 1.1rem 1.85rem; font-size: .84rem; }
.btn-lg svg { width: 17px; height: 17px; }

.btn-solid {
  background: var(--degrade-cuivre);
  color: #1A0F05;
  box-shadow: 0 14px 38px -18px rgba(222, 142, 70, .55);
}
.btn-solid:hover { filter: brightness(1.08); box-shadow: 0 20px 46px -18px rgba(222, 142, 70, .65); }

.btn-ghost {
  border-color: rgba(154, 171, 189, .35);
  color: var(--os);
}
.btn-ghost:hover {
  border-color: rgba(222, 142, 70, .65);
  color: var(--cuivre-vif);
  background: rgba(222, 142, 70, .06);
}

/* ---------- Bandeau ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  padding-inline: var(--marge);
  transition: transform .4s var(--expo), background-color .3s ease,
              border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(7, 9, 13, .72);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: var(--ligne);
}
.site-header.is-hidden { transform: translateY(-102%); }

.header-inner {
  height: var(--header-h);
  max-width: 1400px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.brand-seal {
  width: 36px; height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--ligne);
  border-radius: 50%;
}
.brand-seal svg { width: 15px; height: 15px; color: var(--cuivre); }
.brand-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-name {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  color: var(--os);
  white-space: nowrap;
}
.brand-role {
  font-family: var(--f-mono);
  font-size: .58rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gris);
  white-space: nowrap;
}

.site-nav { display: flex; gap: 1.7rem; }
.site-nav a {
  position: relative;
  font-family: var(--f-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gris);
  padding-block: .5rem;
  transition: color .25s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .1rem;
  height: 1px;
  background: var(--cuivre);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--expo);
}
.site-nav a:hover, .site-nav a.is-active { color: var(--os); }
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: .9rem; }
.header-tel {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem 1rem;
  border: 1px solid rgba(222, 142, 70, .4);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--cuivre-vif);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.header-tel svg { width: 13px; height: 13px; }
.header-tel:hover { background: var(--cuivre); border-color: var(--cuivre); color: var(--noir); }

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 42px; height: 42px;
  background: none;
  border: 1px solid var(--ligne);
  border-radius: 50%;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 16px; height: 1.6px;
  background: var(--os);
  transition: transform .3s var(--expo);
}
body.menu-open .menu-btn span:nth-child(1) { transform: translateY(3.8px) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { transform: translateY(-3.8px) rotate(-45deg); }

/* ---------- Menu plein écran ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3rem;
  padding: calc(var(--header-h) + 2rem) var(--marge) 3rem;
  background: rgba(7, 9, 13, .96);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .4s ease, visibility 0s linear .4s;
}
body.menu-open .menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .4s ease;
}

.menu-nav { display: grid; gap: .4rem; }
.menu-nav a {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 7vw, 3rem);
  color: var(--os);
  padding-block: .35rem;
  transform: translateY(26px);
  opacity: 0;
  transition: transform .55s var(--expo), opacity .45s ease, color .25s ease;
}
.menu-nav a em {
  font-family: var(--f-mono);
  font-size: .8rem;
  color: var(--cuivre);
  letter-spacing: .1em;
}
.menu-nav a:hover { color: var(--cuivre-vif); }
body.menu-open .menu-nav a { transform: translateY(0); opacity: 1; }
body.menu-open .menu-nav a:nth-child(1) { transition-delay: .06s; }
body.menu-open .menu-nav a:nth-child(2) { transition-delay: .11s; }
body.menu-open .menu-nav a:nth-child(3) { transition-delay: .16s; }
body.menu-open .menu-nav a:nth-child(4) { transition-delay: .21s; }
body.menu-open .menu-nav a:nth-child(5) { transition-delay: .26s; }
body.menu-open .menu-nav a:nth-child(6) { transition-delay: .31s; }

.menu-foot {
  display: grid;
  gap: .5rem;
  border-top: 1px solid var(--ligne);
  padding-top: 1.6rem;
}
.menu-foot a { font-family: var(--f-mono); font-size: .95rem; color: var(--cuivre-vif); width: fit-content; }
.menu-foot p { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); }

@media (max-width: 1060px) {
  .site-nav { display: none; }
  .menu-btn { display: flex; }
}
@media (max-width: 760px) {
  .header-tel { display: none; }
  .brand-role { display: none; }
}

/* ---------- Héros ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3.5rem) 0 6.5rem;
  background-color: var(--noir);
  background-image:
    radial-gradient(1000px 640px at 84% 8%, rgba(222, 142, 70, .10), transparent 62%),
    radial-gradient(900px 700px at 8% 96%, rgba(111, 143, 173, .07), transparent 60%),
    linear-gradient(rgba(111, 143, 173, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 143, 173, .045) 1px, transparent 1px);
  background-size: auto, auto, 140px 140px, 140px 140px;
}

.hero-inner {
  width: 100%;
  max-width: var(--conteneur);
  margin-inline: auto;
  padding-inline: var(--marge);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
  margin-top: clamp(2.2rem, 4.5vw, 3.4rem);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gris);
}
.pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cuivre-vif);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(222, 142, 70, .45); }
  70%  { box-shadow: 0 0 0 11px rgba(222, 142, 70, 0); }
  100% { box-shadow: 0 0 0 0 rgba(222, 142, 70, 0); }
}

.hero-title {
  margin-top: 1.5rem;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 8.6vw, 7rem);
  line-height: .94;
  letter-spacing: -.018em;
  text-transform: uppercase;
  color: var(--os);
}
.hero-title .line { display: block; overflow: hidden; padding-block: .04em; }
.hero-title .line > span {
  display: inline-block;
  transform: translateY(0);
  transition: transform 1.05s var(--expo) var(--d, 0s);
}
.line-outline > span {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--os);
}

.hero-lede {
  max-width: 46ch;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--gris);
}
.hero-lede strong { color: var(--os); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.3rem; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2.4rem;
  margin-top: 2.8rem;
}
.hero-meta li {
  border-left: 2px solid var(--cuivre);
  padding-left: .85rem;
  font-family: var(--f-mono);
  font-size: .8rem;
  color: var(--os);
  line-height: 1.5;
}
.hero-meta li span {
  display: block;
  font-size: .58rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: .2rem;
}

/* Composition portrait */
.portrait { position: relative; max-width: 430px; width: 100%; justify-self: end; }

.portrait-aura {
  position: absolute;
  inset: -14%;
  background: radial-gradient(58% 54% at 60% 36%, rgba(222, 142, 70, .3), transparent 70%);
  filter: blur(48px);
  pointer-events: none;
}
.portrait-frame {
  position: absolute;
  top: 7%; right: -5.5%; bottom: -6%; left: 6%;
  border: 1px solid rgba(111, 143, 173, .3);
  border-radius: 22px;
  pointer-events: none;
}
.portrait-frame::before,
.portrait-frame::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
}
.portrait-frame::before { top: -1px; right: -1px; border-top: 2px solid var(--cuivre); border-right: 2px solid var(--cuivre); }
.portrait-frame::after  { bottom: -1px; left: -1px; border-bottom: 2px solid var(--cuivre); border-left: 2px solid var(--cuivre); }

.portrait-img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 26px;
  filter: saturate(.94) contrast(1.06) brightness(.99);
  -webkit-mask-image: radial-gradient(125% 125% at 50% 30%, #000 46%, transparent 73%);
  mask-image: radial-gradient(125% 125% at 50% 30%, #000 46%, transparent 73%);
}

.portrait-veil {
  position: absolute;
  z-index: 1;
  left: 0; right: 0; top: 0;
  aspect-ratio: 1;
  border-radius: 26px;
  background: radial-gradient(112% 112% at 50% 32%, transparent 38%, var(--noir) 86%);
  pointer-events: none;
}

.seal {
  position: absolute;
  z-index: 2;
  width: clamp(96px, 11vw, 124px);
  left: -8%;
  bottom: 4%;
}
.seal-rot {
  animation: spin 26s linear infinite;
  transform-origin: 60px 60px;
  transform-box: view-box;
}
@keyframes spin { to { transform: rotate(360deg); } }
.seal-edge { fill: rgba(7, 9, 13, .78); stroke: rgba(154, 171, 189, .3); stroke-width: 1; }
.seal-text {
  font-family: var(--f-mono);
  font-size: 8.6px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  fill: var(--gris);
}
.seal-mark { fill: var(--cuivre); }

.chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .85rem;
  background: rgba(10, 14, 21, .68);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--ligne);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--os);
  white-space: nowrap;
  will-change: transform;
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--cuivre); }
.chip-1 { top: 5%; right: -4%; }
.chip-2 { top: 42%; left: -13%; }
.chip-3 { bottom: 13%; right: -6%; }

.portrait-caption {
  position: absolute;
  right: 0;
  bottom: -2.6rem;
  font-family: var(--f-mono);
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gris);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.9rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}
.scroll-cue span {
  font-family: var(--f-mono);
  font-size: .58rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gris);
}
.scroll-cue i {
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--cuivre), transparent);
  transform-origin: top;
  animation: cue 2.3s var(--expo) infinite;
}
@keyframes cue {
  0%   { transform: scaleY(0); opacity: 1; }
  55%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* Entrées orchestrées (gérées par html.js / html.is-loaded) */
html.js .rise {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease var(--d, 0s), transform 1s var(--expo) var(--d, 0s);
}
html.js .rise-scale {
  opacity: 0;
  transform: translateY(18px) scale(.97);
  transition: opacity 1s ease var(--d, 0s), transform 1.1s var(--expo) var(--d, 0s);
}
html.js.is-loaded .rise,
html.js.is-loaded .rise-scale { opacity: 1; transform: none; }

html.js .hero-title .line > span { transform: translateY(114%); }
html.js.is-loaded .hero-title .line > span { transform: translateY(0); }

/* ---------- Bande défilante ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--ligne);
  background: var(--noir-2);
  padding-block: 1.15rem;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-seq { display: flex; align-items: center; gap: 2.6rem; padding-right: 2.6rem; }
.marquee-seq span {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--gris);
  white-space: nowrap;
}
.marquee-seq i { font-style: normal; font-size: .8rem; color: var(--cuivre); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(6rem, 11vw, 9.5rem); background: var(--noir); }
.section-raised { background: var(--noir-2); border-block: 1px solid var(--ligne); }

.section-grid {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.s-side { align-self: stretch; }

.s-index {
  position: sticky;
  top: calc(var(--header-h) + 34px);
  display: flex;
  align-items: baseline;
  gap: .55rem;
  font-family: var(--f-mono);
  font-size: 1.05rem;
  color: var(--cuivre-vif);
  font-variant-numeric: tabular-nums;
}
.s-index span {
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gris);
}
.s-index-center { position: static; justify-content: center; }

.s-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.015em;
  color: var(--os);
  text-wrap: balance;
  max-width: 20ch;
}
.s-title em, .contact-title em {
  background: var(--degrade-cuivre);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.s-sub { margin-top: 1.1rem; font-size: .95rem; color: var(--gris); }

/* Révélation des titres */
.mask-title { overflow: hidden; }
.mask-title > span {
  display: block;
  transform: translateY(0);
  transition: transform 1.05s var(--expo);
}
html.js .mask-title > span { transform: translateY(108%); }
html.js .mask-title.is-visible > span { transform: translateY(0); }

/* Révélation des blocs */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .85s ease var(--rd, 0s), transform .95s var(--expo) var(--rd, 0s);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 01 · Profil ---------- */
.profil-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(2.4rem, 4.5vw, 4.5rem);
  align-items: start;
  margin-top: clamp(2.4rem, 4.5vw, 3.6rem);
}

.profil-text p {
  max-width: 56ch;
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--gris);
}
.profil-text p + p { margin-top: 1.3rem; }
.profil-text strong { color: var(--os); font-weight: 600; }

.exigences { margin-top: 2.4rem; border-top: 1px solid var(--ligne); }
.exigences li {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--ligne);
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.18rem;
  letter-spacing: .01em;
  color: var(--os);
}
.exigences li em {
  font-family: var(--f-mono);
  font-size: .68rem;
  color: var(--cuivre-vif);
}

/* Fiche technique */
.fiche {
  position: relative;
  background: var(--noir-3);
  border: 1px solid var(--ligne);
  border-radius: 20px;
  padding: 1.8rem 1.9rem;
}
.fiche::before, .fiche::after { content: ""; position: absolute; width: 15px; height: 15px; }
.fiche::before { top: -1px; left: -1px; border-top: 2px solid var(--cuivre); border-left: 2px solid var(--cuivre); border-top-left-radius: 20px; }
.fiche::after  { bottom: -1px; right: -1px; border-bottom: 2px solid var(--cuivre); border-right: 2px solid var(--cuivre); border-bottom-right-radius: 20px; }

.fiche-title {
  font-family: var(--f-mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cuivre-vif);
  padding-bottom: .9rem;
}
.fiche-row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 1rem;
  padding-block: .82rem;
  border-top: 1px dashed rgba(154, 171, 189, .18);
}
.fiche-row dt {
  font-family: var(--f-mono);
  font-size: .6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gris);
  padding-top: .3em;
}
.fiche-row dd { font-size: .92rem; font-weight: 500; line-height: 1.55; color: var(--os); }
.fiche-row dd a { color: var(--cuivre-vif); }
.fiche-row dd a:hover { text-decoration: underline; }

@media (max-width: 880px) {
  .profil-cols { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .fiche-row { grid-template-columns: 1fr; gap: .3rem; }
  .fiche-row dt { padding-top: 0; }
}

/* ---------- 02 · Expertise (rail épinglé) ---------- */
.expertise { background: var(--noir-2); border-block: 1px solid var(--ligne); }

.pin-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2.2rem, 4vh, 3.6rem);
  padding-block: calc(var(--header-h) + 1.5rem) 3rem;
  overflow: hidden;
}

.rail-head { max-width: 720px; }
.rail-progress {
  margin-top: 1.7rem;
  width: min(300px, 46%);
  height: 2px;
  background: var(--ligne);
  border-radius: 2px;
  overflow: hidden;
}
.rail-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--degrade-cuivre);
  transform: scaleX(0);
  transform-origin: left;
}

.rail {
  display: flex;
  gap: 1.3rem;
  padding-inline: max(calc((100vw - var(--conteneur)) / 2 + var(--marge)), var(--marge));
  will-change: transform;
}

.ex-card {
  position: relative;
  flex: 0 0 auto;
  width: clamp(300px, 30vw, 420px);
  background: var(--noir-3);
  border: 1px solid var(--ligne);
  border-radius: 22px;
  padding: 2.1rem 2.2rem 2.3rem;
  overflow: hidden;
  transition: border-color .3s ease, transform .3s ease;
}
.ex-card:hover { border-color: rgba(222, 142, 70, .45); transform: translateY(-4px); }

.ex-num {
  position: absolute;
  top: 1.1rem; right: 1.4rem;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 4rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(154, 171, 189, .38);
}
.ex-icon { width: 38px; height: 38px; color: var(--cuivre-vif); margin-bottom: 3.4rem; }
.ex-card h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.42rem;
  letter-spacing: -.005em;
  color: var(--os);
  max-width: 14ch;
}
.ex-card > p:last-child { margin-top: .7rem; font-size: .94rem; line-height: 1.7; color: var(--gris); }

/* Mode statique (mobile / tactile / mouvement réduit) */
.expertise.is-static .pin-wrap { height: auto !important; }
.expertise.is-static .pin-sticky {
  position: static;
  min-height: 0;
  padding-block: clamp(6rem, 11vw, 9.5rem) 0;
  overflow: visible;
}
.expertise.is-static .rail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  transform: none !important;
  padding-bottom: clamp(6rem, 11vw, 9.5rem);
}
@media (min-width: 720px) {
  .expertise.is-static .rail { grid-template-columns: repeat(2, 1fr); }
}
.expertise.is-static .rail-progress { display: none; }
.expertise.is-static .ex-card { width: auto; }

/* ---------- 03 · Matériaux ---------- */
.mat-index { margin-top: clamp(2.2rem, 4vw, 3.2rem); border-top: 1px solid var(--ligne); }

.mat-row {
  display: grid;
  grid-template-columns: 96px 1fr 170px;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  padding-block: 2.2rem;
  border-bottom: 1px solid var(--ligne);
}

.mat-code {
  justify-self: start;
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: .12em;
  color: var(--cuivre-vif);
  border: 1px solid rgba(222, 142, 70, .38);
  border-radius: 999px;
  padding: .32em .8em;
  transition: background-color .3s ease, color .3s ease;
}
.mat-txt h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  letter-spacing: -.01em;
  color: var(--os);
  transition: transform .4s var(--expo), color .3s ease;
}
.mat-txt p { margin-top: .45rem; font-size: .95rem; color: var(--gris); max-width: 58ch; }

.mat-swatch {
  width: 100%;
  height: 86px;
  border: 1px solid var(--ligne);
  border-radius: 14px;
  opacity: .3;
  transform: translateX(12px) scale(.97);
  transition: opacity .45s ease, transform .5s var(--expo);
}
.swatch-beton {
  background-color: #141A24;
  background-image:
    radial-gradient(rgba(237, 234, 227, .17) 1.1px, transparent 1.2px),
    radial-gradient(rgba(237, 234, 227, .1) 1px, transparent 1.1px);
  background-size: 16px 16px, 23px 23px;
  background-position: 0 0, 8px 11px;
}
.swatch-acier {
  background-color: #141A24;
  background-image: repeating-linear-gradient(45deg, rgba(237, 234, 227, .15) 0 1px, transparent 1px 8px);
}
.swatch-bois {
  background-color: #171A1E;
  background-image:
    repeating-linear-gradient(45deg, rgba(222, 142, 70, .2) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(-45deg, rgba(222, 142, 70, .2) 0 1px, transparent 1px 10px);
}

.mat-row:hover .mat-txt h3 { transform: translateX(12px); color: var(--cuivre-vif); }
.mat-row:hover .mat-code { background: var(--cuivre); color: var(--noir); }
.mat-row:hover .mat-swatch { opacity: 1; transform: translateX(0) scale(1); }

@media (hover: none) {
  .mat-swatch { opacity: .9; transform: none; }
}
@media (max-width: 720px) {
  .mat-row { grid-template-columns: 1fr; align-items: start; gap: .9rem; padding-block: 1.8rem; }
  .mat-swatch { height: 64px; transform: none; }
}

/* ---------- 04 · Parcours ---------- */
.timeline {
  position: relative;
  margin-top: clamp(2.4rem, 4.5vw, 3.6rem);
  padding-left: 2.8rem;
  display: grid;
  gap: 3rem;
  max-width: 780px;
}
.timeline-rail {
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--ligne);
}
.timeline-rail span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--degrade-cuivre);
  transform: scaleY(0);
  transform-origin: top;
}

.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.8rem;
  top: 7px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--noir-2);
  border: 2px solid var(--cuivre);
}

.tl-date {
  font-family: var(--f-mono);
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cuivre-vif);
}
.timeline-item h3 {
  margin-top: .55rem;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: -.005em;
  color: var(--os);
}
.tl-org { margin-top: .35rem; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .04em; color: var(--gris); }
.tl-txt { margin-top: .75rem; font-size: .96rem; line-height: 1.75; color: var(--gris); max-width: 60ch; }

/* ---------- 05 · Logiciels ---------- */
.tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: clamp(2.4rem, 4.5vw, 3.6rem);
}
@media (min-width: 860px) {
  .tools { grid-template-columns: repeat(3, 1fr); }
}

.tool {
  position: relative;
  background: var(--noir-3);
  border: 1px solid var(--ligne);
  border-radius: 20px;
  padding: 1.9rem 2rem 2.1rem;
  overflow: hidden;
  transition: border-color .3s ease;
  will-change: transform;
}
.tool::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 34%, rgba(237, 234, 227, .06) 47%, rgba(222, 142, 70, .13) 53%, transparent 66%);
  transform: translateX(-135%);
  transition: transform .9s var(--expo);
  pointer-events: none;
}
.tool:hover { border-color: rgba(222, 142, 70, .4); }
.tool:hover::after { transform: translateX(135%); }

.tool-vendor {
  font-family: var(--f-mono);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gris);
}
.tool-vendor::before {
  content: "";
  display: inline-block;
  width: 14px; height: 2px;
  margin-right: .55rem;
  vertical-align: middle;
  background: var(--cuivre);
}
.tool h3 {
  margin-top: .85rem;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.28rem;
  color: var(--os);
}
.tool p { margin-top: .55rem; font-size: .9rem; line-height: 1.65; color: var(--gris); }

/* ---------- 06 · Contact ---------- */
.contact {
  position: relative;
  padding-block: clamp(7.5rem, 14vw, 12rem);
  text-align: center;
  background-color: var(--noir);
  background-image:
    radial-gradient(760px 460px at 50% 118%, rgba(222, 142, 70, .14), transparent 65%),
    linear-gradient(rgba(111, 143, 173, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 143, 173, .04) 1px, transparent 1px);
  background-size: auto, 140px 140px, 140px 140px;
  border-top: 1px solid var(--ligne);
}

.contact-title {
  margin-top: 1.4rem;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 11vw, 8.2rem);
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--os);
}
.contact-lede {
  margin: 1.8rem auto 0;
  max-width: 50ch;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--gris);
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.8rem;
}
.contact-meta {
  margin-top: 3.2rem;
  font-family: var(--f-mono);
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gris);
}

/* ---------- Cartouche ---------- */
.site-footer { background: var(--noir-2); border-top: 1px solid var(--ligne); padding-block: 2.8rem 2.3rem; }

.cartouche {
  display: grid;
  grid-template-columns: 1.35fr 1.4fr 1.15fr .55fr .5fr .7fr;
  border-top: 1px solid rgba(154, 171, 189, .24);
  border-left: 1px solid rgba(154, 171, 189, .24);
  font-variant-numeric: tabular-nums;
}
.cartouche-cell {
  padding: .72rem 1rem .78rem;
  border-right: 1px solid rgba(154, 171, 189, .24);
  border-bottom: 1px solid rgba(154, 171, 189, .24);
  font-family: var(--f-mono);
  font-size: .76rem;
  color: var(--os);
  line-height: 1.45;
  min-width: 0;
}
.cartouche-cell span {
  display: block;
  font-size: .56rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: .3rem;
}
@media (max-width: 860px) { .cartouche { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .cartouche { grid-template-columns: repeat(2, 1fr); } }

.footer-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .8rem 1.5rem;
  margin-top: 1.5rem;
}
.footer-line p { font-family: var(--f-mono); font-size: .67rem; letter-spacing: .05em; color: var(--gris); }
.footer-line a { color: var(--os); }
.footer-line a:hover { color: var(--cuivre-vif); }
.footer-top { font-family: var(--f-mono); font-size: .67rem; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Adaptations ---------- */
@media (max-width: 1000px) {
  .section-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .s-index { position: static; }
}

@media (max-width: 940px) {
  .hero { min-height: 0; padding-bottom: 7.5rem; }
  .scroll-cue { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 4.5rem; }
  .portrait { justify-self: center; max-width: 400px; }
  .chip-2 { left: -4%; }
  .chip-1 { right: -2%; }
  .chip-3 { right: -2%; }
  .seal { left: -4%; }
}

@media (max-width: 480px) {
  .seal { left: 0; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions, .contact-actions { flex-direction: column; align-items: stretch; }
  .contact-actions { max-width: 340px; margin-inline: auto; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .loader { display: none; }
  .pulse, .scroll-cue i, .seal-rot, .marquee-track { animation: none; }

  html.js .rise,
  html.js .rise-scale,
  html.js .hero-title .line > span,
  html.js .mask-title > span,
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn, .ex-card, .mat-txt h3, .mat-swatch, .tool::after, .cursor-ring { transition: none; }
  .ex-card:hover { transform: none; }
  .mat-row:hover .mat-txt h3 { transform: none; }
  .tool::after { display: none; }

  .cursor-dot, .cursor-ring { display: none; }
  html.has-cursor body, html.has-cursor a, html.has-cursor button { cursor: auto; }
}
