/* ==========================================================================
   ATELIER LUMIÈRE — Minimalist Luxury Black & White Design System
   ========================================================================== */

:root {
  --bg-canvas: #ffffff;
  --bg-subtle: #faf9f7;
  --bg-muted: #f3f1ed;
  --bg-hover: #f6f5f2;
  --bg-obsidian: #0d0d0d;
  --bg-charcoal: #191919;

  --ink-primary: #0d0d0d;
  --ink-secondary: #4a4947;
  --ink-muted: #84817c;
  --ink-faint: #b5b2ac;
  --ink-inverse: #ffffff;
  --ink-inverse-muted: rgba(255, 255, 255, 0.65);

  --border-hairline: #e8e6e1;
  --border-subtle: #efede8;
  --border-input: #d9d6cf;
  --border-strong: #0d0d0d;

  --font-serif: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-none: 0px;
  --radius-xs: 2px;
  --radius-sm: 4px;

  --ease-editorial: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-subtle: 0 8px 30px rgba(13, 13, 13, 0.05);
  --shadow-modal: 0 24px 64px rgba(13, 13, 13, 0.16);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--ink-primary);
  background: var(--bg-canvas);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

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

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

/* Typography helpers */
.font-serif {
  font-family: var(--font-serif);
}

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  transition: all 0.28s var(--ease-editorial);
  white-space: nowrap;
  line-height: 1;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn-primary {
  background: var(--bg-obsidian);
  color: var(--ink-inverse);
  border-color: var(--bg-obsidian);
}

.btn-primary:hover {
  background: #282828;
  border-color: #282828;
}

.btn-outline {
  background: transparent;
  color: var(--ink-primary);
  border-color: var(--border-input);
}

.btn-outline:hover {
  border-color: var(--ink-primary);
  background: var(--bg-obsidian);
  color: var(--ink-inverse);
}

.btn-outline-dark {
  background: transparent;
  color: var(--ink-primary);
  border-color: var(--ink-primary);
}

.btn-outline-dark:hover {
  background: var(--bg-obsidian);
  color: var(--ink-inverse);
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-inverse);
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}

.btn-outline-light:hover {
  background: var(--ink-inverse);
  color: var(--ink-primary);
  border-color: var(--ink-inverse);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
  padding: 0.55rem 0.85rem;
}

.btn-ghost:hover {
  background: var(--bg-muted);
  color: var(--ink-primary);
}

.btn-danger-ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--border-hairline);
}

.btn-danger-ghost:hover {
  background: var(--bg-obsidian);
  color: var(--ink-inverse);
  border-color: var(--bg-obsidian);
}

.btn-sm {
  padding: 0.52rem 0.95rem;
  font-size: 0.72rem;
}

.btn-lg {
  padding: 0.95rem 1.85rem;
  font-size: 0.8rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-hairline);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-primary);
  background: var(--bg-canvas);
  transition: all 0.22s var(--ease-editorial);
}

.btn-icon:hover {
  border-color: var(--ink-primary);
  background: var(--bg-obsidian);
  color: var(--ink-inverse);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

/* Form Elements */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.input, .textarea, .select {
  width: 100%;
  padding: 0.72rem 0.9rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  color: var(--ink-primary);
  transition: border-color 0.2s ease, background 0.2s ease;
  outline: none;
}

.input:focus, .textarea:focus, .select:focus {
  border-color: var(--ink-primary);
  background: var(--bg-canvas);
}

.input::placeholder, .textarea::placeholder {
  color: var(--ink-faint);
}

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

.select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230d0d0d' stroke-width='1.8'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.3rem;
}

/* Monochrome Switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-hairline);
  background: var(--bg-canvas);
  border-radius: var(--radius-xs);
}

.toggle-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-primary);
}

.toggle-desc {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 23px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  background: #dfdcd6;
  border-radius: 999px;
  transition: background 0.24s var(--ease-editorial);
  cursor: pointer;
}

.switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.24s var(--ease-editorial);
}

.switch input:checked + .switch-track {
  background: var(--bg-obsidian);
}

.switch input:checked + .switch-track::after {
  transform: translateX(19px);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-hairline);
  color: var(--ink-secondary);
  background: var(--bg-subtle);
}

.badge-dark {
  background: var(--bg-obsidian);
  color: var(--ink-inverse);
  border-color: var(--bg-obsidian);
}

.badge-outline {
  background: transparent;
  border-color: var(--ink-primary);
  color: var(--ink-primary);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 260px;
  max-width: 400px;
  padding: 0.9rem 1.15rem;
  background: var(--bg-obsidian);
  color: var(--ink-inverse);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xs);
  font-size: 0.84rem;
  line-height: 1.45;
  box-shadow: var(--shadow-modal);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  animation: toastIn 0.3s var(--ease-editorial);
}

.toast-error {
  background: #1f1414;
  border-color: rgba(255, 255, 255, 0.24);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal Base */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 13, 13, 0.62);
  backdrop-filter: blur(4px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-modal);
  animation: slideUp 0.28s var(--ease-editorial);
}

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

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.modal-body {
  padding: 1.5rem 1.6rem;
}

.modal-footer {
  padding: 1.15rem 1.6rem;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  background: var(--bg-subtle);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

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

.hidden {
  display: none !important;
}

/* ==========================================================================
   Luxury Monochrome Language Switcher (ID / EN)
   ========================================================================== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-xs);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  color: var(--ink-secondary);
  background: transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.lang-switch .lang-btn {
  padding: 0.14rem 0.22rem;
  font-size: inherit;
  font-weight: 500;
  letter-spacing: inherit;
  color: inherit;
  opacity: 0.52;
  transition: opacity 0.2s ease;
  line-height: 1;
}

.lang-switch .lang-btn:hover {
  opacity: 0.85;
}

.lang-switch .lang-btn.active {
  opacity: 1;
  font-weight: 700;
}

.lang-switch .lang-sep {
  opacity: 0.28;
  font-size: 0.64rem;
  user-select: none;
}

/* Adapts dynamically to current text color (ideal for dual-state headers & themes) */
.lang-switch-header {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.site-header.scrolled .lang-switch-header {
  border-color: var(--border-input);
  color: var(--ink-primary);
}

.lang-switch-light {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  background: rgba(13, 13, 13, 0.25);
  backdrop-filter: blur(8px);
}

.lang-switch-dark {
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.lang-switch-subtle {
  border-color: var(--border-hairline);
  color: var(--ink-primary);
}
