/* ==========================================================
   PALETTE — modifie ces variables pour changer toutes les
   couleurs du site en une seule fois.
   ========================================================== */
:root {
  --bg: #101012;
  --surface: #17171a;
  --text: #EDEBE6;
  --text-muted: #8b8b8f;
  --accent: #C9A66B;      /* doré / laiton, discret */
  --border: rgba(237, 235, 230, 0.12);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --max-width: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============ NAVIGATION ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 6vw;
  background: rgba(16, 16, 18, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 14px;
}

.nav {
  display: flex;
  gap: 32px;
  font-size: 14px;
}

.nav a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

/* ============ HERO ============ */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14vh 6vw 12vh;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 8vw, 84px);
  line-height: 1.05;
  margin: 0 0 32px;
}

.hero h1 .accent {
  color: var(--text-muted);
}

.hero-sub {
  max-width: 560px;
  font-size: 18px;
  color: var(--text-muted);
}

/* ============ SECTION LABEL (commun) ============ */
.section-label {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 40px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ============ PROJETS ============ */
.projects {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8vh 6vw;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: padding-left 0.25s ease, color 0.25s ease;
}

.project-item:hover,
.project-item:focus-visible {
  padding-left: 16px;
  color: var(--accent);
}

.project-index {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
  width: 28px;
  flex-shrink: 0;
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 30px);
  flex-grow: 1;
}

.project-tag {
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Vignette visible seulement en mobile (voir media query plus bas) */
.project-thumb-mobile {
  display: none;
}

/* ============ A PROPOS ============ */
.about {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8vh 6vw;
}

.about-text {
  max-width: 620px;
  font-size: 18px;
  color: var(--text-muted);
}

/* ============ CONTACT ============ */
.contact {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8vh 6vw;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}

.contact-email:hover,
.contact-email:focus-visible {
  color: var(--accent);
}

.socials {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.socials a:hover,
.socials a:focus-visible {
  color: var(--text);
}

/* ============ FOOTER ============ */
.footer {
  display: flex;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 6vw 60px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ============ PANNEAU FLOTTANT (suit le curseur) ============ */
/* C'est l'élément "signature" du site : une image de prévisualisation
   qui suit la souris quand on survole un titre de projet. */
.cursor-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  height: 240px;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transform: translate(-9999px, -9999px) scale(0.92);
  transition: opacity 0.25s ease, transform 0.05s linear;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}

.cursor-preview.active {
  opacity: 1;
}

.cursor-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Respecte les préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  .cursor-preview { transition: opacity 0.25s ease; }
  .lightbox { transition: opacity 0.15s ease; }
  html { scroll-behavior: auto; }
}

/* ============ LIGHTBOX (image en grand au clic) ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 6vw;
  background: rgba(16, 16, 18, 0.94);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  transform: scale(0.97);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: fixed;
  top: 24px;
  right: 6vw;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============ RESPONSIVE / MOBILE ============ */
/* En dessous de 900px : pas de curseur précis (tactile),
   donc on cache le panneau flottant et on montre une vignette
   directement dans la liste à la place. */
@media (max-width: 900px) {
  .cursor-preview {
    display: none;
  }

  .project-item {
    flex-wrap: wrap;
  }

  .project-thumb-mobile {
    display: block;
    width: 100%;
    order: 3;
    margin-top: 16px;
    border: 1px solid var(--border);
    max-height: 200px;
    object-fit: cover;
  }

  .topbar {
    padding: 20px 5vw;
  }

  .nav {
    gap: 20px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 10vh 6vw 8vh;
  }
}
