/* =====================================================================
   Portfolio — palette inspirée du CV (bleu marine, bleu acier, blanc)
   ===================================================================== */
@font-face { font-family: 'League Spartan'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(../fonts/league-spartan.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/poppins-400.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/poppins-400i.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/poppins-500.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/poppins-600.woff2) format('woff2'); }

:root {
  --navy: #12355b;
  --navy-900: #0b2440;
  --navy-700: #1a4470;
  --blue: #2c5d8f;
  --blue-500: #3f75ad;
  --blue-300: #8fb3dc;
  --sky: #dce9f7;
  --sky-50: #f3f7fc;
  --bg: #f7f9fc;
  --white: #fff;
  --text: #1b3352;
  --muted: #5b7290;
  --line: #dbe5f1;
  --ok: #2f9e6f;
  --ok-soft: #e3f5ec;
  --warn: #c98420;
  --warn-soft: #fbf0dc;
  --red: #d8453b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px -2px rgb(18 53 91 / .12);
  --shadow: 0 14px 34px -16px rgb(18 53 91 / .35);
  --shadow-lg: 0 30px 60px -24px rgb(11 36 64 / .5);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'League Spartan', 'Poppins', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 3px; border-radius: 6px; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.muted { color: var(--muted); }
.container { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -100px; background: var(--white); padding: .6rem 1rem; border-radius: 8px; z-index: 200; }
.skip:focus { top: 1rem; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; gap: .55em; padding: .8em 1.35em; border-radius: 999px; border: 2px solid transparent; font-weight: 600; font-size: .95rem; text-decoration: none; line-height: 1.2; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s, border-color .25s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .55em 1em; font-size: .85rem; }
.btn-lg { padding: 1em 1.8em; font-size: 1.05rem; }
.btn-primary { background: var(--navy); color: var(--white); box-shadow: 0 8px 20px -10px rgb(18 53 91 / .7); }
.btn-primary:hover { background: var(--navy-700); color: var(--white); box-shadow: 0 12px 26px -10px rgb(18 53 91 / .8); }
.btn-light { background: var(--white); color: var(--navy); box-shadow: 0 10px 24px -12px rgb(0 0 0 / .5); }
.btn-light:hover { color: var(--navy); background: var(--sky); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgb(255 255 255 / .45); }
.btn-ghost:hover { color: var(--white); border-color: var(--white); background: rgb(255 255 255 / .08); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn .i { transition: transform .25s var(--ease); }
.btn:hover .i:last-child:not(:first-child) { transform: translateX(3px); }

/* ---------- Navigation ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); display: flex; align-items: center; transition: background-color .3s, box-shadow .3s, height .3s; }
.nav.scrolled { background: rgb(255 255 255 / .9); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); box-shadow: 0 1px 0 var(--line), var(--shadow-sm); --nav-h: 60px; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--white); font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; transition: color .3s; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--white); color: var(--navy); font-size: 1rem; transition: transform .4s var(--ease), background-color .3s, color .3s; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.nav.scrolled .brand { color: var(--navy); }
.nav.scrolled .brand-mark { background: var(--navy); color: var(--white); }
.nav-links { display: flex; align-items: center; gap: .2rem; }
.nav-links a:not(.btn) { position: relative; padding: .5rem .75rem; color: rgb(255 255 255 / .85); text-decoration: none; font-weight: 500; font-size: .92rem; transition: color .25s; }
.nav-links a:not(.btn)::after { content: ''; position: absolute; left: .75rem; right: .75rem; bottom: .2rem; height: 2px; border-radius: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:not(.btn):hover, .nav-links a.active:not(.btn) { color: var(--white); }
.nav-links a:not(.btn):hover::after, .nav-links a.active:not(.btn)::after { transform: scaleX(1); }
.nav.scrolled .nav-links a:not(.btn) { color: var(--muted); }
.nav.scrolled .nav-links a:not(.btn):hover, .nav.scrolled .nav-links a.active:not(.btn) { color: var(--navy); }
.nav-links .btn { margin-left: .5rem; }
.nav:not(.scrolled) .nav-links .btn-primary { background: var(--white); color: var(--navy); }
.nav-toggle { display: none; background: none; border: 0; color: var(--white); padding: .5rem; border-radius: 10px; }
.nav-toggle .i { width: 26px; height: 26px; }
.nav.scrolled .nav-toggle { color: var(--navy); }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded='true'] .i-close { display: block; }
.nav-toggle[aria-expanded='true'] .i-open { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; background: radial-gradient(1200px 600px at 85% 20%, #1f4a7a 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%); color: var(--white); padding: calc(var(--nav-h) + 3.5rem) 0 8.5rem; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgb(255 255 255 / .12) 1px, transparent 1.4px); background-size: 26px 26px; mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 30%, transparent 75%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.badge-live { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem 1rem .45rem .8rem; margin-bottom: 1.4rem; border-radius: 999px; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .2); font-size: .88rem; font-weight: 500; }
.badge-live .dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #4ade80; }
.badge-live .dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #4ade80; animation: ping 2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
.hero-name { color: var(--white); font-size: clamp(2.8rem, 7vw, 5.2rem); font-weight: 800; text-transform: uppercase; letter-spacing: -.005em; line-height: .95; margin-bottom: .35em; }
.hero-name .w { display: inline-block; }
.hero-title { font-family: var(--display); font-size: clamp(1.35rem, 2.6vw, 1.9rem); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-300); margin: 0 0 .3rem; }
.hero-sub { display: flex; align-items: center; gap: .5rem; text-transform: uppercase; font-size: .85rem; letter-spacing: .08em; font-weight: 600; color: rgb(255 255 255 / .75); margin-bottom: 1.4rem; }
.hero-pitch { font-size: 1.08rem; color: rgb(255 255 255 / .85); max-width: 34em; margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-social { display: flex; gap: .6rem; margin-top: 1.8rem; }
.hero-social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--white); background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .15); transition: transform .25s var(--ease), background-color .25s; }
.hero-social a:hover { transform: translateY(-3px); background: rgb(255 255 255 / .18); color: var(--white); }

/* Animations d'entrée du hero */
.hero-text > * { animation: rise .8s var(--ease) both; }
.hero-text > :nth-child(2) { animation-delay: .08s; }
.hero-text > :nth-child(3) { animation-delay: .16s; }
.hero-text > :nth-child(4) { animation-delay: .24s; }
.hero-text > :nth-child(5) { animation-delay: .32s; }
.hero-text > :nth-child(6) { animation-delay: .4s; }
.hero-text > :nth-child(7) { animation-delay: .48s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* Scène 3D du hero */
.hero-visual { position: relative; height: 470px; perspective: 1000px; transform-style: preserve-3d; animation: fadeIn 1s .2s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } }
.layer { position: absolute; transition: transform .6s var(--ease); transform: translate3d(calc(var(--mx, 0) * var(--depth, 0) * 1px), calc(var(--my, 0) * var(--depth, 0) * 1px), 0); }
.photo-wrap { --depth: .5; left: 60%; top: 44%; width: 270px; height: 350px; margin: -195px 0 0 -135px; }
.photo-wrap::before { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .9); animation: float 7s ease-in-out infinite; }
.photo-wrap::after { content: ''; position: absolute; inset: -32px; border-radius: 50%; border: 1px dashed rgb(143 179 220 / .5); animation: spin 40s linear infinite; }
.photo-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow-lg); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.orb-1 { width: 120px; height: 120px; right: 4%; top: 2%; background: radial-gradient(circle at 30% 30%, #6c9bd0, transparent 70%); opacity: .55; animation: float 9s ease-in-out infinite; }
.orb-2 { width: 70px; height: 70px; left: 6%; bottom: 14%; background: radial-gradient(circle at 30% 30%, #9fc1e8, transparent 70%); opacity: .4; animation: float 6s 1s ease-in-out infinite; }

.cube-scene { --depth: 1.1; right: 2%; top: 4%; width: 78px; height: 78px; perspective: 600px; }
.cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: cube 18s linear infinite; }
.cube .f { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--white); background: linear-gradient(135deg, rgb(63 117 173 / .55), rgb(18 53 91 / .55)); border: 1.5px solid rgb(255 255 255 / .55); border-radius: 10px; backface-visibility: visible; }
.cube .f1 { transform: translateZ(39px); }
.cube .f2 { transform: rotateY(180deg) translateZ(39px); color: #4ade80; font-size: 1.6rem; }
.cube .f3 { transform: rotateY(90deg) translateZ(39px); }
.cube .f4 { transform: rotateY(-90deg) translateZ(39px); }
.cube .f5 { transform: rotateX(90deg) translateZ(39px); }
.cube .f6 { transform: rotateX(-90deg) translateZ(39px); font-size: 1.5rem; }
@keyframes cube { from { transform: rotateX(-18deg) rotateY(0); } to { transform: rotateX(-18deg) rotateY(360deg); } }

.terminal { --depth: .8; left: -4%; bottom: -28px; width: max-content; max-width: min(370px, 100%); background: rgb(9 26 46 / .92); border: 1px solid rgb(255 255 255 / .12); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; backdrop-filter: blur(6px); }
.term-bar, .code-bar { display: flex; align-items: center; gap: 6px; padding: .55rem .8rem; background: rgb(255 255 255 / .06); font-family: var(--mono); font-size: .72rem; color: rgb(255 255 255 / .55); }
.term-bar i, .code-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2), .code-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3), .code-bar i:nth-child(3) { background: #28c840; }
.term-bar span, .code-bar span { margin-left: .5rem; }
.term-body { margin: 0; padding: .9rem 1rem 1rem; font-family: var(--mono); font-size: .76rem; line-height: 1.7; color: #e3ecf7; white-space: pre; overflow: hidden; }
.tl { display: inline-block; opacity: 0; animation: termLine .35s var(--d, 0s) var(--ease) forwards; }
.tl.cmd { overflow: hidden; vertical-align: bottom; max-width: 0; opacity: 1; white-space: nowrap; animation: type 1.1s .3s steps(28, end) forwards; }
@keyframes type { to { max-width: 100%; } }
@keyframes termLine { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.t-prompt { color: var(--blue-300); }
.t-dim { color: rgb(227 236 247 / .45); }
.t-ok { color: #4ade80; }
.t-pass { background: #4ade80; color: #06301d; font-weight: 700; padding: 0 .35em; border-radius: 3px; }
.tl.sum { margin-top: .3rem; }

.hero-curve { position: absolute; bottom: -1px; left: 0; width: 100%; height: 90px; fill: var(--bg); }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(4.5rem, 9vw, 7rem) 0; }
.section-tint { background: linear-gradient(180deg, var(--sky-50), #eaf1fa); }
.section-navy { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%); color: var(--white); overflow: hidden; }
.section > .container { position: relative; }
.sec-head { margin-bottom: 3rem; max-width: 760px; }
.kicker { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin: 0 0 .6rem; }
.k-fn { color: var(--blue); font-weight: 600; }
.k-str { color: var(--ok); }
.sec-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; text-transform: uppercase; margin: 0; }
.sec-head h2::after { content: ''; display: block; width: 64px; height: 5px; margin-top: .9rem; border-radius: 5px; background: linear-gradient(90deg, var(--navy), var(--blue-300)); }
.sec-head.light h2 { color: var(--white); }
.sec-head.light h2::after { background: linear-gradient(90deg, var(--white), var(--blue-300)); }
.sec-head.light .kicker { color: rgb(255 255 255 / .6); }
.sec-head.light .k-fn { color: var(--blue-300); }
.sec-head.light .k-str { color: #86efac; }
.sub-title { font-size: 1.5rem; margin: 4rem 0 1.5rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 46em; }

.card { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s; }
.card:hover { box-shadow: var(--shadow); border-color: #c9d8eb; }
.ico { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--sky); color: var(--navy); flex: none; }
.ico .i { width: 22px; height: 22px; }

/* Révélation au scroll (uniquement si JavaScript est actif) */
@media (scripting: enabled) {
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
  .reveal.in { opacity: 1; transform: none; }
  .reveal.settled { transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s, opacity .4s; transition-delay: 0s; }
  .skill.settled .tags li { transition-delay: 0s; }
}

/* ---------- À propos ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: start; }
.about-text p { font-size: 1.04rem; }
.about-text p:first-child::first-letter { font-family: var(--display); font-size: 3.2em; float: left; line-height: .8; margin: .08em .1em 0 0; color: var(--navy); font-weight: 800; }
.stats { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2rem; }
.stats li { padding: 1.1rem 1.2rem; border-radius: var(--radius-sm); background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--navy); }
.stats strong { display: block; font-family: var(--display); font-size: 2rem; line-height: 1.1; color: var(--navy); }
.stats span { font-size: .88rem; color: var(--muted); }

.gherkin { background: var(--navy-900); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; transform-style: preserve-3d; }
.gherkin pre { margin: 0; padding: 1.3rem 1.4rem 1.5rem; overflow-x: auto; font-family: var(--mono); font-size: .86rem; line-height: 1.75; color: #dbe7f5; }
.g-title { color: #f9a8d4; font-weight: 700; }
.g-name { color: var(--white); font-weight: 600; }
.g-kw { color: #7dd3fc; font-weight: 600; }
.g-com { color: rgb(219 231 245 / .45); font-style: italic; }

.strengths { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.strength { padding: 1.6rem 1.4rem; }
.strength:hover { transform: translateY(-6px); }
.strength .ico { margin-bottom: 1rem; transition: transform .5s var(--ease), background-color .3s, color .3s; }
.strength:hover .ico { transform: rotateY(180deg); background: var(--navy); color: var(--white); }
.strength h4 { font-size: 1.15rem; margin-bottom: .4rem; }
.strength p { font-size: .92rem; color: var(--muted); margin: 0; }

/* ---------- Compétences ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.skill { padding: 1.6rem; transform-style: preserve-3d; }
.skill header { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.1rem; }
.skill h3 { font-size: 1.15rem; margin: 0; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { padding: .35rem .85rem; border-radius: 999px; background: var(--sky-50); border: 1px solid var(--line); color: var(--navy); font-size: .85rem; font-weight: 500; transition: background-color .25s, color .25s, transform .25s var(--ease); }
.tags li:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }
.tags.small li { font-size: .78rem; padding: .25rem .7rem; }
@media (scripting: enabled) {
  .skill .tags li { opacity: 0; transform: scale(.8); transition: opacity .4s var(--ease), transform .4s var(--ease), background-color .25s, color .25s; transition-delay: calc(var(--i, 0) * 90ms + var(--j, 0) * 60ms + 200ms); }
  .skill.in .tags li { opacity: 1; transform: none; }
  .skill.in .tags li:hover { transform: translateY(-2px); transition-delay: 0s; }
}
.lang-list { list-style: none; display: grid; gap: .8rem; }
.lang-list li { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: .8rem; }
.lang-name { font-weight: 600; color: var(--navy); }
.lang-level { font-family: var(--display); font-weight: 700; color: var(--white); background: var(--navy); padding: .1rem .6rem; border-radius: 8px; font-size: .9rem; }
.lang-list small { grid-column: 1 / -1; color: var(--muted); font-size: .82rem; }

/* ---------- Parcours / timeline (comme la ligne du CV) ---------- */
.timeline-cols { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3.5rem; }
.col-title { display: flex; align-items: center; gap: .6rem; font-size: 1.3rem; margin-bottom: 1.5rem; }
.timeline { list-style: none; position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: linear-gradient(var(--navy), var(--blue-300)); transform-origin: top; }
@media (scripting: enabled) { .timeline::before { transform: scaleY(0); transition: transform 1.4s var(--ease); } .timeline.in::before { transform: scaleY(1); } }
.tl-item { position: relative; margin-bottom: 1.4rem; }
.tl-dot { position: absolute; left: calc(-2rem + 1px); top: 1.35rem; width: 15px; height: 15px; border-radius: 50%; background: var(--navy); box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--sky); transition: transform .3s var(--ease); }
.tl-item:hover .tl-dot { transform: scale(1.25); }
.tl-card { padding: 1.2rem 1.4rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.tl-item:hover .tl-card { transform: translateX(6px); box-shadow: var(--shadow); }
.tl-period { margin: 0 0 .2rem; font-size: .82rem; font-style: italic; font-weight: 500; color: var(--blue); }
.tl-card h4 { font-size: 1.18rem; margin: 0 0 .15rem; }
.tl-org { margin: 0 0 .5rem; font-style: italic; color: var(--muted); font-size: .92rem; }
.tl-details { margin: 0 0 .4rem; font-size: .92rem; }
.tl-card ul { padding-left: 1.1rem; font-size: .92rem; }
.tl-card ul li::marker { color: var(--blue); }
.link-file { display: inline-flex; align-items: center; gap: .4rem; margin-top: .6rem; font-weight: 600; font-size: .88rem; text-decoration: none; }
.link-file:hover { text-decoration: underline; }
.interests { margin-top: 2.5rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .55rem; }
.chips li { padding: .45rem 1rem; border-radius: 999px; background: var(--navy); color: var(--white); font-size: .88rem; font-style: italic; }

/* ---------- Certifications ---------- */
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1.3rem; }
.cert { display: flex; gap: 1.2rem; padding: 1.6rem; transform-style: preserve-3d; }
.cert-ico { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; flex: none; background: linear-gradient(135deg, var(--navy), var(--blue-500)); color: var(--white); box-shadow: 0 10px 22px -10px rgb(18 53 91 / .7); }
.cert-ico .i { width: 30px; height: 30px; }
.cert h3 { font-size: 1.12rem; margin: .3rem 0 .2rem; }
.cert p.muted { margin: 0; font-size: .9rem; }
.status { display: inline-flex; align-items: center; gap: .35rem; margin: 0; padding: .15rem .65rem; border-radius: 999px; font-size: .74rem; font-weight: 600; letter-spacing: .02em; }
.status-ok { background: var(--ok-soft); color: #1d7a52; }
.status-progress { background: var(--warn-soft); color: #93600f; }
.status-planned { background: var(--sky); color: var(--navy); }
.progress { height: 6px; margin-top: .9rem; border-radius: 6px; background: var(--sky); overflow: hidden; }
.progress span { display: block; height: 100%; width: 65%; border-radius: inherit; background: repeating-linear-gradient(-45deg, var(--blue) 0 10px, var(--blue-500) 10px 20px); background-size: 28px 28px; animation: stripes 1.2s linear infinite; }
@keyframes stripes { to { background-position: 28px 0; } }
.card-links { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Projets ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.4rem; }
.project { display: flex; flex-direction: column; overflow: hidden; transform-style: preserve-3d; }
.project-media { aspect-ratio: 16 / 9; background: var(--sky); overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project:hover .project-media img { transform: scale(1.05); }
.project-media.no-img { display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #3f75ad, var(--navy) 70%); color: var(--white); }
.project-media.no-img .i { width: 54px; height: 54px; opacity: .9; }
.project-body { display: flex; flex-direction: column; flex: 1; padding: 1.4rem 1.5rem 1.6rem; }
.project-cat { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0 0 .4rem; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); }
.project h3 { font-size: 1.25rem; }
.project-body > p { font-size: .93rem; color: var(--muted); }
.checks { list-style: none; display: grid; gap: .35rem; margin-bottom: 1rem; font-size: .9rem; }
.checks li { display: flex; gap: .5rem; align-items: flex-start; }
.checks .i { color: var(--ok); margin-top: .2em; }
.project-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: 1rem; }
.empty { text-align: center; padding: 3rem 1.5rem; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--white); }
.empty-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--sky); color: var(--navy); margin-bottom: 1rem; animation: float 5s ease-in-out infinite; }
.empty-ico .i { width: 30px; height: 30px; }
.empty p { color: var(--muted); max-width: 34em; margin: 0 auto; }
.gh-banner { display: flex; align-items: center; gap: 1.4rem; margin-top: 2rem; padding: 1.5rem 1.8rem; border-radius: var(--radius); background: linear-gradient(120deg, var(--navy), var(--navy-700)); color: var(--white); box-shadow: var(--shadow); }
.gh-banner h3 { color: var(--white); font-size: 1.2rem; margin: 0 0 .2rem; }
.gh-banner p { margin: 0; font-size: .92rem; color: rgb(255 255 255 / .78); }
.gh-banner > div { flex: 1; }
.gh-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: rgb(255 255 255 / .1); flex: none; }
.gh-ico .i { width: 28px; height: 28px; }
.gh-banner .btn-primary { background: var(--white); color: var(--navy); }
.pill { padding: .4rem 1rem; border-radius: 999px; border: 1px dashed rgb(255 255 255 / .5); font-size: .85rem; font-weight: 600; white-space: nowrap; }

/* ---------- CV ---------- */
.cv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.cv-text p { color: rgb(255 255 255 / .82); font-size: 1.05rem; max-width: 30em; }
.cv-meta { display: flex; align-items: center; gap: .5rem; font-size: .9rem !important; color: rgb(255 255 255 / .6) !important; }
.cv-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.cv-visual { perspective: 1400px; display: flex; justify-content: center; }
.cv-paper { position: relative; display: block; padding: 0; border: 0; background: var(--white); border-radius: 10px; width: min(380px, 100%); box-shadow: 30px 40px 70px -30px rgb(0 0 0 / .65); transform: rotateY(-16deg) rotateX(6deg) rotateZ(1deg); transition: transform .8s var(--ease), box-shadow .8s var(--ease); overflow: hidden; }
.cv-paper img { width: 100%; height: auto; }
.cv-paper:hover, .cv-paper:focus-visible { transform: rotateY(0) rotateX(0) translateY(-6px) scale(1.02); box-shadow: 0 40px 80px -30px rgb(0 0 0 / .7); }
.cv-paper::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgb(255 255 255 / .35) 0%, transparent 35%); pointer-events: none; transition: opacity .6s; }
.cv-paper:hover::after { opacity: 0; }
.cv-zoom { position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: var(--white); box-shadow: var(--shadow); transform: scale(.8); opacity: 0; transition: transform .3s var(--ease), opacity .3s; }
.cv-paper:hover .cv-zoom { transform: none; opacity: 1; }
.cv-dialog { width: min(920px, 96vw); max-height: 94vh; padding: 0; border: 0; border-radius: 16px; background: var(--white); box-shadow: var(--shadow-lg); overflow: auto; }
.cv-dialog::backdrop { background: rgb(8 22 40 / .75); backdrop-filter: blur(4px); }
.cv-dialog[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(10px); } }
.cv-dialog-bar { position: sticky; top: 0; display: flex; justify-content: flex-end; gap: .5rem; padding: .7rem; background: rgb(255 255 255 / .95); border-bottom: 1px solid var(--line); z-index: 1; }
.cv-dialog img { width: 100%; height: auto; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.1rem; margin-top: 2rem; }
.contact-card { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.3rem; }
.contact-card:hover { transform: translateY(-4px); }
.contact-card > div { flex: 1; min-width: 0; }
.contact-card h3 { font-family: var(--font); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .1rem; }
.contact-card a, .contact-card span:not(.ico) { font-weight: 600; font-size: .93rem; color: var(--navy); text-decoration: none; overflow-wrap: anywhere; }
.contact-card a:hover { text-decoration: underline; }
.contact-card.is-soon .ico { background: var(--sky-50); color: var(--muted); }
.contact-card .muted { color: var(--muted) !important; font-weight: 500 !important; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); color: var(--muted); transition: color .2s, border-color .2s, background-color .2s; }
.icon-btn:hover { color: var(--navy); border-color: var(--navy); }
.contact-cta { text-align: center; margin-top: 3rem; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: rgb(255 255 255 / .7); padding: 2rem 0; font-size: .88rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer p { margin: 0; }
.footer a { color: rgb(255 255 255 / .8); text-decoration: none; }
.footer a:hover { color: var(--white); }
.bug-count { display: inline-block; min-width: 2.6em; text-align: center; padding: 0 .4em; border-radius: 6px; background: rgb(255 255 255 / .1); font-family: var(--mono); }
.bug-hint.done { color: #86efac; }

/* ---------- Chasse aux bugs ---------- */
.bug { position: absolute; z-index: 5; width: 30px; height: 30px; padding: 0; border: 0; background: none; opacity: .85; animation: crawl 9s ease-in-out infinite; transition: opacity .3s; }
.bug svg { width: 100%; height: 100%; display: block; }
.bug:hover { opacity: 1; }
.bug .legs { animation: legs .25s steps(2) infinite; transform-origin: center; }
.bug-a { right: -6px; top: -48px; }
.bug-b { left: -6px; bottom: -3.2rem; animation-duration: 11s; }
.bug-c { right: 12px; bottom: -3.2rem; animation-duration: 8s; }
@keyframes crawl { 0%, 100% { transform: translate(0, 0) rotate(80deg); } 25% { transform: translate(-30px, 4px) rotate(100deg); } 50% { transform: translate(-30px, -10px) rotate(260deg); } 75% { transform: translate(0, -6px) rotate(280deg); } }
@keyframes legs { 50% { transform: scaleX(.92); } }
.bug.squashed { pointer-events: none; animation: squash .6s var(--ease) forwards; }
@keyframes squash { 30% { transform: scale(1.4) rotate(20deg); } 100% { transform: scale(0) rotate(180deg); opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 100; max-width: calc(100% - 2rem); padding: .8rem 1.3rem; border-radius: 14px; background: var(--navy); color: var(--white); font-weight: 500; font-size: .92rem; box-shadow: var(--shadow-lg); transform: translate(-50%, 140%); opacity: 0; transition: transform .45s var(--ease), opacity .45s; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .strengths { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links { position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column; align-items: stretch; gap: 0; padding: 1rem 1.25rem 1.5rem; background: var(--white); box-shadow: var(--shadow); transform: translateY(-12px); opacity: 0; visibility: hidden; transition: transform .3s var(--ease), opacity .3s, visibility .3s; }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a:not(.btn), .nav.scrolled .nav-links a:not(.btn) { color: var(--navy); padding: .85rem .25rem; border-bottom: 1px solid var(--line); }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links .btn { margin: 1rem 0 0; justify-content: center; }
  .nav:not(.scrolled) .nav-links .btn-primary { background: var(--navy); color: var(--white); }
  .nav.menu-open { background: var(--white); }
  .nav.menu-open .brand { color: var(--navy); }
  .nav.menu-open .brand-mark { background: var(--navy); color: var(--white); }
  .nav.menu-open .nav-toggle { color: var(--navy); }
  .hero { padding-bottom: 7rem; }
  .hero-grid, .about-grid, .timeline-cols, .cv-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 440px; max-width: 460px; width: 100%; margin: 0 auto; }
  .cv-visual { order: -1; }
  .cv-paper { transform: rotateY(-8deg) rotateX(4deg); }
}
@media (max-width: 560px) {
  .container { width: calc(100% - 2rem); }
  .strengths, .skills-grid, .stats { grid-template-columns: 1fr; }
  .hero-visual { height: 400px; }
  .photo-wrap { width: 220px; height: 285px; margin: -165px 0 0 -110px; left: 50%; top: 40%; }
  .terminal { left: 0; bottom: -12px; width: 100%; }
  .term-body { font-size: .7rem; }
  .cube-scene { width: 60px; height: 60px; }
  .cube .f1 { transform: translateZ(30px); } .cube .f2 { transform: rotateY(180deg) translateZ(30px); } .cube .f3 { transform: rotateY(90deg) translateZ(30px); } .cube .f4 { transform: rotateY(-90deg) translateZ(30px); } .cube .f5 { transform: rotateX(90deg) translateZ(30px); } .cube .f6 { transform: rotateX(-90deg) translateZ(30px); }
  .cube .f { font-size: .95rem; }
  .gh-banner { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; text-align: center; }
  .contact-cta .btn { white-space: normal; }
}

/* Accessibilité : mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .tl, .tl.cmd { opacity: 1; max-width: none; animation: none !important; }
  .hero-text > *, .hero-visual { animation: none !important; }
  .bug { animation: none; }
}
