/* ==========================================================
   MainSail — feuille de style
   Pour caler les couleurs sur le logo : modifiez uniquement
   les variables du bloc :root ci-dessous.
   ========================================================== */
:root {
  --navy: #0B1B33;        /* couleur principale (fond sombre, titres) */
  --navy-2: #12284A;
  --blue: #2F7CF6;        /* couleur d'accent (boutons, liens) */
  --blue-dark: #1A5FD0;
  --sky: #7FC4FF;         /* accent clair */
  --sunset: #F2A65A;      /* touche chaude, utilisée avec parcimonie */
  --ink: #1B2433;
  --muted: #5B6779;
  --line: #E3E8F0;
  --bg: #FFFFFF;
  --bg-soft: #F4F7FB;
  --ok: #1F9D6B;
  --warn: #D98A1C;
  --err: #D64545;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(11, 27, 51, .08);
  --shadow-lg: 0 24px 60px rgba(11, 27, 51, .18);
  --max: 1180px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Tight", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--soft { background: var(--bg-soft); }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 14px;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 10px; top: 10px; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: 999px;
  font-weight: 650; font-size: 1rem; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease; font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 8px 24px rgba(47,124,246,.35); }
.btn--primary:hover { background: var(--blue-dark); }
.btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.08); }
.btn--outline { border-color: var(--navy); color: var(--navy); }

/* En-tête */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .2s ease, box-shadow .2s ease;
}
.header.is-scrolled { background: rgba(11,27,51,.92); backdrop-filter: blur(10px); box-shadow: 0 4px 20px rgba(0,0,0,.15); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; background: #fff; border-radius: 10px; padding: 4px; }
.brand span b { color: var(--sky); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: rgba(255,255,255,.85); font-weight: 550; font-size: .97rem; }
.nav a:hover { color: #fff; text-decoration: none; }
.nav .btn { padding: 10px 18px; color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 28px; height: 28px; }

/* Hero */
.hero {
  position: relative; background: radial-gradient(1200px 600px at 80% 10%, #1D3A6B 0%, var(--navy) 60%);
  color: #fff; padding: 150px 0 110px; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(11,27,51,.6));
  pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--sky); }
.hero p.lead { color: rgba(255,255,255,.78); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__visual { position: relative; }
.hero__visual picture img {
  width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.12);
}
.hero__badge {
  position: absolute; left: -28px; bottom: -26px; background: #fff; color: var(--ink);
  border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-lg); min-width: 250px; font-size: .9rem;
}
.hero__badge strong { display: block; color: var(--navy); margin-bottom: 6px; font-size: .95rem; }
.badge-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 3px 0; }
.pill { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pill--ok { background: #E3F6EE; color: var(--ok); }
.pill--wait { background: #FDF1DF; color: var(--warn); }
.pill--err { background: #FBE6E6; color: var(--err); }
.pill--off { background: #EEF1F5; color: var(--muted); }

.hero__stats { display: flex; gap: 40px; margin-top: 44px; flex-wrap: wrap; }
.hero__stats div { border-left: 2px solid var(--blue); padding-left: 14px; }
.hero__stats strong { display: block; font-size: 1.5rem; color: #fff; font-family: var(--font-display); }
.hero__stats span { font-size: .88rem; color: rgba(255,255,255,.65); }

/* Constat */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split__img img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center 65%; box-shadow: var(--shadow); }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; }
.checklist .ico {
  flex: 0 0 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: #E8F0FE; color: var(--blue);
}
.checklist .ico svg { width: 18px; height: 18px; }
.checklist strong { color: var(--navy); }

/* Schéma de fonctionnement */
.flow {
  display: grid; grid-template-columns: 1fr auto 1.2fr auto 1fr; gap: 18px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow);
}
.flow__col h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; text-align: center; }
.flow__item {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
  font-weight: 600; color: var(--navy); background: var(--bg-soft); text-align: center; font-size: .95rem;
}
.flow__core {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff;
  border-radius: var(--radius-lg); padding: 26px 22px; text-align: center; box-shadow: var(--shadow-lg);
}
.flow__core img { width: 44px; height: 44px; margin: 0 auto 10px; background: #fff; border-radius: 12px; padding: 5px; }
.flow__core strong { font-size: 1.25rem; display: block; margin-bottom: 12px; }
.flow__core ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .88rem; color: rgba(255,255,255,.82); }
.flow__core li { background: rgba(255,255,255,.07); border-radius: 8px; padding: 6px 8px; }
.flow__arrow { color: var(--blue); }
.flow__arrow svg { width: 40px; height: 40px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.step { position: relative; padding: 0 4px; }
.step__num {
  width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #fff;
  display: grid; place-items: center; font-weight: 800; margin-bottom: 12px;
}
.step p { color: var(--muted); font-size: .95rem; }

/* Fonctionnalités */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #CFDAEA; }
.card__ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--sky)); color: #fff; margin-bottom: 18px;
}
.card__ico svg { width: 24px; height: 24px; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }

/* Tableau de statuts */
.status-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.status-table {
  width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); font-size: .95rem;
}
.status-table th, .status-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.status-table thead th { background: var(--navy); color: #fff; font-weight: 600; font-size: .85rem; }
.status-table tr:last-child td { border-bottom: 0; }
.status-table td:first-child { font-weight: 650; color: var(--navy); }
.table-scroll { overflow-x: auto; }

/* Pour qui */
.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.audience__card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 400px; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; background: var(--navy);
}
.audience__card picture, .audience__card picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.audience__card::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(11,27,51,.95) 10%, rgba(11,27,51,.55) 55%, rgba(11,27,51,.15));
}
.audience__card > div { position: relative; z-index: 2; }
.audience__card h3 { color: #fff; font-size: 1.35rem; }
.audience__card p { color: rgba(255,255,255,.82); font-size: .96rem; margin: 0; }
.audience__card--plain { background: linear-gradient(160deg, var(--blue-dark), var(--navy)); }
.audience__card--plain::before { display: none; }
.audience__tag { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sky); font-weight: 700; display: block; margin-bottom: 8px; }

/* Engagements */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pillar { padding: 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.pillar h3 { font-size: 1.05rem; }
.pillar p { color: var(--muted); font-size: .94rem; margin: 0; }
.pillar__bar { width: 36px; height: 4px; border-radius: 4px; background: var(--blue); margin-bottom: 16px; }
.pillar:nth-child(2) .pillar__bar { background: var(--sky); }
.pillar:nth-child(3) .pillar__bar { background: var(--sunset); }
.pillar:nth-child(4) .pillar__bar { background: var(--navy); }

/* Bandeau */
.band { position: relative; color: #fff; padding: 110px 0; overflow: hidden; background: var(--navy); }
.band picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,27,51,.95) 20%, rgba(11,27,51,.4)); z-index: 1; }
.band .container { position: relative; z-index: 2; }
.band h2 { color: #fff; max-width: 720px; }
.band p { color: rgba(255,255,255,.8); max-width: 600px; font-size: 1.1rem; }

/* Contact */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact__info ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.contact__info li { display: flex; gap: 14px; align-items: flex-start; }
.contact__info .ico { flex: 0 0 42px; height: 42px; border-radius: 12px; background: #E8F0FE; color: var(--blue); display: grid; place-items: center; }
.contact__info .ico svg { width: 20px; height: 20px; }
.contact__info strong { display: block; color: var(--navy); }
.contact__info span { color: var(--muted); font-size: .95rem; }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; color: var(--navy); }
.field label .req { color: var(--err); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .98rem; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg-soft); color: var(--ink); transition: border-color .15s ease, background .15s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(47,124,246,.12); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--err); }
.field .err-msg { color: var(--err); font-size: .82rem; min-height: 1em; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--blue); flex: 0 0 auto; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.form__note { font-size: .82rem; color: var(--muted); margin: 0; }
.form__status { margin-top: 18px; padding: 14px 16px; border-radius: 10px; font-weight: 550; display: none; }
.form__status.is-ok { display: block; background: #E3F6EE; color: #11694A; }
.form__status.is-err { display: block; background: #FBE6E6; color: #9E2B2B; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* Pied de page */
.footer { background: var(--navy); color: rgba(255,255,255,.7); padding: 56px 0 30px; font-size: .93rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer h4 { color: #fff; font-size: .95rem; margin: 0 0 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a { color: rgba(255,255,255,.75); }
.footer a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; }

/* Pages légales */
.legal { padding: 140px 0 80px; }
.legal .container { max-width: 820px; }
.legal h2 { font-size: 1.4rem; margin-top: 2em; }
.legal .todo { background: #FDF1DF; padding: 2px 6px; border-radius: 4px; color: #8A5A10; }
.header--solid { background: var(--navy); }

/* Apparition au défilement */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 1024px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr; padding: 24px; }
  .flow__arrow { transform: rotate(90deg); justify-self: center; }
}
@media (max-width: 860px) {
  .nav {
    position: fixed; inset: 76px 0 auto 0; background: var(--navy); flex-direction: column; align-items: stretch;
    padding: 16px 20px 24px; gap: 4px; display: none; box-shadow: 0 20px 40px rgba(0,0,0,.25);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav .btn { margin-top: 12px; justify-content: center; border-bottom: 0; }
  .nav-toggle { display: block; }
  .header.menu-open { background: var(--navy); }
  .hero { padding: 120px 0 80px; }
  .hero__grid, .split, .status-wrap, .contact { grid-template-columns: 1fr; gap: 40px; }
  .hero__badge { left: 12px; bottom: -22px; min-width: 0; }
  .split__img { order: -1; }
  .split__img img { aspect-ratio: 16/10; }
  .audience { grid-template-columns: 1fr; }
  .audience__card { min-height: 320px; }
  .footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .features, .pillars, .steps { grid-template-columns: 1fr; }
  .form { padding: 22px; }
  .form__grid { grid-template-columns: 1fr; }
  .hero__stats { gap: 22px; }
}
