/*
Theme Name:        Apex Canada Conseil
Theme URI:         https://apexcanadaconseil.ca
Author:            Apex Canada Conseil
Author URI:        https://apexcanadaconseil.ca
Description:       Thème officiel Apex Canada Conseil — Cabinet de conseil en immigration canadienne. Sérieux, structuré, orienté résultats.
Version:           1.3.0
Requires at least: 6.0
Tested up to:      6.7
Requires PHP:      8.0
License:           Proprietary
Text Domain:       apex-canada-conseil
Tags:              custom-background, custom-logo, custom-menu, featured-images, full-width-template
*/

/* ── RESET & BASE ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:  #0B1020;
  --black: #0B0E17;
  --white: #F5F1E8;
  --gray:  #7A7F87;
  --blue:  #243B53;
  --lgray: #E8E5DC;
  --gray-soft: #9A9FA7; /* grey text on dark backgrounds (7:1) */
  --gray-ink:  #62676F; /* grey text on light backgrounds (5:1) */
}

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ── NAV ─────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(11,16,32,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(36,59,83,0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 64px;
  height: 60px;
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: 0 4px 32px rgba(0,0,0,0.4); }

.site-branding { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.site-branding .apex-wordmark {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.2em;
  color: var(--white);
  line-height: 1;
}
.site-branding .apex-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gray);
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}
.main-navigation ul li a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
  transition: color 0.2s;
}
.main-navigation ul li a:hover { color: var(--white); }

.header-cta {
  padding: 9px 22px;
  background: var(--white);
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 1px;
  transition: opacity 0.2s;
}
.header-cta:hover { opacity: 0.88; color: var(--navy); }

/* Hamburger mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--white);
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  transition: all 0.25s;
}

/* ── HERO ─────────────────────────────────────────────── */
.hero-section {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 100px 64px 80px;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-grid-bg svg { width: 100%; height: 100%; position: absolute; inset: 0; }

.hero-content { position: relative; z-index: 2; max-width: 760px; }

.hero-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.hero-eyebrow-line { width: 32px; height: 1px; background: var(--blue); }
.hero-eyebrow span { font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gray); }

.hero-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(52px, 8vw, 96px);
  letter-spacing: 0.14em;
  color: var(--white);
  line-height: 0.92;
  margin-bottom: 8px;
}
.hero-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: clamp(13px, 1.6vw, 18px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 36px;
}
.hero-rule {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--blue) 0%, transparent 70%);
  margin-bottom: 36px;
}
.hero-body {
  font-size: 16px;
  color: rgba(245,241,232,0.7);
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 48px;
}
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 36px; right: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.hero-scroll span {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.hero-scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--blue), transparent);
  animation: scrollline 2s ease-in-out infinite;
}
@keyframes scrollline {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ── BUTTONS ─────────────────────────────────────────── */
.btn-primary {
  padding: 14px 32px;
  background: var(--white);
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 1px;
  display: inline-block;
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.88; color: var(--navy); }

.btn-ghost {
  padding: 14px 32px;
  background: transparent;
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(245,241,232,0.25);
  border-radius: 1px;
  display: inline-block;
  transition: border-color 0.2s;
}
.btn-ghost:hover { border-color: var(--white); color: var(--white); }

.btn-dark {
  padding: 14px 32px;
  background: var(--navy);
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 1px;
  display: inline-block;
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
}
.btn-dark:hover { opacity: 0.88; color: var(--white); }

/* ── STATS ───────────────────────────────────────────── */
.stats-section {
  background: var(--black);
  padding: 0 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid rgba(36,59,83,0.3);
}
.stat-item {
  padding: 40px 40px;
  border-right: 1px solid rgba(36,59,83,0.25);
}
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-num em { font-style: normal; font-size: 24px; color: var(--blue); }
.stat-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray); }

/* ── SECTIONS SHARED ─────────────────────────────────── */
.section-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.section-eyebrow-line { width: 24px; height: 1px; background: var(--blue); }
.section-eyebrow span { font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gray); }

.section-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0.04em;
  color: var(--navy);
  line-height: 1.15;
}
.section-title.light { color: var(--white); }

.section-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 64px;
}
.section-body { font-size: 15px; color: var(--gray); line-height: 1.75; align-self: end; }

/* ── SERVICES ────────────────────────────────────────── */
.services-section { padding: 100px 64px; background: var(--white); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: rgba(10,14,23,0.08);
}
.service-card {
  background: var(--white);
  padding: 44px 36px;
  transition: background 0.25s;
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--blue);
  transition: width 0.35s;
}
.service-card:hover { background: var(--navy); }
.service-card:hover::after { width: 100%; }
.service-card:hover .sc-title { color: var(--white); }
.service-card:hover .sc-body { color: rgba(245,241,232,0.6); }
.service-card:hover .sc-icon { color: var(--white); opacity: 0.3; }
.service-card:hover .sc-tag { background: rgba(36,59,83,0.5); color: var(--gray); }

.sc-icon { color: var(--blue); opacity: 0.6; margin-bottom: 24px; transition: color 0.25s, opacity 0.25s; }
.sc-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px; font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.2;
  transition: color 0.25s;
}
.sc-body { font-size: 13px; color: var(--gray); line-height: 1.7; margin-bottom: 24px; transition: color 0.25s; }
.sc-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(10,14,23,0.06);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gray);
  border-radius: 1px;
  transition: background 0.25s, color 0.25s;
}

/* ── PROCESS ─────────────────────────────────────────── */
.process-section {
  background: var(--navy);
  padding: 100px 64px;
  position: relative;
  overflow: hidden;
}
.process-bg {
  position: absolute;
  right: -60px; top: 50%;
  transform: translateY(-50%);
  opacity: 0.04;
  pointer-events: none;
}
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 64px;
  position: relative;
}
.process-steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(12.5% + 16px);
  right: calc(12.5% + 16px);
  height: 1px;
  background: linear-gradient(90deg, var(--blue) 0%, rgba(36,59,83,0.3) 100%);
}
.step { padding: 0 24px; position: relative; }
.step:first-child { padding-left: 0; }
.step:last-child { padding-right: 0; }
.step-dot {
  width: 56px; height: 56px;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px;
  position: relative; z-index: 1;
  border-radius: 1px;
  color: var(--white);
}
.step-label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gray); margin-bottom: 10px; }
.step-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.04em; color: var(--white);
  margin-bottom: 12px; line-height: 1.2;
}
.step-body { font-size: 13px; color: var(--gray-soft); line-height: 1.65; }

/* ── TESTIMONIAL ─────────────────────────────────────── */
.testimonial-section {
  background: var(--white);
  padding: 100px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.testimonial-visual {
  background: var(--lgray);
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tv-inner { text-align: center; }
.tv-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 80px; font-weight: 800;
  letter-spacing: 0.06em; color: var(--navy);
  line-height: 1; opacity: 0.12;
}
.tv-label { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--navy); opacity: 0.8; }
.testimonial-accent { position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: var(--blue); }

.quote-mark {
  font-family: 'Montserrat', sans-serif;
  font-size: 72px; font-weight: 800;
  color: var(--blue); line-height: 0.7;
  margin-bottom: 20px; opacity: 0.4;
}
.quote-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px; font-weight: 600;
  letter-spacing: 0.02em; color: var(--navy);
  line-height: 1.45; margin-bottom: 28px;
}
.quote-rule { width: 40px; height: 1px; background: var(--blue); margin-bottom: 20px; }
.quote-author { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy); }
.quote-role { font-size: 11px; color: var(--gray); margin-top: 4px; letter-spacing: 0.06em; }

/* ── NUMBERS ─────────────────────────────────────────── */
.numbers-section {
  background: var(--blue);
  padding: 80px 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.number-item { padding: 40px; background: rgba(11,16,32,0.2); text-align: center; }
.number-item:nth-child(2) { background: rgba(11,16,32,0.35); }
.ni-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 52px; font-weight: 800;
  color: var(--white); letter-spacing: 0.06em;
  line-height: 1; margin-bottom: 8px;
}
.ni-num em { font-style: normal; font-size: 28px; color: rgba(245,241,232,0.7); }
.ni-label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(245,241,232,0.8); }

/* ── CTA ─────────────────────────────────────────────── */
.cta-section {
  background: var(--black);
  padding: 120px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(36,59,83,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36,59,83,0.12) 1px, transparent 1px);
  background-size: 48px 48px;
}
.cta-inner { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
.cta-eyebrow { font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gray); margin-bottom: 24px; }
.cta-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800; letter-spacing: 0.08em;
  color: var(--white); line-height: 1.1; margin-bottom: 16px;
}
.cta-body { font-size: 15px; color: rgba(245,241,232,0.55); line-height: 1.7; margin-bottom: 40px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── CONTACT FORM ────────────────────────────────────── */
.contact-form-wrap { max-width: 560px; margin: 0 auto; }
.wpcf7-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.wpcf7-form .form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.wpcf7-form label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray); }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
  padding: 12px 16px;
  background: rgba(245,241,232,0.06);
  border: 1px solid rgba(245,241,232,0.15);
  border-radius: 1px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--white);
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus { border-color: var(--blue); }
.wpcf7-form textarea { min-height: 120px; resize: vertical; }
.wpcf7-form select option { background: var(--navy); }
.wpcf7-form input[type="submit"] {
  width: 100%;
  padding: 14px 32px;
  background: var(--white);
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  border: none; border-radius: 1px; cursor: pointer;
  transition: opacity 0.2s; margin-top: 8px;
}
.wpcf7-form input[type="submit"]:hover { opacity: 0.88; }

/* ── FOOTER ──────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  padding: 64px 64px 40px;
  border-top: 1px solid rgba(36,59,83,0.4);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(36,59,83,0.25);
  margin-bottom: 32px;
}
.footer-brand-apex { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 22px; letter-spacing: 0.2em; color: var(--white); margin-bottom: 4px; }
.footer-brand-sub { font-family: 'Montserrat', sans-serif; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gray); margin-bottom: 16px; }
.footer-brand-desc { font-size: 13px; color: var(--gray-soft); line-height: 1.65; }

.footer-col h4, .footer-col .footer-heading { font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--white); margin-bottom: 18px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a, .footer-col ul li span { font-size: 13px; color: var(--gray-soft); text-decoration: none; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--white); }

.footer-bottom { display: flex; justify-content: space-between; align-items: center; }
.footer-copy { font-size: 11px; letter-spacing: 0.06em; line-height: 1.7; color: var(--gray-soft); }
.footer-legal { display: flex; gap: 12px 24px; flex-wrap: wrap; }
.footer-legal a { font-size: 11px; letter-spacing: 0.08em; color: var(--gray); text-decoration: none; transition: color 0.2s; }
.footer-legal a:hover { color: var(--white); }

/* ── SCROLL REVEAL ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── WORDPRESS ADMIN BAR OFFSET ──────────────────────── */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 960px) {
  .site-header { padding: 0 24px; }
  .main-navigation { display: none; }
  .main-navigation.open { display: block; position: absolute; top: 60px; left: 0; right: 0; background: var(--navy); padding: 24px; border-top: 1px solid rgba(36,59,83,0.3); }
  .main-navigation.open ul { flex-direction: column; gap: 20px; }
  .menu-toggle { display: flex; }
  .hero-section { padding: 100px 24px 80px; }
  .hero-scroll { right: 24px; }
  .stats-section { grid-template-columns: 1fr 1fr; padding: 0 24px; }
  .stat-item { padding: 28px 16px; }
  .stat-item:nth-child(2) { border-right: none; }
  .services-section, .process-section, .cta-section { padding: 72px 24px; }
  .testimonial-section, .site-footer { padding: 72px 24px 40px; }
  .numbers-section { padding: 60px 24px; }
  .section-header { grid-template-columns: 1fr; gap: 24px; }
  .services-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .process-steps::before { display: none; }
  .step { padding: 0 0 32px 0; }
  .testimonial-section { grid-template-columns: 1fr; }
  .numbers-section { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .wpcf7-form .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 48px; }
  .stats-section { grid-template-columns: 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(36,59,83,0.2); }
  .process-steps { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .cta-actions { flex-direction: column; align-items: center; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}


/* ══════════════════════════════════════════════════════
   ADDED: inner pages, service links, opt-in
   ══════════════════════════════════════════════════════ */

/* Linked service cards on the homepage */
a.service-card { display: block; color: inherit; text-decoration: none; }
a.service-card:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

/* ── Content typography (pages + posts) ── */
.post-content { font-size: 15px; line-height: 1.8; color: var(--black); }
.post-content h2 { font-family: 'Montserrat', sans-serif; font-size: 22px; font-weight: 700; letter-spacing: 0.02em; color: var(--navy); margin: 44px 0 16px; line-height: 1.25; }
.post-content h2:first-child { margin-top: 0; }
.post-content h3 { font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 600; color: var(--navy); margin: 32px 0 12px; }
.post-content p { margin-bottom: 20px; }
.post-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.post-content ul, .post-content ol { padding-left: 20px; margin-bottom: 20px; }
.post-content li { margin-bottom: 8px; }
.post-content strong { font-weight: 600; color: var(--navy); }
.post-content blockquote { border-left: 2px solid var(--blue); padding: 16px 20px; background: rgba(36,59,83,0.05); margin: 28px 0; font-style: italic; color: var(--navy); }
.post-content img { max-width: 100%; height: auto; }

/* ── Inner page layout ── */
.apex-page { padding-top: 60px; background: var(--white); }
.apex-page-header { background: var(--navy); padding: 80px 64px 64px; position: relative; overflow: hidden; }
.apex-page-header::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(36,59,83,0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(36,59,83,0.12) 1px, transparent 1px);
  background-size: 48px 48px;
}
.apex-page-header-inner { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; }
.apex-page-parent { display: inline-block; font-size: 11px; letter-spacing: 0.12em; color: var(--gray); text-decoration: none; margin-bottom: 16px; }
.apex-page-parent:hover { color: var(--white); }
.apex-page-title { font-family: 'Montserrat', sans-serif; font-size: clamp(28px, 4.5vw, 48px); font-weight: 800; letter-spacing: 0.03em; color: var(--white); line-height: 1.15; max-width: 760px; }
.apex-page-meta { margin-top: 16px; font-size: 12px; color: var(--gray); }

.apex-page-body { max-width: 1080px; margin: 0 auto; padding: 72px 64px; }
.apex-page-body.has-aside { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 64px; align-items: start; }
.apex-page-article { max-width: 720px; }
.apex-page-thumb { margin-bottom: 40px; border-bottom: 2px solid var(--blue); }
.apex-page-thumb img { width: 100%; height: auto; display: block; }

.apex-page-aside { position: sticky; top: 96px; border-left: 1px solid rgba(10,14,23,0.12); padding-left: 24px; }
.apex-aside-title { font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--navy); margin-bottom: 16px; }
.apex-page-aside ul { list-style: none; }
.apex-page-aside li { margin-bottom: 10px; }
.apex-page-aside a { font-size: 14px; color: var(--gray); text-decoration: none; }
.apex-page-aside a:hover, .apex-page-aside a[aria-current="page"] { color: var(--navy); font-weight: 600; }

.apex-page-cta { background: var(--black); color: var(--white); text-align: center; padding: 88px 24px; }
.apex-page-cta h2 { font-family: 'Montserrat', sans-serif; font-size: clamp(24px, 3.5vw, 36px); font-weight: 800; margin-bottom: 12px; }
.apex-page-cta p { font-size: 15px; color: rgba(245,241,232,0.65); margin: 0 auto 32px; max-width: 480px; line-height: 1.7; }

/* [apex_child_pages] cards */
.apex-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px; background: rgba(10,14,23,0.08); margin: 40px 0; }
.post-content a.apex-card { display: flex; flex-direction: column; gap: 12px; background: var(--white); padding: 32px 28px; text-decoration: none; color: inherit; transition: background 0.25s; }
.post-content a.apex-card:hover, .post-content a.apex-card:focus-visible { background: var(--navy); }
.apex-card-title { font-family: 'Montserrat', sans-serif; font-size: 17px; font-weight: 700; color: var(--navy); transition: color 0.25s; }
.apex-card-body { font-size: 13px; line-height: 1.65; color: var(--gray); flex: 1; }
.apex-card-link { font-size: 12px; font-weight: 600; color: var(--blue); transition: color 0.25s; }
.apex-card:hover .apex-card-title, .apex-card:focus-visible .apex-card-title { color: var(--white); }
.apex-card:hover .apex-card-body, .apex-card:hover .apex-card-link,
.apex-card:focus-visible .apex-card-body, .apex-card:focus-visible .apex-card-link { color: rgba(245,241,232,0.7); }

/* ── Opt-in section (homepage) ── */
.optin-section { background: var(--navy); padding: 96px 64px; border-top: 1px solid rgba(36,59,83,0.4); scroll-margin-top: 72px; }
.optin-inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.optin-title { font-family: 'Montserrat', sans-serif; font-size: clamp(26px, 3.5vw, 40px); font-weight: 800; color: var(--white); line-height: 1.15; margin-bottom: 16px; }
.optin-body { font-size: 15px; line-height: 1.7; color: rgba(245,241,232,0.65); max-width: 380px; }

/* ── Opt-in form (dark by default) ── */
.apex-optin-form { display: flex; flex-direction: column; gap: 16px; }
.apex-optin-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.apex-optin-fields .apex-field:last-child:nth-child(odd) { grid-column: 1 / -1; }
.apex-field { display: flex; flex-direction: column; gap: 6px; }
.apex-field label { font-size: 12px; color: rgba(245,241,232,0.7); }
.apex-field input, .apex-field select {
  padding: 12px 14px; width: 100%;
  background: rgba(245,241,232,0.06); border: 1px solid rgba(245,241,232,0.2); border-radius: 1px;
  font-family: 'Inter', sans-serif; font-size: 14px; color: var(--white);
}
.apex-field select option { background: var(--navy); }
.apex-field input:focus-visible, .apex-field select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.apex-consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.55; color: rgba(245,241,232,0.8); cursor: pointer; }
.apex-consent input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--blue); }
.apex-optin-form .btn-primary { align-self: flex-start; }
.apex-optin-legal { font-size: 11px; line-height: 1.6; color: var(--gray); }
.apex-optin-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.apex-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.apex-optin-form.is-compact .apex-optin-fields { grid-template-columns: 1fr; }

/* Light variant (on white pages, e.g. unsubscribe form) */
.apex-optin-form.is-light { max-width: 420px; margin: 24px 0; }
.apex-optin-form.is-light .apex-field label { color: var(--navy); }
.apex-optin-form.is-light .apex-field input { background: #fff; color: var(--black); border-color: rgba(10,14,23,0.25); }
.apex-optin-form.is-light .btn-primary { background: var(--navy); color: var(--white); }

/* Sidebar (blog posts) */
.optin-sidebar { background: var(--navy); padding: 28px; margin-bottom: 24px; scroll-margin-top: 80px; }
.optin-sidebar-title { font-family: 'Montserrat', sans-serif; font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 16px; }
.optin-sidebar .apex-consent { font-size: 12px; }

/* CF7 marketing checkbox */
.wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.wpcf7-acceptance label { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; letter-spacing: 0; text-transform: none; line-height: 1.55; color: rgba(245,241,232,0.8); text-align: left; }
.wpcf7-form .form-note { font-size: 11px; color: var(--gray); text-align: left; margin: 12px 0; }
.wpcf7-form .form-note a { color: inherit; }

/* ── Status message (opt-in) ── */
.apex-toast {
  position: fixed; z-index: 1100; right: 24px; bottom: 24px; max-width: 380px;
  background: var(--white); color: var(--black); padding: 20px 44px 20px 20px;
  border-left: 3px solid var(--blue); box-shadow: 0 12px 32px rgba(11,16,32,0.35);
  font-size: 14px; line-height: 1.55;
}
.apex-toast.is-err { border-left-color: #B3261E; }
.apex-toast strong { display: block; font-family: 'Montserrat', sans-serif; margin-bottom: 6px; color: var(--navy); }
.apex-toast p { margin-bottom: 0; }
.apex-toast form { margin-top: 14px; }
.apex-toast .btn-primary { background: var(--navy); color: var(--white); }
.apex-toast-close { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 22px; line-height: 1; color: var(--gray); cursor: pointer; padding: 4px 8px; }

@media (max-width: 960px) {
  .apex-page-header { padding: 64px 24px 48px; }
  .apex-page-body { padding: 48px 24px; }
  .apex-page-body.has-aside { grid-template-columns: 1fr; gap: 40px; }
  .apex-page-aside { position: static; border-left: 0; border-top: 1px solid rgba(10,14,23,0.12); padding: 24px 0 0; }
  .optin-section { padding: 72px 24px; }
  .optin-inner { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .apex-optin-fields { grid-template-columns: 1fr; }
  .apex-toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}


/* ══════════════════════════════════════════════════════
   v1.1: accessibility, rebuilt templates, languages, guide
   ══════════════════════════════════════════════════════ */

/* Grey text: darker on light sections, lighter on dark blocks (WCAG AA) */
.services-section, .testimonial-section, .apex-page-body, .post-list-wrap, .post-layout { --gray: var(--gray-ink); }
.service-card:hover, .service-card:focus-visible, .post-card:hover, .post-card:focus-within,
.sidebar-cta, .optin-sidebar, .post-nav-link:hover, .post-nav-link:focus-visible { --gray: var(--gray-soft); }

/* Keyboard focus, everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #6F9CCB; outline-offset: 2px;
}
main:focus { outline: none; }

/* Skip link + screen-reader text */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 2000;
  background: var(--white); color: var(--navy); padding: 12px 20px;
  font-weight: 600; text-decoration: none; border-radius: 1px;
}
.skip-link:focus { top: 16px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Content stays visible if JavaScript doesn't run */
html.no-js .reveal { opacity: 1; transform: none; }

/* Respect "reduce motion" */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Header: portal button + language switcher */
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-portal {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--white); text-decoration: none; padding: 10px 16px;
  border: 1px solid rgba(245,241,232,0.3); border-radius: 1px;
}
.header-portal:hover { border-color: var(--white); }
.lang-switch { list-style: none; display: flex; gap: 12px; margin-left: 24px; }
.lang-switch a { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--gray-soft); text-decoration: none; }
.lang-switch a:hover { color: var(--white); }
@media (min-width: 961px) { .main-navigation { display: flex; align-items: center; } }

/* Buttons on light backgrounds */
.btn-primary.is-dark { background: var(--navy); color: var(--white); }

/* Page header extras */
.apex-page-intro { margin-top: 16px; font-size: 15px; line-height: 1.7; color: rgba(245,241,232,0.7); max-width: 520px; }
.apex-breadcrumb { display: flex; gap: 8px; align-items: center; margin-bottom: 24px; font-size: 12px; color: var(--gray-soft); }
.apex-breadcrumb a { color: var(--gray-soft); text-decoration: none; }
.apex-breadcrumb a:hover { color: var(--white); }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; font-size: 13px; color: var(--gray-soft); }

/* Tags */
.post-tag {
  display: inline-block; padding: 4px 12px; margin-bottom: 20px;
  background: rgba(10,14,23,0.06); color: var(--gray);
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; border-radius: 1px;
}
.post-tag.is-dark { background: rgba(36,59,83,0.6); color: var(--gray-soft); }

/* Post list (blog, categories, search) */
.post-list-wrap { max-width: 1440px; margin: 0 auto; padding: 72px 64px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: rgba(10,14,23,0.08); }
.post-card { position: relative; background: var(--white); padding: 40px 32px; transition: background 0.25s; display: flex; flex-direction: column; }
.post-card::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform 0.35s; }
.post-card:hover, .post-card:focus-within { background: var(--navy); }
.post-card:hover::after, .post-card:focus-within::after { transform: scaleX(1); }
.post-card .post-title { font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 700; color: var(--navy); line-height: 1.3; margin-bottom: 14px; transition: color 0.25s; }
.post-card .post-title a { color: inherit; text-decoration: none; }
.post-card .post-title a::before { content: ''; position: absolute; inset: 0; } /* whole card clickable */
.post-card .post-title a:focus-visible { outline: none; }
.post-card:focus-within { outline: 2px solid #6F9CCB; outline-offset: -2px; }
.post-card .post-excerpt { font-size: 14px; line-height: 1.7; color: var(--gray); margin-bottom: 24px; flex: 1; transition: color 0.25s; }
.post-card .post-meta-wrap { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--gray); }
.post-card .read-more { font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.post-card:hover .post-title, .post-card:focus-within .post-title { color: var(--white); }
.post-card:hover .post-excerpt, .post-card:focus-within .post-excerpt { color: rgba(245,241,232,0.75); }
.post-card:hover .read-more, .post-card:focus-within .read-more { color: var(--white); }
.post-card:hover .post-tag, .post-card:focus-within .post-tag { background: rgba(36,59,83,0.6); }

.apex-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 56px; }
.apex-pagination .page-numbers {
  display: inline-block; min-width: 44px; padding: 12px 16px; text-align: center;
  border: 1px solid rgba(10,14,23,0.2); color: var(--navy); text-decoration: none;
  font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 600; border-radius: 1px;
}
.apex-pagination .page-numbers.current { background: var(--navy); color: var(--white); border-color: var(--navy); }
.apex-pagination .page-numbers.dots { border: 0; }

.post-empty { text-align: center; padding: 80px 0; }
.post-empty h2 { font-family: 'Montserrat', sans-serif; font-size: 20px; color: var(--navy); margin-bottom: 12px; }
.post-empty p { color: var(--gray); margin-bottom: 28px; }
.post-empty-search { max-width: 420px; margin: 0 auto; }

/* Single post */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; max-width: 1200px; margin: 0 auto; padding: 72px 64px; align-items: start; }
.post-article { max-width: 760px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(10,14,23,0.1); }
.post-tags > span { font-size: 12px; color: var(--gray); margin-right: 4px; }
.post-tags .post-tag { margin-bottom: 0; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.post-nav-link { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: rgba(10,14,23,0.04); border: 1px solid rgba(10,14,23,0.1); text-decoration: none; border-radius: 1px; transition: background 0.2s; }
.post-nav-link.is-next { text-align: right; }
.post-nav-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray); }
.post-nav-title { font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 600; color: var(--navy); }
.post-nav-link:hover, .post-nav-link:focus-visible { background: var(--navy); }
.post-nav-link:hover .post-nav-title, .post-nav-link:focus-visible .post-nav-title { color: var(--white); }

.post-sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 24px; }
.sidebar-cta { background: var(--navy); padding: 32px; }
.sidebar-cta h2 { font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 700; color: var(--white); line-height: 1.3; margin-bottom: 12px; }
.sidebar-cta p { font-size: 13px; line-height: 1.65; color: rgba(245,241,232,0.7); margin-bottom: 24px; }
.sidebar-cta .btn-primary { display: block; text-align: center; }
.optin-sidebar { margin-bottom: 0; }
.optin-sidebar-title { line-height: 1.3; }
.sidebar-recent { border: 1px solid rgba(10,14,23,0.1); padding: 28px; }
.sidebar-recent h2 { font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy); margin-bottom: 12px; }
.sidebar-recent ul { list-style: none; }
.sidebar-recent li { padding: 12px 0; border-bottom: 1px solid rgba(10,14,23,0.08); }
.sidebar-recent li:last-child { border-bottom: 0; }
.sidebar-recent a { display: block; font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--navy); text-decoration: none; margin-bottom: 4px; }
.sidebar-recent a:hover { text-decoration: underline; }
.sidebar-recent span { font-size: 12px; color: var(--gray); }

/* 404 */
.apex-404 { padding-top: 60px; min-height: 70vh; display: flex; align-items: center; background: var(--navy); }
.apex-404-inner { padding: 80px 64px; max-width: 720px; }
.apex-404-code { font-family: 'Montserrat', sans-serif; font-size: clamp(64px, 10vw, 120px); font-weight: 800; color: var(--blue); line-height: 1; margin-bottom: 24px; }
.apex-404 h1 { font-family: 'Montserrat', sans-serif; font-size: clamp(24px, 3.5vw, 36px); font-weight: 700; color: var(--white); margin-bottom: 16px; }
.apex-404 p { font-size: 15px; line-height: 1.7; color: rgba(245,241,232,0.7); margin-bottom: 32px; }
.apex-404-search { max-width: 420px; margin-bottom: 32px; }

/* Search form (WordPress default markup) */
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; padding: 12px 14px; border: 1px solid rgba(10,14,23,0.25); border-radius: 1px; font-size: 14px; font-family: 'Inter', sans-serif; }
.search-form .search-submit { padding: 12px 20px; background: var(--blue); color: var(--white); border: 0; border-radius: 1px; font-weight: 600; cursor: pointer; }

/* Opt-in: free guide line */
.optin-guide { margin-top: 20px; font-size: 15px; line-height: 1.6; color: var(--white); }
.optin-guide strong { font-weight: 600; }
.apex-toast .btn-primary { margin-top: 12px; }

@media (max-width: 960px) {
  .post-list-wrap, .post-layout { padding: 48px 24px; }
  .post-grid { grid-template-columns: 1fr; }
  .post-layout { grid-template-columns: 1fr; gap: 40px; }
  .post-sidebar { position: static; }
  .post-nav { grid-template-columns: 1fr; }
  .apex-404-inner { padding: 64px 24px; }
  .header-portal { display: none; }
  .main-navigation.open { flex-direction: column; align-items: flex-start; }
  .lang-switch { margin: 20px 0 0; }
}
@media (min-width: 961px) and (max-width: 1200px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Espace client page: wider content for the dashboard */
.apex-page-article.is-portal { max-width: 960px; }
.apex-page-article.is-portal .apex-ec h2 { margin-top: 0; }

/* Phones: logo left, actions + menu button right */
@media (max-width: 960px) {
  .header-actions { margin-left: auto; }
  .menu-toggle { order: 3; margin-left: 12px; }
}
/* Footer legal links when a real menu is assigned (wp_nav_menu outputs a list) */
.footer-legal ul { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0; padding: 0; }
