/* ============================================================
   ECTO-BAT — Design System
   Bureau d'études techniques pluridisciplinaire
   Structure · Électricité · CVC
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Brand palette */
  --navy:        #0F2F4F;
  --navy-deep:   #081E34;
  --navy-mid:    #1A3D5C;
  --orange:      #D77A2F;
  --orange-lt:   #E8933F;
  --steel:       #5E6A75;
  --steel-lt:    #8A97A3;
  --smoke:       #F2F4F6;
  --white:       #FFFFFF;
  --black:       #0A0A0A;
  --rule:        rgba(15,47,79,.12);
  --rule-light:  rgba(255,255,255,.12);

  /* Discipline colors */
  --struct:      #2B5C8A;
  --elec:        #D77A2F;
  --cvc:         #2F7A6E;

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Type scale */
  --t-hero:   clamp(2.8rem, 6vw, 5rem);
  --t-h1:     clamp(2.2rem, 4.5vw, 3.6rem);
  --t-h2:     clamp(1.7rem, 3vw, 2.4rem);
  --t-h3:     clamp(1.25rem, 2vw, 1.6rem);
  --t-h4:     1.2rem;
  --t-body:   1.0625rem;
  --t-small:  0.875rem;
  --t-xs:     0.75rem;
  --t-label:  0.7rem;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  /* Layout */
  --max-w:     1200px;
  --max-w-lg:  1440px;
  --nav-h:     76px;
  --gutter:    clamp(1.25rem, 4vw, 2rem);

  /* Radius */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  16px;
  --r-xl:  24px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(10,10,10,.08), 0 1px 2px rgba(10,10,10,.06);
  --shadow-md:  0 4px 16px rgba(10,10,10,.1);
  --shadow-lg:  0 12px 40px rgba(10,10,10,.14);
  --shadow-xl:  0 24px 64px rgba(10,10,10,.18);

  /* Transitions */
  --ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:    180ms;
  --t-mid:     320ms;
  --t-slow:    500ms;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); font-family: var(--font-body); font-weight: 600; }

p { color: var(--steel); line-height: 1.75; }
p + p { margin-top: 1.25em; }

strong { color: var(--navy); font-weight: 600; }
em { font-family: var(--font-display); font-style: italic; color: var(--orange); }

.label {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}

.lead {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.7;
  color: var(--steel);
  font-weight: 300;
}

/* ── COLORS UTILITIES ───────────────────────────────────── */
.bg-navy    { background: var(--navy); }
.bg-deep    { background: var(--navy-deep); }
.bg-smoke   { background: var(--smoke); }
.bg-white   { background: var(--white); }
.text-white { color: var(--white); }
.text-white h1, .text-white h2, .text-white h3, .text-white h4 { color: var(--white); }
.text-white p { color: rgba(255,255,255,.7); }
.text-white .label { color: var(--orange); }

/* ── DISCIPLINE TAGS ────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .75rem;
  border-radius: 100px;
  font-size: var(--t-xs);
  font-family: var(--font-mono);
  letter-spacing: .08em;
  font-weight: 500;
  text-transform: uppercase;
}
.tag-struct { background: rgba(43,92,138,.1); color: var(--struct); }
.tag-elec   { background: rgba(215,122,47,.1); color: var(--orange); }
.tag-cvc    { background: rgba(47,122,110,.1); color: var(--cvc); }
.tag-dark   { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }

/* ── DIVIDER ────────────────────────────────────────────── */
.rule {
  height: 1px;
  background: var(--rule);
  border: none;
  margin: var(--space-xl) 0;
}

/* ── FOCUS ──────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
