:root {
  --violet: #3d2c56;
  --violet-light: #8a7ba0;
  --violet-soft: #f4f2f7;
  --accent: #d9793f;
  --accent-soft: #fbeee2;
  --bg-soft: #f8f7fa;
  --border: #e7e3ec;
  --ink: #2b2b2b;
  --ink-soft: #6b6b6b;
  --radius: 10px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #ffffff;
  line-height: 1.5;
}

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

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 60px; height: 60px; display: block; }
.brand-name { font-weight: 500; font-size: 14px; letter-spacing: 1.5px; color: var(--violet); }

nav { display: flex; align-items: center; gap: 28px; font-size: 13px; color: #4a4a4a; }
nav a { font-weight: 700; padding-bottom: 4px; border-bottom: 2px solid transparent; }
nav a:hover, nav a.active { color: var(--violet); }
nav a.active { border-bottom-color: var(--accent); }

.lang-switch { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-soft); padding-left: 20px; margin-left: 4px; border-left: 1px solid var(--border); }
.lang-switch a { color: var(--ink-soft); }
.lang-switch a:hover { color: var(--violet); }
.lang-switch a.active { color: var(--violet); }

.btn {
  display: inline-block;
  background: var(--violet);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}
.btn:hover { opacity: .92; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--violet);
  border: 1px solid var(--violet);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 32px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-soft) 0%, #ffffff 100%);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: 0;
}
.hero::before {
  width: 240px; height: 240px;
  background: var(--accent-soft);
  top: -100px; right: 8%;
  opacity: .7;
}
.hero::after {
  width: 160px; height: 160px;
  background: var(--violet-soft);
  bottom: -70px; left: 6%;
}
.hero > * { position: relative; z-index: 1; }
.hero img { width: 60px; height: 60px; margin-bottom: 20px; }
.eyebrow {
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--violet-light);
  font-weight: 500;
  margin: 0 0 14px;
}
.hero h1 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 auto;
  max-width: 620px;
  color: var(--ink);
  line-height: 1.3;
}
.hero h1 .accent { color: var(--accent); }

.hero.hero-photo {
  background: linear-gradient(180deg, rgba(43,31,61,.8) 0%, rgba(43,31,61,.62) 100%), url('img/hero-industrie.jpg') center/cover;
}
.hero.hero-photo::before, .hero.hero-photo::after { display: none; }
.hero.hero-photo .eyebrow { color: #ddceec; }
.hero.hero-photo h1 { color: #fff; }
.hero.hero-photo h1 .accent { color: #ffb37a; }

/* Photo banner (À propos) */
.photo-banner { position: relative; max-width: 900px; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden; }
.photo-banner img { width: 100%; height: 320px; object-fit: cover; object-position: center; display: block; filter: saturate(.82) contrast(1.03); }
.photo-banner img.pos-top { object-position: center 25%; }
.photo-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(61,44,86,.22) 0%, rgba(61,44,86,.06) 45%, rgba(217,121,63,.1) 100%);
  mix-blend-mode: multiply;
}

/* Sector cards with photo (Secteurs) */
.card-media { position: relative; padding: 0; overflow: hidden; }
.card-media img { width: 100%; height: 140px; object-fit: cover; display: block; filter: saturate(.82) contrast(1.03); }
.card-media .card-media-body { padding: 20px 24px 24px; }
.card-media::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 140px;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(61,44,86,.22) 0%, rgba(61,44,86,.06) 45%, rgba(217,121,63,.1) 100%);
  mix-blend-mode: multiply;
}
.hero p.sub {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 460px;
  margin: 20px auto 32px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Sections */
section { padding: 56px 32px; }
section.soft { background: var(--bg-soft); }
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--violet-light);
  font-weight: 500;
  margin: 0 0 12px;
}
.section-title::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}
.section-heading {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 32px;
  color: var(--ink);
}
.center-text {
  max-width: 620px;
  margin: 0 auto;
  text-align: justify;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--violet);
}
.grid-3 .card:nth-child(even)::before { background: var(--accent); }
.soft .card { border: none; }
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(61, 44, 86, 0.1);
}
.icon-circle {
  width: 44px; height: 44px;
  border-radius: 13px;
  background: var(--violet);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: #fff;
  font-size: 18px;
}
.grid-3 .card:nth-child(odd) .icon-circle,
.detail-row:nth-child(odd) .icon-circle {
  background: var(--violet-soft);
  color: var(--violet);
}
.grid-3 .card:nth-child(even) .icon-circle,
.detail-row:nth-child(even) .icon-circle {
  background: var(--accent-soft);
  color: var(--accent);
}
.icon-violet { background: var(--violet-soft); color: var(--violet); }
.icon-accent { background: var(--accent-soft); color: var(--accent); }
.icon-circle svg { width: 20px; height: 20px; }
.detail-row .icon-circle svg { width: 22px; height: 22px; }
.contact-item .icon-circle svg { width: 16px; height: 16px; }
.card h3 { font-size: 15px; font-weight: 500; margin: 0 0 8px; }
.card p { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.6; text-align: justify; }
.card-media-body p { text-align: left; }

.stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
  text-align: left;
  background: var(--violet);
  border-radius: var(--radius-lg);
  padding: 32px 44px;
  max-width: 900px;
  margin: 0 auto;
}
.stats > div { position: relative; padding-left: 18px; }
.stats > div::before {
  content: "";
  position: absolute;
  left: 0; top: 3px; bottom: 3px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.stats .num { font-size: 30px; font-weight: 700; color: #fff; margin: 0; }
.stats .label { font-size: 11px; color: #c9bfd7; letter-spacing: 1px; margin: 0; }

/* Row / detail list (expertises page) */
.detail-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  max-width: 820px;
  margin: 0 auto;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .icon-circle { flex-shrink: 0; width: 48px; height: 48px; font-size: 20px; margin: 0; }
.detail-row h3 { font-size: 17px; font-weight: 500; margin: 0 0 8px; }
.detail-row p { font-size: 14px; color: var(--ink-soft); margin: 0 0 12px; line-height: 1.6; text-align: justify; }
.detail-row .tag { font-size: 11px; color: var(--violet-light); letter-spacing: 1px; }

.pill-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.pill {
  background: var(--accent-soft);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  max-width: 820px;
  margin: 0 auto;
}
.contact-item { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.contact-item .icon-circle { width: 34px; height: 34px; font-size: 14px; margin: 0; }
label { display: block; font-size: 11px; color: var(--ink-soft); margin: 0 0 6px; letter-spacing: .5px; }
input, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  margin-bottom: 14px;
  color: var(--ink);
}
textarea { resize: vertical; min-height: 80px; }

@media (max-width: 640px) {
  header { flex-direction: column; gap: 14px; }
  nav { flex-wrap: wrap; justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .card p, .center-text, .detail-row p { text-align: left; }
}

/* Footer */
footer {
  background: var(--violet);
  border-radius: 24px 24px 0 0;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
footer p { margin: 0; font-size: 13px; color: #fff; opacity: .9; }
footer p.sectors { color: #c9bfd7; font-size: 12px; }
footer p.sectors a { color: inherit; text-decoration: underline; }
footer p.sectors a:hover { color: #fff; }

.cta-block { text-align: center; padding: 56px 32px; }
.cta-block p { font-size: 18px; font-weight: 500; margin: 0 0 16px; color: var(--ink); }

/* Page de garde (cover / intro) */
body.cover-lock { overflow: hidden; height: 100vh; }

.cover {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: opacity .6s ease;
}
.cover.cover-hide { opacity: 0; pointer-events: none; }

.cover-top {
  position: relative;
  flex: 0 0 auto;
  padding: 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  overflow: hidden;
}
.cover-top::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 0;
  background: radial-gradient(circle, rgba(217,121,63,.16) 0%, transparent 62%);
  animation: coverGlow 9s ease-in-out infinite alternate;
  pointer-events: none;
}
.cover-top .cover-mark .mark-circle { fill: var(--violet) !important; }
.cover-top .cover-mark .mark-arrow { fill: #ffffff !important; }
.cover-top .cover-title { color: var(--violet); }
.cover-top .cover-sub { color: var(--violet-light); }
.cover-top .cover-tagline { color: var(--ink-soft); }
.cover-top .cover-enter-btn { border-color: var(--violet); color: var(--violet); }
.cover-top .cover-enter-btn:hover { background: var(--violet-soft); border-color: var(--violet); }

.cover-lang-switch {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: auto;
}
.cover-lang-switch a { color: var(--violet-light); }
.cover-lang-switch a:hover, .cover-lang-switch a.active { color: var(--violet); }
.cover-lang-switch span { color: var(--border); }

.cover-bottom {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--violet);
}
.cover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}
.cover-video.active { opacity: 1; }
.cover-bottom::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(43,32,64,.55) 0%, rgba(43,32,64,.2) 100%);
  pointer-events: none;
}

.cover-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  text-align: center;
  cursor: auto;
}
.cover-content > * { opacity: 0; animation-fill-mode: forwards; }
.cover-mark { animation-name: coverReveal; animation-duration: 1.1s; animation-timing-function: ease-out; animation-delay: .2s; }
.cover-mark svg { width: 60px; height: 60px; display: block; animation: coverBreathe 3.6s ease-in-out 1.6s infinite; transform-origin: center; }
.cover-mark .mark-circle { opacity: 0; animation: coverFadeIn 1s ease-out .3s forwards; }
.cover-mark .mark-needle { animation: coverNeedleSwing 4s cubic-bezier(.22,1,.36,1) .5s both; transform-origin: 34px 34px; }
.cover-mark .mark-arrow { opacity: 0; animation: coverFadeIn .5s ease-out .5s forwards; }
.cover-mark .mark-arrow-dim { animation-name: coverFadeInDim; }
.cover-title {
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 4px;
  margin: 18px 0 4px;
  animation-name: coverUp; animation-duration: .6s; animation-timing-function: ease; animation-delay: .6s;
}
.cover-sub {
  color: #c9bfd7;
  font-size: 12px;
  letter-spacing: 2px;
  margin: 0 0 22px;
  animation-name: coverUp; animation-duration: .6s; animation-timing-function: ease; animation-delay: .8s;
}
.cover-slogan {
  color: #fff;
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 18px;
  animation-name: coverUp; animation-duration: .6s; animation-timing-function: ease; animation-delay: .95s;
}
.cover-slogan .accent { color: #ffb37a; }
.cover-top .cover-slogan { color: var(--violet); }
.cover-top .cover-slogan .accent { color: var(--accent); }
.cover-tagline {
  color: #d9cfe6;
  font-size: 14px;
  max-width: 320px;
  line-height: 1.6;
  margin: 0 0 28px;
  animation-name: coverUp; animation-duration: .6s; animation-timing-function: ease; animation-delay: 1.1s;
}
.cover-enter-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 1px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
  animation-name: coverUp; animation-duration: .6s; animation-timing-function: ease; animation-delay: 1.2s;
}
.cover-enter-btn:hover { background: rgba(255,255,255,.12); border-color: #fff; transform: translateY(-1px); }
.cover-enter-btn svg { width: 16px; height: 16px; }

@keyframes coverReveal { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes coverFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes coverFadeInDim { from { opacity: 0; } to { opacity: .55; } }
@keyframes coverUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes coverGlow {
  0% { transform: translate(-8%, -6%) scale(1); }
  100% { transform: translate(10%, 8%) scale(1.2); }
}
@keyframes coverBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes coverNeedleSwing {
  0% { transform: rotate(-70deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: rotate(0deg); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cover, .cover-top::before, .cover-bottom::after, .cover-content > *, .cover-content > * svg, .cover-content .mark-needle {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
