/* Thème commun à toutes les pages : bleu nuit, violet Kortexs, grands arrondis.
   Chargé après style.css. Ne change que l'apparence, jamais la structure. */

:root {
  --color-primary: #5b5fc7;
  --color-primary-dark: #3b3f9e;
  --color-ink: #14153a;
  --color-muted: #4a4c66;
  --color-bg-alt: #f3f4ff;
  --color-border: #dcdff3;
  --radius: 24px;
  --th-ice: #eceeff;
  --th-card: #f6f6fb;
  --th-deep: #14153a;
  --th-shadow: 0 20px 50px rgba(20, 21, 58, 0.12);
}

/* ---------- Typographie ---------- */
h1, h2, h3 {
  letter-spacing: -0.03em;
}

.article-content h1,
.legal-content h1 {
  font-size: clamp(2.2rem, 4.8vw, 3.8rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
  color: var(--color-ink);
  text-wrap: balance;
}

.article-content h2,
.legal-content h2 {
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--color-ink);
}

.article-lead {
  color: var(--color-muted);
}

.eyebrow {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}

.article-cat,
.blog-card-cat,
.related-cat {
  border-radius: 999px;
  background: var(--th-ice);
  color: var(--color-primary-dark);
}

.breadcrumb a,
.breadcrumb-sep {
  color: var(--color-muted);
}

.breadcrumb [aria-current="page"] {
  color: var(--color-ink);
  font-weight: 600;
}

/* ---------- En-tête ---------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}

.site-nav a {
  font-weight: 500;
  color: var(--color-ink);
}

.site-nav a:hover {
  color: var(--color-primary);
}

.nav-cta {
  border-radius: 14px;
  background: var(--color-primary);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(91, 95, 199, 0.3);
}

.nav-cta:hover {
  background: var(--color-primary-dark);
}

/* ---------- Boutons ---------- */
.btn,
.btn-guide {
  border-radius: 16px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn-guide:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 28px rgba(91, 95, 199, 0.35);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-secondary {
  border-color: transparent;
  background: var(--th-ice);
  color: var(--color-primary-dark);
}

.btn-secondary:hover {
  background: #dfe2ff;
  color: var(--color-primary-dark);
}

/* ---------- Cartes ---------- */
.blog-card,
.tool-card,
.related-card,
.faq-item,
.pp-pillar,
.cert-card,
.benefit-card {
  border-radius: 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.blog-card,
.tool-card,
.related-card,
.faq-item {
  border: 1px solid transparent;
  background: var(--th-card);
}

.blog-card:hover,
.tool-card:hover,
.related-card:hover,
.faq-item:hover {
  transform: translateY(-5px);
  border-color: var(--color-border);
  box-shadow: var(--th-shadow);
}

.blog-card h3,
.tool-card h3,
.related-title {
  letter-spacing: -0.025em;
  color: var(--color-ink);
}

.blog-card-link,
.tool-card-link {
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* ---------- Tableaux ---------- */
.cmp-table-wrap {
  border-radius: 24px;
}

.cmp-table thead th {
  background: var(--th-deep);
  color: #fff;
}

/* ---------- Appel à l'action d'article ---------- */
.article-cta {
  border: 0;
  border-radius: 32px;
  background: linear-gradient(160deg, #2b2f7e 0%, var(--th-deep) 85%);
  color: #fff;
}

.article-cta p {
  color: #fff;
}

.article-cta .btn-primary {
  background: #fff;
  color: var(--color-ink);
  box-shadow: none;
}

.article-cta .btn-primary:hover {
  background: var(--th-ice);
}

/* ---------- Formulaires ---------- */
.contact-form {
  border: 0;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(20, 21, 58, 0.14), 0 0 0 1px rgba(20, 21, 58, 0.06);
}

.form-row label {
  color: var(--color-ink);
}

.form-row input,
.form-row textarea,
.form-row select {
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--th-ice);
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  border-color: var(--color-primary);
  background: #fff;
}

/* ---------- Pied de page ---------- */
.site-footer {
  margin-top: clamp(40px, 6vw, 80px);
  padding-top: 72px;
  border-top: 0;
  border-radius: 44px 44px 0 0;
  background: var(--th-deep);
  color: #c4c7e8;
}

.footer-logo {
  opacity: 1;
  filter: brightness(0) invert(1);
}

.footer-tagline,
.footer-address,
.footer-bottom p,
.footer-zones,
.footer-zones a,
.footer-nav a,
.footer-legal-link {
  color: #c4c7e8;
}

.footer-zones strong,
.footer-col h3 {
  color: #fff;
}

.footer-nav a:hover,
.footer-zones a:hover,
.footer-legal-link:hover {
  color: #fff;
}

.footer-social-link {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.footer-social-link:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* ---------- Corrections ---------- */
.article-content .article-cta a.btn-primary {
  background: #fff;
  color: var(--color-ink);
}

.article-content .article-cta a.btn-primary:hover {
  background: var(--th-ice);
  color: var(--color-ink);
}

.related-cat {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 12px;
}

.footer-logo {
  box-sizing: content-box;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff;
  filter: none;
  opacity: 1;
}

/* ---------- Pied de page clair ---------- */
.site-footer {
  background: var(--th-ice);
  color: var(--color-muted);
}

.footer-logo {
  padding: 0;
  border-radius: 0;
  background: none;
  filter: none;
}

.footer-tagline,
.footer-address,
.footer-bottom p,
.footer-zones,
.footer-zones a,
.footer-nav a,
.footer-legal-link {
  color: var(--color-muted);
}

.footer-zones strong,
.footer-col h3 {
  color: var(--color-ink);
}

.footer-nav a:hover,
.footer-zones a:hover,
.footer-legal-link:hover {
  color: var(--color-primary);
}

.footer-social-link {
  border-color: transparent;
  background: #fff;
  color: var(--color-primary-dark);
}

.footer-social-link:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #d3d7f2;
}

/* ---------- Pied de page créatif ---------- */
.site-footer {
  position: relative;
  overflow-x: clip;
  margin-top: clamp(96px, 11vw, 140px);
  padding-top: 0;
  background:
    radial-gradient(50% 60% at 100% 0%, rgba(91, 95, 199, 0.18), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(91, 95, 199, 0.10), transparent 70%),
    var(--th-ice);
}

.ft-cta-wrap {
  position: relative;
  z-index: 1;
  margin-top: -64px;
  margin-bottom: 8px;
}

.ft-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: clamp(28px, 4vw, 52px) clamp(24px, 4vw, 56px);
  border-radius: 32px;
  background: linear-gradient(135deg, #5b5fc7 0%, #3b3f9e 100%);
  box-shadow: 0 30px 70px rgba(59, 63, 158, 0.35);
  color: #fff;
  transform: rotate(-1.2deg);
}

.ft-cta-kicker {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d9dcff;
}

.ft-cta-title {
  margin: 0;
  max-width: 14em;
  font-size: clamp(1.8rem, 4.2vw, 3.2rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: #fff;
}

.ft-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 16px;
  background: #fff;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-ink);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ft-cta-btn:hover {
  transform: translateY(-2px) rotate(1.2deg);
  background: var(--th-ice);
}

.footer-grid {
  padding-top: 56px;
}

.site-footer::after {
  content: "KORTEXS AI";
  display: block;
  height: 0.6em;
  margin-top: 12px;
  overflow: hidden;
  font-size: clamp(4.2rem, 16.5vw, 15rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  text-align: center;
  white-space: nowrap;
  color: rgba(91, 95, 199, 0.09);
  pointer-events: none;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .ft-cta,
  .ft-cta-btn:hover {
    transform: none;
  }
}

/* =====================================================================
   Même modèle que l'accueil, sur toutes les pages
   ===================================================================== */

/* ---------- Bandeau de tête de page ---------- */
main > .section:first-child,
main > .article-page:first-child {
  background:
    radial-gradient(55% 420px at 100% 0%, rgba(91, 95, 199, 0.15), transparent 70%),
    #fff;
  background-repeat: no-repeat;
}

main > .section:first-child .eyebrow + h2,
main > .section:first-child .eyebrow + h1,
main > .section:first-child .container > h1:first-of-type {
  max-width: 17em;
  font-size: clamp(2.3rem, 5.2vw, 4.4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: var(--color-ink);
  text-wrap: balance;
}

main > .section:first-child .section-lead {
  max-width: 38em;
  font-size: clamp(1.08rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--color-muted);
}

/* ---------- Titres de sections ---------- */
.section h2 {
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--color-ink);
}

.article-content h2 {
  margin-top: 2.2em;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.1;
}

/* ---------- Tuiles de couleurs variées ---------- */
.tools-grid .tool-card:nth-child(4n+2),
.blog-grid .blog-card:nth-child(4n+2),
.faq-list .faq-item:nth-child(4n+2),
.related-grid .related-card:nth-child(3n+2) {
  background: var(--th-ice);
}

.tools-grid .tool-card:nth-child(4n+3),
.blog-grid .blog-card:nth-child(4n+3),
.faq-list .faq-item:nth-child(4n+3),
.related-grid .related-card:nth-child(3n+3) {
  background: #e7f6ef;
}

.tools-grid .tool-card:nth-child(4n+4),
.blog-grid .blog-card:nth-child(4n+4),
.faq-list .faq-item:nth-child(4n+4) {
  background: #f1ecff;
}

.blog-card,
.tool-card {
  min-height: 260px;
}

.blog-card-meta,
.blog-card-link {
  margin-top: auto;
}

/* ---------- Blocs d'information ---------- */
.guide-callout,
.pp-foundation,
.calc-note,
.cmp-table-wrap {
  border-radius: 24px;
}

.guide-callout {
  border: 0;
  background: var(--th-ice);
}

.calc-result {
  border-radius: 32px;
  background: linear-gradient(160deg, #2b2f7e 0%, var(--th-deep) 85%);
}

/* ---------- Listes à puces des articles ---------- */
.article-content li::marker {
  color: var(--color-primary);
}

.article-content a:not(.btn):not(.btn-primary):not(.related-card) {
  color: var(--color-primary-dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ---------- Pages d'erreur et légales ---------- */
.notfound,
.legal-page {
  text-align: left;
}

/* ---------- Piliers et cartes d'icônes ---------- */
.pp-pillar,
.cert-card,
.benefit-card {
  border: 1px solid transparent;
  background: var(--th-card);
}

.pp-pillar:hover,
.cert-card:hover,
.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--th-shadow);
}

.pp-pillars .pp-pillar:nth-child(4n+2),
.certifications-grid .cert-card:nth-child(4n+2),
.benefits-grid .benefit-card:nth-child(4n+2) { background: var(--th-ice); }

.pp-pillars .pp-pillar:nth-child(4n+3),
.certifications-grid .cert-card:nth-child(4n+3),
.benefits-grid .benefit-card:nth-child(4n+3) { background: #e7f6ef; }

.pp-pillars .pp-pillar:nth-child(4n+4),
.certifications-grid .cert-card:nth-child(4n+4),
.benefits-grid .benefit-card:nth-child(4n+4) { background: #f1ecff; }

.pp-pillar-icon,
.tool-card-icon,
.benefit-icon {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
}

/* ---------- Alignement à gauche, comme l'accueil ---------- */
.pp-pillar {
  padding: 26px 24px 28px;
  text-align: left;
}

.pp-pillar-icon {
  margin: 0 0 22px;
  border-radius: 16px;
}

.pp-pillar h3 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.article-content .pp-pillar p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.notfound,
.notfound .container {
  text-align: left;
}

.notfound p {
  margin-left: 0;
  margin-right: 0;
  max-width: 36em;
  text-align: left;
}

.legal-updated {
  margin: 14px 0 28px;
}

/* ---------- Glossaire ---------- */
.glossary-item {
  padding: 26px 28px;
  border: 1px solid transparent;
  border-left: 0;
  border-radius: 28px;
  background: var(--th-card);
}

.glossary-list .glossary-item:nth-child(4n+2) { background: var(--th-ice); }
.glossary-list .glossary-item:nth-child(4n+3) { background: #e7f6ef; }
.glossary-list .glossary-item:nth-child(4n+4) { background: #f1ecff; }

.glossary-item h3 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

/* ---------- Adoucissement : moins foncé, moins « bold » ---------- */
.article-cta {
  border: 1px solid #d3d7f2;
  border-radius: 28px;
  background: var(--th-ice);
  color: var(--color-ink);
}

.article-cta p {
  color: var(--color-ink);
}

.article-content .article-cta a.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(91, 95, 199, 0.25);
}

.article-content .article-cta a.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.ft-cta {
  border: 1px solid #d3d7f2;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 21, 58, 0.07);
  color: var(--color-ink);
  transform: none;
}

.ft-cta-kicker {
  color: var(--color-primary);
}

.ft-cta-title {
  max-width: 20em;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  color: var(--color-ink);
}

.ft-cta-btn {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(91, 95, 199, 0.25);
}

.ft-cta-btn:hover {
  transform: translateY(-2px);
  background: var(--color-primary-dark);
}

.calc-result {
  background: linear-gradient(160deg, #6f73d8 0%, var(--color-primary) 100%);
}

.cmp-table thead th {
  background: var(--th-ice);
  color: var(--color-ink);
}

/* ---------- Carte du pied de page : de l'air au-dessus ---------- */
.site-footer {
  margin-top: clamp(48px, 6vw, 80px);
}

.ft-cta-wrap {
  margin-top: clamp(40px, 5vw, 64px);
}

.site-footer {
  padding-top: clamp(40px, 5vw, 64px);
}

.ft-cta-wrap {
  margin-top: 0;
}

/* ---------- Cartes des pages Réalisations, Formation, Commandites ---------- */
.sponsor-benefit {
  padding: 28px 26px 30px;
  border: 1px solid transparent;
  border-radius: 28px;
  background: var(--th-card);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sponsor-benefit:hover {
  transform: translateY(-5px);
  box-shadow: var(--th-shadow);
}

.sponsor-benefits .sponsor-benefit:nth-child(4n+2) { background: var(--th-ice); }
.sponsor-benefits .sponsor-benefit:nth-child(4n+3) { background: #e7f6ef; }
.sponsor-benefits .sponsor-benefit:nth-child(4n+4) { background: #f1ecff; }

.sponsor-benefit-icon {
  width: 52px;
  height: 52px;
  margin: 0 0 22px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
}

.sponsor-benefit h3 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.sponsor-form-wrap {
  border: 0;
  border-radius: 32px;
  background: var(--th-ice);
}

/* ---------- Page contact ---------- */
.contact-page {
  display: grid;
  gap: 28px;
  align-items: start;
  margin-top: 36px;
}

.contact-side {
  display: grid;
  gap: 16px;
}

.contact-card {
  padding: clamp(22px, 3vw, 34px);
  border-radius: 28px;
  background: var(--th-ice);
}

.contact-card:nth-child(2) {
  background: var(--th-card);
}

.contact-card h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.contact-card p,
.contact-card address {
  margin: 0 0 16px;
  font-style: normal;
  line-height: 1.55;
  color: var(--color-muted);
}

.contact-card p:last-child,
.contact-card address:last-child {
  margin-bottom: 0;
}

.contact-page .contact-form {
  margin: 0;
  max-width: none;
}

@media (min-width: 900px) {
  .contact-page { grid-template-columns: 0.8fr 1.2fr; gap: 40px; }
}

/* ---------- Pied de page : fond neutre, un seul accent mauve ---------- */
.site-footer {
  background:
    radial-gradient(50% 60% at 100% 0%, rgba(91, 95, 199, 0.07), transparent 70%),
    #f6f6fb;
}

.footer-bottom {
  border-top-color: #e3e5f3;
}

.footer-social-link {
  background: #fff;
}

.site-footer::after {
  color: rgba(91, 95, 199, 0.07);
}
