/**
 * Charte ATS Services.
 *
 * L'ardoise vient du logo, le bleu pétrole de la maquette validée le
 * 15 septembre 2026. Un grossiste se juge sur la clarté : fond blanc, gris très
 * clair pour séparer, une seule couleur d'action. Les angles sont presque vifs,
 * comme un catalogue professionnel, pas comme une boutique de mode.
 */

/* ---------------- police, servie depuis ce serveur ---------------- */

@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* ---------------- jetons ---------------- */

:root {
  --ats-ardoise:   #26343B;
  --ats-encre:     #14201F;
  --ats-encre-2:   #4E5C5A;
  --ats-encre-3:   #7C8887;
  --ats-papier:    #FFFFFF;
  --ats-gris:      #F3F5F3;
  --ats-trait:     #DCE2DF;
  --ats-trait-fort:#C3CCC9;
  --ats-petrole:   #0B5E63;
  --ats-petrole-f: #083E42;
  --ats-petrole-p: #E2EDEC;
  --ats-ambre:     #8A5A07;
  --ats-ambre-p:   #F7EEDC;
  --ats-whatsapp:  #1FA855;

  /* Remplacement des jetons neutres de wy-blocs. */
  --wy-nuit:       var(--ats-ardoise);
  --wy-nuit-clair: #33434B;
  --wy-vert:       var(--ats-petrole);
  --wy-vert-vif:   #0E7479;
  --wy-papier:     var(--ats-papier);
  --wy-teinte:     var(--ats-gris);
  --wy-trait:      var(--ats-trait);
  --wy-encre:      var(--ats-encre);
  --wy-sourd:      var(--ats-encre-2);
  --wy-clair:      #B9C6C4;
  --wy-rayon:      8px;
  --wy-rayon-s:    6px;
  --wy-rayon-p:    4px;
  --wy-rayon-pilule: 4px;
  --wy-graisse-titre: 700;
  --wy-section-y:  var(--wy-r-5);

  --wp--preset--font-family--manrope: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --wp--preset--font-family--fira-code: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
}

/* ---------------- base ---------------- */

body,
.wp-site-blocks,
.editor-styles-wrapper {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ats-encre);
  background: var(--ats-papier);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4,
.wp-block-heading,
.wp-block-post-title {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ats-encre);
  letter-spacing: -.015em;
  line-height: 1.15;
}
h1, .wp-block-post-title { font-weight: 800; }

a { color: var(--ats-petrole); }
a:hover { color: var(--ats-petrole-f); }

:where(.wp-site-blocks) :focus-visible {
  outline: 2px solid var(--ats-petrole);
  outline-offset: 2px;
}

/* ---------------- boutons ---------------- */

.wp-element-button,
.wp-block-button__link,
.wc-block-components-button:not(.is-link),
.woocommerce .button,
.woocommerce button.button,
.single_add_to_cart_button,
.wp-block-woocommerce-product-button .wp-block-button__link {
  background: var(--ats-petrole) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 4px !important;
  font-family: 'Archivo', Arial, sans-serif !important;
  font-weight: 600 !important;
  font-size: .95rem !important;
  padding: .72em 1.25em !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  transition: background .15s ease;
}
.wp-element-button:hover,
.wp-block-button__link:hover,
.wc-block-components-button:not(.is-link):hover,
.single_add_to_cart_button:hover {
  background: var(--ats-petrole-f) !important;
}

/* Bouton secondaire : contour, pour la deuxième action d'une section. */
.wp-block-button.is-style-outline .wp-block-button__link,
.ats-btn-contour .wp-block-button__link {
  background: transparent !important;
  color: var(--ats-petrole) !important;
  box-shadow: inset 0 0 0 1.5px var(--ats-petrole);
}
.ats-btn-contour .wp-block-button__link:hover {
  background: var(--ats-petrole-p) !important;
}
.ats-btn-blanc .wp-block-button__link {
  background: #fff !important;
  color: var(--ats-petrole-f) !important;
}

/* ---------------- barre de service ---------------- */

.ats-service {
  background: var(--ats-encre);
  color: #B9C6C4;
  font-size: .8rem;
  padding-block: 7px !important;
}
.ats-service p { margin: 0; }
.ats-service a { color: #fff; text-decoration: none; }
.ats-service a:hover { text-decoration: underline; }
.ats-service__offre { color: #8FD1CF; font-weight: 600; }
.ats-service .wp-block-group { gap: 6px 22px; }

/* ---------------- en-tête ---------------- */

.ats-entete {
  background: #fff;
  border-bottom: 1px solid var(--ats-trait);
  padding-block: 12px !important;
}
.ats-entete > .wp-block-group { gap: 18px 28px; }
.ats-logo img { width: 74px; height: auto; display: block; }
.ats-recherche { flex: 1 1 280px; max-width: 520px; }
.ats-recherche .wp-block-search__input {
  border: 1px solid var(--ats-trait-fort);
  border-radius: 4px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: .92rem;
}
.ats-recherche .wp-block-search__button {
  margin-left: 6px;
  padding: 10px 14px !important;
}
.ats-actions { gap: 14px; align-items: center; }
.ats-actions .wp-block-button__link { padding: .62em 1.05em !important; font-size: .88rem !important; }

.ats-nav {
  background: #fff;
  border-bottom: 1px solid var(--ats-trait);
  padding-block: 0 !important;
  position: sticky;
  top: 0;
  z-index: 40;
}
.ats-nav .wp-block-navigation { font-weight: 600; font-size: .95rem; }
.ats-nav .wp-block-navigation-item__content {
  color: var(--ats-encre-2);
  padding: 13px 4px;
  border-bottom: 3px solid transparent;
  text-decoration: none;
}
.ats-nav .wp-block-navigation-item__content:hover,
.ats-nav .current-menu-item > .wp-block-navigation-item__content {
  color: var(--ats-petrole-f);
  border-bottom-color: var(--ats-petrole);
}
.ats-nav .wp-block-navigation__submenu-container {
  border: 1px solid var(--ats-trait) !important;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(20, 32, 31, .08);
  padding: 8px 0;
  min-width: 250px !important;
}
.ats-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  padding: 8px 18px;
  border: 0;
}

@media (max-width: 781px) {
  .ats-recherche { order: 3; flex-basis: 100%; max-width: none; }
  .ats-actions .wp-block-buttons { display: none; }
  .ats-service__horaires { display: none; }
}

/* ---------------- sections ---------------- */

.ats-section { padding-block: clamp(48px, 7vw, 88px) !important; }
.ats-section--gris { background: var(--ats-gris); }
.ats-section--petrole { background: var(--ats-petrole); color: #fff; }
.ats-section--petrole h2,
.ats-section--petrole h3,
.ats-section--petrole p { color: #fff; }
.ats-section--petrole .ats-surtitre { color: #8FD1CF; }

.ats-surtitre {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ats-petrole);
  margin-bottom: .6em;
}
.ats-titre-section {
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  font-weight: 800;
  margin-top: 0;
}
.ats-intro { color: var(--ats-encre-2); font-size: 1.06rem; max-width: 62ch; }

/* ---------------- accueil : ouverture ---------------- */

.ats-hero {
  background: linear-gradient(180deg, var(--ats-gris) 0%, #fff 100%);
  padding-block: clamp(44px, 6vw, 80px) !important;
}
.ats-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 800;
  line-height: 1.08;
  margin: 0 0 .45em;
  max-width: 16ch;
}
.ats-hero__texte { font-size: 1.1rem; color: var(--ats-encre-2); max-width: 52ch; }
.ats-hero__preuves {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 26px !important;
  padding: 0;
  list-style: none;
  font-size: .9rem;
  color: var(--ats-encre-2);
}
.ats-hero__preuves li::before {
  content: "✓";
  color: var(--ats-petrole);
  font-weight: 800;
  margin-right: 7px;
}
.ats-vitrine {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ats-vitrine figure {
  margin: 0 !important;
  background: #fff;
  border: 1px solid var(--ats-trait);
  border-radius: 8px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ats-vitrine img { width: 82% !important; height: 82% !important; object-fit: contain; }

/* ---------------- accueil : familles ---------------- */

.ats-familles { gap: 18px !important; }
.ats-famille {
  background: #fff;
  border: 1px solid var(--ats-trait);
  border-radius: 8px;
  padding: 22px 22px 20px !important;
  position: relative;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ats-famille:hover { border-color: var(--ats-petrole); box-shadow: 0 8px 24px rgba(11, 94, 99, .08); }
.ats-famille figure { margin: 0 0 14px !important; height: 150px; display: flex; align-items: center; justify-content: center; }
.ats-famille img { max-height: 150px !important; width: auto !important; object-fit: contain; }
.ats-famille h3 { font-size: 1.2rem; margin: 0 0 .3em; }
.ats-famille h3 a { color: var(--ats-encre); text-decoration: none; }
.ats-famille h3 a::after { content: ""; position: absolute; inset: 0; }
.ats-famille p { color: var(--ats-encre-2); font-size: .92rem; margin: 0; }
.ats-famille__nb { color: var(--ats-petrole) !important; font-weight: 700; margin-top: 10px !important; }

/* ---------------- atouts ---------------- */

.ats-atouts { gap: 18px !important; }
.ats-atout {
  border-top: 3px solid var(--ats-petrole);
  padding-top: 16px !important;
}
.ats-atout h3 { font-size: 1.05rem; margin: 0 0 .35em; }
.ats-atout p { color: var(--ats-encre-2); font-size: .93rem; margin: 0; }

/* ---------------- étapes « devenir client » ---------------- */

.ats-etapes { gap: 18px !important; counter-reset: etape; }
.ats-etape { counter-increment: etape; }
.ats-etape h3::before {
  content: counter(etape);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 50%;
  background: #fff;
  color: var(--ats-petrole);
  font-size: .95rem;
  font-weight: 800;
}
.ats-section--gris .ats-etape h3::before { background: var(--ats-petrole); color: #fff; }

/* ---------------- marques ---------------- */

.ats-marques { gap: 12px !important; }
.ats-marques p {
  margin: 0;
  border: 1px solid var(--ats-trait);
  border-radius: 6px;
  padding: 16px 26px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: .02em;
  background: #fff;
}
.ats-marques a { color: var(--ats-encre); text-decoration: none; }
.ats-marques p:hover { border-color: var(--ats-petrole); }

/* ---------------- grilles de produits ---------------- */

.wc-block-product-template,
ul.products {
  gap: 16px !important;
}
.wc-block-product,
ul.products li.product {
  background: #fff;
  border: 1px solid var(--ats-trait);
  border-radius: 8px;
  padding: 14px 14px 18px !important;
  text-align: left !important;
  display: flex;
  flex-direction: column;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.wc-block-product:hover,
ul.products li.product:hover { border-color: var(--ats-trait-fort); box-shadow: 0 8px 24px rgba(20, 32, 31, .06); }
.wc-block-product .wc-block-components-product-image,
.wc-block-product .wp-block-woocommerce-product-image {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px !important;
}
.wc-block-product .wc-block-components-product-image img {
  object-fit: contain !important;
  aspect-ratio: 1;
}
.ats-carte__marque {
  margin: 0 0 4px !important;
  font-size: .72rem !important;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ats-petrole);
  text-align: left;
}
.wc-block-product .wp-block-post-title {
  font-size: .98rem !important;
  font-weight: 600;
  line-height: 1.3;
  text-align: left !important;
  margin: 0 0 8px !important;
}
.wc-block-product .wp-block-post-title a { color: var(--ats-encre); text-decoration: none; }
.wc-block-product .wc-block-components-product-price,
.wc-block-product .wp-block-woocommerce-product-price {
  text-align: left !important;
  font-weight: 700;
  font-size: 1.05rem !important;
  color: var(--ats-encre);
  margin-top: auto !important;
}
.wc-block-product .wp-block-woocommerce-product-button { text-align: left !important; margin-top: 10px !important; }
.wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link { width: 100%; justify-content: center; }
.woocommerce-price-suffix,
.wy-ht { font-size: .72em; font-weight: 600; color: var(--ats-encre-3); margin-left: 3px; }

/* ---------------- fiche produit ---------------- */

.ats-fiche__infos {
  list-style: none;
  padding: 14px 0 0 !important;
  margin: 16px 0 !important;
  border-top: 1px solid var(--ats-trait);
  font-size: .92rem;
  color: var(--ats-encre-2);
}
.ats-fiche__infos li { padding: 3px 0; }
.ats-fiche__infos li strong { color: var(--ats-encre); }
.ats-fiche__whatsapp { margin-top: 14px; font-size: .92rem; font-weight: 600; }
.ats-fiche__whatsapp a { color: var(--ats-whatsapp); }

/* ---------------- pied de page ---------------- */

.ats-pied {
  background: var(--ats-encre);
  color: #B9C6C4;
  font-size: .9rem;
  padding-block: 56px 28px !important;
}
.ats-pied h3 {
  color: #fff;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.ats-pied p { color: #B9C6C4; line-height: 1.9; margin: 0; }
.ats-pied a { color: #E6ECEB; text-decoration: none; }
.ats-pied a:hover { color: #fff; text-decoration: underline; }
.ats-pied__logo img { width: 86px; height: auto; }
.ats-pied__bas {
  border-top: 1px solid #2E3D3C;
  margin-top: 36px !important;
  padding-top: 20px;
  font-size: .8rem;
}

/* ---------------- WhatsApp flottant ---------------- */

.ats-whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 13px;
  border-radius: 999px;
  background: var(--ats-whatsapp);
  color: #fff !important;
  font-family: 'Archivo', Arial, sans-serif;
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.ats-whatsapp svg { width: 26px; height: 26px; flex: none; }
.ats-whatsapp:hover { filter: brightness(1.06); }
@media (max-width: 600px) {
  .ats-whatsapp { padding: 13px; }
  .ats-whatsapp span { display: none; }
}

/* ---------------- préproduction : ce qui attend le client ---------------- */

/* Un passage que le client doit confirmer se voit à la relecture. Aucune
   occurrence ne doit rester à la mise en ligne. */
.ats-a-confirmer {
  background: var(--ats-ambre-p) !important;
  border-left: 4px solid var(--ats-ambre);
  color: #5A3B05 !important;
  padding: 12px 16px !important;
  border-radius: 4px;
  font-size: .92rem;
}
.ats-a-confirmer::before {
  content: "À confirmer par ATS Services · ";
  font-weight: 700;
}

/* ---------------- pages de texte ---------------- */

.ats-page-texte { max-width: 780px; }
.ats-page-texte h2 { font-size: 1.35rem; margin-top: 2em; }
.ats-page-texte p,
.ats-page-texte li { color: var(--ats-encre-2); }

.ats-cartes-contact { gap: 16px !important; }
.ats-carte-contact {
  border: 1px solid var(--ats-trait);
  border-radius: 8px;
  padding: 20px !important;
  background: #fff;
}
.ats-carte-contact h3 { font-size: 1rem; margin: 0 0 6px; }
.ats-carte-contact p { margin: 0; color: var(--ats-encre-2); }
.ats-carte-contact strong { color: var(--ats-encre); font-size: 1.08rem; }

/* Le formulaire, sur fond gris ou blanc. */
.wy-formulaire input:not([type="checkbox"]),
.wy-formulaire textarea {
  border: 1px solid var(--ats-trait-fort) !important;
  border-radius: 4px !important;
  font-family: inherit !important;
  background: #fff !important;
}

/* ---------------- ajustements de rythme ---------------- */

/* Twenty Twenty-Five pose un écart entre chaque bloc de premier niveau : entre
   deux sections pleine largeur, il s'ajoute à leur propre respiration et
   laisse une bande blanche sans raison. */
main > .wp-block-group,
.wp-block-post-content > .alignfull,
.entry-content > .alignfull,
.ats-hero, .ats-section { margin-block-start: 0 !important; margin-block-end: 0 !important; }
main.wp-block-group:has(.ats-hero) { padding-top: 0 !important; margin-top: 0 !important; }
footer.wp-block-template-part,
header.wp-block-template-part { margin-block: 0 !important; }

h3, .wp-block-heading:is(h3) { font-weight: 700; }

.ats-vitrine { max-width: 470px; margin-left: auto !important; }

/* Grilles classiques (code court [products]) : la marque au-dessus du nom. */
ul.products li.product .ats-carte__marque { margin-top: 4px !important; }
ul.products li.product .woocommerce-loop-product__title {
  font-size: .98rem !important;
  font-weight: 600;
  line-height: 1.3;
  padding: 0 !important;
  margin: 0 0 8px !important;
  color: var(--ats-encre);
}
ul.products li.product .price { color: var(--ats-encre) !important; font-weight: 700; margin-top: auto !important; }
ul.products li.product .button { margin-top: 12px !important; width: 100%; text-align: center; }

/* Colonne de lecture un peu plus large que celle du thème (645 px), et
   commune au titre et au texte pour qu'ils partagent le même bord gauche. */
body { --wp--style--global--content-size: 780px; }
.ats-page-texte { max-width: var(--wp--style--global--content-size) !important; margin-inline: auto !important; }
h2, .wp-block-heading:is(h2) { font-weight: 800; }
.ats-page-texte h2 { font-weight: 700; }

/* Catalogue : quatre produits par ligne sur grand écran, deux sur mobile. */
.wc-block-product-template.wc-block-product-template__responsive,
.wc-block-product-template.is-flex-container {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.wc-block-product-template > li { width: auto !important; margin: 0 !important; }
@media (max-width: 1100px) {
  .wc-block-product-template.wc-block-product-template__responsive,
  .wc-block-product-template.is-flex-container { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 781px) {
  .wc-block-product-template.wc-block-product-template__responsive,
  .wc-block-product-template.is-flex-container,
  ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .wc-block-product, ul.products li.product { padding: 10px 10px 14px !important; }
}
.wc-block-product .wc-block-components-product-image img,
.wc-block-product .wp-block-woocommerce-product-image img { max-height: 220px; }

/* Bouton pleine largeur dans une carte : la marge intérieure compte dans la
   largeur, sinon il déborde de la carte. */
ul.products li.product .button,
.wc-block-product .wp-block-button__link { box-sizing: border-box; max-width: 100%; white-space: normal; }
@media (max-width: 781px) {
  ul.products li.product .button,
  .wc-block-product .wp-block-button__link { font-size: .84rem !important; padding: .65em .6em !important; }
}

/* Texte long d'une famille, sous la grille. */
.ats-texte-famille {
  max-width: 780px;
  margin: 56px 0 24px;
  padding-top: 32px;
  border-top: 1px solid var(--ats-trait);
  color: var(--ats-encre-2);
}
.ats-texte-famille h2 { font-size: 1.3rem; font-weight: 700; color: var(--ats-encre); margin: 1.6em 0 .5em; }
.ats-texte-famille h2:first-child { margin-top: 0; }

/* Fiche produit : caractéristiques. */
.woocommerce-product-details__short-description ul,
.wp-block-woocommerce-product-description ul,
.woocommerce-Tabs-panel--description ul { padding-left: 1.1em; }
.woocommerce-product-details__short-description li { margin: 2px 0; }

/* Recherche : un seul cadre. Le bloc de WordPress entoure le champ d'une
   bordure en plus de celle du champ, d'où le double trait au clic. */
.ats-recherche .wp-block-search__inside-wrapper { border: 0 !important; padding: 0 !important; background: none !important; }
.ats-recherche .wp-block-search__input:focus { outline: none; border-color: var(--ats-petrole); box-shadow: 0 0 0 3px rgba(11, 94, 99, .15); }
.ats-recherche { position: relative; }
