/* ============================================
   ELIAN SIMONET — Portfolio
   style.css  ·  Thème clair éditorial
   ============================================ */

/* --- TOKENS --- */
:root {
  --bg:        #F3F1EA;   /* crème */
  --bg-warm:   #ECE9DF;
  --surface:   #FFFFFF;
  --ink:       #16150F;   /* presque noir chaud */
  --ink-soft:  #4A4840;
  --muted:     #8A877C;
  --line:      rgba(22,21,15,0.10);
  --line-soft: rgba(22,21,15,0.06);
  --accent:    #2B4FFF;   /* bleu électrique */
  --accent-d:  #1d3ce0;
  --accent-sf: rgba(43,79,255,0.08);

  --serif:     'Instrument Serif', Georgia, serif;
  --sans:      'Inter', system-ui, -apple-system, sans-serif;
  --r:         12px;
  --r-lg:      22px;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --maxw:      1200px;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }

/* --- PROGRESS BAR --- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 300;
  transition: width 0.1s linear;
}

/* --- LABEL --- */
.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}
.label::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--muted);
}

/* --- HEADINGS --- */
.heading {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.heading em, .hero__title em, .contact__title em, .about__left em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 15px 26px;
  border-radius: 100px;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, box-shadow 0.25s;
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--dark:hover { background: var(--accent); color: #fff; box-shadow: 0 14px 34px rgba(43,79,255,0.28); }
.btn--dark:hover svg { transform: translate(3px, -3px); }
.btn--ghost { color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--full { width: 100%; }

/* --- SECTION --- */
.section {
  position: relative;
  padding: 120px 48px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.section__num {
  position: absolute;
  top: 80px; right: 48px;
  font-family: var(--serif);
  font-size: clamp(80px, 12vw, 150px);
  line-height: 1;
  color: var(--accent);
  opacity: 0.10;
  pointer-events: none;
  user-select: none;
}

/* --- REVEAL --- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  padding: 22px 40px;
  transition: padding 0.3s var(--ease), background 0.3s, box-shadow 0.3s;
}
.header.scrolled {
  padding: 14px 40px;
  background: rgba(243,241,234,0.82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}
.header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 7px; }
.logo__mark {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.logo__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.18);
  animation: pulse 2s ease infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.nav { display: flex; align-items: center; gap: 2px; }
.nav__item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 100px;
  transition: color 0.2s, background 0.2s;
}
.nav__item:hover { color: var(--ink); background: rgba(22,21,15,0.05); }
.nav__item.active { color: var(--ink); }
.nav__item svg { width: 14px; height: 14px; }
.nav__item--cta {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  margin-left: 10px;
}
.nav__item--cta:hover { background: var(--accent); color: #fff; }

.burger { display: none; flex-direction: column; gap: 6px; padding: 6px; z-index: 201; }
.burger span {
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}
.burger.active span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger.active span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* --- MOBILE NAV --- */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--bg-warm);
  z-index: 199;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  clip-path: circle(0% at calc(100% - 50px) 38px);
  transition: clip-path 0.6s var(--ease);
}
.mobile-nav.open { clip-path: circle(150% at calc(100% - 50px) 38px); }
.mobile-nav nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-nav__link {
  font-size: clamp(2.2rem, 9vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  transition: color 0.2s, transform 0.2s;
}
.mobile-nav__link:hover { color: var(--accent); transform: translateX(10px); }
.mobile-nav__footer {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.mobile-nav__footer a { font-size: 0.9rem; color: var(--muted); }

/* ============================================
   HERO
   ============================================ */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 170px 48px 90px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: end;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s 0.1s var(--ease-out) forwards;
}
.eyebrow-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.16);
}
.hero__title {
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.line__inner {
  display: block;
  transform: translateY(110%);
  animation: slideUp 1s var(--ease-out) forwards;
}
.line:nth-child(1) .line__inner { animation-delay: 0.15s; }
.line:nth-child(2) .line__inner { animation-delay: 0.3s; }
.line:nth-child(3) .line__inner { animation-delay: 0.45s; }

.hero__bottom {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s var(--ease-out) forwards;
}
.hero__desc {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 480px;
  line-height: 1.7;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__side {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s var(--ease-out) forwards;
}
.hero__stat {
  text-align: right;
  padding-right: 20px;
  border-right: 2px solid var(--accent);
}
.hero__stat-num {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
}
.hero__stat-plus { font-size: 1.4rem; font-weight: 800; color: var(--accent); }
.hero__stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { transform: translateY(110%); } to { transform: none; } }

/* ============================================
   MARQUEE
   ============================================ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  background: var(--bg-warm);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: marquee 32s linear infinite;
  white-space: nowrap;
}
.marquee__track span {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.marquee__track i { color: var(--accent); font-style: normal; font-size: 0.7rem; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================
   ABOUT
   ============================================ */
.about__layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 72px;
  align-items: start;
}
.about__left .heading { max-width: 9ch; }
.lead {
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 22px;
}
.about__right p { color: var(--ink-soft); line-height: 1.8; }
.skills {
  margin-top: 36px;
  border-top: 1px solid var(--line);
}
.skills__row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.skills__key { font-weight: 600; color: var(--ink); min-width: 96px; }
.skills__val { color: var(--muted); }

/* ============================================
   SERVICES
   ============================================ */
.services { border-top: 1px solid var(--line); }
.services__head .heading { margin-bottom: 48px; }
.services__list { display: flex; flex-direction: column; }
.service {
  display: grid;
  grid-template-columns: 56px 1fr 48px;
  gap: 24px;
  align-items: center;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  transition: padding 0.3s var(--ease), background 0.3s;
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service:hover {
  background: var(--accent-sf);
  margin: 0 -24px;
  padding: 30px 24px;
  border-radius: var(--r);
}
.service__num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.service__main h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 5px;
  transition: color 0.2s;
}
.service:hover .service__main h3 { color: var(--accent); }
.service__main p { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.6; max-width: 60ch; }
.service__icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: color 0.25s, transform 0.25s;
}
.service__icon svg { width: 24px; height: 24px; }
.service:hover .service__icon { color: var(--accent); transform: rotate(-12deg) scale(1.1); }

/* ============================================
   PROJECTS
   ============================================ */
.projects { border-top: 1px solid var(--line); }
.projects__head .heading { margin-bottom: 48px; }
.project { margin-bottom: 24px; }
.project__link {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.3s;
}
.project__link:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -20px rgba(22,21,15,0.22);
  border-color: transparent;
}
.project__preview {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: flex-start;
  padding: 20px;
  overflow: hidden;
}
.project__preview--swissdash {
  background: linear-gradient(135deg, #1a1d4e 0%, #2b30a8 55%, #4f56e8 100%);
}
.project__preview--swissdash::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 75% 25%, rgba(255,255,255,0.22) 0%, transparent 55%);
}
.project__preview--latruite {
  background: linear-gradient(135deg, #143d24 0%, #1f6b3a 55%, #34a35a 100%);
}
.project__preview--latruite::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.18) 0%, transparent 55%);
}
.project__chip {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.15);
}
.project__body { padding: 36px; display: flex; flex-direction: column; }
.project__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.project__num { font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.project__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.project__tags span {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg-warm);
  padding: 4px 11px;
  border-radius: 100px;
}
.project__body h3 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 10px;
}
.project__body p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: auto;
  padding-bottom: 24px;
}
.project__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s;
}
.project__link:hover .project__cta { gap: 12px; }
.project__cta svg { width: 16px; height: 16px; }

.projects__next {
  margin-top: 40px;
  padding: 60px;
  background: var(--ink);
  border-radius: var(--r-lg);
  text-align: center;
}
.projects__next-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243,241,234,0.5);
  display: block;
  margin-bottom: 14px;
}
.projects__next h3 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--bg);
  margin-bottom: 30px;
}
.projects__next .btn--dark { background: var(--bg); color: var(--ink); }
.projects__next .btn--dark:hover { background: var(--accent); color: #fff; }

/* ============================================
   CONTACT
   ============================================ */
.contact { border-top: 1px solid var(--line); }
.contact__layout {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 72px;
  align-items: start;
}
.contact__title {
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 38px;
}
.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 18px;
  transition: color 0.2s, border-color 0.2s;
}
.contact__email:hover { color: var(--accent); border-color: var(--accent); }
.contact__email svg { width: 17px; height: 17px; transition: transform 0.2s; }
.contact__email:hover svg { transform: translate(3px, -3px); }
.contact__note { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }

/* FORM */
.form { display: flex; flex-direction: column; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__field { display: flex; flex-direction: column; gap: 8px; }
.form__field label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.form__field input,
.form__field textarea,
.form__field select {
  width: 100%;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.form__field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A877C' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}
.form__field input::placeholder, .form__field textarea::placeholder { color: var(--muted); }
.form__field input:focus,
.form__field textarea:focus,
.form__field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-sf);
}
.form__field textarea { resize: vertical; min-height: 130px; }
.form .btn--full { margin-top: 4px; align-self: flex-start; width: auto; padding-left: 32px; padding-right: 32px; }
.form__feedback { font-size: 0.86rem; transition: all 0.2s; }
.form__feedback.success {
  padding: 14px 16px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--r);
  color: #15803d;
}
.form__feedback.error {
  padding: 14px 16px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--r);
  color: #dc2626;
}

/* ============================================
   FOOTER
   ============================================ */
.footer { border-top: 1px solid var(--line); padding: 44px 48px; }
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}
.footer__logo { font-size: 1.15rem; font-weight: 800; color: var(--ink); display: block; margin-bottom: 4px; }
.footer__brand p { font-size: 0.78rem; color: var(--muted); line-height: 1.5; }
.footer__nav { display: flex; gap: 24px; }
.footer__nav a { font-size: 0.82rem; color: var(--ink-soft); transition: color 0.2s; }
.footer__nav a:hover { color: var(--accent); }
.footer__copy { font-size: 0.78rem; color: var(--muted); text-align: right; }

/* --- FOCUS --- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-warm); }
::-webkit-scrollbar-thumb { background: rgba(22,21,15,0.18); border-radius: 5px; border: 3px solid var(--bg-warm); }
::-webkit-scrollbar-thumb:hover { background: rgba(22,21,15,0.3); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .hero__side { flex-direction: row; flex-wrap: wrap; gap: 32px; }
  .hero__stat { border-right: none; border-left: 2px solid var(--accent); padding-right: 0; padding-left: 16px; text-align: left; }
  .about__layout { grid-template-columns: 1fr; gap: 40px; }
  .contact__layout { grid-template-columns: 1fr; gap: 48px; }
  .project__link { grid-template-columns: 1fr; }
  .project__preview { min-height: 200px; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__copy { text-align: left; }
}
@media (max-width: 768px) {
  .header { padding: 18px 24px; }
  .header.scrolled { padding: 12px 24px; }
  .nav { display: none; }
  .burger { display: flex; }
  .hero { padding: 130px 24px 70px; }
  .section { padding: 72px 24px; }
  .section__num { top: 48px; right: 24px; }
  .service { grid-template-columns: 44px 1fr; }
  .service__icon { display: none; }
  .projects__next { padding: 44px 24px; }
  .form__row { grid-template-columns: 1fr; }
  .footer { padding: 36px 24px; }
  .footer__nav { flex-wrap: wrap; gap: 14px; }
}
@media (max-width: 480px) {
  .hero__title { font-size: clamp(2.4rem, 11vw, 3.2rem); }
  .hero__side { gap: 20px; }
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .line__inner { transform: none; }
  .reveal { opacity: 1; transform: none; }
}
