@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --vert: #0F3D2E;
  --vert-fonce: #0C3225;
  --ivoire: #FBF7EE;
  --ivoire-carte: #FFFFFF;
  --bordure: #E4DCC8;
  --or: #C89B4A;
  --or-texte: #8A6A2A;
  --terracotta: #B5563C;
  --encre: #1A1A17;
  --texte: #4A4438;
  --texte-doux: #8A7F63;
  --erreur: #B5563C;
  --accent: #FF7A1A;
  --accent-fonce: #E56600;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: #FFFFFF; color: var(--encre); line-height: 1.5; }
.serif { font-family: 'Sora', sans-serif; font-weight: 700; letter-spacing: -0.01em; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; }

/* AUTH PAGES */
.auth-page {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px;
  position: relative;
  background: radial-gradient(circle at 15% 20%, rgba(15,61,46,0.06) 0%, transparent 45%),
              radial-gradient(circle at 85% 80%, rgba(255,122,26,0.06) 0%, transparent 45%),
              #FFFFFF;
}
.back-link {
  position: absolute; top: 24px; left: 24px;
  font-size: 14px; color: var(--texte); font-weight: 500;
}
.back-link:hover { color: var(--vert); }
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--ivoire-carte);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  padding: 40px 32px;
  box-shadow: 0 20px 50px rgba(15,61,46,0.1);
}
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-logo span { font-size: 18px; color: var(--vert); }
.auth-card h1 { font-size: 26px; color: var(--encre); }
.auth-sub { margin-top: 6px; font-size: 14px; color: var(--texte-doux); margin-bottom: 24px; }

form label {
  display: block; font-size: 13px; color: var(--texte); margin-top: 16px; margin-bottom: 6px;
}
form label:first-of-type { margin-top: 0; }
form input, form select, form textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--bordure); border-radius: 6px;
  background: var(--ivoire); font-size: 14.5px; font-family: inherit; color: var(--encre);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
form input:focus, form select:focus, form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,26,0.12); }
form textarea { resize: vertical; }

.error-msg { color: var(--erreur); font-size: 13.5px; margin-top: 12px; min-height: 0; }

.auth-btn {
  width: 100%; margin-top: 24px;
  background: var(--accent); color: white;
  padding: 13px; border-radius: 6px; font-size: 14.5px; font-weight: 700;
  box-shadow: 0 3px 10px rgba(255,122,26,0.3);
  transition: background .2s, transform .15s, box-shadow .2s;
}
.auth-btn:hover { background: var(--accent-fonce); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(255,122,26,0.35); }

.auth-switch { margin-top: 20px; text-align: center; font-size: 13.5px; color: var(--texte-doux); }
.auth-switch a { color: var(--vert); font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

/* DASHBOARD */
.dash-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--bordure);
  background: var(--ivoire-carte);
  box-shadow: 0 1px 4px rgba(15,61,46,0.05);
}
.dash-header .logo { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--vert); }
.dash-header .actions { display: flex; align-items: center; gap: 16px; }
.dash-header .actions a, .dash-header .actions button {
  font-size: 13.5px; color: var(--texte); background: none;
}
.dash-header .actions button.logout { color: var(--terracotta); }

.dash-wrap { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
.dash-wrap h1 { font-size: 28px; margin-bottom: 4px; }
.dash-wrap .sub { color: var(--texte-doux); font-size: 14px; margin-bottom: 32px; }

.dash-section {
  background: var(--ivoire-carte); border: 1px solid var(--bordure); border-radius: 4px;
  padding: 24px; margin-bottom: 24px;
}
.dash-section h2 { font-size: 18px; margin-bottom: 16px; }

.product-list { display: flex; flex-direction: column; gap: 12px; }
.product-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px; border: 1px solid var(--bordure); border-radius: 3px;
  font-size: 14px;
}
.product-item .info strong { display: block; font-size: 15px; }
.product-item .info span { color: var(--texte-doux); font-size: 13px; }
.product-item .delete-btn {
  background: none; color: var(--terracotta); font-size: 13px; padding: 6px 10px;
}
.product-item .delete-btn:hover { text-decoration: underline; }

.add-product-form { display: grid; gap: 12px; grid-template-columns: 2fr 1fr; margin-top: 16px; }
.add-product-form textarea { grid-column: 1 / -1; }
.add-product-form button { grid-column: 1 / -1; }

.empty-state { color: var(--texte-doux); font-size: 14px; text-align: center; padding: 20px 0; }

/* FICHE VENDEUR */
.vendor-page-header {
  background: var(--vert); color: var(--ivoire); padding: 48px 20px;
}
.vendor-page-header .wrap { max-width: 900px; margin: 0 auto; }
.vendor-page-header .back { font-size: 13.5px; opacity: 0.8; margin-bottom: 16px; display: inline-block; }
.vendor-page-header h1 { font-size: 32px; }
.vendor-page-header .tag { opacity: 0.85; margin-top: 4px; font-size: 14.5px; }

.vendor-page-body { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
.vendor-page-body .desc { font-size: 15px; line-height: 1.7; color: var(--texte); margin-bottom: 32px; }

.products-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.product-card {
  border: 1px solid var(--bordure); border-radius: 3px; padding: 18px; background: var(--ivoire-carte);
}
.product-card h3 { font-size: 16px; }
.product-card .price { color: var(--accent-fonce); font-weight: 700; margin-top: 4px; font-size: 16px; }
.product-card p { font-size: 13.5px; color: var(--texte); margin-top: 8px; line-height: 1.5; }

@media (min-width: 640px) {
  .auth-page { padding: 60px 20px; }
}
