/**
 * GlamHub Beauty — Base Styles
 * Reset CSS + utilitaires globaux
 */

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display, inherit);
  line-height: 1.25;
  font-weight: 700;
}

/* ── Typography scale ───────────────────────────────────────────── */
.text-xs    { font-size: 0.75rem;  line-height: 1.4; }
.text-sm    { font-size: 0.875rem; line-height: 1.5; }
.text-base  { font-size: 1rem;     line-height: 1.6; }
.text-lg    { font-size: 1.125rem; line-height: 1.55; }
.text-xl    { font-size: 1.25rem;  line-height: 1.5; }
.text-2xl   { font-size: 1.5rem;   line-height: 1.4; }
.text-3xl   { font-size: 1.875rem; line-height: 1.35; }
.text-4xl   { font-size: 2.25rem;  line-height: 1.25; }
.text-5xl   { font-size: 3rem;     line-height: 1.2; }
.text-6xl   { font-size: 3.75rem;  line-height: 1.1; }

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

.text-muted    { color: var(--color-text-muted); }
.text-primary  { color: var(--color-primary); }
.text-success  { color: var(--color-success); }
.text-error    { color: var(--color-error); }
.text-warning  { color: var(--color-warning); }
.text-center   { text-align: center; }
.text-right    { text-align: right; }
.uppercase     { text-transform: uppercase; letter-spacing: 0.1em; }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Layout ─────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--content-max, 1200px);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.flex-wrap  { flex-wrap: wrap; }
.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-1  { gap: 0.25rem; }
.gap-2  { gap: 0.5rem; }
.gap-3  { gap: 0.75rem; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }
.flex-1 { flex: 1; }

.grid { display: grid; }

/* ── Spacing ────────────────────────────────────────────────────── */
.p-1  { padding: 0.25rem; }
.p-2  { padding: 0.5rem; }
.p-3  { padding: 0.75rem; }
.p-4  { padding: 1rem; }
.p-6  { padding: 1.5rem; }
.p-8  { padding: 2rem; }

.mt-1  { margin-top: 0.25rem; }
.mt-2  { margin-top: 0.5rem; }
.mt-3  { margin-top: 0.75rem; }
.mt-4  { margin-top: 1rem; }
.mt-6  { margin-top: 1.5rem; }
.mt-8  { margin-top: 2rem; }
.mb-2  { margin-bottom: 0.5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }

/* ── Card ───────────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.card-body {
  padding: 1.5rem;
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-btn, 8px);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--transition-fast, 0.15s ease);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-cta-text, #fff);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-hover, var(--color-primary));
  filter: brightness(0.92);
  box-shadow: var(--shadow-btn);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border-dark, var(--color-border));
}

.btn-secondary:hover {
  background: var(--color-surface-alt);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

.btn-danger {
  background: var(--color-error);
  color: #fff;
  border-color: var(--color-error);
}

.btn-danger:hover {
  filter: brightness(0.9);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.btn-icon {
  padding: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
}

/* ── Form elements ──────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-border-dark, var(--color-border));
  border-radius: var(--radius-sm, 6px);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.875rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light, rgba(108, 99, 255, 0.1));
}

.form-input::placeholder {
  color: var(--color-text-light, var(--color-text-muted));
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--color-error);
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ── Badge ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full, 50px);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.badge-success  { background: var(--color-success-bg); color: var(--color-success); }
.badge-error    { background: var(--color-error-bg);   color: var(--color-error);   }
.badge-warning  { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-info     { background: var(--color-info-bg);    color: var(--color-info);    }
.badge-default  { background: var(--color-surface-alt); color: var(--color-text-muted); }

/* ── Table ──────────────────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: var(--color-surface-alt);
}

/* ── Overlay / Modal ────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-modal);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ── Loading skeleton ───────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-surface-alt) 25%,
    var(--color-border) 50%,
    var(--color-surface-alt) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

/* ── Spinner ────────────────────────────────────────────────────── */
.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── Empty state ────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--color-text-muted);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.empty-state p {
  font-size: 0.875rem;
}

/* ── Divider ────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: 1.5rem 0;
}

/* ── Hidden ─────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.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;
}

/* ── Scrollbar custom ───────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-border-dark, #D0D5DD);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* ── Media queries ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container {
    padding-inline: 1rem;
  }
  .hide-mobile { display: none !important; }
}

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

/* ── Scroll-triggered Reveal ─────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity .7s cubic-bezier(.16,1,.3,1),
    transform .7s cubic-bezier(.16,1,.3,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: .08s }
.reveal[data-delay="2"] { transition-delay: .16s }
.reveal[data-delay="3"] { transition-delay: .24s }
.reveal[data-delay="4"] { transition-delay: .32s }
.reveal[data-delay="5"] { transition-delay: .40s }
.reveal[data-delay="6"] { transition-delay: .48s }

/* ── Masonry grid ───────────────────────────── */
.gallery-masonry {
  columns: 3;
  column-gap: 1rem;
}
@media (max-width: 900px) {
  .gallery-masonry { columns: 2 }
}
@media (max-width: 500px) {
  .gallery-masonry { columns: 1 }
}
.gallery-masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius-card, 12px);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: block;
}
.gallery-masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .5s cubic-bezier(.16,1,.3,1);
}
.gallery-masonry-item:hover img {
  transform: scale(1.04);
}
.gallery-masonry-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg, transparent 50%,
    rgba(0,0,0,.45) 100%
  );
  opacity: 0;
  transition: opacity .3s;
}
.gallery-masonry-item:hover::after {
  opacity: 1;
}

/* ── Transparent header ─────────────────────── */
.vitrine-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition:
    background .35s ease,
    backdrop-filter .35s ease,
    box-shadow .35s ease;
  background: transparent;
  backdrop-filter: none;
}
.vitrine-nav.scrolled {
  background: rgba(var(--nav-bg-rgb, 255,255,255), .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
[data-theme="venue-palais"] .vitrine-nav.scrolled,
[data-theme="noir-gold"] .vitrine-nav.scrolled,
[data-theme="neon-salon"] .vitrine-nav.scrolled,
[data-theme="bridal-somptueux"] .vitrine-nav.scrolled,
[data-theme="obsidian-luxe"] .vitrine-nav.scrolled,
[data-theme="nuit-violette"] .vitrine-nav.scrolled {
  background: rgba(10,8,22,.88);
}

/* ── Lightbox ───────────────────────────────── */
.glamhub-lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
  visibility: hidden;
}
.glamhub-lightbox.open,
.glamhub-lightbox.active,
.glamhub-lightbox[style*="block"],
.glamhub-lightbox[style*="flex"] {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
}
.glamhub-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}
.glamhub-lightbox-close {
  position: fixed;
  top: 1.25rem; right: 1.25rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: none; color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.glamhub-lightbox-nav {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: 1.25rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.glamhub-lightbox-nav:hover {
  background: rgba(255,255,255,.2);
}
.glamhub-lightbox-prev { left: 1rem }
.glamhub-lightbox-next { right: 1rem }

/* ── Premium Calendar ───────────────────────── */
.gcal-wrap {
  background: var(--color-surface, #fff);
  border-radius: 20px;
  border: 1px solid var(--color-border, #EAECF0);
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
  overflow: hidden;
  font-family: var(--font-body, 'Inter', sans-serif);
}
.gcal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border, #EAECF0);
}
.gcal-month-label {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text, #101828);
}
.gcal-nav-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border, #EAECF0);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted, #667085);
  transition: all .15s;
}
.gcal-nav-btn:hover {
  background: var(--color-secondary, #F4F3FF);
  color: var(--color-primary, #8B5CF6);
  border-color: var(--color-primary, #8B5CF6);
}
.gcal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.gcal-weekday {
  padding: .75rem .25rem;
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  color: var(--color-text-muted, #667085);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--color-border, #EAECF0);
}
.gcal-day {
  position: relative;
  aspect-ratio: 1/1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  margin: 3px;
  transition: background .15s, transform .1s;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--color-text, #101828);
}
.gcal-day:hover:not(.gcal-day--disabled):not(.gcal-day--past) {
  background: var(--color-secondary, #F4F3FF);
  transform: scale(1.05);
}
.gcal-day--today {
  font-weight: 800;
  color: var(--color-primary, #8B5CF6);
}
.gcal-day--today::before {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--color-primary, #8B5CF6);
}
.gcal-day--selected {
  background: var(--color-primary, #8B5CF6) !important;
  color: #fff !important;
  font-weight: 700;
}
.gcal-day--available .gcal-dot {
  background: #10B981;
}
.gcal-day--pending .gcal-dot {
  background: #F59E0B;
}
.gcal-day--reserved {
  cursor: not-allowed !important;
  opacity: .65;
}
.gcal-day--reserved .gcal-dot {
  background: #EF4444;
}
.gcal-day--blocked {
  cursor: not-allowed !important;
  opacity: .45;
  text-decoration: line-through;
}
.gcal-day--blocked .gcal-dot {
  background: #9CA3AF;
}
.gcal-day--past {
  opacity: .35;
  cursor: default;
}
.gcal-day--disabled {
  cursor: not-allowed;
  opacity: .3;
}
.gcal-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  position: absolute;
  bottom: 5px;
}
.gcal-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .875rem 1.5rem;
  border-top: 1px solid var(--color-border, #EAECF0);
}
.gcal-legend-item {
  display: flex;
  align-items: center;
  gap: .375rem;
  font-size: .75rem;
  color: var(--color-text-muted, #667085);
  font-weight: 500;
}
.gcal-legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
