
/**
 * Finitions des pages intérieures et du catalogue - Concept & Plan.
 * Garde les données WordPress/ACF et les composants WooCommerce natifs.
 */

/* Personae : titre et accroche centrés dans un bandeau gris. */
body.single-personaes .cp-persona__head {
  position: relative;
  background: var(--cp-bg, #f5f5f5);
  padding: 78px 0 64px;
}
body.single-personaes .cp-persona__head > .cp-container {
  text-align: center;
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(18px, 3vw, 36px);
}
body.single-personaes .cp-persona__head h1 {
  text-align: center;
  color: #000 !important;
  margin: 0 0 19px;
}
body.single-personaes .cp-persona__eyebrow { text-align: center; }
body.single-personaes .cp-persona__lead {
  text-align: center;
  color: #464646;
  max-width: 860px;
  margin: 0 auto;
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.5;
}
body.single-personaes .cp-persona__body {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding: 52px clamp(18px, 4vw, 54px) 58px;
  box-sizing: border-box;
  display: block;
}
body.single-personaes .cp-persona__content {
  width: 100% !important;
  max-width: 1040px !important;
  margin-inline: auto !important;
  padding: 0 !important;
  box-sizing: border-box;
  float: none !important;
  transform: none !important;
  overflow-wrap: break-word;
}
body.single-personaes .cp-persona__content > * {
  max-width: 100%;
}
body.single-personaes .cp-persona__content :is(h2,h3) {
  line-height: 1.22;
  overflow-wrap: anywhere;
}

/* Overlap des deux logos dans le bandeau Personae, également en tablette. */
@media (min-width: 768px) and (max-width: 991.98px) {
  body.single-personaes .cp-header { z-index: 40; position: relative; }
  body.single-personaes .cp-header .cp-header__inner { position: relative; }
  body.single-personaes .cp-header .cp-brand {
    position: absolute !important;
    top: 0;
    left: 18px;
    z-index: 45;
    box-sizing: border-box;
    width: min(385px, 68vw);
    height: 150px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 5px solid var(--cp-red, #e20e17);
    gap: 16px;
  }
  body.single-personaes .cp-persona__head { padding-top: 108px; }
}
@media (max-width: 767px) {
  body.single-personaes .cp-header { z-index: 40; position: relative; }
  body.single-personaes .cp-header .cp-brand {
    position: relative !important;
    top: 16px;
    z-index: 45;
    padding: 10px 8px 12px !important;
    background: #fff;
    border-bottom: 4px solid var(--cp-red, #e20e17);
  }
  body.single-personaes .cp-persona__head { padding: 68px 0 39px; }
  body.single-personaes .cp-persona__body { padding-top: 34px; }
  body.single-personaes .cp-persona__content :is(h2,h3) { font-size: clamp(23px, 6vw, 29px); }
}

/* Home Prestations : limiter les descriptions longues sans toucher au SEO. */
body.home .cp-services #cp-services-carousel .cp-service__description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
  max-height: calc(4 * 1.48em);
  line-height: 1.48;
  margin-bottom: 0;
}
@media (max-width: 767px) {
  body.home .cp-services #cp-services-carousel .cp-service__description {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    max-height: calc(3 * 1.48em);
  }
}

/* Home Produits : titre compact, lisible sans recouvrir les photos. */
body.home #cp-products-carousel .cp-product-card__title {
  font-family: 'Outfit', Arial, sans-serif !important;
  font-size: clamp(13px, 1vw, 17px) !important;
  line-height: 1.28 !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0;
  color: #464646 !important;
  padding: 12px 14px !important;
  overflow-wrap: break-word;
}

/* Archives WooCommerce : description dans le bandeau gris natif Essentiel. */
body.tax-product_cat .hautdepage {
  background: #f5f5f5;
  padding-bottom: clamp(35px, 4vw, 64px) !important;
}
body.tax-product_cat .cp-category-banner__inner {
  text-align: center;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(12px, 3vw, 32px);
}
body.tax-product_cat .cp-category-banner__inner h1 {
  margin: 0 0 22px !important;
  color: #000 !important;
}
body.tax-product_cat .cp-category-banner__description {
  max-width: 1060px;
  margin: 0 auto;
  color: #464646;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
}
body.tax-product_cat .cp-category-banner__description :is(p,a,strong) {
  color: inherit;
  line-height: inherit;
  font-size: inherit;
}
body.tax-product_cat .cp-category-banner__description p:last-child { margin-bottom: 0; }
body.tax-product_cat .contenugutenberg { margin-top: 42px; }

/* Vrai produit variable, catalogue sur devis (pas d'ajout au panier). */
body.single-product .cp-variation-preview {
  border-top: 2px solid #e20e17;
  background: #f5f5f5;
  padding: 24px clamp(16px, 3vw, 28px);
  margin: 24px 0 28px;
}
body.single-product .cp-variation-preview h2 {
  color: #464646;
  font-family: 'Outfit', Arial, sans-serif !important;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.22;
  margin: 0 0 10px;
}
body.single-product .cp-variation-preview__intro {
  color: #464646;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 22px;
}
body.single-product .cp-variation-preview__fields {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.single-product .cp-variation-preview__field {
  min-width: 0;
}
body.single-product .cp-variation-preview__field label {
  display: block;
  color: #464646;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}
body.single-product .cp-variation-preview__field select {
  display: block;
  background: #fff;
  border: 1px solid #aaa;
  border-radius: 0;
  min-height: 43px;
  width: 100%;
  max-width: 100%;
  color: #303030;
  font-size: 13px;
  padding: 9px 10px;
}
body.single-product .cp-variation-preview__result {
  color: #303030;
  font-weight: 600;
  font-size: 13px;
  margin: 19px 0;
  min-height: 24px;
}
body.single-product .cp-variation-preview__quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  background: #e20e17;
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}
body.single-product .cp-variation-preview__quote:hover,
body.single-product .cp-variation-preview__quote:focus-visible {
  background: #be0a12;
  color: #fff !important;
}
body.single-product .cp-variation-preview__disclaimer {
  font-size: 12px;
  margin: 15px 0 0;
  line-height: 1.45;
  color: #555;
}
@media (max-width: 767px) {
  body.single-product .cp-variation-preview__fields {
    grid-template-columns: 1fr;
  }
}

/* Fiche produit : bandeau gris reserve au fil d'Ariane et H1 a droite.
   Le visuel, l'extrait et les attributs continuent de provenir de WooCommerce. */
body.single-product .cp-product-breadcrumb-banner {
  position: relative;
  background: #f5f5f5;
  padding: clamp(74px, 7.5vw, 96px) 0 34px;
  min-height: 145px;
  box-sizing: border-box;
}
body.single-product .cp-product-breadcrumb-banner .cp-container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(18px, 3vw, 35px);
}
body.single-product nav.cp-product-breadcrumb.woocommerce-breadcrumb {
  display: block;
  text-align: center;
  font-family: 'Outfit', Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
  color: #464646;
  margin: 0;
  padding: 0;
  background: transparent;
}
body.single-product nav.cp-product-breadcrumb a {
  color: #464646;
  text-decoration: none;
}
body.single-product nav.cp-product-breadcrumb a:hover,
body.single-product nav.cp-product-breadcrumb a:focus-visible {
  color: #e20e17;
  text-decoration: underline;
}
body.single-product .cp-product-breadcrumb-separator,
body.single-product .cp-breadcrumb-separator {
  display: inline-block;
  margin: 0 9px;
  color: #999;
}
body.single-product .cp-product-main {
  margin-top: clamp(36px, 4vw, 62px);
}
body.single-product .cp-product-main .woocommerce div.product .summary {
  min-width: 0;
}
body.single-product .cp-product-main h1.cp-product-summary-title {
  display: block;
  color: #000 !important;
  font-family: 'Outfit', Arial, sans-serif !important;
  font-size: clamp(28px, 2.8vw, 41px) !important;
  font-weight: 700 !important;
  line-height: 1.13 !important;
  letter-spacing: 0;
  margin: 0 0 22px !important;
  max-width: 100%;
  text-transform: none;
}
body.single-product .cp-product-main .summary > p.price:empty {
  display: none;
}
body.single-product .cp-product-main .woocommerce-product-details__short-description {
  line-height: 1.55;
  margin-bottom: 20px;
}
@media (max-width: 767px) {
  body.single-product .cp-product-breadcrumb-banner {
    padding-top: 56px;
    padding-bottom: 24px;
    min-height: 110px;
  }
  body.single-product .cp-product-main {
    margin-top: 30px;
  }
  body.single-product .cp-product-main h1.cp-product-summary-title {
    font-size: clamp(27px, 7vw, 34px) !important;
    margin-bottom: 15px !important;
  }
}

/* Fil d'Ariane partage - aligne a gauche dans tous les gabarits.
   Texte et destination fournis par WordPress / WooCommerce. */
.cp-breadcrumb,
nav.woocommerce-breadcrumb.cp-breadcrumb,
body.single-product .cp-product-breadcrumb-banner nav.cp-breadcrumb {
  display: block;
  width: 100%;
  text-align: left !important;
  font-family: 'Outfit', Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
  color: #464646;
  background: none;
  padding: 0;
  margin: 0 0 23px;
  overflow-wrap: anywhere;
}
.cp-breadcrumb a,
nav.woocommerce-breadcrumb.cp-breadcrumb a {
  color: #464646;
  text-decoration: none;
}
.cp-breadcrumb a:hover,
.cp-breadcrumb a:focus-visible {
  color: #e20e17;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cp-breadcrumb [aria-current="page"] {
  color: #303030;
}
.cp-breadcrumb .cp-breadcrumb-separator {
  display: inline-block;
  margin: 0 9px;
  color: #888;
  font-weight: 400;
}
body.single-product .cp-product-breadcrumb-banner nav.cp-breadcrumb {
  margin: 0;
  text-align: left !important;
}
body.single-personaes .cp-persona__head .cp-container > nav.cp-breadcrumb {
  position: relative;
  z-index: 1;
  text-align: left !important;
  margin-bottom: clamp(28px, 3vw, 43px);
}
.cp-simple-breadcrumb-banner {
  width: 100%;
  background: #f5f5f5;
  padding: clamp(64px, 6vw, 90px) 0 23px;
}
.cp-simple-breadcrumb-banner > .cp-container {
  max-width: 1380px;
  padding-inline: 30px;
}
.cp-simple-breadcrumb-banner .cp-breadcrumb { margin-bottom: 0; }
body.page .hautdepage .cp-breadcrumb,
body.single .bg-primary-background .cp-breadcrumb {
  text-align: left !important;
}

/* Bandeau contact des pages interieures : compact, avec les memes champs
   ACF que le bloc Contact de la home et sans image supplementaire. */
.cp-footer-contact-strip {
  width: 100%;
  position: relative;
  background: #f5f5f5;
  color: #303030;
  padding: 12px 0 16px;
  border: 0;
}
.cp-footer-contact-strip > .cp-container {
  position: relative;
  max-width: 1530px;
  box-sizing: border-box;
  margin-inline: auto;
  padding-inline: 30px;
}
.cp-footer-contact-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
}
.cp-footer-contact-strip__item {
  min-width: 0;
  box-sizing: border-box;
  padding: 0 clamp(12px, 1.4vw, 22px);
  overflow-wrap: anywhere;
  font-family: 'Outfit', Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.48;
}
.cp-footer-contact-strip__item:first-child {
  padding-left: 0;
}
.cp-footer-contact-strip__item + .cp-footer-contact-strip__item {
  border-left: 1px solid #d9d9d9;
}
.cp-footer-contact-strip__item h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 0;
  font-family: 'Outfit', Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.25;
  color: #464646 !important;
}
.cp-footer-contact-strip__icon {
  display: block;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  color: #e20e17;
}
.cp-footer-contact-strip__item :is(address,p) {
  margin: 0;
  padding: 0;
  font: inherit;
  color: #303030;
}
.cp-footer-contact-strip__item address > span {
  display: block;
}
.cp-footer-contact-strip__item > a {
  display: block;
  max-width: 100%;
  width: fit-content;
  margin: 0;
  padding: 0;
  color: #303030;
  font: inherit;
  text-decoration: none;
}
.cp-footer-contact-strip__item > a:hover,
.cp-footer-contact-strip__item > a:focus-visible {
  color: #e20e17;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 1200px) {
  .cp-footer-contact-strip__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 0;
  }
  .cp-footer-contact-strip__item:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
  .cp-footer-contact-strip__item:nth-child(n+3) {
    border-top: 1px solid #dedede;
    padding-top: 15px;
  }
}
@media (max-width: 767px) {
  .cp-simple-breadcrumb-banner {
    padding: 37px 0 20px;
  }
  .cp-simple-breadcrumb-banner > .cp-container {
    padding-inline: 18px;
  }
  .cp-footer-contact-strip {
    padding: 12px 0 15px;
  }
  .cp-footer-contact-strip > .cp-container {
    padding-inline: 18px;
  }
  .cp-footer-contact-strip__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .cp-footer-contact-strip__item {
    border-left: 0 !important;
    padding: 0 !important;
  }
  .cp-footer-contact-strip__item + .cp-footer-contact-strip__item {
    border-top: 1px solid #dedede;
    padding-top: 12px !important;
  }
  body.single-personaes .cp-persona__head .cp-container > nav.cp-breadcrumb {
    margin-bottom: 22px;
  }
}

/* Corrige la marge genereuse du footer natif Essentiel (160px en CSS main).
   Le bandeau de contact touche desormais sa section precedente. */
body footer:has(.cp-footer-bottom) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
}
body footer:has(.cp-footer-bottom) .cp-footer-bottom {
  padding: 24px 0 0 !important;
}
body footer:has(.cp-footer-bottom) .cp-footer-bottom__grid {
  padding-bottom: 18px !important;
}
@media (max-width: 767px) {
  body footer:has(.cp-footer-bottom) .cp-footer-bottom {
    padding-top: 22px !important;
  }
}

/* La marque depasse la hauteur du header : laisser la meme garde que le
   bandeau des fiches produits avant le fil d'Ariane des pages interieures. */
@media (min-width: 992px) {
  body .hautdepage > .container,
  body.single:not(.single-product):not(.single-personaes) .bg-primary-background > .container {
    padding-top: 100px !important;
  }
  body.single-personaes .cp-persona__head {
    padding-top: 108px;
  }
  body .cp-simple-breadcrumb-banner {
    padding-top: 100px;
  }
}

/* ------------------------------------------------------------
 * Personae : superpositions header / bandeau / mega-menu.
 * Le CSS historique Essentiel met z-index:10000 sur TOUS les <header>,
 * y compris le header du contenu. On remet une hierarchie explicite :
 * l'en-tete global et ses menus devant le bandeau de page.
 * ------------------------------------------------------------ */
body.single-personaes > header {
  position: relative !important;
  z-index: 20000 !important;
  overflow: visible !important;
}
body.single-personaes > main {
  position: relative;
  z-index: 0;
}
body.single-personaes .cp-persona__head {
  position: relative !important;
  z-index: 0 !important;
}
body.single-personaes > header .cp-header,
body.single-personaes > header .cp-header__inner {
  overflow: visible !important;
}
body.single-personaes > header .cp-header {
  position: relative;
  z-index: 1 !important;
}
body.single-personaes > header .cp-header .cp-brand {
  z-index: 30 !important;
}
body.single-personaes > header .cp-header .cp-nav {
  z-index: 40 !important;
}
body.single-personaes > header .cp-header .cp-nav__list > .dropdown > .dropdown-menu.full {
  z-index: 100 !important;
}

/* Personae : meme image frame que les cartes de la home.
 * Le cadre absorbe le zoom sans rogner l'etiquette h3 superposee. */
body.single-personaes .cp-persona__products .cp-product-card__image {
  position: relative;
  overflow: visible;
}
body.single-personaes .cp-persona__products .cp-product-card__frame {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body.single-personaes .cp-persona__products .cp-product-card__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
  transform-origin: center;
}
body.single-personaes .cp-persona__products .cp-product-card a:hover .cp-product-card__frame img,
body.single-personaes .cp-persona__products .cp-product-card a:focus-visible .cp-product-card__frame img {
  transform: scale(1.055);
}
@media (prefers-reduced-motion: reduce) {
  body.single-personaes .cp-persona__products .cp-product-card__frame img {
    transition: none;
    transform: none !important;
  }
}
