/* ==========================================================================
   Milodomain.com — Design System (Swiss / Editorial)
   Palette : monochrome strict + bleu CTA
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ---------- Couleurs — monochrome ---------- */
  --zinc-950: #09090B;
  --zinc-900: #18181B;
  --zinc-800: #27272A;
  --zinc-700: #3F3F46;
  --zinc-600: #52525B;
  --zinc-500: #71717A;
  --zinc-400: #A1A1AA;
  --zinc-300: #D4D4D8;
  --zinc-200: #E4E4E7;
  --zinc-100: #F4F4F5;
  --zinc-50:  #FAFAFA;
  --white:    #FFFFFF;

  /* ---------- Accent (bleu CTA) ---------- */
  --accent:       #2563EB;
  --accent-hover: #1D4ED8;
  --accent-soft:  #EFF6FF;
  --accent-line:  #DBEAFE;

  /* ---------- Sémantique ---------- */
  --success: #16A34A;
  --success-soft: #F0FDF4;
  --warning: #CA8A04;
  --warning-soft: #FEFCE8;
  --danger:  #DC2626;
  --danger-soft: #FEF2F2;

  /* ---------- Surfaces ---------- */
  --bg:            var(--zinc-50);
  --bg-elevated:   var(--white);
  --bg-subtle:     var(--zinc-100);
  --bg-inverted:   var(--zinc-950);

  --surface:       var(--white);
  --surface-hover: var(--zinc-50);
  --surface-alt:   var(--zinc-100);

  --text:           var(--zinc-950);
  --text-secondary: var(--zinc-700);
  --text-muted:     var(--zinc-500);
  --text-subtle:    var(--zinc-400);
  --text-invert:    var(--white);

  --border:        var(--zinc-200);
  --border-strong: var(--zinc-300);
  --border-subtle: var(--zinc-100);

  /* ---------- Typographie ---------- */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --fs-xs:   0.75rem;   /* 12 */
  --fs-sm:   0.875rem;  /* 14 */
  --fs-base: 1rem;      /* 16 */
  --fs-lg:   1.125rem;  /* 18 */
  --fs-xl:   1.25rem;   /* 20 */
  --fs-2xl:  1.5rem;    /* 24 */
  --fs-3xl:  1.875rem;  /* 30 */
  --fs-4xl:  2.25rem;   /* 36 */
  --fs-5xl:  3rem;      /* 48 */
  --fs-6xl:  3.75rem;   /* 60 */
  --fs-7xl:  4.5rem;    /* 72 */

  --lh-tight:   1.1;
  --lh-snug:    1.3;
  --lh-base:    1.55;
  --lh-relaxed: 1.7;

  --tracking-tight:  -0.025em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-wider:  0.08em;
  --tracking-widest: 0.16em;

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

  /* ---------- Radii (Swiss : conservateur) ---------- */
  --radius-sm:   4px;
  --radius:      6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* ---------- Shadows (plats, subtils) ---------- */
  --shadow-xs: 0 1px 1px rgba(9, 9, 11, 0.04);
  --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.05), 0 1px 3px rgba(9, 9, 11, 0.05);
  --shadow:    0 2px 4px rgba(9, 9, 11, 0.04), 0 4px 8px rgba(9, 9, 11, 0.04);
  --shadow-md: 0 4px 8px rgba(9, 9, 11, 0.05), 0 8px 16px rgba(9, 9, 11, 0.05);
  --shadow-lg: 0 8px 16px rgba(9, 9, 11, 0.06), 0 16px 32px rgba(9, 9, 11, 0.06);
  --shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.2);

  /* ---------- Motion ---------- */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 120ms;
  --dur:      180ms;
  --dur-slow: 280ms;

  /* ---------- Layout ---------- */
  --container:        1200px;
  --container-narrow: 880px;
  --container-wide:   1360px;
  --nav-h: 64px;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  font-feature-settings: 'cv11', 'ss01';
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

img, svg, video, canvas, picture { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: var(--text); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--accent); }
ul, ol { list-style: none; }
::selection { background: var(--zinc-950); color: var(--white); }

/* Focus visible (accessibility) */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
}

h1 { font-size: clamp(2.25rem, 4.5vw, 4rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.875rem, 3vw, 2.75rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-base); font-weight: 600; }

p { line-height: var(--lh-relaxed); color: var(--text-secondary); }
p + p { margin-top: var(--sp-4); }

strong { font-weight: 600; color: var(--text); }

code, pre, kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-variant-ligatures: none;
}
code {
  background: var(--surface-alt);
  padding: 0.12em 0.38em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.85em;
  color: var(--zinc-800);
}

small { font-size: var(--fs-sm); color: var(--text-muted); }

.mono { font-family: var(--font-mono); font-variant-ligatures: none; }
.num { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
.container-narrow { max-width: var(--container-narrow); }
.container-wide   { max-width: var(--container-wide); }

.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;
}

.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted); }
.text-subtle  { color: var(--text-subtle); }
.text-accent  { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }

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

.hidden { display: none !important; }

@media (max-width: 720px) { .hide-mobile  { display: none !important; } }
@media (min-width: 721px) { .hide-desktop { display: none !important; } }

/* ==========================================================================
   Sections
   ========================================================================== */

.section    { padding-block: var(--sp-20); }
.section-sm { padding-block: var(--sp-12); }
.section-lg { padding-block: var(--sp-24); }

.section-subtle { background: var(--bg-subtle); }
.section-elevated { background: var(--bg-elevated); }

.section-dark {
  background: var(--bg-inverted);
  color: var(--text-invert);
}
.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6 { color: var(--text-invert); }
.section-dark p  { color: var(--zinc-400); }

.section-divider { border-top: 1px solid var(--border); }
.section-divider-bottom { border-bottom: 1px solid var(--border); }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  margin-bottom: var(--sp-4);
}
.eyebrow-accent { color: var(--accent); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
  margin-bottom: var(--sp-12);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--border);
}
.section-head h2 { margin-bottom: var(--sp-2); }
.section-head p  { color: var(--text-muted); max-width: 520px; margin: 0; }
@media (max-width: 640px) {
  .section-head { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Reveal (subtil)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  .nav, .footer, .cursor-glow { display: none !important; }
  body { background: #fff; color: #000; }
}
