/* ============================================================
   Le Studio 1.0 — portfolio freelance informatique
   palette: navy-emerald · typography: geometric-bold
   motion: gentle-fade-reveal · layout: case-study-portfolio
   signature: no-signature · background: no-background
   ============================================================ */

:root {
  --bg: #ffffff;
  --surface: #f3f6f8;
  --ink: #0f2a4a;
  --ink-soft: #40566e;
  --muted: #5b6b7f;
  --accent: #1f8a5b;
  --accent-ink: #ffffff;
  --rule: #dde5ec;
  --fill-bg: #eef3f7;
  --fill-ink: #5b6b7f;
  --shadow: 0 1px 2px rgb(15 42 74 / 0.05), 0 12px 32px -18px rgb(15 42 74 / 0.28);
  --radius: 12px;
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
  --section-y: clamp(64px, 9vw, 120px);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0b1622;
  --surface: #101f2e;
  --ink: #e8eff6;
  --ink-soft: #c2d2e0;
  --muted: #9aafc2;
  --accent: #45c48c;
  --accent-ink: #06231a;
  --rule: #22374a;
  --fill-bg: #17293a;
  --fill-ink: #a8bccd;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 16px 40px -22px rgb(0 0 0 / 0.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}
img, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; letter-spacing: -0.03em; margin: 0; }
h1 { font-weight: 800; font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; }
h2 { font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.1; }
h3 { font-weight: 700; font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.25; }
p { margin: 0 0 1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
  min-height: 44px;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}
.brand-name { font-size: 1.02rem; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  flex-wrap: wrap;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  padding: 10px 2px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.nav .nav-cta {
  color: var(--accent-ink);
  background: var(--accent);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  border-bottom: none;
}
.nav .nav-cta:hover { color: var(--accent-ink); filter: brightness(1.08); }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }

/* ---------- shared bits ---------- */
.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.accent-text { color: var(--accent); }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-soft); max-width: 56ch; }
.section { padding-block: var(--section-y); }
.section-alt { background: var(--surface); }
.section-head { max-width: 62ch; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { margin-bottom: 16px; }
.section-intro { color: var(--ink-soft); margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease, background 160ms ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.fill {
  background: var(--fill-bg);
  color: var(--fill-ink);
  border-bottom: 1px dotted var(--muted);
  padding: 0 3px;
  border-radius: 3px;
}
.fill-link {
  color: var(--fill-ink);
  background: var(--fill-bg);
  border-bottom: 1px dotted var(--muted);
  padding: 0 4px;
  border-radius: 3px;
  text-decoration: none;
}
.fill-link:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 6vw, 88px) var(--section-y); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero-text h1 { margin-bottom: 20px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px 24px;
  margin: 36px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.hero-facts dt {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.hero-facts dd { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-figure figcaption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- projects ---------- */
.project {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding-block: clamp(36px, 5vw, 64px);
  border-top: 1px solid var(--rule);
}
.project:first-of-type { border-top: none; padding-top: 0; }
.project:nth-child(even) > .project-media { order: 2; }
.project-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.project-meta {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.project-meta span { color: var(--muted); font-weight: 600; }
.project-body h3 { margin-bottom: 12px; }
.project-body p { color: var(--ink-soft); }
.project-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.project-list li {
  padding-left: 16px;
  position: relative;
}
.project-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.project-list strong { color: var(--ink); font-weight: 700; }

/* ---------- services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 180ms ease, transform 180ms ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }

/* ---------- steps ---------- */
.steps {
  counter-reset: s;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(24px, 3vw, 40px);
}
.steps li {
  counter-increment: s;
  padding-top: 20px;
  border-top: 2px solid var(--rule);
  position: relative;
}
.steps li::before {
  content: counter(s, decimal-leading-zero);
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.about-grid h2 { margin-bottom: 18px; }
.about-grid p { color: var(--ink-soft); }
.about-note { font-size: 0.94rem; }
.about-aside {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 30px);
}
.about-aside h3 { margin-bottom: 14px; }
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  font-size: 0.94rem;
  color: var(--ink-soft);
}
.plain-list li {
  padding-left: 18px;
  position: relative;
}
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.contact-grid h2 { margin-bottom: 16px; }
.contact-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  font-size: 0.95rem;
}
.contact-list li { display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.contact-list .label {
  min-width: 92px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
  display: grid;
  gap: 16px;
}
.field { display: grid; gap: 6px; }
.field label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px 14px;
  min-height: 46px;
  transition: border-color 160ms ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--muted); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--accent);
  outline: 3px solid color-mix(in oklab, var(--accent) 35%, transparent);
  outline-offset: 1px;
}
.contact-form .btn { justify-self: start; }
.form-status {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  padding-block: clamp(36px, 5vw, 56px) 24px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand { font-weight: 800; margin: 0 0 6px; letter-spacing: -0.02em; }
.footer-line { margin: 0; font-size: 0.9rem; color: var(--muted); }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a:hover { color: var(--accent); }
.attribution {
  margin: 28px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.attribution a { color: var(--muted); text-decoration: none; }
.attribution a:hover { color: var(--ink-soft); text-decoration: underline; }

/* ---------- motion ---------- */
@keyframes fadeRise {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section > .wrap > *,
    .hero-grid > * {
      animation: fadeRise 420ms cubic-bezier(.2,.7,.1,1) both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
  }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .hero-figure img { aspect-ratio: 16 / 10; }
  .project { grid-template-columns: 1fr; }
  .project:nth-child(even) > .project-media { order: 0; }
  .project-media img { aspect-ratio: 16 / 10; }
}

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; padding-block: 10px; min-height: 0; }
  .nav {
    order: 3;
    width: 100%;
    gap: 4px 16px;
    padding-bottom: 6px;
  }
  .nav a { font-size: 0.88rem; padding: 8px 0; }
  .nav .nav-cta { padding: 8px 14px; margin-left: auto; }
  .theme-toggle { margin-left: auto; }
  .hero-facts { grid-template-columns: 1fr; gap: 14px; }
  .contact-list .label { min-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
