﻿/* ==========================================================
   layout.css — mise en page des pages
   Grands titres Roboto, accent cuivre, halo de lumière, filets fins.
   ========================================================== */
.stage { flex: 1; position: relative; overflow-x: clip; }
.stage::before { content: ""; position: absolute; top: -18vh; right: -18vw; width: min(80vw, 980px); aspect-ratio: 1; background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; z-index: 0; }
.stage-in { position: relative; z-index: 1; padding: calc(var(--header-h) + clamp(48px, 10vh, 120px)) var(--gutter) clamp(72px, 14vh, 160px); }

.kicker, .eyebrow { display: inline-flex; align-items: center; gap: 14px; font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-text); }
.kicker::before { content: ""; width: 36px; height: 2px; background: var(--accent); }
.eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 2s ease-out infinite; }

h1 { font-weight: 900; letter-spacing: -.03em; line-height: 1.04; }
h1 .grad { color: var(--accent-text); }

/* ---------- En-tête de page ---------- */
.page-head { display: grid; gap: clamp(20px, 3vw, 34px); margin-bottom: clamp(48px, 9vw, 120px); max-width: 1100px; }
.page-head h1 { font-size: clamp(2.7rem, 7.6vw, 7rem); }
.page-head p { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.2rem); max-width: 46ch; }
.page-head .btn { margin-top: 8px; justify-self: start; }

/* ---------- Accueil ---------- */
.hero { min-height: calc(100svh - var(--header-h) - clamp(100px, 18vh, 200px)); display: grid; align-items: center; }
.hero-grid { grid-template-columns: minmax(0, 1.65fr) minmax(0, .75fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.hero-copy { display: grid; gap: clamp(22px, 3vw, 34px); justify-items: start; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 5.8rem); }
.lead { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.2rem); max-width: 48ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: clamp(24px, 5vw, 72px); width: 100%; margin-top: clamp(14px, 3vw, 40px); padding-top: 26px; border-top: 1px solid var(--line-strong); }
.fact { display: grid; gap: 4px; align-content: start; }
.fact strong { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 900; letter-spacing: -.04em; line-height: 1; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.fact > span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.fact-flag { grid-auto-flow: column; align-items: center; gap: 12px; }
.fact-flag img { width: 36px; height: auto; border-radius: 3px; }
.fact-flag b { font-weight: 700; color: var(--text); }

.hero-photo { position: relative; max-width: 380px; width: 100%; justify-self: end; }
.hero-photo::before { content: ""; position: absolute; inset: 0; border: 2px solid var(--accent); border-radius: var(--radius); transform: translate(18px, 18px); z-index: 0; }
.photo-frame { position: relative; z-index: 1; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); }
.photo-frame img { width: 100%; height: 118%; object-fit: cover; object-position: top; will-change: transform; }
.photo-fallback { display: none; position: absolute; inset: 0; place-items: center; font-size: 4rem; font-weight: 900; letter-spacing: -.04em; color: var(--accent); }
.photo-frame.no-photo img { display: none; }
.photo-frame.no-photo .photo-fallback { display: grid; }
.badge { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 700; box-shadow: 0 16px 32px -16px rgb(0 0 0 / .4); animation: float 6s ease-in-out infinite; }
.badge i { font-style: normal; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 900; }
.badge-a { left: -28px; top: 14%; }
.badge-b { right: -14px; bottom: 12%; animation-delay: -3s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Bandeau défilant */
.marquee { position: relative; z-index: 1; overflow: hidden; border-block: 1px solid var(--line-strong); padding: clamp(18px, 3vw, 32px) 0; background: var(--bg-alt); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { display: inline-flex; align-items: center; gap: clamp(24px, 4vw, 56px); padding-right: clamp(24px, 4vw, 56px); font-size: clamp(2rem, 5.4vw, 4.6rem); font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap; color: transparent; -webkit-text-stroke: 1.5px var(--faint); }
.marquee-track em { font-style: normal; color: var(--accent); -webkit-text-stroke: 0; font-size: .6em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- À propos ---------- */
.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(32px, 5vw, 64px) 24px; }
.about-quote { grid-column: 1 / -1; max-width: 20ch; font-size: clamp(2rem, 5vw, 4.4rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.08; }
.about-body { grid-column: 6 / -1; display: grid; gap: 20px; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.125rem); }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: clamp(64px, 11vw, 140px); }
.pillars li { position: relative; display: grid; gap: 8px; padding: 28px 24px 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); align-content: start; overflow: hidden; transition: border-color .4s, transform .6s var(--ease); }
.pillars li::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s var(--ease); }
.pillars li:hover { border-color: var(--accent); transform: translateY(-6px); }
.pillars li:hover::before { transform: scaleX(1); }
.pillars strong { font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 900; letter-spacing: -.03em; color: var(--accent-text); }
.pillars span { font-size: 14px; color: var(--muted); }

/* ---------- Compétences ---------- */
.skills { border-bottom: 1px solid var(--line-strong); }
.skill { position: relative; display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px clamp(24px, 4vw, 64px); padding: clamp(30px, 4.5vw, 56px) 0; border-top: 1px solid var(--line-strong); align-items: start; }
.skill::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); background: linear-gradient(90deg, transparent, var(--accent-soft)); opacity: 0; transition: opacity .6s; z-index: -1; }
.skill::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: 0 50%; transition: transform .9s var(--ease); }
.skill:hover::before { opacity: 1; }
.skill:hover::after { transform: scaleX(1); }
.skill .num { grid-column: 1; grid-row: 1 / span 2; font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 900; line-height: 1; letter-spacing: -.03em; color: transparent; -webkit-text-stroke: 1.5px var(--line-strong); font-variant-numeric: tabular-nums; transition: -webkit-text-stroke-color .5s, color .5s; }
.skill:hover .num { -webkit-text-stroke-color: var(--accent); color: var(--accent-soft); }
.skill h3 { grid-column: 2; grid-row: 1; font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 900; letter-spacing: -.035em; line-height: 1.1; transition: color .4s, transform .7s var(--ease); }
.skill:hover h3 { color: var(--accent-text); transform: translateX(14px); }
.skill p { transition: transform .7s var(--ease) .04s; }
.skill:hover p { transform: translateX(14px); }
.skill p { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 15px; margin-top: 4px; max-width: 38ch; }
.skill .chips { grid-column: 3; grid-row: 1 / span 2; padding-top: 8px; align-content: start; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text); transition: color .3s, border-color .3s, background .3s; }
.chips span:hover { border-color: var(--accent); background: var(--accent-soft); }
.chips img { width: 16px; height: 16px; flex: none; }
:root[data-theme="dark"] .chips img[src*="/tech/"] { filter: brightness(1.25) saturate(1.1); }

/* ---------- Parcours ---------- */
.steps { --tl-pad: clamp(30px, 4.5vw, 56px); position: relative; padding-left: var(--tl-pad); border-bottom: 1px solid var(--line-strong); }
.steps::before, .steps::after { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; border-radius: 2px; }
.steps::before { background: var(--line-strong); }
.steps::after { background: linear-gradient(var(--accent), var(--accent-2)); transform: scaleY(var(--tl, 0)); transform-origin: 50% 0; }
.step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: clamp(24px, 4vw, 64px); row-gap: 10px; padding: clamp(30px, 4.5vw, 56px) 0; border-top: 1px solid var(--line-strong); align-items: start; }
.step::before { content: ""; position: absolute; left: calc(var(--tl-pad) * -1); top: calc(clamp(30px, 4.5vw, 56px) + 14px); width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); z-index: 1; transition: background .5s, border-color .5s, box-shadow .6s var(--ease), transform .6s var(--ease); }
.step.is-on::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 7px var(--accent-soft); transform: scale(1.15); }
.step .t-tag { grid-row: 1 / span 2; justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft); padding: 7px 14px; border-radius: 999px; }
.step h3 { grid-column: 2; font-size: clamp(1.5rem, 2.8vw, 2.4rem); font-weight: 900; letter-spacing: -.035em; line-height: 1.15; }
.step p { grid-column: 2; color: var(--muted); max-width: 52ch; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: clamp(20px, 3vw, 32px); }
.contact h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 900; letter-spacing: -.025em; line-height: 1.1; max-width: 24ch; }
.contact > p { color: var(--muted); max-width: 46ch; font-size: clamp(1rem, 1.4vw, 1.15rem); }
.contact-links { display: grid; margin-top: clamp(16px, 4vw, 48px); border-bottom: 1px solid var(--line-strong); }
.contact-links .btn { justify-content: space-between; padding: clamp(20px, 2.6vw, 32px) 0; border: 0; border-top: 1px solid var(--line-strong); border-radius: 0; background: none; color: var(--text); font-size: clamp(1.1rem, 2.4vw, 1.9rem); font-weight: 900; letter-spacing: -.02em; text-transform: none; transition: padding .6s var(--ease), color .3s; }
.contact-links .btn::before { display: none; }
.contact-links .btn::after { content: "↗"; font-weight: 400; color: var(--accent); transition: transform .6s var(--ease); }
.contact-links .btn[download]::after { content: "↓"; }
.contact-links .btn:hover { transform: none; padding-left: 18px; color: var(--accent-text); background: none; border-color: var(--line-strong); }
.contact-links .btn:hover::after { transform: translate(4px, -4px); }
.contact-links .btn[download]:hover::after { transform: translateY(4px); }

/* ---------- Page suivante ---------- */
.next-page { position: relative; z-index: 1; display: grid; gap: 14px; padding: clamp(56px, 11vw, 140px) var(--gutter); border-top: 1px solid var(--line-strong); overflow: hidden; isolation: isolate; }
.next-page::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); transform: translateY(101%); transition: transform .8s var(--ease-io); }
.next-page:hover::before, .next-page:focus-visible::before { transform: none; }
.next-page small { font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-text); transition: color .5s; }
.next-page b { display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: clamp(2.4rem, 9vw, 8rem); font-weight: 900; letter-spacing: -.035em; line-height: 1; text-transform: uppercase; transition: color .5s, transform .8s var(--ease); }
.next-page b i { font-style: normal; font-weight: 400; color: var(--accent); transition: color .5s, transform .8s var(--ease); }
.next-page:hover small, .next-page:hover b, .next-page:hover b i { color: var(--on-accent); }
.next-page:hover b { transform: translateX(16px); }
.next-page:hover b i { transform: translateX(10px); }

/* ---------- Mobile ---------- */
@media (max-width: 880px) {
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .hero-photo { max-width: 300px; justify-self: start; order: -1; }
  .badge-a { left: auto; right: -10px; top: -14px; }
  .badge-b { right: auto; left: -8px; bottom: 6%; }
  .hero-facts { grid-template-columns: repeat(2, auto); row-gap: 24px; }
  .about-body { grid-column: 1 / -1; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .skill { grid-template-columns: 1fr; }
  .skill .num, .skill h3, .skill p, .skill .chips { grid-column: 1; grid-row: auto; }
  .skill .num { padding-top: 0; }
  .step { grid-template-columns: 1fr; }
  .step .t-tag { grid-row: auto; }
  .step h3, .step p { grid-column: 1; }
}
@media (max-width: 480px) { .pillars { grid-template-columns: 1fr; } }
