/* Configuration RTL et variables CSS */
:root {
  --color-rose-powder: #f4c2c2;
  --color-white-cream: #faf9f7;
  --color-nude: #d4b8a8;
  --color-green-tender: #c8e6c9;
  --color-gold: #d4af37;
  --color-text-dark: #5d4e75;
  --color-border-light: #e8d5d5;
  --font-arabic: 'Amiri', 'Scheherazade New', serif;
  --font-latin: 'Playfair Display', serif;
  --shadow-soft: 0 4px 20px rgba(244, 194, 194, 0.3);
  --shadow-hover: 0 8px 30px rgba(212, 184, 168, 0.4);
  --border-radius: 20px;
}

/* Configuration RTL globale */
html {
  direction: rtl;
  text-align: right;
}

body {
  font-family: var(--font-arabic);
  background: linear-gradient(135deg, var(--color-white-cream) 0%, #fdf2f8 100%);
  color: var(--color-text-dark);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  min-height: 100vh;
}

/* Typographie */
.font-arabic {
  font-family: var(--font-arabic);
}

.font-latin {
  font-family: var(--font-latin);
}

/* Header et navigation */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-soft);
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-text-dark);
  text-decoration: none;
  font-family: var(--font-arabic);
}

/* Navigation */
.nav-link {
  color: var(--color-text-dark);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  font-family: var(--font-arabic);
}

.nav-link:hover {
  background: var(--color-rose-powder);
  color: white;
  transform: translateY(-2px);
}

/* Boutons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-family: var(--font-arabic);
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-rose-powder) 0%, var(--color-nude) 100%);
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: var(--color-white-cream);
  color: var(--color-text-dark);
  border: 2px solid var(--color-border-light);
}

.btn-secondary:hover {
  background: var(--color-green-tender);
  border-color: var(--color-green-tender);
}

/* Cards produit */
.product-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: all 0.4s ease;
  border: 1px solid var(--color-border-light);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.product-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--color-white-cream) 0%, var(--color-rose-powder) 100%);
}

.product-info {
  padding: 1.5rem;
}

.product-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--color-text-dark);
  margin-bottom: 0.5rem;
  font-family: var(--font-arabic);
}

.product-description {
  color: #666;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.product-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-gold);
  margin-bottom: 1rem;
}

/* Panier */
.cart-icon {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--color-rose-powder);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: white;
  border-radius: var(--border-radius);
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  box-shadow: var(--shadow-hover);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

/* Formulaires */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-text-dark);
  font-weight: 600;
  font-family: var(--font-arabic);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--color-border-light);
  border-radius: var(--border-radius);
  font-family: var(--font-arabic);
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-rose-powder);
  box-shadow: 0 0 0 3px rgba(244, 194, 194, 0.1);
}

/* Sections */
.hero {
  background: linear-gradient(135deg, var(--color-white-cream) 0%, #fdf2f8 50%, var(--color-green-tender) 100%);
  padding: 4rem 0;
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: bold;
  color: var(--color-text-dark);
  margin-bottom: 1rem;
  font-family: var(--font-arabic);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Grille responsive */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
  .grid-cols-2, .grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .product-card {
    margin: 0 1rem;
  }
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Utilitaires */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }
.rounded { border-radius: var(--border-radius); }
.shadow { box-shadow: var(--shadow-soft); }

/* Footer */
.footer {
  background: var(--color-text-dark);
  color: white;
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  color: var(--color-rose-powder);
  margin-bottom: 1rem;
  font-family: var(--font-arabic);
}

.footer-section p, .footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  line-height: 1.6;
}

.footer-section a:hover {
  color: var(--color-rose-powder);
}

/* Loading */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border-light);
  border-radius: 50%;
  border-top-color: var(--color-rose-powder);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}