/* ═════════════════════════════════════════════════════════════════════
   site-shared.css — Nav, ligne directe, footer du site JuriFidu
   Charge sur les pages /blog/ pour garantir une coherence visuelle
   parfaite avec les autres pages du site.
   ═════════════════════════════════════════════════════════════════════ */

:root {
  --rouge: #C5092F;
  --rouge-dark: #A00725;
  --rouge-light: #FCE5E9;
  --bleu: #0159AA;
  --bleu-dark: #014684;
  --bleu-light: #E5EEF7;
  --noir: #3A3A3A;
  --gris-90: #1F1F1F;
  --gris-70: #4A4A4A;
  --gris-50: #8A8A8A;
  --gris-30: #D4D4D4;
  --gris-10: #F2F2F2;
  --blanc: #FAFAFA;
  --blanc-pur: #FFFFFF;
  --rule: #E0E0E0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--noir);
  background: var(--blanc);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ═════ BOUTONS ═════════════════════════ */
.btn-primary, .btn-ghost, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--rouge);
  color: white;
  border-color: var(--rouge);
}
.btn-primary:hover {
  background: var(--rouge-dark);
  border-color: var(--rouge-dark);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--noir);
  border-color: var(--noir);
}
.btn-ghost:hover { background: var(--noir); color: white; }
.btn-outline {
  background: transparent;
  color: var(--bleu);
  border-color: var(--bleu);
}
.btn-outline:hover { background: var(--bleu); color: white; }

/* ═════ NAV ═════════════════════════════ */
.nav {
  background: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
body.nav-open .nav {
  backdrop-filter: none;
  z-index: 1000;
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1;
}
.nav-brand-juri {
  font-family: 'Archivo Black', sans-serif;
  font-size: 22px;
  color: var(--rouge);
  letter-spacing: -0.01em;
}
.nav-brand-fidu {
  font-family: 'Archivo Black', sans-serif;
  font-size: 22px;
  color: var(--bleu);
  letter-spacing: -0.01em;
}
.nav-brand-mark {
  font-family: 'Archivo Black', sans-serif;
  font-size: 8px;
  color: var(--noir);
  letter-spacing: 0.24em;
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--gris-30);
  padding-top: 2px;
}
.nav-logo {
  display: block;
  height: 42px;
  width: auto;
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gris-70);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--rouge); }
.nav-cta {
  background: var(--noir);
  color: white !important;
  padding: 11px 22px;
  font-weight: 600;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--rouge); }

/* Hamburger mobile */
.nav-burger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 12px 8px;
  width: 48px;
  height: 48px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  align-items: flex-end;
  z-index: 1001;
  position: relative;
}
.nav-burger span {
  display: block;
  height: 2.5px;
  background: var(--noir);
  width: 28px;
  transition: all 0.3s ease;
}
.nav-burger span:nth-child(2) { width: 22px; }
.nav-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg); width: 28px;
}
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg); width: 28px;
}
.nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10, 10, 10, 0.6);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s;
}
.nav-overlay.is-visible { opacity: 1; }

/* === DROPDOWN NAV ============================== */
.nav-item-dropdown { position: relative; }
.nav-item-dropdown > .nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--gris-70);
  padding: 0;
  transition: color 0.2s;
  line-height: 1;
}
.nav-item-dropdown > .nav-toggle::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
  margin-left: 2px;
  margin-top: -2px;
}
.nav-item-dropdown.is-open > .nav-toggle::after,
.nav-item-dropdown:hover > .nav-toggle::after {
  transform: rotate(225deg) translateY(0);
  margin-top: 2px;
}
.nav-item-dropdown > .nav-toggle:hover { color: var(--rouge); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 240px;
  background: var(--blanc);
  border: 1px solid rgba(10,10,10,0.08);
  border-radius: 4px;
  box-shadow: 0 12px 32px rgba(10,10,10,0.12);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 1002;
}
.nav-item-dropdown:hover .nav-dropdown,
.nav-item-dropdown:focus-within .nav-dropdown,
.nav-item-dropdown.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}
.nav-dropdown a {
  display: block;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gris-70);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-dropdown a:hover {
  color: var(--rouge);
  background: rgba(197, 9, 47, 0.04);
}
.nav-dropdown a strong {
  font-weight: 700;
  color: var(--noir);
}
.nav-dropdown a:hover strong { color: var(--rouge); }
.nav-dropdown-divider {
  height: 1px;
  background: rgba(10,10,10,0.08);
  margin: 6px 16px;
}

/* === BANDEAU LIGNE DIRECTE ============== */
.ligne-directe-bandeau {
  background: rgba(197, 9, 47, 0.35);
  border-top: 2px solid rgba(197, 9, 47, 0.7);
  border-bottom: 2px solid rgba(197, 9, 47, 0.7);
  padding: 14px 0;
  margin-bottom: 0;
}
.ligne-directe-bandeau .container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: #4A4A4A;
  flex-wrap: wrap;
}
.ligne-directe-bandeau .ld-label { color: #6B6B6B; }
.ligne-directe-bandeau .ld-formule { color: #262626; font-weight: 700; }
.ligne-directe-bandeau .ld-numero {
  color: rgb(197, 9, 47);
  font-weight: 700;
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  letter-spacing: 0.02em;
}
.ligne-directe-bandeau .ld-numero:hover { text-decoration: underline; }
.ligne-directe-bandeau .ld-icon { width: 16px; height: 16px; color: rgb(197, 9, 47); flex-shrink: 0; }
@media (max-width: 600px) {
  .ligne-directe-bandeau { padding: 10px 0; }
  .ligne-directe-bandeau .container { font-size: 13px; gap: 8px; }
  .ligne-directe-bandeau .ld-numero { font-size: 15px; }
}

/* === NAV MOBILE (max-width 1000px) === */
@media (max-width: 1000px) {
  .nav-burger { display: flex; }

  .nav-item-dropdown { width: 100%; }
  .nav-item-dropdown > .nav-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 18px 0;
    font-size: 17px;
    color: var(--noir);
    font-weight: 600;
    border-bottom: 1px solid rgba(10, 10, 10, 0.08);
    line-height: 1.4;
  }
  .nav-item-dropdown.is-open > .nav-toggle {
    border-bottom-color: transparent;
    color: var(--rouge);
  }
  .nav-item-dropdown > .nav-toggle::after {
    width: 8px; height: 8px;
    border-width: 2px;
    margin-top: 0;
  }
  .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: rgba(10, 10, 10, 0.03);
    padding: 0;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-radius: 0;
    margin: 0 -32px;
  }
  .nav-item-dropdown.is-open .nav-dropdown {
    max-height: 700px;
    border-bottom: 1px solid rgba(10, 10, 10, 0.08);
    padding: 4px 0 12px;
    transform: none;
  }
  .nav-dropdown a {
    padding: 11px 32px;
    font-size: 15px;
    color: var(--gris-70);
    font-weight: 500;
    border-bottom: none !important;
  }
  .nav-dropdown a:hover { background: rgba(197, 9, 47, 0.06); }
  .nav-dropdown-divider { margin: 4px 32px; }
  .nav-links {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 85vw);
    background: var(--blanc);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 96px 32px 32px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: -8px 0 32px rgba(10, 10, 10, 0.15);
    overflow-y: auto;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a {
    padding: 18px 0;
    font-size: 17px;
    border-bottom: 1px solid rgba(10, 10, 10, 0.08);
    color: var(--noir);
    font-weight: 600;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links .nav-cta {
    margin-top: 24px;
    text-align: center;
    padding: 16px 20px;
    border-bottom: none;
  }
  .nav-overlay.is-visible { display: block; }
  body.nav-open { overflow: hidden; }
}

/* ═════ FOOTER ═══════════════════════════ */
footer {
  background: var(--noir);
  color: var(--gris-50);
  padding: 48px 0 24px;
  font-size: 13px;
  --rouge: #C5092F;
  --rouge-dark: #A00725;
  --rouge-light: #FCE5E9;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand { margin-bottom: 14px; }
.footer-logo-img {
  width: 96px;
  height: auto;
  display: block;
  max-width: 100%;
}
.footer-address {
  font-size: 14px;
  line-height: 1.7;
  color: var(--gris-50);
  margin-bottom: 16px;
}
.footer-contact {
  font-size: 14px;
  line-height: 1.7;
}
.footer-contact a {
  color: var(--gris-50);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-contact a:hover { color: white; }

.footer-inner h5 {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: white;
  margin: 0 0 16px;
}
.footer-inner ul { list-style: none; padding: 0; margin: 0; }
.footer-inner ul li { padding: 4px 0; }
.footer-inner ul a {
  color: var(--gris-50);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-inner ul a:hover { color: white; }

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: 12px;
  color: var(--gris-50);
}

/* Compactage du footer (overrides du site original) */
footer { padding: 56px 0 24px !important; }
.footer-inner { gap: 36px !important; margin-bottom: 40px !important; }
.footer-logo-img { width: 100px !important; }

@media (max-width: 1199px) {
  .footer-inner {
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 36px;
  }
  .footer-logo-img { width: 88px; }
}

@media (max-width: 1023px) {
  footer { padding: 64px 0 28px; }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
    margin-bottom: 48px;
  }
  .footer-inner > div:first-child {
    grid-column: 1 / 3;
    margin-bottom: 8px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .footer-logo-img { width: 88px; }
}

@media (max-width: 719px) {
  footer { padding: 56px 0 24px; }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
    margin-bottom: 40px;
  }
  .footer-inner > div:first-child {
    grid-column: 1 / 3;
    padding-bottom: 28px;
  }
  .footer-logo-img { width: 120px; }
  .footer-inner h5 { font-size: 13px; margin-bottom: 12px; }
  .footer-inner ul a { font-size: 14px; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 24px;
    font-size: 11px;
    line-height: 1.6;
  }
}

@media (max-width: 479px) {
  footer { padding: 48px 0 20px !important; }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 32px;
  }
  .footer-inner > div:first-child {
    grid-column: 1;
    padding-bottom: 24px;
  }
  .footer-logo-img { width: 110px; }
  .footer-brand { margin-bottom: 16px; }
  .footer-address, .footer-contact { font-size: 13px; }
  .footer-inner h5 {
    font-size: 10px;
    letter-spacing: 0.14em;
    margin-bottom: 10px;
  }
  .footer-inner ul li { padding: 3px 0; }
  .footer-inner ul a { font-size: 14px; }

  .footer-bottom {
    padding-top: 20px;
    font-size: 10px;
    line-height: 1.5;
  }
}

/* ═════════════════════════════════════════════════════════════════════
   FIX RESPONSIVE — anti-débordement horizontal + tables scrollables
   Ajouté pour corriger les overflow sur mobile (Notre approche du
   conseil, tableaux formules, etc.)
   ═════════════════════════════════════════════════════════════════════ */

/* Empêche le scroll horizontal global du site */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Toutes les images, iframes, vidéos ne dépassent jamais leur container */
img, iframe, video, embed, object, svg {
  max-width: 100%;
  height: auto;
}

/* Tables : scrollables sur mobile plutôt que de casser la mise en page */
table {
  max-width: 100%;
  border-collapse: collapse;
}

@media (max-width: 720px) {
  /* Wrapper scrollable pour toutes les tables sur mobile */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  /* Sauf pour les tables où le contenu doit rester lisible en colonne */
  table.no-scroll {
    display: table;
    white-space: normal;
  }
}

/* Grids qui doivent s'adapter en mobile */
@media (max-width: 720px) {
  .approche-claims,
  .expertises-grid,
  .marques-grid-8,
  .ponts-grid,
  .dualite-grid,
  .metiers-grid,
  .related-grid,
  .quick-links {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

/* Container qui ne déborde jamais */
.container, .container-narrow {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Pre et code blocks scrollables */
pre, code {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Long strings sans espaces (URLs, mots) ne cassent pas le layout */
p, li, td, th, div, span {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
