/*
Theme Name: SALFON SERVICE
Author: SALFON SERVICE
Description: Thème bloc sur mesure de SALFON SERVICE — maquette convertie en blocs Gutenberg natifs, 100 % éditable.
Version: 1.0.2
Requires at least: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: salfon-service
Tags: block-theme, full-site-editing, business
*/

/* =========================================================
   SALFON SERVICE — matériel minier, Mali — maquette
   Registre relevé sur la référence (Krown, Pixelz) : une seule
   sans-serif géométrique (Plus Jakarta Sans), blanc froid, encre
   quasi noire, bandes bord à bord, angles droits, rubrique à
   gauche / énoncé à droite, grandes photos pleine largeur,
   liens texte à chevron. Couleurs du logo (bleu, rouge) posées
   avec retenue : signature Adéma.
   ========================================================= */

:root {
  --bleu: #0b3a8c;          /* bleu du logo */
  --bleu-fonce: #071f4d;
  --rouge: #e1242b;         /* rouge du logo : touches seulement */
  --encre: #17181c;
  --gris: #5d6068;
  --ligne: #e3e5ea;
  --voile: #f5f6f8;
  --blanc: #ffffff;

  --police: "Plus Jakarta Sans", system-ui, sans-serif;
  --gut: clamp(18px, 2.4vw, 40px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --nav: 84px;

  --sig: var(--bleu); --sig-fonce: var(--bleu-fonce); --sig-2: var(--rouge);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav) + 10px); }
body {
  margin: 0; background: var(--blanc); color: var(--encre);
  font-family: var(--police); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wp-site-blocks > header, .wp-site-blocks > footer { margin: 0; }
.entry-content > * { margin-top: 0; margin-bottom: 0; }
h1, h2, h3, h4, p, figure, ul { margin: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.025em; line-height: 1.22; }
.wp-block-image { margin: 0; }
.wp-block-buttons { margin: 0; }

/* ---------- Vocabulaire commun : rubrique à gauche, énoncé à droite ---------- */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gut); padding: 0 var(--gut); align-items: start; }
.duo__g { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.duo__d { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; max-width: 700px; }
.rubrique { font-size: 21px; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
.duo__note { font-size: 15px; color: var(--gris); max-width: 300px; }
.enonce { font-size: clamp(27px, 2.85vw, 42px); }
.texte { font-size: 16px; color: #3f4249; max-width: 640px; }
.duo__d .texte + .texte { margin-top: -10px; }
/* Signature Adéma · mots-clés dans le bleu du logo, soulignés d'un trait rouge léger */
.enonce em, .hero__title em { font-style: normal; color: var(--bleu); background: linear-gradient(var(--rouge), var(--rouge)) 0 100% / 100% 2px no-repeat; padding-bottom: 2px; }

/* ---------- Lien d'action : texte + pastille carrée à flèche (référence « Discover › ») ---------- */
.btn .wp-block-button__link {
  display: inline-flex; align-items: center; gap: 14px;
  background: transparent; color: var(--encre); border: 0; border-radius: 0; padding: 0;
  font-family: var(--police); font-size: 16px; font-weight: 600; text-decoration: none;
}
.btn .wp-block-button__link::after {
  content: ""; width: 34px; height: 34px; flex: none;
  background: var(--encre) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.5 7.5 7.5 2.5M3.5 2.5h4v4' fill='none' stroke='white' stroke-width='1.1'/%3E%3C/svg%3E") center / 12px no-repeat;
  transition: transform .4s var(--ease), background-color .25s;
}
.btn .wp-block-button__link:hover::after { transform: rotate(45deg); background-color: var(--bleu); }
.btn--plein .wp-block-button__link { background: var(--bleu); color: var(--blanc); padding: 8px 8px 8px 24px; gap: 20px; transition: background .25s; }
.btn--plein .wp-block-button__link::after { background-color: var(--blanc); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.5 7.5 7.5 2.5M3.5 2.5h4v4' fill='none' stroke='%230b3a8c' stroke-width='1.1'/%3E%3C/svg%3E"); width: 38px; height: 38px; }
.btn--plein .wp-block-button__link:hover { background: var(--bleu-fonce); }
.btn--plein .wp-block-button__link:hover::after { background-color: var(--blanc); }

/* =========================================================
   NAVIGATION — barre blanche, logo, liens, contact à droite
   ========================================================= */
.nav { position: sticky; top: 0; z-index: 50; background: var(--blanc); padding: 0 var(--gut); transition: box-shadow .3s; }
.wp-site-blocks > header { position: sticky; top: 0; z-index: 50; }
.nav.is-scrolled { box-shadow: 0 1px 0 var(--ligne); }
.nav__bar { height: var(--nav); display: flex; align-items: center; gap: clamp(24px, 4.5vw, 72px); }
.logo img { height: 50px; width: auto; }
.nav__links { font-size: 15px; }
.wp-block-navigation.nav__links .wp-block-navigation__container { display: flex; gap: clamp(20px, 2.8vw, 40px); list-style: none; margin: 0; padding: 0; }
.nav__links .wp-block-navigation-item__content { color: var(--encre); text-decoration: none; opacity: .8; transition: opacity .2s; }
.nav__links .wp-block-navigation-item__content:hover { opacity: 1; }
.nav__links .current-menu-item > .wp-block-navigation-item__content { opacity: 1; font-weight: 700; }
.nav__contact { margin-left: auto; display: flex; align-items: center; gap: clamp(18px, 2.6vw, 36px); }
.nav__c { font-size: 15px; font-weight: 600; }
.nav__c a { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.nav__c a::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.nav__c--tel { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-2.500 1.500a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2'/%3E%3C/svg%3E"); }
.nav__c--wa { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21l1.650-3.800a9 9 0 1 1 3.400 2.900L3 21'/%3E%3Cpath d='M9 10a.5.500 0 0 0 1 0V9a.5.500 0 0 0-1 0v1a5 5 0 0 0 5 5h1a.5.500 0 0 0 0-1h-1a.5.500 0 0 0 0 1'/%3E%3C/svg%3E"); }
.nav__c a:hover { color: var(--bleu); }

/* =========================================================
   OUVERTURE — bloc blanc (rubrique / titre), puis photo bord à bord
   ========================================================= */
.hero { padding-top: clamp(56px, 7.5vw, 112px); }
.hero > .duo { padding-bottom: clamp(56px, 6.5vw, 96px); }
.hero__title { font-size: clamp(30px, 3.1vw, 46px); }
.hero__lieu { font-size: 14px; color: var(--gris); }
.hero__lieu::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; background: var(--rouge); transform: rotate(45deg) translateY(-2px); }
.hero__photo { margin: 0; }
.hero__photo img { width: 100%; height: clamp(340px, 46vw, 680px); object-fit: cover; }
.hero--page .hero__photo img { height: clamp(280px, 34vw, 500px); }
.hero--court > .duo { padding-bottom: clamp(40px, 4.5vw, 64px); }

/* ---------- Sections à énoncé ---------- */
.intro, .gamme, .clients, .etapes, .valeurs, .portrait, .contact, .final { padding-top: clamp(80px, 9.5vw, 144px); }
.intro, .gamme, .clients, .valeurs { padding-bottom: 0; }
.final { padding-bottom: clamp(80px, 9.5vw, 144px); }
.bande-photo { margin-top: clamp(80px, 9.5vw, 144px); }
.bande-photo img { width: 100%; height: clamp(300px, 40vw, 600px); object-fit: cover; }

/* ---------- Lignes (familles de produits, étapes, engagements) ---------- */
.lignes { width: 100%; border-top: 1px solid var(--encre); }
.duo__d:has(> .lignes) { max-width: none; }
.ligne { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr) 34px; align-items: center; column-gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--ligne); transition: padding .35s var(--ease); }
.ligne__n { font-size: 14px; color: var(--gris); font-variant-numeric: tabular-nums; }
.ligne__t { font-size: clamp(19px, 1.7vw, 24px); }
.ligne__t a { text-decoration: none; }
.ligne__t a::before { content: ""; position: absolute; inset: 0; }
.ligne__d { font-size: 15px; color: var(--gris); }
.ligne::after { content: ""; grid-column: 4; width: 34px; height: 34px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3.500 1.500 7 5 3.500 8.500' fill='none' stroke='%2317181c' stroke-width='1'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform .35s var(--ease); }
.ligne:hover { padding-left: 10px; }
.ligne:hover::after { transform: translateX(6px); }
.ligne:hover .ligne__t { color: var(--bleu); }
.ligne--etape { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); }
.ligne--etape::after { content: none; }
.ligne--etape:hover { padding-left: 0; }
.ligne--etape:hover .ligne__t { color: inherit; }
.ligne--etape .ligne__n { width: 34px; height: 34px; display: grid; place-items: center; background: var(--bleu); color: var(--blanc); font-weight: 600; }

/* ---------- Repères : la bande pleine couleur (signature) ---------- */
.reperes { margin-top: clamp(80px, 9.5vw, 144px); background: radial-gradient(120% 160% at 0% 0%, #1250b8 0%, var(--bleu) 45%, var(--bleu-fonce) 100%); color: var(--blanc); padding: clamp(56px, 6vw, 88px) var(--gut); }
.reperes__grille { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gut); row-gap: 40px; }
.repere { border-top: 1px solid rgba(255,255,255,.35); padding-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.repere__v { font-size: clamp(26px, 2.6vw, 38px); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.repere__l { font-size: 14.5px; color: rgba(255,255,255,.78); max-width: 240px; }

/* ---------- Pour qui : deux grandes vignettes ---------- */
.clients__grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gut); padding: 0 var(--gut); margin-top: clamp(48px, 5vw, 72px); }
.client { display: flex; flex-direction: column; gap: 16px; }
.client .client__img { width: 100%; margin-bottom: 10px; overflow: hidden; }
.client__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .9s var(--ease); }
.client:hover .client__img img { transform: scale(1.03); }
.client__t { font-size: clamp(22px, 2vw, 28px); }
.client__d { font-size: 16px; color: #3f4249; max-width: 520px; }
.client__liste, .cat__liste { list-style: none; padding: 0; margin: 0; }
.client__liste { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14.5px; font-weight: 500; }
.client__liste li::before, .cat__liste li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 10px; background: var(--rouge); transform: rotate(45deg) translateY(-2px); }

/* ---------- Page Produits : une famille par bloc ---------- */
.cat { padding-top: clamp(64px, 7vw, 104px); }
.cat > .duo { border-top: 1px solid var(--encre); padding-top: 28px; margin: 0 var(--gut); padding-left: 0; padding-right: 0; }
.cat__n { font-size: 14px; color: var(--gris); }
.cat__liste { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px; border-top: 1px solid var(--ligne); margin-top: 6px; }
.cat__liste li { padding: 15px 0; border-bottom: 1px solid var(--ligne); font-size: 15.5px; }

/* ---------- À propos : portrait ---------- */
.portrait .duo__g { gap: 26px; }
.portrait .portrait__img { width: min(100%, 420px); }
.portrait__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact .duo__g { gap: 26px; padding-right: clamp(0px, 6vw, 96px); }
.contact .duo__d { max-width: none; background: var(--voile); padding: clamp(26px, 3.4vw, 52px); align-items: stretch; }
.voies { width: 100%; display: flex; flex-direction: column; border-top: 1px solid var(--encre); }
.voie { padding: 20px 0; border-bottom: 1px solid var(--ligne); display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 20px; font-size: 16px; }
.voie__l { font-size: 14px; color: var(--gris); padding-top: 2px; }
.voie__v { font-weight: 500; }
.voie__v a { text-decoration: none; }
.voie__v a:hover { color: var(--bleu); }

.form { display: flex; flex-direction: column; gap: 24px; }
.form__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__l, .form__group legend { font-size: 13.5px; color: var(--gris); }
.field input, .field textarea { font: inherit; width: 100%; min-width: 0; font-size: 16px; color: var(--encre); border: 0; border-bottom: 1px solid #b9bcc4; border-radius: 0; padding: 8px 0 10px; background: transparent; outline: none; transition: border-color .2s; }
.field textarea { display: block; resize: vertical; height: 150px; min-height: 120px; }
.field input:focus, .field textarea:focus { border-color: var(--bleu); }
.field.is-error input, .field.is-error textarea { border-color: var(--rouge); }
.form__group { border: 0; padding: 0; margin: 0; }
.form__group legend { padding: 0; margin-bottom: 12px; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label > span { display: inline-block; padding: 9px 18px; border: 1px solid #b9bcc4; font-size: 14.5px; transition: all .2s; }
.choice input:checked + span { background: var(--encre); color: var(--blanc); border-color: var(--encre); }
.choice .wpcf7-form-control-wrap, .choice .wpcf7-form-control { display: contents; }
.choice .wpcf7-list-item { margin: 0; }
.form__foot { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.form__submit { font-family: var(--police); font-size: 16px; font-weight: 600; background: var(--bleu); color: var(--blanc); border: 0; border-radius: 0; padding: 16px 30px; cursor: pointer; transition: background .2s; }
.form__submit:hover { background: var(--bleu-fonce); }
.form__note { font-size: 13.5px; color: var(--gris); }
.form__ok { display: none; font-size: 16px; font-weight: 500; color: var(--bleu); }
#contact-form.is-sent .form__ok { display: block; }
#contact-form.is-sent .form__foot { display: none; }

/* =========================================================
   PIED DE PAGE
   ========================================================= */
.foot { background: var(--bleu-fonce); color: var(--blanc); padding: clamp(56px, 6vw, 88px) var(--gut) 28px; overflow: hidden; }
.foot__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gut); }
.foot__marque { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.foot__logo-img img { height: 56px; width: auto; }
.foot__intro { font-size: 15px; color: rgba(255,255,255,.75); max-width: 300px; }
.foot__cols { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; }
.foot__col { display: flex; flex-direction: column; gap: 9px; }
.foot__h { font-size: 13.5px; color: rgba(255,255,255,.55); margin-bottom: 8px; }
.foot__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.foot__list li, .foot__c { font-size: 15px; }
.foot a { text-decoration: none; }
.foot__list a:hover, .foot__c a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot__bottom { margin-top: clamp(48px, 6vw, 88px); border-top: 1px solid rgba(255,255,255,.2); padding-top: 26px; }
.foot__geant { font-size: clamp(38px, 12vw, 236px); line-height: .92; letter-spacing: -.045em; white-space: nowrap; color: rgba(255,255,255,.1); }
.foot__geant strong { font-weight: 700; }
.foot__bas { margin-top: 26px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot__copy { font-size: 13px; color: rgba(255,255,255,.6); }

/* =========================================================
   SIGNATURE ADÉMA (sobre) — progression, révélation, crédit
   ========================================================= */
.nav::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--defil, 0) * 100%); background: linear-gradient(90deg, var(--sig), var(--sig-2)); }
.js .mots .m { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.js .mots .m > span { display: inline-block; transform: translateY(110%); transition: transform .8s var(--ease); transition-delay: calc(var(--i) * 35ms); }
.js .mots.is-in .m > span { transform: none; }
.signature { font-size: 12px; }
.signature a { color: rgba(255,255,255,.6); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.signature a::before { content: ""; width: 7px; height: 7px; background: var(--sig-2); transform: rotate(45deg); }
.signature a:hover { color: var(--blanc); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  .ligne { grid-template-columns: 40px minmax(0, 1fr) 34px; row-gap: 6px; }
  .ligne__d { grid-column: 2; }
  .ligne::after { grid-column: 3; grid-row: 1 / span 2; }
  .ligne--etape { grid-template-columns: 50px minmax(0, 1fr); }
  .nav__c--wa { display: none; }
}
@media (max-width: 860px) {
  :root { --nav: 72px; }
  .duo { grid-template-columns: minmax(0, 1fr); row-gap: 26px; }
  .duo__d { max-width: none; }
  .rubrique { font-size: 17px; color: var(--bleu); }
  .duo__note { max-width: none; }
  .reperes__grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .clients__grille { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  .foot__top { grid-template-columns: minmax(0, 1fr); row-gap: 44px; }
  .contact .duo__g { padding-right: 0; }
  .portrait .portrait__img { width: min(100%, 320px); }
  .logo img { height: 34px; }
  .nav__contact { display: none; }
  .nav__links { margin-left: auto; }
}
@media (max-width: 599px) {
  .cat__liste { grid-template-columns: minmax(0, 1fr); }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .foot__cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 36px; }
  .voie { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .foot__bas { flex-direction: column; align-items: flex-start; }
}

/* Bouton du menu replié (core/navigation, sous 600 px) */
.nav__links .wp-block-navigation__responsive-container-open { color: var(--encre); width: 42px; height: 42px; place-items: center; border: 1px solid currentColor; }
.nav__links .wp-block-navigation__responsive-container-open svg { fill: currentColor; width: 20px; height: 20px; }
.wp-block-navigation.nav__links .wp-block-navigation__responsive-container.is-menu-open { background-color: var(--blanc) !important; color: var(--encre) !important; padding: 96px var(--gut) 40px; }
.wp-block-navigation.nav__links .is-menu-open .wp-block-navigation__container { flex-direction: column; gap: 6px; }
.wp-block-navigation.nav__links .is-menu-open .wp-block-navigation-item__content { font-size: 26px; padding: 8px 0; opacity: 1; }
@media (max-width: 599px) { .nav__links .wp-block-navigation__responsive-container-open { display: grid; } }
/* Maquette locale uniquement : imite le menu replié de core/navigation sous 600 px */
@media (max-width: 599px) {
  .wp-block-navigation.nav__links > .wp-block-navigation__container { display: none; }
  .nav__links:not(:has(.wp-block-navigation__responsive-container))::after {
    content: ""; display: block; width: 42px; height: 42px; border: 1px solid currentColor;
    background: linear-gradient(currentColor, currentColor) center calc(50% - 3px) / 16px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center calc(50% + 3px) / 16px 1.5px no-repeat;
  }
}
@media (prefers-reduced-motion: reduce) { .js .mots .m > span { transform: none; transition: none; } html { scroll-behavior: auto; } }
.contact .duo__d .enonce { font-size: clamp(24px, 2.1vw, 30px); }
.cat .bande-photo img { object-position: center 22%; }
