/* =========================================================
   FABRICE COLLIN — PORTFOLIO
   Direction: "diagnostic technique" — signal bars, tickets,
   statuts de connexion. Le vocabulaire visuel d'un technicien
   support, appliqué à un CV.
   ========================================================= */

:root {
  --ink: #14171a;
  --ink-soft: #2b3238;
  --paper: #f4f5f3;
  --paper-alt: #eaece7;
  --panel: #ffffff;
  --slate: #5c6670;
  --slate-light: #8a929a;
  --line: #dcded9;
  --teal: #1f8a70;
  --teal-deep: #166955;
  --amber: #e08a1e;
  --white: #ffffff;

  --font-display: "Big Shoulders Display", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --container: 1080px;
  --radius: 3px;
  --shadow-card: 0 1px 2px rgba(20, 23, 26, 0.04), 0 8px 24px -12px rgba(20, 23, 26, 0.12);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.icon { width: 18px; height: 18px; fill: currentColor; flex: none; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 24px;
}

/* ---------- Scroll signal (top progress bar) ---------- */
.scroll-signal {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  z-index: 100;
  transition: width 0.1s linear;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  background: rgba(244, 245, 243, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav.is-scrolled {
  background: rgba(244, 245, 243, 0.92);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-mark-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.15);
}
.nav-links {
  display: none;
  gap: 28px;
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.nav-links a { color: var(--slate); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  margin-left: auto;
  display: none;
  gap: 10px;
  align-items: center;
}
.nav-burger {
  margin-left: auto;
  width: 32px; height: 32px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-burger span {
  width: 20px; height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links.is-open {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 8px 24px 16px;
}
.nav-links.is-open a {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.nav-links.is-open a:last-child { border-bottom: 0; }

@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav-cta { display: flex; }
  .nav-burger { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--teal-deep); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero {
  padding: 148px 0 88px;
}
.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 24px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal-deep);
  background: rgba(31, 138, 112, 0.08);
  border: 1px solid rgba(31, 138, 112, 0.25);
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.2);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(58px, 14vw, 128px);
  line-height: 0.88;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
}
.hero-role {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--slate);
  letter-spacing: 0.01em;
  margin-bottom: 26px;
}
.hero-role .sep { color: var(--slate-light); margin: 0 6px; }

.hero-lead {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 56px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 20px;
  margin: 0;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.stat dt {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-light);
  margin-bottom: 6px;
}
.stat dd {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
}

@media (min-width: 640px) {
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Section shell ---------- */
.section {
  padding: 76px 0;
  border-top: 1px solid var(--line);
}
.section-tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--teal-deep);
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(34px, 6vw, 52px);
  letter-spacing: -0.005em;
  margin-bottom: 44px;
}

/* reveal-on-scroll */
.will-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.will-reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Atouts chips ---------- */
.atouts { padding: 36px 0; border-top: 0; }
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-soft);
}

/* ---------- Competence meters (signal bars) ---------- */
.meter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  margin-bottom: 60px;
}
@media (min-width: 640px) {
  .meter-grid { grid-template-columns: 1fr 1fr; gap: 30px 40px; }
}
.meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.meter-name { font-weight: 600; font-size: 15.5px; }
.meter-value { font-family: var(--font-mono); font-size: 12px; color: var(--slate-light); }

.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 28px;
}
.signal-bars .bar {
  flex: 1;
  background: var(--line);
  border-radius: 1px;
  transform: scaleY(0.15);
  transform-origin: bottom;
  transition: transform 0.7s cubic-bezier(.2,.8,.2,1), background 0.4s ease;
}
.signal-bars .bar:nth-child(1) { height: 30%; }
.signal-bars .bar:nth-child(2) { height: 48%; }
.signal-bars .bar:nth-child(3) { height: 64%; }
.signal-bars .bar:nth-child(4) { height: 82%; }
.signal-bars .bar:nth-child(5) { height: 100%; }

.meter.is-filled-in .signal-bars .bar { transform: scaleY(1); }
.meter[data-level="5"].is-filled-in .signal-bars .bar { background: var(--teal); }
.meter[data-level="4"].is-filled-in .signal-bars .bar:nth-child(-n+4) { background: var(--teal); }
.meter[data-level="4"].is-filled-in .signal-bars .bar:nth-child(5) { background: var(--line); transform: scaleY(0.15); }
.meter[data-level="3"].is-filled-in .signal-bars .bar:nth-child(-n+3) { background: var(--teal); }
.meter[data-level="3"].is-filled-in .signal-bars .bar:nth-child(n+4) { background: var(--line); transform: scaleY(0.15); }

/* ---------- Langues (CEFR bar) ---------- */
.lang-block { padding-top: 8px; }
.lang-title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  margin-bottom: 22px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.lang-row { margin-bottom: 26px; }
.lang-row:last-child { margin-bottom: 0; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 9px;
}
.lang-name { font-weight: 700; font-size: 16px; }
.lang-code { font-family: var(--font-mono); font-size: 12.5px; color: var(--teal-deep); }

.cefr-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.cefr-seg {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-align: center;
  padding: 8px 0 6px;
  color: var(--slate-light);
  background: var(--paper-alt);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.cefr-seg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
  z-index: 0;
}
.cefr-seg { z-index: 0; }
.lang-row.is-filled-in .cefr-seg.is-filled::after { transform: scaleX(1); }
.cefr-seg { display: flex; align-items: center; justify-content: center; height: 28px; }
.cefr-seg.is-filled { color: var(--slate-light); }
.lang-row.is-filled-in .cefr-seg.is-filled { color: var(--white); }
.cefr-seg > * { position: relative; z-index: 1; }

/* ---------- Ticket / experience timeline ---------- */
.ticket-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.ticket {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 18px;
}
.ticket-rail {
  position: relative;
  display: flex;
  justify-content: center;
}
.ticket-rail::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: -34px;
  width: 1px;
  background: var(--line);
}
.ticket:last-child .ticket-rail::before { display: none; }
.ticket-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  margin-top: 6px;
  flex: none;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line);
}
.ticket-dot--tech { background: var(--teal); }
.ticket-dot--horeca { background: var(--amber); }

.ticket-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 26px;
  box-shadow: var(--shadow-card);
}
.ticket-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate-light);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.ticket-id { color: var(--teal-deep); }
.ticket-role {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 24px;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}
.ticket-org {
  font-size: 14.5px;
  color: var(--slate);
  margin-bottom: 16px;
}
.ticket-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ticket-points li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.ticket-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 1px;
  background: var(--slate-light);
}

@media (min-width: 640px) {
  .ticket { grid-template-columns: 28px 1fr; }
  .ticket-card { padding: 28px 32px 30px; }
}

/* ---------- Formation ---------- */
.edu-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.edu-period {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--teal-deep);
}
.edu-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 22px;
}
.edu-org { color: var(--slate); font-size: 14.5px; }

@media (min-width: 640px) {
  .edu-card { flex-direction: row; align-items: baseline; gap: 24px; }
  .edu-period { flex: none; width: 120px; }
}

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: var(--paper); }
.contact .section-tag { color: #7fd0b9; }
.contact-lead {
  max-width: 560px;
  font-size: 17px;
  color: #c7cbcd;
  margin-bottom: 40px;
}
.contact .btn-primary { background: var(--teal); color: var(--ink); }
.contact .btn-primary:hover { background: #29a389; }
.contact .btn-secondary { border-color: #43494f; color: var(--paper); }
.contact .btn-secondary:hover { background: var(--paper); color: var(--ink); }

.social-row {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}
.social-row a {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #43494f;
  border-radius: 50%;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.social-row a:hover { border-color: var(--teal); background: rgba(31, 138, 112, 0.12); }
.social-note { font-family: var(--font-mono); font-size: 11.5px; color: #7a8189; }
.social-note code { color: #a7acaf; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #7a8189; }
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-block: 24px 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  border-top: 1px solid #2b3238;
}
@media (min-width: 640px) {
  .footer-inner { flex-direction: row; justify-content: space-between; }
}

/* ---------- Print-only CV ---------- */
.print-only { display: none; }

@media print {
  body * { visibility: hidden; }
  .print-only, .print-only * { visibility: visible; }
  .print-only {
    display: block;
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    background: #fff;
    color: #111;
    padding: 12mm 14mm;
    font-family: var(--font-body);
  }
  .p-head { border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 18px; }
  .p-head h1 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 34px;
    letter-spacing: 0.01em;
  }
  .p-head p { margin-top: 4px; font-size: 12.5px; }
  .p-contact { color: #444; font-family: var(--font-mono); }
  .p-section { margin-bottom: 16px; break-inside: avoid; }
  .p-section h2 {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1f8a70;
    margin-bottom: 8px;
  }
  .p-item { margin-bottom: 12px; break-inside: avoid; }
  .p-item-head { display: flex; justify-content: space-between; font-size: 13.5px; }
  .p-item-head h3 { font-size: 14.5px; font-weight: 700; }
  .p-item-head span { font-family: var(--font-mono); font-size: 11.5px; color: #555; }
  .p-org { color: #555; font-size: 12.5px; margin-bottom: 6px; }
  .p-item ul { padding-left: 16px; list-style: disc; }
  .p-item li { font-size: 12.5px; line-height: 1.5; margin-bottom: 2px; }
  @page { margin: 0; }
}
