/* ===========================
   ZQSD Studio — Feuille de styles
   =========================== */

/* --- Variables & Reset --- */
:root {
  --c1: #CAD2C5;
  --c2: #84A98C;
  --c3: #52796F;
  --c4: #354F52;
  --c5: #2F3E46;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--c5);
  color: var(--c1);
  font-family: var(--font-mono);
  overflow-x: hidden;
  cursor: none;
}

/* --- Curseur personnalisé --- */
.cursor {
  width: 12px;
  height: 12px;
  background: var(--c2);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, background 0.3s;
  mix-blend-mode: difference;
}

.cursor-ring {
  width: 40px;
  height: 40px;
  border: 1px solid var(--c2);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: left 0.12s ease-out, top 0.12s ease-out;
  opacity: 0.5;
}

/* --- Navigation --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 3rem;
}

.nav-logo {
  display: block;
  width: 80px;
  height: 24px;
  text-decoration: none;
  font-size: 0;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--c2);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--c1);
}

/* --- Section Hero --- */
#home {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.orbit-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-word {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--c3);
  filter: blur(1.5px);
  opacity: 0.7;
  transform-origin: 0 0;
  white-space: nowrap;
}

/* Blobs ambiants */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: var(--c3);
  top: -100px;
  left: -150px;
  animation: drift1 12s ease-in-out infinite;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: var(--c2);
  bottom: -100px;
  right: -100px;
  animation: drift2 15s ease-in-out infinite;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: var(--c4);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: drift3 10s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 30px); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, -20px); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.3); }
}

/* Logo héro */
.hero-logo-wrap {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hero-logo {
  position: relative;
  animation: heroReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-logo img {
  display: block;
  width: min(60vw, 420px);
  height: auto;
  filter: drop-shadow(0 0 80px rgba(130, 169, 140, 0.4));
}

.hero-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.5em;
  color: var(--c3);
  text-transform: uppercase;
  animation: heroReveal 1.4s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--c3);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  animation: fadeIn 2s 1s both;
}

.scroll-hint::after {
  content: '';
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--c3), transparent);
  animation: scrollLine 2s 1.5s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Base sections --- */
section {
  min-height: 100vh;
  padding: 8rem 3rem 4rem;
}

.section-label {
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  color: var(--c3);
  text-transform: uppercase;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--c3);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--c1);
  margin-bottom: 4rem;
}

.section-title span {
  color: var(--c3);
}

/* --- Section Projets --- */
#projects {
  background: var(--c5);
}

.projects-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.project-count {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--c3);
}

.filter-tags {
  display: flex;
  gap: 1rem;
  list-style: none;
}

.filter-tags li {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--c3);
  text-transform: uppercase;
  cursor: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}

.filter-tags li:hover,
.filter-tags li.active {
  color: var(--c1);
  border-color: var(--c2);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  cursor: none;
  background: var(--c4);
}

.project-card:nth-child(1) { grid-column: span 7; grid-row: span 2; }
.project-card:nth-child(2) { grid-column: span 5; }
.project-card:nth-child(3) { grid-column: span 5; }
.project-card:nth-child(4) { grid-column: span 4; }
.project-card:nth-child(5) { grid-column: span 4; }
.project-card:nth-child(6) { grid-column: span 4; }

.project-inner {
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:nth-child(1) .project-inner {
  min-height: 580px;
}

.project-bg {
  position: absolute;
  inset: 0;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  background-size: cover;
  background-position: center;
}

.project-card:nth-child(1) .project-bg { background: linear-gradient(135deg, var(--c3) 0%, var(--c4) 100%); }
.project-card:nth-child(2) .project-bg { background: linear-gradient(135deg, var(--c4) 0%, var(--c3) 100%); }
.project-card:nth-child(3) .project-bg { background: linear-gradient(135deg, var(--c2) 0%, var(--c4) 100%); }
.project-card:nth-child(4) .project-bg { background: linear-gradient(135deg, var(--c5) 0%, var(--c3) 100%); }
.project-card:nth-child(5) .project-bg { background: linear-gradient(135deg, var(--c3) 0%, var(--c2) 100%); }
.project-card:nth-child(6) .project-bg { background: linear-gradient(135deg, var(--c4) 0%, var(--c5) 100%); }

.project-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(255,255,255,0.5) 20px, rgba(255,255,255,0.5) 21px),
    repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(255,255,255,0.5) 20px, rgba(255,255,255,0.5) 21px);
}

.project-card:hover .project-bg {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--c5) 0%, transparent 60%);
  opacity: 0.8;
  transition: opacity 0.4s;
}

.project-card:hover .project-overlay {
  opacity: 0.95;
}

.project-info {
  position: relative;
  z-index: 2;
  transform: translateY(8px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-info {
  transform: translateY(0);
}

.project-tag {
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c2);
  margin-bottom: 0.5rem;
}

.project-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  color: var(--c1);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.8rem;
}

.project-desc {
  font-size: 0.65rem;
  color: var(--c2);
  line-height: 1.6;
  max-width: 340px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s 0.1s, transform 0.4s 0.1s;
}

.project-card:hover .project-desc {
  opacity: 1;
  transform: translateY(0);
}

.project-arrow {
  margin-top: 1rem;
  width: 32px;
  height: 32px;
  border: 1px solid var(--c3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s 0.15s, transform 0.3s 0.15s, background 0.3s;
  font-size: 0.9rem;
}

.project-card:hover .project-arrow {
  opacity: 1;
  transform: translateY(0);
}

.project-arrow:hover {
  background: var(--c3);
}

/* --- Section Contact --- */
#contact {
  background: var(--c4);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.contact-left p {
  color: var(--c2);
  line-height: 1.8;
  font-size: 0.8rem;
  margin-bottom: 3rem;
  max-width: 400px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-item-label {
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  color: var(--c3);
  text-transform: uppercase;
}

.contact-item-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--c1);
}

/* Formulaire */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--c3);
  text-transform: uppercase;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--c3);
  padding: 0.8rem 0;
  color: var(--c1);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.3s;
  width: 100%;
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--c2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--c4);
}

.form-group textarea {
  resize: none;
  height: 100px;
}

.form-group select option {
  background: var(--c5);
  color: var(--c1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.btn-send {
  margin-top: 1rem;
  background: transparent;
  border: 1px solid var(--c2);
  color: var(--c1);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 1.2rem 2.5rem;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: color 0.4s;
  align-self: flex-start;
}

.btn-send::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--c2);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-send:hover::before {
  transform: translateX(0);
}

.btn-send:hover {
  color: var(--c5);
}

.btn-send span {
  position: relative;
  z-index: 1;
}

/* Message de succès */
.form-success {
  display: none;
  text-align: center;
  padding: 3rem;
  background: var(--c5);
  border: 1px solid var(--c3);
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--c2);
  margin-bottom: 0.5rem;
}

.form-success p {
  color: var(--c3);
  font-size: 0.75rem;
}

/* --- Footer --- */
footer {
  background: var(--c5);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--c4);
}

footer p {
  font-size: 0.6rem;
  color: var(--c3);
  letter-spacing: 0.2em;
}

/* --- Animations de révélation au scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* --- Responsive --- */
@media (max-width: 900px) {
  nav { padding: 1.5rem; }
  section { padding: 6rem 1.5rem 3rem; }

  .projects-grid { grid-template-columns: 1fr 1fr; }
  .project-card:nth-child(n) { grid-column: span 1; grid-row: span 1; }
  .project-card:nth-child(1) { grid-column: span 2; }

  .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
  .form-row { grid-template-columns: 1fr; gap: 1.5rem; }
}
