/* ============================================================================
   Idealys — BASE
   Reset, body, container, typographie globale, utilitaires
   ============================================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Grain overlay (subtil, présent partout) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-grain);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.025 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.5;
}

/* Liens : par défaut, on évite la décoration native — chaque composant gère */
a {
  color: inherit;
  text-decoration: none;
}

/* Images responsive par défaut */
img,
svg {
  max-width: 100%;
  display: block;
}

/* === Typographie === */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-1);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.1;
}

h3 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h4 {
  font-size: 18px;
  font-weight: 600;
}

/* L'em italique vert est la signature typographique Idealys */
h1 em,
h2 em,
h3 em,
h4 em {
  font-style: italic;
  color: var(--green);
}

p {
  color: var(--text-2);
}

.subtitle {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 640px;
}

@media (max-width: 768px) {
  .subtitle { font-size: 15px; }
}

/* === Container === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: var(--z-content);
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

/* === Section === */
section {
  position: relative;
  padding: 96px 0 64px;
  z-index: var(--z-content);
}

section + section {
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  section { padding: 64px 0 48px; }
}

/* === Utilitaires === */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-mono { font-family: var(--mono); }
.text-accent { color: var(--green); }
.text-muted { color: var(--text-3); }

.flex { display: flex; }
.grid { display: grid; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
