:root {
  --primary: #30353a;
  --primary-deep: #20252a;
  --secondary: #5f666c;
  --accent: #e38b28;
  --accent-dark: #c8751b;
  --light: #f3f5f6;
  --white: #ffffff;
  --text: #343a40;
  --muted: #667085;
  --border: #d9dde1;
  --container: 1280px;
  --header-height: 100px;
  --radius: 18px;
  --shadow: 0 22px 55px rgb(31 36 41 / 14%);
  --logo-height: 112px;
  --logo-height-mobile: 84px;
}

html[data-theme="dark"] {
  --light: #171b1f;
  --white: #24292e;
  --text: #edf0f2;
  --muted: #b1b8be;
  --border: #41484e;
  --primary: #343a40;
  --primary-deep: #15191d;
  --shadow: 0 22px 55px rgb(0 0 0 / 30%);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--light);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

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

section {
  scroll-margin-top: var(--header-height);
}

:focus-visible {
  outline: 3px solid rgb(227 139 40 / 45%);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--white);
  color: var(--primary-deep);
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(32 37 42 / 96%);
  color: var(--white);
  box-shadow: 0 6px 24px rgb(0 0 0 / 18%);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  min-height: var(--header-height);
  width: min(calc(100% - 40px), var(--container));
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.brand:hover,
.brand:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.brand img {
  width: auto;
  height: var(--logo-height);
  margin-block: -8px;
  filter: drop-shadow(0 4px 9px rgb(0 0 0 / 32%));
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.desktop-nav a {
  position: relative;
  padding-block: 9px;
  font-size: 1.3rem;
  font-weight: 700;
}

.desktop-nav a:not(.nav-cta)::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.desktop-nav a:not(.nav-cta):hover::after,
.desktop-nav a:not(.nav-cta):focus-visible::after {
  transform: scaleX(1);
}

.nav-cta {
  border-radius: 10px;
  background: var(--accent);
  color: var(--white);
  padding: 11px 18px;
  transition: background-color 180ms ease, transform 180ms ease;
}

.nav-cta:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.theme-toggle {
  display: inline-flex;
  min-width: 126px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: #fff;
  color: #20252a;
  padding: 9px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 5px 18px rgb(0 0 0 / 28%);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover {
  background: #fff4e8;
  transform: translateY(-1px);
}

.theme-toggle-icon {
  color: #f6b968;
  font-size: 1rem;
}

.theme-toggle-label {
  white-space: nowrap;
}

html[data-theme="dark"] .site-header {
  background: rgb(17 20 23 / 97%);
}

html[data-theme="dark"] .theme-toggle {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

html[data-theme="dark"] .carousel {
  background: #30363b;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  color: var(--text);
}

.menu-button {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 9px;
  background: transparent;
  color: var(--white);
  padding: 10px 14px;
  font-weight: 700;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgb(255 255 255 / 12%);
  background: var(--primary-deep);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav a {
  display: block;
  border-bottom: 1px solid rgb(255 255 255 / 9%);
  padding: 14px 22px;
  font-weight: 700;
}

.mobile-nav a:hover {
  background: rgb(255 255 255 / 5%);
  color: var(--accent);
}

/* Generic */
.section-inner,
.trust-grid,
.expertise-layout,
.contact-layout,
.footer-inner {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 800;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

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

.button-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 12px 30px rgb(227 139 40 / 24%);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  border: 1px solid rgb(255 255 255 / 48%);
  background: transparent;
  color: var(--white);
}

.button-secondary:hover {
  background: var(--white);
  color: var(--primary-deep);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgb(227 139 40 / 18%), transparent 30%),
    linear-gradient(125deg, var(--primary-deep) 0%, var(--primary) 58%, #484f55 100%);
  color: var(--white);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 520px;
  width: min(calc(100% - 40px), var(--container));
  align-items: center;
  margin-inline: auto;
  padding-block: 76px;
}

.hero-inner::after {
  position: absolute;
  top: 50%;
  right: -13%;
  width: min(68vw, 940px);
  aspect-ratio: 2 / 1;
  background: url("./assets/logo-lmsi.png") center / contain no-repeat;
  content: "";
  filter: grayscale(0.15);
  opacity: 0.28;
  pointer-events: none;
  transform: translateY(-50%);
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 20px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  background: rgb(255 255 255 / 7%);
  padding: 7px 12px;
  color: #f2c48f;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero h1 {
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(2.9rem, 5.3vw, 5rem);
  line-height: 1.01;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-intro {
  max-width: 820px;
  margin-bottom: 0;
  color: #d9dde0;
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
  line-height: 1.65;
}

/* Trust strip */
.trust-strip {
  position: relative;
  z-index: 2;
  background: var(--white);
  box-shadow: 0 14px 40px rgb(31 36 41 / 8%);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding-block: 0;
}

.trust-item {
  display: flex;
  min-height: 122px;
  align-items: center;
  gap: 14px;
  padding: 24px 18px;
  border-right: 1px solid var(--border);
}

.trust-item:last-child {
  border-right: 0;
}

.trust-item h2 {
  margin-bottom: 2px;
  font-size: 0.95rem;
  line-height: 1.3;
  white-space: nowrap;
}

.trust-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: nowrap;
}

/* Expertise sections */
.expertise-section {
  padding-block: 100px;
}

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

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

.expertise-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 72px;
}

.expertise-reverse .carousel {
  order: 2;
}

.expertise-reverse .expertise-content {
  order: 1;
}

.expertise-content h2 {
  margin-bottom: 20px;
  color: var(--accent);
  font-size: clamp(2.15rem, 4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.expertise-content {
  min-width: 0;
}

.expertise-intro {
  color: var(--muted);
  font-size: 1.08rem;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.service-list li {
  position: relative;
  padding-left: 22px;
  font-weight: 600;
}

.service-list .service-nowrap {
  white-space: nowrap;
}

#levage .service-list {
  grid-template-columns: minmax(0, 0.88fr) minmax(270px, 1.12fr);
  column-gap: 14px;
}

.service-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--accent);
  content: "✓";
  font-weight: 900;
}

.highlight-box {
  margin-bottom: 28px;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--white);
  padding: 20px 22px;
  box-shadow: 0 12px 30px rgb(31 36 41 / 7%);
}

.expertise-white .highlight-box {
  background: var(--light);
  box-shadow: none;
}

.highlight-box h3 {
  margin-bottom: 7px;
  color: var(--primary-deep);
}

.highlight-box p {
  margin: 0;
  color: var(--muted);
}

/* Carousels */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #d8dde1;
  box-shadow: var(--shadow);
}

.carousel::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.carousel-viewport {
  position: relative;
  aspect-ratio: 4 / 3;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 650ms ease;
}

.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-slide figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(transparent, rgb(0 0 0 / 82%));
  color: var(--white);
  padding: 44px 20px 17px;
  font-weight: 700;
}

.carousel-button {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 50%;
  background: rgb(32 37 42 / 65%);
  color: var(--white);
  font-size: 1.7rem;
  transform: translateY(-50%);
  transition: background-color 180ms ease, transform 180ms ease;
}

.carousel-button:hover {
  background: var(--accent);
  transform: translateY(-50%) scale(1.05);
}

.carousel-prev {
  left: 14px;
}

.carousel-next {
  right: 14px;
}

.carousel-dots {
  position: absolute;
  bottom: 58px;
  left: 50%;
  z-index: 5;
  display: flex;
  gap: 7px;
  transform: translateX(-50%);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 100px;
  background: rgb(255 255 255 / 60%);
  padding: 0;
  transition: width 200ms ease, background-color 200ms ease;
}

.carousel-dot.is-active {
  width: 28px;
  background: var(--accent);
}

/* Advantages */
.advantages {
  position: relative;
  overflow: hidden;
  background: var(--primary-deep);
  color: var(--white);
  padding-block: 88px;
}

.advantages::before {
  position: absolute;
  top: -180px;
  right: -120px;
  width: 430px;
  height: 430px;
  border: 80px solid rgb(227 139 40 / 7%);
  border-radius: 50%;
  content: "";
}

.advantages::after {
  position: absolute;
  bottom: -160px;
  left: -140px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgb(227 139 40 / 10%) 0%, rgb(227 139 40 / 0%) 70%);
  border-radius: 50%;
  content: "";
}

.section-heading {
  position: relative;
  max-width: 780px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2.15rem, 4vw, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.advantages-since {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  font-weight: 700;
  line-height: 1.3;
}

.advantages-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.advantages-grid article {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 16px;
  background: linear-gradient(155deg, rgb(255 255 255 / 7%), rgb(255 255 255 / 2%));
  padding: 25px;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.advantages-grid article::before {
  display: block;
  width: 42px;
  height: 4px;
  margin-bottom: 22px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  transition: width 220ms ease;
}

.advantages-grid article:hover {
  border-color: rgb(227 139 40 / 45%);
  background: linear-gradient(155deg, rgb(227 139 40 / 12%), rgb(255 255 255 / 3%));
  box-shadow: 0 18px 40px rgb(0 0 0 / 25%);
  transform: translateY(-6px);
}

.advantages-grid article:hover::before {
  width: 60px;
}

.advantages-grid h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.advantages-grid p {
  margin: 0;
  color: #cbd1d6;
  line-height: 1.5;
}

/* Contact */
.contact-section {
  background: var(--white);
  padding-block: 100px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--light);
  box-shadow: 0 18px 48px rgb(31 36 41 / 10%);
}

.contact-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background: var(--primary-deep);
  color: var(--white);
  padding: clamp(42px, 5vw, 72px);
  text-align: left;
}

.contact-content h2 {
  margin-bottom: 18px;
  color: var(--white);
  font-size: clamp(2.15rem, 4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.contact-content > p {
  max-width: 440px;
  margin-bottom: 0;
  color: #cbd1d6;
  font-size: 1.08rem;
}

.contact-content > p:not(.eyebrow) {
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  border: 0;
  border-radius: 0;
  background: var(--light);
  padding: clamp(30px, 4vw, 52px);
  box-shadow: none;
}

.contact-form .form-field-message,
.contact-form .button,
.contact-form .form-information {
  grid-column: 1 / -1;
}

.contact-form .button {
  justify-self: center;
  min-width: min(100%, 260px);
  margin-top: 4px;
}

.form-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--primary-deep);
  font-weight: 800;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  padding: 13px 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-field textarea {
  min-height: 145px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(227 139 40 / 16%);
}

.form-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form-status {
  grid-column: 1 / -1;
  min-height: 1.25em;
  margin: -4px 0 0;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

.form-status:empty {
  display: none;
}

.form-status.is-error {
  color: #9f1d20;
}

.form-status.is-success {
  color: #176235;
}

.form-information {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

/* Footer */
.site-footer {
  background: var(--primary-deep);
  color: #cdd2d6;
  padding-top: 44px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner img {
  width: auto;
  height: var(--logo-height);
  border-radius: 8px;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-inner a:hover {
  color: var(--accent);
}

.footer-bottom {
  width: min(calc(100% - 40px), var(--container));
  margin: 28px auto 0;
  border-top: 1px solid rgb(255 255 255 / 12%);
  padding-block: 22px;
  color: #9fa7ad;
  font-size: 0.86rem;
  text-align: center;
}

/* Responsive */
@media (max-width: 1020px) {
  .desktop-nav {
    gap: 16px;
  }

  .header-inner {
    gap: 18px;
  }

  .expertise-layout {
    gap: 48px;
  }
}

@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  .hero-inner {
    min-height: auto;
    padding-block: 72px;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-item h2,
  .trust-item p {
    white-space: normal;
  }

  .trust-item:nth-child(2) {
    border-right: 0;
  }

  .trust-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .expertise-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .expertise-reverse .carousel,
  .expertise-reverse .expertise-content {
    order: initial;
  }

  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-content {
    min-height: 300px;
  }
}

@media (max-width: 620px) {
  :root {
    --header-height: 82px;
  }

  .header-inner,
  .hero-inner,
  .section-inner,
  .trust-grid,
  .expertise-layout,
  .contact-layout,
  .footer-inner,
  .footer-bottom {
    width: min(calc(100% - 28px), var(--container));
  }

  .brand {
    max-width: 180px;
  }

  .brand img {
    height: var(--logo-height-mobile);
    margin-block: -5px;
  }

  .footer-inner img {
    height: var(--logo-height-mobile);
  }

  .menu-button {
    padding: 9px 12px;
  }

  .theme-toggle {
    min-width: 42px;
    padding: 9px 11px;
  }

  .theme-toggle-label {
    display: none;
  }

  .hero-inner {
    /* L'espace inférieur est réservé au logo décoratif. */
    padding-block: 50px clamp(205px, 54vw, 250px);
  }

  /* Logo décoratif mobile : centré, entier et séparé du texte. */
  .hero-inner::after {
    top: auto;
    right: auto;
    bottom: 24px;
    left: 50%;
    width: min(92vw, 470px);
    aspect-ratio: 2 / 1;
    background-position: center;
    background-size: contain;
    filter: grayscale(0.08);
    opacity: 0.3;
    transform: translateX(-50%);
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 12vw, 3.8rem);
  }

  .hero-kicker {
    border-radius: 10px;
    line-height: 1.45;
  }

  .trust-grid,
  .advantages-grid,
  .service-list,
  #levage .service-list {
    grid-template-columns: 1fr;
  }

  .service-list .service-nowrap {
    white-space: normal;
  }

  .trust-item,
  .trust-item:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .trust-item:last-child {
    border-bottom: 0;
  }

  .expertise-section,
  .contact-section {
    padding-block: 70px;
  }

  .expertise-layout {
    gap: 38px;
  }

  .carousel-button {
    width: 40px;
    height: 40px;
  }

  .contact-form {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .contact-form .form-field-message,
  .contact-form .button,
  .contact-form .form-status,
  .contact-form .form-information {
    grid-column: auto;
  }

  .contact-content {
    min-height: auto;
    padding: 38px 24px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-inner nav {
    justify-content: center;
    gap: 14px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* État d'envoi du formulaire */
.contact-form .button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}
