/**
 * 🎨 WAFASALAF UI DESIGN SYSTEM
 * Version: 1.0
 * Date: 15 février 2026
 * Created by: Stratwise Africa
 * 
 * Système de design complet pour Wafasalaf Animation Commerciale
 * Basé sur l'identité visuelle officielle Wafasalaf
 */

/* ============================================================================
   1️⃣ VARIABLES CSS CUSTOM
   ============================================================================ */

:root {
  /* Couleurs Primaires */
  --wafasalaf-primary: #00A5A8;
  --wafasalaf-primary-hover: #008B8E;
  --wafasalaf-primary-light: #00BCD4;
  
  --wafasalaf-yellow: #FFD600;
  --wafasalaf-yellow-light: #FFEB3B;
  --wafasalaf-yellow-dark: #FFC107;
  
  /* Couleurs de Statut */
  --wafasalaf-success: #4CAF50;
  --wafasalaf-success-light: #81C784;
  
  --wafasalaf-warning: #FFD600;
  --wafasalaf-warning-light: #FFC107;
  
  --wafasalaf-error: #F44336;
  --wafasalaf-error-light: #E57373;
  
  --wafasalaf-info: #00BCD4;
  --wafasalaf-info-light: #4DD0E1;
  
  --wafasalaf-paid: #2196F3;
  --wafasalaf-paid-light: #64B5F6;
  
  --wafasalaf-draft: #9E9E9E;
  --wafasalaf-draft-light: #BDBDBD;
  
  /* Couleurs Neutres */
  --wafasalaf-gray-900: #212121;
  --wafasalaf-gray-700: #616161;
  --wafasalaf-gray-500: #9E9E9E;
  --wafasalaf-gray-300: #E0E0E0;
  --wafasalaf-gray-100: #F5F5F5;
  --wafasalaf-white: #FFFFFF;
  
  --wafasalaf-default: #6B6B6B;
  --wafasalaf-active: #00A5A8;
  --wafasalaf-hover: #008B8E;
  
  /* Priorités */
  --wafasalaf-priority-high: #F44336;
  --wafasalaf-priority-normal: #9E9E9E;
  --wafasalaf-priority-low: #2196F3;
  
  /* Typographie */
  --wafasalaf-font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --wafasalaf-font-regular: 400;
  --wafasalaf-font-medium: 500;
  --wafasalaf-font-semibold: 600;
  --wafasalaf-font-bold: 700;
  
  --wafasalaf-text-h1: 32px;
  --wafasalaf-text-h2: 24px;
  --wafasalaf-text-h3: 20px;
  --wafasalaf-text-h4: 18px;
  --wafasalaf-text-large: 16px;
  --wafasalaf-text-base: 14px;
  --wafasalaf-text-small: 12px;
  --wafasalaf-text-xs: 10px;
  
  --wafasalaf-leading-tight: 1.2;
  --wafasalaf-leading-normal: 1.5;
  --wafasalaf-leading-relaxed: 1.75;
  
  /* Icônes */
  --wafasalaf-icon-large: 48px;
  --wafasalaf-icon-medium: 24px;
  --wafasalaf-icon-small: 20px;
  --wafasalaf-icon-stroke: 2px;
  --wafasalaf-icon-radius: 2px;
  
  /* Spacing */
  --wafasalaf-space-xs: 4px;
  --wafasalaf-space-sm: 8px;
  --wafasalaf-space-md: 12px;
  --wafasalaf-space-lg: 16px;
  --wafasalaf-space-xl: 20px;
  --wafasalaf-space-2xl: 24px;
  --wafasalaf-space-3xl: 32px;
  --wafasalaf-space-4xl: 40px;
  --wafasalaf-space-5xl: 48px;
  
  /* Border Radius */
  --wafasalaf-radius-sm: 3px;
  --wafasalaf-radius-md: 8px;
  --wafasalaf-radius-lg: 12px;
  --wafasalaf-radius-xl: 16px;
  --wafasalaf-radius-full: 9999px;
  
  /* Shadows */
  --wafasalaf-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --wafasalaf-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --wafasalaf-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --wafasalaf-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --wafasalaf-transition: all 0.2s ease;
}

/* ============================================================================
   2️⃣ RESET & BASE STYLES
   ============================================================================ */

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

body {
  font-family: var(--wafasalaf-font-primary);
  font-size: var(--wafasalaf-text-base);
  line-height: var(--wafasalaf-leading-normal);
  color: var(--wafasalaf-gray-900);
  background-color: var(--wafasalaf-gray-100);
}

/* ============================================================================
   3️⃣ BADGES DE STATUT
   ============================================================================ */

.wafasalaf-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--wafasalaf-space-sm);
  border-radius: var(--wafasalaf-radius-xl);
  font-weight: var(--wafasalaf-font-semibold);
  font-family: var(--wafasalaf-font-primary);
  text-transform: capitalize;
  transition: var(--wafasalaf-transition);
}

.wafasalaf-badge-lg {
  font-size: var(--wafasalaf-text-base);
  padding: var(--wafasalaf-space-sm) var(--wafasalaf-space-lg);
  height: 32px;
}

.wafasalaf-badge-md {
  font-size: var(--wafasalaf-text-small);
  padding: 6px var(--wafasalaf-space-md);
  height: 24px;
}

.wafasalaf-badge-sm {
  font-size: var(--wafasalaf-text-xs);
  padding: var(--wafasalaf-space-xs) var(--wafasalaf-space-sm);
  height: 20px;
}

/* Badge Success (Approuvé) */
.wafasalaf-badge-success {
  background-color: var(--wafasalaf-success);
  color: var(--wafasalaf-white);
}

/* Badge Info (En cours) */
.wafasalaf-badge-info {
  background-color: var(--wafasalaf-info);
  color: var(--wafasalaf-white);
}

/* Badge Warning (En attente) */
.wafasalaf-badge-warning {
  background-color: var(--wafasalaf-warning);
  color: var(--wafasalaf-gray-900);
}

/* Badge Error (Rejeté) */
.wafasalaf-badge-error {
  background-color: var(--wafasalaf-error);
  color: var(--wafasalaf-white);
}

/* Badge Paid (Soldé) */
.wafasalaf-badge-paid {
  background-color: var(--wafasalaf-paid);
  color: var(--wafasalaf-white);
}

/* Badge Draft (Brouillon) */
.wafasalaf-badge-draft {
  background-color: var(--wafasalaf-draft);
  color: var(--wafasalaf-white);
}

/* ============================================================================
   4️⃣ BOUTONS
   ============================================================================ */

.wafasalaf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wafasalaf-space-sm);
  padding: var(--wafasalaf-space-md) var(--wafasalaf-space-2xl);
  border-radius: var(--wafasalaf-radius-full);
  font-size: var(--wafasalaf-text-base);
  font-weight: var(--wafasalaf-font-bold);
  font-family: var(--wafasalaf-font-primary);
  cursor: pointer;
  transition: var(--wafasalaf-transition);
  border: none;
  outline: none;
  text-decoration: none;
}

.wafasalaf-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--wafasalaf-shadow-md);
}

.wafasalaf-btn:active {
  transform: translateY(0);
  box-shadow: var(--wafasalaf-shadow-sm);
}

/* Primary Button (Yellow) */
.wafasalaf-btn-primary {
  background-color: var(--wafasalaf-yellow-light);
  color: var(--wafasalaf-gray-900);
}

.wafasalaf-btn-primary:hover {
  background-color: var(--wafasalaf-yellow);
}

/* Secondary Button (Cyan) */
.wafasalaf-btn-secondary {
  background-color: var(--wafasalaf-info);
  color: var(--wafasalaf-white);
}

.wafasalaf-btn-secondary:hover {
  background-color: var(--wafasalaf-primary);
}

/* Outlined Button */
.wafasalaf-btn-outlined {
  background-color: transparent;
  color: var(--wafasalaf-info);
  border: 2px solid var(--wafasalaf-info);
}

.wafasalaf-btn-outlined:hover {
  background-color: rgba(0, 188, 212, 0.08);
}

/* Ghost Button */
.wafasalaf-btn-ghost {
  background-color: transparent;
  color: var(--wafasalaf-gray-500);
  border: none;
}

.wafasalaf-btn-ghost:hover {
  background-color: rgba(0, 0, 0, 0.04);
  color: var(--wafasalaf-gray-700);
}

/* Danger Button */
.wafasalaf-btn-danger {
  background-color: var(--wafasalaf-error);
  color: var(--wafasalaf-white);
}

.wafasalaf-btn-danger:hover {
  background-color: #D32F2F;
}

/* ============================================================================
   5️⃣ FORM ELEMENTS
   ============================================================================ */

/* Checkbox */
.wafasalaf-checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--wafasalaf-space-sm);
  cursor: pointer;
}

.wafasalaf-checkbox input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--wafasalaf-info);
  border-radius: var(--wafasalaf-radius-sm);
  background-color: var(--wafasalaf-white);
  cursor: pointer;
  position: relative;
  transition: var(--wafasalaf-transition);
}

.wafasalaf-checkbox input[type="checkbox"]:checked {
  background-color: var(--wafasalaf-info);
  border-color: var(--wafasalaf-info);
}

.wafasalaf-checkbox input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--wafasalaf-white);
  font-size: 14px;
  font-weight: var(--wafasalaf-font-bold);
}

/* Radio Button */
.wafasalaf-radio {
  display: inline-flex;
  align-items: center;
  gap: var(--wafasalaf-space-sm);
  cursor: pointer;
}

.wafasalaf-radio input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--wafasalaf-gray-500);
  border-radius: var(--wafasalaf-radius-full);
  background-color: var(--wafasalaf-white);
  cursor: pointer;
  position: relative;
  transition: var(--wafasalaf-transition);
}

.wafasalaf-radio input[type="radio"]:checked {
  border-color: var(--wafasalaf-info);
}

.wafasalaf-radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: var(--wafasalaf-info);
  border-radius: var(--wafasalaf-radius-full);
}

/* Toggle Switch */
.wafasalaf-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.wafasalaf-toggle input[type="checkbox"] {
  appearance: none;
  position: relative;
  width: 60px;
  height: 30px;
  background-color: var(--wafasalaf-gray-300);
  border-radius: var(--wafasalaf-radius-full);
  cursor: pointer;
  transition: var(--wafasalaf-transition);
}

.wafasalaf-toggle input[type="checkbox"]::before {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  left: 2px;
  top: 2px;
  background-color: var(--wafasalaf-white);
  border-radius: var(--wafasalaf-radius-full);
  transition: var(--wafasalaf-transition);
}

.wafasalaf-toggle input[type="checkbox"]:checked {
  background-color: var(--wafasalaf-info);
}

.wafasalaf-toggle input[type="checkbox"]:checked::before {
  transform: translateX(30px);
}

/* ============================================================================
   6️⃣ NOTIFICATION BADGES
   ============================================================================ */

.wafasalaf-notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background-color: var(--wafasalaf-error);
  color: var(--wafasalaf-white);
  border-radius: var(--wafasalaf-radius-full);
  font-size: var(--wafasalaf-text-small);
  font-weight: var(--wafasalaf-font-bold);
}

.wafasalaf-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: var(--wafasalaf-radius-full);
}

.wafasalaf-dot-cyan { background-color: var(--wafasalaf-info); }
.wafasalaf-dot-blue { background-color: var(--wafasalaf-paid); }
.wafasalaf-dot-yellow { background-color: var(--wafasalaf-yellow); }
.wafasalaf-dot-red { background-color: var(--wafasalaf-error); }
.wafasalaf-dot-green { background-color: var(--wafasalaf-success); }

/* ============================================================================
   7️⃣ LOGO WAFASALAF
   ============================================================================ */

.wafasalaf-logo {
  display: flex;
  align-items: center;
  gap: var(--wafasalaf-space-md);
}

.wafasalaf-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--wafasalaf-yellow) 0%, var(--wafasalaf-info) 100%);
  border-radius: var(--wafasalaf-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.wafasalaf-logo-icon::after {
  content: '▶';
  color: var(--wafasalaf-white);
  font-size: 24px;
  transform: rotate(0deg);
}

.wafasalaf-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wafasalaf-logo-text-arabic {
  font-size: 18px;
  font-weight: var(--wafasalaf-font-bold);
  color: var(--wafasalaf-gray-900);
  direction: rtl;
}

.wafasalaf-logo-text-latin {
  font-size: 16px;
  font-weight: var(--wafasalaf-font-bold);
  color: var(--wafasalaf-primary);
}

/* ============================================================================
   8️⃣ CLASSES UTILITAIRES
   ============================================================================ */

/* Colors */
.text-primary { color: var(--wafasalaf-primary); }
.text-secondary { color: var(--wafasalaf-yellow); }
.text-success { color: var(--wafasalaf-success); }
.text-error { color: var(--wafasalaf-error); }
.text-info { color: var(--wafasalaf-info); }
.text-gray { color: var(--wafasalaf-gray-700); }

.bg-primary { background-color: var(--wafasalaf-primary); }
.bg-secondary { background-color: var(--wafasalaf-yellow); }
.bg-success { background-color: var(--wafasalaf-success); }
.bg-error { background-color: var(--wafasalaf-error); }
.bg-info { background-color: var(--wafasalaf-info); }
.bg-white { background-color: var(--wafasalaf-white); }
.bg-gray-100 { background-color: var(--wafasalaf-gray-100); }

/* Typography */
.font-bold { font-weight: var(--wafasalaf-font-bold); }
.font-semibold { font-weight: var(--wafasalaf-font-semibold); }
.font-medium { font-weight: var(--wafasalaf-font-medium); }

.text-xs { font-size: var(--wafasalaf-text-xs); }
.text-sm { font-size: var(--wafasalaf-text-small); }
.text-base { font-size: var(--wafasalaf-text-base); }
.text-lg { font-size: var(--wafasalaf-text-large); }
.text-xl { font-size: var(--wafasalaf-text-h4); }
.text-2xl { font-size: var(--wafasalaf-text-h2); }

/* Spacing */
.p-sm { padding: var(--wafasalaf-space-sm); }
.p-md { padding: var(--wafasalaf-space-md); }
.p-lg { padding: var(--wafasalaf-space-lg); }
.p-xl { padding: var(--wafasalaf-space-xl); }

.m-sm { margin: var(--wafasalaf-space-sm); }
.m-md { margin: var(--wafasalaf-space-md); }
.m-lg { margin: var(--wafasalaf-space-lg); }
.m-xl { margin: var(--wafasalaf-space-xl); }

.gap-sm { gap: var(--wafasalaf-space-sm); }
.gap-md { gap: var(--wafasalaf-space-md); }
.gap-lg { gap: var(--wafasalaf-space-lg); }

/* Display */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Alignment */
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

/* Borders */
.rounded-sm { border-radius: var(--wafasalaf-radius-sm); }
.rounded-md { border-radius: var(--wafasalaf-radius-md); }
.rounded-lg { border-radius: var(--wafasalaf-radius-lg); }
.rounded-xl { border-radius: var(--wafasalaf-radius-xl); }
.rounded-full { border-radius: var(--wafasalaf-radius-full); }

/* Shadows */
.shadow-sm { box-shadow: var(--wafasalaf-shadow-sm); }
.shadow-md { box-shadow: var(--wafasalaf-shadow-md); }
.shadow-lg { box-shadow: var(--wafasalaf-shadow-lg); }
.shadow-xl { box-shadow: var(--wafasalaf-shadow-xl); }

/* ============================================================================
   9️⃣ RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 640px) {
  .wafasalaf-logo-text-arabic {
    font-size: 16px;
  }
  
  .wafasalaf-logo-text-latin {
    font-size: 14px;
  }
  
  .wafasalaf-btn {
    padding: var(--wafasalaf-space-sm) var(--wafasalaf-space-lg);
    font-size: var(--wafasalaf-text-small);
  }
}

/* ============================================================================
   🔟 ACCESSIBILITY
   ============================================================================ */

*:focus-visible {
  outline: 2px solid var(--wafasalaf-primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================================
   END WAFASALAF UI DESIGN SYSTEM
   ============================================================================ */
