/* ==========================================================================
   HUMANINO — styles communs du site
   Base : reset, typo, layout responsive, header/footer, animations reveal.
   Les styles « one-off » restent inline dans les pages ; ce fichier porte
   tout ce qui est structurel et responsive.
   ========================================================================== */

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

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

body {
  margin: 0;
  background: #fff;
  font-family: 'Hanken Grotesk', sans-serif;
  color: #16344A;
}

::selection { background: #F5B324; color: #0C2A40; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; }
input::placeholder { color: #8FA6B4; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}

.section { padding-top: clamp(56px, 9vw, 96px); padding-bottom: clamp(56px, 9vw, 96px); }
.section--sm { padding-top: clamp(40px, 6vw, 74px); padding-bottom: clamp(40px, 6vw, 74px); }

/* Grilles responsives — remplacer les display:grid inline par ces classes.
   Les ratios asymétriques passent par --split (ex : style="--split:1.18fr .82fr"). */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split {
  display: grid;
  gap: clamp(32px, 4.5vw, 56px);
  align-items: center;
  grid-template-columns: var(--split, 1fr 1fr);
}
.split--top { align-items: start; }

/* Rangée d'en-tête de section (titre à gauche, note à droite) */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #EEF2F5;
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 30px; width: auto; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
  font-weight: 500;
  color: #2C4657;
  white-space: nowrap;
}
.site-nav a:hover { color: #0C2A40; }
.site-nav a[aria-current="page"] { color: #0C2A40; font-weight: 700; }

.nav-contact { font-weight: 600; color: #2C6A8C; }

.nav-cta {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff !important;
  background: #0C2A40;
  padding: 12px 22px;
  border-radius: 100px;
}
.nav-cta:hover { background: #16405E; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid #E4EBF0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #0C2A40;
  transition: transform .25s ease, opacity .25s ease;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1180px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #EEF2F5;
    box-shadow: 0 24px 40px -28px rgba(12, 42, 64, .35);
    padding: 10px 24px 22px;
    white-space: normal;
  }
  body.nav-open .site-nav { display: flex; }
  .site-nav a { padding: 13px 4px; border-bottom: 1px solid #F2F6F8; font-size: 16px; }
  .site-nav a:last-child { border-bottom: 0; }
  .nav-cta { margin-top: 14px; text-align: center; border-radius: 12px; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { background: #08202F; }

.footer-inner {
  padding-top: 52px;
  padding-bottom: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-brand { display: inline-flex; align-items: center; }
.footer-logo { height: 56px; width: auto; display: block; }

.footer-nav {
  display: flex;
  gap: 12px 30px;
  font-size: 14px;
  color: #7FA6BC;
  flex-wrap: wrap;
}
.footer-nav a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Animations d'apparition
   Sans JS : tout est visible (aucune classe posée sur <html>).
   Avec prefers-reduced-motion : tout est visible immédiatement.
   -------------------------------------------------------------------------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .65s ease, transform .65s ease;
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   Divers responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .section-head { align-items: flex-start; flex-direction: column; }
}
