/*!
 * AIMÉ TRANSPORT Core — Styles pour pages FSE
 * Version: 1.5.7 (2026-05-18)
 * Scope: pages FSE hors home (légales, services, pillar pages, articles, archives blog)
 * Charte cohérente avec la home : navy #1a1a2e, accent rouge #e63946, fond #f3f4f6, Inter
 */

/* ─────────────────────────────────────────────────────────────
 * Layout général des pages FSE (hors home)
 * ───────────────────────────────────────────────────────────── */
body.atc-fse {
  background: #f3f4f6;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1e2736;
  line-height: 1.65;
}

/* Hide WordPress generator junk that breaks layout */
body.atc-fse .wp-site-blocks > .wp-block-template-part:first-child {
  /* header reste tel quel */
}

/* ─────────────────────────────────────────────────────────────
 * BANDEAU TITRE H1 — navy avec filet rouge
 * Cible le premier wp-block-group (où s'affiche le titre de page)
 * ───────────────────────────────────────────────────────────── */
body.atc-fse main {
  display: block;
  background: #f3f4f6;
}

body.atc-fse .wp-block-post-title,
body.atc-fse .entry-content > h1:first-child,
body.atc-fse .entry-content h1.wp-block-heading {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1.2;
  margin: 0;
  padding: 56px 6% 24px;
  background: linear-gradient(135deg, #1a1a2e 0%, #2a2a4a 100%);
  color: #ffffff !important;
  position: relative;
}

body.atc-fse .wp-block-post-title::after,
body.atc-fse .entry-content > h1:first-child::after,
body.atc-fse .entry-content h1.wp-block-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: #e63946;
  margin-top: 16px;
}

/* Cas particulier : page hero (FSE pages avec query-loop hero block) */
body.atc-fse main > .wp-block-group:first-of-type:has(.wp-block-post-title),
body.atc-fse main > .wp-block-group.has-background:first-of-type {
  background: linear-gradient(135deg, #1a1a2e 0%, #2a2a4a 100%) !important;
  background-color: #1a1a2e !important;
  color: #ffffff !important;
  padding: 64px 6% 48px !important;
  margin: 0 !important;
}

body.atc-fse main > .wp-block-group:first-of-type h1,
body.atc-fse main > .wp-block-group.has-background:first-of-type h1 {
  color: #ffffff !important;
}

/* ─────────────────────────────────────────────────────────────
 * CARTE DE CONTENU — fond blanc, ombre, max-width
 * ───────────────────────────────────────────────────────────── */
body.atc-fse .entry-content,
body.atc-fse .wp-block-post-content,
body.atc-fse .wp-block-group.is-layout-constrained:has(> .wp-block-post-content),
body.atc-fse main > .wp-block-post-content {
  background: #ffffff;
  max-width: 920px;
  margin: -24px auto 64px;
  padding: 48px 56px 64px;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(26, 26, 46, .08);
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  body.atc-fse .entry-content,
  body.atc-fse .wp-block-post-content {
    padding: 32px 24px 48px;
    margin: -16px 16px 32px;
  }
}

/* ─────────────────────────────────────────────────────────────
 * TYPOGRAPHIE — H2, H3, paragraphes, listes
 * ───────────────────────────────────────────────────────────── */
body.atc-fse .entry-content h2,
body.atc-fse .wp-block-post-content h2,
body.atc-fse .entry-content h2.wp-block-heading {
  font-size: 1.55rem;
  font-weight: 800;
  color: #1a1a2e;
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e63946;
  line-height: 1.3;
}

body.atc-fse .entry-content h2:first-child,
body.atc-fse .wp-block-post-content h2:first-child {
  margin-top: 0;
}

body.atc-fse .entry-content h3,
body.atc-fse .wp-block-post-content h3,
body.atc-fse .entry-content h3.wp-block-heading {
  font-size: 1.18rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 28px 0 10px;
  line-height: 1.4;
}

body.atc-fse .entry-content p,
body.atc-fse .wp-block-post-content p {
  font-size: 1rem;
  color: #374151;
  line-height: 1.75;
  margin: 0 0 16px;
}

body.atc-fse .entry-content p.has-large-font-size,
body.atc-fse .wp-block-post-content p.has-large-font-size {
  font-size: 1.15rem;
  color: #1e2736;
  line-height: 1.65;
  font-weight: 400;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

body.atc-fse .entry-content ul,
body.atc-fse .wp-block-post-content ul,
body.atc-fse .entry-content ol,
body.atc-fse .wp-block-post-content ol {
  margin: 0 0 20px;
  padding-left: 24px;
}

body.atc-fse .entry-content li,
body.atc-fse .wp-block-post-content li {
  font-size: 1rem;
  color: #374151;
  line-height: 1.75;
  margin-bottom: 8px;
}

body.atc-fse .entry-content li strong,
body.atc-fse .wp-block-post-content li strong {
  color: #1a1a2e;
}

/* ─────────────────────────────────────────────────────────────
 * LIENS — accent rouge
 * ───────────────────────────────────────────────────────────── */
body.atc-fse .entry-content a:not(.wp-block-button__link),
body.atc-fse .wp-block-post-content a:not(.wp-block-button__link) {
  color: #e63946;
  text-decoration: none;
  border-bottom: 1px solid rgba(230, 57, 70, .25);
  transition: border-color .15s, background .15s;
}

body.atc-fse .entry-content a:not(.wp-block-button__link):hover,
body.atc-fse .wp-block-post-content a:not(.wp-block-button__link):hover {
  border-bottom-color: #e63946;
  background: rgba(230, 57, 70, .05);
}

/* ─────────────────────────────────────────────────────────────
 * BOUTONS (wp-block-button) — homogénéiser avec home
 * ───────────────────────────────────────────────────────────── */
body.atc-fse .wp-block-button__link {
  background: #e63946 !important;
  color: #ffffff !important;
  padding: 14px 28px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  font-size: .92rem !important;
  text-decoration: none !important;
  border: none !important;
  transition: background .15s, transform .15s !important;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

body.atc-fse .wp-block-button__link:hover {
  background: #c52a36 !important;
  transform: translateY(-1px);
}

body.atc-fse .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  color: #1a1a2e !important;
  border: 1.5px solid #1a1a2e !important;
}

body.atc-fse .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: #1a1a2e !important;
  color: #ffffff !important;
}

body.atc-fse .wp-block-buttons {
  margin: 24px 0;
  gap: 12px;
}

/* ─────────────────────────────────────────────────────────────
 * BLOC ENCADRÉ (séparateurs, citations)
 * ───────────────────────────────────────────────────────────── */
body.atc-fse .wp-block-separator {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 32px 0;
}

body.atc-fse .wp-block-quote {
  border-left: 4px solid #e63946;
  background: #fef2f2;
  padding: 16px 24px;
  margin: 24px 0;
  font-style: italic;
  color: #1e2736;
  border-radius: 0 6px 6px 0;
}

/* ─────────────────────────────────────────────────────────────
 * BLOC "EN SAVOIR PLUS" injecté en bas des pages services
 * (les <h2>En savoir plus...</h2> et <h2>Articles de blog connexes</h2>)
 * ───────────────────────────────────────────────────────────── */
body.atc-fse .entry-content h2:has(+ ul:last-of-type),
body.atc-fse .wp-block-post-content h2:has(+ ul:last-of-type) {
  /* style normal */
}

/* ─────────────────────────────────────────────────────────────
 * NAVIGATION FSE (header)
 * ───────────────────────────────────────────────────────────── */
body.atc-fse header.wp-block-template-part > .wp-block-group,
body.atc-fse header.wp-block-template-part > .wp-block-group.has-background,
body.atc-fse header.wp-block-template-part > .wp-block-group.has-base-background-color {
  background: #1a1a2e !important;
  background-color: #1a1a2e !important;
  padding: 16px 6% !important;
}

body.atc-fse header .wp-block-site-title a,
body.atc-fse header .wp-block-site-title {
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 1.15rem !important;
  text-decoration: none !important;
}

body.atc-fse header .wp-block-navigation .wp-block-navigation-item__content {
  color: rgba(255, 255, 255, .85) !important;
  font-size: .9rem !important;
  font-weight: 500 !important;
  transition: color .15s !important;
}

body.atc-fse header .wp-block-navigation .wp-block-navigation-item__content:hover {
  color: #e63946 !important;
}

body.atc-fse header .wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation__submenu-container {
  background: #1a1a2e !important;
  border: 1px solid rgba(255, 255, 255, .15) !important;
  border-radius: 6px !important;
  padding: 8px 0 !important;
}

body.atc-fse header .wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item__content {
  padding: 8px 16px !important;
  white-space: nowrap !important;
}

/* ─────────────────────────────────────────────────────────────
 * FOOTER FSE
 * ───────────────────────────────────────────────────────────── */
body.atc-fse footer.wp-block-template-part {
  background: #1a1a2e;
  color: rgba(255, 255, 255, .65);
  padding: 48px 6% 24px;
  margin-top: 48px;
}

body.atc-fse footer.wp-block-template-part h2,
body.atc-fse footer.wp-block-template-part h3 {
  color: #ffffff;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
  border-bottom: none;
  padding-bottom: 0;
}

body.atc-fse footer.wp-block-template-part a {
  color: rgba(255, 255, 255, .65);
  text-decoration: none;
  border-bottom: none;
  transition: color .15s;
}

body.atc-fse footer.wp-block-template-part a:hover {
  color: #e63946;
  background: transparent;
}

body.atc-fse footer .wp-block-site-title,
body.atc-fse footer .wp-block-site-title a {
  color: #ffffff !important;
  font-weight: 900 !important;
}

body.atc-fse footer .wp-block-site-tagline {
  color: rgba(255, 255, 255, .45) !important;
  font-size: .85rem !important;
}

/* ─────────────────────────────────────────────────────────────
 * ARCHIVES BLOG (category archive)
 * ───────────────────────────────────────────────────────────── */
body.atc-fse.category .wp-block-query .wp-block-post {
  background: #ffffff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(26, 26, 46, .06);
  margin-bottom: 20px;
  transition: box-shadow .2s, transform .2s;
}

body.atc-fse.category .wp-block-query .wp-block-post:hover {
  box-shadow: 0 6px 16px rgba(26, 26, 46, .1);
  transform: translateY(-2px);
}

body.atc-fse.category .wp-block-post-title a {
  color: #1a1a2e !important;
  text-decoration: none !important;
  border-bottom: none !important;
  font-weight: 800;
}

body.atc-fse.category .wp-block-post-title a:hover {
  color: #e63946 !important;
  background: transparent !important;
}

body.atc-fse.category .wp-block-post-excerpt p,
body.atc-fse.category .wp-block-post-date {
  color: #6b7280;
  font-size: .92rem;
}

/* ─────────────────────────────────────────────────────────────
 * RESPONSIVE
 * ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  body.atc-fse .entry-content h2,
  body.atc-fse .wp-block-post-content h2 {
    font-size: 1.3rem;
  }
  body.atc-fse .entry-content h3,
  body.atc-fse .wp-block-post-content h3 {
    font-size: 1.05rem;
  }
}
