/* ===== Portfolio Christophe Lays — cl-learning.net =====
   Direction : « Encre & accent électrique » — papier clair, typo éditoriale, un accent indigo. */

:root {
  --paper: #FAF9F6;
  --paper-2: #F2F0EA;
  --ink: #16151A;
  --ink-2: #45444d;
  --muted: #86868b;
  --line: #e5e2da;
  --accent: #4F46E5;
  --accent-2: #7C6BF0;
  --accent-soft: rgba(79, 70, 229, .09);
  --night: #0E0F13;
  --night-2: #17181e;
  --night-line: #2a2b33;
  --night-ink: #ECECEE;
  --night-mut: #9a9aa6;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20,15,10,.04), 0 18px 46px -22px rgba(20,15,10,.22);
  --display: "Fraunces", Georgia, serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body[data-lang="fr"] .en { display: none; }
body[data-lang="en"] .fr { display: none; }

h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; font-weight: 600; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
strong { font-weight: 600; }

.ink-accent { font-style: italic; color: var(--accent); }

/* ---------- barre ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .85rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.topbar.scrolled { border-color: var(--line); }
.mark { font-family: var(--display); font-weight: 600; font-size: 1.22rem; color: var(--ink); white-space: nowrap; letter-spacing: -.01em; }
.mark-dot { color: var(--accent); }
.topnav { display: flex; gap: 1.2rem; margin-left: auto; }
.topnav a { color: var(--ink-2); font-size: .92rem; font-weight: 500; white-space: nowrap; }
.topnav a:hover { color: var(--accent); }
.topmail { font-size: .88rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.topmail:hover { color: var(--accent); }
.lang-toggle {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: .35rem .8rem; font: 600 .82rem var(--body); cursor: pointer;
  color: var(--muted); display: flex; gap: .35rem;
}
.lang-toggle:hover { border-color: var(--accent); }
.lt-sep { opacity: .4; }
body[data-lang="fr"] .lt-fr, body[data-lang="en"] .lt-en { color: var(--accent); }
@media (max-width: 1080px) { .topmail { display: none; } }
@media (max-width: 720px) { .topnav { display: none; } }

/* ---------- hero ---------- */
.hero {
  min-height: 92vh; display: flex; flex-direction: column; justify-content: center;
  max-width: 1120px; margin: 0 auto; position: relative;
  padding: clamp(3rem, 8vw, 5rem) clamp(1rem, 4vw, 2.5rem);
}
.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .82rem; font-weight: 600; letter-spacing: .06em; color: var(--ink-2);
  margin-bottom: 1.6rem;
}
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: clamp(2.9rem, 8.5vw, 6rem); font-weight: 600; margin-bottom: 1.4rem; }
.hero-sub { font-size: clamp(1.05rem, 2.1vw, 1.35rem); max-width: 40em; color: var(--ink-2); }
.hero-cta { display: flex; gap: .8rem; margin-top: 2.2rem; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: .8rem 1.5rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem; transition: transform .15s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px var(--accent); }
.btn-primary:hover { background: #4038c9; }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.scroll-cue {
  position: absolute; bottom: 2rem; left: clamp(1rem, 4vw, 2.5rem);
  display: flex; align-items: center; gap: .7rem;
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.scroll-line { width: 46px; height: 1px; background: var(--muted); position: relative; overflow: hidden; }
.scroll-line::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--accent); animation: slide 2.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 60%,100% { transform: translateX(280%); } }

/* ---------- sections ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) clamp(1rem, 4vw, 2.5rem); }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.1rem; }
.eyebrow-light { color: var(--accent-2); }
h2.big { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 16em; margin-bottom: 1.3rem; }
.section-lede { max-width: 40em; color: var(--ink-2); font-size: 1.1rem; margin-bottom: 2.4rem; }
.section-lede.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-soft { background: var(--paper-2); max-width: none; }
.section-soft > * { max-width: 1120px; margin-left: auto; margin-right: auto; }

/* ---------- metric line ---------- */
.metricline {
  list-style: none; margin: 0 0 3rem; padding: 1.6rem 0 0; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.4rem;
}
.metricline li { font-size: .9rem; color: var(--ink-2); }
.metricline strong { display: block; font-family: var(--display); font-size: 2.3rem; color: var(--ink); line-height: 1; margin-bottom: .3rem; }
.metricline .sep { color: var(--accent); margin: 0 .1em; }

/* ---------- cadres (mockups navigateur) ---------- */
.frame {
  margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in; transition: transform .25s ease, box-shadow .25s ease;
}
.frame:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(20,15,10,.04), 0 30px 60px -28px rgba(20,15,10,.32); }
.frame-bar {
  display: flex; align-items: center; gap: 7px; padding: .6rem .9rem;
  background: var(--paper-2); border-bottom: 1px solid var(--line);
}
.frame-bar span { width: 10px; height: 10px; border-radius: 50%; background: #d6d1c6; }
.frame-bar span:first-child { background: #e6a19a; }
.frame-bar em { margin-left: .5rem; font-style: normal; font-size: .74rem; color: var(--muted); font-family: var(--mono); }
.frame-img { aspect-ratio: 1680 / 1023; overflow: hidden; background: var(--paper-2); }
.frame-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.frame figcaption { padding: .75rem 1rem; font-size: .85rem; color: var(--ink-2); border-top: 1px solid var(--line); }
.frame-hero { margin-bottom: 1.4rem; }
.frame-hero .frame-img { aspect-ratio: 1680 / 900; }
.frame-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.4rem; }

/* ---------- section sombre (démo) ---------- */
.section-dark { background: var(--night); color: var(--night-ink); max-width: none; }
.section-dark > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.section-dark .section-lede.light, .light { color: var(--night-mut); }
h2.light { color: var(--night-ink); }

.demo {
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2.2rem); margin-bottom: 1.4rem;
}
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.demo-head h3 { font-size: 1.25rem; color: var(--night-ink); font-weight: 600; }
.demo-foot { margin: 1.3rem 0 0; font-size: .92rem; color: var(--night-mut); }

/* switch */
.switch { display: inline-flex; background: #0b0c10; border: 1px solid var(--night-line); border-radius: 999px; padding: 4px; }
.switch button { border: none; background: none; color: var(--night-mut); font: 600 .84rem var(--body); padding: .45rem 1rem; border-radius: 999px; cursor: pointer; transition: color .2s, background .2s; }
.switch button.active { background: var(--accent); color: #fff; }

.demo-stage { min-height: 220px; }
.diff-raw .mono { font-family: var(--mono); font-size: .92rem; line-height: 1.75; color: #c7c7d0; background: #0b0c10; border: 1px solid var(--night-line); border-left: 3px solid #555; border-radius: 10px; padding: 1.1rem 1.2rem; }
.diff-tag { font-size: .82rem; color: #d98b84; margin: .8rem 0 0; }
.diff-med .lead { font-size: 1.15rem; color: var(--night-ink); font-family: var(--display); margin-bottom: 1.1rem; }
.med-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; margin-bottom: 1.1rem; }
.med-card { background: #0b0c10; border: 1px solid var(--night-line); border-radius: 12px; padding: .9rem 1rem; font-size: .88rem; color: var(--night-mut); display: flex; flex-direction: column; gap: .35rem; }
.med-card .mc-k { font-family: var(--mono); font-weight: 600; color: var(--accent-2); font-size: 1rem; }
.callout { display: flex; gap: .6rem; background: var(--accent-soft); border: 1px solid rgba(124,107,240,.35); border-radius: 12px; padding: .9rem 1.1rem; font-size: .92rem; color: #d9d5ff; margin: 0; }
.callout .ci { color: var(--accent-2); }

/* quiz */
.quiz-q { font-size: 1.12rem; color: var(--night-ink); margin-bottom: 1.2rem; }
.quiz-opts { display: flex; flex-direction: column; gap: .7rem; }
.quiz-opt {
  text-align: left; background: #0b0c10; border: 1px solid var(--night-line); border-radius: 12px;
  padding: .95rem 1.1rem; color: var(--night-ink); font: 500 .98rem var(--body); cursor: pointer;
  transition: border-color .2s, background .2s, transform .1s;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--accent-2); transform: translateX(3px); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.correct { border-color: #3fbf7f; background: rgba(63,191,127,.12); }
.quiz-opt.wrong { border-color: #d9685f; background: rgba(217,104,95,.1); opacity: .85; }
.quiz-fb { margin-top: 1.1rem; padding: 1rem 1.1rem; border-radius: 12px; font-size: .92rem; line-height: 1.6; border: 1px solid var(--night-line); }
.quiz-fb.ok { background: rgba(63,191,127,.1); border-color: rgba(63,191,127,.4); color: #b7eccf; }
.quiz-fb.no { background: rgba(217,104,95,.08); border-color: rgba(217,104,95,.35); color: #f0c4bf; }

/* flip cards */
.flips { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.flip { background: none; border: none; padding: 0; cursor: pointer; perspective: 1000px; height: 170px; font-family: inherit; }
.flip-inner { display: block; position: relative; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.4,.2,.2,1); transform-style: preserve-3d; }
.flip.on .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 14px; padding: 1.1rem; display: flex; border: 1px solid var(--night-line);
}
.flip-front { background: #0b0c10; color: var(--night-ink); font-family: var(--display); font-size: 1.2rem; font-weight: 600; align-items: flex-end; }
.flip-front::after { content: "↻"; position: absolute; top: .8rem; right: 1rem; color: var(--accent-2); font-size: 1.1rem; }
.flip-back { background: linear-gradient(150deg, #1c1a3a, #141019); color: #d9d5ff; transform: rotateY(180deg); align-items: center; font-size: .92rem; line-height: 1.55; }

/* ---------- scrollytelling ---------- */
.scrolly { max-width: 1120px; margin: 0 auto; padding: clamp(3rem,7vw,5rem) clamp(1rem,4vw,2.5rem); }
.scrolly-head { margin-bottom: 2rem; }
.scrolly-head h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
.scrolly-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3rem; align-items: start; }
.scrolly-sticky { position: sticky; top: 22vh; height: 56vh; display: flex; align-items: center; }
.pipe { position: relative; width: 100%; padding-left: 1.5rem; }
.pipe-track { position: absolute; left: calc(1.5rem + 5px); top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.pipe-step { position: relative; display: flex; align-items: baseline; gap: 1rem; padding: 1.1rem 0; opacity: .38; transition: opacity .4s ease; }
.pipe-step::before { content: ""; position: absolute; left: -1.5rem; top: 1.5rem; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); transition: all .4s ease; }
.pipe-step.active { opacity: 1; }
.pipe-step.active::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.pipe-num { font-family: var(--mono); font-size: .85rem; color: var(--accent); }
.pipe-label { font-family: var(--display); font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 600; }
.scrolly-steps { display: flex; flex-direction: column; }
.scrolly-step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; }
.scrolly-step h3 { font-size: 1.5rem; margin-bottom: .7rem; color: var(--accent); }
.scrolly-step p { font-size: 1.12rem; color: var(--ink-2); max-width: 30em; }
@media (max-width: 820px) {
  .scrolly-grid { grid-template-columns: 1fr; gap: 0; }
  .scrolly-sticky { position: static; height: auto; margin-bottom: 1rem; }
  .scrolly-step { min-height: auto; padding: 1.4rem 0; border-top: 1px solid var(--line); }
  .pipe-step { opacity: 1; }
}

/* ---------- cards IA ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.3rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.card-i { color: var(--accent); font-size: 1.2rem; }
.card h3 { font-size: 1.15rem; margin: .7rem 0 .5rem; }
.card p { font-size: .93rem; color: var(--ink-2); margin: 0; }

/* ---------- réalisations ---------- */
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.case { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.case-meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); font-weight: 500; letter-spacing: .03em; margin-bottom: .8rem; }
.case-loc { color: var(--accent); }
.case h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.case-role { font-size: .9rem; color: var(--ink-2); margin-bottom: 1.2rem; font-weight: 500; }
.case-body { margin: 0; }
.case-body > div { padding: .7rem 0; border-top: 1px dashed var(--line); }
.case-body dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 600; margin-bottom: .25rem; }
.case-body dd { margin: 0; font-size: .93rem; color: var(--ink-2); }
@media (max-width: 780px) { .cases { grid-template-columns: 1fr; } }

/* ---------- timeline ---------- */
.timeline { margin: 2.4rem 0 3rem; border-left: 2px solid var(--line); padding-left: 1.7rem; }
.tl-item { position: relative; padding-bottom: 1.9rem; display: grid; grid-template-columns: 150px 1fr; gap: 1.2rem; }
.tl-item::before { content: ""; position: absolute; left: calc(-1.7rem - 6px); top: .5rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); }
.tl-date { font-size: .85rem; font-weight: 600; color: var(--accent); padding-top: .1rem; }
.tl-date .fr, .tl-date .en { color: var(--muted); font-weight: 500; }
.tl-item h3 { font-size: 1.08rem; margin-bottom: .25rem; }
.tl-item p { font-size: .92rem; color: var(--ink-2); margin: 0; }
@media (max-width: 640px) { .tl-item { grid-template-columns: 1fr; gap: .2rem; } }

/* ---------- panels ---------- */
.cols-even { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
@media (max-width: 780px) { .cols-even { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; box-shadow: var(--shadow); }
.panel h3 { font-size: 1.15rem; margin-bottom: .8rem; }
.panel .mt { margin-top: 1.6rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: .5rem 0; border-bottom: 1px dashed var(--line); font-size: .93rem; color: var(--ink-2); }
.plain li:last-child { border-bottom: none; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: .32rem .85rem; font-size: .82rem; font-weight: 500; color: var(--ink-2); }

/* ---------- contact / footer ---------- */
.section-contact { text-align: center; }
.section-contact h2.big { margin: 0 auto 1.3rem; }
.contact-links { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; }
.footer { border-top: 1px solid var(--line); padding: 2rem; text-align: center; font-size: .85rem; color: var(--muted); }
.footer p { margin: 0; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(14,15,19,.9); display: flex; align-items: center; justify-content: center; padding: 3vw; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 10px; box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.lb-close { position: absolute; top: 1rem; right: 1.5rem; background: none; border: none; color: #fff; font-size: 2.4rem; cursor: pointer; line-height: 1; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; translate: 0 16px; transition: opacity .6s ease, translate .6s ease; }
.reveal.in { opacity: 1; translate: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; translate: none; transition: none; }
  html { scroll-behavior: auto; }
  .scroll-line::after { animation: none; }
}
