/* ============================================================
   Fin de page — disclaimer fiscal + bloc CTA (The decision / Next step)
   Objectif : rendre visibles et cliquables les blocs de fin d'article.
   Classes ciblées : .disclaimer-fiscal, .cta-bloc, .cta-carte, .cta-titre, .bouton
   ============================================================ */

/* --- Disclaimer fiscal : lisible, encadré, discret mais présent --- */
.disclaimer-fiscal {
  background: #f4f8fb;
  border-left: 4px solid #2374ab;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 38px 0 20px;
  font-size: 14px;
  line-height: 1.65;
  color: #425466;
}
.disclaimer-fiscal p { margin: 0; }
.disclaimer-fiscal strong { color: #161925; }

/* --- Bloc CTA : deux cartes côte à côte, une sombre (offre), une claire (contact) --- */
.cta-bloc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0 42px;
}
@media (max-width: 760px) {
  .cta-bloc { grid-template-columns: 1fr; }
}

.cta-carte {
  border-radius: 14px;
  padding: 26px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Carte 1 — l'offre (fond sombre dégradé, forte présence) */
.cta-carte[data-rankai-cta="c1"] {
  background: linear-gradient(135deg, #161925 0%, #2374ab 100%);
  box-shadow: 0 12px 34px rgba(22, 25, 37, 0.20);
}
.cta-carte[data-rankai-cta="c1"] .cta-titre { color: #b8cde0; }

/* Carte 2 — le contact (fond clair, bordé) */
.cta-carte[data-rankai-cta="c2"] {
  background: #ffffff;
  border: 1px solid #dce6ef;
  box-shadow: 0 8px 26px rgba(16, 48, 80, 0.08);
}
.cta-carte[data-rankai-cta="c2"] .cta-titre { color: #2374ab; }

.cta-titre {
  font-size: 12.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0;
}

/* Bouton — vrai bouton, gros, contraste, affordance au survol */
.cta-carte .bouton {
  display: inline-block;
  align-self: flex-start;
  padding: 14px 28px;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.cta-carte[data-rankai-cta="c1"] .bouton {
  background: #ffffff;
  color: #161925;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}
.cta-carte[data-rankai-cta="c1"] .bouton:hover {
  background: #eaf1f7;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.20);
}
.cta-carte[data-rankai-cta="c2"] .bouton {
  background: #2374ab;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(35, 116, 171, 0.28);
}
.cta-carte[data-rankai-cta="c2"] .bouton:hover {
  background: #1c5e8a;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(35, 116, 171, 0.36);
}

/* ============================================================
   Tableaux : confinement horizontal du défilement AU tableau
   Desktop : inchangé (tableau 100%, stylé par le thème).
   Mobile : le tableau défile dans sa boîte, le texte reste fixe.
   Le wrapper .table-wrap est injecté au rendu (layouts) autour de <table>.
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  margin: 20px 0;
  background-color: #fff;
  /* Ombres latérales = indice visuel « il y a du contenu à défiler » (uniquement si débordement) */
  background-image:
    linear-gradient(to right, #fff 30%, rgba(255,255,255,0)),
    linear-gradient(to right, rgba(255,255,255,0), #fff 70%),
    radial-gradient(farthest-side at 0% 50%, rgba(22,25,37,.18), rgba(22,25,37,0)),
    radial-gradient(farthest-side at 100% 50%, rgba(22,25,37,.18), rgba(22,25,37,0));
  background-position: 0 0, 100% 0, 0 0, 100% 0;
  background-repeat: no-repeat;
  background-size: 42px 100%, 42px 100%, 15px 100%, 15px 100%;
  background-attachment: local, local, scroll, scroll;
}
.table-wrap > table {
  margin: 0;
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: #c3d0db; border-radius: 4px; }
.table-wrap::-webkit-scrollbar-track { background: #eef2f6; border-radius: 4px; }

/* Style de tableau global (couvre les pages SANS le CSS scopé .cj-test-bg).
   Sur les pages .cj-test-bg, les règles existantes (même valeurs) l'emportent : aucun changement. */
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.table-wrap table th,
.table-wrap table td {
  border: 1px solid #d5dde3;
  padding: 0.65rem 0.8rem;
  vertical-align: top;
  text-align: left;
}
.table-wrap table thead th { background: #e6f0f0; color: #161925; font-weight: 600; }
.table-wrap table tbody tr:nth-child(even) td { background: #f7fafa; }
@media (max-width: 700px) {
  .table-wrap table { font-size: 0.85rem; min-width: 0; width: 100%; }
  .table-wrap table th,
  .table-wrap table td { padding: 0.5rem 0.4rem; min-width: 82px; overflow-wrap: break-word; }
}

/* Colonne 1 FIGÉE pendant le défilement horizontal.
   Ne s'active visuellement que sur les tableaux plus larges que l'écran (≥ 5 colonnes en mobile) ;
   sur un tableau qui tient, sticky est sans effet (aucun décalage à coller).
   Fond opaque obligatoire (sinon le contenu défilé transparaît dessous). */
.table-wrap th:first-child,
.table-wrap td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background-color: #ffffff;
  box-shadow: 2px 0 0 0 #d5dde3;
}
.table-wrap thead th:first-child {
  background-color: #e6f0f0;
  z-index: 3;
}
.table-wrap tbody tr:nth-child(even) td:first-child {
  background-color: #f7fafa;
}

/* ============================================================
   Tableaux « RankAI » reconstruits (design d'origine WP : en-tête
   bleu nuit, Georgia, lignes alternées). Sélecteurs renforcés pour
   primer sur le style générique .table-wrap ci-dessus.
   ============================================================ */
.table-wrap table.rankai-table {
  border-collapse: collapse;
  font-family: Georgia, "Times New Roman", serif;
  width: 100%;
  margin: 0;
}
.table-wrap table.rankai-table thead th {
  background: #103050;
  color: #FBF9F4;
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 13px 16px;
  text-align: left;
  border: none;
  line-height: 1.4;
  vertical-align: bottom;
}
.table-wrap table.rankai-table thead th:first-child {
  background: #103050;
  color: #FBF9F4;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.12);
}
.table-wrap table.rankai-table tbody td {
  padding: 13px 16px;
  border: none;
  border-bottom: 1px solid #E4E9EF;
  color: #2B3A45;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  vertical-align: top;
  background: #FBF9F4;
}
.table-wrap table.rankai-table tbody td:first-child {
  color: #103050;
  font-weight: 700;
  background: #FBF9F4;
  box-shadow: inset -1px 0 0 #E4E9EF;
}
.table-wrap table.rankai-table tbody tr:nth-child(even) td { background: #FFFFFF; }
.table-wrap table.rankai-table tbody tr:nth-child(even) td:first-child { background: #FFFFFF; }
.table-wrap table.rankai-table tbody tr:last-child td { border-bottom: none; }
@media (max-width: 700px) {
  .table-wrap table.rankai-table thead th { padding: 10px 12px; font-size: 11px; }
  .table-wrap table.rankai-table tbody td { padding: 10px 12px; font-size: 14px; }
}
