/* ============================================
   DAKHLA INVEST AGENCY - UTILITIES
   ============================================ */

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

.container-narrow {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Flex utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Grid utilities */
.grid {
  display: grid;
}

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

/* Text utilities */
.text-center { text-align: center; }
.text-start { text-align: start; }
.text-end { text-align: end; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }

.font-titre { font-family: var(--font-titre); }
.font-corps { font-family: var(--font-corps); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.leading-tight { line-height: var(--leading-tight); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }

/* Color utilities */
.text-bleu { color: var(--bleu-marine); }
.text-or { color: var(--or-saharien); }
.text-vert { color: var(--vert-lagon); }
.text-blanc { color: var(--blanc-pur); }
.text-gris { color: var(--gris-texte); }
.text-gris-moyen { color: var(--gris-moyen); }

.bg-bleu { background-color: var(--bleu-marine); }
.bg-bleu-light { background-color: var(--bleu-marine-light); }
.bg-or { background-color: var(--or-saharien); }
.bg-vert { background-color: var(--vert-lagon); }
.bg-blanc { background-color: var(--blanc-pur); }
.bg-casse { background-color: var(--blanc-casse); }
.bg-gris { background-color: var(--gris-leger); }
.bg-white { background-color: var(--blanc-pur); }

/* Spacing utilities */
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }
.mt-20 { margin-top: var(--space-20); }

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }
.mb-20 { margin-bottom: var(--space-20); }

.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }
.py-20 { padding-top: var(--space-20); padding-bottom: var(--space-20); }
.py-24 { padding-top: var(--space-24); padding-bottom: var(--space-24); }

.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }

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

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

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

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

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Width/Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Object fit */
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Transition */
.transition { transition: all var(--transition-base); }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--gris-leger) 25%, var(--blanc-pur) 50%, var(--gris-leger) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Badge base */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
}

.badge-nouveau { background: var(--succes-light); color: var(--status-nouveau); }
.badge-exclusif { background: rgba(201, 169, 110, 0.12); color: var(--status-exclusif); }
.badge-offplan { background: rgba(26, 26, 46, 0.08); color: var(--status-offplan); }
.badge-vendu { background: var(--erreur-light); color: var(--status-vendu); }
.badge-reserve { background: rgba(253, 126, 20, 0.12); color: var(--status-reserve); }
.badge-verifie { background: var(--succes-light); color: var(--succes); }

/* Section styling */
.section {
  padding: var(--space-20) 0;
}

.section-alt {
  background-color: var(--blanc-casse);
}

.section-title {
  font-family: var(--font-titre);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--bleu-marine);
  margin-bottom: var(--space-4);
  line-height: var(--leading-tight);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--gris-moyen);
  margin-bottom: var(--space-12);
  max-width: 600px;
}

/* Divider */
.divider {
  width: 60px;
  height: 3px;
  background: var(--or-saharien);
  margin: var(--space-4) 0 var(--space-8);
}

.divider-center {
  margin-left: auto;
  margin-right: auto;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5 {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: var(--space-12) 0;
  }
  
  .section-title {
    font-size: var(--text-3xl);
  }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* RTL Utilities */
[dir="rtl"] .text-start { text-align: right; }
[dir="rtl"] .text-end { text-align: left; }
[dir="rtl"] .ml-auto { margin-left: unset; margin-right: auto; }
[dir="rtl"] .mr-auto { margin-right: unset; margin-left: auto; }
