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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  color: white;
  padding: 2rem 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
  margin-bottom: 0.5rem;
}

header nav {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.btn-nav {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  transition: background 0.3s;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1rem;
}

.btn-nav:hover {
  background: rgba(255,255,255,0.2);
}

main {
  padding: 2rem 0;
  min-height: calc(100vh - 300px);
}

/* Buttons */
.btn-primary {
  background: #27ae60;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: #229954;
}

.btn-secondary {
  background: #3498db;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s;
}

.btn-secondary:hover {
  background: #2980b9;
}

/* Message */
.message {
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  text-align: center;
}

.message.success {
  background: #d5f4e6;
  color: #27ae60;
  border-left: 4px solid #27ae60;
}

.message.error {
  background: #fadbd8;
  color: #c0392b;
  border-left: 4px solid #e74c3c;
}

/* Landing */
.landing {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.landing h2 {
  color: #27ae60;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.landing p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 2rem;
}

/* Login */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 400px;
}

.login-box h2 {
  color: #27ae60;
  margin-bottom: 1.5rem;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-box input,
.login-box select,
.login-box textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
}

.login-box input:focus,
.login-box select:focus,
.login-box textarea:focus {
  outline: none;
  border-color: #27ae60;
  box-shadow: 0 0 5px rgba(39, 174, 96, 0.2);
}

.login-box a {
  color: #27ae60;
  text-decoration: none;
}

/* Dashboard */
.dashboard {
  display: grid;
  gap: 2rem;
}

.panier {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.panier h3 {
  color: #27ae60;
  margin-bottom: 1.5rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.product-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.3s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.product-card:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-card h4 {
  color: #27ae60;
  margin-bottom: 0.5rem;
}

.product-card p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.product-price {
  font-size: 1.3rem;
  color: #e74c3c;
  font-weight: bold;
  margin: 1rem 0;
}

.product-card input {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
}

/* Orders */
.order-card {
  background: white;
  border-left: 4px solid #27ae60;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.order-card h4 {
  color: #27ae60;
  margin-bottom: 0.5rem;
}

.order-total {
  font-size: 1.1rem;
  font-weight: bold;
  color: #27ae60;
  margin: 1rem 0;
}

/* Admin */
.admin-dashboard {
  padding: 2rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
}

.stat-card h3 {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.admin-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #ddd;
}

.admin-section h3 {
  color: #27ae60;
  margin-bottom: 1.5rem;
}

.admin-section h4 {
  margin-bottom: 1rem;
  color: #333;
}

.admin-section form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.admin-section input,
.admin-section select,
.admin-section textarea {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
}

hr {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid #ddd;
}

footer {
  background-color: #34495e;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
  header nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  .landing h2 {
    font-size: 1.8rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .login-box {
    margin: 20px;
  }
}
