/* ==========================================================
   WeddingPart – utilities.css
   Classes utilitaires atomiques
   ========================================================== */

/* --- Display --- */
.d-flex       { display: flex; }
.d-grid       { display: grid; }
.d-block      { display: block; }
.d-inline     { display: inline; }
.d-inline-flex{ display: inline-flex; }
.d-none       { display: none !important; }

/* --- Flex --- */
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1; }
.flex-shrink-0{ flex-shrink: 0; }
.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-end  { justify-content: flex-end; }

/* --- Gap --- */
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }

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

/* --- Font size --- */
.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); }

/* --- Font weight --- */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semi   { font-weight: 600; }
.font-bold   { font-weight: 700; }
.font-serif  { font-family: var(--font-serif); }
.font-italic { font-style: italic; }

/* --- Text colors --- */
.text-brand  { color: var(--wp-brand); }
.text-gold   { color: var(--wp-gold); }
.text-sage   { color: var(--wp-sage); }
.text-ink    { color: var(--wp-ink); }
.text-soft   { color: var(--wp-soft); }
.text-muted  { color: var(--wp-muted); }
.text-white  { color: var(--wp-surface); }

/* --- Background colors --- */
.bg-white   { background-color: var(--wp-surface); }
.bg-ivory   { background-color: var(--wp-bg); }
.bg-blush   { background-color: var(--wp-brand-light); }
.bg-gold    { background-color: var(--wp-gold-light); }
.bg-sage    { background-color: var(--wp-sage-light); }
.bg-brand   { background-color: var(--wp-brand); }
.bg-surface { background-color: var(--wp-surface-2); }

/* --- Spacing (margin) --- */
.m-0  { margin: 0; }
.mt-0 { margin-top: 0; }
.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-10{ margin-top: var(--space-10); }
.mt-12{ margin-top: var(--space-12); }
.mt-16{ margin-top: var(--space-16); }
.mb-0 { margin-bottom: 0; }
.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-10{ margin-bottom: var(--space-10); }
.mb-12{ margin-bottom: var(--space-12); }
.mx-auto { margin-inline: auto; }

/* --- Spacing (padding) --- */
.p-0  { padding: 0; }
.p-4  { padding: var(--space-4); }
.p-6  { padding: var(--space-6); }
.p-8  { padding: var(--space-8); }
.py-4 { padding-block: var(--space-4); }
.py-6 { padding-block: var(--space-6); }
.py-8 { padding-block: var(--space-8); }
.py-12{ padding-block: var(--space-12); }
.px-4 { padding-inline: var(--space-4); }
.px-6 { padding-inline: var(--space-6); }
.px-8 { padding-inline: 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-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); }

/* --- Width / Max-width --- */
.w-full   { width: 100%; }
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 800px; }
.max-w-prose { max-width: 65ch; }

/* --- Position --- */
.relative { position: relative; }
.absolute { position: absolute; }

/* --- Overflow --- */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Wrapper standard pour les <table> qui debordent sur mobile (WCAG / pratique
   responsive). Usage : <div class="table-scroll"><table>...</table></div>. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  scrollbar-width: thin;
}
.table-scroll > table { min-width: 600px; }
@media (min-width: 768px) {
  .table-scroll > table { min-width: 0; width: 100%; }
}

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

/* --- Responsive visibility --- */
@media (max-width: 768px)  { .hide-mobile { display: none !important; } }
@media (min-width: 769px)  { .show-mobile { display: none !important; } }
@media (max-width: 1024px) { .hide-tablet { display: none !important; } }

/* --- Divider --- */
.divider {
  border: 0;
  height: 1px;
  background: var(--wp-line);
  margin-block: var(--space-8);
}
.divider--brand {
  background: linear-gradient(90deg, transparent, var(--wp-brand-border), transparent);
}

/* --- Ornement décoratif typographique --- */
.ornament {
  display: block;
  text-align: center;
  color: var(--wp-brand-light);
  font-family: var(--font-serif);
  font-size: 2rem; /* TODO: tokenize — 32px hors scale typo */
  line-height: 1;
  letter-spacing: .3em;
  margin-block: var(--space-4);
  user-select: none;
}

/* --- Truncate texte --- */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Visually hidden (accessibilité) --- */
.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;
}

/* --- Animation entrée --- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fade-up .5s var(--ease) both; }
.delay-100 { animation-delay: .1s; }
.delay-200 { animation-delay: .2s; }
.delay-300 { animation-delay: .3s; }
