:root {
  --navy: #071c34;
  --navy-2: #0d2a4a;
  --blue: #245ed8;
  --blue-soft: #edf4ff;
  --safety: #18855b;
  --safety-soft: #eaf7f1;
  --white: #ffffff;
  --gray-50: #f7f9fc;
  --gray-100: #eef2f7;
  --gray-200: #d9e1ec;
  --gray-500: #627083;
  --gray-700: #344254;
  --text: #152234;
  --shadow: 0 22px 60px rgba(7, 28, 52, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.skip-link {
  position: absolute; left: 16px; top: -80px; z-index: 1000;
  background: var(--navy); color: var(--white); padding: 10px 14px; border-radius: 10px;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(217,225,236,.85);
}
.navbar {
  min-height: 78px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--navy); letter-spacing: .02em; }
.brand img { width: 54px; height: 54px; object-fit: contain; border-radius: 14px; }
.brand small { display: block; font-size: 12px; color: var(--gray-500); font-weight: 600; letter-spacing: 0; margin-top: -4px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 14px; font-weight: 700; color: var(--gray-700);
  padding: 10px 12px; border-radius: 999px;
}
.nav-links a:hover, .nav-links a.active { background: var(--blue-soft); color: var(--blue); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--gray-200);
  background: var(--white); border-radius: 12px; cursor: pointer; color: var(--navy);
}
.menu-toggle span { display: block; width: 20px; height: 2px; background: currentColor; margin: 5px auto; border-radius: 5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 12px 18px;
  border-radius: 999px; font-weight: 800; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: .2s ease;
}
.btn-primary { background: var(--navy); color: var(--white); box-shadow: 0 14px 32px rgba(7,28,52,.18); }
.btn-primary:hover { background: var(--blue); transform: translateY(-1px); }
.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--gray-200); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }
.btn-safety { background: var(--safety); color: var(--white); }
.btn-safety:hover { filter: brightness(.94); transform: translateY(-1px); }

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 10%, rgba(36,94,216,.18), transparent 34%),
    linear-gradient(135deg, #f8fbff 0%, #ffffff 42%, #f4f8fc 100%);
  padding: 74px 0 64px;
}
.hero::before {
  content: ""; position: absolute; inset: auto -160px -220px auto;
  width: 520px; height: 520px; background: rgba(24,133,91,.10); border-radius: 999px;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 46px; align-items: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  color: var(--safety); background: var(--safety-soft); border: 1px solid #cce9dc;
  padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 800;
}
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--safety); }
h1, h2, h3 { color: var(--navy); line-height: 1.08; margin: 0; }
h1 { font-size: clamp(42px, 6vw, 76px); letter-spacing: -.055em; }
h2 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -.035em; }
h3 { font-size: 22px; letter-spacing: -.02em; }
p { margin: 0; }
.lead { font-size: clamp(18px, 2vw, 22px); color: var(--gray-700); margin: 24px 0 0; max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; padding: 0; list-style: none; }
.hero-points li { background: var(--white); border: 1px solid var(--gray-200); color: var(--gray-700); padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.hero-card {
  background: rgba(255,255,255,.92); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 30px; position: relative; overflow: hidden;
}
.hero-card::after { content: ""; position: absolute; top: -70px; right: -70px; width: 170px; height: 170px; border-radius: 999px; background: rgba(36,94,216,.11); }
.hero-logo { width: 112px; height: 112px; object-fit: contain; border-radius: 26px; border: 1px solid var(--gray-100); margin-bottom: 24px; }
.stat-grid { display: grid; gap: 14px; margin-top: 24px; }
.stat {
  border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 18px; background: var(--gray-50);
}
.stat strong { display: block; color: var(--navy); font-size: 30px; line-height: 1; margin-bottom: 6px; }
.stat span { color: var(--gray-500); font-weight: 700; font-size: 13px; }

.section { padding: 86px 0; }
.section-soft { background: var(--gray-50); }
.section-dark { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: var(--white); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .section-intro { color: #d9e8f8; }
.section-head { max-width: 820px; margin-bottom: 36px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-eyebrow { color: var(--blue); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; margin-bottom: 12px; }
.section-intro { color: var(--gray-700); font-size: 18px; margin-top: 16px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 28px;
  box-shadow: 0 12px 34px rgba(7,28,52,.06); transition: .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-icon {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); font-size: 24px; margin-bottom: 18px;
}
.card-icon.safety { background: var(--safety-soft); color: var(--safety); }
.card p { color: var(--gray-700); margin-top: 12px; }
.card ul, .feature-list { margin: 18px 0 0; padding: 0; list-style: none; }
.card li, .feature-list li { position: relative; padding-left: 24px; margin: 10px 0; color: var(--gray-700); }
.card li::before, .feature-list li::before {
  content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--safety);
}

.split { display: grid; grid-template-columns: .95fr 1.05fr; gap: 44px; align-items: center; }
.panel {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow);
}
.panel-blue { background: linear-gradient(135deg, var(--navy), var(--blue)); color: var(--white); border: 0; }
.panel-blue h3 { color: var(--white); }
.panel-blue p, .panel-blue li { color: #e7efff; }
.profile-card { display: flex; gap: 20px; align-items: flex-start; }
.profile-avatar {
  width: 68px; min-width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); font-weight: 900; font-size: 22px;
}
.profile-avatar.safety { background: var(--safety-soft); color: var(--safety); }

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.profile-avatar.photo {
  padding: 0;
  overflow: hidden;
  background: var(--white);
}
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.badge { font-size: 12px; font-weight: 800; color: var(--gray-700); background: var(--gray-100); padding: 7px 10px; border-radius: 999px; }
.badge.blue { color: var(--blue); background: var(--blue-soft); }
.badge.safety { color: var(--safety); background: var(--safety-soft); }

.timeline { counter-reset: step; display: grid; gap: 18px; }
.timeline-item {
  display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 18px;
}
.timeline-item::before {
  counter-increment: step; content: counter(step); width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 16px; background: var(--navy); color: var(--white); font-weight: 900;
}
.timeline-item p { color: var(--gray-700); margin-top: 6px; }

.cta {
  background: linear-gradient(135deg, var(--navy) 0%, #123e6b 60%, var(--safety) 130%);
  color: var(--white); border-radius: var(--radius-lg); padding: 42px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; overflow: hidden;
}
.cta h2, .cta h3 { color: var(--white); }
.cta p { color: #dceaff; margin-top: 12px; max-width: 780px; }

.page-hero { background: linear-gradient(135deg, #f8fbff, #eef5ff); padding: 66px 0; border-bottom: 1px solid var(--gray-200); }
.breadcrumb { color: var(--gray-500); font-size: 13px; font-weight: 700; margin-bottom: 18px; }
.breadcrumb a { color: var(--blue); }
.page-hero h1 { font-size: clamp(38px, 5vw, 60px); max-width: 880px; }
.page-hero .lead { max-width: 880px; }

.contact-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: 28px; align-items: start; }
.contact-list { display: grid; gap: 14px; margin-top: 24px; }
.contact-item { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 18px; }
.contact-item strong { color: var(--navy); display: block; margin-bottom: 4px; }
.contact-item a { color: var(--blue); font-weight: 800; }
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 800; color: var(--navy); }
input, textarea, select {
  width: 100%; padding: 13px 14px; border: 1px solid var(--gray-200); border-radius: 14px;
  font: inherit; color: var(--text); background: var(--white); outline: none;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(36,94,216,.12); }
.form-note { color: var(--gray-500); font-size: 13px; }

.legal-content { max-width: 900px; }
.legal-content h2 { font-size: 28px; margin-top: 36px; }
.legal-content p, .legal-content li { color: var(--gray-700); }

.site-footer { background: #061529; color: #dce6f2; padding: 56px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr .9fr .9fr; gap: 32px; margin-bottom: 36px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { width: 56px; height: 56px; border-radius: 16px; }
.footer-brand strong { color: var(--white); font-size: 20px; }
.site-footer h3 { color: var(--white); font-size: 16px; margin-bottom: 12px; }
.site-footer a { color: #dce6f2; }
.site-footer a:hover { color: var(--white); }
.footer-links { display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; color: #9fb0c4; font-size: 13px; }

.reveal { opacity: 0; transform: translateY(18px); transition: .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Inline video blocks */
.video-card {
  position: relative;
  min-height: 360px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  background: var(--navy);
}
.inline-video {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  display: block;
  filter: saturate(.95) contrast(1.03);
}
.video-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,28,52,.06), rgba(7,28,52,.26));
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .inline-video { display: none; }
  .video-card { background: url('../img/it-digital-poster.jpg') center/cover no-repeat; }
}

@media (max-width: 1020px) {
  .nav-actions .btn { display: none; }
  .nav-links {
    display: none; position: absolute; top: 78px; left: 20px; right: 20px;
    background: var(--white); border: 1px solid var(--gray-200); border-radius: 20px; box-shadow: var(--shadow);
    padding: 14px; flex-direction: column; align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .nav-links a { border-radius: 12px; padding: 12px 14px; }
  .menu-toggle { display: block; }
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .container { width: min(100% - 28px, var(--max)); }
  .hero, .section, .page-hero { padding: 54px 0; }
  h1 { letter-spacing: -.04em; }
  .grid-2, .grid-3, .grid-4, .form-row { grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr; padding: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .profile-card { flex-direction: column; }
}
.section-dark .panel:not(.panel-blue) h3 { color: var(--navy); }
.section-dark .panel:not(.panel-blue) p,
.section-dark .panel:not(.panel-blue) li { color: var(--gray-700); }

/* Hero video background */
.hero-media {
  background: var(--navy);
  color: var(--white);
  min-height: 650px;
  display: flex;
  align-items: center;
}
.hero-media::before { display: none; }
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  filter: saturate(.9) contrast(1.02);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 72% 28%, rgba(24,133,91,.20), transparent 32%),
    linear-gradient(90deg, rgba(7,28,52,.94) 0%, rgba(7,28,52,.82) 42%, rgba(7,28,52,.58) 72%, rgba(7,28,52,.72) 100%);
}
.hero-media .hero-grid { z-index: 2; }
.hero-media h1,
.hero-media h2 { color: var(--white); }
.hero-media .lead,
.hero-media .section-intro { color: #e2edf8; }
.hero-media .kicker {
  color: #dff7ed;
  background: rgba(24,133,91,.18);
  border-color: rgba(122,229,184,.30);
  backdrop-filter: blur(10px);
}
.hero-media .hero-points li {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
  color: #eef6ff;
  backdrop-filter: blur(10px);
}
.hero-media .hero-card {
  background: rgba(255,255,255,.84);
  border-color: rgba(255,255,255,.35);
  backdrop-filter: blur(18px);
}
.hero-media .hero-card h2,
.hero-media .hero-card .stat strong { color: var(--navy); }
.hero-media .hero-card .section-intro,
.hero-media .hero-card .stat span { color: var(--gray-700); }

@media (max-width: 760px) {
  .hero-media { min-height: auto; }
  .hero-video { opacity: .75; }
  .hero-overlay {
    background: linear-gradient(180deg, rgba(7,28,52,.95), rgba(7,28,52,.88));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero-media {
    background:
      linear-gradient(90deg, rgba(7,28,52,.95), rgba(7,28,52,.88)),
      url('../img/hero-acsei-poster.jpg') center/cover no-repeat;
  }
}

/* Page hero video backgrounds */
.page-hero-video {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  display: flex;
  align-items: center;
  background: var(--navy);
  border-bottom: none;
}
.page-hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: .86;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 22, 40, .92), rgba(7, 22, 40, .70) 52%, rgba(7, 22, 40, .32)),
    linear-gradient(180deg, rgba(7, 22, 40, .20), rgba(7, 22, 40, .42));
}
.page-hero-video .page-hero-content {
  position: relative;
  z-index: 2;
}
.page-hero-video h1,
.page-hero-video .breadcrumb,
.page-hero-video .breadcrumb a {
  color: var(--white);
}
.page-hero-video .lead {
  color: #e2edf8;
}

@media (max-width: 760px) {
  .page-hero-video {
    min-height: 340px;
  }
  .page-hero-overlay {
    background: linear-gradient(90deg, rgba(7, 22, 40, .94), rgba(7, 22, 40, .74));
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-hero-bg-video {
    display: none;
  }
  .page-hero-expertises {
    background: linear-gradient(90deg, rgba(7, 22, 40, .88), rgba(7, 22, 40, .66)), url('../img/expertises-hse-qse-poster.jpg') center/cover no-repeat;
  }
  .page-hero-mase {
    background: linear-gradient(90deg, rgba(7, 22, 40, .88), rgba(7, 22, 40, .66)), url('../img/accompagnement-mase-poster.jpg') center/cover no-repeat;
  }
}
