:root {
  --blue: #0717e8;
  --blue-dark: #07105c;
  --red: #f20505;
  --ink: #111424;
  --muted: #5b6072;
  --line: #dce1ee;
  --surface: #ffffff;
  --soft: #f5f7fb;
  --shadow: 0 22px 55px rgba(7, 16, 92, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background: var(--surface);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  color: var(--blue);
}

.brand img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blue);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  color: var(--blue-dark);
  font-weight: 800;
}

.site-nav a {
  border-bottom: 2px solid transparent;
  padding: 8px 0;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  border-color: var(--red);
  color: var(--blue);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--blue-dark);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(24px, 6vw, 70px);
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: clamp(62px, 8vw, 106px) clamp(20px, 6vw, 88px);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(7, 16, 92, 0.94), rgba(7, 23, 232, 0.72)),
    url("assets/sesia-logo.svg") center / cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 18%;
  background: linear-gradient(0deg, #fff, rgba(255, 255, 255, 0));
  z-index: -1;
}

.hero-orbit span {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero-orbit span:nth-child(1) {
  width: 320px;
  height: 320px;
  right: 10%;
  top: 14%;
}

.hero-orbit span:nth-child(2) {
  width: 180px;
  height: 180px;
  left: 10%;
  bottom: 10%;
  animation-delay: -2s;
}

.hero-orbit span:nth-child(3) {
  width: 86px;
  height: 86px;
  right: 38%;
  bottom: 22%;
  background: rgba(242, 5, 5, 0.18);
  animation-delay: -4s;
}

.hero-content,
.hero-panel {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero .eyebrow,
.contact .eyebrow {
  color: #fff;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(4rem, 14vw, 10rem);
  line-height: 0.88;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1.05;
}

h3 {
  margin-bottom: 10px;
  color: var(--blue-dark);
  font-size: 1.25rem;
}

.lead {
  max-width: 660px;
  margin-bottom: 28px;
  font-size: clamp(1.15rem, 2.6vw, 1.65rem);
}

.hero-actions,
.quick-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quick-contact {
  max-width: 760px;
  margin-top: 22px;
}

.quick-contact a {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.92rem;
  font-weight: 800;
}

.hero-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-panel img {
  width: min(100%, 300px);
  margin: auto;
  border-radius: 50%;
  background: #fff;
}

.hero-panel strong,
.hero-panel span {
  display: block;
}

.hero-panel strong {
  font-size: 1.25rem;
}

.hero-panel span {
  color: rgba(255, 255, 255, 0.82);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 14px 30px rgba(242, 5, 5, 0.24);
}

.button.secondary {
  background: #fff;
  color: var(--blue-dark);
}

.section {
  padding: clamp(64px, 9vw, 108px) clamp(20px, 6vw, 88px);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 34px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service-card,
.project-list article {
  min-height: 220px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(17, 20, 36, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.service-card:hover,
.project-list article:hover,
.map-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(7, 16, 92, 0.16);
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.service-card:nth-child(even) .icon {
  background: var(--red);
}

.expertise,
.location,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: center;
}

.expertise {
  background: var(--soft);
}

.expertise-copy p:last-child,
.location p {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.1rem;
}

.stats {
  display: grid;
  gap: 14px;
}

.stats div {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  min-height: 88px;
  padding: 16px 20px;
  border-left: 6px solid var(--red);
  background: #fff;
  box-shadow: 0 16px 34px rgba(17, 20, 36, 0.07);
}

.stats strong {
  color: var(--blue);
  font-size: 2.25rem;
}

.stats span {
  font-size: 1.05rem;
  font-weight: 900;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-list article {
  border-top: 6px solid var(--blue);
}

.project-list article:nth-child(2) {
  border-top-color: var(--red);
}

.location {
  background: #fff;
}

.map-card {
  display: grid;
  min-height: 260px;
  align-content: end;
  gap: 6px;
  padding: 28px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(7, 16, 92, 0.94), rgba(242, 5, 5, 0.64)),
    url("assets/sesia-logo.svg") center / cover;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.map-card span {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fff;
  color: var(--blue-dark);
  font-weight: 900;
}

.map-card strong {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.map-card small {
  font-size: 1.05rem;
  font-weight: 800;
}

.contact {
  color: #fff;
  background: var(--blue-dark);
}

.contact p {
  color: rgba(255, 255, 255, 0.82);
}

.contact-lines {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.contact-lines a {
  width: fit-content;
  border-bottom: 2px solid rgba(255, 255, 255, 0.36);
  font-weight: 900;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--blue-dark);
  font-weight: 900;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(7, 23, 232, 0.16);
  border-color: var(--blue);
}

.form-note {
  min-height: 24px;
  margin: 0;
  color: var(--blue-dark);
  font-weight: 800;
}

.floating-action {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 15px;
  border-radius: 8px;
  background: #21a65b;
  color: #fff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  font-weight: 900;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px clamp(20px, 6vw, 88px);
  background: #090b18;
  color: #fff;
}

.site-footer span {
  color: var(--red);
  font-weight: 900;
}

.site-footer p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-18px) scale(1.04);
  }
}

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

@media (max-width: 940px) {
  .hero,
  .project-list,
  .expertise,
  .location,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 420px;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 68px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    right: 18px;
    left: 18px;
    display: none;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .hero {
    min-height: auto;
    padding-top: 68px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card,
  .project-list article {
    min-height: auto;
  }
}

@media (max-width: 440px) {
  .brand span {
    font-size: 0.95rem;
  }

  .button {
    width: 100%;
  }

  .stats div {
    grid-template-columns: 70px 1fr;
  }

  .floating-action {
    right: 12px;
    bottom: 12px;
  }
}

/* ===== CARROUSEL ===== */

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin-top: 20px;

  /* effet premium (fade côtés) */
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

/* track (ligne d’images) */
.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

/* images */
.carousel-track img {
  width: 300px;
  height: 400px;
  object-fit: cover;
  margin: 10px;
  border-radius: 12px;

  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* effet zoom */
.carousel-track img:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* ===== BOUTONS ===== */

.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;

  font-size: 26px;
  padding: 12px 14px;

  cursor: pointer;
  z-index: 10;

  border-radius: 50%;
  transition: all 0.3s ease;
}

/* hover boutons */
.prev:hover, .next:hover {
  background: rgba(0,0,0,0.85);
  transform: translateY(-50%) scale(1.1);
}

/* position */
.prev {
  left: 10px;
}

.next {
  right: 10px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {

  .carousel-track img {
    width: 240px;
    height: 320px;
  }

  .prev, .next {
    font-size: 22px;
    padding: 10px;
  }
}

/* ===== MOBILE PETIT ===== */

@media (max-width: 480px) {

  .carousel-track img {
    width: 200px;
    height: 280px;
  }

  .carousel {
    mask-image: none; /* éviter bug sur certains mobiles */
  }
}
