/* ── AWASE · base.css ─────────────────────────────────────────── */

:root,
[data-theme='light'] {
  /* Surfaces — ivoire chaud */
  --color-bg: #f6f3ee;
  --color-surface: #fbf9f5;
  --color-surface-2: #ffffff;
  --color-surface-offset: #efeae2;
  --color-surface-offset-2: #e7e1d7;
  --color-divider: #ddd6cb;
  --color-border: #cec6b9;

  /* Texte — encre */
  --color-text: #14130f;
  --color-text-muted: #6a655c;
  --color-text-faint: #a49d92;
  --color-text-inverse: #f6f3ee;

  /* Accent — bronze sourd */
  --color-primary: #7b6438;
  --color-primary-hover: #5e4c29;
  --color-primary-active: #43371d;
  --color-primary-highlight: #e6dfd0;

  /* Encre profonde (bandeaux) */
  --color-ink: #14130f;
  --color-ink-soft: #1e1c17;

  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-full: 9999px;

  --transition-interactive: 220ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 6px 20px oklch(0.2 0.01 80 / 0.09);
  --shadow-lg: 0 18px 48px oklch(0.2 0.01 80 / 0.14);

  --content-narrow: 660px;
  --content-default: 1020px;
  --content-wide: 1240px;

  /* Type */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-lg: clamp(1.25rem, 1rem + 0.75vw, 1.625rem);
  --text-xl: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem);
  --text-2xl: clamp(2.25rem, 1.2rem + 2.6vw, 3.75rem);
  --text-hero: clamp(2.75rem, 1rem + 5.4vw, 5.75rem);

  --font-display: 'Boska', 'EB Garamond', Georgia, serif;
  --font-body: 'Switzer', 'Helvetica Neue', Arial, sans-serif;

  /* Espacements */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

[data-theme='dark'] {
  --color-bg: #131210;
  --color-surface: #191713;
  --color-surface-2: #1e1c18;
  --color-surface-offset: #1b1915;
  --color-surface-offset-2: #23211c;
  --color-divider: #262420;
  --color-border: #3a3730;
  --color-text: #e8e3da;
  --color-text-muted: #97907f;
  --color-text-faint: #6a6559;
  --color-text-inverse: #14130f;
  --color-primary: #c8a86a;
  --color-primary-hover: #d9bd85;
  --color-primary-active: #e6d0a4;
  --color-primary-highlight: #2b2620;
  --color-ink: #0e0d0b;
  --color-ink-soft: #161512;
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.4);
  --shadow-md: 0 6px 20px oklch(0 0 0 / 0.45);
  --shadow-lg: 0 18px 48px oklch(0 0 0 / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #131210;
    --color-surface: #191713;
    --color-text: #e8e3da;
    --color-text-muted: #97907f;
    --color-primary: #c8a86a;
  }
}

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

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-20);
}

body {
  min-height: 100dvh;
  line-height: 1.65;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
}

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

h1,
h2,
h3,
h4 {
  text-wrap: balance;
  line-height: 1.1;
  font-weight: 400;
}

p,
li,
figcaption,
dd {
  text-wrap: pretty;
}

a {
  color: inherit;
}

::selection {
  background: color-mix(in oklab, var(--color-primary) 30%, transparent);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

a,
button,
[role='button'],
input,
textarea,
select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    opacity var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
