/* ── Variables ── */
:root {
  --green: #2c7a4b;
  --green-dark: #1f5c37;
  --green-light: #eef2ef;
  --text: #1a1a1a;
  --muted: #555;
  --bg: #f5f5f5;
  --white: #fff;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Syne', Arial, sans-serif;
}

/* ── Header ── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--green);
}

nav {
  display: flex;
  gap: 5px;
}

nav a {
  margin: 0 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--green);
}

#cart-button {
  cursor: pointer;
  font-size: 16px;
  background: var(--green-light);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  transition: background 0.2s;
}

#cart-button:hover {
  background: #d4e8da;
}

/* ── Hero ── */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 80px 80px;
  background: var(--white);
}

.hero-text {
  max-width: 500px;
}

.hero-tag {
  display: inline-block;
  background: var(--green-light);
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.hero-text h1 {
  font-size: 72px;
  margin: 0 0 8px;
  line-height: 1;
  color: var(--green);
}

.hero-text h2 {
  color: var(--muted);
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 20px;
}

.hero-text p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 30px;
}

.hero-image-wrap {
  flex-shrink: 0;
}

.hero-image {
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

/* ── Buttons ── */
button {
  background: var(--green);
  color: white;
  border: none;
  padding: 14px 28px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

button:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  background: #aaa;
  cursor: not-allowed;
  transform: none;
}

/* ── Section Projet ── */
.section {
  padding: 80px;
  background: var(--green-light);
}

.section h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: var(--green-dark);
}

.section p {
  max-width: 700px;
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 16px;
}

/* ── Section Technologie ── */
.tech {
  padding: 80px;
  background: var(--white);
}

.tech h2 {
  font-size: 36px;
  margin-bottom: 40px;
  color: var(--green-dark);
}

.tech-grid {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.tech-card {
  background: var(--bg);
  padding: 30px;
  border-radius: 12px;
  flex: 1 1 200px;
  min-width: 200px;
  border: 1px solid #e0e0e0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.tech-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.tech-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--green-dark);
}

.tech-card p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* ── Section Contact ── */
.contact {
  padding: 80px;
  background: var(--green-light);
}

.contact h2 {
  font-size: 36px;
  margin-bottom: 10px;
  color: var(--green-dark);
}

.contact > p {
  color: var(--muted);
  margin-bottom: 30px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 500px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  background: white;
  transition: border-color 0.2s;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green);
}

.contact-form button {
  align-self: flex-start;
}

/* ── Overlay ── */
#cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 999;
}

#cart-overlay.active {
  display: block;
}

/* ── Cart Panel ── */
#cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  height: 100%;
  background: var(--white);
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#cart-panel.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.cart-header h2 {
  margin: 0;
  font-size: 22px;
}

.cart-close {
  background: none;
  color: var(--text);
  font-size: 18px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.cart-close:hover {
  background: #f0f0f0;
  transform: none;
}

.cart-item {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 16px;
  align-items: flex-start;
}

.cart-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
  flex-shrink: 0;
}

.cart-info {
  font-size: 14px;
  flex: 1;
}

.cart-info strong {
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
}

.cart-info p {
  margin: 2px 0;
  color: var(--muted);
}

.cart-info .price {
  font-weight: 600;
  color: var(--green);
}

.cart-info button {
  margin-top: 8px;
  background: #e74c3c;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.cart-info button:hover {
  background: #c0392b;
  transform: none;
}

.cart-total {
  font-size: 16px;
  text-align: right;
  padding: 16px 0;
  border-top: 2px solid var(--green-light);
  margin-top: auto;
}

.cart-total strong {
  font-size: 20px;
  color: var(--green);
}

.cart-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.continue-btn {
  background: #eee;
  color: var(--text);
}

.continue-btn:hover {
  background: #ddd;
}

.checkout-btn {
  background: var(--green);
}

#cart-empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  header {
    padding: 16px 20px;
  }

  nav {
    display: none;
  }

  .hero {
    flex-direction: column;
    padding: 40px 24px;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 52px;
  }

  .hero-image {
    max-width: 100%;
  }

  .section,
  .tech,
  .contact {
    padding: 50px 24px;
  }

  .tech-grid {
    flex-direction: column;
  }

  #cart-panel {
    width: 100%;
  }
}
