/* =========================================================
   RESET
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Sora", sans-serif;
  background: #242424;
  color: #f5f5f5;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   VARIABLES
========================================================= */

:root {
  --bg: #242424;
  --bg-alt: #2c2c2c;
  --text: #f5f5f5;
  --muted: #a6a6a6;
  --accent: #f59a23;
  --border: rgba(255, 255, 255, 0.12);
  --container: 1200px;
}

/* =========================================================
   GLOBAL
========================================================= */

body {
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.section {
  padding: 140px 0;
}

/* =========================================================
   HEADER
========================================================= */

.site-header {
  position: relative;
  z-index: 100;
  width: 100%;
  min-height: 80px;
  display: flex;
  align-items: center;
}

.header-inner {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  width: 65px;
  height: 65px;
  object-fit: contain;
}

/* =========================================================
   NAVIGATION
========================================================= */

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav a {
  position: relative;
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav a:hover {
  color: var(--accent);
}

.nav a:hover::after {
  width: 100%;
}

/* =========================================================
   MENU MOBILE
========================================================= */

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

/* =========================================================
   HERO
========================================================= */

.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  padding: 80px 0 120px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.hero-content {
  max-width: 1000px;
  min-width: 0;
}

.eyebrow {
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 1000px;
  font-size: clamp(2rem, 10vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.hero-description {
  max-width: 520px;
  margin-top: 35px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.5rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 40px;
}

/* =========================================================
   BUTTONS
========================================================= */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-primary:hover {
  background: #df8515;
}

.button-secondary {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =========================================================
   SECTION HEADINGS
========================================================= */

.section-heading {
  margin-bottom: 60px;
}

.section-number {
  margin-bottom: 15px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.section-heading h2 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

/* =========================================================
   SKILLS
========================================================= */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.skill-card {
  padding: 35px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.skill-card h3 {
  margin-bottom: 15px;
  font-size: 1.25rem;
}

.skill-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* =========================================================
   PROJECTS
========================================================= */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

/* IMAGE DU PROJET */

.project-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1b1b1b;
  cursor: pointer;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* INDICATION "VOIR LE PROJET" */

.project-image::after {
  content: "Voir le projet ↗";
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;

  font-size: 0.95rem;
  font-weight: 700;

  opacity: 0;
  transition: opacity 0.25s ease;
}

.project-image:hover::after {
  opacity: 1;
}

/* ZOOM DE L'IMAGE */

.project-card:hover .project-image img {
  transform: scale(1.04);
}

/* CONTENU DU PROJET */

.project-content {
  padding: 30px;
}

.project-content h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.project-content p {
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* TAGS */

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  padding: 5px 9px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
}

/* =========================================================
   CV
========================================================= */

.cv-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 60px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.cv-box h2 {
  margin-bottom: 15px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.cv-box p {
  max-width: 600px;
  color: var(--muted);
}

/* =========================================================
   CONTACT
========================================================= */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact-intro h2 {
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.contact-intro p {
  max-width: 500px;
  color: var(--muted);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-link {
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
  transition: color 0.25s ease;
}

.contact-link:hover {
  color: var(--accent);
}

/* =========================================================
   FOOTER
========================================================= */

.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer p {
  color: var(--muted);
  font-size: 0.85rem;
}

/* =========================================================
   ANIMATIONS
========================================================= */

.hero-content,
.section-heading,
.skill-card,
.project-card,
.cv-box,
.contact-grid {
  opacity: 0;
  transform: translateY(25px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE — TABLETTE
========================================================= */

@media (max-width: 900px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .cv-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 700px) {
  .container {
    width: min(calc(100% - 30px), var(--container));
  }

  .header-inner {
    width: min(calc(100% - 30px), var(--container));
  }

  .site-header {
    min-height: 75px;
  }

  .logo img {
    width: 55px;
    height: 55px;
  }

  .menu-toggle {
    display: block;
    position: relative;
    z-index: 101;
  }

  .nav {
    position: absolute;
    top: 75px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 25px 30px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition:
      opacity 0.25s ease,
      visibility 0.25s ease,
      transform 0.25s ease;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .hero {
    min-height: auto;
    padding: 80px 0 100px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-description {
    margin-top: 30px;
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .section {
    padding: 100px 0;
  }

  .section-heading {
    margin-bottom: 40px;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    padding: 30px;
  }

  .project-content {
    padding: 25px;
  }

  .cv-box {
    padding: 35px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
