/* utils.css — UTILITIES: spacing, alignment, and small layout helpers.
   Loaded LAST so a utility can override a component's default when needed. */

/* --- Existing layout helpers (moved out of app.css) --- */
.muted { color: var(--muted); }
.d-none { display: none; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; }
.grid-2 { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.grid-2 > * { flex: 1 1 320px; }
.grid-2 > *:first-child { flex: 2 1 440px; }
.kv { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--line-soft); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; color: var(--ink); }

/* --- Display & flexbox --- */
.flex      { display: flex; }
.inline-flex { display: inline-flex; }
.block     { display: block; }
.hidden    { display: none; }
.flex-col  { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.grow      { flex: 1; }
.items-start   { align-items: flex-start; }
.items-center  { align-items: center; }
.items-end     { align-items: flex-end; }
.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

/* --- Text alignment --- */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* --- Text size --- */
.text-xs { font-size: 11px; }

/* --- Gap (4px scale) --- */
.gap-0 { gap: 0; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }

/* --- Margin (4px scale) --- */
.m-0 { margin: 0; }    
.m-auto { margin: auto; }
.mt-0 { margin-top: 0; }     
.mt-1 { margin-top: 4px; }  
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }  
.mt-4 { margin-top: 16px; } 
.mt-5 { margin-top: 20px; } 
.mt-6 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }     
.mb-1 { margin-bottom: 4px; }  
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }  
.mb-4 { margin-bottom: 16px; } 
.mb-5 { margin-bottom: 20px; } 
.mb-6 { margin-bottom: 24px; }
.ml-1 { margin-left: 4px; }  
.ml-2 { margin-left: 8px; }  
.ml-auto { margin-left: auto; }
.mr-1 { margin-right: 4px; } 
.mr-2 { margin-right: 8px; } 
.mr-auto { margin-right: auto; }

/* --- Padding (4px scale) --- */
.p-0 { padding: 0; }    
.p-2 { padding: 8px; }  
.p-3 { padding: 12px; } 
.p-4 { padding: 16px; } 
.p-5 { padding: 20px; } 
.p-6 { padding: 24px; }
.px-2 { padding-left: 8px; padding-right: 8px; }   
.px-3 { padding-left: 12px; padding-right: 12px; } 
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }   
.py-3 { padding-top: 12px; padding-bottom: 12px; } 
.py-4 { padding-top: 16px; padding-bottom: 16px; }

/* --- Width --- */
.w-full { width: 100%; }

/* --- cursor --- */
.pointer { cursor: pointer; }
.no-select { user-select: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Force uppercase display (carpet attribute values: nature / collection / design / couleur) */
.uppercase { text-transform: uppercase; }
