/* =====================================================================
 * Revue du droit insolite : articles (décembre 2026)
 * Chargé après design-2026.css, sur les articles seuls (inc/revue-articles.php).
 * Matières : le texte est à l'encre sur le vélin ; les encarts sont des cadres d'or pressé
 * (filet or sombre, empreinte lue à la lumière nord-ouest : ombre en haut à gauche, arête claire
 * en bas à droite). Libre Caslon partout. Aucun aplat de couleur, aucune taille saisie en ligne.
 * ===================================================================== */

/* ---------- 1. Anciens styles en ligne : tailles, polices, couleurs, centrages ----------
   Contenus de 2018 à 2022 : « font-size: 20px », « 14pt », police système, gris #cccccc sur le
   vélin, paragraphes centrés ou justifiés. Le texte suit la feuille : Caslon Text, encre, à gauche. */
.single-post .hentry .entry-content [style*="font-size"],
.single-post .hentry .entry-content :is(p, li, span, h2, h3, h4)[class*="-font-size"] { font-size: inherit !important; }
.single-post .hentry .entry-content :is(p, li)[style*="font-size"],
.single-post .hentry .entry-content :is(p, li)[class*="-font-size"] { font-size: var(--cj-t-lecture) !important; }
.single-post .hentry .entry-content [style*="font-family"] { font-family: inherit !important; }
.single-post .hentry .entry-content :is(p, li, span, strong, em, h2, h3, h4)[style*="color"],
.single-post .hentry .entry-content :is(p, li, span, h2, h3, h4).has-text-color { color: inherit !important; }
.single-post .hentry .entry-content :is(p, h2, h3, h4, li)[style*="text-align"],
.single-post .hentry .entry-content :is(p, h2, h3, h4).has-text-align-center { text-align: start !important; }
.single-post .hentry .entry-content p:is(:empty, :has(> br:only-child)) { display: none; }
.single-post .hentry .entry-content .wp-block-spacer { display: none; }

/* ---------- 2. Rythme et mesure ----------
   Mobile : la colonne de la feuille ; ordinateur : --cj-mesure-article (mesurée : 65 à 72 signes par ligne). */
.single-post .hentry .entry-content > p,
.single-post .hentry .entry-content > ul,
.single-post .hentry .entry-content > ol { margin-top: 0; margin-bottom: 1.1em; }
@media (min-width: 1024px) {
	.single-post .hentry .entry-content { --cj-mesure-article: 41rem; }
	.single-post .hentry .entry-content > :is(p, ul, ol, blockquote, h2, h3, h4, details, .wp-block-group, pre, figure.wp-block-pullquote) { max-width: var(--cj-mesure-article); }
}
.single-post div.entry-content > h2 { text-wrap: balance; }
.single-post div.entry-content > :is(h2, h3) + :is(p, ul, ol) { margin-top: 0; }
.single-post .hentry .entry-content :is(h2, h3, h4) strong { font-weight: inherit; }

/* Listes : puces et numéros à l'or sombre, retrait mesuré */
.single-post .hentry .entry-content :is(ul, ol):not(.products):not(.cj-palmares) { margin-left: 0; padding-left: 1.4em; }
.single-post .hentry .entry-content :is(ul, ol):not(.products):not(.cj-palmares) > li { margin: 0 0 .45em; padding-left: .2em; }
.single-post .hentry .entry-content :is(ul, ol):not(.products) > li::marker { color: var(--cj-or-sombre); }
.single-post .hentry .entry-content ul:not(.products) > li { list-style: disc; }
.single-post .hentry .entry-content ol:not(.products):not(.cj-palmares) > li { list-style: decimal; }

/* Texte préformaté (lettre recopiée) : dans la police de la feuille, sans cadre gris */
.single-post .hentry .entry-content pre.wp-block-preformatted {
	margin-top: 1.5em; margin-bottom: 1.5em;
	padding: 0 0 0 16px;
	border-left: 2px solid var(--cj-filet-papier);
	background: none;
	color: var(--cj-encre-papier);
	font: italic 400 var(--cj-t-lecture)/1.6 var(--cj-serif);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

/* ---------- 3. Figures, légendes, images ---------- */
.single-post .hentry .entry-content figure.wp-block-image { margin-top: 2em; margin-bottom: 2em; text-align: center; }
.single-post .hentry .entry-content figure.wp-block-image img { display: block; margin: 0 auto; box-shadow: var(--cj-ombre-carton-papier); }
.single-post .hentry .entry-content figure.wp-block-image figcaption {
	max-width: 32em;
	margin: 10px auto 0;
	text-align: center;
	font-style: italic;
	text-wrap: balance;
}
.single-post .hentry .entry-content figure.alignwide { width: auto !important; max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; } /* Storefront : marges négatives des images « larges », qui sortaient de la feuille */
@media (max-width: 599px) {
	.single-post .hentry .entry-content figure.wp-block-image img { max-height: 70vh; width: auto; }
}

/* ---------- 4. Vidéos et contenus intégrés : pleine colonne, 16:9, sans vide au-dessus ---------- */
.single-post .hentry .entry-content :is(.wp-block-advgb-video, .wp-block-video) { width: 100% !important; height: auto !important; margin-top: 2em; margin-bottom: 2em; padding: 0 !important; background: none !important; }
.single-post .hentry .entry-content .advgb-video-wrapper { width: 100% !important; height: auto !important; margin: 0 !important; padding: 0 !important; background: none !important; }
.single-post .hentry .entry-content video { display: block; width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; background: var(--cj-encre); box-shadow: var(--cj-ombre-carton-papier); }
.single-post .hentry .entry-content :is(iframe[src*="youtube"], iframe[src*="ina.fr"], iframe[src*="vimeo"], iframe[src*="dailymotion"]) { display: block; width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; border: 0; }
.single-post .hentry .entry-content .wp-block-embed { margin-top: 2em; margin-bottom: 2em; }
.single-post .hentry .entry-content .wp-block-embed__wrapper { position: static; padding: 0 !important; }
.single-post .hentry .entry-content .wp-block-embed__wrapper::before { content: none !important; }
.single-post .hentry .entry-content .wp-block-embed__wrapper iframe { position: static !important; }

/* ---------- 5. Tableaux : défilement horizontal sur mobile plutôt qu'un débordement ---------- */
.single-post .hentry .entry-content .wp-block-table { margin-top: 2em; margin-bottom: 2em; overflow-x: auto; }
.single-post .hentry .entry-content table { width: 100%; border-collapse: collapse; font: 400 var(--cj-t-note)/1.45 var(--cj-serif); }
.single-post .hentry .entry-content table :is(th, td) { padding: 8px 10px 8px 0; text-align: left; vertical-align: top; }

/* ---------- 6. Encart : un cadre d'or pressé sur le vélin ----------
   Une seule forme pour tous les encarts (anciens paragraphes à fond coloré compris) : filet or sombre,
   empreinte nord-ouest, texte à l'encre, aligné à gauche. */
.single-post .hentry .entry-content .cj-encart,
.single-post .hentry .entry-content :is(p, div).has-background,
.single-post .hentry .entry-content p[style*="background"] {
	margin-top: 2em;
	margin-bottom: 2em;
	padding: 20px 20px 4px;
	border: 1px solid rgba(110, 80, 32, .7) !important;
	border-radius: 0;
	background: none !important;
	box-shadow: inset 1px 1px 0 rgba(52, 33, 8, .28), 1px 1px 0 rgba(255, 251, 238, .9);
	color: var(--cj-encre-papier) !important;
}
.single-post .hentry .entry-content :is(p, div).has-background,
.single-post .hentry .entry-content p[style*="background"] { padding-bottom: 20px; }
/* le groupe a un conteneur intérieur (.wp-block-group__inner-container) dans Storefront */
.single-post .hentry .entry-content .cj-encart :is(.cj-encart, .wp-block-group__inner-container) > :first-child { margin-top: 0; }
.single-post .hentry .entry-content .cj-encart .wp-block-group__inner-container > :last-child { margin-bottom: 16px; }
.single-post .hentry .entry-content .cj-encart .wp-block-group__inner-container > * { max-width: none; margin-left: 0; margin-right: 0; }
.single-post .hentry .entry-content .cj-encart h2 {
	margin: 0 0 .6em;
	color: var(--cj-encre-papier) !important;
	font: 400 var(--cj-t-feuille)/1.15 var(--cj-titre);
	text-align: left;
}
.single-post .hentry .entry-content .cj-encart p { margin: 0 0 1em; }
@media (min-width: 768px) {
	.single-post .hentry .entry-content .cj-encart { padding: 28px 32px 12px; }
}
@media (min-width: 1024px) {
	.single-post .hentry .entry-content > .cj-encart { max-width: calc(var(--cj-mesure-article) + 66px); box-sizing: border-box; }
}

/* ---------- 7. Palmarès : liste ordonnée, une entrée par commune ou par lauréat ----------
   Rang en Caslon Text italique or sombre (comme la nature d'un cartel), puis le nom en gras, puis l'acte. */
.single-post .hentry .entry-content ol.cj-palmares { margin: 0 0 .6em; padding: 0; list-style: none; }
.single-post .hentry .entry-content ol.cj-palmares > li {
	margin: 0;
	padding: 14px 0;
	border-top: 1px solid var(--cj-filet-papier);
	list-style: none;
}
.single-post .hentry .entry-content ol.cj-palmares > li:first-child { border-top: 0; padding-top: 4px; }
.single-post .hentry .entry-content ol.cj-palmares > li::marker { content: none; }
.single-post .hentry .entry-content .cj-rang {
	display: block;
	margin: 0 0 2px;
	color: var(--cj-or-sombre);
	font: italic 400 var(--cj-t-note)/1.45 var(--cj-serif);
}
.single-post .hentry .entry-content ol.cj-palmares > li > strong:first-of-type { font-size: 1.06em; }

/* ---------- 8. Jury et partenaires : grille statique de portraits (remplace les diaporamas) ---------- */
.single-post .hentry .entry-content .wp-block-gallery.cj-jury {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 16px;
	margin-top: 1.5em;
	margin-bottom: 2.5em;
	padding: 0;
}
.single-post .hentry .entry-content .wp-block-gallery.cj-jury > figure.wp-block-image {
	display: block !important;
	width: auto !important;
	margin: 0 !important;
	text-align: left;
}
.single-post .hentry .entry-content .wp-block-gallery.cj-jury > figure.wp-block-image img {
	width: 100% !important;
	height: auto !important;
	max-height: none;
	aspect-ratio: 1;
	object-fit: cover;
	filter: grayscale(.15) sepia(.12);
	box-shadow: var(--cj-ombre-carton-papier);
}
.single-post .hentry .entry-content .wp-block-gallery.cj-jury figcaption {
	position: static !important;
	max-width: none;
	margin: 10px 0 0 !important;
	padding: 0 !important;
	background: none !important;
	color: var(--cj-gris-papier) !important;
	font: 400 var(--cj-t-note)/1.4 var(--cj-serif) !important;
	text-align: left !important;
	text-shadow: none !important;
	overflow: visible !important;
	max-height: none !important;
}
.single-post .hentry .entry-content .wp-block-gallery.cj-jury figcaption strong {
	display: block;
	margin-bottom: 2px;
	color: var(--cj-encre-papier);
	font-size: 1.0625rem;
	font-weight: 400;
}
.single-post .hentry .entry-content .wp-block-gallery.cj-jury figcaption::before,
.single-post .hentry .entry-content .wp-block-gallery.cj-jury figure::before { content: none !important; display: none !important; }
@media (min-width: 600px) {
	.single-post .hentry .entry-content .wp-block-gallery.cj-jury { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
}
@media (min-width: 1024px) {
	.single-post .hentry .entry-content > .wp-block-gallery.cj-jury { max-width: none; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Logos des partenaires : une rangée sur une carte de bristol, sans blanc pur */
.single-post .hentry .entry-content .wp-block-gallery.cj-logos {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px 24px;
	margin-top: 1.5em;
	margin-bottom: 2.5em;
	padding: 20px 16px;
	background: #fff; /* les logos sont des JPEG à fond blanc */
	box-shadow: var(--cj-ombre-carton-papier);
}
.single-post .hentry .entry-content .wp-block-gallery.cj-logos > figure.wp-block-image {
	flex: 0 1 112px;
	width: auto !important;
	margin: 0 !important;
}
.single-post .hentry .entry-content .wp-block-gallery.cj-logos img {
	width: 100% !important;
	height: 72px !important;
	max-height: none;
	object-fit: contain;
	box-shadow: none;
}

/* ---------- 9. Règlement replié (details.cj-faq) : articles en intertitres sobres ---------- */
.single-post .hentry .entry-content details.cj-faq h4 {
	margin: 1.4em 0 .4em;
	color: var(--cj-encre-papier) !important;
	font: 400 var(--cj-t-cartel-titre)/1.3 var(--cj-serif);
}

/* ---------- 10. Anciennes colonnes « Atomic Blocks » (extension retirée) : en pile, sans fond blanc ---------- */
.single-post .hentry .entry-content .wp-block-atomic-blocks-ab-columns { padding: 0 !important; background: none !important; color: inherit !important; }
.single-post .hentry .entry-content .ab-layout-column-wrap { display: block; }

/* ---------- 11. Liste de produits glissée dans l'article : rien à changer (cartels du thème) ---------- */

/* ---------- 12. Visuel à fond transparent et lettres blanches (Pélaji 2019, 1965) : posé sur un carton d'encre ---------- */
.single-post .hentry .entry-content img.wp-image-2050 { padding: 16px; background: var(--cj-encre); box-sizing: border-box; }
