/* ==========================================================================
   Melior — thème Grav
   Charte : #231F20 noir · #253169 marine · #2F4DA8 bleu · #762996 violet · #CD7E19 orange
   ========================================================================== */

:root {
  --ink: #231F20;
  --navy: #253169;
  --blue: #2F4DA8;
  --purple: #762996;
  --orange: #CD7E19;
  --orange-light: #F0A64A;
  --bg: #F7F6F4;
  --surface: #FFFFFF;
  --line: #E0DED9;
  --dash: #B9B5BE;
  --text-2: #4A4650;
  --muted: #625D68;
  --navy-line: #3F4C8C;
  --on-navy: #E6E8F4;
  --on-navy-2: #C5CAE4;

  --font: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Courier Prime', 'Courier New', monospace;

  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 14px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 24px);
  --section-y: clamp(72px, 10vw, 112px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--orange-light); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.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; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-s); }
.skip-link:focus { top: 12px; color: #fff; }

.stack-xs > * + * { margin-top: 10px; }
.stack-s > * + * { margin-top: 14px; }
.stack-m > * + * { margin-top: 20px; }
.stack-l > * + * { margin-top: 40px; }
.stack-xl > * + * { margin-top: 48px; }

/* ---------- Typo ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow--orange { color: var(--orange-light); }
.label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.h2 { font-size: clamp(30px, 3.2vw + 12px, 42px); line-height: 1.12; letter-spacing: -.01em; font-weight: 500; }
.h3 { font-size: 22px; line-height: 1.3; font-weight: 500; }
.h3--lg { font-size: 24px; }

.grad {
  background: linear-gradient(90deg, #253169, #2F4DA8, #762996, #B86A0F, #762996, #2F4DA8, #253169);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradmove 9s linear infinite;
}

/* ---------- Boutons & liens ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  font: 500 17px/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(47, 77, 168, .7); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: #2A449A; color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { color: #fff; }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { color: var(--ink); }
.arr { display: inline-block; transition: transform .2s ease; }
.btn:hover .arr, .link-arrow:hover .arr { transform: translateX(5px); }
.link-arrow { display: inline-block; font-weight: 500; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Bandeau charte ---------- */
.brandbar { display: flex; height: 4px; }
.brandbar span { flex: 1; }
.brandbar span:nth-child(1) { background: var(--ink); }
.brandbar span:nth-child(2) { background: var(--navy); }
.brandbar span:nth-child(3) { background: var(--blue); }
.brandbar span:nth-child(4) { background: var(--purple); }
.brandbar span:nth-child(5) { background: var(--orange); }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 246, 244, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(35, 31, 32, .35); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.site-logo img { height: 28px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 16px; }
.site-nav__link { color: var(--text-2); text-decoration: none; position: relative; padding: 6px 0; }
.site-nav__link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.site-nav__link:hover { color: var(--ink); }
.site-nav__link:hover::after, .site-nav__link.is-active::after { transform: scaleX(1); }
.site-nav__link.is-active { color: var(--ink); }
.site-nav__cta { min-height: 44px; padding: 10px 18px; font-size: 16px; }

.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); cursor: pointer; }
.nav-toggle__close { display: none; }
.nav-open .nav-toggle__open { display: none; }
.nav-open .nav-toggle__close { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px -18px rgba(35, 31, 32, .4);
    display: none;
  }
  .nav-open .site-nav { display: flex; }
  .site-nav__link { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
  .site-nav__link::after { display: none; }
  .site-nav__cta { margin-top: 16px; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 96px) 0 clamp(56px, 8vw, 88px); }
.hero__inner { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.hero__text { flex: 999 1 520px; min-width: 0; }
.hero__text > * { animation: rise .7s var(--ease) both; }
.hero__text > * + * { margin-top: 28px; }
.hero__text > :nth-child(2) { animation-delay: .08s; }
.hero__text > :nth-child(3) { animation-delay: .16s; }
.hero__text > :nth-child(4) { animation-delay: .24s; }
.hero__title { font-size: clamp(36px, 4.4vw + 12px, 58px); line-height: 1.06; letter-spacing: -.015em; font-weight: 500; max-width: 720px; }
.hero__lead { font-size: 19px; line-height: 1.6; color: var(--text-2); max-width: 600px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.schema {
  flex: 1 1 380px;
  min-width: 0;
  background: var(--navy);
  color: var(--on-navy);
  border-radius: var(--radius-l);
  padding: 28px;
  font-family: var(--mono);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.schema__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #3A4682; }
.schema__cube { width: 56px; animation: float 5s ease-in-out infinite; }
.schema__status { color: var(--orange-light); }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
.schema__layer {
  border: 1px solid var(--navy-line);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  animation: rise .6s var(--ease) both;
  transition: transform .2s ease;
}
.schema__layer:hover { transform: translateX(6px); }
.schema__detail { color: #B4BBDD; text-align: right; margin-left: auto; }
.schema__layer--hot { border-color: var(--orange-light); background: rgba(240, 166, 74, .08); }
.schema__layer--hot > :first-child { color: var(--orange-light); }
.schema__layer--hot .schema__detail { color: #D8DCEE; }
.schema > :nth-child(2) { animation-delay: .3s; }
.schema > :nth-child(4) { animation-delay: .45s; }
.schema > :nth-child(6) { animation-delay: .6s; }
.schema > :nth-child(8) { animation-delay: .75s; }
.schema__flow { position: relative; height: 18px; width: 1px; margin-left: 24px; background: var(--navy-line); }
.schema__flow::after { content: ""; position: absolute; left: -2px; top: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--orange-light); animation: drop 1.5s linear infinite; }
.schema > :nth-child(5)::after { animation-delay: .5s; }
.schema > :nth-child(7)::after { animation-delay: 1s; }

/* ---------- Repères ---------- */
.reperes { background: var(--surface); border-block: 1px solid var(--line); }
.reperes__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px 40px; padding-block: 28px; }
.reperes__item { display: flex; flex-direction: column; gap: 4px; }
.reperes__value { font-weight: 500; font-size: 16px; }

/* ---------- Bandeau défilant ---------- */
.marquee {
  background: var(--navy);
  color: var(--on-navy);
  overflow: hidden;
  padding: 22px 0;
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee__track { display: flex; width: max-content; animation: scroll 45s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; gap: 40px; padding-right: 40px; }
.marquee__sep { color: var(--orange-light); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section--white { background: var(--surface); border-block: 1px solid var(--line); }
.section--navy { background: var(--navy); color: var(--on-navy); }
.section--navy .h2 { color: #fff; }
.section-head { max-width: 680px; }
.section-head--split { max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.section-head--split > :first-child { max-width: 640px; }
.section-head__intro { max-width: 400px; color: var(--text-2); }

/* ---------- Cartes ---------- */
.cards { display: flex; flex-wrap: wrap; gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -20px rgba(37, 49, 105, .45); }
.cards .card { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 14px; border-top-width: 3px; }
.cards .card p { font-size: 16px; color: var(--text-2); }
.card--navy { border-top-color: var(--navy); }
.card--blue { border-top-color: var(--blue); }
.card--purple { border-top-color: var(--purple); }
.card--orange { border-top-color: var(--orange); }

/* ---------- Approche ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--navy-line);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.step { background: var(--navy); padding: 32px 28px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .25s ease; }
.step:hover { box-shadow: inset 0 -4px 0 var(--orange-light); }
.step__num { font-family: var(--mono); font-weight: 700; font-size: 44px; line-height: 1; color: var(--orange-light); }
.step .h3 { color: #fff; font-size: 21px; }
.step p { font-size: 16px; color: var(--on-navy-2); }

/* ---------- Référence ---------- */
.client { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding: 36px; }
.client__logo { width: 180px; }
.client__body { flex: 1 1 280px; min-width: 0; }
.client__body p { color: var(--text-2); }

/* ---------- À propos ---------- */
.about { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.about__photo { flex: 0 1 360px; min-width: 0; position: relative; padding: 0 18px 18px 0; }
.about__photo::before { content: ""; position: absolute; left: 18px; top: 18px; right: 0; bottom: 0; border-radius: 12px; background: var(--navy); }
.about__photo img { position: relative; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; transition: transform .25s ease; }
.about__photo:hover img { transform: translate(-4px, -4px); }
.about__text { flex: 999 1 420px; min-width: 0; }
.about__role { color: var(--muted); font-size: 16px; }
.about__body { font-size: 18px; line-height: 1.7; color: var(--text-2); max-width: 620px; }
.about__body p + p { margin-top: 1em; }

/* ---------- Contact ---------- */
.contact { display: flex; flex-wrap: wrap; gap: 64px; }
.contact__info { flex: 1 1 360px; min-width: 0; }
.contact__intro { font-size: 18px; color: var(--text-2); }
.contact__list { margin: 28px 0 0; display: flex; flex-direction: column; gap: 16px; }
.contact__list dd { margin: 2px 0 0; font-weight: 500; }
.contact__form { flex: 1 1 420px; min-width: 0; padding: 32px; border-radius: 12px; }
.contact__form:hover { transform: none; box-shadow: none; }

/* Formulaire (balisage du plugin Form de Grav) */
.contact__form form { display: flex; flex-wrap: wrap; gap: 18px 16px; }
.contact__form .form-field { flex: 1 1 100%; min-width: 0; margin: 0; }
.contact__form .form-field.half { flex: 1 1 180px; }
.contact__form .form-label label, .contact__form .form-label { display: block; font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.contact__form .required { color: var(--orange); }
.contact__form input[type=text],
.contact__form input[type=email],
.contact__form textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--dash);
  border-radius: var(--radius-s);
  padding: 11px 12px;
  font: 16px/1.4 var(--font);
  color: var(--ink);
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact__form textarea { min-height: 140px; resize: vertical; }
.contact__form input:focus, .contact__form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 77, 168, .18); }
.contact__form .buttons { flex: 1 1 100%; }
.contact__form .buttons .button,
.contact__form button[type=submit] {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--blue);
  color: #fff;
  font: 500 17px var(--font);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.contact__form button[type=submit]:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(47, 77, 168, .7); }
.contact__form .form-honeybear, .form-honeybear { display: none !important; }
.form-privacy { margin-top: 16px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.notices { flex: 1 1 100%; padding: 14px 16px; border-radius: var(--radius-s); font-size: 16px; margin-bottom: 16px; }
.notices.green, .notices.success { background: #E8F3EC; color: #1E5B35; }
.notices.red, .notices.error { background: #FBEAEA; color: #8A1F1F; }
.form-errors, .form-error { color: #8A1F1F; font-size: 14px; }

/* ---------- Pages simples ---------- */
.prose { max-width: 760px; }
.prose > * + * { margin-top: 1em; }
.prose h1 + * { margin-top: 32px; }
.prose h2 { font-size: 24px; font-weight: 500; margin-top: 40px; }
.prose p, .prose li { color: var(--text-2); }
.prose ul { padding-left: 1.2em; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: #C9C5CC; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding-block: 40px; font-size: 15px; }
.site-footer__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.site-footer__brand img { height: 22px; width: auto; }
.site-footer__links { display: flex; gap: 24px; }
.site-footer a { color: #C9C5CC; }
.site-footer a:hover { color: #fff; }

/* ---------- Apparition au défilement ---------- */
.js .reveal { opacity: 0; translate: 0 18px; transition: opacity .7s var(--ease), translate .7s var(--ease), transform .25s ease, box-shadow .25s ease; }
.js .reveal.is-visible { opacity: 1; translate: 0 0; }

/* ---------- Animations ---------- */
@keyframes rise { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
@keyframes gradmove { to { background-position: 200% 50%; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-7px) rotate(5deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes drop { 0% { top: -3px; opacity: 0; } 25% { opacity: 1; } 100% { top: 17px; opacity: 0; } }
@keyframes scroll { to { transform: translateX(-50%); } }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero__lead { font-size: 17px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .schema { padding: 20px; font-size: 13px; }
  .client { padding: 24px; }
  .contact__form { padding: 22px; }
  .about { gap: 40px; }
  .marquee { font-size: 15px; padding: 16px 0; }
}

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