/* Mon Site Artisan — base.css : reset + variables + grille typo communes */

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

:root {
  /* Couleurs par défaut — surchargées par chaque thème métier */
  --color-bg: #ffffff;
  --color-surface: #fafafa;
  --color-border: #e5e7eb;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-primary: #0f172a;
  --color-accent: #b45309;
  --color-accent-soft: rgba(180, 83, 9, 0.1);
  --color-on-primary: #ffffff;
  --color-on-accent: #ffffff;
  --color-success: #16a34a;

  /* Typo */
  --font-heading: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.1875rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.875rem;
  --fs-2xl: 2.5rem;
  --fs-3xl: clamp(2.25rem, 5vw + 1rem, 4.25rem);
  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-normal: 1.6;
  --tracking-tight: -0.02em;
  --tracking-snug: -0.01em;

  /* Espace */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4.5rem;
  --space-12: 6rem;
  --space-16: 8rem;

  /* Radius + ombres */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 14px 40px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);

  /* Layout */
  --container-max: 1180px;
  --container-narrow: 760px;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); letter-spacing: var(--tracking-snug); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); font-weight: 600; }

p { line-height: var(--lh-normal); color: var(--color-text); }
p + p { margin-top: var(--space-3); }

a { color: var(--color-accent); text-decoration: none; transition: opacity 0.15s ease; }
a:hover { opacity: 0.75; }
a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

ul, ol { padding-left: 1.25rem; line-height: var(--lh-normal); }
li + li { margin-top: var(--space-2); }

button { font: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }

input, textarea, select {
  font: inherit;
  color: inherit;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
  border-color: var(--color-accent);
}

/* Conteneurs */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.container.narrow { max-width: var(--container-narrow); }

/* Sections */
section { padding-block: clamp(var(--space-10), 8vw, var(--space-16)); }

/* 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;
}

/* Préférences utilisateur */
@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;
  }
}
