/* Ajouts au design de la maquette : menu mobile, accordéons, carrousels, formulaires.
   La version ordinateur n'est pas modifiée (tout est sous 700 px, sauf le strict nécessaire). */

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { overflow-x: hidden; }
img { max-width: 100%; }
input, select, textarea { width: 100%; box-sizing: border-box; max-width: 100%; }
input[type="file"] { width: 100%; }
a, button { -webkit-tap-highlight-color: transparent; }
.menu-m[hidden], [hidden] { display: none !important; }
.sticky-cta { display: none; }
.form-msg:empty { display: none; }
.hs::-webkit-scrollbar { display: none; }
.acc-b { display: flex; flex-direction: column; gap: inherit; }

/* en-tête fixe en haut au défilement (ordinateur et mobile) */
.site-header { position: sticky; top: 0; z-index: 50; transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(45,58,79,.08); }
[id] { scroll-margin-top: 96px; }

/* bouton « + N autres » des villes : seulement sur mobile */
.chips-more { display: none; }
.exp-tabs { display: none; }

/* -------- menu mobile -------- */
.menu-m { position: fixed; inset: 0; z-index: 60; background: #ffffff; padding: 88px 20px 32px; display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto; font-family: Lexend, system-ui, sans-serif; }
.menu-m nav { display: flex; flex-direction: column; }
.menu-m nav a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 0; border-bottom: 1px solid #E4E8EC; text-decoration: none; color: #2D3A4F; font-size: 22px; font-weight: 600; letter-spacing: -0.4px; }
.menu-m nav a small { font-size: 13px; font-weight: 500; color: #6BAA91; letter-spacing: 0; }
.menu-m-cta { display: flex; flex-direction: column; gap: 10px; padding-top: 28px; }
.btn-g, .btn-o { display: flex; align-items: center; justify-content: center; min-height: 54px; border-radius: 999px; font-size: 16px; font-weight: 600; text-decoration: none; }
.btn-g { background: #6BAA91; color: #fff !important; }
.btn-o { border: 1px solid #C9D2DA; color: #2D3A4F; }
body.menu-open { overflow: hidden; }
body.menu-open .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 70; }

@media (max-width: 700px) {
  /* -------- en-tête -------- */
  .site-header { position: sticky; top: 0; z-index: 50; }
  .site-header > div { flex-wrap: nowrap !important; padding-top: 12px !important; padding-bottom: 12px !important; }
  .site-header img { height: 42px !important; }
  .site-header .cta-d { display: none !important; }

  /* -------- typo et rythme -------- */
  h1 { font-size: 36px !important; letter-spacing: -1px !important; }
  h2 { font-size: 28px !important; }
  h3 { font-size: 19px !important; }
  p[style*="font-size: 20px"], p[style*="font-size: 19px"] { font-size: 17px !important; }
  p[style*="font-size: 18px"] { font-size: 16px !important; }
  section > div[style*="gap: 64px"], section > div[style*="gap: 56px"] { gap: 28px !important; }
  [style*="gap: 28px"] { gap: 20px !important; }
  a[style*="min-height: 52px"] { min-height: 50px !important; font-size: 15px !important; }
  section a[style*="min-height: 52px"] { flex: 1 1 auto; justify-content: center; }
  [style*="min-height: 560px"], [style*="min-height: 520px"], [style*="min-height: 480px"], [style*="min-height: 440px"], [style*="min-height: 420px"], [style*="min-height: 400px"], [style*="min-height: 360px"], [style*="min-height: 320px"] { min-height: 0 !important; }
  [style*="border-radius: 32px"] { border-radius: 24px !important; }
  img[style*="height: 360px"], img[style*="height: 320px"], img[style*="height: 300px"] { height: 220px !important; }

  .img-pair { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .img-pair > img { height: 170px !important; border-radius: 16px !important; }
  .img-pair > div { grid-column: 1 / -1 !important; }

  .team-photo img { height: 240px !important; border-radius: 20px !important; }
  .team-photo > span { left: 12px !important; bottom: 12px !important; font-size: 12px !important; padding: 8px 12px !important; }

  /* -------- accueil : expertises en deux boutons -------- */
  .exp-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .exp-tab { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 168px; padding: 16px; border-radius: 22px; font-family: inherit; text-align: left; cursor: pointer; transition: transform .2s, box-shadow .2s; -webkit-appearance: none; appearance: none; }
  .exp-tab:active { transform: scale(.98); }
  .exp-ops { background: linear-gradient(155deg, #E7F3ED 0%, #F5F7F8 70%); border: 1px solid #D3E6DC; color: #2D3A4F; }
  .exp-top { background-color: #2D3A4F; background-image: radial-gradient(circle at 100% 0%, rgba(107,170,145,.35), transparent 55%), linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: auto, 28px 28px, 28px 28px; border: 1px solid #2D3A4F; color: #fff; }
  .exp-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
  .exp-ops .exp-ic { background: #6BAA91; color: #fff; box-shadow: 0 6px 14px rgba(107,170,145,.35); }
  .exp-top .exp-ic { background: rgba(255,255,255,.12); color: #8FCBB2; border: 1px solid rgba(255,255,255,.18); }
  .exp-t { font-size: 19px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.15; }
  .exp-k { font-size: 12px; line-height: 1.4; opacity: .75; }
  .exp-go { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #3E7F66; }
  .exp-top .exp-go { color: #8FCBB2; }
  .exp-go i { font-style: normal; display: inline-block; transition: transform .25s; }
  .exp-tab[aria-selected="true"] { box-shadow: 0 0 0 2px #6BAA91, 0 12px 26px rgba(45,58,79,.14); }
  .exp-tab[aria-selected="true"] .exp-go i { transform: rotate(180deg); }
  .exp-grid { margin-top: -12px; }
  .exp-grid > a { display: none !important; }
  .exp-grid > a.open { display: flex !important; animation: expIn .3s ease; }
  .exp-grid > a img { height: 170px !important; }
  .exp-grid > a h3 { display: none; }
  @keyframes expIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

  /* -------- espace client : statuts en frise compacte -------- */
  .status-flow { display: flex !important; flex-direction: column !important; gap: 0 !important; position: relative; padding-left: 4px; }
  .status-flow > div { position: relative; flex-direction: column !important; gap: 6px !important; padding: 0 0 18px 26px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
  .status-flow > div::before { content: ""; position: absolute; left: 4px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #6BAA91; }
  .status-flow > div::after { content: ""; position: absolute; left: 9px; top: 22px; bottom: 0; width: 2px; background: #DCE7E2; }
  .status-flow > div:last-child { padding-bottom: 0 !important; }
  .status-flow > div:last-child::after { display: none; }
  .status-flow > div:last-child::before { background: #6BAA91; }
  .status-flow > div > p { font-size: 14px !important; line-height: 1.5 !important; }
  .status-flow > div > span { font-size: 11px !important; }

  /* -------- carrousels horizontaux -------- */
  .hs { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px !important; margin-left: -20px !important; margin-right: -20px !important; padding: 0 20px 8px !important; scrollbar-width: none; grid-template-columns: none !important; }
  .hs > * { flex: 0 0 84% !important; min-width: 0 !important; max-width: none !important; scroll-snap-align: start; grid-column: auto !important; }
  .hs-img > * { flex-basis: 78% !important; }
  .hs-img img { height: 240px !important; }
  .hs-cards > * { padding: 22px !important; }
  .hs-dots { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
  .hs-dots span { width: 6px; height: 6px; border-radius: 50%; background: #C9D2DA; transition: width .2s, background .2s; }
  .hs-dots span.on { width: 18px; border-radius: 3px; background: #6BAA91; }
  .dark .hs-dots span { background: rgba(255,255,255,.3); }
  .dark .hs-dots span.on { background: #6BAA91; }

  /* -------- accordéons -------- */
  .acc-h { cursor: pointer; position: relative; padding-right: 36px !important; user-select: none; }
  .acc-h::after { content: ""; position: absolute; right: 2px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: currentColor; opacity: .12; }
  .acc-h::before { content: "+"; position: absolute; right: 2px; top: 50%; width: 22px; line-height: 22px; margin-top: -11px; text-align: center; font-size: 17px; font-weight: 500; }
  .acc.open > .acc-h::before { content: "–"; }
  .acc:not(.open) > .acc-b { display: none !important; }
  .acc-b { display: flex; flex-direction: column; gap: 10px; }

  /* étapes de méthode : liste compacte numérotée */
  .steps { display: flex !important; flex-direction: column !important; gap: 0 !important; border-top: 1px solid #E4E8EC; }
  .steps > .acc { display: grid !important; grid-template-columns: 40px 1fr; align-items: center; column-gap: 14px; row-gap: 6px !important; padding: 16px 0 !important; border-bottom: 1px solid #E4E8EC; border-top: 0 !important; }
  .steps > .acc > span:first-child { width: 36px !important; height: 36px !important; font-size: 13px !important; grid-row: 1; }
  .steps > .acc > .acc-h { grid-column: 2; margin: 0 !important; }
  .steps > .acc > .acc-b { grid-column: 2; }
  .steps .acc-b p { font-size: 15px !important; }

  /* -------- listes repliables dans les cartes -------- */
  ul.fold { display: none !important; }
  ul.fold.open { display: flex !important; }
  .fold-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 600; opacity: .85; cursor: pointer; }

  /* -------- pastilles -------- */
  .chips-fold:not(.open) > span:nth-of-type(n+9) { display: none !important; }
  .chips-more { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(107,170,145,.6); background: transparent; color: #6BAA91; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
  section:not(.dark) .chips-more { color: #3E7F66; }
  .chips-fold.open .chips-more { display: none; }

  /* -------- chiffres clés -------- */
  .stats { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 20px 16px !important; }
  .stats > * { padding-top: 16px !important; }
  .stats span[style*="font-size: 64px"] { font-size: 40px !important; letter-spacing: -1px !important; }
  .stats span[style*="font-size: 15px"] { font-size: 13px !important; line-height: 1.4; }

  /* -------- secteurs (Ops Market) -------- */
  .sector-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .sector-card { padding: 16px !important; gap: 14px !important; border-radius: 16px !important; min-height: 104px !important; }
  .sector-card > span:first-child { font-size: 15px !important; line-height: 1.3; }
  .sector-card > span:last-child { font-size: 13px !important; }
  section [style*="#2D3A4F"] a[style*="min-height: 52px"], section[style*="#2D3A4F"] a[style*="min-height: 52px"] { padding: 0 18px !important; }

  /* -------- pied de page -------- */
  .site-footer > div:first-child { gap: 0 !important; padding-top: 48px !important; }
  .site-footer > div:first-child > div:first-child { padding-bottom: 24px; }
  .site-footer .acc { width: 100%; border-top: 1px solid #E4E8EC; }
  .site-footer .acc-h { padding: 16px 36px 16px 0 !important; margin: 0 !important; }
  .site-footer .acc-b { padding-bottom: 16px; gap: 12px; }
  .site-footer > div:first-child > div { flex: 1 1 100% !important; max-width: none !important; }
  .site-footer > div:first-child > div > div { width: 100%; flex: 1 1 100% !important; }
  .site-footer img[src$="wordmark-vert.svg"] { opacity: .9; }
  .site-footer > div:last-child { padding-bottom: 96px !important; flex-direction: column; gap: 4px !important; }

  /* -------- bouton flottant -------- */
  .sticky-cta { display: flex; position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 40; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border-radius: 999px; background: #6BAA91; color: #fff !important; font-family: Lexend, system-ui, sans-serif; font-size: 16px; font-weight: 600; text-decoration: none; box-shadow: 0 12px 30px rgba(45,58,79,.28); transform: translateY(140%); transition: transform .25s ease; }
  .sticky-cta.show { transform: none; }
  body.menu-open .sticky-cta { display: none; }

  /* -------- formulaires -------- */
  form[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  form [style*="grid-column"] { grid-column: auto !important; }
  div[role="tablist"][aria-label="Vous êtes"] { align-self: stretch !important; }
  div[role="tablist"][aria-label="Vous êtes"] button { flex: 1; padding: 0 10px !important; }
  .apply-card { padding: 24px !important; }

  /* -------- offres -------- */
  #o-sectors { flex-wrap: nowrap !important; overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; }
  #o-sectors::-webkit-scrollbar { display: none; }
  #o-sectors button { flex: 0 0 auto; white-space: nowrap; }
  #o-form input { min-height: 48px !important; }
  #o-form input#o-l { border-left: 0 !important; border-top: 1px solid #E4E8EC !important; }
  #o-form button { width: 100%; }
  #o-list > a { padding: 18px !important; gap: 12px !important; }
  #o-list > a > span:last-child { display: none !important; }
  #o-list > a > span:first-child > span:first-child { font-size: 16px !important; line-height: 1.35; }
}

/* fiche offre : contenu riche venant de Flatchr */
.job-rich { font-size: 17px; line-height: 1.7; color: #4A5668; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.job-rich > *:first-child { margin-top: 0 !important; }
.job-rich p { margin: 0 0 14px; }
.job-rich .job-h { margin: 30px 0 12px; text-align: left; font-size: 18px; font-weight: 600; color: #2D3A4F; }
.job-rich .job-h::before { content: ""; display: block; width: 28px; height: 3px; border-radius: 2px; background: #6BAA91; margin-bottom: 12px; }
.job-rich ul { margin: 0 0 18px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.job-rich li { position: relative; padding-left: 26px; }
.job-rich li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: #6BAA91; }
.job-rich li p { margin: 0; }
.job-rich strong { color: #2D3A4F; font-weight: 600; }
.job-section { padding-top: 40px; border-top: 1px solid #E4E8EC; }
.job-section:first-child { padding-top: 0; border-top: 0; }
@media (max-width: 700px) {
  .job-rich { font-size: 16px; text-align: left; }
  .job-section { padding-top: 28px; }
}
@media (min-width: 701px) { .apply-card { position: sticky; top: 104px; } }

/* -------- menu principal : pastille verte qui suit la souris -------- */
.nav-d { position: relative; gap: 4px !important; align-items: center; }
.nav-d a { position: relative; z-index: 1; padding: 9px 12px; border-radius: 999px; transition: color .25s ease; }
.nav-d a:hover, .nav-d a.is-active { color: #3E7F66 !important; }
.nav-pill { position: absolute; z-index: 0; top: 0; left: 0; height: 0; width: 0; border-radius: 999px; background: rgba(107,170,145,.14); box-shadow: inset 0 0 0 1px rgba(107,170,145,.35); opacity: 0; pointer-events: none; transition: transform .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1), height .35s cubic-bezier(.2,.8,.2,1), opacity .2s ease; }
.nav-pill.on { opacity: 1; }
.nav-pill { display: none !important; } /* au survol : seul le texte passe au vert */

/* boutons de l'en-tête */
.site-header a.login-d { transition: border-color .2s, color .2s, background .2s; }
.site-header a.login-d:hover { border-color: #6BAA91 !important; color: #3E7F66 !important; background: rgba(107,170,145,.08); }
.site-header a.login-d:hover svg { stroke: #3E7F66; }
.site-header a.cta-d { transition: transform .2s ease, box-shadow .2s ease, background .2s; }
.site-header a.cta-d:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(107,170,145,.35); background: #5E9C84 !important; color: #fff !important; }
.site-header img { transition: opacity .2s; height: 54px !important; }
.site-header a:hover > img { opacity: .8; }

@media (prefers-reduced-motion: reduce) {
  .nav-pill, .nav-d a, .site-header a.cta-d { transition: none !important; }
  .site-header a.cta-d:hover { transform: none; }
}

/* -------- espace client : statuts en frise horizontale (ordinateur) -------- */
@media (min-width: 701px) {
  .status-flow { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 0 !important; position: relative; padding-top: 8px; }
  .status-flow::before { content: ""; position: absolute; top: 15px; left: 8px; right: calc(25% - 8px); height: 2px; background: linear-gradient(90deg, #DCE7E2, #6BAA91); }
  .status-flow > div { position: relative; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 40px 32px 0 0 !important; gap: 14px !important; }
  .status-flow > div::before { content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #6BAA91; transition: transform .25s ease; }
  .status-flow > div:last-child::before { background: #6BAA91; box-shadow: 0 0 0 3px #6BAA91, 0 0 0 9px rgba(107,170,145,.18); }
  .status-flow > div:hover::before { transform: scale(1.25); }
  .status-flow > div > p { font-size: 16px !important; }
}

/* -------- avis Google -------- */
.rv-badge { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: #fff; border: 1px solid #E4E8EC; text-decoration: none; color: #2D3A4F; box-shadow: 0 8px 24px rgba(45,58,79,.06); transition: transform .2s, box-shadow .2s; }
.rv-badge:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(45,58,79,.1); color: #2D3A4F; }
.rv-score { font-size: 20px; font-weight: 700; }
.rv-count { font-size: 14px; color: #5B6778; }
.rv-stars { color: #F5B301; letter-spacing: 2px; font-size: 15px; }
.rv-marquee { overflow: hidden; margin: 0 -40px; padding: 4px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.rv-track { display: flex; align-items: stretch; gap: 20px; width: max-content; padding: 0 40px; animation: marq 90s linear infinite; }
.rv-marquee:hover .rv-track { animation-play-state: paused; }
.rv-card { margin: 0; flex: 0 0 380px; display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 22px; background: #fff; border: 1px solid #E4E8EC; box-shadow: 0 10px 30px rgba(45,58,79,.05); }
.rv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rv-tag { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(107,170,145,.14); color: #3E7F66; }
.rv-text { margin: 0; font-size: 15px; line-height: 1.6; color: #4A5668; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.rv-card:hover .rv-text { -webkit-line-clamp: unset; }
.rv-name { margin-top: auto; font-size: 15px; font-weight: 600; color: #2D3A4F; }
.rv-name span { font-weight: 400; color: #8A94A3; font-size: 13px; }
@media (max-width: 700px) {
  .rv-marquee { margin: 0 -20px; }
  .rv-track { padding: 0 20px; gap: 12px; animation-duration: 70s; }
  .rv-card { flex-basis: 280px; padding: 20px; }
  .rv-text { font-size: 14px; -webkit-line-clamp: 6; }
  .rv-badge { padding: 10px 14px; }
  .rv-section > div { padding-top: 56px !important; padding-bottom: 56px !important; gap: 24px !important; }
}
@media (prefers-reduced-motion: reduce) { .rv-track { animation: none; } .rv-marquee { overflow-x: auto; } }

/* Logos clients — mobile : grille fixe (le défilement très large ne s'affiche pas sur Safari iPhone) */
@media (max-width: 700px) {
  .marquee { -webkit-mask-image: none; mask-image: none; overflow: visible; }
  .marquee-track { animation: none !important; transform: none !important; width: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 18px; align-items: center; justify-items: center; }
  .marquee-track .mlogo { height: auto; max-height: 34px; max-width: 100%; width: auto; margin: 0; opacity: .75; }
  .marquee-track .mlogo[aria-hidden="true"], .marquee-track .mlogo:nth-child(n+13) { display: none; }
}
