/* =========================
   SJ ARTICLE (ETS2 + ATS)
   Ajoute class="sj-article" sur le <section>
   ========================= */

.sj-article{
  /* couleurs */
  --bg: #282828;
  --panel: rgba(0,0,0,0.22);         /* fond foncé des blocs */
  --frame: #164f2c33;               /* demandé pour cadres */
  --text: #ffffff;
  --muted: rgba(255,255,255,0.78);
  --yellow: #e5c900;
  --greenA: #06D571;                /* vert clair */
  --greenB: #048036;                /* vert foncé */
  --radius: 16px;

  background: var(--bg);
  color: var(--text);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  line-height: 1.7;

  /* ✅ sécurité anti overflow horizontal */
  overflow-wrap: anywhere;
}

/* typographie */
.sj-article h1,
.sj-article h2,
.sj-article h3{
  color: var(--yellow);
  font-weight: 900;
  letter-spacing: .2px;
  margin: 0 0 10px;
}

.sj-article h1{ font-size: clamp(1.8rem, 3vw, 2.4rem); }
.sj-article h2{ font-size: clamp(1.45rem, 2.4vw, 2rem); }
.sj-article h3{ font-size: clamp(1.2rem, 2vw, 1.55rem); }

.sj-article p{ margin: 0; color: var(--text); }
.sj-article p + p{ margin-top: 10px; }

.sj-article a{
  color: var(--yellow);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sj-article a:hover{ opacity: .9; }

/* espacement entre sections */
.sj-article section{ margin-top: 34px; }
.sj-article section:first-of-type{ margin-top: 18px; }

/* blocs "panel" (hero / toc / cards / faq / etc.) */
.sj-panel{
  background: var(--panel);
  border: 1px solid var(--frame);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

/* HERO */
.sj-hero{ padding: 18px; }
.sj-hero .sj-title{
  border-left: 8px solid var(--greenB);
  padding-left: .8rem;
}
.sj-hero .sj-lead{
  color: var(--muted);
  font-size: 17px;
  margin-top: 10px;
}

/* TOC */
.sj-toc strong{
  display: inline-block;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 900;
}
.sj-toc ul{
  margin: 8px 0 0 18px;
  line-height: 1.9;
}
.sj-toc a{
  text-decoration: none;
  border-bottom: 1px solid rgba(229,201,0,0.35);
}
.sj-toc a:hover{
  border-bottom-color: rgba(229,201,0,0.75);
}

/* listes */
.sj-article ul,
.sj-article ol{
  margin: 8px 0 0 22px;
  line-height: 1.95;
}
.sj-article li{ margin: 6px 0; }

/* GRID (timeline, cards…) */
.sj-grid{
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.sj-grid--timeline{
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.sj-grid--cards{
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* items de timeline / cartes */
.sj-item{
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--frame);
  border-radius: 12px;
  padding: 12px 14px;
}
.sj-item strong{ color: var(--yellow); }

/* variante "accent" */
.sj-item--accent{
  background: rgba(6,213,113,0.10);
  border-color: rgba(6,213,113,0.22);
}

/* hint */
.sj-hint{
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

/* FAQ */
.sj-faq details{
  background: var(--panel);
  border: 1px solid var(--frame);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 10px;
}
.sj-faq summary{
  cursor: pointer;
  font-weight: 900;
  color: var(--yellow);
  list-style: none;
}
.sj-faq summary::-webkit-details-marker{ display:none; }
.sj-faq summary::before{
  content:"▶";
  display:inline-block;
  margin-right:10px;
  transform: translateY(-1px);
  color: var(--yellow);
}
.sj-faq details[open] summary::before{ content:"▼"; }
.sj-faq details > div{
  margin-top: 10px;
  color: var(--muted);
}

/* CTA boutons */
.sj-cta{
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sj-btn{
  flex: 1 1 280px;
  text-align: center;
  text-decoration: none !important;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 950;
  border: 1px solid var(--frame);
  box-shadow: 0 10px 18px rgba(0,0,0,.18);
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

/* bouton principal : vrai dégradé */
.sj-btn--primary{
  color: #062013;
  background: linear-gradient(135deg, var(--greenA), var(--greenB));
  border-color: rgba(6,213,113,0.25);
}

/* bouton secondaire : “ghost dark” lisible */
.sj-btn--secondary{
  color: var(--yellow);
  background: linear-gradient(
    135deg,
    rgba(22,79,44,0.55),
    rgba(4,128,54,0.35)
  );
  border-color: var(--frame);
}

.sj-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 14px 24px rgba(0,0,0,.22);
}

@media (max-width: 600px){
  .sj-article{ padding: 18px; }
  .sj-article section{ margin-top: 28px; }
}

/* ===============================
   ✅ FIX RESPONSIVE IMAGES (global)
   Empêche toute image de dépasser la largeur du conteneur
   =============================== */

.sj-article img,
.sj-article video,
.sj-article iframe,
.sj-article figure,
.sj-article .wp-block-image,
.sj-article .wp-block-image img{
  max-width: 100%;
}

.sj-article img{
  height: auto;
  display: block;
}

/* Images “standalone” (bloc WP) */
.sj-article figure.wp-block-image{
  margin: 16px auto;
}
.sj-article figure.wp-block-image img{
  width: 100%;
  height: auto;
}

/* ===============================
   IMAGES CÔTE À CÔTE (articles)
   =============================== */

.sj-images-row{
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
}

/* ✅ autorise le shrink en flex (évite overflow horizontal) */
.sj-images-row > *{
  min-width: 0;
}

.sj-image{
  flex: 1 1 420px;
  max-width: 520px;
  text-align: center;
  display: flex;
  flex-direction: column;

  /* ✅ idem si jamais un contenu interne force la largeur */
  min-width: 0;
}

/* ✅ hauteur uniforme mais responsive */
.sj-image img{
  width: 100%;
  height: clamp(180px, 28vw, 320px);
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 14px;
}

/* Caption */
.sj-image .ets2__hint{
  text-align: center;
  margin-top: 12px;
}

/* Mobile */
@media (max-width: 768px){
  .sj-images-row{
    flex-direction: column;
  }

  .sj-image{
    max-width: 100%;
  }
}
/* Galerie RS065 en 2 colonnes (forcée) */
#moza-rs065 .ets2__grid.ets2__grid--gallery{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

/* Responsive: 1 colonne sur mobile */
@media (max-width: 700px){
  #moza-rs065 .ets2__grid.ets2__grid--gallery{
    grid-template-columns: 1fr !important;
  }
}

/* Tuiles propres */
#moza-rs065 .ets2__card.ets2__card--media{
  padding: 0 !important;
  overflow: hidden !important;
}

/* Vignettes même format */
#moza-rs065 .ets2__card--media img{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* =========================
   FAQ SINGLE
========================= */

.faq-page-wrapper {
	max-width: 1920px;
	margin: 0 auto;
	padding-left: 24px !important;
	padding-right: 0px !important;
    margin-block-start: 1.9rem;
}

.faq-layout {
	align-items: flex-start;
}

.faq-main-column,
.faq-sidebar-column {
	min-width: 0;
}

.faq-article-shell {
	overflow: hidden;
}

/* Header principal */
.faq-hero-header {
	background: #232323;
	border-radius: 20px 20px 0 0;
	padding: 24px;
	margin: 0;
}

.faq-title {
	margin: 0;
	text-align: center;
	font-size: clamp(2rem, 3vw, 2.7rem);
	line-height: 1.08;
	font-weight: 700;
	color: #f2dc00;
}

/* Supprime les marges Gutenberg entre blocs */
.faq-article-shell > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

/* Image mise en avant */
.faq-featured-image {
	margin: 0 !important;
}

.faq-featured-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: auto;
	object-fit: contain;
	border-radius: 0;
}

/* Contenu */
.faq-content {
	background: transparent;
	padding: 24px 0 0;
	margin: 0 !important;
	color: #ffffff;
	font-size: 1rem;
	line-height: 1.7;
}

.faq-content > * {
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: none !important;
}

.faq-content h2,
.faq-content h3,
.faq-content h4,
.faq-content h5,
.faq-content h6 {
	color: #f2dc00;
	font-weight: 700;
	line-height: 1.2;
	margin-top: 0;
	margin-bottom: 0.8em;
}

.faq-content h2 {
	font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.faq-content h3 {
	font-size: clamp(1.2rem, 1.8vw, 1.55rem);
}

.faq-content p,
.faq-content li {
	color: #ffffff;
	font-size: 1rem;
	line-height: 1.7;
}

.faq-content strong,
.faq-content b {
	font-weight: 700;
}

.faq-content a {
	color: #f2dc00;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.faq-content ul,
.faq-content ol {
	padding-left: 1.5rem;
}

/* Neutralise les contraintes internes Gutenberg */
.faq-content .wp-block-group,
.faq-content .wp-block-columns,
.faq-content .wp-block-cover,
.faq-content .wp-block-image,
.faq-content figure {
	max-width: none;
}

.faq-content .wp-block-group:not(.has-background) {
	padding-left: 0;
	padding-right: 0;
}

/* =========================
   SIDEBAR FAQ
========================= */

.faq-sidebar {
	gap: 30px;
}

.faq-sidebar-heading-wrap {
	background: #232323;
	border-radius: 14px;
	padding: 18px 24px;
	margin: 0;
}

.faq-sidebar-heading {
	margin: 0;
	text-align: center;
	font-size: 30px;
	line-height: 1.1;
	font-weight: 700;
	color: #f2dc00;
}

.faq-sidebar-query {
	display: flex;
	flex-direction: column;
	gap: 30px;
    padding-left: 20px;
    padding-right: 20px;
}

.faq-sidebar-list {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.faq-card {
	background: #232323;
	border-radius: 16px;
	overflow: hidden;
    padding: 24px;
}

.faq-card-image {
	margin: 0;
}

.faq-card-image img {
	width: 100%;
	height: auto;
	display: block;
}

.faq-card-content {
	margin-top: 16px;
    margin-bottom: 8px;
    padding-top: 0px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
}

.faq-card-title {
	margin: 0;
	font-size: clamp(1.45rem, 2vw, 1.92rem);
	line-height: 1.15;
	font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 8px;
}

.faq-card-title a {
	color: #f2dc00;
	text-decoration: none;
	font-weight: 700;
}

.faq-card-title a:hover {
	text-decoration: underline;
}

.faq-card-date {
	font-size: 0.95rem;
	color: #94a3b8;
}

.faq-sidebar .wp-block-post-date,
.faq-sidebar .wp-block-post-date time {
	color: #94a3b8;
}

.faq-sidebar .wp-block-post-title,
.faq-sidebar .wp-block-post-title a,
.faq-sidebar .wp-block-heading {
	font-weight: 700;
}

/* =========================
   LARGEUR / ALIGNEMENT
========================= */

.faq-page-wrapper .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.faq-sidebar .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {
	.faq-title {
		font-size: clamp(1.9rem, 2.8vw, 2.4rem);
	}

	.faq-sidebar-heading {
		font-size: clamp(1.8rem, 2.4vw, 2.3rem);
	}

	.faq-card-title {
		font-size: clamp(1.25rem, 1.8vw, 1.55rem);
	}
}

@media (max-width: 781px) {
	.faq-page-wrapper {
		padding-left: 18px !important;
		padding-right: 18px !important;
	}

	.faq-main-column,
	.faq-sidebar-column {
		flex-basis: 100% !important;
	}

	.faq-hero-header {
		padding: 20px 18px;
	}

	.faq-title {
		font-size: 2rem;
		text-align: center;
	}

	.faq-featured-image img {
		max-height: none;
	}

	.faq-content {
		padding-top: 18px;
	}

	.faq-sidebar-heading {
		font-size: 1.9rem;
	}

	.faq-card-content {
		padding: 24px !important;
	}
}