/* ============================================================
   ECOCUVERIE — BASE
   Reset léger + typographie de base + utilitaires
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  color: var(--fg-default);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

button { font: inherit; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

a { color: var(--fg-link); text-decoration: none; transition: color var(--dur-fast) var(--ease-out-quart); }
a:hover { color: var(--color-burgundy-800); }

::selection { background: var(--color-forest-800); color: var(--color-cream); }

/* ------- TYPOGRAPHIE ------- */

.t-display, .t-h1, .t-h2, .t-h3, .t-h4, .t-h5 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
  color: var(--fg-default);
  margin: 0;
  font-variation-settings: var(--fraunces-h);
}

.t-display {
  font-size: var(--fs-display);
  font-variation-settings: var(--fraunces-display);
  letter-spacing: -0.03em;
}
.t-h1 { font-size: var(--fs-h1); }
.t-h2 { font-size: var(--fs-h2); line-height: var(--lh-snug); }
.t-h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); letter-spacing: var(--tracking-snug); }
.t-h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); letter-spacing: var(--tracking-snug); }
.t-h5 { font-size: var(--fs-h5); line-height: 1.35; letter-spacing: 0; font-weight: 500; }

.t-body-lg { font-size: var(--fs-body-lg); line-height: var(--lh-relaxed); color: var(--fg-default); }
.t-body    { font-size: var(--fs-body);    line-height: var(--lh-base); }
.t-body-sm { font-size: var(--fs-body-sm); line-height: var(--lh-base); }
.t-caption { font-size: var(--fs-caption); line-height: 1.4; color: var(--fg-muted); }
.t-muted   { color: var(--fg-muted); }
.t-subtle  { color: var(--fg-subtle); }
.t-mono    { font-family: var(--font-mono); font-size: 0.85em; letter-spacing: 0; }

.t-eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0;
}

.t-eyebrow.is-accent { color: var(--color-burgundy-800); }
.t-eyebrow.is-copper { color: var(--color-copper-700); }

.t-italic-serif {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 72, "SOFT" 100, "wght" 400;
}

p { margin: 0 0 var(--space-4); max-width: 68ch; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }
li { margin-bottom: var(--space-1); }

hr {
  border: 0;
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-12) 0;
}

/* ------- LAYOUT PRIMITIVES ------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container-narrow {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: clamp(4rem, 8vw, 8rem);
}

.section-sm {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.stack > * + * { margin-top: var(--stack-gap, var(--space-4)); }
.stack-2 { --stack-gap: var(--space-2); }
.stack-3 { --stack-gap: var(--space-3); }
.stack-4 { --stack-gap: var(--space-4); }
.stack-6 { --stack-gap: var(--space-6); }
.stack-8 { --stack-gap: var(--space-8); }
.stack-12 { --stack-gap: var(--space-12); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--cluster-gap, var(--space-3)); align-items: center; }
.cluster-2 { --cluster-gap: var(--space-2); }
.cluster-4 { --cluster-gap: var(--space-4); }
.cluster-6 { --cluster-gap: var(--space-6); }

.grid { display: grid; gap: var(--grid-gap, var(--space-6)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(var(--grid-min, 240px), 1fr)); }

@media (max-width: 1024px) {
  .grid-3, .grid-4, .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

.hidden { display: none; }

/* ------- FOCUS ------- */

:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* ------- DECORATIVE ------- */

.divider-rule {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--fg-muted);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}
.divider-rule::before, .divider-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.glyph-bullet {
  width: 4px; height: 4px;
  background: var(--color-burgundy-800);
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
