/* =========================================================================
   ClientWise — Styles pour les sous-pages (services/*, blog/*)
   À charger en complément de style.css
   ========================================================================= */

/* ---------- Page hero (variante plus compact que l'accueil) ---------- */
.page-hero {
  padding: 80px 0 60px;
  background:
    radial-gradient(1200px 500px at 80% 0%, var(--hero-glow-1) 0%, transparent 60%),
    radial-gradient(900px 400px at 0% 100%, var(--hero-glow-2) 0%, transparent 55%);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; opacity: 0.4;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 70%);
          mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 70%);
}
.page-hero__inner { position: relative; max-width: 880px; }
.page-hero__breadcrumb {
  font-family: var(--font-mono);
  font-size: 13px; color: var(--ink-mute);
  margin-bottom: 18px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.page-hero__breadcrumb a { color: var(--ink-mute); }
.page-hero__breadcrumb a:hover { color: var(--accent); }
.page-hero__breadcrumb-sep { opacity: 0.5; }
.page-hero__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 5px 12px;
  border-radius: var(--r-full);
  margin-bottom: 22px;
  letter-spacing: 0.04em;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  font-weight: 700;
  margin: 0 0 22px;
}
.page-hero h1 em {
  font-style: normal;
  background: linear-gradient(110deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.page-hero__lead {
  font-size: 19px; line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 720px;
}
.page-hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Sections de page interne ---------- */
.page-section { padding: 80px 0; }
.page-section--alt { background: var(--bg-soft); }
.page-section__container { max-width: 960px; margin: 0 auto; padding: 0 var(--gutter); }
.page-section__header { margin-bottom: 50px; max-width: 720px; }
.page-section__header h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 3.8vw, 40px);
  line-height: 1.15; margin: 0 0 16px;
}
.page-section__header p {
  font-size: 17px; line-height: 1.6; color: var(--ink-soft); margin: 0;
}

/* ---------- Prose (contenu long article / page) ---------- */
.prose { max-width: 720px; font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
.prose > * + * { margin-top: 1em; }
.prose h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.2; color: var(--ink);
  margin-top: 2em; margin-bottom: 0.6em; letter-spacing: -0.02em;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.25; color: var(--ink);
  margin-top: 1.6em; margin-bottom: 0.5em;
}
.prose h4 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 18px; line-height: 1.3; color: var(--ink);
  margin-top: 1.4em; margin-bottom: 0.4em;
}
.prose p { margin: 0 0 1em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); transition: border-color .15s; }
.prose a:hover { border-bottom-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1em; }
.prose ul li, .prose ol li { margin-bottom: 0.4em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li {
  position: relative; padding-left: 1.5em;
}
.prose ul li::before {
  content: '→';
  position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 700;
}
.prose blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-bg);
  margin: 1.5em 0; padding: 18px 24px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic; color: var(--ink);
}
.prose blockquote p:last-child { margin: 0; }
.prose code {
  background: var(--bg-soft);
  padding: 2px 6px; border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}
.prose pre {
  background: var(--ink); color: #fff;
  padding: 18px; border-radius: var(--r-md);
  overflow-x: auto; font-family: var(--font-mono);
  font-size: 14px; line-height: 1.5;
  margin: 1.5em 0;
}
.prose pre code { background: transparent; padding: 0; color: inherit; }
.prose table {
  width: 100%; border-collapse: collapse; margin: 1.5em 0;
  font-size: 15px;
}
.prose th, .prose td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
.prose th {
  background: var(--bg-soft);
  font-family: var(--font-display);
  font-weight: 700; color: var(--ink);
}
.prose figure { margin: 2em 0; }
.prose figcaption {
  font-size: 14px; color: var(--ink-mute);
  margin-top: 8px; text-align: center;
}
.prose hr {
  border: none; height: 1px;
  background: var(--border);
  margin: 2.5em 0;
}

/* ---------- Layout 2 colonnes : article + sidebar ---------- */
.article-layout {
  display: grid; grid-template-columns: 1fr 280px;
  gap: 60px; max-width: 1100px;
  margin: 0 auto; padding: 0 var(--gutter);
}
.article-aside {
  position: sticky; top: 100px; align-self: start;
  font-size: 14px;
}
.article-aside__card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.article-aside__title {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--ink-mute);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 12px;
}
.article-aside__toc { list-style: none; padding: 0; margin: 0; }
.article-aside__toc li { padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.article-aside__toc li:last-child { border-bottom: none; }
.article-aside__toc a { color: var(--ink-soft); }
.article-aside__toc a:hover { color: var(--accent); }
.article-aside__cta {
  display: block;
  background: var(--cta-bg); color: var(--cta-fg);
  padding: 14px 18px; border-radius: var(--r-md);
  text-align: center; font-weight: 600; font-size: 14px;
  margin-top: 8px;
}
.article-aside__cta:hover { background: var(--accent); }

/* ---------- Meta article ---------- */
.article-meta {
  display: flex; gap: 14px; align-items: center;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 20px;
}
.article-meta__sep { opacity: 0.5; }
.article-meta__tag {
  background: var(--accent-bg); color: var(--accent);
  padding: 3px 10px; border-radius: var(--r-full);
  font-weight: 600;
}

/* ---------- Liste d'articles (blog landing) ---------- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card--featured {
  background: linear-gradient(160deg, var(--cta-bg), color-mix(in srgb, var(--cta-bg) 88%, var(--accent)));
  color: var(--cta-fg);
  border-color: var(--cta-bg);
  box-shadow: var(--shadow-md);
}
.post-card--featured .post-card__tag { background: rgba(255,255,255,0.15); color: #fff; }
.post-card--featured .post-card__title { color: #fff; }
.post-card--featured .post-card__excerpt { color: rgba(255,255,255,0.75); }
.post-card--featured .post-card__more { color: var(--accent-soft); }
.post-card__tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 11px;
  font-weight: 600; letter-spacing: 0.06em;
  color: var(--accent); background: var(--accent-bg);
  padding: 4px 10px; border-radius: var(--r-full);
  margin-bottom: 16px; align-self: flex-start;
}
.post-card__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; line-height: 1.2;
  margin: 0 0 12px; color: var(--ink); letter-spacing: -0.018em;
}
.post-card__excerpt {
  font-size: 15px; line-height: 1.55;
  color: var(--ink-soft); margin: 0 0 18px;
  flex: 1;
}
.post-card__more {
  font-size: 13px; font-weight: 600;
  color: var(--accent);
}
.post-card__more::after { content: ' →'; }

/* ---------- Liste services croisée (sur les pages services) ---------- */
.related-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 30px;
}
.related-service {
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: all .15s var(--ease);
}
.related-service:hover { border-color: var(--accent); transform: translateY(-2px); }
.related-service__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 16px; color: var(--ink); margin: 0 0 6px;
}
.related-service__desc { font-size: 13px; color: var(--ink-soft); margin: 0; }

/* ---------- Selecteur de langue dans la nav ---------- */
.nav__lang {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 6px;
  font-family: var(--font-mono); font-size: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px;
  position: relative;
}
.nav__lang-current {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  font-weight: 700; color: var(--ink);
  cursor: pointer; user-select: none;
}
.nav__lang-current::after {
  content: '▾'; font-size: 9px; opacity: 0.6;
}
.nav__lang-list {
  position: absolute; top: 100%; right: 0;
  /* padding-top cree un gap visuel ET hoverable (le menu lui-meme couvre la zone) */
  padding: 10px 0 0 0;
  min-width: 140px;
  opacity: 0; pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s;
}
/* La "vraie" carte du menu, decoupee du padding pour rester visuellement detachee */
.nav__lang-list::before {
  content: '';
  position: absolute;
  top: 10px; left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  z-index: -1;
}
/* Zone tampon invisible qui couvre l'espace entre le declencheur et la carte,
   pour que le hover ne se rompe pas quand la souris descend vers le menu. */
.nav__lang::after {
  content: '';
  position: absolute;
  top: 100%; left: 0; right: 0;
  height: 14px;
  pointer-events: none;
}
.nav__lang:hover::after,
.nav__lang:focus-within::after {
  pointer-events: auto;
}
.nav__lang:hover .nav__lang-list,
.nav__lang:focus-within .nav__lang-list {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
/* Petit delai a la sortie pour donner du temps au curseur d'atteindre le menu */
.nav__lang-list { transition-delay: 0.1s; }
.nav__lang:hover .nav__lang-list,
.nav__lang:focus-within .nav__lang-list { transition-delay: 0s; }
.nav__lang-list a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 13px; color: var(--ink-soft);
  font-family: var(--font-body);
}
.nav__lang-list a:hover { background: var(--bg-soft); color: var(--ink); }
.nav__lang-list a.is-current {
  background: var(--accent-bg); color: var(--accent); font-weight: 600;
}
.nav__lang-flag {
  font-size: 16px; line-height: 1;
}

/* ---------- CTA section (utilisée en bas des pages internes) ---------- */
.cta-band {
  padding: 70px 0;
  background: linear-gradient(135deg, var(--cta-bg) 0%, color-mix(in srgb, var(--cta-bg) 88%, var(--accent)) 100%);
  color: var(--cta-fg);
  text-align: center;
}
.cta-band h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15; color: #fff;
  margin: 0 0 16px; letter-spacing: -0.02em;
}
.cta-band p {
  font-size: 18px; color: rgba(255,255,255,0.8);
  max-width: 600px; margin: 0 auto 32px;
}
.cta-band .btn--primary { background: #fff; color: var(--ink); }
.cta-band .btn--primary:hover { background: var(--accent-soft); }
.cta-band .btn--ghost { border-color: rgba(255,255,255,0.3); color: #fff; background: transparent; }
.cta-band .btn--ghost:hover { background: rgba(255,255,255,0.1); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .page-hero { padding: 50px 0 40px; }
  .page-section { padding: 50px 0; }
  .article-layout { grid-template-columns: 1fr; gap: 30px; }
  .article-aside { position: static; }
  .cta-band { padding: 50px 0; }
}
