/* ================================
   SAWSANE HAFSATI — PORTFOLIO
   ================================ */

:root {
  --bg: #f5f2ee;
  --fg: #0d0d0d;
  --accent: #e63322;
  --muted: #999;
  --border: #e0dbd4;
  --font-display: 'Playfair Display', serif;
  --font-mono: 'DM Mono', monospace;
  --font-body: 'DM Sans', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  cursor: none;
  overflow-x: hidden;
}

/* CURSEUR */
.cursor {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background 0.3s;
  mix-blend-mode: multiply;
}

body.hovering .cursor {
  width: 48px; height: 48px;
  background: var(--accent);
}

/* UTILS */
.mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; }
.muted { color: var(--muted); }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 56px;
  background: rgba(245,242,238,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-name {
  font-family: var(--font-display);
  font-weight: 900; font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.nav-links { list-style: none; display: flex; gap: 36px; align-items: center; }

.nav-links a {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--fg); text-decoration: none; opacity: 0.5; transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }

.nav-cta {
  opacity: 1 !important;
  background: var(--fg) !important;
  color: var(--bg) !important;
  padding: 10px 20px !important;
  transition: background 0.3s, color 0.3s !important;
}
.nav-cta:hover {
  background: var(--accent) !important;
  color: #fff !important;
}

/* HERO */
.hero {
  min-height: 100vh;
  padding: 160px 56px 80px;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  position: absolute; top: 120px; left: 56px;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--muted);
  opacity: 1;
}

.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin-bottom: 48px;
}

.line-1 {
  display: block;
  font-size: clamp(80px, 14vw, 200px);
  color: var(--fg);
  opacity: 0;
  animation: fadeUp 0.9s 0.2s forwards;
}

.line-2 {
  display: block;
  font-size: clamp(80px, 14vw, 200px);
  opacity: 0;
  animation: fadeUp 0.9s 0.35s forwards;
}

.line-2 em {
  font-style: italic;
  color: var(--fg);
  -webkit-text-stroke: 0;
}

.hero-sub {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 40px; align-items: start;
  opacity: 1;
}

.hero-sub p:first-child {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em;
  color: var(--muted); line-height: 1.6; text-transform: uppercase;
}

.hero-desc {
  font-size: 18px; line-height: 1.6; color: var(--fg);
  opacity: 0.7; max-width: 500px;
}

.hero-scroll {
  position: absolute; bottom: 48px; right: 56px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--muted);
  opacity: 0.6;
}

.scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, transparent, var(--muted));
  animation: scrollAnim 2s ease-in-out infinite;
}

@keyframes scrollAnim {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* MARQUEE */
.marquee-wrap {
  background: var(--accent);
  padding: 14px 0; overflow: hidden; white-space: nowrap;
}

.marquee-track {
  display: inline-flex; gap: 32px;
  animation: marquee 18s linear infinite;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.2em; color: #fff;
}

.bull { opacity: 0.4; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* WORK */
.work {
  padding: 100px 56px;
  border-bottom: 1px solid var(--border);
}

.work-label {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 32px; border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.project-list { display: flex; flex-direction: column; }

.project-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--fg);
  position: relative; overflow: hidden;
  transition: padding-left 0.4s ease;
  cursor: none;
}

.project-item:hover { padding-left: 0; }

.project-item--soon { opacity: 0.3; cursor: default; }
.project-item--soon:hover { padding-left: 0; }

.project-num { color: var(--muted); }

.project-name {
  font-family: var(--font-display);
  font-weight: 900; font-size: clamp(28px, 3.5vw, 52px);
  letter-spacing: -0.03em; line-height: 1;
  transition: color 0.3s;
}

.project-item:hover .project-name { color: var(--accent); }

.project-type {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; color: var(--muted); margin-top: 6px;
}

.project-right {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: flex-end;
}

.project-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  border: 1px solid var(--border); padding: 4px 10px;
  color: var(--muted);
}

.project-arrow {
  font-size: 20px; color: var(--accent);
  opacity: 0; transition: opacity 0.3s, transform 0.3s;
  transform: translateX(-8px);
}

.project-item:hover .project-arrow {
  opacity: 1; transform: translateX(0);
}

/* Image preview au hover */
.project-preview {
  position: absolute; right: 80px; top: 50%;
  transform: translateY(-50%) scale(0.9);
  width: 200px; height: 130px;
  overflow: hidden; opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none; z-index: 2;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.project-preview img {
  width: 100%; height: 100%; object-fit: cover;
}

.project-item:hover .project-preview {
  opacity: 1; transform: translateY(-50%) scale(1);
}

/* ABOUT */
.about {
  padding: 100px 56px;
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid; grid-template-columns: 300px 1fr;
  gap: 80px; align-items: start;
}

.about-title {
  font-family: var(--font-display);
  font-weight: 900; font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.03em; line-height: 0.95;
  margin-top: 16px;
}

.about-title em { font-style: italic; color: var(--accent); }

.about-text {
  font-size: 17px; line-height: 1.7; color: var(--fg);
  opacity: 0.75; margin-bottom: 24px;
}

.about-text strong { color: var(--fg); opacity: 1; font-weight: 500; }

.about-skills {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 32px; margin-top: 48px; padding-top: 48px;
  border-top: 1px solid var(--border);
}

.skill-title { display: block; margin-bottom: 16px; }

.skill-col ul { list-style: none; }
.skill-col li {
  font-size: 14px; line-height: 1;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  color: var(--fg); opacity: 0.7;
}

.about-badges {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 32px;
}

.badge {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  border: 1px solid var(--fg); padding: 6px 14px;
  color: var(--fg);
}

/* SERVICES */
.services {
  padding: 100px 56px;
  border-bottom: 1px solid var(--border);
}

.services-label { margin-bottom: 48px; display: block; }

.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px; background: var(--border);
}

.service-card {
  background: var(--bg);
  padding: 48px 40px;
  display: flex; flex-direction: column; gap: 16px;
}

.service-card--accent {
  background: var(--fg); color: #fff;
}

.service-num { color: var(--accent); }

.service-card h3 {
  font-family: var(--font-display);
  font-weight: 900; font-size: 28px;
  letter-spacing: -0.02em;
}

.service-card p {
  font-size: 14px; line-height: 1.6; opacity: 0.6; flex: 1;
}

.service-price {
  font-family: var(--font-mono); font-size: 13px;
  letter-spacing: 0.1em; color: var(--accent);
  margin-top: auto; padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.service-card--accent .service-price {
  border-top-color: rgba(255,255,255,0.15);
}

/* CONTACT */
.contact { padding: 100px 56px; }

.contact-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact-title {
  font-family: var(--font-display);
  font-weight: 900; font-size: clamp(48px, 6vw, 88px);
  letter-spacing: -0.04em; line-height: 0.9;
  margin: 16px 0 48px;
}

.contact-title em { font-style: italic; color: var(--accent); }

.contact-info {
  display: flex; flex-direction: column; gap: 12px;
}

.contact-info a {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  color: var(--fg); text-decoration: none; opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
  display: inline-block; padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.contact-info a:hover {
  opacity: 1; color: var(--accent);
  border-bottom-color: var(--accent);
}

/* FORM */
.contact-form { display: flex; flex-direction: column; gap: 24px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-group label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.2em; color: var(--muted);
}

.form-group input,
.form-group textarea {
  background: transparent;
  border: none; border-bottom: 1px solid var(--border);
  color: var(--fg); font-family: var(--font-body);
  font-size: 15px; padding: 10px 0; outline: none;
  transition: border-color 0.3s; resize: none; width: 100%;
}

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

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

.form-btn {
  background: var(--fg); color: var(--bg);
  border: none; font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.15em;
  padding: 18px 36px; cursor: none;
  display: flex; align-items: center; gap: 12px;
  align-self: flex-start;
  transition: background 0.3s;
}

.form-btn:hover { background: var(--accent); }

.form-success {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.15em; color: var(--accent);
  opacity: 0; transition: opacity 0.5s;
}

.form-success.visible { opacity: 1; }

/* FOOTER */
.footer {
  padding: 24px 56px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between;
  opacity: 0.4;
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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



/* RESPONSIVE */
@media (max-width: 900px) {
  .nav { padding: 20px 24px; }
  .hero { padding: 140px 24px 60px; }
  .hero-eyebrow { left: 24px; }
  .hero-sub { grid-template-columns: 1fr; gap: 16px; }
  .work { padding: 64px 24px; }
  .project-item { grid-template-columns: 40px 1fr; }
  .project-right { display: none; }
  .project-preview { display: none; }
  .about { padding: 64px 24px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-skills { grid-template-columns: 1fr; }
  .services { padding: 64px 24px; }
  .services-grid { grid-template-columns: 1fr; }
  .contact { padding: 64px 24px; }
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
  .form-row { grid-template-columns: 1fr; }
  .footer { padding: 20px 24px; }
  .cursor { display: none; }
  body { cursor: auto; }
}

/* SLOGAN */
.hero-slogan {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(40px, 6vw, 88px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--accent);
  margin-bottom: 56px;
  opacity: 0;
  animation: fadeUp 0.9s 0.5s forwards;
}

/* Cache les tags au hover sur le projet */
.project-item:hover .project-tag {
  opacity: 0;
  transition: opacity 0.3s;
}