/* htag consulting — design system */
:root {
  --night: #1A1F3C;
  --night-soft: #2a3050;
  --night-700: #3a4068;
  --teal: #1D9E75;
  --teal-soft: #e6f4ee;
  --paper: #FAF8F4;
  --paper-2: #F2EEE5;
  --line: #e3ddd0;
  --gray-700: #4a4d5e;
  --gray-500: #7a7e91;
  --gray-300: #b4b6c2;
  --white: #ffffff;
  --red: #b04444;
  --max: 1200px;
  --rad: 4px;
  --shadow-sm: 0 1px 2px rgba(26,31,60,0.04);
  --shadow-md: 0 6px 24px rgba(26,31,60,0.08);
  --t: 220ms cubic-bezier(.2,.6,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--night);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Type scale */
.h-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}
h1, .h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--night);
  margin: 0;
}
h2, .h2 {
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--night);
  margin: 0;
}
h3, .h3 {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--night);
  margin: 0;
}
.lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--gray-700);
}
p { margin: 0 0 1em; color: var(--gray-700); }

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; max-width: 100%; }
img, svg, video { max-width: 100%; }

/* Container */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--dark { background: var(--night); color: #fff; }
.section--dark p, .section--dark .lead { color: #cfd1dc; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--paper2 { background: var(--paper-2); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--rad);
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid transparent;
  transition: transform var(--t), background var(--t), border-color var(--t), color var(--t);
}
.btn .arrow { transition: transform var(--t); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: #178862; }
.btn--ghost { background: transparent; color: var(--night); border-color: var(--night); }
.btn--ghost:hover { background: var(--night); color: #fff; }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn--ghost-light:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.btn--lg { padding: 17px 28px; font-size: 16px; }
.btn--header { white-space: nowrap; padding: 11px 16px; font-size: 14px; flex-shrink: 0; min-height: 44px; }
.site-header__inner { gap: 16px; }
.logo--header { flex-shrink: 1; min-width: 0; }
.logo--header .logo__img { max-width: 100%; }

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,248,244,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo__img { display: block; height: 26px; width: auto; }
.logo--header .logo__img { height: 28px; }
.logo--footer .logo__img { height: 26px; }
.nav { display: flex; gap: 18px; align-items: center; }
.nav a {
  font-size: 13.5px;
  color: var(--night);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--teal); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav-toggle { display: none; }
.nav__contact { display: none; }
.nav.nav--open .nav__contact { display: flex; }

/* FOOTER */
.site-footer {
  background: var(--night);
  color: #cfd1dc;
  padding: 72px 0 28px;
}
.site-footer h4 {
  color: #fff; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  margin: 0 0 14px; font-weight: 600;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px;
}
.site-footer a { color: #cfd1dc; transition: color var(--t); }
.site-footer a:hover { color: var(--teal); }
.site-footer .logo__img--light { filter: none; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; font-size: 13px; color: var(--gray-300);
}

/* PHOTOS */
.photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; border-radius: var(--rad); }

/* PHOTO PLACEHOLDERS */
.photo-slot {
  position: relative;
  border-radius: var(--rad);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(26,31,60,0.06), rgba(26,31,60,0.02)),
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(26,31,60,0.04) 22px 23px);
  border: 1px solid rgba(26,31,60,0.12);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 18px;
  min-height: 240px;
  color: var(--night);
}
.photo-slot::before {
  content: ""; position: absolute; inset: 16px;
  border: 1px dashed rgba(26,31,60,0.25); border-radius: 2px; pointer-events: none;
}
.photo-slot__tag {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--night); color: #fff; padding: 4px 8px; border-radius: 2px;
  position: relative; z-index: 1;
}
.photo-slot__caption {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; color: var(--night-soft); margin-top: 8px; max-width: 90%;
  position: relative; z-index: 1;
}
.photo-slot--dark {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01)),
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,255,255,0.05) 22px 23px);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}
.photo-slot--dark::before { border-color: rgba(255,255,255,0.25); }
.photo-slot--dark .photo-slot__tag { background: var(--teal); }
.photo-slot--dark .photo-slot__caption { color: rgba(255,255,255,0.65); }

/* Common patterns */
.divider { width: 64px; height: 2px; background: var(--teal); border: 0; margin: 0 0 24px; }
.kicker-line {
  display: inline-flex; align-items: center; gap: 12px;
}
.kicker-line::before {
  content: ""; display: inline-block; width: 32px; height: 1.5px; background: var(--teal);
}

/* Cards / lists */
.editorial-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 32px;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.editorial-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--night);
}

/* Quote */
blockquote.pull {
  margin: 0; padding-left: 24px; border-left: 3px solid var(--teal);
  font-size: 19px; line-height: 1.5; color: var(--night); font-weight: 500;
}
blockquote.pull cite {
  display: block; font-size: 13px; color: var(--gray-500); margin-top: 12px;
  font-style: normal; font-weight: 400;
}

/* Stat */
.stat-num {
  font-size: clamp(48px, 6vw, 88px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 0.95; color: var(--night);
}
.stat-label { font-size: 16px; color: var(--night); margin-top: 6px; font-weight: 500; }
.stat-context { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

/* Breadcrumb (shared: résultats + pages de cas) */
.sr-h1 { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.breadcrumb { background: var(--paper); border-bottom: 1px solid var(--line); padding: 14px 0; font-size: 13px; }
.breadcrumb .wrap { display: flex; align-items: center; gap: 8px; color: var(--gray-500); flex-wrap: wrap; }
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb span[aria-current] { color: var(--night); font-weight: 600; }

/* Badges */
.cas__badge { color: #fff; padding: 4px 10px; border-radius: 2px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; display: inline-block; }
.cas__badge--outline { background: transparent !important; border: 1px solid rgba(255,255,255,0.4); color: #fff; }

/* Page de cas détail */
.hero-cas { background: var(--night); padding-top: 48px; padding-bottom: 48px; }
.cas-detail__badges { display: flex; gap: 10px; flex-wrap: wrap; }
.cas-detail__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; }
.cas-detail__stats .stat-card { border-left: 3px solid var(--teal); padding-left: 20px; }
.cas-detail__stats .stat-num { font-size: clamp(28px, 3vw, 40px); white-space: normal; line-height: 1.15; }
.cas-detail__stats .stat-label { margin-top: 8px; }
.cas-detail__body { max-width: 720px; }
.cas-detail__body h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal); margin: 40px 0 14px; }
.cas-detail__body h3:first-child { margin-top: 0; }
.cas-detail__body .accroche { font-size: 20px; font-weight: 700; color: var(--night); margin-bottom: 20px; }
.cas-detail__body p { line-height: 1.7; color: var(--gray-700); margin-bottom: 16px; }
.cas-detail__body blockquote.pull { margin: 28px 0; }
.resultat-box { background: #F1F3F6; border-radius: var(--rad); padding: 28px 32px; }
.resultat-box p { margin: 0; color: var(--night); font-weight: 500; }
.cas-detail__cta { border-top: 4px solid var(--teal); }

/* Continuer (maillage) */
.continuer { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 40px; }
.continuer__col { display: flex; flex-direction: column; gap: 14px; }
.continuer__link { font-weight: 700; font-size: 17px; color: var(--night); display: inline-flex; gap: 8px; align-items: center; }
.continuer__link .arrow { color: var(--teal); }
.continuer__neighbors { display: grid; gap: 14px; }
.neighbor-card { background: #fff; border: 1px solid var(--line); border-radius: var(--rad); padding: 20px; transition: border-color var(--t), transform var(--t); display: flex; flex-direction: column; gap: 10px; }
.neighbor-card:hover { border-color: var(--night); transform: translateY(-2px); }
.neighbor-card h4 { font-size: 16px; margin: 0; }
.neighbor-card__stat { font-size: 13px; color: var(--gray-500); }
.continuer__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.continuer__list a { font-weight: 600; color: var(--teal); display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 880px) { .continuer { grid-template-columns: 1fr; } }

/* Header nav collapses earlier than the general layout breakpoint,
   since 6 nav items + logo + CTA need more room before wrapping */
@media (max-width: 1040px) {
  .nav { display: none; }
  .nav.nav--open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 12px 28px 20px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  }
  .nav.nav--open a { font-size: 15px; padding: 10px 0; width: 100%; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 0; padding: 0; width: 44px; height: 44px; flex-shrink: 0; cursor: pointer;
  }
  .nav.nav--open a { min-height: 44px; display: flex; align-items: center; }
  .nav.nav--open .nav__contact { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--teal); font-weight: 600; }
}
@media (max-width: 480px) {
  .site-header__inner { height: 64px; gap: 10px; }
  .logo--header .logo__img { height: 22px; }
  .btn--header { padding: 10px 12px; font-size: 13px; gap: 6px; }
  .btn--header .btn__label-long { display: none; }
  .wrap { padding: 0 20px; }
}
@media (min-width: 481px) { .btn--header .btn__label-short { display: none; } }

/* Mobile */
@media (max-width: 880px) {
  .section { padding: 72px 0; }
  .two-col, .two-col--media-left { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .breadcrumb .wrap span[aria-current] { display: block; width: 100%; }
}
