:root {
  color-scheme: dark;
  --night: #222831;
  --slate: #2d353f;
  --aqua: #39ddf0;
  --cornflower: #6495ed;
  --red: #d32f2f;
  --paper: #eef1f4;
  --mist: #9ba5b3;
  --hairline: rgba(238, 241, 244, 0.12);
  --edge: rgba(238, 241, 244, 0.35);
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--night);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

:focus-visible { outline: 2px solid var(--aqua); outline-offset: 4px; }

.container { width: min(1160px, 100% - 3rem); margin-inline: auto; }

[hidden] { display: none !important; }

/* ---------- En-tête ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(34, 40, 49, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.nav-wrap {
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.navig ul { display: flex; gap: 2rem; }

.navig a {
  color: var(--mist);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.navig a:hover,
.navig a[aria-current="page"] { color: var(--aqua); }

/* Bouton menu (sous 1000px) */

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--edge);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.menu-toggle:hover { border-color: var(--paper); }

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--paper);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Éléments communs ---------- */

.section,
.works,
.cta { scroll-margin-top: 4.5rem; }

.section {
  padding: 7rem 0;
  border-top: 1px solid var(--hairline);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 3rem;
}

.split h2,
.cta h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); }

.body {
  max-width: 62ch;
  color: var(--mist);
}

.body a {
  color: var(--aqua);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.body a:hover { color: var(--cornflower); }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--aqua);
  color: var(--night);
}

.btn-primary:hover { background: var(--paper); }

.btn-ghost { border-color: var(--edge); }
.btn-ghost:hover { border-color: var(--paper); }

/* ---------- Accueil ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 3rem;
  padding: 6rem 0 7rem;
}

.hero h1 {
  font-size: clamp(3.25rem, 9vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.name { color: var(--aqua); }

.lead {
  margin-top: 1.75rem;
  max-width: 34ch;
  font-size: 1.25rem;
  color: var(--mist);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero-img {
  justify-self: end;
  width: 100%;
  max-width: 460px;
  animation: rise 0.9s ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Présentation ---------- */

.about-img {
  width: 100%;
  max-width: 320px;
  margin-top: 2.5rem;
}

/* ---------- Travaux ---------- */

.works {
  background-image: url(Assets/svg/background.svg);
  padding: 10rem 10rem;
  margin: 5rem 0;
}

.worksContainer {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.projectTitle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 2rem;
}

.aboutName { color: var(--paper); }
.aboutTitle { color: var(--aqua); }

.works ul {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
}

.works li {
  position: relative;
  border-radius: 16px;
  background-color: rgba(57, 62, 70, 0.5);
  backdrop-filter: blur(4px);
  padding: 1rem 4rem;
}

.works li:hover { z-index: 1; }
.works li a { display: block; }

.works li img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  transition: transform 0.2s;
}

.works li:hover img { transform: scale(1.35); }

/* ---------- Langages ---------- */

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
}

.langs li {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
}

/* ---------- Bandeau de contact (accueil) ---------- */

.cta {
  background: var(--slate);
  border-block: 1px solid var(--hairline);
  padding: 5rem 0;
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta h2 { margin-bottom: 0.75rem; }
.cta .body { margin: 0; }

/* ---------- Page contact ---------- */

.page-intro { padding: 7rem 0 3rem; }

.page-intro h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.page-intro .lead { margin-top: 1.25rem; }

.form-block { padding-bottom: 7rem; }

.closed-msg {
  max-width: 680px;
  padding: 2rem;
  background: var(--slate);
  border: 1px solid var(--edge);
  border-radius: 8px;
  color: var(--mist);
}

.closed-msg a { color: var(--aqua); }

.contact-form {
  display: grid;
  gap: 1.5rem;
  max-width: 680px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field label {
  font-size: 0.95rem;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--slate);
  border: 1px solid rgba(238, 241, 244, 0.18);
  border-radius: 4px;
  transition: border-color 0.2s;
}

.field textarea {
  min-height: 10rem;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder { color: rgba(155, 165, 179, 0.7); }

.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--aqua); }

.contact-form .btn { justify-self: start; }

/* ---------- Pied de page ---------- */

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--hairline);
  color: var(--mist);
  font-size: 0.9rem;
}

.contact-footer { padding: 5rem 0 2rem; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.contact-footer h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  color: var(--paper);
  margin-bottom: 0.5rem;
}

.mail {
  display: inline-block;
  padding-bottom: 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--aqua);
  word-break: break-all;
}

.mail:hover { color: var(--aqua); }

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-meta p { margin: 0; }

.socials {
  display: flex;
  gap: 1.5rem;
}

.socials a {
  color: var(--paper);
  text-decoration: none;
  transition: color 0.2s;
}

.socials a:hover { color: var(--aqua); }

.form-status {
  color: var(--aqua);
  font-size: 0.95rem;
}

.form-status.is-error { color: #ff8a80; }

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-danger:hover { background: #e04848; }

.confirm {
  width: min(440px, calc(100% - 3rem));
  margin: auto;
  padding: 2rem;
  background: var(--slate);
  color: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 8px;
}

.confirm::backdrop {
  background: rgba(14, 17, 22, 0.7);
  backdrop-filter: blur(4px);
}

.confirm h2 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.confirm p { margin-bottom: 1.75rem; color: var(--mist); }

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

/* ---------- Adaptation : menu en burger (sous 1000px) ---------- */

@media (max-width: 1000px) {
  .menu-toggle { display: flex; }

  .navig {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--night);
    border-bottom: 1px solid var(--hairline);
  }

  .navig.is-open { display: block; }

  .navig ul {
    flex-direction: column;
    gap: 0;
    width: min(1160px, 100% - 3rem);
    margin-inline: auto;
    padding: 0.5rem 0 1rem;
  }

  .navig a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1rem;
    color: var(--paper);
  }

  .works { padding: 5rem 1.5rem; }

  .works ul {
    flex-direction: column;
    gap: 1rem;
  }

  .works li { padding: 1rem 2rem; }
}

/* ---------- Adaptation : mise en page (sous 860px) ---------- */

@media (max-width: 860px) {
  .hero,
  .split { grid-template-columns: 1fr; }

  .hero { padding: 4rem 0 5rem; }

  .hero-img {
    justify-self: start;
    max-width: 320px;
  }

  .split { gap: 1.5rem; }
}

@media (max-width: 600px) {
  .section { padding: 5rem 0; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Anti-spam ---------- */

.captcha { max-width: 280px; }

.field-error {
  color: #ff8a80;
  font-size: 0.9rem;
}

.field-error:empty { display: none; }

/* ---------- Mobile : centrage et textes (sous 860px) ---------- */

@media (max-width: 860px) {
  .hero { text-align: center; }
  .hero .actions { justify-content: center; }
  .hero .lead { margin-inline: auto; }
  .hero-img { justify-self: center; }
  .about-img { margin-inline: auto; }

  .split { text-align: center; }
  .split .body { margin-inline: auto; }

  .projectTitle {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    font-size: 1.6rem;
  }

  .cta-inner { justify-content: center; text-align: center; }
  .cta .body { margin-inline: auto; }

  .footer-inner,
  .footer-meta {
    justify-content: center;
    text-align: center;
  }

  .socials { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-img { animation: none; }
}