@import url('https://fonts.googleapis.com/css2?family=EB+Garamond&family=Inter:wght@400;600&display=swap');

:root {
  --bg-color: #f5f2eb;
  --text-color: #1c1b18;
  --accent-color: #a88b52;
  --card-bg: #fefdf9;
  --card-border: #e0dcd0;
  --shadow: rgba(0, 0, 0, 0.06);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  min-height: 100vh;
  background-image: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
}

header {
  text-align: center;
  padding: 4rem 2rem 2rem;
  border-bottom: 1px solid var(--card-border);
}

h1 {
  font-family: 'EB Garamond', serif;
  font-size: 3rem;
  color: var(--text-color);
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  animation: fadeIn 1s ease-out;
}

header p {
  font-size: 1.15rem;
  color: #4a4741;
  font-style: italic;
  opacity: 0.9;
}

main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 3rem 4rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 12px 30px var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle at top left, rgba(168,139,82,0.05), transparent 70%);
  pointer-events: none;
}

.project-card:hover {
  transform: scale(1.015);
  box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

.project-card h2 {
  font-family: 'EB Garamond', serif;
  font-size: 1.7rem;
  color: var(--text-color);
  margin-bottom: 0.3rem;
}

.project-card p {
  font-size: 0.95rem;
  color: #5c574e;
  flex-grow: 1;
}

.project-card a {
  align-self: start;
  margin-top: 1.2rem;
  padding: 0.45rem 1.1rem;
  background-color: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}

.project-card a:hover {
  background-color: var(--accent-color);
  color: white;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  header {
    padding: 2rem 1rem;
  }
  main {
    padding: 2rem;
  }
  h1 {
    font-size: 2.2rem;
  }
}


/* ✅ Popup toast pour formulaire */
.popup-toast {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  max-width: 90%;
  padding: 1.2rem 2rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  color: var(--text-color);
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.popup-toast.visible {
  opacity: 1;
  pointer-events: auto;
  animation: slideDownBounce 0.6s ease forwards;
}

/* Animations */
@keyframes slideDownBounce {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-40px);
  }
  60% {
    opacity: 1;
    transform: translateX(-50%) translateY(10px);
  }
  80% {
    transform: translateX(-50%) translateY(-4px);
  }
  100% {
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  header {
    padding: 2rem 1rem;
  }
  main {
    padding: 2rem;
  }
  h1 {
    font-size: 2.2rem;
  }
}