/* D2A — feuille de style unique (remplace thème Bridge + WPBakery) */

:root {
  --red: #dd3333;
  --menu-red: #d33333;
  --text: #3e3e3e;
  --title: #161616;
  --h1: #303030;
  --muted: #878787;
  --input: #cfd0d3;
  --sidebar: 260px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 400 14px/26px Montserrat, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; transition: color .2s; }
h1, h2, h3, h4, p { margin: 0; }
p + p { margin-top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Menu vertical ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 100;
  width: var(--sidebar);
  padding: 10px 30px;
  background: #fff;
  overflow-y: auto;
  /* logo et menu en haut, langue en bas */
  display: flex; flex-direction: column;
}
.sidebar .logo { display: block; flex: none; width: 200px; margin-top: 40px; }
.sidebar .logo img { width: 200px; transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), filter .4s; }
.sidebar .logo:hover img, .sidebar .logo:focus-visible img {
  transform: scale(1.06);
  filter: drop-shadow(0 4px 10px rgba(221, 51, 51, .25));
}
.sidebar nav { flex: 1 0 auto; }
.menu-toggle { display: none; }
.menu { list-style: none; margin: 40px 0 30px; padding: 0; }
.menu a, .sidebar .lang {
  display: flex; align-items: center;
  height: 51px;
  color: var(--menu-red);
  font: 700 13px/50px Montserrat, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.menu .ico { position: relative; width: 36px; height: 36px; flex: none; }
.menu .ico img { position: absolute; inset: 0; width: 36px; height: 36px; transition: opacity .2s; }
.menu .ico img + img { opacity: 0; }
.menu a:hover .ico img:first-child { opacity: 0; }
.menu a:hover .ico img + img { opacity: 1; }
.menu .ico + span { padding-left: 10px; }
/* Clic : onde rouge depuis le point touché, l'icône rebondit et le texte glisse */
.menu a { position: relative; overflow: hidden; }
.menu .ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(221, 51, 51, .18);
  transform: scale(0); animation: menu-ripple .6s ease-out forwards;
}
@keyframes menu-ripple { to { transform: scale(1); opacity: 0; } }
.menu a.tap .ico { animation: menu-pop .45s cubic-bezier(.34, 1.56, .64, 1); }
.menu a.tap .ico + span { animation: menu-slide .45s ease; }
@keyframes menu-pop { 35% { transform: scale(.8) rotate(-8deg); } }
@keyframes menu-slide { 40% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) {
  .menu .ripple { display: none; }
  .menu a.tap .ico, .menu a.tap .ico + span { animation: none; }
}
.sidebar .lang { flex: none; height: 40px; margin-bottom: 20px; }
.sidebar .lang svg { width: 16px; height: 11px; margin-right: 6px; }

main, .site-footer { margin-left: var(--sidebar); }

/* ---------- Titres de section ---------- */
.section-title {
  text-align: center;
  font: 400 24px/40px Montserrat, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--title);
}
.section-title.big { font-size: 31px; line-height: 49px; color: var(--h1); }
.sep { width: 115px; height: 1px; margin: 20px auto 24px; background: var(--red); }
.sep.white { background: #fff; }
.on-dark, .on-dark .section-title { color: #fff; }

/* ---------- Slider d'accueil ---------- */
.slider { position: relative; height: 100vh; min-height: 500px; overflow: hidden; background: #000; }
.slide {
  position: absolute; inset: 0;
  background: center / cover no-repeat;
  opacity: 0; transition: opacity 1s ease;
}
.slide.active { opacity: 1; z-index: 1; }
/* Images de fond : WebP avec repli JPG ; .lazy = chargée par site.js à l'approche de l'écran */
.slide-1 { background-image: url(../img/slide-1.jpg); background-image: image-set(url(../img/slide-1.webp) type("image/webp"), url(../img/slide-1.jpg) type("image/jpeg")); }
.slide-2 { background-image: url(../img/slide-2.jpg); background-image: image-set(url(../img/slide-2.webp) type("image/webp"), url(../img/slide-2.jpg) type("image/jpeg")); }
.slide-3 { background-image: url(../img/slide-3.jpg); background-image: image-set(url(../img/slide-3.webp) type("image/webp"), url(../img/slide-3.jpg) type("image/jpeg")); }
.lazy:not(.in) { background-image: none !important; }
.slide-content {
  position: absolute; left: 1%; width: 98%; top: 45%;
  transform: translateY(-50%);
  text-align: center; color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .4);
}
.slide-3 .slide-content { top: 50%; }
.slide-content > * { opacity: 0; transform: translateY(20px); transition: opacity .8s, transform .8s; }
.slide.active .slide-content > * { opacity: 1; transform: none; }
.slide.active .slide-content > *:nth-child(1) { transition-delay: .9s; }
.slide.active .slide-content > *:nth-child(2) { transition-delay: 1.3s; }
.slide-sub {
  font: 600 28px/38.5px Montserrat, sans-serif;
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 20px;
}
.slide-title {
  font: 700 20px/25px "Open Sans", sans-serif;
  text-transform: uppercase;
}
.slide-3 .slide-sub {
  font: 700 28px/30px "Open Sans", sans-serif; letter-spacing: 0;
  text-shadow: none; padding: 10px;
}
.slider-dots {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 28px;
  display: flex; justify-content: center; gap: 6px;
  margin: 0; padding: 0; list-style: none;
}
.slider-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: #fff; opacity: .5; cursor: pointer;
}
.slider-dots button[aria-current="true"] { opacity: 1; }

/* ---------- Notre société ---------- */
.societe {
  background: url(../img/societe-bg.jpg) 50% 0 / auto fixed;
  background-image: image-set(url(../img/societe-bg.webp) type("image/webp"), url(../img/societe-bg.jpg) type("image/jpeg"));
  padding: 50px 15px 100px;
  text-align: center;
}
.societe .inner { max-width: 723px; margin: 0 auto; }
.societe blockquote { margin: 0 auto; max-width: 679px; padding: 14px 14px 14px 10px; }
.societe blockquote p { margin: 0 0 12px; padding-top: 26px; }
.societe blockquote p:first-child { padding-top: 0; }
.societe strong { font-size: 16px; font-weight: 700; }
.secteurs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 70px 0 20px; }
.secteur { position: relative; height: 100px; }
.secteur img { position: absolute; left: 50%; top: 0; height: 100px; width: auto; transform: translateX(-50%); transition: opacity .3s; }
.secteur img + img { opacity: 0; }
.secteur:hover img:first-child { opacity: 0; }
.secteur:hover img + img { opacity: 1; }

/* ---------- Prestations ---------- */
.prestations { padding-top: 50px; background: #fff; }
.presta-row { display: grid; grid-template-columns: 1fr 1fr; }
.presta-row.reverse .presta-img { order: 2; }
.presta-img { background: 50% 50% / cover no-repeat; min-height: 435px; }
.presta-row:has(.integration) { min-height: 585px; }
.presta-row:has(.bureau), .presta-row:has(.programmation) { min-height: 485px; }
.presta-img.integration { background-image: url(../img/prestations/integration.jpg); background-image: image-set(url(../img/prestations/integration.webp) type("image/webp"), url(../img/prestations/integration.jpg) type("image/jpeg")); }
.presta-img.bureau { background-image: url(../img/prestations/bureau-etudes.jpg); background-image: image-set(url(../img/prestations/bureau-etudes.webp) type("image/webp"), url(../img/prestations/bureau-etudes.jpg) type("image/jpeg")); }
.presta-img.green { background-image: url(../img/prestations/green.jpg); background-image: image-set(url(../img/prestations/green.webp) type("image/webp"), url(../img/prestations/green.jpg) type("image/jpeg")); }
.presta-img.programmation { background-image: url(../img/prestations/programmation.jpg); background-image: image-set(url(../img/prestations/programmation.webp) type("image/webp"), url(../img/prestations/programmation.jpg) type("image/jpeg")); }
.presta-text {
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px 30px;
  text-align: justify;
}
.presta-text img { width: 80px; height: 80px; margin: 0 auto; }
.presta-text .sep { margin: 15px auto 20px; }
.presta-text h3 {
  text-align: center;
  font: 400 17px/30px Montserrat, sans-serif;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--title);
  margin-bottom: 20px;
}

/* ---------- Solutions ---------- */
.solutions { background: var(--red); padding: 50px 35px 60px; }
.solutions .hint { text-align: center; color: #fff; font-weight: 700; margin-bottom: 0; }
.hint-touch { display: none; }
.solution { position: relative; margin-top: 5px; overflow: hidden; }
.solution > picture { display: block; }
.solution > picture img { width: 100%; height: auto; }
.solution .over {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .75);
  opacity: 0; transition: opacity .4s ease-in-out;
  color: #fff; text-align: center;
}
.solution:hover .over, .solution:focus-within .over, .solution.open .over { opacity: 1; }
.solution .box {
  margin: 0 30px; padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, .45);
}
.solution h3 { font: 700 14px/26px Montserrat, sans-serif; text-transform: uppercase; margin-bottom: 6px; }
.solution .pictos { margin: 10px auto; width: 100%; height: auto; max-height: 35px; object-fit: contain; }

/* ---------- Marques & certifications ---------- */
.marques {
  background: url(../img/marques-bg.jpg) center / cover no-repeat;
  background-image: image-set(url(../img/marques-bg.webp) type("image/webp"), url(../img/marques-bg.jpg) type("image/jpeg"));
  padding: 50px 65px 170px;
}
.marques .section-title { color: #fff; }
.carousel { position: relative; max-width: 1035px; margin: 0 auto; }
.carousel-viewport { overflow: hidden; }
.carousel-track { display: flex; transition: transform .5s ease; }
.logo-cell { flex: 0 0 20%; padding: 0 0 20px; }
.logo-cell img {
  width: 100%; aspect-ratio: 345 / 198; object-fit: contain; background: #fff;
  filter: grayscale(100%); transition: filter .3s;
}
.logo-cell:hover img { filter: none; }
.carousel-arrow {
  position: absolute; top: 50px; width: 20px; height: 20px; padding: 0;
  border: 0; border-radius: 50%; background: #fff; color: #222; cursor: pointer;
  display: grid; place-items: center;
}
.carousel-arrow svg { width: 10px; height: 10px; }
.carousel-arrow.prev { left: -30px; }
.carousel-arrow.next { right: -30px; }
.carousel-dots { display: flex; justify-content: center; gap: 5px; margin: 0; padding: 0; list-style: none; }
.carousel-dots button {
  width: 20px; height: 20px; padding: 5px; border: 0; background: none; cursor: pointer;
}
.carousel-dots button::before {
  content: ""; display: block; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; opacity: .25;
}
.carousel-dots button[aria-current="true"]::before { opacity: .75; }
.marques .certifs-title { margin-top: 40px; }
.certifs .logo-cell { padding-bottom: 0; }
/* Carrousel dont tous les logos tiennent à l'écran : affichage fixe et centré */
.carousel.static .carousel-track { justify-content: center; transform: none !important; }
.carousel.static .carousel-arrow, .carousel.static .carousel-dots, .carousel.static [aria-hidden="true"] { display: none; }

/* ---------- Contact ---------- */
.contact { padding: 50px 20px 0; }
.contact-btn {
  display: flex; width: max-content; margin: 0 auto 30px;
  border: 1px solid var(--red);
  color: var(--red); background: #fff;
  font: 700 14px/66px Montserrat, sans-serif;
  letter-spacing: 1px; text-transform: uppercase;
  cursor: pointer; padding: 0;
  transition: background .2s, color .2s;
}
.contact-btn span { padding: 0 40px; }
.contact-btn .env { display: grid; place-items: center; width: 64px; background: var(--red); color: #fff; }
.contact-btn .env svg { width: 26px; height: 22px; fill: currentColor; }
.contact-btn:hover, .contact-btn[aria-expanded="true"] { background: var(--red); color: #fff; }
.contact-btn:hover .env, .contact-btn[aria-expanded="true"] .env { border-left: 1px solid rgba(255,255,255,.4); }
.contact-form { max-width: 1105px; margin: 0 auto 30px; }
.contact-form[hidden] { display: none; }
.contact-form label { display: block; margin-bottom: 12px; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form textarea {
  display: block; width: 100%; margin-top: 4px;
  border: 0; border-radius: 0;
  background: var(--input); color: #818181;
  font: 400 13px/17px Montserrat, sans-serif;
  padding: 15px;
}
.contact-form textarea { height: 230px; resize: vertical; }
.contact-form .hp { position: absolute; left: -9999px; }
.cf-turnstile { display: flex; justify-content: center; margin: 25px auto 0; }
.contact-form button[type=submit] {
  display: block; margin: 25px auto 0;
  height: 49px; padding: 0 23px;
  border: 1px solid var(--red); background: transparent; color: var(--red);
  font: 700 12px/47px Montserrat, sans-serif; letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; transition: background .2s, color .2s;
}
.contact-form button[type=submit]:hover { background: var(--red); color: #fff; }
.contact-form button[disabled] { opacity: .5; cursor: wait; }
.form-status { text-align: center; margin-top: 15px; min-height: 26px; }
.form-status.ok { color: #2e7d32; }
.form-status.err { color: var(--red); }
.map { display: block; width: 100%; height: 627px; border: 0; padding: 0 5px; }
.map-wrap { padding: 0 0 50px; border-bottom: 1px solid var(--red); margin: 0 15px; }
/* Carte Google chargée seulement au clic (aucun échange avec Google avant) */
.map-facade {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  height: 627px; margin: 0 5px; padding: 20px;
  background: #e8e6e1; text-align: center; color: var(--text);
}
.map-facade .pin { width: 34px; height: 46px; fill: var(--red); }
.map-facade address { font-style: normal; font-weight: 700; }
.map-facade button {
  height: 49px; padding: 0 23px;
  border: 1px solid var(--red); background: #fff; color: var(--red);
  font: 700 12px/47px Montserrat, sans-serif; letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; transition: background .2s, color .2s;
}
.map-facade button:hover { background: var(--red); color: #fff; }
.map-facade small { font-size: 11px; line-height: 16px; color: var(--muted); max-width: 420px; }
.map-facade small a { color: inherit; text-decoration: underline; }

/* ---------- Pied de page ---------- */
.site-footer {
  display: grid; grid-template-columns: repeat(3, 1fr); align-items: center;
  padding: 48px 24px; text-align: center; color: var(--muted);
}
.social { display: flex; justify-content: center; gap: 14px; }
.social svg { height: 18px; width: auto; fill: var(--red); }
.site-footer b { font-weight: 700; }

/* ---------- Bouton retour en haut ---------- */
.to-top {
  position: fixed; right: 25px; bottom: 65px; z-index: 50;
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid #e8e8e8; background: rgba(255,255,255,.5); color: #cdcdcd;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, color .2s;
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { color: var(--red); }
.to-top svg { width: 14px; height: 16px; fill: currentColor; }

/* ---------- Pages intérieures ---------- */
.page-header {
  height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: center / 1920px auto fixed; color: #fff; text-align: center;
}
.page-header.certifications { background-image: url(../img/header-certifications.jpg); background-image: image-set(url(../img/header-certifications.webp) type("image/webp"), url(../img/header-certifications.jpg) type("image/jpeg")); }
.page-header.legal { background-image: url(../img/header-legal.jpg); background-image: image-set(url(../img/header-legal.webp) type("image/webp"), url(../img/header-legal.jpg) type("image/jpeg")); }
.page-header h1 { font: 300 45px/1.2 Montserrat, sans-serif; letter-spacing: 6px; text-transform: uppercase; }
.breadcrumb { font-size: 11px; color: #fff; margin-top: 6px; }
.breadcrumb a { color: #fff; }
.page-content { max-width: 1100px; margin: 0 auto; padding: 40px 30px 70px; }
.legal-text { max-width: 880px; font-size: 12px; line-height: 21px; }
.legal-text h2 { font: 700 12px/21px Montserrat, sans-serif; text-transform: uppercase; color: var(--title); margin: 28px 0 6px; }
.legal-text h2:first-child { margin-top: 0; }
.legal-text p { margin: 0 0 12px; }
.certif-card { max-width: 920px; margin: 0 auto; padding: 30px; border: 1px solid #ccc; text-align: center; }
.certif-card img { margin: 0 auto 15px; }

/* ---------- Tablette / mobile ---------- */
@media (max-width: 1000px) {
  :root { --sidebar: 0px; }
  .sidebar {
    inset: 0 0 auto 0; width: auto; height: 70px; padding: 0 16px;
    display: flex; align-items: center;
    overflow: visible; box-shadow: 0 1px 3px rgba(0,0,0,.08);
  }
  .sidebar { flex-direction: row; }
  .sidebar .logo { width: 90px; margin: 0; }
  .sidebar .logo img { width: 90px; }
  .sidebar nav { flex: none; }
  /* Mobile : langue dans la barre du haut, à gauche du bouton menu */
  .sidebar .lang { order: 2; margin: 0 0 0 auto; font-size: 11px; }
  .menu-toggle {
    order: 3;
    display: grid; place-items: center; width: 44px; height: 44px; margin-left: 4px;
    border: 0; background: none; color: var(--menu-red); cursor: pointer;
  }
  .menu-toggle svg { width: 24px; height: 20px; fill: currentColor; }
  .menu {
    position: absolute; top: 70px; left: 0; right: 0; margin: 0;
    padding: 0 16px 10px; background: #fff;
    display: none; box-shadow: 0 6px 8px rgba(0,0,0,.08);
  }
  .menu.open { display: block; }
  main { padding-top: 70px; }
  .slider { height: calc(100vh - 70px); }
  .slide-sub { font-size: 20px; line-height: 28px; }
  .slide-title { font-size: 15px; }
  /* Variantes 960 px des grands fonds */
  .slide-1 { background-image: url(../img/slide-1-960.jpg); background-image: image-set(url(../img/slide-1-960.webp) type("image/webp"), url(../img/slide-1-960.jpg) type("image/jpeg")); }
  .slide-2 { background-image: url(../img/slide-2-960.jpg); background-image: image-set(url(../img/slide-2-960.webp) type("image/webp"), url(../img/slide-2-960.jpg) type("image/jpeg")); }
  .slide-3 { background-image: url(../img/slide-3-960.jpg); background-image: image-set(url(../img/slide-3-960.webp) type("image/webp"), url(../img/slide-3-960.jpg) type("image/jpeg")); }
  .societe { background-image: url(../img/societe-bg-960.jpg); background-image: image-set(url(../img/societe-bg-960.webp) type("image/webp"), url(../img/societe-bg-960.jpg) type("image/jpeg")); }
  .marques { background-image: url(../img/marques-bg-960.jpg); background-image: image-set(url(../img/marques-bg-960.webp) type("image/webp"), url(../img/marques-bg-960.jpg) type("image/jpeg")); }
  .page-header.certifications { background-image: url(../img/header-certifications-960.jpg); background-image: image-set(url(../img/header-certifications-960.webp) type("image/webp"), url(../img/header-certifications-960.jpg) type("image/jpeg")); }
  .page-header.legal { background-image: url(../img/header-legal-960.jpg); background-image: image-set(url(../img/header-legal-960.webp) type("image/webp"), url(../img/header-legal-960.jpg) type("image/jpeg")); }
  .societe, .page-header { background-attachment: scroll; }
  .societe { background-size: cover; }
  .presta-row { grid-template-columns: 1fr; }
  .presta-row.reverse .presta-img { order: 0; }
  .presta-img { min-height: 300px; }
  .solutions { padding: 50px 16px; }
  /* Mobile : le texte se déplie sous l'image quand on appuie dessus */
  .solution .over {
    position: static; opacity: 1; background: #222;
    display: grid; grid-template-rows: 0fr; align-items: stretch; overflow: hidden;
    transition: grid-template-rows .45s ease;
  }
  .solution .box { margin: 0; border: 0; padding: 0 16px; min-height: 0; overflow: hidden; transition: padding .45s ease; }
  .solution.open .over { grid-template-rows: 1fr; }
  .solution.open .box { padding: 20px 16px; }
  .solution { cursor: pointer; }
  /* Bandeau trop fin sur mobile : image plus haute, recadrée au centre */
  .solution > picture img { height: 200px; object-fit: cover; }
  .solution::after {
    content: "+"; position: absolute; top: 10px; right: 10px;
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(0, 0, 0, .6); color: #fff;
    font: 400 24px/1 Montserrat, sans-serif;
    transition: transform .3s ease, background .3s;
  }
  .solution.open::after { transform: rotate(45deg); background: var(--red); }
  .hint-mouse { display: none; }
  .hint-touch { display: inline; }
  .marques { padding: 50px 30px; }
  .logo-cell { flex-basis: 33.333%; }
  .contact-btn span { padding: 0 20px; font-size: 12px; }
  .map, .map-facade { height: 400px; }
  .site-footer { grid-template-columns: 1fr; gap: 16px; }
  .page-header { height: 260px; background-size: cover; }
  .page-header h1 { font-size: 30px; letter-spacing: 4px; }
}
@media (max-width: 600px) {
  .logo-cell { flex-basis: 50%; }
  .secteurs { margin-top: 40px; }
  .secteur, .secteur img { height: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
