/* ============================================================
   TRANSFORMER / ANeSA — Charte CSS principale
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Source+Serif+4:ital,wght@0,300;0,400;1,300&display=swap');

/* ---- Variables ---- */
:root {
  --bleu:   #1B3A6B;
  --ocre:   #C8922A;
  --vert:   #4A7C59;
  --fond:   #F8F6F1;
  --texte:  #2D2D2D;
  --rouge:  #C0392B;
  --violet: #8B4F9E;
  --blanc:  #FFFFFF;
  --border: #E8E4DC;

  /* Échelle typographique (rem) — hiérarchie lisible, corps ≥ 20px */
  --fs-mono: 0.875rem;        /* 14px — labels capitales, badges */
  --fs-caption: 0.9375rem;    /* 15px — méta, pied de tableau */
  --fs-ui: 1rem;              /* 16px — onglets, petits libellés */
  --fs-sub: 1.0625rem;        /* 17px — secondaire, tableaux */
  --fs-relaxed: 1.125rem;     /* 18px — boutons, champs */
  --fs-md: 1.1875rem;         /* 19px */
  --fs-body: 1.25rem;         /* 20px — corps de texte */
  --fs-lead: 1.3125rem;       /* 21px — accroches, titres cartes */
  --fs-heading-sm: 1.4375rem; /* 23px — titres de section */
  --fs-heading-md: 1.5625rem; /* 25px — en-têtes de page */
  --fs-heading-lg: 1.6875rem; /* 27px — chiffres, modules */
  --fs-heading-xl: 1.875rem;  /* 30px — h1 pages intérieures */
  --fs-hero: clamp(2.125rem, 1.6rem + 1.5vw, 2.875rem); /* ~34–46px fluide */
  --fs-display: 2.0625rem;    /* 33px — KPI, stats */
  --fs-display-lg: 2.25rem;   /* 36px — grands chiffres */
  --fs-error-code: 6rem;      /* 96px — pages d’erreur */
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Source Serif 4', serif;
  color: var(--texte);
  background: var(--fond);
  font-size: var(--fs-body);
  line-height: 1.65;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---- Utilitaires ---- */
.inner        { max-width: 1200px; margin: 0 auto; }
.section-label {
  font-size: var(--fs-heading-md);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ocre);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  display: block;
}
.section-label-inv {
  font-size: var(--fs-heading-md);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(200,146,42,0.9);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  display: block;
}
.section-title {
  font-family: 'Playfair Display', serif;
  color: var(--bleu);
  font-size: var(--fs-heading-sm);
  margin-bottom: 1.2rem;
  line-height: 1.28;
}
.body-text {
  font-size: var(--fs-relaxed);
  line-height: 1.82;
  color: #444;
  font-weight: 300;
  margin-bottom: 0.8rem;
}
.body-text-sm {
  font-size: var(--fs-ui);
  line-height: 1.7;
  color: #555;
  font-weight: 300;
  margin-bottom: 0.6rem;
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: var(--fs-md);
  color: var(--bleu);
  line-height: 1.35;
}
.sep { background: var(--border); height: 1px; margin: 0 2rem; }

/* ---- NAVIGATION ---- */
.nav {
  background: var(--bleu);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 66px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.nav-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  line-height: 0;
}
.nav-brand img {
  height: 42px;
  width: auto;
  max-width: min(140px, 28vw);
  object-fit: contain;
  display: block;
}
.nav-brand:hover img {
  opacity: 0.92;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  color: #fff;
  font-size: var(--fs-relaxed);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.nav-logo span { color: var(--ocre); }
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  align-items: center;
  justify-content: flex-end;
}
.nav-links a {
  color: rgba(255,255,255,0.7);
  font-size: var(--fs-relaxed);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--ocre); }

/* ---- PAGE HEADER ---- */
.page-header {
  background: var(--bleu);
  padding: 3rem 2rem 2rem;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  color: #fff;
  font-size: var(--fs-heading-xl);
  max-width: 640px;
  line-height: 1.32;
  margin-bottom: 0.6rem;
}
.page-header .subtitle {
  color: rgba(255,255,255,0.65);
  font-size: var(--fs-relaxed);
  font-weight: 300;
  max-width: 560px;
  line-height: 1.7;
}

/* ---- BOUTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: var(--fs-relaxed);
  border-radius: 2px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
.btn-primary   { background: var(--ocre); color: #fff; }
.btn-primary:hover { background: #b07a20; }
.btn-secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-secondary:hover { border-color: rgba(255,255,255,0.8); }
.btn-dark      { background: var(--bleu); color: #fff; }
.btn-dark:hover { background: #152d54; }

/* ---- CARDS ---- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

/* ---- BADGES ---- */
.badge {
  display: inline-block;
  font-size: var(--fs-mono);
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.badge-pf    { background: #E8F4EF; color: var(--vert); }
.badge-vbg   { background: #FDEAEA; color: var(--rouge); }
.badge-isg   { background: #FEF5E7; color: #B7770D; }
.badge-sd    { background: #EEF2FA; color: var(--bleu); }
.badge-gen   { background: #F3EFF9; color: var(--violet); }
.badge-ado   { background: #E8F4EF; color: var(--vert); }

/* ---- FOOTER ---- */
.footer {
  background: #111a2b;
  padding: 2.5rem 2rem;
  color: rgba(255,255,255,0.6);
  font-size: var(--fs-caption);
  font-weight: 300;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  color: #fff;
  font-size: var(--fs-md);
  margin-bottom: 0.75rem;
}
.footer-logo span { color: var(--ocre); }
.footer p { line-height: 1.7; }
.footer h4 {
  font-family: 'Playfair Display', serif;
  color: rgba(255,255,255,0.85);
  font-size: var(--fs-ui);
  margin-bottom: 0.75rem;
  font-weight: 400;
}
.footer a { color: rgba(255,255,255,0.55); transition: color 0.2s; }
.footer a:hover { color: var(--ocre); }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 6px; }
.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-mono);
  color: rgba(255,255,255,0.3);
}

@media (max-width: 900px) {
  .nav {
    height: auto;
    min-height: 66px;
    padding: 0;
    align-items: stretch;
  }
  .nav-inner {
    flex-wrap: wrap;
    padding: 0.65rem 1rem 0.75rem;
    row-gap: 0.65rem;
  }
  .nav-brand img {
    height: 36px;
  }
  .nav-logo {
    font-size: var(--fs-sub);
  }
  .nav-links {
    width: 100%;
    flex-wrap: nowrap;
    gap: 1rem;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
  }
  .nav-links a {
    font-size: var(--fs-ui);
  }
  .page-header {
    padding: 2.2rem 1rem 1.6rem;
  }
  .footer {
    padding: 2rem 1rem;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.45rem;
  }
  .sep {
    margin: 0 1rem;
  }
}

@media (max-width: 640px) {
  .page-header h1 {
    font-size: var(--fs-heading-lg);
  }
  .page-header .subtitle {
    font-size: var(--fs-sub);
    line-height: 1.6;
  }
}
