/* ═══════════════════════════════════════════════════════════
   IAfluence Design System — Base
   Reset, typographie, layout, helpers
   ═══════════════════════════════════════════════════════════ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  cursor: pointer;
}

a {
  color: var(--color-text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-text-link-hover);
}

ul, ol {
  list-style: none;
}

/* ── Typographie ─────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

h1 {
  font-size: var(--heading-1);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--heading-2);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--heading-3);
}

h4 {
  font-size: var(--heading-4);
}

h5 {
  font-size: var(--heading-5);
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

/* ── Layout ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: var(--space-16) 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-title h2 {
  margin-bottom: var(--space-2);
}

.section-title p {
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Grid helpers ────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Spacing utilities ───────────────────────────────── */
.mt-0  { margin-top: 0; }
.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }

.mb-0  { margin-bottom: 0; }
.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

.mx-auto { margin-left: auto; margin-right: auto; }

.p-4  { padding: var(--space-4); }
.p-6  { padding: var(--space-6); }
.p-8  { padding: var(--space-8); }

/* ── Visibility ──────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden { display: none; }
.block  { display: block; }
.inline-block { display: inline-block; }

/* ── Text alignment ──────────────────────────────────── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* ── Section page titles (about, services, contact, etc.) ─── */
.page-header {
  padding: calc(var(--header-height) + var(--space-12)) 0 var(--space-12);
  text-align: center;
  background: var(--gradient-hero);
  color: var(--color-text-inverse);
}

.page-header h1 {
  color: var(--color-text-inverse);
  margin-bottom: var(--space-2);
}

.page-header p {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto;
}
